-AC_ARG_ENABLE([python-bindings],
- [AC_HELP_STRING([--enable-python-bindings],
- [generate Python bindings])],
- [enable_python_bindings=$enableval], [enable_python_bindings=no])
-
-AM_CONDITIONAL([USE_PYTHON], [test "x${enable_python_bindings:-yes}" = xyes])
-
-AC_ARG_ENABLE(
- [python-plugins],
- [AC_HELP_STRING(
- [--enable-python-plugins],
- [add support for the Babeltrace library and converter to load Python plugins])
- ],
- [enable_python_plugins=$enableval],
- [enable_python_plugins=no]
+# 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]
+)
+
+# 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]
+)
+
+# 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
+ [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])
+AM_CONDITIONAL([ENABLE_BUILT_IN_PLUGINS], [test "x$enable_built_in_plugins" = xyes])
+AM_CONDITIONAL([ENABLE_BUILT_IN_PYTHON_PLUGIN_SUPPORT], [test "x$enable_built_in_python_plugin_support" = xyes])
+AM_CONDITIONAL([ENABLE_MAN_PAGES], [test "x$enable_man_pages" = xyes])
+AM_CONDITIONAL([HAVE_PYTHON], [test "x$enable_python_bindings" = xyes || test "x$enable_python_plugins" = xyes])
+
+# Set defines for optionnal features conditionnals in the source code
+
+## jgalar: still used?
+AS_IF([test "x$enable_python_plugins" = xyes],
+ [AC_DEFINE([PYTHON_PLUGINS], [1], [Python plugin support.])]
+)
+
+AS_IF([test "x$enable_debug_info" = xyes],
+ [AC_DEFINE([ENABLE_DEBUG_INFO], [1], [Define to 1 if you enable the 'debug info' feature])]
+)
+
+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]