summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-09-13 04:01:18 +0200
committerLennart Poettering <lennart@poettering.net>2012-09-13 04:01:18 +0200
commit8d7e170a5230753d8406276f8b5598e5bb6766e6 (patch)
tree0e3ddb182b1bc5468657fa5d836733029783801d /configure.ac
parent3612fbc1e4ae57af0783cc82a56917bcd29a0431 (diff)
python: integrate David Strauss' python-systemd package
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 22 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index b132499556..da550212eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,16 +80,31 @@ m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [
GOBJECT_INTROSPECTION_CHECK([1.31.1])
], [AM_CONDITIONAL([HAVE_INTROSPECTION], [false])])
-AC_CHECK_TOOL(OBJCOPY, objcopy)
-AC_CHECK_TOOL(STRINGS, strings)
-AC_CHECK_TOOL(GPERF, gperf)
+AC_PATH_TOOL(OBJCOPY, objcopy)
+AC_PATH_TOOL(STRINGS, strings)
+AC_PATH_TOOL(GPERF, gperf)
if test -z "$GPERF" ; then
AC_MSG_ERROR([*** gperf not found])
fi
-# we use python only to build the man page index
+# we use python to build the man page index, and for systemd-python
+have_python=no
+have_python_devel=no
AM_PATH_PYTHON(,, [:])
-AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
+if test "$PYTHON" != : ; then
+ have_python=yes
+ AC_PATH_PROG([PYTHON_CONFIG], python-config)
+
+ if test -n "$PYTHON_CONFIG" ; then
+ have_python_devel=yes
+ PYTHON_CFLAGS="`$PYTHON_CONFIG --cflags`"
+ PYTHON_LIBS="`$PYTHON_CONFIG --libs`"
+ AC_SUBST(PYTHON_CFLAGS)
+ AC_SUBST(PYTHON_LIBS)
+ fi
+fi
+AM_CONDITIONAL([HAVE_PYTHON], [test "$have_python" = "yes"])
+AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"])
CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
-pipe \
@@ -803,6 +818,8 @@ AC_MSG_RESULT([
gudev: ${enable_gudev}
gintrospection: ${enable_introspection}
keymap: ${enable_keymap}
+ Python: ${have_python}
+ Python Headers: ${have_python_devel}
prefix: ${prefix}
rootprefix: ${with_rootprefix}