1
0
Fork 0
arangodb/m4/configure.maintainer

147 lines
4.9 KiB
Plaintext

dnl -*- mode: Autoconf; -*-
dnl ----------------------------------------------------------------------------
dnl --SECTION-- MAINTAINER MODE
dnl ----------------------------------------------------------------------------
AM_MAINTAINER_MODE
if test "x$USE_MAINTAINER_MODE" = "xyes"; then
AC_DEFINE_UNQUOTED(TRI_ENABLE_MAINTAINER_MODE, 1, [true if maintainer mode is enabled])
fi
AM_CONDITIONAL(ENABLE_MAINTAINER_MODE, test "x$USE_MAINTAINER_MODE" = xyes)
dnl ----------------------------------------------------------------------------
dnl --SECTION-- FAILURE TESTS
dnl ----------------------------------------------------------------------------
AC_ARG_ENABLE(failure-tests,
AS_HELP_STRING([--enable-failure-tests], [enable failure testing (default: no)]),
[tr_FAILURE_TESTS="$enableval"],
[tr_FAILURE_TESTS="no"]
)
if test "x$tr_FAILURE_TESTS" = xyes; then
if test "x$USE_MAINTAINER_MODE" != "xyes"; then
AC_MSG_ERROR([enabling the failure tests requires activating the maintainer mode, too])
fi
AC_DEFINE_UNQUOTED(TRI_ENABLE_FAILURE_TESTS, 1, [true if failure testing ins enabled])
fi
AM_CONDITIONAL(ENABLE_FAILURE_TESTS, test "x$tr_FAILURE_TESTS" = xyes)
dnl ----------------------------------------------------------------------------
dnl check for bison
dnl ----------------------------------------------------------------------------
AC_ARG_WITH(bison,
AS_HELP_STRING([--with-bison=EXECUTABLE], [path of the bison executable]),
[BISON_PATH="$withval"]
)
if test "x$USE_MAINTAINER_MODE" = xyes; then
AC_MSG_NOTICE([................................................................................])
AC_MSG_NOTICE([CHECKING BISON])
AC_MSG_NOTICE([................................................................................])
if test "x$BISON_PATH" = "x"; then
AC_CHECK_PROG(BISON, bison, bison)
else
BISON=$BISON_PATH
fi
tr_bison_usable=no
if test "x$BISON" != x -a "x$BISON" != "x:"; then
AC_MSG_CHECKING([if bison supports required features])
[tr_bison_version=`$BISON --version | head -1 | sed -e 's:^[^0-9]*::' | awk -F. '{print $1 * 10000 + $2 * 100 + $3}'`]
if test "$tr_bison_version" -ge 20401; then
tr_bison_usable=yes
fi
AC_MSG_RESULT($tr_bison_usable)
fi
if test "x$tr_bison_usable" != "xyes"; then
AC_MSG_ERROR([Please install bison version 2.4.1 or higher from http://ftp.gnu.org/gnu/bison/])
fi
AC_MSG_CHECKING([BISON version])
TRI_BISON_VERSION=`$BISON --version | head -1`
AC_MSG_RESULT([$TRI_BISON_VERSION])
BASIC_INFO="$BASIC_INFO|BISON: ${TRI_BISON_VERSION}"
else
BASIC_INFO="$BASIC_INFO|BISON: disabled"
fi
dnl ----------------------------------------------------------------------------
dnl check for flex
dnl ----------------------------------------------------------------------------
if test "x$USE_MAINTAINER_MODE" = xyes; then
AC_MSG_NOTICE([................................................................................])
AC_MSG_NOTICE([CHECKING FLEX])
AC_MSG_NOTICE([................................................................................])
AC_PROG_LEX
tr_flex_usable=no
if test "x$LEX" != x -a "x$LEX" != "x:"; then
AC_MSG_CHECKING([if flex supports required features])
[tr_flex_version=`$LEX --version | sed -e 's:^[^0-9]*::' | awk -F. '{print $1 * 10000 + $2 * 100 + $3}'`]
if test "$tr_flex_version" -ge 20535; then
tr_flex_usable=yes
fi
AC_MSG_RESULT($tr_flex_usable)
fi
if test "x$tr_flex_usable" != "xyes"; then
AC_MSG_ERROR([Please install flex version 2.5.35 or higher from http://ftp.gnu.org/gnu/flex/])
fi
AC_MSG_CHECKING([FLEX version])
TRI_FLEX_VERSION=`$LEX --version`
AC_MSG_RESULT([$TRI_FLEX_VERSION])
BASIC_INFO="$BASIC_INFO|FLEX: ${TRI_FLEX_VERSION}"
else
BASIC_INFO="$BASIC_INFO|FLEX: disabled"
fi
dnl ----------------------------------------------------------------------------
dnl execinfo - for backtraces in the C/C++ parts
dnl ----------------------------------------------------------------------------
if test "x$USE_MAINTAINER_MODE" = xyes; then
AC_ARG_WITH(backtrace,
[ --with-backtrace enable backtrace dumps],
[ if test "x$withval" != "xno" ; then
CFLAGS="$CFLAGS -rdynamic "
LDFLAGS="$LDFLAGS -rdynamic "
SERVER_LDFLAGS="$SERVER_LDFLAGS -rdynamic "
AC_CHECK_FUNCS(backtrace)
fi
]
)
fi
dnl ----------------------------------------------------------------------------
dnl --SECTION-- END-OF-FILE
dnl ----------------------------------------------------------------------------
dnl Local Variables:
dnl mode: outline-minor
dnl outline-regexp: "^\\(### @brief\\|## --SECTION--\\|# -\\*- \\)"
dnl End: