+ [AC_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]
+)
+
+# Python bindings documentation
+# Disabled by default
+AC_ARG_ENABLE([python-bindings-doc],
+ [AC_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]
+)
+
+# 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)])],
+ [], dnl AC_ARG_ENABLE will fill enable_debug_info with the user choice
+ [enable_debug_info="$DEFAULT_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]
+)
+
+# 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 babeltrace binary])],
+ [], 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])
+
+
+# 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]
+)
+
+AC_SUBST([ENABLE_DEBUG_INFO_VAL])
+