From: Jeff Trawick Date: Thu, 23 Jan 2003 11:54:44 +0000 (+0000) Subject: apxs: Include any special APR ld flags when linking the DSO. X-Git-Tag: pre_ajp_proxy~2219 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=78432421817c72e451c5d750be0df27c975b98b8;p=apache apxs: Include any special APR ld flags when linking the DSO. 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 --- diff --git a/CHANGES b/CHANGES index 11e6e6e0ca..341e5b4fb6 100644 --- 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] diff --git a/support/apxs.in b/support/apxs.in index 4879de7ac3..0fc14e456b 100644 --- a/support/apxs.in +++ b/support/apxs.in @@ -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");