+AS_IF([test "x$enable_built_in_plugins" = xyes],
+ [AC_DEFINE([BT_BUILT_IN_PLUGINS], [1], [Define to 1 to register plug-in attributes in static executable sections])]
+)
+
+AS_IF([test "x$enable_built_in_python_plugin_support" = xyes],
+ [AC_DEFINE([BT_BUILT_IN_PYTHON_PLUGIN_SUPPORT], [1], [Define to 1 to register plug-in attributes in static executable sections])]
+)
+
+AS_IF([test "x$enable_debug_info" = xyes],
+ [ENABLE_DEBUG_INFO_VAL=1],
+ [ENABLE_DEBUG_INFO_VAL=0]
+)
+
+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
+
+AS_IF([test "x$enable_built_in_plugins" = xyes],
+ [
+ # 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 plug-ins in the babeltrace2 executable)])
+ AS_IF([test "x$enable_shared" = xyes], [AC_MSG_ERROR(--disable-shared must be used to bundle plug-ins in the babeltrace2 executable)])
+ ]
+)
+
+AS_IF([test "x$enable_built_in_python_plugin_support" = xyes],
+ [
+ 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)])
+ ]
+)
+
+
+# Check for optionnal features dependencies
+
+AS_IF([test "x$enable_python_bindings" = xyes],
+ [AX_PKG_SWIG(2.0.0, [], [AC_MSG_ERROR([SWIG 2.0.0 or newer is required to build the python bindings])])]
+)
+
+AM_PATH_PYTHON([3.0], [