summaryrefslogtreecommitdiff
path: root/build/apr_common.m4
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2003-03-07 12:12:40 +0000
committerJeff Trawick <trawick@apache.org>2003-03-07 12:12:40 +0000
commit14a491ff5b23d5dbaf4f1bc8f7c537eea6d39056 (patch)
tree66e852d23bee249b1efb7d472be26813c96db5e0 /build/apr_common.m4
parent867710fdb1689b88c3908ffceeeb068b1bf8400f (diff)
downloadapr-14a491ff5b23d5dbaf4f1bc8f7c537eea6d39056.tar.gz
change APR_CHECK_APR_DEFINE to find header files via
the INCLUDES setting rather than via a path passed in via the caller git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64405 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build/apr_common.m4')
-rw-r--r--build/apr_common.m415
1 files changed, 8 insertions, 7 deletions
diff --git a/build/apr_common.m4 b/build/apr_common.m4
index a3d90d63f..8cc16b37a 100644
--- a/build/apr_common.m4
+++ b/build/apr_common.m4
@@ -271,15 +271,16 @@ YES_IS_DEFINED
])
dnl
-dnl APR_CHECK_APR_DEFINE( symbol, path_to_apr )
+dnl APR_CHECK_APR_DEFINE( symbol )
dnl
AC_DEFUN(APR_CHECK_APR_DEFINE,[
- AC_EGREP_CPP(YES_IS_DEFINED, [
-#include "$2/include/apr.h"
-#if $1
-YES_IS_DEFINED
-#endif
- ], ac_cv_define_$1=yes, ac_cv_define_$1=no)
+apr_old_cppflags=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $INCLUDES"
+AC_TRY_COMPILE([#include <apr.h>], [
+#if !$1
+#error APR does not have $1
+#endif], ac_cv_define_$1=yes, ac_cv_define_$1=no)
+CPPFLAGS=$apr_old_cppflags
])
dnl APR_CHECK_FILE(filename); set ac_cv_file_filename to