dconf 0.26.0
[dconf.git] / configure.ac
blobf2c3d467d94009f88e64961a7fa5c1b56b0f5edd
1 AC_INIT([dconf],
2         [0.26.0],
3         [https://bugzilla.gnome.org/enter_bug.cgi?product=dconf],
4         [dconf])
6 AC_CONFIG_SRCDIR([configure.ac])
7 AC_CONFIG_MACRO_DIR([m4])
8 AC_CONFIG_AUX_DIR([build-aux])
9 AC_CONFIG_HEADERS([config.h])
11 AM_INIT_AUTOMAKE([1.11.2 foreign -Wno-portability no-dist-gzip dist-xz])
12 AM_SILENT_RULES([yes])
14 # Set default CFLAGS before AC_PROG_CC does
15 if test "${CFLAGS+yes}" != "yes"; then
16   CFLAGS='-O2 -g -Wall -Wwrite-strings -Wmissing-prototypes -fno-common'
19 # Check for programs
20 AC_PROG_CC
21 AC_CHECK_LIB(c, dlsym, LIBDL="", [AC_CHECK_LIB(dl, dlsym, LIBDL="-ldl")])
22 AC_SUBST(LIBDL)
23 AM_PROG_VALAC([0.18.0])
24 AC_PROG_RANLIB
25 AC_ARG_ENABLE(man,
26               [AS_HELP_STRING([--enable-man],
27                               [generate man pages [default=yes]])],,
28               enable_man=yes)
30 AS_IF([test "$enable_man" != no], [
31   AC_PATH_PROG([XSLTPROC], [xsltproc])
32   AS_IF([test -z "$XSLTPROC"], [
33     AC_MSG_ERROR([xsltproc is required for --enable-man])
34   ])
36 AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
38 # Use GLib resources
39 AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources)
41 # Use GSettings
42 GLIB_GSETTINGS
44 # Gtk-doc support
45 GTK_DOC_CHECK([1.15])
47 # Dependencies
48 PKG_CHECK_MODULES(glib, glib-2.0 >= 2.44.0)
49 PKG_CHECK_MODULES(gio, gio-unix-2.0)
51 AC_ARG_WITH(gio_modules_dir, [  --with-gio-modules-dir=PATH choose directory for the GIO module, [default=LIBDIR/gio/modules]], giomodulesdir="$withval", giomodulesdir=${libdir}/gio/modules)
52 AC_SUBST(giomodulesdir)
54 AC_ARG_WITH(dbus_service_dir, [  --with-dbus-service-dir=PATH choose directory for dbus service files, [default=PREFIX/share/dbus-1/services]], dbusservicedir="$withval", dbusservicedir=${datadir}/dbus-1/services)
55 AC_SUBST(dbusservicedir)
57 AC_ARG_WITH(dbus_system_service_dir, [  --with-dbus-system-service-dir=PATH choose directory for dbus system service files, [default=PREFIX/share/dbus-1/system-services]], dbussystemservicedir="$withval", dbussystemservicedir=${datadir}/dbus-1/system-services)
58 AC_SUBST(dbussystemservicedir)
60 AC_SUBST(dconfincludedir, ${includedir}/dconf)
62 AC_PATH_PROG(gio_QUERYMODULES, gio-querymodules, no)
64 AC_ARG_ENABLE(gcov,
65               AC_HELP_STRING([--enable-gcov],
66                              [enable generation of code coverage information]))
68 if test "x$enable_gcov" = "xyes"; then
69   CFLAGS="$CFLAGS -O0 -fprofile-arcs -ftest-coverage"
70   LDFLAGS="$LDFLAGS -lgcov"
73 dnl Gettext support
74 GETTEXT_PACKAGE=dconf
75 AC_SUBST(GETTEXT_PACKAGE)
76 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used])
78 AC_CONFIG_FILES([
79   common/Makefile
80   shm/Makefile
81   gvdb/Makefile
82   engine/Makefile
83   gdbus/Makefile
84   gsettings/Makefile
85   client/dconf.pc
86   client/Makefile
87   service/Makefile
88   bin/Makefile
89   tests/Makefile
90   docs/Makefile
91   Makefile
93 AC_OUTPUT