summaryrefslogtreecommitdiff
path: root/m4/vasprintf-posix.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2007-03-09 01:24:32 +0000
committerBruno Haible <bruno@clisp.org>2007-03-09 01:24:32 +0000
commit5754af88053fdd150ce73b22e608ab2f00bf9006 (patch)
treefce19fb27acb3a87fd8668e710420be45dac0b32 /m4/vasprintf-posix.m4
parent7573ff58ab24b5f6cbcec41ef7a0e31de81c2135 (diff)
downloadgnulib-5754af88053fdd150ce73b22e608ab2f00bf9006.tar.gz
Use 'case' statements instead of 'expr' invocations.
Diffstat (limited to 'm4/vasprintf-posix.m4')
-rw-r--r--m4/vasprintf-posix.m429
1 files changed, 22 insertions, 7 deletions
diff --git a/m4/vasprintf-posix.m4 b/m4/vasprintf-posix.m4
index 6c5fc58acd..079ac768bc 100644
--- a/m4/vasprintf-posix.m4
+++ b/m4/vasprintf-posix.m4
@@ -11,14 +11,29 @@ AC_DEFUN([gl_FUNC_VASPRINTF_POSIX],
AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
AC_REQUIRE([gl_PRINTF_POSITIONS])
+ gl_cv_func_vasprintf_posix=no
AC_CHECK_FUNCS([vasprintf])
- if expr "$gl_cv_func_printf_sizes_c99" : ".*yes" > /dev/null \
- && expr "$gl_cv_func_printf_directive_a" : ".*yes" > /dev/null \
- && expr "$gl_cv_func_printf_directive_n" : ".*yes" > /dev/null \
- && expr "$gl_cv_func_printf_positions" : ".*yes" > /dev/null \
- && test $ac_cv_func_vasprintf = yes; then
- : # vasprintf exists and is already POSIX compliant.
- else
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ if test $ac_cv_func_vasprintf = yes; then
+ # vasprintf exists and is already POSIX compliant.
+ gl_cv_func_vasprintf_posix=yes
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_vasprintf_posix = no; then
if ! expr "$gl_cv_func_printf_directive_a" : ".*yes" > /dev/null; then
AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], 1,
[Define if the vasnprintf implementation needs special code for