From 441d408b9e911223ebf95f7d951a06369283d20a Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Sat, 21 Mar 2015 13:22:01 +0100 Subject: [PATCH] configure: disable Python when --disable-shared Fixes #68. * configure.ac: Here. --- configure.ac | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) 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