path: root/configure.ac
diff options
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-05-20 19:12:10 +0100
committerJoão Valverde <j@v6e.pt>2016-05-20 22:44:37 +0000
commit19bb8f677560895fc2e20015e297dbce46e36ee4 (patch)
tree1ef76c333c2f52a1b31a2788878546e2c07b51b3 /configure.ac
parent3b7d139708b073688bcd774329c5860357cd560c (diff)
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 <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'configure.ac')
1 files changed, 11 insertions, 32 deletions
diff --git a/configure.ac b/configure.ac
index 83d0642024..dfd9f2116b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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],
- [AC_MSG_RESULT(yes)],
- 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]))])
+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])])