From f8b2c6740590140cf73a521fd9a307c11ffef2f6 Mon Sep 17 00:00:00 2001 From: Ryan Bloom Date: Tue, 21 Aug 2001 23:41:35 +0000 Subject: [PATCH] Allow Apache to use libtool 1.4. In order to do this, we check the libtool version of the machine, and we add the correct flags to the build. We also had to remove the --disable-shared in order to make this work correctly. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90479 13f79535-47bb-0310-9956-ffa450edef68 --- STATUS | 15 +-------------- build/rules.mk | 8 ++++---- configure.in | 24 ++++++++++++++++++++---- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/STATUS b/STATUS index 15ea5e083d..d55bffa812 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ APACHE 2.0 STATUS: -*-text-*- -Last modified at [$Date: 2001/08/17 00:29:08 $] +Last modified at [$Date: 2001/08/21 23:41:35 $] Release: @@ -45,19 +45,6 @@ RELEASE SHOWSTOPPERS: added to the filter chain after any filters specified in enclosing containers. - * remove the --disable-shared from the subdir config of APR(UTIL) - before the final release. (in fact, it might even be nice to - allow for Apache config/build against an already-installed - APR(UTIL)) - Note: we need to do a "make install" for APR(UTIL) so the shared - libraries can be installed properly. We could also use that - point to install include files (rather than have Apache - know everything that needs to be installed from the - sub-packages). The original impetus for doing the - disable-shared was because the shared lib wasn't getting - installed and a "make clean" in aprutil would make Apache - fail to load. - * mod_dir should normally redirect ALL directory requests which do not include a trailing slash on the URI. However, if a "notes" flag is set (say, via BrowserMatch), this behavior will be diff --git a/build/rules.mk b/build/rules.mk index 574c919f33..09cea4f6bb 100644 --- a/build/rules.mk +++ b/build/rules.mk @@ -73,11 +73,11 @@ ALL_INCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) COMPILE = $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(ALL_INCLUDES) CXX_COMPILE = $(CXX) $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(ALL_INCLUDES) -SH_COMPILE = $(SH_LIBTOOL) --mode=compile $(COMPILE) -c $< && touch $@ -SH_CXX_COMPILE = $(SH_LIBTOOL) --mode=compile $(CXX_COMPILE) -c $< && touch $@ +SH_COMPILE = $(LIBTOOL) --mode=compile $(COMPILE) -prefer-pic -c $< && touch $@ +SH_CXX_COMPILE = $(LIBTOOL) --mode=compile $(CXX_COMPILE) -prefer-pic-c $< && touch $@ -LT_COMPILE = $(LIBTOOL) --mode=compile $(COMPILE) -c $< && touch $@ -LT_CXX_COMPILE = $(LIBTOOL) --mode=compile $(CXX_COMPILE) -c $< && touch $@ +LT_COMPILE = $(LIBTOOL) --mode=compile $(COMPILE) -prefer-non-pic -static -c $< && touch $@ +LT_CXX_COMPILE = $(LIBTOOL) --mode=compile $(CXX_COMPILE) -prefer-non-pic -static -c $< && touch $@ # Link-related commands diff --git a/configure.in b/configure.in index c6ddf09197..77e71b6461 100644 --- a/configure.in +++ b/configure.in @@ -45,11 +45,11 @@ 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 --prefix=$prefix") +APR_SUBDIR_CONFIG(srclib/apr, "$apache_apr_flags --prefix=$prefix") echo $ac_n "${nl}Configuring Apache Portable Runtime Utility library...${nl}" -APR_SUBDIR_CONFIG(srclib/apr-util, "--with-apr=../apr --disable-shared --prefix=$prefix") +APR_SUBDIR_CONFIG(srclib/apr-util, "--with-apr=../apr --prefix=$prefix") echo $ac_n "${nl}Configuring PCRE regular expression library ...${nl}" @@ -103,15 +103,31 @@ case $host in MK_IMPLIB="emximp" other_targets="$other_targets os2core" INSTALL_PROG_FLAGS="-e .exe" + SHLTCFLAGS="" + LTCFLAGS="" ;; *) if test "x$LTFLAGS" = "x"; then LTFLAGS='--silent' fi LIBTOOL='$(SHELL) $(top_builddir)/srclib/apr/libtool $(LTFLAGS)' - SH_LIBTOOL='$(SHELL) $(top_builddir)/shlibtool $(LTFLAGS)' + libtoolversion=`$abs_builddir/srclib/apr/libtool --version` + case $libtoolversion in + *1.4*) + SH_LIBTOOL='$(LIBTOOL)' + SHLTCFLAGS="-prefer-pic" + LTCFLAGS="-prefer-non-pic -static" + ;; + *) + SH_LIBTOOL='$(SHELL) $(top_builddir)/shlibtool $(LTFLAGS)' + SHLTCFLAGS="" + LTCFLAGS="" + ;; + esac ;; esac +APACHE_SUBST(SHLTCFLAGS) +APACHE_SUBST(LTCFLAGS) case $host in *-apple-aux3*) @@ -385,7 +401,7 @@ case $host in ;; esac -AC_OUTPUT($APACHE_OUTPUT_FILES support/apxs support/apachectl support/dbmmanage support/log_server_status support/logresolve.pl support/phf_abuse_log.cgi support/split-logfile,,[ +AC_OUTPUT($APACHE_OUTPUT_FILES support/apxs support/apachectl support/dbmmanage support/log_server_status support/logresolve.pl support/phf_abuse_log.cgi support/split-logfile build/rules.mk,,[ APACHE_GEN_MAKEFILES ]) -- 2.50.1