gstein 01/02/26 19:51:03
Modified: build apr_common.m4
Log:
AC_CHECK_HEADERS() must be used with M4 arguments, not shell arguments. Pass
$1 (an M4 arg containing the names of the headers) to AC_CHECK_HEADERS. Then
check the resulting cache variables to set the APR test result variables.
Revision Changes Path
1.7 +6 -6 apr/build/apr_common.m4
Index: apr_common.m4
===================================================================
RCS file: /home/cvs/apr/build/apr_common.m4,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -u -r1.6 -r1.7
--- apr_common.m4 2001/02/26 23:31:11 1.6
+++ apr_common.m4 2001/02/27 03:51:02 1.7
@@ -340,6 +340,7 @@
dnl setting to 1 or 0, we set FLAG-TO-SET to yes or no.
dnl
AC_DEFUN(APR_FLAG_HEADERS,[
+AC_CHECK_HEADERS($1)
for aprt_i in $1
do
if test "x$2" = "x"; then
@@ -347,14 +348,13 @@
else
aprt_fts="$2"
fi
- if test "x$3" = "xyes"; then
- s1="$aprt_fts=\"yes\""
- s0="$aprt_fts=\"no\""
+ safe_name=`echo "$aprt_i" | sed 'y%./+-%__p_%'`
+ eval "cache_value=\$ac_cv_header_$safe_name"
+ if test "$cache_value" = "yes"; then
+ eval $aprt_fts=ifelse($3,yes,yes,1)
else
- s1="$aprt_fts=\"1\""
- s0="$aprt_fts=\"0\""
+ eval $aprt_fts=ifelse($3,yes,no,0)
fi
- AC_CHECK_HEADERS($aprt_i, eval $s1, eval $s0)
done
])