diff options
Diffstat (limited to 'configure.in')
| -rw-r--r-- | configure.in | 81 | 
1 files changed, 80 insertions, 1 deletions
| diff --git a/configure.in b/configure.in index 0a5928a2..9665cb03 100644 --- a/configure.in +++ b/configure.in @@ -24,6 +24,7 @@ AC_HEADER_STDC  AC_ARG_ENABLE(qt,               [  --enable-qt           enable Qt-friendly client library],enable_qt=$enableval,enable_qt=auto)  AC_ARG_ENABLE(glib,             [  --enable-glib         enable GLib-friendly client library],enable_glib=$enableval,enable_glib=auto) +AC_ARG_ENABLE(gtk,              [  --enable-gtk          enable GTK-requiring executables],enable_gtk=$enableval,enable_gtk=auto)  AC_ARG_ENABLE(tests,            [  --enable-tests        enable unit test code],enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE)  AC_ARG_ENABLE(ansi,             [  --enable-ansi         enable -ansi -pedantic gcc flags],enable_ansi=$enableval,enable_ansi=no)  AC_ARG_ENABLE(verbose-mode,     [  --enable-verbose-mode support verbose debug mode],enable_verbose_mode=$enableval,enable_verbose_mode=$USE_MAINTAINER_MODE) @@ -34,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]) @@ -54,9 +57,11 @@ if test x$enable_verbose_mode = xyes; then  fi  if test x$enable_asserts = xno; then      AC_DEFINE(DBUS_DISABLE_ASSERT,1,[Disable assertion checking]) +    AC_DEFINE(G_DISABLE_ASSERT,1,[Disable GLib assertion macros])  fi  if test x$enable_checks = xno; then      AC_DEFINE(DBUS_DISABLE_CHECKS,1,[Disable public API sanity checking]) +    AC_DEFINE(G_DISABLE_CHECKS,1,[Disable GLib public API sanity checking])  fi  #### gcc warning flags @@ -545,7 +550,7 @@ AC_SUBST(DBUS_TEST_CFLAGS)  AC_SUBST(DBUS_TEST_LIBS)  # Glib detection -PKG_CHECK_MODULES(DBUS_GLIB, glib-2.0, have_glib=yes, have_glib=no) +PKG_CHECK_MODULES(DBUS_GLIB, gobject-2.0, have_glib=yes, have_glib=no)  PKG_CHECK_MODULES(DBUS_GLIB_THREADS, glib-2.0 gthread-2.0, have_glib_threads=yes, have_glib_threads=no)  if test x$have_glib = xno ; then @@ -570,6 +575,39 @@ AC_SUBST(DBUS_GLIB_CFLAGS)  AC_SUBST(DBUS_GLIB_LIBS)  AC_SUBST(DBUS_GLIB_THREADS_LIBS) +DBUS_GLIB_TOOL_CFLAGS=$XML_CFLAGS +DBUS_GLIB_TOOL_LIBS=$XML_LIBS +AC_SUBST(DBUS_GLIB_TOOL_CFLAGS) +AC_SUBST(DBUS_GLIB_TOOL_LIBS) + +# GTK detection +if test x$have_glib = xno ; then +    AC_MSG_WARN([Can't use GTK+ since GLib not enabled]) +    have_gtk=no +else +    PKG_CHECK_MODULES(DBUS_GTK, gtk+-2.0, have_gtk=yes, have_gtk=no) +fi + +if test x$have_gtk = xno ; then +    AC_MSG_WARN([GTK+ development libraries not found]) +fi + +if test x$enable_gtk = xyes; then +    if test x$have_gtk = xno; then +	AC_MSG_ERROR([GTK+ explicitly required, and GTK+ development libraries not found]) +    fi +fi + +if test x$enable_gtk = xno; then +   have_gtk=no; +fi + +AM_CONDITIONAL(HAVE_GTK, test x$have_gtk = xyes) + +dnl Gtk flags +AC_SUBST(DBUS_GTK_CFLAGS) +AC_SUBST(DBUS_GTK_LIBS) +  # Qt detection  have_qt=no  AC_MSG_CHECKING([for qglobal.h]) @@ -812,6 +850,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([ @@ -824,6 +898,7 @@ bus/dbus-daemon-1.1  Makefile  dbus/Makefile  glib/Makefile +python/Makefile  qt/Makefile  gcj/Makefile  gcj/org/Makefile @@ -833,6 +908,7 @@ mono/Makefile  bus/Makefile  tools/Makefile  test/Makefile +test/glib/Makefile  doc/Makefile  dbus-1.pc  dbus-glib-1.pc @@ -863,6 +939,7 @@ echo "  	cflags:		          ${CFLAGS}  	cppflags:		  ${CPPFLAGS}  	cxxflags:		  ${CXXFLAGS} +	64-bit int:		  ${DBUS_INT64_TYPE}          Doxygen:                  ${DOXYGEN}          db2html:                  ${DB2HTML}" @@ -895,6 +972,8 @@ 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}          Using XML parser:         ${with_xml} | 
