| dnl |
| dnl Process this file with autoconf to produce a configure script |
| dnl |
| |
| AC_PREREQ(2.13) |
| AC_INIT(build/rules.mk.in) |
| |
| AC_CONFIG_HEADER(include/private/apu_config.h) |
| AC_CONFIG_AUX_DIR(build) |
| |
| AC_PROG_CC |
| AC_PROG_AWK |
| AC_CHECK_PROG(RM, rm, rm) |
| |
| dnl |
| dnl compute the top directory of the build |
| dnl note: this is needed for LIBTOOL and exporting the bundled Expat |
| dnl |
| top_builddir="`cd $srcdir ; pwd`" |
| AC_SUBST(top_builddir) |
| |
| dnl |
| dnl set up the compilation flags and stuff |
| dnl |
| INCLUDES="$INCLUDES -I\$(top_builddir)/include/private -I\$(top_builddir)/include" |
| |
| dnl |
| dnl 1. Find the APR includes directory and (possibly) the source (base) dir. |
| dnl 2. Determine what DBM backend type to use. |
| dnl 3. Find Expat |
| dnl |
| APU_FIND_APR |
| APU_CHECK_DBM |
| APU_FIND_EXPAT |
| |
| INCLUDES="$INCLUDES -I$APR_INCLUDES" |
| |
| dnl |
| dnl prep libtool |
| dnl |
| echo "performing libtool configuration..." |
| AC_PROG_LIBTOOL |
| |
| dnl |
| dnl grab flags from APR. |
| dnl ### APR doesn't have "nice" names for its exports (yet), but it isn't |
| dnl ### a problem to deal with them right here |
| dnl |
| . "$APR_SOURCE_DIR/APRVARS" |
| APR_EXPORT_CPPFLAGS="$EXTRA_CPPFLAGS" |
| APR_EXPORT_CFLAGS="$EXTRA_CFLAGS" |
| APR_EXPORT_LIBS="$EXTRA_LIBS" |
| |
| dnl |
| dnl Prep all the flags and stuff for compilation and export to other builds |
| dnl |
| CFLAGS="$CFLAGS $INCLUDES $APR_EXPORT_CFLAGS $APR_EXPORT_CPPFLAGS" |
| LIBS="$LIBS $APR_EXPORT_LIBS" |
| |
| AC_SUBST(APRUTIL_EXPORT_LIBS) |
| |
| dnl |
| dnl BSD/OS (BSDi) needs to use a different include syntax in the Makefiles |
| dnl |
| case "$host_alias" in |
| *bsdi*) |
| INCLUDE_RULES=".include \"$top_builddir/build/rules.mk\"" |
| ;; |
| *) |
| INCLUDE_RULES="include $top_builddir/build/rules.mk" |
| ;; |
| esac |
| AC_SUBST(INCLUDE_RULES) |
| |
| if test -d ./test; then |
| test_Makefile="test/Makefile" |
| fi |
| |
| dnl |
| dnl everthing is done. |
| AC_OUTPUT([ |
| Makefile |
| export_vars.sh |
| build/Makefile |
| build/rules.mk |
| include/private/apu_select_dbm.h |
| include/apu.h |
| buckets/Makefile |
| crypto/Makefile |
| dbm/Makefile |
| dbm/sdbm/Makefile |
| encoding/Makefile |
| hooks/Makefile |
| uri/Makefile |
| xml/Makefile |
| $test_Makefile |
| ]) |