summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Jennings <mej@lbl.gov>2013-03-06 10:39:56 -0800
committerMichael Jennings <mej@lbl.gov>2013-03-06 10:39:56 -0800
commit965fb6656c144052841569da560a50d7946f185d (patch)
tree623c06b8c2ecfb544bc1e1a37b5043096f5132ca
parent7b71e37707280b85ad42bb46cfc745ca32bf81fd (diff)
downloadlibast-965fb6656c144052841569da560a50d7946f185d.tar.gz
More build fixes and cleanups.
-rw-r--r--configure.ac18
-rw-r--r--include/Makefile.am20
-rw-r--r--include/libast/Makefile.am27
-rw-r--r--libast.m417
4 files changed, 39 insertions, 43 deletions
diff --git a/configure.ac b/configure.ac
index 8e6bfb1..660cd86 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,9 +3,13 @@
AC_INIT(configure.ac)
AM_INIT_AUTOMAKE([libast], [0.8])
AC_DEFINE_UNQUOTED(LIBAST_VERSION, "$VERSION", [Version])
-AC_CONFIG_HEADERS([config.h include/libast/sysdefs.h])
AC_CONFIG_MACRO_DIR([.])
+AC_CONFIG_HEADERS([config.h include/libast/sysdefs.h])
+AC_CONFIG_FILES([include/libast/types.h Makefile include/Makefile
+ include/libast/Makefile src/Makefile test/Makefile
+ libast-config])
+
dnl# Set some basic variables
AUTHORS="Michael Jennings (mej@eterm.org)"
AC_SUBST(AUTHORS)
@@ -51,7 +55,7 @@ AC_TRY_RUN([
AC_MSG_RESULT(yes)
AC_DEFINE(STRICT_ISO_C99, 1, [Defined if strict ISO C99 (9899:1999) is requested or required.])
], [
- AC_MSG_RESULT(no - assumed because cross-compiling)
+ AC_MSG_RESULT([no - assumed because cross-compiling])
])
AST_X11_SUPPORT()
@@ -71,9 +75,13 @@ AC_SUBST(LDFLAGS)
AC_SUBST(LIBS)
basedir=.
-AC_OUTPUT(include/libast/types.h Makefile include/Makefile \
- include/libast/Makefile src/Makefile test/Makefile \
- libast-config)
+AH_TOP([
+#pragma once
+])
+AH_BOTTOM([
+])
+AC_OUTPUT
+
test -f libast-config && chmod 755 libast-config
AST_STATUS()
diff --git a/include/Makefile.am b/include/Makefile.am
index efc96d6..3fcaa9e 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,8 +1,20 @@
-# $Id: Makefile.am,v 1.6 2001/09/22 16:25:29 mej Exp $
+nobase_include_HEADERS = libast.h libast/array.h libast/avl_tree.h \
+ libast/condition_if.h libast/dlinked_list.h \
+ libast/iterator_if.h libast/linked_list.h libast/list_if.h \
+ libast/map_if.h libast/mbuff.h libast/module.h \
+ libast/mutex_if.h libast/obj.h libast/objpair.h \
+ libast/pthreads.h libast/regexp.h libast/socket.h libast/str.h \
+ libast/thread_if.h libast/tok.h libast/url.h libast/ustr.h \
+ libast/vector_if.h
-SUBDIRS = $(PACKAGE)
+nodist_include_HEADERS = libast/sysdefs.h libast/types.h
+noinst_HEADERS = libast_internal.h
-include_HEADERS = libast.h
+libast/types.h: libast/types.h.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+libast/sysdefs.h: libast/sysdefs.h.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-EXTRA_DIST = libast_internal.h
MAINTAINERCLEANFILES = Makefile.in
+DISTCLEANFILES = libast/sysdefs.h libast/types.h
diff --git a/include/libast/Makefile.am b/include/libast/Makefile.am
deleted file mode 100644
index c83441b..0000000
--- a/include/libast/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-# $Id: Makefile.am,v 1.6 2001/09/22 16:25:29 mej Exp $
-
-EXTRA_HEADERS = array.h avl_tree.h condition_if.h dlinked_list.h \
-iterator_if.h linked_list.h list_if.h map_if.h mbuff.h module.h \
-mutex_if.h obj.h objpair.h pthreads.h regexp.h socket.h str.h \
-sysdefs.h thread_if.h tok.h types.h url.h ustr.h vector_if.h
-
-install-exec-hook:
- $(mkinstalldirs) $(DESTDIR)$(includedir)/$(PACKAGE)
- for i in $(EXTRA_HEADERS) ; do \
- $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/$(PACKAGE)/ ; \
- done
-
-uninstall-hook:
- rm -rf $(DESTDIR)$(includedir)/$(PACKAGE)
-
-EXTRA_DIST = $(EXTRA_HEADERS) sysdefs.h.in types.h.in
-
-all: types.h sysdefs.h
-
-types.h: types.h.in
- (cd $(top_srcdir) && ./config.status)
-
-sysdefs.h: sysdefs.h.in
- (cd $(top_srcdir) && ./config.status)
-
-MAINTAINERCLEANFILES = Makefile.in
diff --git a/libast.m4 b/libast.m4
index 6a96332..181cf90 100644
--- a/libast.m4
+++ b/libast.m4
@@ -317,7 +317,7 @@ AC_DEFUN([AST_HEADER_CHECKS], [
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h termios.h sys/ioctl.h sys/select.h sys/time.h \
sys/sockio.h sys/byteorder.h malloc.h utmpx.h unistd.h \
- bsd/signal.h stdarg.h errno.h)
+ bsd/signal.h stdarg.h errno.h inttypes.h)
AC_HEADER_TIME
])
AC_DEFUN([AST_FUNC_CHECKS], [
@@ -330,6 +330,7 @@ AC_DEFUN([AST_FUNC_CHECKS], [
dps_symlink_open_bug()
dps_rlimit_nproc()
dps_rlimit_memlock()
+ AC_FUNC_ALLOCA
])
AC_DEFUN([AST_TYPE_CHECKS], [
AC_TYPE_MODE_T
@@ -343,7 +344,7 @@ dnl# LibAST Compiler Checks
dnl#
AC_DEFUN([AST_COMPILER_CHECKS], [
AC_MSG_CHECKING([for ({...}) compiler support])
- AC_CACHE_VAL(ast_compiler_compound_statement_expr, [
+ AC_CACHE_VAL(ast_cv_compiler_compound_statement_expr, [
AC_TRY_COMPILE(
changequote(<<, >>)dnl
<<
@@ -354,13 +355,15 @@ int main(void)
d = ({ b *= c; a += b - c; a + b + c; });
return 0;
} >>
- changequote([, ])
- , ast_compiler_compound_statement_expr=0, ast_compiler_compound_statement_expr=1, ast_compiler_compound_statement_expr=2)
+ changequote([, ]),
+ [ast_cv_compiler_compound_statement_expr=0],
+ [ast_cv_compiler_compound_statement_expr=1],
+ [ast_cv_compiler_compound_statement_expr=2])
])
- if test $ast_compiler_compound_statement_expr -eq 0; then
+ if test $ast_cv_compiler_compound_statement_expr -eq 0; then
AC_MSG_RESULT([yes])
AC_DEFINE([LIBAST_SUPPORT_MACRO_CSE], [1], [Defined if compiler supports compound statement expressions.])
- elif test $ast_compiler_compound_statement_expr -eq 1; then
+ elif test $ast_cv_compiler_compound_statement_expr -eq 1; then
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([unknown, assuming none])
@@ -430,7 +433,7 @@ AC_DEFUN([AST_FLAGS], [
CFLAGS=${CFLAGS--O}
LDFLAGS=`eval eval eval eval eval echo "-L$libdir -L$prefix/lib ${LDFLAGS--O}"`
LDFLAGS=`echo $LDFLAGS | tr ' ' '\n' | uniq | grep -v NONE | tr '\n' ' '`
- LIBS="$GRLIBS $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
+ LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
])
dnl#