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");