From: Manoj Kasichainula Date: Sun, 5 Dec 1999 10:33:41 +0000 (+0000) Subject: autoconf: Start adding support for selecting modules on the X-Git-Tag: 1.3.10~122 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=876b8f3508516c3cfdd1b73c7cf3525fd9bb0078;p=apache autoconf: Start adding support for selecting modules on the ./configure line. This commit only supports mod_env and mod_log_config. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84225 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/acinclude.m4 b/acinclude.m4 index 104759b946..ff59e8bf01 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -7,19 +7,20 @@ dnl "modname" is the name of the modules/ subdir where the extension resides dnl "shared" can be set to "shared" or "yes" to build the extension as dnl a dynamically loadable library. dnl +dnl XXX - for now, all modules using this function are in modules/standard AC_DEFUN(APACHE_MODULE,[ - if test -d "$cwd/$srcdir/modules/$1" ; then - MOD_SUBDIRS="$MOD_SUBDIRS $1" + if test -d "$cwd/$srcdir/modules/standard" ; then +dnl MOD_SUBDIRS="$MOD_SUBDIRS $1" if test "$2" != "shared" -a "$2" != "yes"; then libname=$(basename $1) _extlib="libapachemod_${libname}.a" - MOD_LTLIBS="$MOD_LTLIBS modules/$1/libapachemod_${libname}.la" - MOD_LIBS="$MOD_LIBS $1/$_extlib" + MOD_LTLIBS="$MOD_LTLIBS modules/standard/libapachemod_${libname}.la" + MOD_LIBS="$MOD_LIBS standard/$_extlib" MOD_STATIC="$MOD_STATIC $1" else MOD_SHARED="$MOD_SHARED $1" fi - APACHE_OUTPUT(modules/$1/Makefile) +dnl APACHE_OUTPUT(modules/$1/Makefile) fi ]) diff --git a/configure.in b/configure.in index a36d785e75..248c0c3d2b 100644 --- a/configure.in +++ b/configure.in @@ -123,5 +123,5 @@ AC_SUBST(OS_DIR) dnl ## Build modules.c rm -f $srcdir/modules.c echo $MODLIST | $AWK -f $srcdir/helpers/build-modules-c.awk > $srcdir/modules.c -AC_OUTPUT([Makefile ap/Makefile main/Makefile modules/Makefile os/Makefile - $APACHE_OUTPUT_FILES]) +AC_OUTPUT([Makefile ap/Makefile main/Makefile modules/Makefile + modules/standard/Makefile os/Makefile $APACHE_OUTPUT_FILES]) diff --git a/modules/aaa/config.m4 b/modules/aaa/config.m4 index 15d5947eb0..39c927e5b6 100644 --- a/modules/aaa/config.m4 +++ b/modules/aaa/config.m4 @@ -1,7 +1,34 @@ +dnl modules enabled in this directory by default +default_env=yes +default_log_config=yes + +STANDARD_LIBS="" +AC_DEFUN(STANDARD_MODULE,[ + APACHE_MODULE($1) + STANDARD_LIBS="$STANDARD_LIBS libapachemod_$1.la" +]) + +dnl XXX - Need to add help text to --enable-module flags +dnl XXX - Need to add support for per-module config +AC_DEFUN(APACHE_CHECK_STANDARD_MODULE, [ + AC_MSG_CHECKING([whether to enable mod_$1]) + AC_ARG_ENABLE(patsubst([$1], _, -), [ --enable-]patsubst([$1], _, -), [], + [enable_$1=$default_$1]) + if test "$enable_[$1]" != "no" ; then + MODLIST="$MODLIST $2" + STANDARD_MODULE([$1]) + fi + AC_MSG_RESULT([$enable_$1]) +]) + +APACHE_CHECK_STANDARD_MODULE(env, env) +APACHE_CHECK_STANDARD_MODULE(log_config, config_log) dnl ## mod_usertrack.c AC_CHECK_HEADERS(sys/times.h) AC_CHECK_FUNCS(times) -MODLIST="$MODLIST env config_log mime negotiation includes autoindex dir cgi asis imap action userdir alias access auth setenvif echo" -APACHE_MODULE(standard) +MODLIST="$MODLIST mime negotiation includes autoindex dir cgi asis imap action userdir alias access auth setenvif echo" +STANDARD_MODULE(standard) + +AC_SUBST(STANDARD_LIBS)