Add doc build infrastructure
[accounts-service-plus:accounts-service-plus.git] / configure.ac
1 AC_INIT(AccountsService, 0.3)
2 AM_INIT_AUTOMAKE(dist-bzip2 foreign)
3
4 GETTEXT_PACKAGE=accounts-service
5 AC_SUBST(GETTEXT_PACKAGE)
6 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
7                    [the gettext translation domain])
8
9 # Support silent build rules, requires at least automake-1.11. Enable
10 # by either passing --enable-silent-rules to configure or passing V=0
11 # to make
12 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
13
14 AC_PROG_CC
15 PKG_PROG_PKG_CONFIG
16 AM_GLIB_GNU_GETTEXT
17 IT_PROG_INTLTOOL([0.40.0])
18
19 PKG_CHECK_MODULES(GLIB, glib-2.0)
20 PKG_CHECK_MODULES(GIO, gio-2.0)
21 PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0)
22 PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1)
23 PKG_CHECK_MODULES(POLKIT, polkit-gobject-1)
24
25 GNOME_COMMON_INIT
26 GNOME_DEBUG_CHECK
27 GNOME_COMPILE_WARNINGS([maximum])
28 GNOME_CXX_WARNINGS
29 GNOME_MAINTAINER_MODE_DEFINES
30
31 nl ---------------------------------------------------------------------------
32 dnl - DocBook Documentation
33 dnl ---------------------------------------------------------------------------
34
35 AC_ARG_ENABLE(docbook-docs,
36         [AC_HELP_STRING([--enable-docbook-docs],
37                         [build documentation (requires xmlto)])],
38         enable_docbook_docs=$enableval,enable_docbook_docs=no)
39 AC_PATH_PROG(XMLTO, xmlto, no)
40 AC_MSG_CHECKING([whether to build DocBook documentation])
41 if test x$XMLTO = xno ; then
42         have_docbook=no
43 else
44         have_docbook=yes
45 fi
46 if test x$enable_docbook_docs = xauto ; then
47         if test x$have_docbook = xno ; then
48                 enable_docbook_docs=no
49         else
50                 enable_docbook_docs=yes
51         fi
52 fi
53 if test x$enable_docbook_docs = xyes; then
54         if test x$have_docbook = xno; then
55                 AC_MSG_ERROR([Building DocBook docs explicitly required, but DocBook not found])
56         fi
57 fi
58 AM_CONDITIONAL(DOCBOOK_DOCS_ENABLED, test x$enable_docbook_docs = xyes)
59 AC_MSG_RESULT(yes)
60 AC_ARG_VAR([XMLTO],[Define/override the 'xmlto' location.])
61 AC_ARG_VAR([XMLTO_FLAGS],[Define/override 'xmlto' options, like '--skip-validation'.])
62
63 dnl ---------------------------------------------------------------------------
64 dnl Check for xsltproc
65 dnl ---------------------------------------------------------------------------
66 AC_PATH_PROG([XSLTPROC], [xsltproc])
67
68 AC_CONFIG_HEADERS([config.h])
69 AC_CONFIG_FILES([
70 Makefile
71 po/Makefile.in
72 data/Makefile
73 src/Makefile
74 doc/Makefile
75 doc/dbus/Makefile
76 doc/dbus/AccountsService.xml
77 ])
78 AC_OUTPUT
79
80 echo
81 AC_MSG_NOTICE([accountsservice was configured with the following options:])
82 if test "x$enable_docbook_docs" = "xyes"; then
83         AC_MSG_NOTICE([** DocBook documentation build enabled])
84 else
85         AC_MSG_NOTICE([** DocBook documentation build disabled])
86 fi
87 echo
88
89