diff options
-rw-r--r-- | m4/ndim-check-sh-command-substitution.m4 | 8 | ||||
-rw-r--r-- | m4/ndim-check-sh-functions.m4 | 6 |
2 files changed, 5 insertions, 9 deletions
diff --git a/m4/ndim-check-sh-command-substitution.m4 b/m4/ndim-check-sh-command-substitution.m4 index 30ea082..48c5e26 100644 --- a/m4/ndim-check-sh-command-substitution.m4 +++ b/m4/ndim-check-sh-command-substitution.m4 @@ -2,13 +2,11 @@ dnl NDIM_CHECK_SH_COMMAND_SUBSTITUTION([ACTION-IF-SUPPORTED], dnl [ACTION-IF-NOT-SUPPORTED)dnl dnl +m4_pattern_forbid([NDIM_CHECK_SH_COMMAND_SUBSTITUTION])dnl AC_DEFUN([NDIM_CHECK_SH_COMMAND_SUBSTITUTION],[dnl ndim_sh_command_substitution=no -if test "x$(pwd)" = "x`pwd`" \ -&& test "y$(echo "foobar")" = "y`echo foobar`" -then - ndim_sh_command_substitution=yes -fi +test "x$(pwd)" = "x`pwd`" && test "y$(echo "foobar")" = "y`echo foobar`" \ + && ndim_sh_command_substitution=yes m4_ifval([$1], [ if test "x$ndim_sh_command_substitution" = "xyes"; then $1 diff --git a/m4/ndim-check-sh-functions.m4 b/m4/ndim-check-sh-functions.m4 index 137a218..a0f5108 100644 --- a/m4/ndim-check-sh-functions.m4 +++ b/m4/ndim-check-sh-functions.m4 @@ -2,15 +2,13 @@ dnl NDIM_CHECK_SH_FUNCTIONS([ACTION-IF-SUPPORTED], dnl [ACTION-IF-NOT-SUPPORTED)dnl dnl +m4_pattern_forbid([NDIM_CHECK_SH_FUNCTIONS])dnl AC_DEFUN([NDIM_CHECK_SH_FUNCTIONS],[dnl NDIM_CHECK_SH_COMMAND_SUBSTITUTION([], [dnl AC_MSG_ERROR([Sorry, POSIX sh with \$() required.])dnl ])dnl ndim_sh_functions=no -if test "x$(moo() { echo "meh"; }; moo)" = "xmeh" -then - ndim_sh_functions=yes -fi +test "x$(moo() { echo "meh"; }; moo)" = "xmeh" && ndim_sh_functions=yes m4_ifval([$1], [ if test "x$ndim_sh_functions" = "xyes"; then $1 |