[lttng-dev] [Babeltrace PATCH] Really check for flex and bison at configure time
Alexandre Montplaisir
alexandre.montplaisir at gmail.com
Sat Feb 18 10:33:04 EST 2012
fixes #74
Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir at gmail.com>
---
configure.ac | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 05637f6..1705b1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,19 +10,26 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_MACRO_DIR([m4])
-AM_PROG_MKDIR_P
-
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
LT_INIT
+
+# Check for flex and bison
AC_PROG_YACC
AC_PROG_LEX
-AC_DEFUN([AC_PROG_BISON], [AC_CHECK_PROGS(BISON, bison, bison)])
+AS_IF([test "x$ac_cv_prog_YACC" != "xbison -y"],[
+ AC_MSG_ERROR([Bison is required to compile BabelTrace. Make sure it is installed and in the PATH.])
+])
+
+AS_IF([test "x$ac_cv_prog_LEX" != "xflex"],[
+ AC_MSG_ERROR([Flex is required to compile BabelTrace. Make sure it is installed and in the PATH.])
+])
+# Check for Glib
AM_PATH_GLIB_2_0(2.22.0, ,AC_MSG_ERROR([glib is required in order to compile BabelTrace - download it from ftp://ftp.gtk.org/pub/gtk]) , gmodule)
# Checks for typedefs, structures, and compiler characteristics.
--
1.7.9
More information about the lttng-dev
mailing list