4 dnl If not 1, append datestamp to the version number and build with -Werror
5 m4_define(dbus_python_released, 1)
6 dnl The dbus-python version number (must actually be numeric at the moment)
7 m4_define(dbus_python_major_version, 0)
8 m4_define(dbus_python_minor_version, 79)
9 m4_define(dbus_python_micro_version, 94)
11 m4_define(dbus_python_maybe_datestamp,
12 m4_esyscmd([if test x]dbus_python_released[ != x1; then date +.%Y%m%d | tr -d '\n\r'; fi]))
14 m4_define(dbus_python_version, dbus_python_major_version.dbus_python_minor_version.dbus_python_micro_version[]dbus_python_maybe_datestamp)
16 dnl versions of packages we require ...
17 dnl m4_define(glib_required_version, 2.8.0)
19 AC_INIT(dbus-python, dbus_python_version,
20 [http://bugzilla.gnome.org/enter_bug.cgi?product=dbus&component=python])
22 AC_DEFINE(DBUS_PYTHON_MAJOR_VERSION, dbus_python_major_version, [dbus-python major version])
23 AC_SUBST(DBUS_PYTHON_MAJOR_VERSION, dbus_python_major_version)
24 AC_DEFINE(DBUS_PYTHON_MINOR_VERSION, dbus_python_minor_version, [dbus-python minor version])
25 AC_SUBST(DBUS_PYTHON_MINOR_VERSION, dbus_python_minor_version)
26 AC_DEFINE(DBUS_PYTHON_MICRO_VERSION, dbus_python_micro_version, [dbus-python micro version])
27 AC_SUBST(DBUS_PYTHON_MICRO_VERSION, dbus_python_micro_version)
29 AC_CONFIG_SRCDIR([_dbus_bindings/module.c])
30 AM_CONFIG_HEADER(config.h)
34 dnl put the ACLOCAL flags in the makefile
35 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
42 dnl XXXX hack to kill off all the libtool tags ...
43 dnl it isn't like we are using C++ or Fortran.
44 dnl (copied from libglade/configure.in)
45 m4_define([_LT_AC_TAGCONFIG],[])
51 AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
53 PLATFORM=`$PYTHON -c "from distutils import util; print util.get_platform()"`
56 dnl Building documentation
60 AC_ARG_ENABLE(html-docs,
61 AC_HELP_STRING([--disable-html-docs], [Disable HTML documentation building (requires docutils)]),, enable_html_docs=no)
63 AC_ARG_ENABLE(api-docs,
64 AC_HELP_STRING([--enable-api-docs], [Enable API documentation building (requires epydoc 3 and docutils)]),, enable_api_docs=no)
66 AM_CHECK_PYMOD([docutils], [__version__], [:], [enable_api_docs=no ; enable_html_docs=no])
68 if test "${enable_api_docs}" != no; then
69 AC_PATH_PROG([EPYDOC], [epydoc])
70 if test -z "$EPYDOC"; then
76 if test "${enable_html_docs}" != no; then
77 AC_CHECK_PROGS([RST2HTML], [rst2html rst2html.py], [])
78 if test -z "$RST2HTML"; then
81 DBUS_PY_ADD_RST2HTMLFLAG([--generator])
82 DBUS_PY_ADD_RST2HTMLFLAG([--date])
83 DBUS_PY_ADD_RST2HTMLFLAG([--time])
84 DBUS_PY_ADD_RST2HTMLFLAG([--exit-status=2])
85 DBUS_PY_ADD_RST2HTMLFLAG([--no-raw])
86 DBUS_PY_ADD_RST2HTMLFLAG([--no-file-insertion])
87 DBUS_PY_ADD_RST2HTMLFLAG([--cloak-email-addresses])
91 AC_SUBST([RST2HTMLFLAGS])
93 AM_CONDITIONAL([ENABLE_API_DOCS], [test x$enable_api_docs != xno])
94 AM_CONDITIONAL([ENABLE_DOCS], [test x$enable_html_docs != xno])
96 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0 dbus-glib-1 >= 0.70])
97 PKG_CHECK_MODULES(DBUS_GLIB, [dbus-1 >= 1.0 dbus-glib-1 >= 0.70])
99 dnl add required cflags ...
100 JH_ADD_CFLAG([-Wall])
101 JH_ADD_CFLAG([-Wextra])
102 JH_ADD_CFLAG([-Wno-missing-field-initializers])
103 JH_ADD_CFLAG([-Wdeclaration-after-statement])
104 JH_ADD_CFLAG([-std=c9x])
105 JH_ADD_CFLAG([-fno-strict-aliasing])
106 [if test x]dbus_python_released[ != x1; then]
107 JH_ADD_CFLAG([-Werror])
112 _dbus_bindings/Makefile
113 _dbus_glib_bindings/Makefile
120 test/tmp-session-bus.conf
121 test/TestSuitePythonService.service)