summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Jackson <jerj@coplanar.net>2009-01-21 22:10:40 -0500
committerPaul Jakma <paul@quagga.net>2009-06-19 15:03:31 +0100
commit7ec573661ff046f6fa97d694de7a68dede2532fd (patch)
treeaf1fd3206ed90ad0dec7844abf18deac579af846
parentec5e42b3c50e3a8e95963161319fa1a56466b2ae (diff)
[configure] fix check for GNU awk/gawk to abort ./configure if missing
It also prints what were comments explaining why gawk is necessary, and not-in-PATH to help user figure out why it's not found. Build was mysteriously failing with the old version of this check when gawk wasn't installed.
-rwxr-xr-xconfigure.ac8
1 files changed, 5 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 63cef65b..db36d5ed 100755
--- a/configure.ac
+++ b/configure.ac
@@ -21,9 +21,11 @@ AC_CANONICAL_TARGET()
AM_INIT_AUTOMAKE(1.6)
AM_CONFIG_HEADER(config.h)
-dnl GNU awk is required for lib/memtype.h made by memtypes.awk.
-dnl BSD awk complains: awk: gensub doesn't support backreferences (subst "\1")
-AC_CHECK_PROG([GAWK],[gawk],[gawk],[/bin/false])
+AC_CHECK_PROG([GAWK],[gawk],[gawk],[not-in-PATH])
+if test "x$GAWK" = "xnot-in-PATH" ; then
+ AC_MSG_ERROR([GNU awk is required for lib/memtype.h made by memtypes.awk.
+BSD awk complains: awk: gensub doesn't support backreferences (subst "\1") ])
+fi
AC_ARG_VAR([GAWK],[GNU AWK])
dnl default is to match previous behavior