|author||João Valverde <email@example.com>||2016-05-20 19:12:10 +0100|
|committer||João Valverde <firstname.lastname@example.org>||2016-05-20 22:44:37 +0000|
configure.ac: Fix yacc/lex test for out-of-tree build
Minor cleanup, remove old comment and make both tests identical. Change-Id: I21aaf2bb7e74878013153534f758879879d23f6e Reviewed-on: https://code.wireshark.org/review/15509 Petri-Dish: João Valverde <email@example.com> Tested-by: Petri Dish Buildbot <firstname.lastname@example.org> Reviewed-by: João Valverde <email@example.com>
Diffstat (limited to 'configure.ac')
1 files changed, 11 insertions, 32 deletions
diff --git a/configure.ac b/configure.ac
index 83d0642024..dfd9f2116b 100644
@@ -149,40 +149,19 @@ else
AC_MSG_ERROR(I couldn't find python; make sure it's installed and in your path)
-# XXX - should autogen.sh check for YACC/Bison and Flex? A user building
-# from a distribution tarball shouldn't have to have YACC/Bison or Flex,
-# as the tarball should contain the results of running YACC/Bison on .y
-# files and running Flex on .l files, but a user building from SVN
-# will have to run YACC/Bison and Flex to process those files.
-# On the other hand, what about users who use a distribution tarball to
-# do development? They *shouldn't* - that's what the SVN repository is
-# for - but they might. They'd get errors if they modify a .y or .l
-# file and try to do a build - but the error should tell them that they
-# need to get YACC/Bison and/or Flex.
-# Then again, getting them shouldn't be too big of a burden.
-# XXX - is the same true of pod2man and pod2html, or are they needed
-# even when building from a distribution tarball?
+dnl Check for yacc/lex. Distribution tarballs include generated source,
+dnl in which case these tools are not a mandatory requirement to build.
-dnl Tarballs include the build products and do not require yacc.
-AC_MSG_CHECKING(whether $YACC -V works)
-AS_IF([$YACC -V >/dev/null 2>&1],
- AS_IF([test ! -f wiretap/ascend.c],
- AC_MSG_ERROR([I couldn't find yacc (or bison or ...); make sure it's installed and in your path]))])
-dnl AM_MISSING_PROG(YACC, bison)
+AS_IF([test "x$YACC" = xyacc], [AS_UNSET(YACC)])
+AS_IF([test -z "$YACC" -a ! -f $srcdir/wiretap/ascend.c],
+ [AC_MSG_ERROR([I couldn't find bison or byacc; make sure it's installed and in your path])])
-AS_IF([test "x$LEX" != xflex],
- AS_IF([test ! -f wiretap/ascend_scanner.c],
- AC_MSG_ERROR(I couldn't find flex; make sure it's installed and in your path))])
+AS_IF([test "x$LEX" != xflex], [AS_UNSET(LEX)])
+AS_IF([test -z "$LEX" -a ! -f $srcdir/wiretap/ascend_scanner.c],
+ [AC_MSG_ERROR([I couldn't find flex; make sure it's installed and in your path])])