summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2000-09-29 19:32:20 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2000-09-29 19:32:20 +0000
commit60c0135d14bce5501b9bac7bb3a04ee42fe49e38 (patch)
tree72045161f2365b7c26745f92695d3c27e3adbf0c
parent254e9c495ff607c6ad4da4ac63733af2ae112f46 (diff)
downloadlibapr-60c0135d14bce5501b9bac7bb3a04ee42fe49e38.tar.gz
Avoid a bad shell command in the expansion of AC_CHECK_DEFINE_FILES.
This change to AC_CHECK_DEFINE_FILES allows lib/apr/configure to work at all on FreeBSD 3.4 and stops creating silly files AC_FD_MSG and AC_FD_CC when /bin/sh is bash 1.14 on Linux. (Certainly other systems and/or other versions of bash are expected to have one of the bad symptoms.) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60542 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--aclocal.m416
-rw-r--r--configure.in4
2 files changed, 11 insertions, 9 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 906218447..104638d83 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -12,12 +12,16 @@ dnl ##
dnl ##
AC_DEFUN(AC_CHECK_DEFINE_FILES,[
AC_CACHE_CHECK([for $1 in $2],ac_cv_define_$1,[
- AC_EGREP_CPP(YES_IS_DEFINED, [
- $2
- #ifdef $1
- YES_IS_DEFINED
- #endif
- ], ac_cv_define_$1=yes, ac_cv_define_$1=no)
+ ac_cv_define_$1=no
+ for curhdr in $2
+ do
+ AC_EGREP_CPP(YES_IS_DEFINED, [
+ #include <$curhdr>
+ #ifdef $1
+ YES_IS_DEFINED
+ #endif
+ ], ac_cv_define_$1=yes)
+ done
])
if test "$ac_cv_define_$1" = "yes"; then
AC_DEFINE(HAVE_$1)
diff --git a/configure.in b/configure.in
index b5f3633d1..7afd17b88 100644
--- a/configure.in
+++ b/configure.in
@@ -598,9 +598,7 @@ AC_CHECK_DEFINE(CODESET, langinfo.h)
AC_CHECK_DEFINE(isascii, ctype.h)
# We are assuming that if the platform doesn't have POLLIN, it doesn't have
# any POLL definitions.
-AC_CHECK_DEFINE_FILES(POLLIN, [
-#include <poll.h>
-#include <sys/poll.h> ] )
+AC_CHECK_DEFINE_FILES(POLLIN, poll.h sys/poll.h)
pthreadser="0"
if test "$threads" = "1"; then