diff --git a/configure b/configure index 143e689c3..516fc18be 100755 --- a/configure +++ b/configure @@ -708,6 +708,7 @@ GREP CPP LUA_CFLAGS STRIP +AWK INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM @@ -4351,6 +4352,48 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + if test -n "$GXX"; then @@ -8559,6 +8602,7 @@ gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' +AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF @@ -9407,7 +9451,7 @@ fi # Krad ASCII ART#!#@$!@#$ # Randomly store the name of one of the ASCII Art files in FILENAME -FILENAME=`ls $srcdir/docs/leet-nmap-ascii-art*.txt 2>/dev/null | awk ' +FILENAME=`ls $srcdir/docs/leet-nmap-ascii-art*.txt 2>/dev/null | $AWK ' BEGIN { srand(); } diff --git a/configure.ac b/configure.ac index 8f44f2ec2..f357fcb8a 100644 --- a/configure.ac +++ b/configure.ac @@ -54,6 +54,7 @@ AC_PROG_CC AC_PROG_CXX AC_PROG_RANLIB AC_PROG_INSTALL +AC_PROG_AWK dnl For nse_fs.cc dnl LARGE_FILES_IF_NOT_BROKEN @@ -961,7 +962,7 @@ AC_OUTPUT(Makefile libnetutil/Makefile) # Krad ASCII ART#!#@$!@#$ # Randomly store the name of one of the ASCII Art files in FILENAME -FILENAME=`ls $srcdir/docs/leet-nmap-ascii-art*.txt 2>/dev/null | awk ' +FILENAME=`ls $srcdir/docs/leet-nmap-ascii-art*.txt 2>/dev/null | $AWK ' BEGIN { srand(); }