From 252e7ae86c42c531b7ad226fe8c6f7ce1aa9c37e Mon Sep 17 00:00:00 2001 From: Justin Erenkrantz Date: Mon, 2 Aug 2004 02:38:16 +0000 Subject: [PATCH] Teach apxs how to find ap{ru}-$AP{RU}_MAJOR_VERSION-config (httpd-2.1+ will be APR 1.0 or higher which uses this convention.) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104443 13f79535-47bb-0310-9956-ffa450edef68 --- acinclude.m4 | 2 ++ configure.in | 2 ++ support/apxs.in | 24 +++++++++++++++--------- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 75b40ed336..bf214addc3 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -90,8 +90,10 @@ AC_DEFUN(APACHE_GEN_CONFIG_VARS,[ APACHE_SUBST(DSO_MODULES) APACHE_SUBST(APR_BINDIR) APACHE_SUBST(APR_INCLUDEDIR) + APACHE_SUBST(APR_VERSION) APACHE_SUBST(APU_BINDIR) APACHE_SUBST(APU_INCLUDEDIR) + APACHE_SUBST(APU_VERSION) abs_srcdir="`(cd $srcdir && pwd)`" diff --git a/configure.in b/configure.in index 0922b924c9..944159c7a7 100644 --- a/configure.in +++ b/configure.in @@ -85,6 +85,7 @@ APR_ADDTO(INCLUDES, `$apr_config --includes`) SHLIBPATH_VAR=`$apr_config --shlib-path-var` APR_BINDIR=`$apr_config --bindir` APR_INCLUDEDIR=`$apr_config --includedir` +APR_VERSION=`$apr_config --version` echo $ac_n "${nl}Configuring Apache Portable Runtime Utility library...${nl}" @@ -107,6 +108,7 @@ APR_ADDTO(LDFLAGS, `$apu_config --ldflags`) APR_ADDTO(INCLUDES, `$apu_config --includes`) APU_BINDIR=`$apu_config --bindir` APU_INCLUDEDIR=`$apu_config --includedir` +APU_VERSION=`$apu_config --version` dnl In case we picked up CC and CPP from APR, get that info into the dnl config cache so that PCRE uses it. Otherwise, CC and CPP used for diff --git a/support/apxs.in b/support/apxs.in index 7581c2c2dd..8ad0799224 100644 --- a/support/apxs.in +++ b/support/apxs.in @@ -324,26 +324,32 @@ if ($opt_q) { } my $apr_bindir = get_vars("APR_BINDIR"); +my $apr_version = get_vars("APR_VERSION"); +$apr_version =~ s/(\d+)\.(\d).(\d)/$1/; +my $apr_config="$apr_bindir/apr-$apr_version-config"; -if (! -x "$apr_bindir/apr-config") { +if (! -x "$apr_config") { error("$apr_bindir/apr-config not found!"); exit(1); } my $apu_bindir = get_vars("APU_BINDIR"); +my $apu_version = get_vars("APU_VERSION"); +$apu_version =~ s/(\d+)\.(\d).(\d)/$1/; +my $apu_config="$apu_bindir/apu-$apu_version-config"; -if (! -x "$apu_bindir/apu-config") { - error("$apu_bindir/apu-config not found!"); +if (! -x "$apu_config") { + error("$apu_config not found!"); exit(1); } -my $libtool = `$apr_bindir/apr-config --installbuilddir`; +my $libtool = `$apr_config --installbuilddir`; chomp($libtool); $libtool = "$libtool/libtool"; -my $apr_includedir = `$apr_bindir/apr-config --includes`; +my $apr_includedir = `$apr_config --includes`; chomp($apr_includedir); -my $apu_includedir = `$apu_bindir/apu-config --includes`; +my $apu_includedir = `$apu_config --includes`; chomp($apu_includedir); if ($opt_c) { @@ -435,15 +441,15 @@ if ($opt_c) { if ($opt_p == 1) { - my $apr_libs=`$apr_bindir/apr-config --cflags --ldflags --link-libtool --libs`; + my $apr_libs=`$apr_config --cflags --ldflags --link-libtool --libs`; chomp($apr_libs); - my $apu_libs=`$apu_bindir/apu-config --ldflags --link-libtool --libs`; + my $apu_libs=`$apu_config --ldflags --link-libtool --libs`; chomp($apu_libs); $opt .= " ".$apu_libs." ".$apr_libs; } else { - my $apr_ldflags=`$apr_bindir/apr-config --ldflags`; + my $apr_ldflags=`$apr_config --ldflags`; chomp($apr_ldflags); $opt .= " -rpath $CFG_LIBEXECDIR -module -avoid-version $apr_ldflags"; } -- 2.50.1