apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject tested :) work around for m4 weirdness
Date Tue, 27 Feb 2001 17:32:44 GMT
Here's a diff which works around the m4 weirdness. It also avoids
the problem which causes that nasty dropping 'h' buglet which
would cause incorrect entries in apr.h. As you can see, I move
some stuff back into shell land, rather than m4 land.

It also results in a slightly smaller configure:

   -rwxr-xr-x   1 jim      bin        262405 Feb 27 12:16 GREGconfigure*
   -rwxr-xr-x   1 jim      bin        260098 Feb 27 12:13 MYconfigure*

For consideration :)


--- build/apr_common.m4	Tue Feb 27 12:16:02 2001
+++ build/Napr_common.m4	Tue Feb 27 12:05:49 2001
@@ -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" ])
-- 
===========================================================================
   Jim Jagielski   [|]   jim@jaguNET.com   [|]   http://www.jaguNET.com/
          "Hell is hot, that's never been disputed by anybody."

Mime
View raw message