configure.ac
changeset 2999 4ccfca658d9b
parent 2966 dc2943c98775
child 3000 2d362c2a8ed3
     1.1 --- a/configure.ac	Tue May 08 12:15:37 2012 +0200
     1.2 +++ b/configure.ac	Sat Jul 14 18:25:47 2012 +0200
     1.3 @@ -99,7 +99,7 @@
     1.4  AC_CACHE_VAL([ac_cv_path_SED],
     1.5      [AC_ARG_WITH([sed],
     1.6          AS_HELP_STRING([--with-sed=PATH],
     1.7 -                       [Specify the full PATH to sed]),
     1.8 +                       [Specify the full PATH to GNU sed]),
     1.9          [ac_cv_path_SED=$withval])])
    1.10  AC_PROG_SED
    1.11  AC_MSG_CHECKING([whether sed understands -r -i -e])
    1.12 @@ -129,7 +129,6 @@
    1.13  ACX_CHECK_PROGS_REQ([bison], [bison])
    1.14  ACX_CHECK_PROGS_REQ([flex], [flex])
    1.15  ACX_CHECK_PROGS_REQ([gperf], [gperf])
    1.16 -ACX_CHECK_PROGS_REQ([awk], [gawk mawk nawk awk])
    1.17  ACX_CHECK_PROGS_REQ([makeinfo], [makeinfo])
    1.18  ACX_CHECK_PROGS_REQ([cut], [cut])
    1.19  ACX_CHECK_PROGS_REQ([stat], [stat])
    1.20 @@ -151,7 +150,7 @@
    1.21  AC_CACHE_VAL([ac_cv_path__BASH],
    1.22      [AC_ARG_WITH([bash],
    1.23          AS_HELP_STRING([--with-bash=PATH],
    1.24 -                       [Specify the full PATH to bash >= 3.1]),
    1.25 +                       [Specify the full PATH to GNU bash >= 3.1]),
    1.26          [ac_cv_path__BASH=$withval])])
    1.27  AC_CACHE_CHECK([for bash >= 3.1], [ac_cv_path__BASH],
    1.28      [AC_PATH_PROGS_FEATURE_CHECK([_BASH], [bash],
    1.29 @@ -162,6 +161,21 @@
    1.30           AC_MSG_ERROR([could not find bash >= 3.1])])])
    1.31  AC_SUBST([_BASH], [$ac_cv_path__BASH])
    1.32  
    1.33 +# We need a awk that *is* GNU awk
    1.34 +AC_CACHE_VAL([ac_cv_path__AWK],
    1.35 +    [AC_ARG_WITH([awk],
    1.36 +        AS_HELP_STRING([--with-awk=PATH],
    1.37 +                       [Specify the full PATH to GNU awk]),
    1.38 +        [ac_cv_path__AWK=$withval])])
    1.39 +AC_CACHE_CHECK([for GNU awk], [ac_cv_path__AWK],
    1.40 +    [AC_PATH_PROGS_FEATURE_CHECK([_AWK], [awk gawk],
    1.41 +        [[_AWK_ver=$($ac_path__AWK --version 2>&1 \
    1.42 +                     |$EGREP '^GNU Awk ')
    1.43 +          test -n "$_AWK_ver" && ac_cv_path__AWK=$ac_path__AWK ac_path__AWK_found=:]],
    1.44 +        [AC_MSG_RESULT([no])
    1.45 +         AC_MSG_ERROR([could not find GNU awk])])])
    1.46 +AC_SUBST([_AWK], [$ac_cv_path__AWK])
    1.47 +
    1.48  #----------------------------------------
    1.49  # Check for GNU make 3.80 or above
    1.50  AC_CACHE_VAL([ac_cv_path_MAKE],