Merge branch 'maint' into yacc-work
[platform/upstream/automake.git] / tests / defs.in
index 8aaf108..f7972d8 100644 (file)
@@ -74,6 +74,8 @@ SHELL='@SHELL@'
 export SHELL
 # User can override various tools used.
 test -z "$PERL" && PERL='@PERL@'
+test -z "$YACC" && YACC='@YACC@'
+test -z "$LEX" && LEX='@LEX@'
 test -z "$MAKE" && MAKE=make
 test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@"
 test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
@@ -105,13 +107,6 @@ do
   # Check that each required tool is present.
   case $tool in
     :) ;;
-    bison)
-      # Since bison is required, we pick YACC for ./configure.
-      YACC='bison -y'
-      export YACC
-      echo "$me: running bison --version"
-      ( bison --version ) || exit 77
-      ;;
     bzip2)
       # Do not use --version, bzip2 still tries to compress stdin.
       echo "$me: running bzip2 --help"
@@ -236,6 +231,22 @@ do
       echo "$me: running texi2dvi -o /dev/null --version"
       ( texi2dvi -o /dev/null --version ) || exit 77
       ;;
+    lex)
+      if test x"$LEX" = x"false"; then
+        echo "$me: no working \$LEX found at configure time," \
+                  "or explicitly disabled" >&2
+        exit 77
+      fi
+      export LEX
+      ;;
+    yacc)
+      if test x"$YACC" = x"false"; then
+        echo "$me: no working \$YACC found at configure time," \
+                  "or explicitly disabled" >&2
+        exit 77
+      fi
+      export YACC
+      ;;
     # Generic case: the tool must support --version.
     *)
       echo "$me: running $tool --version"