Diego Elio Pettenò wrote:
Patch concept by Jim Meyering <jim(a)meyering.net>, moved before
the Python
testing, and changed the message a bit to explain the problem.
---
configure.in | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/configure.in b/configure.in
index 3f2f8ff..5275412 100644
--- a/configure.in
+++ b/configure.in
@@ -1466,6 +1466,11 @@ dnl
AC_ARG_WITH([python],
[ --with-python Build python bindings (on)],[],[with_python=yes])
+if test "$enable_shared:$with_python" = no:yes; then
+ AC_MSG_WARN([Disabling shared libraries is incompatible with building Python
extensions.])
+ with_python=no
+fi
Moving the test "up" is good,
but changing the warning like that is less so,
since it no longer says what the code is doing.
Your diagnostic would be appropriate if it were for a fatal error.
However, when overriding a user-supplied option (--with-python),
the warning should say what it's doing, so the user does not
wonder if instead we've turned on --enable-shared.
From 6c558e1f2cfb0bb127f2939d70480a43a20dc9fd Mon Sep 17 00:00:00 2001
From: Jim Meyering <jim(a)meyering.net>
Date: Thu, 7 Jan 2010 21:07:42 +0100
Subject: [PATCH] let "configure --disable-shared" work once again
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Without this change, ./autogen.sh --disable-shared && make would
evoke a "can not build a shared library" failure for libvirtmod.la
due to the new use of libtool's -shared link option in
python/Makefile.am. Now, --disable-shared also
disables building python.
* configure.in: Make --disable-shared imply --without-python and
silently override --with-python.
Improved by: Diego Elio Pettenò <flameeyes(a)gmail.com>
---
configure.in | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/configure.in b/configure.in
index 3f2f8ff..012a96f 100644
--- a/configure.in
+++ b/configure.in
@@ -1466,6 +1466,12 @@ dnl
AC_ARG_WITH([python],
[ --with-python Build python bindings (on)],[],[with_python=yes])
+if test "$enable_shared:$with_python" = no:yes; then
+ AC_MSG_WARN([Disabling shared libraries is incompatible with building Python
extensions.])
+ AC_MSG_WARN([Ignoring --with-python.])
+ with_python=no
+fi
+
PYTHON_VERSION=
PYTHON_INCLUDES=
if test "$with_python" != "no" ; then
@@ -1813,7 +1819,6 @@ AC_ARG_WITH([qemu-group],
AC_DEFINE_UNQUOTED([QEMU_USER], ["$QEMU_USER"], [QEMU user account])
AC_DEFINE_UNQUOTED([QEMU_GROUP], ["$QEMU_GROUP"], [QEMU group account])
-
# Only COPYING.LIB is under version control, yet COPYING
# is included as part of the distribution tarball.
# Copy one to the other, but only if this is a srcdir-build.
--
1.6.6.425.g4dc2d