summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-05-24 17:49:20 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-05-24 17:49:20 +0100
commit5ee02bf8785167f042636ab3005105243bff533b (patch)
treeca6bf94fa4ac09290b2879dce2824abc2a098f45
parente9feba0f7b3a2b67fd56154185e92eab4b932468 (diff)
downloaddbus-python-5ee02bf8785167f042636ab3005105243bff533b.tar.gz
Let PYTHON_LIBS be overriden on the command line too
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=21017
-rw-r--r--configure.ac11
1 files changed, 10 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 209409b..3ecdeda 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,7 +53,16 @@ AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
PLATFORM=`$PYTHON -c "from distutils import util; print util.get_platform()"`
AC_SUBST(PLATFORM)
-PYTHON_LIBS=`$PYTHON-config --ldflags`
+AC_ARG_VAR([PYTHON_LIBS], [LDFLAGS for Python, overriding output of python2.x-config --ldflags, e.g. "-L/opt/misc/lib -lpython2.7"])
+
+if test "${PYTHON_LIBS+set}" = set; then
+ AC_MSG_NOTICE([PYTHON_LIBS overridden to: $PYTHON_LIBS])
+else
+ AC_MSG_CHECKING([for Python library linker flags])
+ PYTHON_LIBS=`$PYTHON-config --ldflags`
+ AC_MSG_RESULT([$PYTHON_LIBS])
+fi
+
AC_SUBST([PYTHON_LIBS])
dnl Building documentation