diff options
author | Justin Erenkrantz <jerenkrantz@apache.org> | 2001-12-11 09:19:41 +0000 |
---|---|---|
committer | Justin Erenkrantz <jerenkrantz@apache.org> | 2001-12-11 09:19:41 +0000 |
commit | 80e1a33b0ab36aa0a06f61ea8382c67ddfc8bbfe (patch) | |
tree | 16c708d5c7aee179b5c73281eb879df9572e8717 /build/find_apr.m4 | |
parent | 105e3dc5c16483c881a327b470a821ab00b6e7f8 (diff) | |
download | apr-80e1a33b0ab36aa0a06f61ea8382c67ddfc8bbfe.tar.gz |
Okay, I've got flood building with this snippet and the about-to-be-posted
apr-config patch. Since not all installations may have it, apr-config
will be optional (for now).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62620 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build/find_apr.m4')
-rw-r--r-- | build/find_apr.m4 | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/build/find_apr.m4 b/build/find_apr.m4 index f19b38d4f..cab64635f 100644 --- a/build/find_apr.m4 +++ b/build/find_apr.m4 @@ -55,6 +55,7 @@ AC_DEFUN(APR_FIND_APR, [ preserve_LIBS="$LIBS" preserve_LDFLAGS="$LDFLAGS" + preserve_CFLAGS="$CFLAGS" AC_MSG_CHECKING(for APR) AC_ARG_WITH(apr, @@ -64,6 +65,11 @@ AC_DEFUN(APR_FIND_APR, [ AC_MSG_ERROR([--with-apr requires a directory to be provided]) fi + if test -x $withval/bin/apr-config; then + CFLAGS="$CFLAGS `$withval/bin/apr-config --cflags`" + LIBS="$LIBS `$withval/bin/apr-config --libs`" + LDFLAGS="$LDFLAGS `$withval/bin/apr-config --ldflags`" + fi LIBS="$LIBS -lapr" LDFLAGS="$preserve_LDFLAGS -L$withval/lib" AC_TRY_LINK_FUNC(apr_initialize, [ @@ -119,6 +125,8 @@ APR, nor an APR build directory.]) fi fi + AC_MSG_RESULT($apr_found) + CFLAGS="$preserve_CFLAGS" LIBS="$preserve_LIBS" LDFLAGS="$preserve_LDFLAGS" ]) |