kfogel 01/02/27 12:48:21
Modified: build apr_common.m4
Log:
Use an inline shell loop to do "_" and "." translation with sed,
instead of an APR_FOREACH loop with translit().
Fix from Jim Jagielski <[EMAIL PROTECTED]>.
Note that there is still discussion of this problem on the list; see
the two threads
"tested :) work around for m4 weirdness"
and
"FreeBSD and gnu m4"
However, since the build was broken on at least BSD and Linux, and
Jim's patch makes things work again, it seemed better to apply it and
*then* figure out if it's the Right Thing. :-)
Revision Changes Path
1.10 +10 -9 apr/build/apr_common.m4
Index: apr_common.m4
===================================================================
RCS file: /home/cvs/apr/build/apr_common.m4,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- apr_common.m4 2001/02/27 11:34:49 1.9
+++ apr_common.m4 2001/02/27 20:48:21 1.10
@@ -368,15 +368,16 @@
dnl
AC_DEFUN(APR_FLAG_HEADERS,[
AC_CHECK_HEADERS($1)
-APR_FOREACH([
-[if test "$ac_cv_header_]translit(eachval,[./+-],[__p_])" = "yes"; then
-dnl note: this translit() maps "/" to "_" and omits ".". the third arg
-dnl really *is* intended to be one shorter than the second arg.
- ifelse($2,,translit(eachval,[/.],[_]),$2)=ifelse($3,yes,yes,1)
-else
- ifelse($2,,translit(eachval,[/.],[_]),$2)=ifelse($3,yes,no,0)
-fi
-], APR_COMMA_ARGS($1))
+for aprt_i in $1
+do
+ ac_safe=`echo "$aprt_i" | sed 'y%./+-%__p_%'`
+ aprt_2=`echo "$aprt_i" | sed -e 's%/%_%g' -e 's/\.//g'`
+ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ eval "ifelse($2,,$aprt_2,$2)=ifelse($3,yes,yes,1)"
+ else
+ eval "ifelse($2,,$aprt_2,$2)=ifelse($3,yes,no,0)"
+ fi
+done
])
dnl APR_FLAG_FUNCS(FUNC ... [, FLAG-TO-SET] [, "yes" ])