+# 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)
+ ]
+ )
+ ]
+ )
+ ]
+)