From 4664fd5871918cbf3afc6c9364e2b5117deecb1a Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 30 May 2015 22:50:37 +0200 Subject: [PATCH] configure: Add check for bunzip2 and maintainer-mode tools. Without bunzip2 make check cannot be run. To generate all files in maintainer-mode flex and bison are needed. Otherwise check that libdw/known-dwarf.h is already generated. Signed-off-by: Mark Wielaard --- ChangeLog | 6 ++++++ configure.ac | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9d417f9..f281f98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-05-30 Mark Wielaard + + * configure.ac: Check for bunzip2. Check flex and bison are + installed in maintainer-mode. Otherwise check libdw/known-dwarf.h + is already generated. + 2015-05-21 Mark Wielaard * configure.ac: Add --enable-sanitize-undefined. diff --git a/configure.ac b/configure.ac index e0adad7..6386e96 100644 --- a/configure.ac +++ b/configure.ac @@ -404,6 +404,29 @@ utrace_BIARCH CC_BIARCH="$CC $utrace_biarch" AC_SUBST([CC_BIARCH]) +# In maintainer mode we really need flex and bison. +# Otherwise we really need a release dir with maintainer files generated. +if test "x$enable_maintainer_mode" = xyes; then + AC_CHECK_PROG(HAVE_FLEX, flex, yes, no) + if test "$HAVE_FLEX" = "no"; then + AC_MSG_ERROR([flex needed in maintainer mode]) + fi + AC_CHECK_PROG(HAVE_BISON, bison, yes, no) + if test "$HAVE_BISON" = "no"; then + AC_MSG_ERROR([bison needed in maintainer mode]) + fi +else + if test ! -f ${srcdir}/libdw/known-dwarf.h; then + AC_MSG_ERROR([No libdw/known-dwarf.h. configure --enable-maintainer-mode]) + fi +fi + +# The testfiles are all compressed, we need bunzip2 when running make check +AC_CHECK_PROG(HAVE_BUNZIP2, bunzip2, yes, no) +if test "$HAVE_BUNZIP2" = "no"; then + AC_MSG_WARN([No bunzip2, needed to run make check]) +fi + AC_OUTPUT AC_MSG_NOTICE([ @@ -434,6 +457,7 @@ AC_MSG_NOTICE([ Native language support : ${USE_NLS} EXTRA TEST FEATURES (used with make check) + have bunzip2 installed (required) : ${HAVE_BUNZIP2} debug branch prediction : ${use_debugpred} gprof support : ${use_gprof} gcov support : ${use_gcov} -- 2.7.4