[27669] in Source-Commits
libXj commit [debian]: Rewrite the build system
daemon@ATHENA.MIT.EDU (Alexander Chernyakhovsky)
Sun Feb 9 11:51:18 2014
Date: Sun, 9 Feb 2014 11:51:10 -0500
From: Alexander Chernyakhovsky <achernya@MIT.EDU>
Message-Id: <201402091651.s19GpA2Y031883@drugstore.mit.edu>
To: source-commits@MIT.EDU
https://github.com/mit-athena/libXj/commit/e780a8c87762450eb1b822fa9667a74aa011c3b7
commit e780a8c87762450eb1b822fa9667a74aa011c3b7
Author: Alexander Chernyakhovsky <achernya@mit.edu>
Date: Sun Feb 9 08:32:19 2014 -0500
Rewrite the build system
Makefile.am | 81 +++++++++++++++++++++++++++++++++++++++++++++
Makefile.in | 101 ---------------------------------------------------------
configure.ac | 38 +++++++++++++++++++++
configure.in | 13 -------
4 files changed, 119 insertions(+), 114 deletions(-)
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..b574579
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,81 @@
+ACLOCAL_AMFLAGS = -I m4
+
+lib_LTLIBRARIES = libXj.la
+libXj_la_SOURCES = \
+ AClock.c \
+ AClock.h \
+ Arrow.c \
+ Arrow.h \
+ Button.c \
+ Button.h \
+ DClock.c \
+ DClock.h \
+ Drawing.c \
+ Drawing.h \
+ Form.c \
+ Form.h \
+ hash.c \
+ hash.h \
+ Jets.c \
+ Jets.h \
+ Label.c \
+ Label.h \
+ Menu.c \
+ Menu.h \
+ mit-copyright.h \
+ registerCB.c \
+ ScrollBar.c \
+ ScrollBar.h \
+ sintable.h \
+ StrToBool.c \
+ StrToDirect.c \
+ StrToJust.c \
+ StrToOrient.c \
+ StrToPixmap.c \
+ StrToXColor.c \
+ StrToXFont.c \
+ TextDisplay.c \
+ TextDisplay.h \
+ Tree.c \
+ Tree.h \
+ VaCreateJet.c \
+ warn.c \
+ warn.h \
+ Window.c \
+ Window.h \
+ xselect.c \
+ xselect.h
+libXj_la_LIBADD = @x_libraries@
+
+appdefdir=${sysconfdir}/X11/app-defaults
+bitmapdir=${includedir}/X11/bitmaps
+libXj_la_CFLAGS = @x_includes@ -DSHAPE -DHOSTTYPE=\"${HOSTTYPE}\" \
+ -DAPPDEFDIR=\"${appdefdir}\" -DBITMAPDIR=\"${bitmapdir}\"
+
+jetsdir = $(includedir)/Jets
+jets_HEADERS = \
+ AClock.h \
+ Arrow.h \
+ Button.h \
+ DClock.h \
+ Drawing.h \
+ Form.h \
+ hash.h \
+ Jets.h \
+ Label.h \
+ Menu.h \
+ ScrollBar.h \
+ TextDisplay.h \
+ Tree.h \
+ warn.h \
+ Window.h
+
+noinst_PROGRAMS = sintable
+sintable_SOURCES = sintable.c
+
+BUILT_SOURCES = sintable.h
+CLEANFILES = sintable.h
+
+# Generate sintable.h
+sintable.h: sintable$(EXEEXT)
+ ./sintable$(EXEEXT) >$@
diff --git a/Makefile.in b/Makefile.in
deleted file mode 100644
index e1cb94c..0000000
--- a/Makefile.in
+++ /dev/null
@@ -1,101 +0,0 @@
-# $Id: Makefile.in,v 1.5 2000-04-26 15:12:42 ghudson Exp $
-
-SHELL=/bin/sh
-
-SHELL=/bin/sh
-VPATH=@srcdir@
-INSTALL=@INSTALL@
-INSTALL_PROGRAM=@INSTALL_PROGRAM@
-RANLIB=@RANLIB@
-MKDIR_P=@MKDIR_P@
-srcdir=@srcdir@
-top_srcdir=@top_srcdir@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-datadir=@datadir@
-libdir=@libdir@
-includedir=@includedir@
-sysconfdir=@sysconfdir@
-appdefdir=${sysconfdir}/X11/app-defaults
-bitmapdir=${includedir}/X11/bitmaps
-
-CC=@CC@
-DEFS=@DEFS@
-CPPFLAGS=@CPPFLAGS@
-CFLAGS=@CFLAGS@
-X_CFLAGS=@X_CFLAGS@
-LDFLAGS=@LDFLAGS@
-LIBS=@LIBS@
-ALL_CFLAGS=${CPPFLAGS} ${CFLAGS} ${X_CFLAGS} ${DEFS} -DSHAPE \
- -DHOSTTYPE=\"${HOSTTYPE}\" -DAPPDEFDIR=\"${appdefdir}\" \
- -DBITMAPDIR=\"${bitmapdir}\"
-
-OBJS= AClock.o Arrow.o Button.o DClock.o Drawing.o Form.o Jets.o \
- Label.o Menu.o ScrollBar.o StrToBool.o StrToDirect.o \
- StrToJust.o StrToOrient.o StrToPixmap.o StrToXColor.o \
- StrToXFont.o TextDisplay.o Tree.o VaCreateJet.o Window.o \
- hash.o registerCB.o warn.o xselect.o
-
-all: libXj.a
-
-libXj.a: ${OBJS}
- ar cru $@ ${OBJS}
- ${RANLIB} $@
-
-.c.o:
- ${CC} -c ${ALL_CFLAGS} $<
-
-sintable.h: sintable
- rm -f $@
- ./sintable > $@
-
-sintable: sintable.o
- ${CC} ${LDFLAGS} -o $@ sintable.o ${LIBS} -lm
-
-check:
-
-install:
- ${MKDIR_P} ${DESTDIR}${libdir}
- ${MKDIR_P} ${DESTDIR}${includedir}/Jets
- ${INSTALL} -m 644 libXj.a ${DESTDIR}${libdir}
- ${RANLIB} ${DESTDIR}${libdir}/libXj.a
- chmod u-w ${DESTDIR}${libdir}/libXj.a
- ${INSTALL} -m 444 AClock.h ${DESTDIR}${includedir}/Jets
- ${INSTALL} -m 444 Arrow.h ${DESTDIR}${includedir}/Jets
- ${INSTALL} -m 444 Button.h ${DESTDIR}${includedir}/Jets
- ${INSTALL} -m 444 DClock.h ${DESTDIR}${includedir}/Jets
- ${INSTALL} -m 444 Drawing.h ${DESTDIR}${includedir}/Jets
- ${INSTALL} -m 444 Form.h ${DESTDIR}${includedir}/Jets
- ${INSTALL} -m 444 Jets.h ${DESTDIR}${includedir}/Jets
- ${INSTALL} -m 444 Label.h ${DESTDIR}${includedir}/Jets
- ${INSTALL} -m 444 Menu.h ${DESTDIR}${includedir}/Jets
- ${INSTALL} -m 444 ScrollBar.h ${DESTDIR}${includedir}/Jets
- ${INSTALL} -m 444 TextDisplay.h ${DESTDIR}${includedir}/Jets
- ${INSTALL} -m 444 Tree.h ${DESTDIR}${includedir}/Jets
- ${INSTALL} -m 444 Window.h ${DESTDIR}${includedir}/Jets
- ${INSTALL} -m 444 hash.h ${DESTDIR}${includedir}/Jets
- ${INSTALL} -m 444 warn.h ${DESTDIR}${includedir}/Jets
-
-clean:
- rm -f ${OBJS} sintable.o sintable libXj.a
-
-${OBJS} sintable.o: mit-copyright.h Jets.h
-AClock.o: AClock.h sintable.h
-Button.o: Button.h
-DClock.o: DClock.h
-Drawing.o: Drawing.h
-Form.o: Form.h
-Jets.o: hash.h
-Label.o: Label.h
-Menu.o: Window.h Menu.h hash.h Button.h warn.h
-ScrollBar.o: ScrollBar.h
-StrToXFont.o: hash.h
-TextDisplay.o: TextDisplay.h xselect.h
-Tree.o: Tree.h
-VaCreateJet.o: VaCreateJet.c
-Window.o: Window.h
-hash.o: hash.h
-registerCB.o: hash.h
-sintable.o: AClock.h
-warn.o: Window.h Button.h Label.h Form.h warn.h
-xselect.o: xselect.h
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..671e8d5
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,38 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.65])
+AC_INIT([libxj], [10.0.2], [debathena@mit.edu])
+AM_INIT_AUTOMAKE([foreign -Wall])
+AM_MAINTAINER_MODE([enable])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_SRCDIR([Jets.c])
+AC_CONFIG_HEADERS([config.h])
+
+# Checks for programs.
+AC_PROG_CC
+# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+LT_INIT
+
+# Checks for libraries.
+AC_CHECK_LIB([m], [sin])
+
+# Checks for header files.
+AC_PATH_X
+AC_SUBST([x_includes])
+AC_SUBST([x_libraries])
+AC_CHECK_HEADERS([stdlib.h string.h sys/file.h sys/ioctl.h sys/time.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_STRUCT_TIMEZONE
+
+# Checks for library functions.
+AC_FUNC_MALLOC
+AC_FUNC_REALLOC
+AC_CHECK_FUNCS([gettimeofday memset select strcasecmp strchr strerror strncasecmp strrchr])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/configure.in b/configure.in
deleted file mode 100644
index e062c05..0000000
--- a/configure.in
+++ /dev/null
@@ -1,13 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT(Jets.c)
-
-AC_PROG_CC
-AC_PROG_INSTALL
-AC_PROG_RANLIB
-AC_PROG_MKDIR_P
-AC_PATH_XTRA
-
-AC_STRUCT_TIMEZONE
-AC_CHECK_HEADERS(sys/filio.h)
-
-AC_OUTPUT(Makefile)
diff --git a/m4/.gitignore b/m4/.gitignore
new file mode 100644
index 0000000..e69de29