From a42eac01cbfc08df246a889de0d8aca19d75aca8 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 20 May 2015 15:38:55 +0100 Subject: [PATCH] tools: Add AWK to set of tools checked for by configure We are going to need this to generate the userspace flask.h header. Signed-off-by: Ian Campbell Acked-by: Wei Liu [ ijc -- ran autogen.sh ] --- config/Tools.mk.in | 1 + tools/configure | 50 +++++++++++++++++++++++++++++++++++++++++++++- tools/configure.ac | 2 ++ 3 files changed, 52 insertions(+), 1 deletion(-) diff --git a/config/Tools.mk.in b/config/Tools.mk.in index e7da99df1e..d67352e56d 100644 --- a/config/Tools.mk.in +++ b/config/Tools.mk.in @@ -23,6 +23,7 @@ AS86 := @AS86@ LD86 := @LD86@ BCC := @BCC@ IASL := @IASL@ +AWK := @AWK@ FETCHER := @FETCHER@ SEABIOS_PATH := @seabios_path@ OVMF_PATH := @ovmf_path@ diff --git a/tools/configure b/tools/configure index 0f3a63aa68..dfd8175ef0 100755 --- a/tools/configure +++ b/tools/configure @@ -660,7 +660,6 @@ pyconfig PYTHONPATH CHECKPOLICY XENSTORED -AWK OCAMLFIND OCAMLBUILD OCAMLDOC @@ -679,6 +678,7 @@ INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM SET_MAKE +AWK IASL BCC LD86 @@ -830,6 +830,7 @@ AS86 LD86 BCC IASL +AWK CPP PKG_CONFIG PKG_CONFIG_PATH @@ -1545,6 +1546,7 @@ Some influential environment variables: LD86 Path to ld86 tool BCC Path to bcc tool IASL Path to iasl tool + AWK Path to awk tool CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH @@ -4348,6 +4350,7 @@ LDFLAGS="$PREPEND_LDFLAGS $LDFLAGS $APPEND_LDFLAGS" + # Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -5137,6 +5140,51 @@ if test x"${PERL}" = x"no" then as_fn_error $? "Unable to find perl, please install perl" "$LINENO" 5 fi +# Extract the first word of "awk", so it can be a program name with args. +set dummy awk; 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_path_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $AWK in + [\\/]* | ?:[\\/]*) + ac_cv_path_AWK="$AWK" # Let the user override the test with a path. + ;; + *) + 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_path_AWK="$as_dir/$ac_word$ac_exec_ext" + $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 + + test -z "$ac_cv_path_AWK" && ac_cv_path_AWK="no" + ;; +esac +fi +AWK=$ac_cv_path_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 + + +if test x"${AWK}" = x"no" +then + as_fn_error $? "Unable to find awk, please install awk" "$LINENO" 5 +fi # checking for ocamlc if test -n "$ac_tool_prefix"; then diff --git a/tools/configure.ac b/tools/configure.ac index 1645c20af5..9bf6450a64 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -247,6 +247,7 @@ AC_ARG_VAR([AS86], [Path to as86 tool]) AC_ARG_VAR([LD86], [Path to ld86 tool]) AC_ARG_VAR([BCC], [Path to bcc tool]) AC_ARG_VAR([IASL], [Path to iasl tool]) +AC_ARG_VAR([AWK], [Path to awk tool]) # Checks for programs. AC_PROG_CC @@ -255,6 +256,7 @@ AC_PROG_INSTALL AC_PATH_PROG([BISON], [bison]) AC_PATH_PROG([FLEX], [flex]) AX_PATH_PROG_OR_FAIL([PERL], [perl]) +AX_PATH_PROG_OR_FAIL([AWK], [awk]) AC_PROG_OCAML AC_PROG_FINDLIB -- 2.39.5