perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Re: APR_FIND_APR
Date Sun, 15 Aug 2004 19:31:52 GMT
Geoffrey Young <geoff@modperlcookbook.org> writes:

> > At the moment one can build Perl APR only by building mod_perl, so I
> > suppose apxs is fine for now.
> 
> ok.  so it looks like the way to handle this is via the new APR_VERSION and
> APU_VERSION queries.  this is in apxs:
> 
>   my $apr_version = get_vars("APR_VERSION");
>   $apr_version =~ s/(\d+)\.(\d).(\d)/$1/;
>   my $apr_config="$apr_bindir/apr-$apr_version-config";
> 
> so, in our code we would query apxs a second time via `apxs -q APR_VERSION`
> and if it succeeds then we insert the major number into the
> apr-$major-config, otherwise we assume apr-config.

Thankfully it's a lot easier now with the latest httpd-2.0 cvs:

----------------------------
revision 1.62
date: 2004/08/13 09:38:11;  author: jorton;  state: Exp;  lines: +4 -11
* configure.in, acinclude.m4: Substitute AP[RU]_CONFIG with location
of installed ap[ru]-config scripts so third-party modules can use
`apxs -q APR_CONFIG`.

* support/apxs.in: Use new AP[RU]_CONFIG variables; use apr-config
--apr-libtool.
----------------------------

So you can just use something like

  $apr_config = `$apxs -q APR_CONFIG` || 
                `$apxs -q APR_BINDIR` . "/apr-config";

-- 
Joe Schaefer


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message