summaryrefslogtreecommitdiff
path: root/cpp/configure.ac
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2011-11-03 22:11:11 +0000
committerAndrew Stitcher <astitcher@apache.org>2011-11-03 22:11:11 +0000
commit21dcb7d609d9ce3ed517c6d27e95448154abf9fa (patch)
treed892cb2e03e5aa0229b2173a383f66dd5311f8e7 /cpp/configure.ac
parent39e73a3b7b26dfa95814c3e2d569dd8522f25c2e (diff)
downloadqpid-python-21dcb7d609d9ce3ed517c6d27e95448154abf9fa.tar.gz
QPID-3464: Build Improvements (autotools) [inspired by Jan-Marek Glogowski]
- Simplified the python binding build QPID-3458: Install compiled _cqpid.so for SWIG python bindings in site-packages directory - Put the generated .pyc/.pyo and native .so in the correct place in the install tree git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1197326 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/configure.ac')
-rw-r--r--cpp/configure.ac35
1 files changed, 10 insertions, 25 deletions
diff --git a/cpp/configure.ac b/cpp/configure.ac
index 092694d56b..3fbd228f60 100644
--- a/cpp/configure.ac
+++ b/cpp/configure.ac
@@ -201,34 +201,19 @@ fi
AM_CONDITIONAL([HAVE_RUBY_DEVEL], [test -f $RUBY_INC/ruby.h && test -n "$SWIG"])
# Python bindings: To build python wrappers, the python-devel files must be present.
-
AM_PATH_PYTHON()
-if test -n "$PYTHON" ; then
- AC_MSG_CHECKING([$PYTHON include dir])
- if $PYTHON -c 'import distutils.sysconfig' 2>/dev/null ; then
- PYTHON_INC=`$PYTHON -c 'import os,distutils.sysconfig;print(distutils.sysconfig.get_python_inc().replace(os.sep,"/"))'`
- AC_SUBST(PYTHON_INC)
- else
+AS_IF([test -n "$PYTHON"], [
+ PKG_CHECK_MODULES([PYTHON], [python], [have_python_dev=yes],[
if test yes = "$with_python" ; then
- AC_MSG_ERROR([Couldn't import Python module distutils.sysconfig - you probably need to install a python-dev or python-devel package])
- else
- AC_MSG_WARN([Couldn't import Python module distutils.sysconfig - you probably don't have a python-dev or python-devel package installed])
- fi
- fi
- AC_MSG_RESULT([$PYTHON_INC])
- AC_MSG_CHECKING([for directory to install python bindings in])
- if test -z "$PYTHON_LIB" ; then
- PYTHON_LIB=`$PYTHON -c 'import os,distutils.sysconfig;print(distutils.sysconfig.get_python_lib(1).replace(os.sep,"/"))'`
- fi
- AC_MSG_RESULT([$PYTHON_LIB])
- AC_ARG_VAR(PYTHON_LIB, [Directory to install python bindings in])
-
- AC_MSG_CHECKING([for python libraries to link against])
- PYTHON_LIBS=`$PYTHON -c 'import os,sys;print("-L"+os.path.join(sys.path[[3]],"config")+" -lpython"+sys.version[[:3]])'`
+ AC_MSG_ERROR([Couldn't find Python developer libs - you probably need to install a python-dev or python-devel package])
+ else
+ AC_MSG_WARN([Couldn't find Python developer libs - you probably don't have a python-dev or python-devel package installed])
+ fi
+ ])
+ AC_SUBST(PYTHON_CFLAGS)
AC_SUBST(PYTHON_LIBS)
- AC_MSG_RESULT([$PYTHON_LIBS])
-fi
-AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test -f $PYTHON_INC/Python.h && test -n "$SWIG"])
+])
+AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test x$have_python_dev = xyes && test -n "$SWIG"])
# Perl bindings: