]> git.puffer.fish Git - mirror/frr.git/commitdiff
[configure] fix check for GNU awk/gawk to abort ./configure if missing
authorJeremy Jackson <jerj@coplanar.net>
Thu, 22 Jan 2009 03:10:40 +0000 (22:10 -0500)
committerPaul Jakma <paul@quagga.net>
Fri, 19 Jun 2009 14:03:31 +0000 (15:03 +0100)
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.

configure.ac

index 63cef65b2fb2271341de761aecc079123f13da28..db36d5edad231a374c31a0149d3a92decb06f46b 100755 (executable)
@@ -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