mirror of
https://github.com/apache/httpd.git
synced 2025-08-20 16:09:55 +00:00
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
This commit is contained in:
11
acinclude.m4
11
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
|
||||
])
|
||||
|
||||
|
@ -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])
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user