jerenkrantz 01/12/11 02:05:19
Modified: build find_apr.m4
Log:
Since apr-config is probably going to be added, let's rename the
current apr_config variable to apr_vars (which is APRVARS) and
add apr_config as the path to the apr-config bin. This eliminates any
confusion.
Revision Changes Path
1.3 +16 -5 apr/build/find_apr.m4
Index: find_apr.m4
===================================================================
RCS file: /home/cvs/apr/build/find_apr.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- find_apr.m4 2001/12/11 09:19:41 1.2
+++ find_apr.m4 2001/12/11 10:05:19 1.3
@@ -28,8 +28,10 @@
dnl apr_srcdir : If an APR source tree is available and needs to be
dnl (re)configured, this refers to it.
dnl
-dnl apr_config : If the APR config file (APRVARS) exists, this refers to
it.
+dnl apr_config : If the apr-config tool exists, this refers to it.
dnl
+dnl apr_vars : If the APR config file (APRVARS) exists, this refers to it.
+dnl
dnl apr_found : "yes", "no", "reconfig"
dnl
dnl Note: At this time, we cannot find *both* a source dir and a build dir.
@@ -66,10 +68,14 @@
fi
if test -x $withval/bin/apr-config; then
+ apr_config="$withval/bin/apr-config"
CFLAGS="$CFLAGS `$withval/bin/apr-config --cflags`"
LIBS="$LIBS `$withval/bin/apr-config --libs`"
LDFLAGS="$LDFLAGS `$withval/bin/apr-config --ldflags`"
+ else
+ apr_config=""
fi
+
LIBS="$LIBS -lapr"
LDFLAGS="$preserve_LDFLAGS -L$withval/lib"
AC_TRY_LINK_FUNC(apr_initialize, [
@@ -85,12 +91,17 @@
apr_found="yes"
apr_libdir=""
apr_la_file="$withval/libapr.la"
- apr_config="$withval/APRVARS"
+ apr_vars="$withval/APRVARS"
+ if test -x $withval/apr-config; then
+ apr_config="$withval/apr-config"
+ else
+ apr_config=""
+ fi
apr_includes="-I$withval/include"
if test ! -f "$withval/APRVARS.in"; then
dnl extract the APR source directory without polluting our
dnl shell variable space
- apr_srcdir="`sed -n '/APR_SOURCE_DIR/s/.*"\(.*\)"/\1/p'
$apr_config`"
+ apr_srcdir="`sed -n '/APR_SOURCE_DIR/s/.*"\(.*\)"/\1/p' $apr_vars`"
apr_includes="$apr_includes -I$apr_srcdir/include"
fi
fi
@@ -117,8 +128,8 @@
])
if test "$apr_found" != "no" && test "$apr_libdir" != ""; then
- if test "$apr_config" = "" && test -f "$apr_libdir/APRVARS"; then
- apr_config="$apr_libdir/APRVARS"
+ if test "$apr_vars" = "" && test -f "$apr_libdir/APRVARS"; then
+ apr_vars="$apr_libdir/APRVARS"
fi
if test "$apr_la_file" = "" && test -f "$apr_libdir/libapr.la"; then
apr_la_file="$apr_libdir/libapr.la"