summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorSeth Nickell <seth@gnome.org>2003-09-22 05:45:59 +0000
committerSeth Nickell <seth@gnome.org>2003-09-22 05:45:59 +0000
commitf4cffc0e49d48a8dbf158230d7e816d8713566da (patch)
treed22625c371ad3fa2eae127c0a825bd5b26652c61 /configure.in
parentc9332907b035b52103c5569119d0a7c9fbcb76ac (diff)
2003-09-21 Seth Nickell <seth@gnome.org>
First checkin of the Python bindings. * python/.cvsignore: * python/Makefile.am: * python/dbus_bindings.pyx.in: * python/dbus_h_wrapper.h: Pieces for Pyrex to operate on, building a dbus_bindings.so python module for low-level access to the DBus APIs. * python/dbus.py: High-level Python module for accessing DBus objects. * configure.in: * Makefile.am: Build stuff for the python bindings. * acinclude.m4: Extra macro needed for finding the Python C header files.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in40
1 files changed, 40 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index e81a8d6a..6cf4accb 100644
--- a/configure.in
+++ b/configure.in
@@ -35,6 +35,8 @@ AC_ARG_ENABLE(gcov, [ --enable-gcov compile with coverage p
AC_ARG_ENABLE(abstract-sockets, [ --enable-abstract-sockets use abstract socket namespace (linux only)],enable_abstract_sockets=$enableval,enable_abstract_sockets=auto)
AC_ARG_ENABLE(gcj, [ --enable-gcj build gcj bindings],enable_gcj=$enableval,enable_gcj=no)
AC_ARG_ENABLE(mono, [ --enable-mono build mono bindings],enable_mono=$enableval,enable_mono=no)
+AC_ARG_ENABLE(python, [ --enable-python build python bindings],enable_python=$enableval,enable_python=auto)
+
AC_ARG_WITH(xml, [ --with-xml=[libxml/expat] XML library to use])
AC_ARG_WITH(init-scripts, [ --with-init-scripts=[redhat] Style of init scripts to install])
@@ -834,6 +836,42 @@ fi
AC_DEFINE_UNQUOTED(DBUS_SESSION_SOCKET_DIR, "$DBUS_SESSION_SOCKET_DIR", [Where per-session bus puts its sockets])
AC_SUBST(DBUS_SESSION_SOCKET_DIR)
+# Detect if we can build Python bindings (need python, python headers, and pyrex)
+if test x$enable_python = xno; then
+ have_python=no
+else
+ AC_MSG_NOTICE([Checking to see if we can build Python bindings])
+ have_python=no
+ AM_PATH_PYTHON(2.2)
+
+ if test -z "$PYTHON" ; then
+ AC_MSG_WARN([Python not found])
+ else
+ AC_CHECK_PROGS(PYREX, pyrexc)
+
+ if test -z "$PYREX" ; then
+ have_pyrex=no
+ else
+ have_pyrex=yes
+ fi
+
+ AM_CHECK_PYTHON_HEADERS(have_python_headers=yes,have_python_headers=no)
+
+ if test x$have_pyrex = xyes -a x$have_python_headers = xyes ; then
+ have_python=yes
+ fi
+ fi
+
+ if test x$have_python = xno ; then
+ if test x$enable_python = xyes ; then
+ AC_MSG_ERROR([Building python explicitly requested, but can't build python bindings])
+ else
+ AC_MSG_WARN([Couldn't find either Pyrex or the Python headers, not building Python bindings])
+ fi
+ fi
+fi
+
+AM_CONDITIONAL(HAVE_PYTHON, test x$have_python = xyes)
AC_OUTPUT([
@@ -846,6 +884,7 @@ bus/dbus-daemon-1.1
Makefile
dbus/Makefile
glib/Makefile
+python/Makefile
qt/Makefile
gcj/Makefile
gcj/org/Makefile
@@ -914,6 +953,7 @@ echo "
Building checks: ${enable_checks}
Building Qt bindings: ${have_qt}
Building GLib bindings: ${have_glib}
+ Building Python bindings: ${have_python}
Building GTK+ tools: ${have_gtk}
Building X11 code: ${enable_x11}
Building documentation: ${enable_docs}