]> granicus.if.org Git - apache/commitdiff
autoconf: Start adding support for selecting modules on the
authorManoj Kasichainula <manoj@apache.org>
Sun, 5 Dec 1999 10:33:41 +0000 (10:33 +0000)
committerManoj Kasichainula <manoj@apache.org>
Sun, 5 Dec 1999 10:33:41 +0000 (10:33 +0000)
./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

acinclude.m4
configure.in
modules/aaa/config.m4

index 104759b946115bdebba5fdb43f22eef6c2514489..ff59e8bf0128ca5b869928fa91e581cb487ae8a2 100644 (file)
@@ -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
 ])
 
index a36d785e751c496b36dba5f1a30fd5b96d41200d..248c0c3d2be52baff50d981e30c10ea8beccce21 100644 (file)
@@ -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])
index 15d5947eb074b05cde854efea4b52c2db925d233..39c927e5b69c3e22fd28bad36a8392340b8c0699 100644 (file)
@@ -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)