]> granicus.if.org Git - apache/commitdiff
Rework the apxs -cp command to work when the source dir isn't available by
authorJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 19 Sep 2002 05:43:16 +0000 (05:43 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 19 Sep 2002 05:43:16 +0000 (05:43 +0000)
querying apr-config and apu-config at link-time instead.

(Note that the $apr_config value in configure.in isn't sufficient as we
need to know where apr-config will be when we execute apxs later on -
hence the --bindir option to apr-config and apu-config.)

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

acinclude.m4
configure.in
support/apxs.in

index ed3964886fc2959f50a950c93b39644f464c0c7e..2342fabff1e4eb9eab042a18b1ac68ea87788b8b 100644 (file)
@@ -85,6 +85,8 @@ AC_DEFUN(APACHE_GEN_CONFIG_VARS,[
   APACHE_SUBST(MK_IMPLIB)
   APACHE_SUBST(INSTALL_PROG_FLAGS)
   APACHE_SUBST(DSO_MODULES)
+  APACHE_SUBST(APR_BINDIR)
+  APACHE_SUBST(APU_BINDIR)
 
   abs_srcdir="`(cd $srcdir && pwd)`"
 
index 68e7485712eb44bce6c9d87d2bb0a8ef7805213b..9a40f9d49fa713a8f57dfeb3a5dede4ae5a1f669 100644 (file)
@@ -81,6 +81,7 @@ APR_ADDTO(CPPFLAGS, `$apr_config --cppflags`)
 APR_ADDTO(LDFLAGS, `$apr_config --ldflags`)
 APR_ADDTO(INCLUDES, `$apr_config --includes`)
 SHLIBPATH_VAR=`$apr_config --shlib-path-var`
+APR_BINDIR=`$apr_config --bindir`
 
 echo $ac_n "${nl}Configuring Apache Portable Runtime Utility library...${nl}"
 
@@ -99,6 +100,7 @@ fi
 
 APR_ADDTO(LDFLAGS, `$apu_config --ldflags`)
 APR_ADDTO(INCLUDES, `$apu_config --includes`)
+APU_BINDIR=`$apu_config --bindir`
 
 echo $ac_n "${nl}Configuring PCRE regular expression library ...${nl}"
 
index 9782c89f4508aeeac4f9bc34f8ace5e8fc3455af..ed3de518ce4984f324f503e3905841bc57773543 100644 (file)
@@ -450,10 +450,27 @@ if ($opt_c) {
     }
 
     if ($opt_p == 1) {
-      $opt .= " ".get_vars("EXTRA_LDFLAGS")." ".get_vars("AP_LIBS");
+        my $apr_bindir = get_vars("APR_BINDIR");
+        my $apu_bindir = get_vars("APU_BINDIR");
+
+        if (! -x "$apr_bindir/apr-config") {
+            error("$apr_bindir/apr-config not found!");
+            exit(1);
+        }
+        if (! -x "$apu_bindir/apu-config") {
+            error("$apu_bindir/apu-config not found!");
+            exit(1);
+        }
+        
+        my $apr_libs=`$apr_bindir/apr-config --ldflags --link-libtool --libs`;
+        chomp($apr_libs);
+        my $apu_libs=`$apu_bindir/apu-config --ldflags --link-libtool --libs`;
+        chomp($apu_libs);
+        
+        $opt .= " ".$apu_libs." ".$apr_libs;
     }
     else {
-      $opt .= " -rpath $CFG_LIBEXECDIR -module -avoid-version";
+        $opt .= " -rpath $CFG_LIBEXECDIR -module -avoid-version";
     }
 
     push(@cmds, "$installbuilddir/libtool $ltflags --mode=link $CFG_CC -o $dso_file $opt $lo");