diff --git a/configure.ac b/configure.ac index 111f7f009..9d1bc5744 100644 --- a/configure.ac +++ b/configure.ac @@ -35,19 +35,6 @@ test -z "$CXXFLAGS" && CXXFLAGS= adl_ENABLE_DEVEL -AC_ARG_ENABLE([python], - [AC_HELP_STRING([--disable-python], - [do not compile Python bindings])], - [], [enable_python=yes]) - -AM_CONDITIONAL([USE_PYTHON], [test "x${enable_python:-yes}" = xyes]) - -if test "x${enable_python:-yes}" = xyes; then - AC_MSG_NOTICE([You may configure with --disable-python ]dnl -[if you do not need Python bindings.]) - adl_CHECK_PYTHON -fi - AC_PROG_CC gl_EARLY @@ -129,6 +116,29 @@ LTDL_INIT([subproject convenience]) link_all_deplibs=yes link_all_deplibs_CXX=yes + +AC_ARG_ENABLE([python], + [AC_HELP_STRING([--disable-python], + [do not compile Python bindings])], + [], [enable_python=yes]) + +case $enable_shared:$enable_python in + no:no);; + no:*) + enable_python=no + AC_MSG_NOTICE([Not building Python bindings because of --disable-shared.]) + ;; +esac + +AM_CONDITIONAL([USE_PYTHON], [test "x${enable_python:-yes}" = xyes]) + +if test "x${enable_python:-yes}" = xyes; then + AC_MSG_NOTICE([You may configure with --disable-python ]dnl +[if you do not need Python bindings.]) + adl_CHECK_PYTHON +fi + + adl_ENABLE_DEBUG ad_GCC_OPTIM adl_NDEBUG