]> granicus.if.org Git - apache/commitdiff
Detect libraries based on which platform configure is being run on.
authorRyan Bloom <rbb@apache.org>
Tue, 27 Jun 2000 20:06:21 +0000 (20:06 +0000)
committerRyan Bloom <rbb@apache.org>
Tue, 27 Jun 2000 20:06:21 +0000 (20:06 +0000)
Basically, Apache now runs APR's configure script first.  APR's configure
script has been setup to create a new file, APRVARS.  APRVARS is basically
all of the environment variables that APR wants to export to the program
that is using it.  This allows the calling program to "source" APRVARS
and get those environment variables.

Removed hack to make platforms use -ldl.

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

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

diff --git a/STATUS b/STATUS
index f16aea52c10609e18ae941fcea2e599d86837751..12ac0568c510c262f4d092e773f27442bde7a51f 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 Apache 2.0 STATUS:
-Last modified at [$Date: 2000/06/26 13:13:05 $]
+Last modified at [$Date: 2000/06/27 20:06:14 $]
 
 Release:
 
@@ -24,11 +24,6 @@ RELEASE SHOWSTOPPERS:
             module.  This should be override-able of course.
         Status: Jim Jagielski is looking into this.
 
-      - Fix up ./configure to properly detect the various dynamic load
-          libraries/flags on the different platforms (current, we default
-          to -ldl which is wrong).
-        Status:
-
     * suEXEC doesn't work
         Status: Manoj has posted an patch to fix this.
         <19991103003605.A20612@samosa.mindspring.com>
index 439f9f892e41587addf7e763f37e78a68cbe55f1..ce4300eccd14e57e1ad4964e65f99dea10f19131 100644 (file)
@@ -407,3 +407,34 @@ AC_ARG_ENABLE(modules,
   done
 ])
 ])dnl
+
+AC_DEFUN(APACHE_RUN_SUBDIR_CONFIG_NOW, [
+  echo "configuring package in $1 now"
+  ac_popdir=`pwd`
+  ac_abs_srcdir=`(cd $srcdir/$1 && pwd)`
+  cd $1
+
+changequote(, )dnl
+      # A "../" for each directory in /$config_subdirs.
+      ac_dots=`echo $config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
+changequote([, ])dnl
+
+  # Make the cache file name correct relative to the subdirectory.
+  case "$cache_file" in
+  /*) ac_sub_cache_file=$cache_file ;;
+  *) # Relative path.
+    ac_sub_cache_file="$ac_dots$cache_file" ;;
+  esac
+
+  # The eval makes quoting arguments work.
+
+  if eval $ac_abs_srcdir/configure --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir
+  then :
+    echo "$1 configured properly"
+  else
+    echo "configure failed for $1"
+  fi
+
+  cd $ac_popdir
+])
+
index 96287af49bb2c2dddcadc1bf3c97fd34130f0098..778fa0662d2cd6267893bd884b778984f16555e5 100644 (file)
@@ -30,7 +30,9 @@ if test "$abs_builddir" != "$abs_srcdir"; then
 fi
 
 dnl ## Run configure for packages Apache uses
-AC_CONFIG_SUBDIRS(lib/apr)
+APACHE_RUN_SUBDIR_CONFIG_NOW(lib/apr)
+source lib/apr/APRVARS
+
 
 dnl
 dnl ## Preload our OS configuration
index aa3fcdc861508047143dfbd56703c81017e4c121..afec8e32ff1dc025841eadabdd53d7600ddb428c 100644 (file)
@@ -56,22 +56,6 @@ APACHE_CHECK_STANDARD_MODULE(echo, ECHO server, , yes)
 
 LTFLAGS="$LTFLAGS -export-dynamic"
 
-PLAT=`$ac_config_guess`
-PLAT=`$ac_config_sub $PLAT`
-case "$PLAT" in
-    *-ibm-os390)
-        ;;
-    *-freebsd*)
-        ;;
-    *-os2_emx)
-        ;;
-    *-beos*)
-        ;;
-    *)
-        LIBS="$LIBS -ldl"
-        ;;
-esac
-
 if test "$sharedobjs" = "yes"; then
     APACHE_CHECK_STANDARD_MODULE(so, DSO capability, , yes)
 else