Fix recommendation given by exception message bringing it into sync with current...
[dbus-python-phuang.git] / configure.ac
blobc3a7eb0ee85746c9d28290a76fb2988558d8a490
1 -*- mode: m4 -*-
2 AC_PREREQ(2.52)
4 dnl The dbus-python version number (must actually be numeric at the moment)
5 m4_define(dbus_python_major_version, 0)
6 m4_define(dbus_python_minor_version, 79)
7 m4_define(dbus_python_micro_version, 93)
8 m4_define(dbus_python_version, dbus_python_major_version.dbus_python_minor_version.dbus_python_micro_version)
10 dnl versions of packages we require ...
11 dnl m4_define(glib_required_version, 2.8.0)
13 AC_INIT(dbus-python, dbus_python_version,
14         [http://bugzilla.gnome.org/enter_bug.cgi?product=dbus&component=python])
15 AC_SUBST(ACLOCAL_AMFLAGS, "-I autotools -I .")
16 AC_CONFIG_AUX_DIR(autotools)
17 AC_CONFIG_MACRO_DIR(autotools)
19 AC_DEFINE(DBUS_PYTHON_MAJOR_VERSION, dbus_python_major_version, [dbus-python major version])
20 AC_SUBST(DBUS_PYTHON_MAJOR_VERSION, dbus_python_major_version)
21 AC_DEFINE(DBUS_PYTHON_MINOR_VERSION, dbus_python_minor_version, [dbus-python minor version])
22 AC_SUBST(DBUS_PYTHON_MINOR_VERSION, dbus_python_minor_version)
23 AC_DEFINE(DBUS_PYTHON_MICRO_VERSION, dbus_python_micro_version, [dbus-python micro version])
24 AC_SUBST(DBUS_PYTHON_MICRO_VERSION, dbus_python_micro_version)
26 AC_CONFIG_SRCDIR([_dbus_bindings/module.c])
27 AM_CONFIG_HEADER(config.h)
29 AM_INIT_AUTOMAKE
31 dnl put the ACLOCAL flags in the makefile
32 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
34 AC_CANONICAL_BUILD
35 AC_CANONICAL_HOST
37 AC_DISABLE_STATIC
39 dnl XXXX hack to kill off all the libtool tags ...
40 dnl it isn't like we are using C++ or Fortran.
41 dnl (copied from libglade/configure.in)
42 m4_define([_LT_AC_TAGCONFIG],[])
44 AC_PROG_LIBTOOL
46 AM_PATH_PYTHON(2.4.0)
48 AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
50 PLATFORM=`$PYTHON -c "from distutils import util; print util.get_platform()"`
51 AC_SUBST(PLATFORM)
53 dnl Building documentation
54 AC_ARG_ENABLE(api-docs,
55 AC_HELP_STRING([--enable-api-docs], [Enable documentation building (requires epydoc 3 and docutils)]),, enable_api_docs=no)
56 AM_CHECK_PYMOD([docutils], [__version__], [:], [enable_api_docs=no])
57 if test "${enable_api_docs}" != no; then
58   AC_PATH_PROG([EPYDOC], [epydoc])
59   if test -z "$EPYDOC"; then
60     enable_api_docs=no
61   fi
64 AM_CONDITIONAL(ENABLE_API_DOCS, test x$enable_api_docs != xno)
66 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0 dbus-glib-1 >= 0.70])
67 PKG_CHECK_MODULES(DBUS_GLIB, [dbus-1 >= 1.0 dbus-glib-1 >= 0.70])
69 dnl add required cflags ...
70 JH_ADD_CFLAG([-Wall])
71 JH_ADD_CFLAG([-Wextra])
72 JH_ADD_CFLAG([-Wno-missing-field-initializers])
73 JH_ADD_CFLAG([-Wdeclaration-after-statement])
74 JH_ADD_CFLAG([-std=c9x])
75 JH_ADD_CFLAG([-fno-strict-aliasing])
77 AC_CONFIG_FILES(
78   Makefile
79   dbus-python.pc
80   dbus/_version.py
81   test/tmp-session-bus.conf
82   test/TestSuitePythonService.service)
83 AC_OUTPUT