diff options
author | wlestes <wlestes> | 2012-03-02 21:38:31 +0000 |
---|---|---|
committer | wlestes <wlestes> | 2012-03-02 21:38:31 +0000 |
commit | b66d5b5cc9946c39694fe70faab356ab3de54a20 (patch) | |
tree | 6e42c1e85503e7faf12f6c7d64acdd3784775c32 | |
parent | a9b2300a70926bb2bfd7afe62604cfba05354426 (diff) | |
download | flex-b66d5b5cc9946c39694fe70faab356ab3de54a20.tar.gz |
fix test for m4 to accept an m4 with -P and not jus tGNU m4; patch from Tim Landsheet scfc_de on sourceforge
-rw-r--r-- | configure.in | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/configure.in b/configure.in index 6125877..cbbb754 100644 --- a/configure.in +++ b/configure.in @@ -47,22 +47,16 @@ AC_PROG_INSTALL AC_PATH_PROG(BISON, bison,bison) AC_PATH_PROG(HELP2MAN, help2man, help2man) -# Check for a GNU m4 that supports --prefix-builtins - -AC_PATH_PROGS(M4, gm4 gnum4 m4, m4) - -if test x"$M4" != x; then - AC_MSG_CHECKING([for GNU m4]) - case `$M4 --help < /dev/null 2>&1` in - *prefix-builtins*) AC_MSG_RESULT(yes) ;; - *) AC_MSG_RESULT(no) ; - AC_MSG_ERROR([GNU M4 1.4 is required]) ;; - esac -else - AC_MSG_ERROR([GNU M4 1.4 is required]) ; -fi - -AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the GNU M4 executable name.]) +# Check for a m4 that supports -P + +AC_CACHE_CHECK([for m4 that supports -P], [ac_cv_path_M4], +[AC_PATH_PROGS_FEATURE_CHECK([M4], [gm4 gnum4 m4], + [[m4out=`echo 'm''4_divnum' | $ac_path_M4 -P`] + [test "x$m4out" = x0 \ + && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], + [AC_MSG_ERROR([could not find m4 that supports -P])])]) +AC_SUBST([M4], [$ac_cv_path_M4]) +AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the m4 executable name.]) AC_PATH_PROG(INDENT, indent, indent) # if INDENT is set to 'indent' then we didn't find indent |