diff options
author | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2007-11-06 19:57:27 +0100 |
---|---|---|
committer | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2007-11-06 19:57:27 +0100 |
commit | 0070558150bf2d0bedd77f8f651ebb41acd6552f (patch) | |
tree | 62164c4c97818b573c1eac1c91dc0d3ba8af5890 | |
parent | 76e374b52154480e710b98de457a149b5082a291 (diff) | |
download | ndim-git-utils-0070558150bf2d0bedd77f8f651ebb41acd6552f.tar.gz ndim-git-utils-0070558150bf2d0bedd77f8f651ebb41acd6552f.tar.xz ndim-git-utils-0070558150bf2d0bedd77f8f651ebb41acd6552f.zip |
Simplify m4 macros
-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 |