diff options
-rw-r--r-- | CHANGES | 9 | ||||
-rw-r--r-- | INSTALL | 36 | ||||
-rw-r--r-- | acinclude.m4 | 30 | ||||
-rw-r--r-- | build/rules.mk | 29 | ||||
-rw-r--r-- | configure.in | 100 | ||||
-rw-r--r-- | hints.m4 | 2 | ||||
-rw-r--r-- | modules/aaa/config.m4 | 2 | ||||
-rw-r--r-- | modules/cache/config.m4 | 2 | ||||
-rw-r--r-- | modules/dav/main/config5.m4 | 2 | ||||
-rw-r--r-- | modules/echo/config.m4 | 2 | ||||
-rw-r--r-- | modules/filters/config.m4 | 2 | ||||
-rw-r--r-- | modules/generators/config5.m4 | 2 | ||||
-rw-r--r-- | modules/mappers/config9.m4 | 2 | ||||
-rw-r--r-- | modules/metadata/config.m4 | 2 | ||||
-rw-r--r-- | modules/tls/config.m4 | 16 | ||||
-rw-r--r-- | os/beos/config.m4 | 2 | ||||
-rw-r--r-- | os/os2/config.m4 | 2 | ||||
-rw-r--r-- | server/Makefile.in | 2 | ||||
-rw-r--r-- | server/config.m4 | 12 | ||||
-rw-r--r-- | server/mpm/spmt_os2/config5.m4 | 3 |
20 files changed, 154 insertions, 105 deletions
@@ -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>] @@ -144,7 +144,7 @@ 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 @@ -155,14 +155,14 @@ 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] @@ -183,14 +183,18 @@ [--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 @@ -458,7 +462,7 @@ 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/ diff --git a/acinclude.m4 b/acinclude.m4 index 8832270546..b63ca248de 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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) @@ -103,17 +114,6 @@ AC_DEFUN(APACHE_OUTPUT, [ ]) 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 dnl checks for the macro in the header file diff --git a/build/rules.mk b/build/rules.mk index 4c6df265ce..b8a1165d9b 100644 --- a/build/rules.mk +++ b/build/rules.mk @@ -56,11 +56,22 @@ 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 diff --git a/configure.in b/configure.in index 4b2a0e91d7..ca39b87768 100644 --- a/configure.in +++ b/configure.in @@ -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 @@ -58,6 +58,6 @@ dnl ;; APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1]) ;; esac - APR_DOEXTRA + fi ]) diff --git a/modules/aaa/config.m4 b/modules/aaa/config.m4 index df1f11db72..b8b359f9b1 100644 --- a/modules/aaa/config.m4 +++ b/modules/aaa/config.m4 @@ -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 diff --git a/modules/cache/config.m4 b/modules/cache/config.m4 index 6cdcc9b80b..c4ad083075 100644 --- a/modules/cache/config.m4 +++ b/modules/cache/config.m4 @@ -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 diff --git a/modules/dav/main/config5.m4 b/modules/dav/main/config5.m4 index bf435023ff..f576f5f579 100644 --- a/modules/dav/main/config5.m4 +++ b/modules/dav/main/config5.m4 @@ -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 diff --git a/modules/echo/config.m4 b/modules/echo/config.m4 index 821b0939fb..504a89c44a 100644 --- a/modules/echo/config.m4 +++ b/modules/echo/config.m4 @@ -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 diff --git a/modules/filters/config.m4 b/modules/filters/config.m4 index d9c8ad2ec8..10fc0231ef 100644 --- a/modules/filters/config.m4 +++ b/modules/filters/config.m4 @@ -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 diff --git a/modules/generators/config5.m4 b/modules/generators/config5.m4 index 6223222f19..4e4379a681 100644 --- a/modules/generators/config5.m4 +++ b/modules/generators/config5.m4 @@ -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 diff --git a/modules/mappers/config9.m4 b/modules/mappers/config9.m4 index 2c6c08d452..170a2944db 100644 --- a/modules/mappers/config9.m4 +++ b/modules/mappers/config9.m4 @@ -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 diff --git a/modules/metadata/config.m4 b/modules/metadata/config.m4 index a694bfeaa0..d1bfb56d5b 100644 --- a/modules/metadata/config.m4 +++ b/modules/metadata/config.m4 @@ -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 diff --git a/modules/tls/config.m4 b/modules/tls/config.m4 index b80fe7271b..2ecee966e0 100644 --- a/modules/tls/config.m4 +++ b/modules/tls/config.m4 @@ -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) diff --git a/os/beos/config.m4 b/os/beos/config.m4 index 823ac063ab..4fe95b7509 100644 --- a/os/beos/config.m4 +++ b/os/beos/config.m4 @@ -1,3 +1,3 @@ if test "$OS" = "beos" ; then - CFLAGS="$CFLAGS -DBEOS" + APR_ADDTO(CFLAGS,-DBEOS) fi diff --git a/os/os2/config.m4 b/os/os2/config.m4 index 81a6811a3c..b62d214e1d 100644 --- a/os/os2/config.m4 +++ b/os/os2/config.m4 @@ -1,3 +1,3 @@ if test "$OS" = "os2" ; then - CFLAGS="$CFLAGS -DOS2 -O2" + APR_ADDTO(CFLAGS, [-DOS2 -O2]) fi diff --git a/server/Makefile.in b/server/Makefile.in index 9e8242fd97..24aef10277 100644 --- a/server/Makefile.in +++ b/server/Makefile.in @@ -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"/' >> $@ diff --git a/server/config.m4 b/server/config.m4 index 66b6ee3b76..761be95a53 100644 --- a/server/config.m4 +++ b/server/config.m4 @@ -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 diff --git a/server/mpm/spmt_os2/config5.m4 b/server/mpm/spmt_os2/config5.m4 index 89ba0c62ad..770b9d2212 100644 --- a/server/mpm/spmt_os2/config5.m4 +++ b/server/mpm/spmt_os2/config5.m4 @@ -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 |