From 1569ec5199d0cfd71c3eab3a8faf8d2bb702ae21 Mon Sep 17 00:00:00 2001 From: hollisb Date: Sat, 26 Nov 2005 23:40:24 +0000 Subject: [PATCH] 2005-11-26 Hollis Blanchard * configure.ac: Correct `AC_PROG_YACC' test. --- ChangeLog | 4 ++++ configure | 44 ++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 8 ++++++++ 3 files changed, 56 insertions(+) diff --git a/ChangeLog b/ChangeLog index 06db3b7de..f788e0ae7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-11-26 Hollis Blanchard + + * configure.ac: Correct `AC_PROG_YACC' test. + 2005-11-22 Hollis Blanchard * util/powerpc/ieee1275/grub-install.in: Run the mount point diff --git a/configure b/configure index a7d1f4982..fbcc5216f 100644 --- a/configure +++ b/configure @@ -2386,6 +2386,50 @@ fi done test -n "$YACC" || YACC="yacc" +# AC_PROG_YACC doesn't actually check if yacc exists! +tmp_yacc=$YACC +unset YACC +# Extract the first word of ""$tmp_yacc"", so it can be a program name with args. +set dummy "$tmp_yacc"; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_YACC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_YACC=""$tmp_yacc"" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + echo "$as_me:$LINENO: result: $YACC" >&5 +echo "${ECHO_T}$YACC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test "x$YACC" = x; then + { { echo "$as_me:$LINENO: error: Could not find $tmp_yacc." >&5 +echo "$as_me: error: Could not find $tmp_yacc." >&2;} + { (exit 1); exit 1; }; } +fi + # Check whether --enable-largefile or --disable-largefile was given. if test "${enable_largefile+set}" = set; then diff --git a/configure.ac b/configure.ac index f2f4f541c..1607e4e16 100644 --- a/configure.ac +++ b/configure.ac @@ -45,6 +45,14 @@ fi AC_PROG_CC AC_PROG_YACC +# AC_PROG_YACC doesn't actually check if yacc exists! +tmp_yacc=$YACC +unset YACC +AC_CHECK_PROG(YACC, "$tmp_yacc", "$tmp_yacc") +if test "x$YACC" = x; then + AC_MSG_ERROR([Could not find $tmp_yacc.]) +fi + AC_SYS_LARGEFILE # Must be GCC.