]> granicus.if.org Git - apache/commitdiff
apxs: Include any special APR ld flags when linking the DSO.
authorJeff Trawick <trawick@apache.org>
Thu, 23 Jan 2003 11:54:44 +0000 (11:54 +0000)
committerJeff Trawick <trawick@apache.org>
Thu, 23 Jan 2003 11:54:44 +0000 (11:54 +0000)
This resolves problems on AIX when building a DSO with apxs+gcc.

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

CHANGES
support/apxs.in

diff --git a/CHANGES b/CHANGES
index 11e6e6e0ca7adb22e40766db0e8b535d2e86a90c..341e5b4fb6597eacb8b995bcc970bed4c143ca8e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@ Changes with Apache 2.1.0-dev
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) apxs: Include any special APR ld flags when linking the DSO.
+     This resolves problems on AIX when building a DSO with apxs+gcc.
+     [Jeff Trawick]
+
   *) mod_file_cache: fixed a segfault when multiple MMapFile directives
      were used.  PR 16313.  [Cliff Woolley]
 
index 4879de7ac3c375d3684d40d732844c449b3d6618..0fc14e456b5e41762705e5490515af393a3aa31e 100644 (file)
@@ -449,14 +449,16 @@ if ($opt_c) {
         $opt .= " -l$opt_l";
     }
 
+    my $apr_bindir = get_vars("APR_BINDIR");
+
+    if (! -x "$apr_bindir/apr-config") {
+        error("$apr_bindir/apr-config not found!");
+        exit(1);
+    }
+
     if ($opt_p == 1) {
-        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);
@@ -470,7 +472,9 @@ if ($opt_c) {
         $opt .= " ".$apu_libs." ".$apr_libs;
     }
     else {
-        $opt .= " -rpath $CFG_LIBEXECDIR -module -avoid-version";
+        my $apr_ldflags=`$apr_bindir/apr-config --ldflags`;
+        chomp($apr_ldflags);
+        $opt .= " -rpath $CFG_LIBEXECDIR -module -avoid-version $apr_ldflags";
     }
 
     push(@cmds, "$installbuilddir/libtool $ltflags --mode=link $CFG_CC -o $dso_file $opt $lo");