]> granicus.if.org Git - apache/commitdiff
Completely revamp configure so that it preserves the standard make
authorRoy T. Fielding <fielding@apache.org>
Sun, 29 Apr 2001 05:24:11 +0000 (05:24 +0000)
committerRoy T. Fielding <fielding@apache.org>
Sun, 29 Apr 2001 05:24:11 +0000 (05:24 +0000)
variables CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS and LIBS by moving
the configure additions to EXTRA_* variables.  Also, allow the user
to specify NOTEST_* values for all of the above, which eliminates the
need for THREAD_CPPFLAGS, THREAD_CFLAGS, and OPTIM.  Fix the setting
of INCLUDES and EXTRA_INCLUDES.  Check flags as they are added to
avoid pointless duplications.  Fix the order in which flags are given
on the compile and link lines.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88960 13f79535-47bb-0310-9956-ffa450edef68

20 files changed:
CHANGES
INSTALL
acinclude.m4
build/rules.mk
configure.in
hints.m4
modules/aaa/config.m4
modules/cache/config.m4
modules/dav/main/config5.m4
modules/echo/config.m4
modules/filters/config.m4
modules/generators/config5.m4
modules/mappers/config9.m4
modules/metadata/config.m4
modules/tls/config.m4
os/beos/config.m4
os/os2/config.m4
server/Makefile.in
server/config.m4
server/mpm/spmt_os2/config5.m4

diff --git a/CHANGES b/CHANGES
index a793518af11b911be306455edf2a7f99a711df87..febf41c19e0705c0763b7bbc3e5e5fe50f95c9b1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,14 @@
 Changes with Apache 2.0.18-dev
 
+  *) Completely revamp configure so that it preserves the standard make
+     variables CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS and LIBS by moving
+     the configure additions to EXTRA_* variables.  Also, allow the user
+     to specify NOTEST_* values for all of the above, which eliminates the
+     need for THREAD_CPPFLAGS, THREAD_CFLAGS, and OPTIM.  Fix the setting
+     of INCLUDES and EXTRA_INCLUDES.  Check flags as they are added to
+     avoid pointless duplications.  Fix the order in which flags are given
+     on the compile and link lines.  [Roy Fielding]
+
   *) Get mod_tls to compile/work better on Windows.  PR #7612
      [Bernhard Schrenk <b.schrenk@improx.com>]
 
diff --git a/INSTALL b/INSTALL
index a21bec8c82f6706fffa362111c9e4b002a15f0e3..7b19507f62a52c1573067bbda2631e2d6c89c6e5 100644 (file)
--- a/INSTALL
+++ b/INSTALL
      additional modules mod_rewrite and mod_speling for later loading
      through the DSO mechanism:
 
-     $ CC="pgcc" OPTIM="-O2" \
+     $ CC="pgcc" CFLAGS="-O2" \
        ./configure --prefix=/sw/pkg/apache \
                    --enable-rewrite=shared \
                    --enable-speling=shared
 
      Reference:
 
-     $ [CC=...]        [CFLAGS_SHLIB=...]           [TARGET=...]
-       [OPTIM=...]     [LD_SHLIB=...]
-       [CFLAGS=...]    [LDFLAGS_SHLIB=...]        
-       [INCLUDES=...]  [LDFLAGS_SHLIB_EXPORT=...] 
-       [LDFLAGS=...]   [RANLIB=...]  
-       [LIBS=...]      [DEPS=...]
-       [NOTEST_CFLAGS=...]
-       [NOTEST_LDFLAGS=...]
+     $ [CC=...]        [TARGET=...]
+       [CPPFLAGS=...]  [NOTEST_CPPFLAGS=...]
+       [CFLAGS=...]    [NOTEST_CFLAGS=...]
+       [CXXFLAGS=...]  [NOTEST_CXXFLAGS=...]
+       [LDFLAGS=...]   [NOTEST_LDFLAGS=...]
+       [LIBS=...]      [NOTEST_LIBS=...]
+       [INCLUDES=...]  [SHLIB_PATH=...] 
+
        ./configure
            [--quiet]         [--prefix=DIR]            [--enable-NAME=(shared)]
            [--verbose]       [--exec-prefix=PREFIX]    [--disable-NAME]
                              [--without-support]       [--suexec-gidmin=GID]
                              [--without-confadjust]    [--suexec-safepath=PATH]
                              [--without-execstrip]
-                            [--server-uid=UID]        [--with-maintainter-mode]
+                            [--server-uid=UID]
                             [--server-gid=GID]
 
-     Use the CC, OPTIM, CFLAGS, INCLUDES, LDFLAGS, LIBS, CFLAGS_SHLIB,
-     LD_SHLIB, LDFLAGS_SHLIB, LDFLAGS_SHLIB_EXPORT, RANLIB, DEPS and
-     TARGET environment variables to override and expand the corresponding
-     default entries as determined by configure. Use NOTEST_CFLAGS
-     and NOTEST_LDFLAGS to add entries that should be used only during
+                             [--enable-maintainter-mode]
+                             [--enable-debug]
+
+     Use the CC, CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS, LIBS, INCLUDES,
+     SHLIB_PATH and TARGET environment variables to override or expand the
+     corresponding default entries as determined by configure.
+
+     Use NOTEST_CPPFLAGS, NOTEST_CFLAGS, NOTEST_CXXFLAGS, NOTEST_LDFLAGS,
+     and NOTEST_LIBS to add entries that should only be used during
      the actual build and compilation of Apache, such as -Werror.
 
      Use the --prefix=PREFIX and --exec-prefix=EPREFIX options to
        subscribe to the `new-httpd' mailing list as described at
        http://www.apache.org/foundation/mailinglists.html
 
-     Thanks for running Apache.
+     Thanks for running Apache httpd.
 
                                           The Apache Group
                                           http://www.apache.org/
index 88322705463e3473116b09cc64aa8efe900da09b..b63ca248de7a23ae2a32a536b0ad063fec88c05a 100644 (file)
@@ -54,21 +54,32 @@ AC_DEFUN(APACHE_GEN_CONFIG_VARS,[
   APACHE_SUBST(prefix)
   APACHE_SUBST(AWK)
   APACHE_SUBST(CC)
-  APACHE_SUBST(CFLAGS)
-  APACHE_SUBST(CPPFLAGS)
   APACHE_SUBST(CXX)
+  APACHE_SUBST(CPPFLAGS)
+  APACHE_SUBST(CFLAGS)
   APACHE_SUBST(CXXFLAGS)
   APACHE_SUBST(LTFLAGS)
   APACHE_SUBST(LDFLAGS)
   APACHE_SUBST(SH_LDFLAGS)
   APACHE_SUBST(HTTPD_LDFLAGS)
+  APACHE_SUBST(LIBS)
   APACHE_SUBST(DEFS)
+  APACHE_SUBST(INCLUDES)
+  APACHE_SUBST(NOTEST_CPPFLAGS)
+  APACHE_SUBST(NOTEST_CFLAGS)
+  APACHE_SUBST(NOTEST_CXXFLAGS)
+  APACHE_SUBST(NOTEST_LDFLAGS)
+  APACHE_SUBST(NOTEST_LIBS)
+  APACHE_SUBST(EXTRA_CPPFLAGS)
+  APACHE_SUBST(EXTRA_CFLAGS)
+  APACHE_SUBST(EXTRA_CXXFLAGS)
+  APACHE_SUBST(EXTRA_LDFLAGS)
+  APACHE_SUBST(EXTRA_LIBS)
+  APACHE_SUBST(EXTRA_INCLUDES)
   APACHE_SUBST(LIBTOOL)
   APACHE_SUBST(SHELL)
   APACHE_SUBST(MODULE_DIRS)
   APACHE_SUBST(PORT)
-  APACHE_SUBST(NOTEST_CFLAGS)
-  APACHE_SUBST(NOTEST_LDFLAGS)
   APACHE_SUBST(CORE_IMPLIB_FILE)
   APACHE_SUBST(CORE_IMPLIB)
   APACHE_SUBST(SH_LIBTOOL)
@@ -102,17 +113,6 @@ AC_DEFUN(APACHE_OUTPUT, [
   APACHE_OUTPUT_FILES="$APACHE_OUTPUT_FILES $1"
 ])
 
-dnl
-dnl AC_ADD_LIBRARY(library)
-dnl
-dnl add a library to the link line
-dnl
-AC_DEFUN(AC_ADD_LIBRARY,[
-  APACHE_ONCE(LIBRARY, $1, [
-    EXTRA_LIBS="$EXTRA_LIBS -l$1"
-  ])
-])
-
 dnl
 dnl AC_CHECK_DEFINE(macro, headerfile)
 dnl
index 4c6df265cea8519ff021926d09db29319c855367..b8a1165d9b8f16148adde81707ef82c006256b3b 100644 (file)
 
 include $(top_builddir)/config_vars.mk
 
+# Combine all of the flags together in the proper order so that
+# the user-defined flags can always override the configure ones, if needed.
+# Note that includes are listed after the flags because -I options have
+# left-to-right precedence and CPPFLAGS may include user-defined overrides.
+#
+ALL_CPPFLAGS = $(DEFS) $(EXTRA_CPPFLAGS) $(NOTEST_CPPFLAGS) $(CPPFLAGS)
+ALL_CFLAGS   = $(EXTRA_CFLAGS) $(NOTEST_CFLAGS) $(CFLAGS)
+ALL_CXXFLAGS = $(EXTRA_CXXFLAGS) $(NOTEST_CXXFLAGS) $(CXXFLAGS)
+ALL_LDFLAGS  = $(EXTRA_LDFLAGS) $(NOTEST_LDFLAGS) $(LDFLAGS)
+ALL_LIBS     = $(EXTRA_LIBS) $(NOTEST_LIBS) $(LIBS)
+ALL_INCLUDES = $(INCLUDES) $(EXTRA_INCLUDES)
+
 # Compile commands
 
-COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(EXTRA_CPPFLAGS) $(CPPFLAGS)
-COMPILE      = $(CC)  $(COMMON_FLAGS) $(EXTRA_CFLAGS) $(CFLAGS) $(NOTEST_CFLAGS)
-CXX_COMPILE  = $(CXX) $(COMMON_FLAGS) $(EXTRA_CXXFLAGS) $(CXXFLAGS)
+COMPILE      = $(CC)  $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(ALL_INCLUDES)
+CXX_COMPILE  = $(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) $(ALL_INCLUDES)
 
 SH_COMPILE     = $(SH_LIBTOOL) --mode=compile $(COMPILE) -c $< && touch $@
 SH_CXX_COMPILE = $(SH_LIBTOOL) --mode=compile $(CXX_COMPILE) -c $< && touch $@
@@ -70,9 +81,9 @@ LT_CXX_COMPILE = $(LIBTOOL) --mode=compile $(CXX_COMPILE) -c $< && touch $@
 
 # Link-related commands
 
-LINK     = $(LIBTOOL) --mode=link $(COMPILE) $(LTFLAGS) $(LDFLAGS) $(NOTEST_LDFLAGS) -o $@
-SH_LINK  = $(SH_LIBTOOL) --mode=link $(COMPILE) $(LTFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(NOTEST_LDFLAGS) $(SH_LDFLAGS) $(CORE_IMPLIB) -o $@
-MOD_LINK = $(LIBTOOL) --mode=link $(COMPILE) -module $(LTFLAGS) $(LDFLAGS) $(NOTEST_LDFLAGS) -o $@
+LINK     = $(LIBTOOL) --mode=link $(COMPILE) $(LTFLAGS) $(ALL_LDFLAGS) -o $@
+SH_LINK  = $(SH_LIBTOOL) --mode=link $(COMPILE) $(LTFLAGS) $(ALL_LDFLAGS) $(SH_LDFLAGS) $(CORE_IMPLIB) -o $@
+MOD_LINK = $(LIBTOOL) --mode=link $(COMPILE) -module $(LTFLAGS) $(ALL_LDFLAGS) -o $@
 
 # Cross compile commands
 
@@ -83,8 +94,6 @@ INSTALL = $(abs_srcdir)/build/install.sh -c
 INSTALL_DATA = $(INSTALL) -m 644
 INSTALL_PROGRAM = $(INSTALL) -m 755
 
-DEFS = -I. -I$(srcdir) -I$(top_srcdir)/server/mpm/$(MPM_NAME) -I$(top_srcdir)/modules/http
-
 # Suffixes
 
 CXX_SUFFIX = cpp
@@ -214,9 +223,9 @@ distclean-p depend-p clean-p:
 
 depend: depend-recursive
        if test "`echo $(srcdir)/*.c`" != "$(srcdir)'/*.c'"; then \
-           gcc -MM $(COMMON_FLAGS) $(srcdir)/*.c | sed 's/\.o:/.lo:/' > $(builddir)/.deps || true;           \
+           gcc -MM $(ALL_CPPFLAGS) $(ALL_INCLUDES) $(srcdir)/*.c | sed 's/\.o:/.lo:/' > $(builddir)/.deps || true;           \
        fi
-#          test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > .deps
+#          test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) *.c > .deps
 
 clean: clean-recursive clean-x
 
index 4b2a0e91d7e2284a3e08bf59f3145b02e5eccf7c..ca39b8776848e4c34ad931b1bb14f8e845d2d3f6 100644 (file)
@@ -21,15 +21,53 @@ sinclude(srclib/apr/build/libtool.m4)
 sinclude(hints.m4)
 sinclude(acinclude.m4)
 
+dnl Save user-defined environment settings for later restoration
+dnl
+APR_SAVE_THE_ENVIRONMENT(CPPFLAGS)
+APR_SAVE_THE_ENVIRONMENT(CFLAGS)
+APR_SAVE_THE_ENVIRONMENT(CXXFLAGS)
+APR_SAVE_THE_ENVIRONMENT(LDFLAGS)
+APR_SAVE_THE_ENVIRONMENT(LIBS)
+APR_SAVE_THE_ENVIRONMENT(INCLUDES)
+
+dnl Generate ./config.nice for reproducing runs of configure
+dnl
+APR_CONFIG_NICE(config.nice)
+
+nl='
+'
 dnl ## Run configure for packages Apache uses
+
+echo $ac_n "${nl}Configuring Apache Portable Runtime library ...${nl}"
+
 APR_SUBDIR_CONFIG(srclib/apr, "$apache_apr_flags --disable-shared")
+
+echo $ac_n "${nl}Configuring Apache Portable Runtime Utility library...${nl}"
+
 APR_SUBDIR_CONFIG(srclib/apr-util, "--with-apr=../apr --disable-shared")
+
+echo $ac_n "${nl}Configuring PCRE regular expression library ...${nl}"
+
 APR_SUBDIR_CONFIG(srclib/pcre)
+
+echo $ac_n "${nl}Configuring Apache httpd ...${nl}"
+
+echo $ac_n "obtaining flag settings from the sub-configures...${nl}"
 . ./srclib/apr/APRVARS
 
-dnl Generate ./config.nice for reproducing runs of configure
+dnl Now that we have APR's EXTRA_flags in our environment, move them over
+dnl to the normal variables to avoid duplications and use them for testing.
+dnl We ignore EXTRA_INCLUDES because our own includes will encompass them.
 dnl
-APR_CONFIG_NICE(config.nice)
+APR_ADDTO(CFLAGS, $EXTRA_CFLAGS)
+APR_ADDTO(CPPFLAGS, $EXTRA_CPPFLAGS)
+APR_ADDTO(LDFLAGS, $EXTRA_LDFLAGS)
+APR_ADDTO(LIBS, $EXTRA_LIBS)
+EXTRA_CFLAGS=
+EXTRA_CPPFLAGS=
+EXTRA_LDFLAGS=
+EXTRA_LIBS=
+EXTRA_INCLUDES=
 
 dnl XXX we can't just use AC_PREFIX_DEFAULT because that isn't subbed in
 dnl by configure until it is too late.  Is that how it should be or not?
@@ -47,6 +85,9 @@ dnl then we are running in VPATH mode.
 
 if test "$abs_builddir" != "$abs_srcdir"; then
   USE_VPATH=1
+  APR_ADDTO(INCLUDES, [-I. -I\$(srcdir) -I\$(top_builddir)/os/\$(OS_DIR) -I\$(top_srcdir)/os/\$(OS_DIR) -I\$(top_builddir)/server/mpm/\$(MPM_NAME) -I\$(top_srcdir)/server/mpm/\$(MPM_NAME) -I\$(top_builddir)/modules/http -I\$(top_srcdir)/modules/http -I\$(top_builddir)/include -I\$(top_srcdir)/include -I\$(top_builddir)/srclib/apr/include -I\$(top_srcdir)/srclib/apr/include -I\$(top_builddir)/srclib/apr-util/include -I\$(top_srcdir)/srclib/apr-util/include])
+else
+  APR_ADDTO(INCLUDES, [-I. -I\$(top_srcdir)/os/\$(OS_DIR) -I\$(top_srcdir)/server/mpm/\$(MPM_NAME) -I\$(top_srcdir)/modules/http -I\$(top_srcdir)/include -I\$(top_srcdir)/srclib/apr/include -I\$(top_srcdir)/srclib/apr-util/include])
 fi
 
 AC_CANONICAL_SYSTEM
@@ -89,16 +130,6 @@ AC_PROG_LN_S
 AC_CHECK_TOOL(RANLIB, ranlib, true)
 dnl AC_PATH_PROG(PERL_PATH, perl)
 
-#
-# Play with CPPFLAGS given what was learned from APR_PRELOAD.
-#
-# XXX: APR only sets this if threads are enabled.  Either APR should be
-# fixed to always set it (most likely), or we should test for threads.
-#
-if test -n "$THREAD_CPPFLAGS"; then
-    CPPFLAGS="$CPPFLAGS $THREAD_CPPFLAGS"
-fi
-
 dnl various OS checks that apparently set required flags
 AC_AIX
 AC_ISC_POSIX
@@ -144,40 +175,31 @@ AC_CHECK_LIB(nsl, gethostbyname)
 AC_CHECK_LIB(nsl, gethostname)
 AC_CHECK_LIB(socket, socket)
 
-AC_ARG_WITH(optim,[  --with-optim="FLAG"       obsolete (use OPTIM environment variable)],
-        [AC_MSG_ERROR('option --with-optim is obsolete; use OPTIM environment variable instead')])
-
 AC_ARG_WITH(port,[  --with-port=PORT        Port on which to listen (default is 80)],
         [if test "$withval" = "yes"; then AC_MSG_ERROR('option --with-port requires a value (the TCP port number)'); else PORT="$withval"; fi],
        [PORT=80])
 
 AC_ARG_ENABLE(debug,[  --enable-debug            Turn on debugging and compile time warnings],
-        [CFLAGS="$CFLAGS -g"; if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi])
+  [APR_ADDTO(CFLAGS,-g)
+   if test "$GCC" = "yes"; then
+     APR_ADDTO(CFLAGS,-Wall)
+   fi
+])dnl
 
 AC_ARG_ENABLE(maintainer-mode,[  --enable-maintainer-mode  Turn on debugging and compile time warnings],
-        [CFLAGS="$CFLAGS -g"; if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -DAP_DEBUG"; fi])
+  [APR_ADDTO(CFLAGS,-g)
+   if test "$GCC" = "yes"; then
+     APR_ADDTO(CFLAGS,[-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -DAP_DEBUG])
+   fi
+])dnl
 
 APACHE_ENABLE_LAYOUT
 APACHE_ENABLE_MODULES
 
-INCLUDES="-I\$(top_srcdir)/include -I\$(top_srcdir)/srclib/apr/include -I\$(top_srcdir)/srclib/apr-util/include"
-if test -n "$USE_VPATH"; then
-  INCLUDES="$INCLUDES -I\$(top_builddir)/include -I\$(top_builddir)/srclib/apr/include"
-fi
-
 dnl reading config stubs
 esyscmd(./build/config-stubs .)
 
-INCLUDES="$INCLUDES -I\$(top_srcdir)/os/\$(OS_DIR)"
-EXTRA_LIBS="$EXTRA_LIBS $LIBS"
-EXTRA_LDFLAGS="$LDFLAGS"
-LIBS=""
-LDFLAGS=""
 APACHE_SUBST(progname)
-APACHE_SUBST(EXTRA_CFLAGS)
-APACHE_SUBST(EXTRA_LDFLAGS)
-APACHE_SUBST(EXTRA_LIBS)
-APACHE_SUBST(INCLUDES)
 APACHE_SUBST(MPM_LIB)
 APACHE_SUBST(OS)
 APACHE_SUBST(OS_DIR)
@@ -205,7 +227,7 @@ if test "$apache_need_shared" = "yes"; then
       POST_SHARED_CMDS='rm $(top_builddir)/_APP_'
       ;;
     *os390)
-      CFLAGS="$CFLAGS -Wc,DLL,EXPORTALL"
+      APR_ADDTO(CFLAGS, [-Wc,DLL,EXPORTALL])
       ;;
   esac
   shared_build="shared-modules"
@@ -292,9 +314,21 @@ fi
 
 dnl get the exported vars from APRUTIL
 . ./srclib/apr-util/export_vars.sh
-EXTRA_LIBS="$EXTRA_LIBS $APRUTIL_EXPORT_LIBS"
+APR_ADDTO(LIBS, $APRUTIL_EXPORT_LIBS)
 AP_LIBS="$AP_LIBS $LIBTOOL_LIBS"
 
+dnl ## Finalize the variables
+echo $ac_n "${nl}Restore user-defined environment settings...${nl}"
+
+APR_RESTORE_THE_ENVIRONMENT(CPPFLAGS, EXTRA_)
+APR_RESTORE_THE_ENVIRONMENT(CFLAGS, EXTRA_)
+APR_RESTORE_THE_ENVIRONMENT(CXXFLAGS, EXTRA_)
+APR_RESTORE_THE_ENVIRONMENT(LDFLAGS, EXTRA_)
+APR_RESTORE_THE_ENVIRONMENT(LIBS, EXTRA_)
+APR_RESTORE_THE_ENVIRONMENT(INCLUDES, EXTRA_)
+
+echo $ac_n "${nl}Construct makefiles and header files...${nl}"
+
 APACHE_GEN_CONFIG_VARS
 
 dnl ## Build modules.c
index d82f58970efd9de1410bbb2317efa59ad0d43717..4a3969c0faf6ae13e8ee136d72ef45a4e2526436 100644 (file)
--- a/hints.m4
+++ b/hints.m4
@@ -58,6 +58,6 @@ dnl   ;;
         APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
         ;;
   esac
-  APR_DOEXTRA
+
 fi
 ])
index df1f11db727cfdf66434d94746c9a0fdcf15ba3c..b8b359f9b15ea5dadc018e198e0113f5077b976d 100644 (file)
@@ -16,6 +16,6 @@ APACHE_MODULE(auth_db, DB-based access databases, , , , [
 
 APACHE_MODULE(auth_digest, RFC2617 Digest authentication, , , most)
 
-LTFLAGS="$LTFLAGS -export-dynamic"
+APR_ADDTO(LTFLAGS,-export-dynamic)
 
 APACHE_MODPATH_FINISH
index 6cdcc9b80b3db812c7eff0016c3a1753b1484906..c4ad08307536e6bae839fdbdff3b52f1e2abc633 100644 (file)
@@ -6,6 +6,6 @@ APACHE_MODPATH_INIT(cache)
 
 APACHE_MODULE(file_cache, File cache, , , no)
 
-LTFLAGS="$LTFLAGS -export-dynamic"
+APR_ADDTO(LTFLAGS,-export-dynamic)
 
 APACHE_MODPATH_FINISH
index bf435023ffe01bda6a8d1badc720ba919fde8535..f576f5f5799269927aa293ea5aaa62556368c8c3 100644 (file)
@@ -15,7 +15,7 @@ APACHE_MODULE(dav, WebDAV protocol handling, $dav_objects, , $dav_enable)
 if test "$enable_dav" != "no"; then
   apache_need_expat=yes
 
-  INCLUDES="$INCLUDES -I\$(top_srcdir)/$modpath_current"
+  APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])
 fi
 
 
index 821b0939fb88a74e2691bca26c884a4ff8585f1d..504a89c44a89cd0b602f7eeac23bbcbf7538cffa 100644 (file)
@@ -6,6 +6,6 @@ APACHE_MODPATH_INIT(echo)
 
 APACHE_MODULE(echo, ECHO server, , , no)
 
-LTFLAGS="$LTFLAGS -export-dynamic"
+APR_ADDTO(LTFLAGS,-export-dynamic)
 
 APACHE_MODPATH_FINISH
index d9c8ad2ec862ae98d85860aa4e14ec0292cce0fa..10fc0231ef17096a8b83e4a54f49e8b9fc3c07c2 100644 (file)
@@ -6,6 +6,6 @@ APACHE_MODPATH_INIT(filters)
 
 APACHE_MODULE(include, Server Side Includes, , , yes)
 
-LTFLAGS="$LTFLAGS -export-dynamic"
+APR_ADDTO(LTFLAGS,-export-dynamic)
 
 APACHE_MODPATH_FINISH
index 6223222f19b0f4d9efedef51168128de2de2d15b..4e4379a6817eeb410c4f364491b3046e55bdb205 100644 (file)
@@ -11,7 +11,7 @@ APACHE_MODULE(info, server information, , , most)
 APACHE_MODULE(suexec, set uid and gid for spawned processes, , , no, [
               other_targets=suexec ] )
 
-LTFLAGS="$LTFLAGS -export-dynamic"
+APR_ADDTO(LTFLAGS,-export-dynamic)
 
 if test "$apache_cv_mpm" = "threaded" -o "$apache_cv_mpm" = "perchild"; then
 # if we are using a threaded MPM, we will get better performance with
index 2c6c08d4527bd51a6e0afa6ce0e40493bb311334..170a2944dbf2fe8b7905a1c720efe918aecdc369 100644 (file)
@@ -14,7 +14,7 @@ APACHE_MODULE(userdir, mapping of user requests, , , yes)
 APACHE_MODULE(alias, translation of requests, , , yes)
 
 APACHE_MODULE(rewrite, regex URL translation, , , most, [
-  EXTRA_CFLAGS="$EXTRA_CFLAGS -DNO_DBM_REWRITEMAP"
+  APR_ADDTO(CFLAGS,-DNO_DBM_REWRITEMAP)
 ])
 
 dnl ### this isn't going to work quite right because of ordering issues
index a694bfeaa0522a1240de19d7f632d3e900e4a3b9..d1bfb56d5b9ac4a9ba2ca21b464913b55a6401b7 100644 (file)
@@ -18,6 +18,6 @@ APACHE_MODULE(usertrack, user-session tracking, , , , [
 APACHE_MODULE(unique_id, per-request unique ids)
 APACHE_MODULE(setenvif, basing ENV vars on headers, , , yes)
 
-LTFLAGS="$LTFLAGS -export-dynamic"
+APR_ADDTO(LTFLAGS,-export-dynamic)
 
 APACHE_MODPATH_FINISH
index b80fe7271bf7d5417122f6ca2cd5832c451663eb..2ecee966e0df4d4d86b2469219dbea3a8aed5d04 100644 (file)
@@ -8,26 +8,26 @@ APACHE_MODULE(tls, TLS/SSL support, $tls_objs, , no, [
   [
       searchfile="$withval/inc/ssl.h"
       if test -f $searchfile ; then
-          INCLUDES="$INCLUDES -I$withval/inc"
-          LIBS="$LIBS -L$withval -lsslc"
+          APR_ADDTO(INCLUDES, [-I$withval/inc])
+          APR_ADDTO(LIBS, [-L$withval -lsslc])
           ssl_lib="SSLC"
       else
           searchfile="$withval/ssl/ssl.h"
           if test -f $searchfile ; then
-              INCLUDES="$INCLUDES -I$withval/include"
-              LIBS="$LIBS -L$withval -lssl -lcrypto"
+              APR_ADDTO(INCLUDES, [-I$withval/include])
+              APR_ADDTO(LIBS, [-L$withval -lssl -lcrypto])
               ssl_lib="OpenSSL"
           else
               searchfile="$withval/openssl/ssl.h"
               if test -f $searchfile ; then
-                  INCLUDES="$INCLUDES -I$withval/openssl"
-                  LIBS="$LIBS -L$withval -lssl -lcrypto"
+                  APR_ADDTO(INCLUDES, [-I$withval/openssl])
+                  APR_ADDTO(LIBS, [-L$withval -lssl -lcrypto])
                   ssl_lib="OpenSSL"
               else
                   searchfile="$withval/include/openssl/ssl.h"
                   if test -f $searchfile ; then
-                      INCLUDES="$INCLUDES -I$withval/include"
-                      LIBS="$LIBS -L$withval/lib -lssl -lcrypto"
+                      APR_ADDTO(INCLUDES, [-I$withval/include])
+                      APR_ADDTO(LIBS, [-L$withval/lib -lssl -lcrypto])
                       ssl_lib="OpenSSL"
                   else
                       AC_MSG_ERROR(no - Unable to locate $withval/inc/ssl.h)
index 823ac063ab515c99a38c0d5d8bc22c3ec91d2b47..4fe95b750978caf60bc2a26b4ef2be6bbe1f3b74 100644 (file)
@@ -1,3 +1,3 @@
 if test "$OS" = "beos" ; then
-    CFLAGS="$CFLAGS -DBEOS"
+    APR_ADDTO(CFLAGS,-DBEOS)
 fi
index 81a6811a3ca66d9931c4c204b7a3a59bfc1cad11..b62d214e1d8917ec57daa408d0bea0417713e32e 100644 (file)
@@ -1,3 +1,3 @@
 if test "$OS" = "os2" ; then
-  CFLAGS="$CFLAGS -DOS2 -O2"
+  APR_ADDTO(CFLAGS, [-DOS2 -O2])
 fi
index 9e8242fd972eddccaf76ff789d67719768b7e8d5..24aef10277560b4e4fa7439e014e716c297c631b 100644 (file)
@@ -66,4 +66,4 @@ exports.lo: exports.c
 # Rule to make def file for OS/2 core dll
 ApacheCoreOS2.def: exports.c $(top_srcdir)/os/$(OS_DIR)/core_header.def
        cat $(top_srcdir)/os/$(OS_DIR)/core_header.def > $@
-       $(CPP) $< $(COMMON_FLAGS) | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/  "\1"/' >> $@
+       $(CPP) $< $(ALL_CPPFLAGS) $(ALL_INCLUDES) | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/  "\1"/' >> $@
index 66b6ee3b76df6155ad92131d4441c1077cdde55f..761be95a53527e52fac2f985b16cbc2b7c2c1432 100644 (file)
@@ -1,14 +1,8 @@
 dnl ## Check for libraries
 
-AC_CHECK_LIB(nsl, gethostname, [
- AC_ADD_LIBRARY(nsl) ], [])
-
-AC_CHECK_LIB(socket, socket, [
- AC_ADD_LIBRARY(socket) ], [])
-
-AC_CHECK_LIB(nsl, gethostbyaddr, [
- AC_ADD_LIBRARY(nsl) ], [])
-
+AC_CHECK_LIB(nsl, gethostname, APR_ADDTO(LIBS,-lnsl))
+AC_CHECK_LIB(socket, socket, APR_ADDTO(LIBS,-lsocket))
+AC_CHECK_LIB(nsl, gethostbyaddr, APR_ADDTO(LIBS,-lnsl))
 
 dnl ## Check for header files
 
index 89ba0c62adc79d6a5caa98400455f1740deedcb7..770b9d221242951d91598e136f0ac917aadac358 100644 (file)
@@ -1,6 +1,5 @@
 if test "$MPM_NAME" = "spmt_os2" ; then
     AC_CACHE_SAVE
     APACHE_FAST_OUTPUT(server/mpm/$MPM_NAME/Makefile)
-    CFLAGS="$CFLAGS -Zmt"
-    LDFLAGS="$LDFLAGS -Zmt"
+    APR_ADDTO(CFLAGS,-Zmt)
 fi