4
[http://bugzilla.gnome.org/enter_bug.cgi?product=GConf],
7
AC_CONFIG_SRCDIR([gconf/gconf.h])
8
AC_CONFIG_HEADERS([config.h])
10
AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2 -Wall])
12
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
14
AM_MAINTAINER_MODE([enable])
26
AM_CONDITIONAL(OS_WIN32, [test "x$os_win32" = "xyes"])
28
if test "x$os_win32" = "xyes"; then
29
if test "x$enable_static" = "xyes" -o "x$enable_static" = "x"; then
30
AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
33
if test "x$enable_shared" = "xno"; then
34
AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.])
45
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
48
if test "x$GCC" = "xyes"; then
50
*[\ \ ]-Wall[\ \ ]*) ;;
51
*) CFLAGS="$CFLAGS -Wall" ;;
54
if test "x$enable_ansi" = "xyes"; then
56
*[\ \ ]-ansi[\ \ ]*) ;;
57
*) CFLAGS="$CFLAGS -ansi" ;;
61
*[\ \ ]-pedantic[\ \ ]*) ;;
62
*) CFLAGS="$CFLAGS -pedantic" ;;
68
dnl used to rename everything and support simultaneous installs.
69
dnl not incremented for bugfix or unstable releases.
71
AC_SUBST(MAJOR_VERSION)
73
GETTEXT_PACKAGE=GConf$MAJOR_VERSION
74
AC_SUBST(GETTEXT_PACKAGE)
75
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
77
dnl libtool versioning for libgconf
79
dnl increment if the interface has additions, changes, removals.
82
dnl increment any time the source changes; set to
83
dnl 0 if you increment CURRENT
86
dnl increment if any interfaces have been added; set to 0
87
dnl if any interfaces have been removed. removal has
88
dnl precedence over adding, so set to 0 if both happened.
91
AC_SUBST(GCONF_CURRENT)
92
AC_SUBST(GCONF_REVISION)
95
# find the actual value for $prefix that we'll end up with
97
if test "x$prefix" = "xNONE"; then
98
REAL_PREFIX=$ac_default_prefix
103
AC_ARG_WITH(sysconfsubdir,
104
AS_HELP_STRING([--with-sysconfsubdir],
105
[directory name used under sysconfdir @<:@default=gconf@:>@]),
106
, with_sysconfsubdir=gconf)
107
AC_SUBST(with_sysconfsubdir)
109
if test "x${with_sysconfsubdir}" != "x"; then
110
sysgconfdir='${sysconfdir}/${with_sysconfsubdir}'
112
sysgconfdir='${sysconfdir}'
114
gconfdefaultpath="$sysconfdir/$with_sysconfsubdir/$MAJOR_VERSION/path"
115
AC_SUBST(sysgconfdir)
116
AC_SUBST(gconfdefaultpath)
118
dnl Save flags to aclocal
119
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
121
dnl Default to debug spew in unstable branch
123
AS_HELP_STRING([--enable-debug],
124
[Compile with debug checks. @<:@no/yes/minimum, default=minimum@:>@]),
125
, enable_debug=minimum)
127
if test "x$enable_debug" = "xyes"; then
128
CFLAGS="$CFLAGS -DGCONF_ENABLE_DEBUG=1"
129
AC_MSG_NOTICE([Will build with debugging spew and checks])
131
if test "x$enable_debug" = "xno"; then
132
CFLAGS="$CFLAGS -DG_DISABLE_CHECKS=1 -DG_DISABLE_ASSERT=1"
133
AC_MSG_NOTICE([Will build without *any* debugging code])
135
AC_MSG_NOTICE([Will build with debug checks but no debug spew])
141
AC_ARG_ENABLE([documentation],
142
AS_HELP_STRING([--enable-documentation], [enable documentation generated via XSLT]),
143
[], [enable_documentation=yes])
144
AM_CONDITIONAL(ENABLE_DOCUMENTATION, test x$enable_documentation = xyes)
146
AC_MSG_CHECKING([which gtk+ version to compile against])
148
[AS_HELP_STRING([--with-gtk=2.0|3.0],[which gtk+ version to compile against (default: 3.0)])],
151
*) AC_MSG_ERROR([invalid gtk version specified]) ;;
154
AC_MSG_RESULT([$with_gtk])
157
2.0) GTK_API_VERSION=2.0
160
3.0) GTK_API_VERSION=3.0
166
AS_HELP_STRING([--enable-gtk],
167
[Enable GTK+ support (for gconf-sanity-check) @<:@default=auto@:>@]),
170
PKGCONFIG_MODULES='glib-2.0 > 2.14.0 gio-2.0 >= 2.31.0 gthread-2.0 gmodule-2.0 >= 2.7.0 gobject-2.0 >= 2.7.0'
171
PKGCONFIG_MODULES_WITH_XML="$PKGCONFIG_MODULES libxml-2.0"
172
PKGCONFIG_MODULES_WITH_GTK=" $PKGCONFIG_MODULES gtk+-$GTK_API_VERSION >= $GTK_REQUIRED"
173
PKGCONFIG_MODULES_WITH_XML_AND_GTK=" $PKGCONFIG_MODULES gtk+-$GTK_API_VERSION >= $GTK_REQUIRED libxml-2.0"
174
PKGCONFIG_MODULES_DBUS=" dbus-1 >= 1.0.0 dbus-glib-1 >= 0.74"
175
PKGCONFIG_MODULES_ORBIT=" ORBit-2.0 >= 2.4.0"
177
PKG_CHECK_MODULES(DEPENDENT, $PKGCONFIG_MODULES)
178
PKG_CHECK_MODULES(DEPENDENT_WITH_XML, $PKGCONFIG_MODULES_WITH_XML)
180
if test "x$enable_gtk" != "xno"; then
181
PKG_CHECK_MODULES(DEPENDENT_WITH_GTK, $PKGCONFIG_MODULES_WITH_GTK, HAVE_GTK=yes, HAVE_GTK=no)
182
PKG_CHECK_MODULES(DEPENDENT_WITH_XML_AND_GTK, $PKGCONFIG_MODULES_WITH_XML_AND_GTK, , DEPENDENT_WITH_XML_AND_GTK_CFLAGS=$DEPENDENT_WITH_XML_CFLAGS DEPENDENT_WITH_XML_AND_GTK_LIBS=$DEPENDENT_WITH_XML_LIBS)
184
if test "x$enable_gtk" = "xyes" && test "x$HAVE_GTK" = "xno"; then
186
*** Could not find GTK+ $GTK_REQUIRED.
187
*** Go to http://www.gtk.org/ to get it.]])
191
DEPENDENT_WITH_XML_AND_GTK_CFLAGS=$DEPENDENT_WITH_XML_CFLAGS
192
DEPENDENT_WITH_XML_AND_GTK_LIBS=$DEPENDENT_WITH_XML_LIBS
195
PKG_CHECK_MODULES([DEPENDENT_DBUS],[$PKGCONFIG_MODULES_DBUS])
197
AC_MSG_CHECKING([whether to use ORBit])
199
AS_HELP_STRING([--disable-orbit],
200
[Disable using ORBit for IPC]),
203
AS_IF([test "x$enable_orbit" = "xyes"],
206
PKG_CHECK_MODULES([DEPENDENT_ORBIT], [$PKGCONFIG_MODULES_ORBIT])
207
AM_CONDITIONAL(HAVE_CORBA, [true])
208
AM_CONDITIONAL(HAVE_DBUS, [false])
209
AC_DEFINE(HAVE_CORBA, 1, [Use ORBit IPC mechanism])
210
IPC_REQUIRES="ORBit-2.0"
215
AM_CONDITIONAL(HAVE_CORBA, [false])
216
AM_CONDITIONAL(HAVE_DBUS, [true])
217
AC_DEFINE(HAVE_DBUS, 1, [Use D-BUS IPC mechanism])
218
IPC_REQUIRES="dbus-1"
223
AC_SUBST(IPC_REQUIRES)
226
AM_CONDITIONAL(GTK, [test "x$HAVE_GTK" != "xno"])
228
AC_SUBST(DEPENDENT_LIBS)
229
AC_SUBST(DEPENDENT_CFLAGS)
230
AC_SUBST(DEPENDENT_WITH_XML_LIBS)
231
AC_SUBST(DEPENDENT_WITH_XML_CFLAGS)
232
AC_SUBST(DEPENDENT_WITH_GTK_LIBS)
233
AC_SUBST(DEPENDENT_WITH_GTK_CFLAGS)
234
AC_SUBST(DEPENDENT_WITH_XML_AND_GTK_LIBS)
235
AC_SUBST(DEPENDENT_WITH_XML_AND_GTK_CFLAGS)
236
AC_SUBST([DEPENDENT_DBUS_CFLAGS])
237
AC_SUBST([DEPENDENT_DBUS_LIBS])
238
AC_SUBST([DEPENDENT_ORBIT_CFLAGS])
239
AC_SUBST([DEPENDENT_ORBIT_LIBS])
242
AC_ARG_ENABLE(defaults_service,
243
AS_HELP_STRING([--enable-defaults-service],
244
[build the defaults DBus service @<:@default=auto@:>@]),
245
, enable_defaults_service=auto)
247
if test "x$enable_defaults_service" != "xno" ; then
248
PKG_CHECK_MODULES(DEFAULTS, glib-2.0 gthread-2.0 gobject-2.0 dbus-1 dbus-glib-1 polkit-gobject-1, HAVE_POLKIT=yes, HAVE_POLKIT=no)
249
if test "x$HAVE_POLKIT" = "xno"; then
250
if test "x$enable_defaults_service" = "xyes" ; then
252
*** Could not find PolicyKit.]])
254
enable_defaults_service=no
257
enable_defaults_service=yes
261
if test "x$enable_defaults_service" != "xno" ; then
262
AC_DEFINE(ENABLE_DEFAULTS_SERVICE, 1, [enable defaults DBus service])
265
AM_CONDITIONAL(ENABLE_DEFAULTS_SERVICE, [test "x$enable_defaults_service" != "xno"])
267
AC_ARG_ENABLE(gsettings_backend,
268
AS_HELP_STRING([--enable-gsettings-backend],
269
[build the gsettings backend @<:@default=auto@:>@]),
270
, enable_gsettings_backend=auto)
272
if test "x$enable_gsettings_backend" != "xno" ; then
273
PKG_CHECK_MODULES(GSETTINGS, gio-2.0 >= 2.25.0, HAVE_GSETTINGS=yes, HAVE_GSETTINGS=no)
274
if test "x$HAVE_GSETTINGS" = "xno"; then
275
if test "x$enable_gsettings_backend" = "xyes" ; then
277
*** Could not find GIO 2.25.0.]])
280
enable_gsettings_backend=yes
281
GIO_MODULE_DIR=$libdir/gio/modules
282
AC_SUBST(GIO_MODULE_DIR)
283
AC_PATH_PROG(GIO_QUERYMODULES, gio-querymodules, no)
287
if test "x$enable_gsettings_backend" != "xno" ; then
288
AC_DEFINE(ENABLE_GSETTINGS_BACKEND, 1, [enable defaults DBus service])
291
AM_CONDITIONAL(ENABLE_GSETTINGS_BACKEND, [test "x$enable_gsettings_backend" = "xyes"])
293
test x$ORBIT_IDL = x && ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
296
AC_CHECK_HEADER(pthread.h, have_pthreads=yes)
297
AM_CONDITIONAL(PTHREADS, [test -n "$have_pthreads"])
299
AC_CHECK_HEADERS(syslog.h sys/wait.h)
301
AC_CHECK_FUNCS(getuid sigaction fsync fchmod fdwalk)
303
dnl **************************************************
305
dnl **************************************************
307
AC_ARG_WITH(openldap,
308
AS_HELP_STRING([--with-openldap],
309
[Enable LDAP backend @<:@default=auto@:>@]),
310
, with_openldap=auto)
314
if test "x$with_openldap" != "xno"; then
315
AC_CHECK_HEADER(ldap.h, [
316
AC_CHECK_LIB(ldap, ldap_init, AC_CHECK_LIB(lber, ber_free, [LDAP_LIBS="-lldap -llber"]))
319
if test "x$os_win32" != "xyes"; then
320
SAVE_CFLAGS="$CFLAGS"
322
LDAP_CFLAGS="-DLDAP_DEPRECATED"
323
CFLAGS="$CFLAGS $LDAP_CFLAGS"
324
LIBS="$LIBS $LDAP_LIBS"
325
AC_CHECK_FUNCS(ldap_ntlm_bind)
326
CFLAGS="$SAVE_CFLAGS"
330
LDAP_CFLAGS="-DLDAP_DEPRECATED"
331
LDAP_LIBS="-lwldap32"
332
AC_SUBST(LDAP_CFLAGS)
334
AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
339
if test -z "$LDAP_LIBS"; then
340
if test "x$with_openldap" = "xyes"; then
341
AC_MSG_ERROR([*** LDAP support explicitely requested but not found ***])
343
AC_MSG_WARN([*** LDAP support not found ***])
351
AC_SUBST(LDAP_CFLAGS)
353
AM_CONDITIONAL(LDAP_SUPPORT, [test -n "$LDAP_LIBS"])
355
IT_PROG_INTLTOOL([0.35.0])
359
AC_CHECK_FUNCS(bind_textdomain_codeset)
361
GOBJECT_INTROSPECTION_CHECK([0.9.5])
367
## Just for debugging purposes
368
absolute_top_srcdir=`pwd`
369
AC_SUBST(absolute_top_srcdir)
390
sysconfsubdir: ${with_sysconfsubdir}
395
policykit: ${HAVE_POLKIT}
396
gsettings: ${HAVE_GSETTINGS}
397
introspection: ${found_introspection}