[lttng-dev] [Babeltrace PATCH] Really check for flex and bison at configure time
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Sat Feb 18 10:58:03 EST 2012
* Alexandre Montplaisir (alexandre.montplaisir at gmail.com) wrote:
> 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.])
"As specified in the README:
For developers using the git tree:
This source tree is based on the autotools suite from GNU to simplify
portability. Here are some things you should have on your system in
order to compile the git repository tree :
- GNU autotools (automake >=1.10, autoconf >=2.50, autoheader >=2.50)
(make sure your system wide "automake" points to a recent version!)
- GNU Libtool >=2.2
(for more information, go to http://www.gnu.org/software/autoconf/)
- Flex >=2.5.35.
- Bison >=2.4."
But these are not required for tarballs, so we should not add these
checks.
Thanks,
Mathieu
> +])
>
> +# 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
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list