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