X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=configure.ac;h=51f4ab2507b116b9aca78027a7fd00d4a2b10d18;hb=40dc9e54dfad83dd06e16ea147b6ec8f341cf1dd;hp=a7a094a411d5d558f7ce633f0847dc1efaa57104;hpb=1077583f4a1943a8e4b838f13bf12349795038e2;p=babeltrace.git diff --git a/configure.ac b/configure.ac index a7a094a4..51f4ab25 100644 --- a/configure.ac +++ b/configure.ac @@ -28,7 +28,7 @@ AC_PREREQ([2.50]) m4_define([bt_version_major], [2]) m4_define([bt_version_minor], [0]) -m4_define([bt_version_patch], [2]) +m4_define([bt_version_patch], [4]) m4_define([bt_version_dev_stage], []) m4_define([bt_version], bt_version_major[.]bt_version_minor[.]bt_version_patch[]bt_version_dev_stage) m4_define([bt_version_name], [Amqui]) @@ -86,6 +86,10 @@ AS_CASE([$host_os], [ DEFAULT_ENABLE_DEBUG_INFO=no ], + [freebsd*], + [ + DEFAULT_ENABLE_DEBUG_INFO=no + ], [cygwin*], [ DEFAULT_ENABLE_DEBUG_INFO=no @@ -112,9 +116,10 @@ AC_SYS_LARGEFILE # Choose the c compiler AC_PROG_CC +m4_version_prereq([2.70], [], [AC_PROG_CC_STDC]) # Make sure the c compiler supports C99 -AC_PROG_CC_C99([], [AC_MSG_ERROR([The compiler does not support C99])]) +AS_IF([test "$ac_cv_prog_cc_c99" = "no"], [AC_MSG_ERROR([The compiler does not support C99])]) # Make sure the c compiler supports __attributes__ AX_C___ATTRIBUTE__ @@ -191,6 +196,11 @@ AX_CHECK_LINK_FLAG([-Wl,--whole-archive,--no-whole-archive], # Initialize and configure libtool LT_INIT([win32-dll]) +# Check if the linker supports the "notext" keyword +AX_CHECK_LINK_FLAG([-Wl,-z,notext],[ + AC_SUBST([LD_NOTEXT], [-Wl,-z,notext]) +]) + ## ## ## Programs checks ## @@ -228,7 +238,9 @@ detection. AM_CONDITIONAL([HAVE_BISON], [test "x$have_bison" = "xyes"]) # check for flex -AC_PROG_LEX +# Prior to autoconf 2.70, AC_PROG_FLEX did not take an argument. This is not a +# problem since the argument is silently ignored by older versions. +AC_PROG_LEX([noyywrap]) AX_PROG_FLEX_VERSION([2.5.35], [have_flex=yes]) AS_IF([test "x$have_flex" != "xyes"], [ @@ -361,23 +373,30 @@ AS_IF([test "x$BABELTRACE_DEBUG_MODE" = x1], [ # Python bindings # Disabled by default AC_ARG_ENABLE([python-bindings], - [AC_HELP_STRING([--enable-python-bindings], [build the Python bindings])], + [AS_HELP_STRING([--enable-python-bindings], [build the Python bindings])], [], dnl AC_ARG_ENABLE will fill enable_python_bindings with the user choice - [enable_python_bindings=no] + [enable_python_bindings=unspecified] +) + +# Python bindings documentation +# Disabled by default +AC_ARG_ENABLE([python-bindings-doc], + [AS_HELP_STRING([--enable-python-bindings-doc], [build the Python bindings documentation])], + [], dnl AC_ARG_ENABLE will fill enable_python_bindings_doc with the user choice + [enable_python_bindings_doc=no] ) # Python plugins # Disabled by default AC_ARG_ENABLE([python-plugins], - [AC_HELP_STRING([--enable-python-plugins], [enable the Python plugins support for the library and converter])], - [], dnl AC_ARG_ENABLE will fill enable_python_plugins with the user choice - [enable_python_plugins=no] + [AS_HELP_STRING([--enable-python-plugins], [enable the Python plugins support for the library and converter])] + dnl AC_ARG_ENABLE will fill enable_python_plugins with the user choice ) # Debug info # Enabled by default, except on some platforms AC_ARG_ENABLE([debug-info], - [AC_HELP_STRING([--disable-debug-info], [disable the debug info support (default on macOS, Solaris and Windows)])], + [AS_HELP_STRING([--disable-debug-info], [disable the debug info support (default on macOS, Solaris and Windows)])], [], dnl AC_ARG_ENABLE will fill enable_debug_info with the user choice [enable_debug_info="$DEFAULT_ENABLE_DEBUG_INFO"] ) @@ -385,38 +404,36 @@ AC_ARG_ENABLE([debug-info], # API documentation # Disabled by default AC_ARG_ENABLE([api-doc], - [AC_HELP_STRING([--enable-api-doc], [build the HTML API documentation])], - [enable_api_doc=$enableval], - [enable_api_doc=no] + [AS_HELP_STRING([--enable-api-doc], [build the HTML API documentation])], + [enable_api_doc=$enableval] ) # Built-in plugins # Disabled by default AC_ARG_ENABLE([built-in-plugins], - [AC_HELP_STRING([--enable-built-in-plugins], [Statically-link in-tree plug-ins into the babeltrace2 executable])], - [], dnl AC_ARG_ENABLE will fill enable_built_in_plugins with the user choice - [enable_built_in_plugins=no] + [AS_HELP_STRING([--enable-built-in-plugins], [Statically-link in-tree plug-ins into the babeltrace2 executable])] + dnl AC_ARG_ENABLE will fill enable_built_in_plugins with the user choice ) # Built-in python plugin support # Disabled by default AC_ARG_ENABLE([built-in-python-plugin-support], - [AC_HELP_STRING([--enable-built-in-python-plugin-support], [Statically-link Python plugin support into the babeltrace library])], - [], dnl AC_ARG_ENABLE will fill enable_built_in_python_plugin_support with the user choice - [enable_built_in_python_plugin_support=no] + [AS_HELP_STRING([--enable-built-in-python-plugin-support], [Statically-link Python plugin support into the babeltrace library])] + dnl AC_ARG_ENABLE will fill enable_built_in_python_plugin_support with the user choice ) # Man pages # Enabled by default AC_ARG_ENABLE([man-pages], [AS_HELP_STRING([--disable-man-pages], [Do not build and install man pages (already built in a distributed tarball])], - [], dnl AC_ARG_ENABLE will fill enable_built_in_plugins with the user choice + [], dnl AC_ARG_ENABLE will fill enable_man_pages with the user choice [enable_man_pages=yes] ) # Set automake variables for optionnal feature conditionnals in Makefile.am AM_CONDITIONAL([ENABLE_PYTHON_BINDINGS], [test "x$enable_python_bindings" = xyes]) +AM_CONDITIONAL([ENABLE_PYTHON_BINDINGS_DOC], [test "x$enable_python_bindings_doc" = xyes]) AM_CONDITIONAL([ENABLE_PYTHON_PLUGINS], [test "x$enable_python_plugins" = xyes]) AM_CONDITIONAL([ENABLE_DEBUG_INFO], [test "x$enable_debug_info" = xyes]) AM_CONDITIONAL([ENABLE_API_DOC], [test "x$enable_api_doc" = xyes]) @@ -451,6 +468,29 @@ AS_IF([test "x$enable_debug_info" = xyes], AC_SUBST([ENABLE_DEBUG_INFO_VAL]) +# Check for conflicting Python related features user choices. +AS_IF([test "x$enable_python_plugins" = xyes], + [ + AS_IF([test "x$enable_python_bindings" = xunspecified], + [ + # --enable-python-plugins was provided but --enable-python-bindings was + # omitted. Turn the Python bindings ON anyway because it's needed to + # use the Python plugins. + enable_python_bindings=yes + ], + [ + AS_IF([test "x$enable_python_bindings" = xno], + [ + # --enable-python-plugins _and_ --disable-python-bindings were + # used. This is invalid because Python plugins need the Python + # bindings to be useful. + AC_MSG_ERROR(--enable-python-bindings must be used to support Python plugins) + ] + ) + ] + ) + ] +) # Check for conflicting optional features user choices @@ -464,7 +504,7 @@ AS_IF([test "x$enable_built_in_plugins" = xyes], AS_IF([test "x$enable_built_in_python_plugin_support" = xyes], [ - AS_IF([test "x$enable_python_plugins" = xno], [AC_MSG_ERROR([--enable-python-plugins must be used to bundle Python plugin support in the babeltrace2 executable])]) + AS_IF([test "x$enable_python_plugins" != xyes], [AC_MSG_ERROR([--enable-python-plugins must be used to bundle Python plugin support in the babeltrace2 executable])]) # Built-in plug-ins are only available when the --disable-shared --enable-static options are used. AS_IF([test "x$enable_static" != xyes], [AC_MSG_ERROR(--enable-static must be used to bundle Python plugin support in the babeltrace2 executable)]) AS_IF([test "x$enable_shared" = xyes], [AC_MSG_ERROR(--disable-shared must be used to bundle Python plugin support in the babeltrace2 executable)]) @@ -524,6 +564,19 @@ AS_IF([test "x$enable_python_bindings" = xyes || test "x$enable_python_plugins" ]) ]) +AS_IF([test "x$enable_python_bindings_doc" = xyes], + [ + AM_CHECK_PYTHON_SPHINX([PYTHON]) + AS_IF([test "x$PYTHON_SPHINX_EXISTS" = xno], [ + AC_MSG_ERROR([The Sphinx package for Python 3 is required to build the Python bindings documentation]) + ]) + + AS_IF([test "x$enable_python_bindings" != xyes], [ + AC_MSG_ERROR([The Python bindings are required to build their documentation]) + ]) + ] +) + AS_IF([test "x$enable_debug_info" = xyes], [ # Check if libelf and libdw are present @@ -711,6 +764,8 @@ AC_CONFIG_FILES([ doc/api/Makefile doc/api/libbabeltrace2/Doxyfile doc/api/libbabeltrace2/Makefile + doc/bindings/Makefile + doc/bindings/python/Makefile doc/contributing-images/Makefile doc/Makefile doc/man/asciidoc-attrs.conf @@ -896,6 +951,8 @@ m4_popdef([build_man_pages_msg]) test "x$enable_api_doc" = "xyes" && value=1 || value=0 PPRINT_PROP_BOOL([HTML API documentation], $value) +test "x$enable_python_bindings_doc" = "xyes" && value=1 || value=0 +PPRINT_PROP_BOOL([Python bindings documentation], $value) AS_ECHO PPRINT_SUBTITLE([Logging])