From: Ruediger Pluem Date: Wed, 25 Mar 2009 07:31:56 +0000 (+0000) Subject: * Teach apxs to work with APR 2.x where there is no separate APR-UTIL X-Git-Tag: 2.3.3~830 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e427a7cb63d864171adba66438e853f6248bee28;p=apache * Teach apxs to work with APR 2.x where there is no separate APR-UTIL any longer. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758167 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/apxs.in b/support/apxs.in index 08638c0163..87a9a7d43d 100644 --- a/support/apxs.in +++ b/support/apxs.in @@ -342,11 +342,16 @@ if (! -x "$apr_config") { exit(1); } -my $apu_config = get_vars("APU_CONFIG"); +my $apr_major_version = (split /\./, `$apr_config --version`)[0]; -if (! -x "$apu_config") { - error("$apu_config not found!"); - exit(1); +my $apu_config = ""; +if ($apr_major_version < 2) { + $apu_config = get_vars("APU_CONFIG"); + + if (! -x "$apu_config") { + error("$apu_config not found!"); + exit(1); + } } my $libtool = `$apr_config --apr-libtool`; @@ -354,8 +359,11 @@ chomp($libtool); my $apr_includedir = `$apr_config --includes`; chomp($apr_includedir); -my $apu_includedir = `$apu_config --includes`; -chomp($apu_includedir); +my $apu_includedir = ""; +if ($apr_major_version < 2) { + $apu_includedir = `$apu_config --includes`; + chomp($apu_includedir); +} if ($opt_c) { ## @@ -446,8 +454,11 @@ if ($opt_c) { my $apr_libs=`$apr_config --cflags --ldflags --link-libtool --libs`; chomp($apr_libs); - my $apu_libs=`$apu_config --ldflags --link-libtool --libs`; - chomp($apu_libs); + my $apu_libs=""; + if ($apr_major_version < 2) { + $apu_libs=`$apu_config --ldflags --link-libtool --libs`; + chomp($apu_libs); + } $opt .= " ".$apu_libs." ".$apr_libs; }