1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
|
AC_DEFUN([AC_FYI], [echo "FYI: " $1])
AC_INIT(gconf/gconf.h)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(GConf, 2.2.0)
AM_MAINTAINER_MODE
AC_PROG_CC
AC_PROG_CXX
AC_ISC_POSIX
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_ARG_PROGRAM
AM_PROG_LIBTOOL
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
if test "x$enable_ansi" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-ansi[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -ansi" ;;
esac
case " $CFLAGS " in
*[\ \ ]-pedantic[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -pedantic" ;;
esac
fi
fi
changequote([,])dnl
dnl used to rename everything and support simultaneous installs.
dnl not incremented for bugfix or unstable releases.
MAJOR_VERSION=2
AC_SUBST(MAJOR_VERSION)
GETTEXT_PACKAGE=GConf$MAJOR_VERSION
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
dnl libtool versioning for libgconf
dnl increment if the interface has additions, changes, removals.
GCONF_CURRENT=5
dnl increment any time the source changes; set to
dnl 0 if you increment CURRENT
GCONF_REVISION=0
dnl increment if any interfaces have been added; set to 0
dnl if any interfaces have been removed. removal has
dnl precedence over adding, so set to 0 if both happened.
GCONF_AGE=1
AC_SUBST(GCONF_CURRENT)
AC_SUBST(GCONF_REVISION)
AC_SUBST(GCONF_AGE)
# find the actual value for $prefix that we'll end up with
REAL_PREFIX=
if test "x$prefix" = "xNONE"; then
REAL_PREFIX=$ac_default_prefix
else
REAL_PREFIX=$prefix
fi
# Have to go $sysconfdir->$prefix/etc->/usr/local/etc
# if you actually know how to code shell then fix this :-)
SYSCONFDIR_TMP="$sysconfdir"
old_prefix=$prefix
prefix=$REAL_PREFIX
EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP`
prefix=$old_prefix
AC_SUBST(EXPANDED_SYSCONFDIR)
dnl Save flags to aclocal
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
dnl Specify the configuration source, default to xml::$(sysconfdir)/gconf/gconf.xml.defaults
GCONF_CONFIG_SOURCE=
AC_ARG_ENABLE(gconf-source,
[ --enable-gconf-source=sourceaddress Where to install schema files.],GCONF_CONFIG_SOURCE=$enable_gconf_source,)
if test "x$GCONF_CONFIG_SOURCE" = "x"; then
GCONF_CONFIG_SOURCE="xml::\${sysconfdir}/gconf/gconf.xml.defaults"
INSTALL_GCONF_CONFIG_SOURCE="xml::\$(DESTDIR)\${sysconfdir}/gconf/gconf.xml.defaults"
AC_FYI("Using default config source $GCONF_CONFIG_SOURCE for schema installation")
else
AC_FYI("Using config source $GCONF_CONFIG_SOURCE for schema installation")
fi
AC_SUBST(GCONF_CONFIG_SOURCE)
AC_SUBST(INSTALL_GCONF_CONFIG_SOURCE)
dnl Default to debug spew in unstable branch
AC_ARG_ENABLE(debug,
[ --enable-debug=[no/yes/minimum] Compile with debug checks.],,enable_debug=minimum)
if test "x$enable_debug" = "xyes"; then
CFLAGS="$CFLAGS -DGCONF_ENABLE_DEBUG=1"
AC_FYI("Will build with debugging spew and checks")
else
if test "x$enable_debug" = "xno"; then
CFLAGS="$CFLAGS -DG_DISABLE_CHECKS=1 -DG_DISABLE_ASSERT=1"
AC_FYI("Will build without *any* debugging code")
else
AC_FYI("Will build with debug checks but no debug spew")
fi
fi
AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
if test "x$with_html_dir" = "x" ; then
HTML_DIR='${datadir}/gtk-doc/html'
else
HTML_DIR=$with_html_dir
fi
AC_SUBST(HTML_DIR)
AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
gtk_doc_min_version=0.6
if $GTKDOC ; then
gtk_doc_version=`gtkdoc-mkdb --version`
AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
IFS="${IFS= }"; gconf_save_IFS="$IFS"; IFS="."
set $gtk_doc_version
for min in $gtk_doc_min_version ; do
cur=$1; shift
if test -z $min ; then break; fi
if test -z $cur ; then GTKDOC=false; break; fi
if test $cur -gt $min ; then break ; fi
if test $cur -lt $min ; then GTKDOC=false; break ; fi
done
IFS="$gconf_save_IFS"
if $GTKDOC ; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
fi
AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC)
AC_SUBST(HAVE_GTK_DOC)
AC_CHECK_PROG(DB2HTML, db2html, true, false)
AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
dnl Let people disable the gtk-doc stuff.
AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
if test x$enable_gtk_doc = xauto ; then
if test x$GTKDOC = xtrue ; then
enable_gtk_doc=yes
else
enable_gtk_doc=no
fi
fi
dnl NOTE: We need to use a separate automake conditional for this
dnl to make this work with the tarballs.
AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
PKGCONFIG_MODULES='gmodule-2.0 >= 2.0.1 gobject-2.0 >= 2.0.1 ORBit-2.0 >= 2.4.0 linc >= 0.5.0'
PKGCONFIG_MODULES_WITH_XML="$PKGCONFIG_MODULES libxml-2.0"
PKGCONFIG_MODULES_WITH_GTK=" $PKGCONFIG_MODULES gtk+-2.0 >= 2.0.0"
PKGCONFIG_MODULES_WITH_XML_AND_GTK=" $PKGCONFIG_MODULES gtk+-2.0 libxml-2.0"
PKG_CHECK_MODULES(DEPENDENT, $PKGCONFIG_MODULES)
PKG_CHECK_MODULES(DEPENDENT_WITH_XML, $PKGCONFIG_MODULES_WITH_XML)
PKG_CHECK_MODULES(DEPENDENT_WITH_GTK, $PKGCONFIG_MODULES_WITH_GTK, HAVE_GTK=yes, HAVE_GTK=no)
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)
AM_CONDITIONAL(GTK, test x$HAVE_GTK != xno)
AC_SUBST(DEPENDENT_LIBS)
AC_SUBST(DEPENDENT_CFLAGS)
AC_SUBST(DEPENDENT_WITH_XML_LIBS)
AC_SUBST(DEPENDENT_WITH_XML_CFLAGS)
AC_SUBST(DEPENDENT_WITH_GTK_LIBS)
AC_SUBST(DEPENDENT_WITH_GTK_CFLAGS)
AC_SUBST(DEPENDENT_WITH_XML_AND_GTK_LIBS)
AC_SUBST(DEPENDENT_WITH_XML_AND_GTK_CFLAGS)
AC_ARG_ENABLE(bdbbackend, Enable BDB backend,,enable_bdbbackend=no)
AC_ARG_WITH(db3-includes, [ --with-db3-includes=PREFIX Location of DB3 includes.],
with_db3_includes="$withval", with_db3_includes="/usr/include")
AC_ARG_WITH(db3-libs, [ --with-db3-libs=PREFIX Location of DB3 libs.],
with_db3_libs="$withval", with_db3_libs="/usr/lib")
BDB_LIBS=
BDB_CFLAGS=
if test "x$enable_bdbbackend" = "xyes"; then
have_db3_includes="no"
if test "x${with_db3_includes}" != "xno"; then
CPPFLAGS_save="$CPPFLAGS"
AC_MSG_CHECKING(for DB3 includes in $with_db3_includes)
AC_MSG_RESULT("")
CPPFLAGS="$CPPFLAGS -I$with_db3_includes"
AC_CHECK_HEADERS(db3/db.h, [ db3_includes="yes" ])
CPPFLAGS="$CPPFLAGS_save"
if test "x{$db3_includes}" != "xno" -a "x{$db3_includes}" != "x" ; then
have_db3_includes="yes"
BDB_CFLAGS="-I$with_db3_includes"
fi
else
AC_MSG_CHECKING(for DB3 includes)
AC_MSG_RESULT(no)
fi
have_db3_libs="no"
if test "x${with_db3_libs}" != "xno" -a "x${have_db3_includes}" != "xno"; then
CFLAGS_save="$CFLAGS"
LIBS_save="$LDFLAGS"
AC_CACHE_CHECK([for DB3 libraries], db3_libs,
[
for db3libs in "-ldb-3.3" "-ldb-3.2" "-ldb-3.1" "-ldb-3"; do
if test "x${with_db3_libs}" != "x"; then
LIBS="$LIBS -L$with_db3_libs $db3libs"
else
LIBS="$LIBS $db3libs"
fi
AC_TRY_LINK_FUNC(db_env_create, db3_libs="yes", db3_libs="no")
CFLAGS="$CFLAGS_save"
LIBS="$LIBS_save"
if test "$db3_libs" = "yes"; then
break
fi
done
])
if test "x${db3_libs}" != "xno"; then
have_db3_libs="yes"
BDB_LIBS="-L$with_db3_libs $db3libs"
else
BDB_LIBS=""
fi
else
AC_MSG_CHECKING(for DB3 libraries)
AC_MSG_RESULT(no)
fi
fi
if test "x$BDB_LIBS" = x; then
AC_MSG_WARN(No db3 library found or bdb not enabled. Not building bdb backend.)
AC_MSG_WARN([(Note, this is a good thing because the bdb backend doesn't work anyhow.)])
fi
AM_CONDITIONAL(BDB, test -n "$BDB_LIBS")
AC_SUBST(BDB_LIBS)
AC_SUBST(BDB_CFLAGS)
ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
AC_SUBST(ORBIT_IDL)
AC_CHECK_LIB(popt, poptGetArg, POPT_LIBS=-lpopt,
[AC_CHECK_HEADER(popt.h, , AC_MSG_ERROR([[
*** Couldn't find popt. Please download and install from
*** ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/ and try again.]]))])
AC_SUBST(POPT_LIBS)
AC_CHECK_HEADER(pthread.h, have_pthreads=yes)
AM_CONDITIONAL(PTHREADS, test -n "$have_pthreads")
AC_CHECK_FUNCS(usleep)
AC_CHECK_FUNCS(flockfile)
ALL_LINGUAS="am ar az be bg ca cs da de el es eu fa fi fr ga gl hu it ja ko lv mk mn ms nl nn no pl pt pt_BR ro ru sk sl sv tr uk vi zh_CN zh_TW"
AM_GLIB_GNU_GETTEXT
# AM_GNU_GETTEXT above substs $DATADIRNAME
# this is the directory where the *.{mo,gmo} files are installed
gconflocaledir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(gconflocaledir)
AC_CHECK_FUNCS(bind_textdomain_codeset)
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
## Just for debugging purposes
absolute_top_srcdir=`pwd`
AC_SUBST(absolute_top_srcdir)
# define a MAINT-like variable REBUILD which is set if Perl
# and awk are found, so autogenerated sources can be rebuilt
AC_PROG_AWK
AC_CHECK_PROGS(PERL, perl5 perl)
# We would like indent, but don't require it.
AC_CHECK_PROG(INDENT, indent, indent)
_found_perl=0
if test -n "$PERL" && $PERL -v | grep 'version 5.' > /dev/null ; then
_found_perl=1
else
# The version string for perl changed for 'version 5' to 'v5' in
# perl 5.6 or therabouts
if test -n "$PERL" && $PERL -v | grep 'v5.' > /dev/null ; then
_found_perl=1
fi
fi
REBUILD=\#
if test $_found_perl -eq 1; then
if test -n "$AWK" ; then
REBUILD=
fi
fi
AC_SUBST(REBUILD)
AC_OUTPUT([
Makefile
gconf.spec
gconf.m4
gconf/Makefile
gconf/default.path
backends/Makefile
po/Makefile.in
doc/Makefile
doc/gconf/Makefile
examples/Makefile
tests/Makefile
gconf-2.0.pc
])
|