summaryrefslogtreecommitdiff
path: root/build/apr_common.m4
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2002-10-17 15:04:00 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2002-10-17 15:04:00 +0000
commit0a3692ffc2b6d4a6a88984704842320a94313e79 (patch)
treed74ac8ddb8c1db7a2a1a512f12c342678858a693 /build/apr_common.m4
parent1268a92b21079ca0e42637bcc466d1aad76e32fc (diff)
downloadlibapr-0a3692ffc2b6d4a6a88984704842320a94313e79.tar.gz
This patch:
* simplifies APR_CHECK_FILE to use an m4 translit() to avoid the evals * uses AC_DEFUN to define macros in autoconf, not define() * drops support for the second and third arguments to the macro, since these aren't used anywhere. (checked apr-util, httpd-2.0, SVN) Submitted by: Joe Orton <joe@manyfish.co.uk> Reviewed by: Jeff Trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63940 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build/apr_common.m4')
-rw-r--r--build/apr_common.m428
1 files changed, 11 insertions, 17 deletions
diff --git a/build/apr_common.m4 b/build/apr_common.m4
index 61b6b830a..4e48ecb93 100644
--- a/build/apr_common.m4
+++ b/build/apr_common.m4
@@ -277,23 +277,17 @@ YES_IS_DEFINED
], ac_cv_define_$1=yes, ac_cv_define_$1=no)
])
-define(APR_CHECK_FILE,[
-ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(ac_cv_file_$ac_safe, [
- if test -r $1; then
- eval "ac_cv_file_$ac_safe=yes"
- else
- eval "ac_cv_file_$ac_safe=no"
- fi
-])dnl
-if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
-else
- AC_MSG_RESULT(no)
-ifelse([$3], , , [$3])
-fi
+dnl APR_CHECK_FILE(filename); set ac_cv_file_filename to
+dnl "yes" if 'filename' is readable, else "no".
+AC_DEFUN([APR_CHECK_FILE], [
+dnl Pick a safe variable name
+define([apr_cvname], ac_cv_file_[]translit([$1], [./+-], [__p_]))
+AC_CACHE_CHECK([for $1], [apr_cvname],
+[if test -r $1; then
+ apr_cvname=yes
+ else
+ apr_cvname=no
+ fi])
])
define(APR_IFALLYES,[dnl