11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
14
# evolution/acinclude.m4
15
# shared configure.in hacks between Evolution and Connector
19
# Add --enable-purify. If the user turns it on, subst PURIFY and set
20
# the automake conditional ENABLE_PURIFY
21
AC_DEFUN([EVO_PURIFY_SUPPORT], [
23
[ --enable-purify=[no/yes] Enable support for building executables with Purify.],,enable_purify=no)
24
AC_PATH_PROG(PURIFY, purify, impure)
25
AC_ARG_WITH(purify-options, [ --with-purify-options=OPTIONS Options passed to the purify command line (defaults to PURIFYOPTIONS variable).])
26
if test "x$with_purify_options" = "xno"; then
27
with_purify_options="-always-use-cache-dir=yes -cache-dir=/gnome/lib/purify"
29
if test "x$PURIFYOPTIONS" = "x"; then
30
PURIFYOPTIONS=$with_purify_options
33
AM_CONDITIONAL(ENABLE_PURIFY, test "x$enable_purify" = "xyes" -a "x$PURIFY" != "ximpure")
34
PURIFY="$PURIFY $PURIFYOPTIONS"
38
# EVO_LDAP_CHECK(default)
39
# Add --with-openldap and --with-static-ldap options. --with-openldap
40
# defaults to the given value if not specified. If LDAP support is
41
# configured, HAVE_LDAP will be defined and the automake conditional
42
# ENABLE_LDAP will be set. LDAP_CFLAGS and LDAP_LIBS will be set
44
AC_DEFUN([EVO_LDAP_CHECK], [
47
AC_ARG_WITH(openldap, [ --with-openldap=[no/yes/PREFIX] Enable LDAP support in evolution])
48
AC_ARG_WITH(static-ldap, [ --with-static-ldap=[no/yes] Link LDAP support statically into evolution ])
49
AC_CACHE_CHECK([for OpenLDAP], ac_cv_with_openldap, ac_cv_with_openldap="${with_openldap:=$default}")
50
case $ac_cv_with_openldap in
58
with_openldap=$ac_cv_with_openldap
59
LDAP_CFLAGS="-I$ac_cv_with_openldap/include"
60
LDAP_LDFLAGS="-L$ac_cv_with_openldap/lib"
64
if test "$with_openldap" != no; then
65
AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
67
case $with_static_ldap in
76
AC_CACHE_CHECK(if OpenLDAP is version 2.x, ac_cv_openldap_version2, [
77
CPPFLAGS_save="$CPPFLAGS"
78
CPPFLAGS="$CPPFLAGS $LDAP_CFLAGS"
81
#if LDAP_VENDOR_VERSION > 20000
84
], ac_cv_openldap_version2=yes, ac_cv_openldap_version2=no)
85
CPPFLAGS="$CPPFLAGS_save"
87
if test "$ac_cv_openldap_version2" = no; then
88
AC_MSG_ERROR(evolution requires OpenLDAP version >= 2)
91
AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="-lresolv")
92
AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
93
AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
94
AC_CHECK_LIB(lber, ber_get_tag, [
95
if test "$with_static_ldap" = "yes"; then
96
LDAP_LIBS="$with_openldap/lib/liblber.a $LDAP_LIBS"
98
# libldap might depend on OpenSSL... We need to pull
99
# in the dependency libs explicitly here since we're
100
# not using libtool for the configure test.
101
if test -f $with_openldap/lib/libldap.la; then
102
LDAP_LIBS="`. $with_openldap/lib/libldap.la; echo $dependency_libs` $LDAP_LIBS"
105
LDAP_LIBS="-llber $LDAP_LIBS"
107
AC_CHECK_LIB(ldap, ldap_open, [
108
if test $with_static_ldap = "yes"; then
109
LDAP_LIBS="$with_openldap/lib/libldap.a $LDAP_LIBS"
111
LDAP_LIBS="-lldap $LDAP_LIBS"
113
LDAP_LIBS="", $LDAP_LDFLAGS $LDAP_LIBS)
114
LDAP_LIBS="$LDAP_LDFLAGS $LDAP_LIBS"
115
], LDAP_LIBS="", $LDAP_LDFLAGS $LDAP_LIBS)
117
if test -z "$LDAP_LIBS"; then
118
AC_MSG_ERROR(could not find OpenLDAP libraries)
121
AC_SUBST(LDAP_CFLAGS)
124
AM_CONDITIONAL(ENABLE_LDAP, test $with_openldap != no)
128
# Add --with-sunldap and --with-static-sunldap options. --with-sunldap
129
# defaults to the given value if not specified. If LDAP support is
130
# configured, HAVE_LDAP will be defined and the automake conditional
131
# ENABLE_LDAP will be set. LDAP_CFLAGS and LDAP_LIBS will be set
132
# appropriately, and --with-sunldap and --with-openldap is mutually exclusive.
133
AC_DEFUN([EVO_SUNLDAP_CHECK], [
136
AC_ARG_WITH(sunldap, [ --with-sunldap=[no/yes/PREFIX] Enable SunLDAP support in evolution])
137
AC_ARG_WITH(static-sunldap, [ --with-static-sunldap=[no/yes] Link SunLDAP support statically into evolution ])
138
AC_CACHE_CHECK([for SunLDAP], ac_cv_with_sunldap, ac_cv_with_sunldap="${with_sunldap:=$default}")
139
case $ac_cv_with_sunldap in
147
with_sunldap=$ac_cv_with_sunldap
148
LDAP_CFLAGS="-I$ac_cv_with_sunldap/include"
149
LDAP_LDFLAGS="-L$ac_cv_with_sunldap/lib"
153
if test "$with_sunldap" != no; then
154
AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
155
AC_DEFINE(SUNLDAP, 1, [Define if you use SunLDAP])
157
case $with_static_sunldap in
159
with_static_sunldap=no
162
with_static_sunldap=yes
166
AC_CACHE_CHECK(if SunLDAP is version 2.x, ac_cv_sunldap_version2, [
167
CPPFLAGS_save="$CPPFLAGS"
168
CPPFLAGS="$CPPFLAGS $LDAP_CFLAGS"
171
#if LDAP_VENDOR_VERSION >= 500
174
], ac_cv_sunldap_version2=yes, ac_cv_sunldap_version2=no)
175
CPPFLAGS="$CPPFLAGS_save"
177
if test "$ac_cv_sunldap_version2" = no; then
178
AC_MSG_ERROR(evolution requires SunLDAP version >= 2)
181
AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="-lresolv")
182
AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
183
AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
184
AC_CHECK_LIB(ldap, ldap_open, [
185
if test $with_static_sunldap = "yes"; then
186
LDAP_LIBS="$with_sunldap/lib/libldap.a $LDAP_LIBS"
188
LDAP_LIBS="-lldap $LDAP_LIBS"
190
if test `uname -s` != "SunOS" ; then
191
AC_CHECK_LIB(lber, ber_get_tag, [
192
if test "$with_static_sunldap" = "yes"; then
193
LDAP_LIBS="$with_sunldap/lib/liblber.a $LDAP_LIBS"
194
# libldap might depend on OpenSSL... We need to pull
195
# in the dependency libs explicitly here since we're
196
# not using libtool for the configure test.
197
if test -f $with_sunldap/lib/libldap.la; then
198
LDAP_LIBS="`. $with_sunldap/lib/libldap.la; echo $dependency_libs` $LDAP_LIBS"
201
LDAP_LIBS="-llber $LDAP_LIBS"
202
fi], LDAP_LIBS="", $LDAP_LDFLAGS $LDAP_LIBS)
204
LDAP_LIBS="$LDAP_LDFLAGS $LDAP_LIBS"
205
], LDAP_LIBS="", $LDAP_LDFLAGS $LDAP_LIBS)
207
if test -z "$LDAP_LIBS"; then
208
AC_MSG_ERROR(could not find SunLDAP libraries)
211
AC_SUBST(LDAP_CFLAGS)
214
AM_CONDITIONAL(ENABLE_LDAP, test $with_sunldap != no)
218
AC_DEFUN([EVO_PTHREAD_CHECK],[
220
AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
221
[AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
222
[AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
223
[AC_CHECK_LIB(pthread, __pthread_attr_init_system, PTHREAD_LIB="-lpthread",
224
[AC_CHECK_FUNC(pthread_create)]
229
AC_SUBST(PTHREAD_LIB)
230
AC_PROVIDE([EVO_PTHREAD_CHECK])
232
dnl -*- mode: autoconf -*-
237
dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
238
AC_DEFUN([GTK_DOC_CHECK],
14
dnl AM_PATH_ORBIT2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
15
dnl Test for ORBit2, and define ORBIT_CFLAGS and ORBIT_LIBS
17
AC_DEFUN([AM_PATH_ORBIT2],
19
dnl Get the cflags and libraries from the orbit2-config script
21
AC_ARG_WITH(orbit-prefix,[ --with-orbit-prefix=PFX Prefix where ORBIT is installed (optional)],
22
orbit_config_prefix="$withval", orbit_config_prefix="")
23
AC_ARG_WITH(orbit-exec-prefix,[ --with-orbit-exec-prefix=PFX Exec prefix where ORBIT is installed (optional)],
24
orbit_config_exec_prefix="$withval", orbit_config_exec_prefix="")
25
AC_ARG_ENABLE(orbittest, [ --disable-orbittest Do not try to compile and run a test ORBIT program],
26
, enable_orbittest=yes)
32
orbit_config_args="$orbit_config_args server"
35
orbit_config_args="$orbit_config_args client"
39
if test x$orbit_config_args = x ; then
40
orbit_config_args=server
43
if test x$orbit_config_exec_prefix != x ; then
44
orbit_config_args="$orbit_config_args --exec-prefix=$orbit_config_exec_prefix"
45
if test x${ORBIT_CONFIG+set} != xset ; then
46
ORBIT_CONFIG=$orbit_config_exec_prefix/bin/orbit2-config
49
if test x$orbit_config_prefix != x ; then
50
orbit_config_args="$orbit_config_args --prefix=$orbit_config_prefix"
51
if test x${ORBIT_CONFIG+set} != xset ; then
52
ORBIT_CONFIG=$orbit_config_prefix/bin/orbit2-config
56
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
57
AC_PATH_PROG(ORBIT_CONFIG, orbit2-config, no)
58
min_orbit_version=ifelse([$1], , 2.3.0, $1)
59
AC_MSG_CHECKING(for ORBit - version >= $min_orbit_version)
61
if test "$ORBIT_CONFIG" = "no" ; then
62
if test "$PKG_CONFIG" = "no" ; then
65
ORBIT_CFLAGS=`$PKG_CONFIG --cflags ORBit-2.0`
66
ORBIT_LIBS=`$PKG_CONFIG --libs ORBit-2.0`
69
ORBIT_CFLAGS=`$ORBIT_CONFIG $orbit_config_args --cflags`
70
ORBIT_LIBS=`$ORBIT_CONFIG $orbit_config_args --libs`
73
if test "x$no_orbit" = x ; then
74
ORBIT_VERSION=`$PKG_CONFIG --modversion ORBit-2.0`
76
orbit_config_major_version=`echo $ORBIT_VERSION | \
77
sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
78
orbit_config_minor_version=`echo $ORBIT_VERSION | \
79
sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
80
orbit_config_micro_version=`echo $ORBIT_VERSION | \
81
sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
82
if test "x$enable_orbittest" = "xyes" ; then
83
ac_save_CFLAGS="$CFLAGS"
85
CFLAGS="$CFLAGS $ORBIT_CFLAGS"
86
LIBS="$ORBIT_LIBS $LIBS"
88
dnl Now check if the installed ORBIT is sufficiently new. (Also sanity
89
dnl checks the results of orbit2-config to some extent
93
#include <orbit/orbit.h>
100
int major, minor, micro;
103
system ("touch conf.orbittest");
105
/* HP/UX 9 (%@#!) writes to sscanf strings */
106
tmp_version = g_strdup("$min_orbit_version");
107
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
108
printf("%s, bad version string\n", "$min_orbit_version");
112
if ((orbit_major_version != $orbit_config_major_version) ||
113
(orbit_minor_version != $orbit_config_minor_version) ||
114
(orbit_micro_version != $orbit_config_micro_version))
116
printf("\n*** 'pkg-config --version ORBit-2.0' returned %d.%d.%d, but ORBit (%d.%d.%d)\n",
117
$orbit_config_major_version, $orbit_config_minor_version, $orbit_config_micro_version,
118
orbit_major_version, orbit_minor_version, orbit_micro_version);
119
printf ("*** was found! If orbit2-config was correct, then it is best\n");
120
printf ("*** to remove the old version of ORBit. You may also be able to fix the error\n");
121
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
122
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
123
printf("*** required on your system.\n");
124
printf("*** If orbit2-config was wrong, set the environment variable ORBIT_CONFIG\n");
125
printf("*** to point to the correct copy of orbit2-config, and remove the file config.cache\n");
126
printf("*** before re-running configure\n");
128
#if defined (ORBIT_MAJOR_VERSION) && defined (ORBIT_MINOR_VERSION) && defined (ORBIT_MICRO_VERSION)
129
else if ((orbit_major_version != ORBIT_MAJOR_VERSION) ||
130
(orbit_minor_version != ORBIT_MINOR_VERSION) ||
131
(orbit_micro_version != ORBIT_MICRO_VERSION))
133
printf("*** ORBit header files (version %d.%d.%d) do not match\n",
134
ORBIT_MAJOR_VERSION, ORBIT_MINOR_VERSION, ORBIT_MICRO_VERSION);
135
printf("*** library (version %d.%d.%d)\n",
136
orbit_major_version, orbit_minor_version, orbit_micro_version);
138
#endif /* defined (ORBIT_MAJOR_VERSION) ... */
141
if ((orbit_major_version > major) ||
142
((orbit_major_version == major) && (orbit_minor_version > minor)) ||
143
((orbit_major_version == major) && (orbit_minor_version == minor) && (orbit_micro_version >= micro)))
149
printf("\n*** An old version of ORBit (%d.%d.%d) was found.\n",
150
orbit_major_version, orbit_minor_version, orbit_micro_version);
151
printf("*** You need a version of ORBit newer than %d.%d.%d. The latest version of\n",
152
major, minor, micro);
153
printf("*** ORBit is always available from ftp://ftp.orbit.org.\n");
155
printf("*** If you have already installed a sufficiently new version, this error\n");
156
printf("*** probably means that the wrong copy of the orbit2-config shell script is\n");
157
printf("*** being found. The easiest way to fix this is to remove the old version\n");
158
printf("*** of ORBit, but you can also set the ORBIT_CONFIG environment to point to the\n");
159
printf("*** correct copy of orbit2-config. (In this case, you will have to\n");
160
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
161
printf("*** so that the correct libraries are found at run-time))\n");
166
],, no_orbit=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
167
CFLAGS="$ac_save_CFLAGS"
171
if test "x$no_orbit" = x ; then
173
ifelse([$2], , :, [$2])
176
if test "$ORBIT_CONFIG" = "no" ; then
177
echo "*** The orbit2-config script installed by ORBIT could not be found"
178
echo "*** If ORBit was installed in PREFIX, make sure PREFIX/bin is in"
179
echo "*** your path, or set the ORBIT_CONFIG environment variable to the"
180
echo "*** full path to orbit2-config."
182
if test -f conf.orbittest ; then
185
echo "*** Could not run ORBIT test program, checking why..."
186
CFLAGS="$CFLAGS $ORBIT_CFLAGS"
187
LIBS="$LIBS $ORBIT_LIBS"
189
#include <orbit/orbit.h>
191
], [ return ((orbit_major_version) || (orbit_minor_version) || (orbit_micro_version)); ],
192
[ echo "*** The test program compiled, but did not run. This usually means"
193
echo "*** that the run-time linker is not finding ORBit or finding the wrong"
194
echo "*** version of ORBit. If it is not finding ORBit, you'll need to set your"
195
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
196
echo "*** to the installed location Also, make sure you have run ldconfig if that"
197
echo "*** is required on your system"
199
echo "*** If you have an old version installed, it is best to remove it, although"
200
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
202
echo "*** If you have a RedHat 5.0 system, you should remove the ORBit package that"
203
echo "*** came with the system with the command"
205
echo "*** rpm --erase --nodeps orbit orbit-devel" ],
206
[ echo "*** The test program failed to compile or link. See the file config.log for the"
207
echo "*** exact error that occured. This usually means ORBIT was incorrectly installed"
208
echo "*** or that you have moved ORBit since it was installed. In the latter case, you"
209
echo "*** may want to edit the orbit2-config script: $ORBIT_CONFIG" ])
210
CFLAGS="$ac_save_CFLAGS"
216
ifelse([$3], , :, [$3])
219
AC_PATH_PROG(ORBIT_IDL, orbit-idl-2, ifelse([$3], , :, [$3]))
220
AC_SUBST(ORBIT_CFLAGS)
226
dnl AM_GCONF_SOURCE_2
227
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
228
dnl (i.e. pass to gconftool-2
229
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
230
dnl you should install foo.schemas files
233
AC_DEFUN([AM_GCONF_SOURCE_2],
240
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
241
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
242
dnl for overriding the documentation installation directory
243
AC_ARG_WITH(html-dir,
244
AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
245
[with_html_dir='${datadir}/gtk-doc/html'])
246
HTML_DIR="$with_html_dir"
249
dnl enable/disable documentation building
250
AC_ARG_ENABLE(gtk-doc,
251
AC_HELP_STRING([--enable-gtk-doc],
252
[use gtk-doc to build documentation [default=no]]),,
256
if test -z "$PKG_CONFIG"; then
257
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
259
if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then
263
dnl do we want to do a version check?
265
[gtk_doc_min_version=$1
266
if test "$have_gtk_doc" = yes; then
267
AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
268
if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then
276
if test x$enable_gtk_doc = xyes; then
277
if test "$have_gtk_doc" != yes; then
282
AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
283
AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL")
286
# AM_CONDITIONAL -*- Autoconf -*-
288
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
290
# This program is free software; you can redistribute it and/or modify
291
# it under the terms of the GNU General Public License as published by
292
# the Free Software Foundation; either version 2, or (at your option)
295
# This program is distributed in the hope that it will be useful,
296
# but WITHOUT ANY WARRANTY; without even the implied warranty of
297
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
298
# GNU General Public License for more details.
300
# You should have received a copy of the GNU General Public License
301
# along with this program; if not, write to the Free Software
302
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
309
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
310
# -------------------------------------
311
# Define a conditional.
312
AC_DEFUN([AM_CONDITIONAL],
313
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
314
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
324
AC_CONFIG_COMMANDS_PRE(
325
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
326
AC_MSG_ERROR([conditional "$1" was never defined.
327
Usually this means the macro was only invoked conditionally.])
235
if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
236
GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
238
GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
241
AC_ARG_WITH(gconf-source,
242
[ --with-gconf-source=sourceaddress Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",)
244
AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
245
AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
247
if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
248
GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
251
AC_ARG_WITH(gconf-schema-file-dir,
252
[ --with-gconf-schema-file-dir=dir Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",)
254
AC_SUBST(GCONF_SCHEMA_FILE_DIR)
255
AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
257
AC_ARG_ENABLE(schemas-install,
258
[ --disable-schemas-install Disable the schemas installation],
259
[case ${enableval} in
261
*) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;;
263
AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
266
# Configure paths for GLIB
267
# Owen Taylor 1997-2001
269
dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
270
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or
271
dnl gthread is specified in MODULES, pass to pkg-config
273
AC_DEFUN([AM_PATH_GLIB_2_0],
275
dnl Get the cflags and libraries from pkg-config
277
AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
278
, enable_glibtest=yes)
280
pkg_config_args=glib-2.0
285
pkg_config_args="$pkg_config_args gmodule-2.0"
288
pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
291
pkg_config_args="$pkg_config_args gobject-2.0"
294
pkg_config_args="$pkg_config_args gthread-2.0"
299
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
303
if test x$PKG_CONFIG != xno ; then
304
if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
307
echo *** pkg-config too old; version 0.7 or better required.
315
min_glib_version=ifelse([$1], ,2.0.0,$1)
316
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
318
if test x$PKG_CONFIG != xno ; then
319
## don't try to run the test against uninstalled libtool libs
320
if $PKG_CONFIG --uninstalled $pkg_config_args; then
321
echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
325
if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
332
if test x"$no_glib" = x ; then
333
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
334
GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
335
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
337
GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
338
GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
339
glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
340
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
341
glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
342
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
343
glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
344
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
345
if test "x$enable_glibtest" = "xyes" ; then
346
ac_save_CFLAGS="$CFLAGS"
348
CFLAGS="$CFLAGS $GLIB_CFLAGS"
349
LIBS="$GLIB_LIBS $LIBS"
351
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
352
dnl checks the results of pkg-config to some extent)
363
int major, minor, micro;
366
system ("touch conf.glibtest");
368
/* HP/UX 9 (%@#!) writes to sscanf strings */
369
tmp_version = g_strdup("$min_glib_version");
370
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
371
printf("%s, bad version string\n", "$min_glib_version");
375
if ((glib_major_version != $glib_config_major_version) ||
376
(glib_minor_version != $glib_config_minor_version) ||
377
(glib_micro_version != $glib_config_micro_version))
379
printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
380
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
381
glib_major_version, glib_minor_version, glib_micro_version);
382
printf ("*** was found! If pkg-config was correct, then it is best\n");
383
printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
384
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
385
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
386
printf("*** required on your system.\n");
387
printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
388
printf("*** to point to the correct configuration files\n");
390
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
391
(glib_minor_version != GLIB_MINOR_VERSION) ||
392
(glib_micro_version != GLIB_MICRO_VERSION))
394
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
395
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
396
printf("*** library (version %d.%d.%d)\n",
397
glib_major_version, glib_minor_version, glib_micro_version);
401
if ((glib_major_version > major) ||
402
((glib_major_version == major) && (glib_minor_version > minor)) ||
403
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
409
printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
410
glib_major_version, glib_minor_version, glib_micro_version);
411
printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
412
major, minor, micro);
413
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
415
printf("*** If you have already installed a sufficiently new version, this error\n");
416
printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
417
printf("*** being found. The easiest way to fix this is to remove the old version\n");
418
printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
419
printf("*** correct copy of pkg-config. (In this case, you will have to\n");
420
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
421
printf("*** so that the correct libraries are found at run-time))\n");
426
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
427
CFLAGS="$ac_save_CFLAGS"
431
if test "x$no_glib" = x ; then
432
AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
433
ifelse([$2], , :, [$2])
436
if test "$PKG_CONFIG" = "no" ; then
437
echo "*** A new enough version of pkg-config was not found."
438
echo "*** See http://www.freedesktop.org/software/pkgconfig/"
440
if test -f conf.glibtest ; then
443
echo "*** Could not run GLIB test program, checking why..."
444
ac_save_CFLAGS="$CFLAGS"
446
CFLAGS="$CFLAGS $GLIB_CFLAGS"
447
LIBS="$LIBS $GLIB_LIBS"
451
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
452
[ echo "*** The test program compiled, but did not run. This usually means"
453
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
454
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
455
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
456
echo "*** to the installed location Also, make sure you have run ldconfig if that"
457
echo "*** is required on your system"
459
echo "*** If you have an old version installed, it is best to remove it, although"
460
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
461
[ echo "*** The test program failed to compile or link. See the file config.log for the"
462
echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
463
CFLAGS="$ac_save_CFLAGS"
472
ifelse([$3], , :, [$3])
474
AC_SUBST(GLIB_CFLAGS)
476
AC_SUBST(GLIB_GENMARSHAL)
477
AC_SUBST(GOBJECT_QUERY)
478
AC_SUBST(GLIB_MKENUMS)
482
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
483
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
485
# This file is free software, distributed under the terms of the GNU
486
# General Public License. As a special exception to the GNU General
487
# Public License, this file may be distributed as part of a program
488
# that contains a configuration script generated by Autoconf, under
489
# the same distribution terms as the rest of that program.
491
# This file can be copied and used freely without restrictions. It can
492
# be used in projects which are not available under the GNU Public License
493
# but which still want to provide support for the GNU gettext functionality.
495
# Macro to add for using GNU gettext.
496
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
498
# Modified to never use included libintl.
499
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
501
# Major rework to remove unused code
502
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
504
# Added better handling of ALL_LINGUAS from GNU gettext version
505
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
507
# Modified to require ngettext
508
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
510
# We need this here as well, since someone might use autoconf-2.5x
511
# to configure GLib then an older version to configure a package
512
# using AM_GLIB_GNU_GETTEXT
516
dnl We go to great lengths to make sure that aclocal won't
517
dnl try to pull in the installed version of these macros
518
dnl when running aclocal in the glib directory.
520
m4_copy([AC_DEFUN],[glib_DEFUN])
521
m4_copy([AC_REQUIRE],[glib_REQUIRE])
523
dnl At the end, if we're not within glib, we'll define the public
524
dnl definitions in terms of our private definitions.
528
#--------------------
529
glib_DEFUN([GLIB_LC_MESSAGES],
530
[AC_CHECK_HEADERS([locale.h])
531
if test $ac_cv_header_locale_h = yes; then
532
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
533
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
534
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
535
if test $am_cv_val_LC_MESSAGES = yes; then
536
AC_DEFINE(HAVE_LC_MESSAGES, 1,
537
[Define if your <locale.h> file defines LC_MESSAGES.])
541
# GLIB_PATH_PROG_WITH_TEST
542
#----------------------------
543
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
544
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
545
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
546
[# Extract the first word of "$2", so it can be a program name with args.
547
set dummy $2; ac_word=[$]2
548
AC_MSG_CHECKING([for $ac_word])
549
AC_CACHE_VAL(ac_cv_path_$1,
552
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
555
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
556
for ac_dir in ifelse([$5], , $PATH, [$5]); do
557
test -z "$ac_dir" && ac_dir=.
558
if test -f $ac_dir/$ac_word; then
560
ac_cv_path_$1="$ac_dir/$ac_word"
566
dnl If no 4th arg is given, leave the cache variable unset,
567
dnl so AC_PATH_PROGS will keep looking.
568
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
573
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
583
glib_DEFUN([GLIB_WITH_NLS],
584
dnl NLS is obligatory
588
gt_cv_have_gettext=no
594
AC_CHECK_HEADER(libintl.h,
595
[gt_cv_func_dgettext_libintl="no"
596
libintl_extra_libs=""
599
# First check in libc
601
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
605
[return !ngettext ("","", 1)],
606
gt_cv_func_ngettext_libc=yes,
607
gt_cv_func_ngettext_libc=no)
610
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
611
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
615
[return !dgettext ("","")],
616
gt_cv_func_dgettext_libc=yes,
617
gt_cv_func_dgettext_libc=no)
621
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
622
AC_CHECK_FUNCS(bind_textdomain_codeset)
626
# If we don't have everything we want, check in libintl
628
if test "$gt_cv_func_dgettext_libc" != "yes" \
629
|| test "$gt_cv_func_ngettext_libc" != "yes" \
630
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
632
AC_CHECK_LIB(intl, bindtextdomain,
633
[AC_CHECK_LIB(intl, ngettext,
634
[AC_CHECK_LIB(intl, dgettext,
635
gt_cv_func_dgettext_libintl=yes)])])
637
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
638
AC_MSG_CHECKING([if -liconv is needed to use gettext])
640
AC_CHECK_LIB(intl, ngettext,
641
[AC_CHECK_LIB(intl, dcgettext,
642
[gt_cv_func_dgettext_libintl=yes
643
libintl_extra_libs=-liconv],
649
# If we found libintl, then check in it for bind_textdomain_codeset();
650
# we'll prefer libc if neither have bind_textdomain_codeset(),
651
# and both have dgettext and ngettext
653
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
654
glib_save_LIBS="$LIBS"
655
LIBS="$LIBS -lintl $libintl_extra_libs"
656
unset ac_cv_func_bind_textdomain_codeset
657
AC_CHECK_FUNCS(bind_textdomain_codeset)
658
LIBS="$glib_save_LIBS"
660
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
661
gt_cv_func_dgettext_libc=no
663
if test "$gt_cv_func_dgettext_libc" = "yes" \
664
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
665
gt_cv_func_dgettext_libintl=no
671
if test "$gt_cv_func_dgettext_libc" = "yes" \
672
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
673
gt_cv_have_gettext=yes
676
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
677
INTLLIBS="-lintl $libintl_extra_libs"
680
if test "$gt_cv_have_gettext" = "yes"; then
681
AC_DEFINE(HAVE_GETTEXT,1,
682
[Define if the GNU gettext() function is already present or preinstalled.])
683
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
684
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
685
if test "$MSGFMT" != "no"; then
686
glib_save_LIBS="$LIBS"
687
LIBS="$LIBS $INTLLIBS"
688
AC_CHECK_FUNCS(dcgettext)
689
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
690
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
691
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
692
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
693
return _nl_msg_cat_cntr],
698
dnl On Solaris, if bind_textdomain_codeset is in libc,
699
dnl GNU format message catalog is always supported,
700
dnl since both are added to the libc all together.
701
dnl Hence, we'd like to go with DATADIRNAME=share and
702
dnl and CATOBJEXT=.gmo in this case.
703
AC_CHECK_FUNC(bind_textdomain_codeset,
714
LIBS="$glib_save_LIBS"
717
gt_cv_have_gettext=no
722
if test "$gt_cv_have_gettext" = "yes" ; then
723
AC_DEFINE(ENABLE_NLS, 1,
724
[always defined to indicate that i18n is enabled])
727
dnl Test whether we really found GNU xgettext.
728
if test "$XGETTEXT" != ":"; then
729
dnl If it is not GNU xgettext we define it as : so that the
730
dnl Makefiles still can work.
731
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
735
[found xgettext program is not GNU xgettext; ignore it])
740
# We need to process the po/ directory.
744
[case "$CONFIG_FILES" in *po/Makefile.in*)
745
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
748
dnl These rules are solely for the distribution goal. While doing this
749
dnl we only have to keep exactly one list of the available catalogs
751
for lang in $ALL_LINGUAS; do
752
GMOFILES="$GMOFILES $lang.gmo"
753
POFILES="$POFILES $lang.po"
756
dnl Make all variables we use known to autoconf.
759
AC_SUBST(DATADIRNAME)
763
AC_SUBST(PO_IN_DATADIR_TRUE)
764
AC_SUBST(PO_IN_DATADIR_FALSE)
769
# AM_GLIB_GNU_GETTEXT
770
# -------------------
771
# Do checks necessary for use of gettext. If a suitable implementation
772
# of gettext is found in either in libintl or in the C library,
773
# it will set INTLLIBS to the libraries needed for use of gettext
774
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
775
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
776
# on various variables needed by the Makefile.in.in installed by
779
glib_DEFUN([GLIB_GNU_GETTEXT],
780
[AC_REQUIRE([AC_PROG_CC])dnl
781
AC_REQUIRE([AC_HEADER_STDC])dnl
786
if test "$gt_cv_have_gettext" = "yes"; then
787
if test "x$ALL_LINGUAS" = "x"; then
790
AC_MSG_CHECKING(for catalogs to be installed)
792
for presentlang in $ALL_LINGUAS; do
794
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
795
desiredlanguages="$LINGUAS"
797
desiredlanguages="$ALL_LINGUAS"
799
for desiredlang in $desiredlanguages; do
800
# Use the presentlang catalog if desiredlang is
801
# a. equal to presentlang, or
802
# b. a variant of presentlang (because in this case,
803
# presentlang can be used as a fallback for messages
804
# which are not translated in the desiredlang catalog).
805
case "$desiredlang" in
806
"$presentlang"*) useit=yes;;
809
if test $useit = yes; then
810
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
814
AC_MSG_RESULT($LINGUAS)
817
dnl Construct list of names of catalog files to be constructed.
818
if test -n "$LINGUAS"; then
819
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
823
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
824
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
825
dnl Try to locate is.
827
if test -n "$ac_aux_dir"; then
828
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
830
if test -z "$MKINSTALLDIRS"; then
831
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
833
AC_SUBST(MKINSTALLDIRS)
835
dnl Generate list of files to be processed by xgettext which will
836
dnl be included in po/Makefile.
837
test -d po || mkdir po
838
if test "x$srcdir" != "x."; then
839
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
840
posrcprefix="$srcdir/"
842
posrcprefix="../$srcdir/"
848
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
849
< $srcdir/po/POTFILES.in > po/POTFILES
852
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
853
# -------------------------------
854
# Define VARIABLE to the location where catalog files will
855
# be installed by po/Makefile.
856
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
857
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
858
glib_save_prefix="$prefix"
859
glib_save_exec_prefix="$exec_prefix"
860
test "x$prefix" = xNONE && prefix=$ac_default_prefix
861
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
862
if test "x$CATOBJEXT" = "x.mo" ; then
863
localedir=`eval echo "${libdir}/locale"`
865
localedir=`eval echo "${datadir}/locale"`
867
prefix="$glib_save_prefix"
868
exec_prefix="$glib_save_exec_prefix"
869
AC_DEFINE_UNQUOTED($1, "$localedir",
870
[Define the location where the catalogs will be installed])
874
dnl Now the definitions that aclocal will find
876
ifdef(glib_configure_in,[],[
877
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
878
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
881
dnl GNOME_COMPILE_WARNINGS
882
dnl Turn on many useful compiler warnings
883
dnl For now, only works on GCC
884
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
885
dnl ******************************
886
dnl More compiler warnings
887
dnl ******************************
889
AC_ARG_ENABLE(compile-warnings,
890
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
891
[Turn on compiler warnings]),,
892
[enable_compile_warnings="m4_default([$1],[yes])"])
895
if test "x$GCC" != xyes; then
896
enable_compile_warnings=no
900
realsave_CFLAGS="$CFLAGS"
902
case "$enable_compile_warnings" in
907
warning_flags="-Wall"
910
warning_flags="-Wall -Wmissing-prototypes"
913
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
914
CFLAGS="$warning_flags $CFLAGS"
915
for option in -Wno-sign-compare; do
916
SAVE_CFLAGS="$CFLAGS"
917
CFLAGS="$CFLAGS $option"
918
AC_MSG_CHECKING([whether gcc understands $option])
919
AC_TRY_COMPILE([], [],
922
CFLAGS="$SAVE_CFLAGS"
923
AC_MSG_RESULT($has_option)
924
if test $has_option = yes; then
925
warning_flags="$warning_flags $option"
931
if test "$enable_compile_warnings" = "error" ; then
932
warning_flags="$warning_flags -Werror"
936
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
939
CFLAGS="$realsave_CFLAGS"
940
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
941
AC_MSG_RESULT($warning_flags)
944
AC_HELP_STRING([--enable-iso-c],
945
[Try to warn if code is not ISO C ]),,
948
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
950
if test "x$enable_iso_c" != "xno"; then
951
if test "x$GCC" = "xyes"; then
953
*[\ \ ]-ansi[\ \ ]*) ;;
954
*) complCFLAGS="$complCFLAGS -ansi" ;;
957
*[\ \ ]-pedantic[\ \ ]*) ;;
958
*) complCFLAGS="$complCFLAGS -pedantic" ;;
962
AC_MSG_RESULT($complCFLAGS)
964
WARN_CFLAGS="$warning_flags $complCFLAGS"
965
AC_SUBST(WARN_CFLAGS)
968
dnl For C++, do basically the same thing.
970
AC_DEFUN([GNOME_CXX_WARNINGS],[
971
AC_ARG_ENABLE(cxx-warnings,
972
AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
973
[Turn on compiler warnings.]),,
974
[enable_cxx_warnings="m4_default([$1],[minimum])"])
976
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
978
if test "x$GCC" != xyes; then
979
enable_compile_warnings=no
981
if test "x$enable_cxx_warnings" != "xno"; then
982
if test "x$GCC" = "xyes"; then
983
case " $CXXFLAGS " in
984
*[\ \ ]-Wall[\ \ ]*) ;;
985
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
988
## -W is not all that useful. And it cannot be controlled
989
## with individual -Wno-xxx flags, unlike -Wall
990
if test "x$enable_cxx_warnings" = "xyes"; then
991
warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
995
AC_MSG_RESULT($warnCXXFLAGS)
997
AC_ARG_ENABLE(iso-cxx,
998
AC_HELP_STRING([--enable-iso-cxx],
999
[Try to warn if code is not ISO C++ ]),,
1000
[enable_iso_cxx=no])
1002
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
1004
if test "x$enable_iso_cxx" != "xno"; then
1005
if test "x$GCC" = "xyes"; then
1006
case " $CXXFLAGS " in
1007
*[\ \ ]-ansi[\ \ ]*) ;;
1008
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
1011
case " $CXXFLAGS " in
1012
*[\ \ ]-pedantic[\ \ ]*) ;;
1013
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
1017
AC_MSG_RESULT($complCXXFLAGS)
1019
WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
1020
AC_SUBST(WARN_CXXFLAGS)
1024
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
1025
# serial 35 IT_PROG_INTLTOOL
1026
AC_DEFUN([IT_PROG_INTLTOOL],
1027
[AC_PREREQ([2.50])dnl
1029
case "$am__api_version" in
1031
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
1037
if test -n "$1"; then
1038
AC_MSG_CHECKING(for intltool >= $1)
1040
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1041
INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
1042
[INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
1044
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
1045
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
1046
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
1049
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1050
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1051
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1052
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1053
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
1054
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1055
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1056
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1057
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1058
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1059
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1060
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
1061
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1062
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1063
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1064
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1065
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1066
INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1068
AC_SUBST(INTLTOOL_DESKTOP_RULE)
1069
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
1070
AC_SUBST(INTLTOOL_KEYS_RULE)
1071
AC_SUBST(INTLTOOL_PROP_RULE)
1072
AC_SUBST(INTLTOOL_OAF_RULE)
1073
AC_SUBST(INTLTOOL_PONG_RULE)
1074
AC_SUBST(INTLTOOL_SERVER_RULE)
1075
AC_SUBST(INTLTOOL_SHEET_RULE)
1076
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
1077
AC_SUBST(INTLTOOL_UI_RULE)
1078
AC_SUBST(INTLTOOL_XAM_RULE)
1079
AC_SUBST(INTLTOOL_KBD_RULE)
1080
AC_SUBST(INTLTOOL_XML_RULE)
1081
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
1082
AC_SUBST(INTLTOOL_CAVES_RULE)
1083
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
1084
AC_SUBST(INTLTOOL_THEME_RULE)
1085
AC_SUBST(INTLTOOL_SERVICE_RULE)
1087
# Use the tools built into the package, not the ones that are installed.
1088
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
1089
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
1090
AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
1092
AC_PATH_PROG(INTLTOOL_PERL, perl)
1093
if test -z "$INTLTOOL_PERL"; then
1094
AC_MSG_ERROR([perl not found; required for intltool])
1096
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
1097
AC_MSG_ERROR([perl 5.x required for intltool])
1099
if test "x$2" != "xno-xml"; then
1100
AC_MSG_CHECKING([for XML::Parser])
1101
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
1104
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1108
AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
1109
AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
1110
AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
1111
AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
1113
# Substitute ALL_LINGUAS so we can use it in po/Makefile
1114
AC_SUBST(ALL_LINGUAS)
1118
dnl The following is very similar to
1120
dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
1122
dnl with the following slight differences:
1123
dnl - the *.in files are in ac_aux_dir,
1124
dnl - if the file haven't changed upon reconfigure, it's not touched,
1125
dnl - the evaluation of the third parameter enables a hack which computes
1126
dnl the actual value of $libdir,
1127
dnl - the user sees "executing intltool commands", instead of
1128
dnl "creating intltool-extract" and such.
1130
dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
1131
dnl a reason for it.
1133
AC_CONFIG_COMMANDS([intltool], [
1135
for file in intltool-extract intltool-merge intltool-update; do
1136
sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
1137
-e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
1138
-e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
1139
-e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
1140
-e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
1141
-e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
1142
-e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
1143
< ${ac_aux_dir}/${file}.in > ${file}.out
1144
if cmp -s ${file} ${file}.out 2>/dev/null; then
1147
mv -f ${file}.out ${file}
1154
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
1155
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
1156
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
1157
INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
1158
INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
1163
# IT_PO_SUBDIR(DIRNAME)
1164
# ---------------------
1165
# All po subdirs have to be declared with this macro; the subdir "po" is
1166
# declared by IT_PROG_INTLTOOL.
1168
AC_DEFUN([IT_PO_SUBDIR],
1169
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1171
dnl The following CONFIG_COMMANDS should be exetuted at the very end
1172
dnl of config.status.
1173
AC_CONFIG_COMMANDS_PRE([
1174
AC_CONFIG_COMMANDS([$1/stamp-it], [
1175
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1180
'"s|^| $ac_top_srcdir/|" \
1181
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1183
if test ! -f "$1/Makefile"; then
1184
AC_MSG_ERROR([$1/Makefile is not ready.])
1186
mv "$1/Makefile" "$1/Makefile.tmp"
1187
[sed '/^POTFILES =/,/[^\\]$/ {
1191
' "$1/Makefile.tmp" >"$1/Makefile"]
1192
rm -f "$1/Makefile.tmp"
1193
mv "$1/stamp-it.tmp" "$1/stamp-it"
1200
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1201
# A hint is needed for aclocal from Automake <= 1.9.4:
1202
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
330
1205
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
332
# serial 48 AC_PROG_LIBTOOL
1207
# serial 47 AC_PROG_LIBTOOL
335
1210
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
6721
7362
AC_MSG_RESULT([$SED])
6724
# Do all the work for Automake. -*- Autoconf -*-
6726
# This macro actually does too much some checks are only needed if
6727
# your package does certain things. But this isn't really a big deal.
6729
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
6730
# Free Software Foundation, Inc.
6732
# This program is free software; you can redistribute it and/or modify
6733
# it under the terms of the GNU General Public License as published by
6734
# the Free Software Foundation; either version 2, or (at your option)
6735
# any later version.
6737
# This program is distributed in the hope that it will be useful,
6738
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6739
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6740
# GNU General Public License for more details.
6742
# You should have received a copy of the GNU General Public License
6743
# along with this program; if not, write to the Free Software
6744
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6751
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
6752
# the ones we care about.
6753
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
6755
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
6756
# AM_INIT_AUTOMAKE([OPTIONS])
6757
# -----------------------------------------------
6758
# The call with PACKAGE and VERSION arguments is the old style
6759
# call (pre autoconf-2.50), which is being phased out. PACKAGE
6760
# and VERSION should now be passed to AC_INIT and removed from
6761
# the call to AM_INIT_AUTOMAKE.
6762
# We support both call styles for the transition. After
6763
# the next Automake release, Autoconf can make the AC_INIT
6764
# arguments mandatory, and then we can depend on a new Autoconf
6765
# release and drop the old call support.
6766
AC_DEFUN([AM_INIT_AUTOMAKE],
6767
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
6768
AC_REQUIRE([AC_PROG_INSTALL])dnl
6769
# test to see if srcdir already configured
6770
if test "`cd $srcdir && pwd`" != "`pwd`" &&
6771
test -f $srcdir/config.status; then
6772
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
6775
# test whether we have cygpath
6776
if test -z "$CYGPATH_W"; then
6777
if (cygpath --version) >/dev/null 2>/dev/null; then
6778
CYGPATH_W='cygpath -w'
6783
AC_SUBST([CYGPATH_W])
6785
# Define the identity of the package.
6786
dnl Distinguish between old-style and new-style calls.
6788
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
6789
AC_SUBST([PACKAGE], [$1])dnl
6790
AC_SUBST([VERSION], [$2])],
6791
[_AM_SET_OPTIONS([$1])dnl
6792
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
6793
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
6795
_AM_IF_OPTION([no-define],,
6796
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
6797
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
6799
# Some tools Automake needs.
6800
AC_REQUIRE([AM_SANITY_CHECK])dnl
6801
AC_REQUIRE([AC_ARG_PROGRAM])dnl
6802
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
6803
AM_MISSING_PROG(AUTOCONF, autoconf)
6804
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
6805
AM_MISSING_PROG(AUTOHEADER, autoheader)
6806
AM_MISSING_PROG(MAKEINFO, makeinfo)
6807
AM_MISSING_PROG(AMTAR, tar)
6809
AM_PROG_INSTALL_STRIP
6810
# We need awk for the "check" target. The system "awk" is bad on
6812
AC_REQUIRE([AC_PROG_AWK])dnl
6813
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
6814
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6816
_AM_IF_OPTION([no-dependencies],,
6817
[AC_PROVIDE_IFELSE([AC_PROG_CC],
6818
[_AM_DEPENDENCIES(CC)],
6819
[define([AC_PROG_CC],
6820
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
6821
AC_PROVIDE_IFELSE([AC_PROG_CXX],
6822
[_AM_DEPENDENCIES(CXX)],
6823
[define([AC_PROG_CXX],
6824
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
6829
# When config.status generates a header, we must update the stamp-h file.
6830
# This file resides in the same directory as the config header
6831
# that is generated. The stamp files are numbered to have different names.
6833
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6834
# loop where config.status creates the headers, so we can generate
6835
# our stamp files there.
6836
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6837
[# Compute $1's index in $config_headers.
6839
for _am_header in $config_headers :; do
6844
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
6847
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
6849
# Copyright 2002 Free Software Foundation, Inc.
6851
# This program is free software; you can redistribute it and/or modify
6852
# it under the terms of the GNU General Public License as published by
6853
# the Free Software Foundation; either version 2, or (at your option)
6854
# any later version.
6856
# This program is distributed in the hope that it will be useful,
6857
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6858
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6859
# GNU General Public License for more details.
6861
# You should have received a copy of the GNU General Public License
6862
# along with this program; if not, write to the Free Software
6863
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7365
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
7367
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7369
# This program is free software; you can redistribute it and/or modify
7370
# it under the terms of the GNU General Public License as published by
7371
# the Free Software Foundation; either version 2 of the License, or
7372
# (at your option) any later version.
7374
# This program is distributed in the hope that it will be useful, but
7375
# WITHOUT ANY WARRANTY; without even the implied warranty of
7376
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7377
# General Public License for more details.
7379
# You should have received a copy of the GNU General Public License
7380
# along with this program; if not, write to the Free Software
7381
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7383
# As a special exception to the GNU General Public License, if you
7384
# distribute this file as part of a program that contains a
7385
# configuration script generated by Autoconf, you may include it under
7386
# the same distribution terms that you use for the rest of that program.
7388
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
7389
# ----------------------------------
7390
AC_DEFUN([PKG_PROG_PKG_CONFIG],
7391
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
7392
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
7393
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
7394
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7395
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
7397
if test -n "$PKG_CONFIG"; then
7398
_pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
7399
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
7400
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7401
AC_MSG_RESULT([yes])
7408
])# PKG_PROG_PKG_CONFIG
7410
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
7411
# ---------------------------------------------
7412
m4_define([_PKG_CONFIG],
7413
[if test "x$ac_cv_env_[]$1[]_set" = "xset"; then
7414
pkg_cv_[]$1=$ac_cv_env_[]$1[]_value
7415
elif test -n "$PKG_CONFIG"; then
7416
if AC_RUN_LOG([$PKG_CONFIG --exists "$3" >/dev/null 2>&1]); then
7417
pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
7426
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
7427
# [ACTION-IF-NOT-FOUND])
7430
# Note that if there is a possibility the first call to
7431
# PKG_CHECK_MODULES might not happen, you should be sure to include an
7432
# explicit call to PKG_PROG_PKG_CONFIG in your configure.in
7435
# --------------------------------------------------------------
7436
AC_DEFUN([PKG_CHECK_MODULES],
7437
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7438
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
7439
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
7442
AC_CACHE_CHECK([for $1][_CFLAGS], [pkg_cv_][$1][_CFLAGS],
7443
[_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])])
7444
AC_CACHE_CHECK([for $1][_LIBS], [pkg_cv_][$1][_LIBS],
7445
[_PKG_CONFIG([$1][_LIBS], [libs], [$2])])
7447
if test $pkg_failed = yes; then
7448
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
7449
# Put the nasty error message in config.log where it belongs
7450
echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
7452
ifelse([$4], , [AC_MSG_ERROR(dnl
7453
[Package requirements ($2) were not met.
7454
Consider adjusting the PKG_CONFIG_PATH environment variable if you
7455
installed software in a non-standard prefix.
7457
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
7458
to avoid the need to call pkg-config. See the pkg-config man page for
7461
elif test $pkg_failed = untried; then
7462
ifelse([$4], , [AC_MSG_FAILURE(dnl
7463
[The pkg-config script could not be found or is too old. Make sure it
7464
is in your PATH or set the PKG_CONFIG environment variable to the full
7467
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
7468
to avoid the need to call pkg-config. See the pkg-config man page for
7471
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
7474
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
7475
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
7476
ifelse([$3], , :, [$3])
7478
])# PKG_CHECK_MODULES
7480
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
7482
# This file is free software; the Free Software Foundation
7483
# gives unlimited permission to copy and/or distribute it,
7484
# with or without modifications, as long as this notice is preserved.
6865
7486
# AM_AUTOMAKE_VERSION(VERSION)
6866
7487
# ----------------------------
6867
7488
# Automake X.Y traces this macro to ensure aclocal.m4 has been
6868
7489
# generated from the m4 files accompanying Automake X.Y.
6869
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
7490
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
6871
7492
# AM_SET_CURRENT_AUTOMAKE_VERSION
6872
7493
# -------------------------------
6873
7494
# Call AM_AUTOMAKE_VERSION so it can be traced.
6874
7495
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6875
7496
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6876
[AM_AUTOMAKE_VERSION([1.7.9])])
6878
# Helper functions for option handling. -*- Autoconf -*-
6880
# Copyright 2001, 2002 Free Software Foundation, Inc.
6882
# This program is free software; you can redistribute it and/or modify
6883
# it under the terms of the GNU General Public License as published by
6884
# the Free Software Foundation; either version 2, or (at your option)
6885
# any later version.
6887
# This program is distributed in the hope that it will be useful,
6888
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6889
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6890
# GNU General Public License for more details.
6892
# You should have received a copy of the GNU General Public License
6893
# along with this program; if not, write to the Free Software
6894
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6899
# _AM_MANGLE_OPTION(NAME)
6900
# -----------------------
6901
AC_DEFUN([_AM_MANGLE_OPTION],
6902
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
6904
# _AM_SET_OPTION(NAME)
6905
# ------------------------------
6906
# Set option NAME. Presently that only means defining a flag for this option.
6907
AC_DEFUN([_AM_SET_OPTION],
6908
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
6910
# _AM_SET_OPTIONS(OPTIONS)
6911
# ----------------------------------
6912
# OPTIONS is a space-separated list of Automake options.
6913
AC_DEFUN([_AM_SET_OPTIONS],
6914
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
6916
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
6917
# -------------------------------------------
6918
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
6919
AC_DEFUN([_AM_IF_OPTION],
6920
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
6923
# Check to make sure that the build environment is sane.
6926
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
6928
# This program is free software; you can redistribute it and/or modify
6929
# it under the terms of the GNU General Public License as published by
6930
# the Free Software Foundation; either version 2, or (at your option)
6931
# any later version.
6933
# This program is distributed in the hope that it will be useful,
6934
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6935
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6936
# GNU General Public License for more details.
6938
# You should have received a copy of the GNU General Public License
6939
# along with this program; if not, write to the Free Software
6940
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6947
AC_DEFUN([AM_SANITY_CHECK],
6948
[AC_MSG_CHECKING([whether build environment is sane])
6951
echo timestamp > conftest.file
6952
# Do `set' in a subshell so we don't clobber the current shell's
6953
# arguments. Must try -L first in case configure is actually a
6954
# symlink; some systems play weird games with the mod time of symlinks
6955
# (eg FreeBSD returns the mod time of the symlink's containing
6958
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
6959
if test "$[*]" = "X"; then
6961
set X `ls -t $srcdir/configure conftest.file`
6964
if test "$[*]" != "X $srcdir/configure conftest.file" \
6965
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
6967
# If neither matched, then we have a broken ls. This can happen
6968
# if, for instance, CONFIG_SHELL is bash and it inherits a
6969
# broken ls alias from the environment. This has actually
6970
# happened. Such a system could not be considered "sane".
6971
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
6972
alias in your environment])
6975
test "$[2]" = conftest.file
6981
AC_MSG_ERROR([newly created file is older than distributed files!
6982
Check your system clock])
6984
AC_MSG_RESULT(yes)])
6989
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
6991
# This program is free software; you can redistribute it and/or modify
6992
# it under the terms of the GNU General Public License as published by
6993
# the Free Software Foundation; either version 2, or (at your option)
6994
# any later version.
6996
# This program is distributed in the hope that it will be useful,
6997
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6998
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6999
# GNU General Public License for more details.
7001
# You should have received a copy of the GNU General Public License
7002
# along with this program; if not, write to the Free Software
7003
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7008
# AM_MISSING_PROG(NAME, PROGRAM)
7009
# ------------------------------
7010
AC_DEFUN([AM_MISSING_PROG],
7011
[AC_REQUIRE([AM_MISSING_HAS_RUN])
7012
$1=${$1-"${am_missing_run}$2"}
7016
# AM_MISSING_HAS_RUN
7017
# ------------------
7018
# Define MISSING if not defined so far and test if it supports --run.
7019
# If it does, set am_missing_run to use it, otherwise, to nothing.
7020
AC_DEFUN([AM_MISSING_HAS_RUN],
7021
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7022
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
7023
# Use eval to expand $SHELL
7024
if eval "$MISSING --run true"; then
7025
am_missing_run="$MISSING --run "
7028
AC_MSG_WARN([`missing' script is too old or missing])
7034
# Copyright 2001 Free Software Foundation, Inc.
7036
# This program is free software; you can redistribute it and/or modify
7037
# it under the terms of the GNU General Public License as published by
7038
# the Free Software Foundation; either version 2, or (at your option)
7039
# any later version.
7041
# This program is distributed in the hope that it will be useful,
7042
# but WITHOUT ANY WARRANTY; without even the implied warranty of
7043
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7044
# GNU General Public License for more details.
7046
# You should have received a copy of the GNU General Public License
7047
# along with this program; if not, write to the Free Software
7048
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7497
[AM_AUTOMAKE_VERSION([1.9.5])])
7499
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
7501
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
7503
# This file is free software; the Free Software Foundation
7504
# gives unlimited permission to copy and/or distribute it,
7505
# with or without modifications, as long as this notice is preserved.
7051
7507
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
7052
7508
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
7499
8048
rm -f confinc confmf
7502
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
7504
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
7506
# This program is free software; you can redistribute it and/or modify
7507
# it under the terms of the GNU General Public License as published by
7508
# the Free Software Foundation; either version 2, or (at your option)
7509
# any later version.
7511
# This program is distributed in the hope that it will be useful,
7512
# but WITHOUT ANY WARRANTY; without even the implied warranty of
7513
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7514
# GNU General Public License for more details.
7516
# You should have received a copy of the GNU General Public License
7517
# along with this program; if not, write to the Free Software
7518
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7525
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
7526
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
7528
# Add --enable-maintainer-mode option to configure.
7531
# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
7533
# This program is free software; you can redistribute it and/or modify
7534
# it under the terms of the GNU General Public License as published by
7535
# the Free Software Foundation; either version 2, or (at your option)
7536
# any later version.
7538
# This program is distributed in the hope that it will be useful,
7539
# but WITHOUT ANY WARRANTY; without even the implied warranty of
7540
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7541
# GNU General Public License for more details.
7543
# You should have received a copy of the GNU General Public License
7544
# along with this program; if not, write to the Free Software
7545
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8051
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
8053
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
8054
# Free Software Foundation, Inc.
8056
# This file is free software; the Free Software Foundation
8057
# gives unlimited permission to copy and/or distribute it,
8058
# with or without modifications, as long as this notice is preserved.
8062
# AM_MISSING_PROG(NAME, PROGRAM)
8063
# ------------------------------
8064
AC_DEFUN([AM_MISSING_PROG],
8065
[AC_REQUIRE([AM_MISSING_HAS_RUN])
8066
$1=${$1-"${am_missing_run}$2"}
8070
# AM_MISSING_HAS_RUN
8071
# ------------------
8072
# Define MISSING if not defined so far and test if it supports --run.
8073
# If it does, set am_missing_run to use it, otherwise, to nothing.
8074
AC_DEFUN([AM_MISSING_HAS_RUN],
8075
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8076
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
8077
# Use eval to expand $SHELL
8078
if eval "$MISSING --run true"; then
8079
am_missing_run="$MISSING --run "
8082
AC_MSG_WARN([`missing' script is too old or missing])
8086
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
8088
# This file is free software; the Free Software Foundation
8089
# gives unlimited permission to copy and/or distribute it,
8090
# with or without modifications, as long as this notice is preserved.
8094
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
8096
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
8097
# created by `make install' are always world readable, even if the
8098
# installer happens to have an overly restrictive umask (e.g. 077).
8099
# This was a mistake. There are at least two reasons why we must not
8101
# - it causes special bits like SGID to be ignored,
8102
# - it may be too restrictive (some setups expect 775 directories).
8104
# Do not use -m 0755 and let people choose whatever they expect by
8107
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
8108
# Some implementations (such as Solaris 8's) are not thread-safe: if a
8109
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
8110
# concurrently, both version can detect that a/ is missing, but only
8111
# one can create it and the other will error out. Consequently we
8112
# restrict ourselves to GNU make (using the --version option ensures
8114
AC_DEFUN([AM_PROG_MKDIR_P],
8115
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
8116
# We used to keeping the `.' as first argument, in order to
8117
# allow $(mkdir_p) to be used without argument. As in
8118
# $(mkdir_p) $(somedir)
8119
# where $(somedir) is conditionally defined. However this is wrong
8121
# 1. if the package is installed by a user who cannot write `.'
8122
# make install will fail,
8123
# 2. the above comment should most certainly read
8124
# $(mkdir_p) $(DESTDIR)$(somedir)
8125
# so it does not work when $(somedir) is undefined and
8126
# $(DESTDIR) is not.
8127
# To support the latter case, we have to write
8128
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
8129
# so the `.' trick is pointless.
8130
mkdir_p='mkdir -p --'
8132
# On NextStep and OpenStep, the `mkdir' command does not
8133
# recognize any option. It will interpret all options as
8134
# directories to create, and then abort because `.' already
8136
for d in ./-p ./--version;
8138
test -d $d && rmdir $d
8140
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
8141
if test -f "$ac_aux_dir/mkinstalldirs"; then
8142
mkdir_p='$(mkinstalldirs)'
8144
mkdir_p='$(install_sh) -d'
8147
AC_SUBST([mkdir_p])])
8149
# Helper functions for option handling. -*- Autoconf -*-
8151
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
8153
# This file is free software; the Free Software Foundation
8154
# gives unlimited permission to copy and/or distribute it,
8155
# with or without modifications, as long as this notice is preserved.
8159
# _AM_MANGLE_OPTION(NAME)
8160
# -----------------------
8161
AC_DEFUN([_AM_MANGLE_OPTION],
8162
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
8164
# _AM_SET_OPTION(NAME)
8165
# ------------------------------
8166
# Set option NAME. Presently that only means defining a flag for this option.
8167
AC_DEFUN([_AM_SET_OPTION],
8168
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
8170
# _AM_SET_OPTIONS(OPTIONS)
8171
# ----------------------------------
8172
# OPTIONS is a space-separated list of Automake options.
8173
AC_DEFUN([_AM_SET_OPTIONS],
8174
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
8176
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
8177
# -------------------------------------------
8178
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8179
AC_DEFUN([_AM_IF_OPTION],
8180
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
8182
# Check to make sure that the build environment is sane. -*- Autoconf -*-
8184
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
8185
# Free Software Foundation, Inc.
8187
# This file is free software; the Free Software Foundation
8188
# gives unlimited permission to copy and/or distribute it,
8189
# with or without modifications, as long as this notice is preserved.
8195
AC_DEFUN([AM_SANITY_CHECK],
8196
[AC_MSG_CHECKING([whether build environment is sane])
8199
echo timestamp > conftest.file
8200
# Do `set' in a subshell so we don't clobber the current shell's
8201
# arguments. Must try -L first in case configure is actually a
8202
# symlink; some systems play weird games with the mod time of symlinks
8203
# (eg FreeBSD returns the mod time of the symlink's containing
8206
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
8207
if test "$[*]" = "X"; then
8209
set X `ls -t $srcdir/configure conftest.file`
8212
if test "$[*]" != "X $srcdir/configure conftest.file" \
8213
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
8215
# If neither matched, then we have a broken ls. This can happen
8216
# if, for instance, CONFIG_SHELL is bash and it inherits a
8217
# broken ls alias from the environment. This has actually
8218
# happened. Such a system could not be considered "sane".
8219
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
8220
alias in your environment])
8223
test "$[2]" = conftest.file
8229
AC_MSG_ERROR([newly created file is older than distributed files!
8230
Check your system clock])
8232
AC_MSG_RESULT(yes)])
8234
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
8236
# This file is free software; the Free Software Foundation
8237
# gives unlimited permission to copy and/or distribute it,
8238
# with or without modifications, as long as this notice is preserved.
8240
# AM_PROG_INSTALL_STRIP
8241
# ---------------------
8242
# One issue with vendor `install' (even GNU) is that you can't
8243
# specify the program used to strip binaries. This is especially
8244
# annoying in cross-compiling environments, where the build's strip
8245
# is unlikely to handle the host's binaries.
8246
# Fortunately install-sh will honor a STRIPPROG variable, so we
8247
# always use install-sh in `make install-strip', and initialize
8248
# STRIPPROG with the value of the STRIP variable (set by the user).
8249
AC_DEFUN([AM_PROG_INSTALL_STRIP],
8250
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
8251
# Installed binaries are usually stripped using `strip' when the user
8252
# run `make install-strip'. However `strip' might not be the right
8253
# tool to use in cross-compilation environments, therefore Automake
8254
# will honor the `STRIP' environment variable to overrule this program.
8255
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
8256
if test "$cross_compiling" != no; then
8257
AC_CHECK_TOOL([STRIP], [strip], :)
8259
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
8260
AC_SUBST([INSTALL_STRIP_PROGRAM])])
8262
# Check how to create a tarball. -*- Autoconf -*-
8264
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
8266
# This file is free software; the Free Software Foundation
8267
# gives unlimited permission to copy and/or distribute it,
8268
# with or without modifications, as long as this notice is preserved.
7550
AC_DEFUN([AM_MAINTAINER_MODE],
7551
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
7552
dnl maintainer-mode is disabled by default
7553
AC_ARG_ENABLE(maintainer-mode,
7554
[ --enable-maintainer-mode enable make rules and dependencies not useful
7555
(and sometimes confusing) to the casual installer],
7556
USE_MAINTAINER_MODE=$enableval,
7557
USE_MAINTAINER_MODE=no)
7558
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
7559
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
7560
MAINT=$MAINTAINER_MODE_TRUE
7565
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
7567
# isc-posix.m4 serial 2 (gettext-0.11.2)
7568
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
7569
dnl This file is free software; the Free Software Foundation
7570
dnl gives unlimited permission to copy and/or distribute it,
7571
dnl with or without modifications, as long as this notice is preserved.
7573
# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
7575
# This test replaces the one in autoconf.
7576
# Currently this macro should have the same name as the autoconf macro
7577
# because gettext's gettext.m4 (distributed in the automake package)
7578
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
7579
# give these diagnostics:
7580
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
7581
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
7583
undefine([AC_ISC_POSIX])
7585
AC_DEFUN([AC_ISC_POSIX],
7587
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
7588
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
7593
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
7594
# serial 35 IT_PROG_INTLTOOL
7595
AC_DEFUN([IT_PROG_INTLTOOL],
7596
[AC_PREREQ([2.50])dnl
7598
case "$am__api_version" in
7600
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
7606
if test -n "$1"; then
7607
AC_MSG_CHECKING(for intltool >= $1)
7609
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
7610
INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
7611
[INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
7613
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
7614
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
7615
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
7618
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
7619
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
7620
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
7621
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
7622
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
7623
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
7624
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
7625
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
7626
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
7627
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
7628
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
7629
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
7630
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
7631
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
7632
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
7633
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
7634
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
7635
INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
7637
AC_SUBST(INTLTOOL_DESKTOP_RULE)
7638
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
7639
AC_SUBST(INTLTOOL_KEYS_RULE)
7640
AC_SUBST(INTLTOOL_PROP_RULE)
7641
AC_SUBST(INTLTOOL_OAF_RULE)
7642
AC_SUBST(INTLTOOL_PONG_RULE)
7643
AC_SUBST(INTLTOOL_SERVER_RULE)
7644
AC_SUBST(INTLTOOL_SHEET_RULE)
7645
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
7646
AC_SUBST(INTLTOOL_UI_RULE)
7647
AC_SUBST(INTLTOOL_XAM_RULE)
7648
AC_SUBST(INTLTOOL_KBD_RULE)
7649
AC_SUBST(INTLTOOL_XML_RULE)
7650
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
7651
AC_SUBST(INTLTOOL_CAVES_RULE)
7652
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
7653
AC_SUBST(INTLTOOL_THEME_RULE)
7654
AC_SUBST(INTLTOOL_SERVICE_RULE)
7656
# Use the tools built into the package, not the ones that are installed.
7657
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
7658
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
7659
AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
7661
AC_PATH_PROG(INTLTOOL_PERL, perl)
7662
if test -z "$INTLTOOL_PERL"; then
7663
AC_MSG_ERROR([perl not found; required for intltool])
7665
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
7666
AC_MSG_ERROR([perl 5.x required for intltool])
7668
if test "x$2" != "xno-xml"; then
7669
AC_MSG_CHECKING([for XML::Parser])
7670
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
7673
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
7677
AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
7678
AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
7679
AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
7680
AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
7682
# Substitute ALL_LINGUAS so we can use it in po/Makefile
7683
AC_SUBST(ALL_LINGUAS)
7687
dnl The following is very similar to
7689
dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
7691
dnl with the following slight differences:
7692
dnl - the *.in files are in ac_aux_dir,
7693
dnl - if the file haven't changed upon reconfigure, it's not touched,
7694
dnl - the evaluation of the third parameter enables a hack which computes
7695
dnl the actual value of $libdir,
7696
dnl - the user sees "executing intltool commands", instead of
7697
dnl "creating intltool-extract" and such.
7699
dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
7700
dnl a reason for it.
7702
AC_CONFIG_COMMANDS([intltool], [
7704
for file in intltool-extract intltool-merge intltool-update; do
7705
sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
7706
-e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
7707
-e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
7708
-e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
7709
-e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
7710
-e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
7711
-e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
7712
< ${ac_aux_dir}/${file}.in > ${file}.out
7713
if cmp -s ${file} ${file}.out 2>/dev/null; then
7716
mv -f ${file}.out ${file}
8272
# _AM_PROG_TAR(FORMAT)
8273
# --------------------
8274
# Check how to create a tarball in format FORMAT.
8275
# FORMAT should be one of `v7', `ustar', or `pax'.
8277
# Substitute a variable $(am__tar) that is a command
8278
# writing to stdout a FORMAT-tarball containing the directory
8280
# tardir=directory && $(am__tar) > result.tar
8282
# Substitute a variable $(am__untar) that extract such
8283
# a tarball read from stdin.
8284
# $(am__untar) < result.tar
8285
AC_DEFUN([_AM_PROG_TAR],
8286
[# Always define AMTAR for backward compatibility.
8287
AM_MISSING_PROG([AMTAR], [tar])
8289
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
8290
[m4_case([$1], [ustar],, [pax],,
8291
[m4_fatal([Unknown tar format])])
8292
AC_MSG_CHECKING([how to create a $1 tar archive])
8293
# Loop over all known methods to create a tar archive until one works.
8294
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
8295
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
8296
# Do not fold the above two line into one, because Tru64 sh and
8297
# Solaris sh will not grok spaces in the rhs of `-'.
8298
for _am_tool in $_am_tools
8302
for _am_tar in tar gnutar gtar;
8304
AM_RUN_LOG([$_am_tar --version]) && break
8306
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
8307
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
8308
am__untar="$_am_tar -xf -"
8311
# Must skip GNU tar: if it does not support --format= it doesn't create
8312
# ustar tarball either.
8313
(tar --version) >/dev/null 2>&1 && continue
8314
am__tar='tar chf - "$$tardir"'
8315
am__tar_='tar chf - "$tardir"'
8316
am__untar='tar xf -'
8319
am__tar='pax -L -x $1 -w "$$tardir"'
8320
am__tar_='pax -L -x $1 -w "$tardir"'
8324
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
8325
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
8326
am__untar='cpio -i -H $1 -d'
8335
# If the value was cached, stop now. We just wanted to have am__tar
8336
# and am__untar set.
8337
test -n "${am_cv_prog_tar_$1}" && break
8339
# tar/untar a dummy directory, and stop if the command works
8342
echo GrepMe > conftest.dir/file
8343
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
8345
if test -s conftest.tar; then
8346
AM_RUN_LOG([$am__untar <conftest.tar])
8347
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
7723
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
7724
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
7725
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
7726
INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
7727
INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
7732
# IT_PO_SUBDIR(DIRNAME)
7733
# ---------------------
7734
# All po subdirs have to be declared with this macro; the subdir "po" is
7735
# declared by IT_PROG_INTLTOOL.
7737
AC_DEFUN([IT_PO_SUBDIR],
7738
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
7740
dnl The following CONFIG_COMMANDS should be exetuted at the very end
7741
dnl of config.status.
7742
AC_CONFIG_COMMANDS_PRE([
7743
AC_CONFIG_COMMANDS([$1/stamp-it], [
7744
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
7749
'"s|^| $ac_top_srcdir/|" \
7750
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
7752
if test ! -f "$1/Makefile"; then
7753
AC_MSG_ERROR([$1/Makefile is not ready.])
7755
mv "$1/Makefile" "$1/Makefile.tmp"
7756
[sed '/^POTFILES =/,/[^\\]$/ {
7760
' "$1/Makefile.tmp" >"$1/Makefile"]
7761
rm -f "$1/Makefile.tmp"
7762
mv "$1/stamp-it.tmp" "$1/stamp-it"
7769
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
7770
# A hint is needed for aclocal from Automake <= 1.9.4:
7771
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
7774
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
7775
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
7777
# This file is free software, distributed under the terms of the GNU
7778
# General Public License. As a special exception to the GNU General
7779
# Public License, this file may be distributed as part of a program
7780
# that contains a configuration script generated by Autoconf, under
7781
# the same distribution terms as the rest of that program.
7783
# This file can be copied and used freely without restrictions. It can
7784
# be used in projects which are not available under the GNU Public License
7785
# but which still want to provide support for the GNU gettext functionality.
7787
# Macro to add for using GNU gettext.
7788
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
7790
# Modified to never use included libintl.
7791
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
7793
# Major rework to remove unused code
7794
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
7796
# Added better handling of ALL_LINGUAS from GNU gettext version
7797
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
7799
# Modified to require ngettext
7800
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
7802
# We need this here as well, since someone might use autoconf-2.5x
7803
# to configure GLib then an older version to configure a package
7804
# using AM_GLIB_GNU_GETTEXT
7808
dnl We go to great lengths to make sure that aclocal won't
7809
dnl try to pull in the installed version of these macros
7810
dnl when running aclocal in the glib directory.
7812
m4_copy([AC_DEFUN],[glib_DEFUN])
7813
m4_copy([AC_REQUIRE],[glib_REQUIRE])
7815
dnl At the end, if we're not within glib, we'll define the public
7816
dnl definitions in terms of our private definitions.
7820
#--------------------
7821
glib_DEFUN([GLIB_LC_MESSAGES],
7822
[AC_CHECK_HEADERS([locale.h])
7823
if test $ac_cv_header_locale_h = yes; then
7824
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
7825
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
7826
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
7827
if test $am_cv_val_LC_MESSAGES = yes; then
7828
AC_DEFINE(HAVE_LC_MESSAGES, 1,
7829
[Define if your <locale.h> file defines LC_MESSAGES.])
7833
# GLIB_PATH_PROG_WITH_TEST
7834
#----------------------------
7835
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
7836
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
7837
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
7838
[# Extract the first word of "$2", so it can be a program name with args.
7839
set dummy $2; ac_word=[$]2
7840
AC_MSG_CHECKING([for $ac_word])
7841
AC_CACHE_VAL(ac_cv_path_$1,
7844
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
7847
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7848
for ac_dir in ifelse([$5], , $PATH, [$5]); do
7849
test -z "$ac_dir" && ac_dir=.
7850
if test -f $ac_dir/$ac_word; then
7852
ac_cv_path_$1="$ac_dir/$ac_word"
7858
dnl If no 4th arg is given, leave the cache variable unset,
7859
dnl so AC_PATH_PROGS will keep looking.
7860
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
7865
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
7866
AC_MSG_RESULT([$]$1)
7875
glib_DEFUN([GLIB_WITH_NLS],
7876
dnl NLS is obligatory
7880
gt_cv_have_gettext=no
7886
AC_CHECK_HEADER(libintl.h,
7887
[gt_cv_func_dgettext_libintl="no"
7888
libintl_extra_libs=""
7891
# First check in libc
7893
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
7895
#include <libintl.h>
7897
[return !ngettext ("","", 1)],
7898
gt_cv_func_ngettext_libc=yes,
7899
gt_cv_func_ngettext_libc=no)
7902
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7903
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
7905
#include <libintl.h>
7907
[return !dgettext ("","")],
7908
gt_cv_func_dgettext_libc=yes,
7909
gt_cv_func_dgettext_libc=no)
7913
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7914
AC_CHECK_FUNCS(bind_textdomain_codeset)
7918
# If we don't have everything we want, check in libintl
7920
if test "$gt_cv_func_dgettext_libc" != "yes" \
7921
|| test "$gt_cv_func_ngettext_libc" != "yes" \
7922
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
7924
AC_CHECK_LIB(intl, bindtextdomain,
7925
[AC_CHECK_LIB(intl, ngettext,
7926
[AC_CHECK_LIB(intl, dgettext,
7927
gt_cv_func_dgettext_libintl=yes)])])
7929
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
7930
AC_MSG_CHECKING([if -liconv is needed to use gettext])
7932
AC_CHECK_LIB(intl, ngettext,
7933
[AC_CHECK_LIB(intl, dcgettext,
7934
[gt_cv_func_dgettext_libintl=yes
7935
libintl_extra_libs=-liconv],
7941
# If we found libintl, then check in it for bind_textdomain_codeset();
7942
# we'll prefer libc if neither have bind_textdomain_codeset(),
7943
# and both have dgettext and ngettext
7945
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
7946
glib_save_LIBS="$LIBS"
7947
LIBS="$LIBS -lintl $libintl_extra_libs"
7948
unset ac_cv_func_bind_textdomain_codeset
7949
AC_CHECK_FUNCS(bind_textdomain_codeset)
7950
LIBS="$glib_save_LIBS"
7952
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
7953
gt_cv_func_dgettext_libc=no
7955
if test "$gt_cv_func_dgettext_libc" = "yes" \
7956
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
7957
gt_cv_func_dgettext_libintl=no
7963
if test "$gt_cv_func_dgettext_libc" = "yes" \
7964
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
7965
gt_cv_have_gettext=yes
7968
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7969
INTLLIBS="-lintl $libintl_extra_libs"
7972
if test "$gt_cv_have_gettext" = "yes"; then
7973
AC_DEFINE(HAVE_GETTEXT,1,
7974
[Define if the GNU gettext() function is already present or preinstalled.])
7975
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
7976
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
7977
if test "$MSGFMT" != "no"; then
7978
glib_save_LIBS="$LIBS"
7979
LIBS="$LIBS $INTLLIBS"
7980
AC_CHECK_FUNCS(dcgettext)
7981
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
7982
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
7983
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
7984
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
7985
return _nl_msg_cat_cntr],
7990
dnl On Solaris, if bind_textdomain_codeset is in libc,
7991
dnl GNU format message catalog is always supported,
7992
dnl since both are added to the libc all together.
7993
dnl Hence, we'd like to go with DATADIRNAME=share and
7994
dnl and CATOBJEXT=.gmo in this case.
7995
AC_CHECK_FUNC(bind_textdomain_codeset,
8006
LIBS="$glib_save_LIBS"
8009
gt_cv_have_gettext=no
8014
if test "$gt_cv_have_gettext" = "yes" ; then
8015
AC_DEFINE(ENABLE_NLS, 1,
8016
[always defined to indicate that i18n is enabled])
8019
dnl Test whether we really found GNU xgettext.
8020
if test "$XGETTEXT" != ":"; then
8021
dnl If it is not GNU xgettext we define it as : so that the
8022
dnl Makefiles still can work.
8023
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
8027
[found xgettext program is not GNU xgettext; ignore it])
8032
# We need to process the po/ directory.
8036
[case "$CONFIG_FILES" in *po/Makefile.in*)
8037
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
8040
dnl These rules are solely for the distribution goal. While doing this
8041
dnl we only have to keep exactly one list of the available catalogs
8042
dnl in configure.in.
8043
for lang in $ALL_LINGUAS; do
8044
GMOFILES="$GMOFILES $lang.gmo"
8045
POFILES="$POFILES $lang.po"
8048
dnl Make all variables we use known to autoconf.
8051
AC_SUBST(DATADIRNAME)
8053
AC_SUBST(INSTOBJEXT)
8055
AC_SUBST(PO_IN_DATADIR_TRUE)
8056
AC_SUBST(PO_IN_DATADIR_FALSE)
8061
# AM_GLIB_GNU_GETTEXT
8062
# -------------------
8063
# Do checks necessary for use of gettext. If a suitable implementation
8064
# of gettext is found in either in libintl or in the C library,
8065
# it will set INTLLIBS to the libraries needed for use of gettext
8066
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
8067
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
8068
# on various variables needed by the Makefile.in.in installed by
8071
glib_DEFUN([GLIB_GNU_GETTEXT],
8072
[AC_REQUIRE([AC_PROG_CC])dnl
8073
AC_REQUIRE([AC_HEADER_STDC])dnl
8078
if test "$gt_cv_have_gettext" = "yes"; then
8079
if test "x$ALL_LINGUAS" = "x"; then
8082
AC_MSG_CHECKING(for catalogs to be installed)
8084
for presentlang in $ALL_LINGUAS; do
8086
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
8087
desiredlanguages="$LINGUAS"
8089
desiredlanguages="$ALL_LINGUAS"
8091
for desiredlang in $desiredlanguages; do
8092
# Use the presentlang catalog if desiredlang is
8093
# a. equal to presentlang, or
8094
# b. a variant of presentlang (because in this case,
8095
# presentlang can be used as a fallback for messages
8096
# which are not translated in the desiredlang catalog).
8097
case "$desiredlang" in
8098
"$presentlang"*) useit=yes;;
8101
if test $useit = yes; then
8102
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
8105
LINGUAS=$NEW_LINGUAS
8106
AC_MSG_RESULT($LINGUAS)
8109
dnl Construct list of names of catalog files to be constructed.
8110
if test -n "$LINGUAS"; then
8111
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8115
dnl Generate list of files to be processed by xgettext which will
8116
dnl be included in po/Makefile.
8117
test -d po || mkdir po
8118
if test "x$srcdir" != "x."; then
8119
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8120
posrcprefix="$srcdir/"
8122
posrcprefix="../$srcdir/"
8128
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8129
< $srcdir/po/POTFILES.in > po/POTFILES
8132
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
8133
# -------------------------------
8134
# Define VARIABLE to the location where catalog files will
8135
# be installed by po/Makefile.
8136
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
8137
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
8138
glib_save_prefix="$prefix"
8139
glib_save_exec_prefix="$exec_prefix"
8140
test "x$prefix" = xNONE && prefix=$ac_default_prefix
8141
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
8142
if test "x$CATOBJEXT" = "x.mo" ; then
8143
localedir=`eval echo "${libdir}/locale"`
8145
localedir=`eval echo "${datadir}/locale"`
8147
prefix="$glib_save_prefix"
8148
exec_prefix="$glib_save_exec_prefix"
8149
AC_DEFINE_UNQUOTED($1, "$localedir",
8150
[Define the location where the catalogs will be installed])
8154
dnl Now the definitions that aclocal will find
8156
ifdef(glib_configure_in,[],[
8157
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
8158
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
8161
dnl GNOME_COMPILE_WARNINGS
8162
dnl Turn on many useful compiler warnings
8163
dnl For now, only works on GCC
8164
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
8165
dnl ******************************
8166
dnl More compiler warnings
8167
dnl ******************************
8169
AC_ARG_ENABLE(compile-warnings,
8170
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
8171
[Turn on compiler warnings]),,
8172
[enable_compile_warnings="m4_default([$1],[yes])"])
8175
if test "x$GCC" != xyes; then
8176
enable_compile_warnings=no
8180
realsave_CFLAGS="$CFLAGS"
8182
case "$enable_compile_warnings" in
8187
warning_flags="-Wall"
8190
warning_flags="-Wall -Wmissing-prototypes"
8193
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
8194
CFLAGS="$warning_flags $CFLAGS"
8195
for option in -Wno-sign-compare; do
8196
SAVE_CFLAGS="$CFLAGS"
8197
CFLAGS="$CFLAGS $option"
8198
AC_MSG_CHECKING([whether gcc understands $option])
8199
AC_TRY_COMPILE([], [],
8202
CFLAGS="$SAVE_CFLAGS"
8203
AC_MSG_RESULT($has_option)
8204
if test $has_option = yes; then
8205
warning_flags="$warning_flags $option"
8211
if test "$enable_compile_warnings" = "error" ; then
8212
warning_flags="$warning_flags -Werror"
8216
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
8219
CFLAGS="$realsave_CFLAGS"
8220
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
8221
AC_MSG_RESULT($warning_flags)
8223
AC_ARG_ENABLE(iso-c,
8224
AC_HELP_STRING([--enable-iso-c],
8225
[Try to warn if code is not ISO C ]),,
8228
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
8230
if test "x$enable_iso_c" != "xno"; then
8231
if test "x$GCC" = "xyes"; then
8233
*[\ \ ]-ansi[\ \ ]*) ;;
8234
*) complCFLAGS="$complCFLAGS -ansi" ;;
8237
*[\ \ ]-pedantic[\ \ ]*) ;;
8238
*) complCFLAGS="$complCFLAGS -pedantic" ;;
8242
AC_MSG_RESULT($complCFLAGS)
8244
WARN_CFLAGS="$warning_flags $complCFLAGS"
8245
AC_SUBST(WARN_CFLAGS)
8248
dnl For C++, do basically the same thing.
8250
AC_DEFUN([GNOME_CXX_WARNINGS],[
8251
AC_ARG_ENABLE(cxx-warnings,
8252
AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
8253
[Turn on compiler warnings.]),,
8254
[enable_cxx_warnings="m4_default([$1],[minimum])"])
8256
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
8258
if test "x$GCC" != xyes; then
8259
enable_compile_warnings=no
8261
if test "x$enable_cxx_warnings" != "xno"; then
8262
if test "x$GCC" = "xyes"; then
8263
case " $CXXFLAGS " in
8264
*[\ \ ]-Wall[\ \ ]*) ;;
8265
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
8268
## -W is not all that useful. And it cannot be controlled
8269
## with individual -Wno-xxx flags, unlike -Wall
8270
if test "x$enable_cxx_warnings" = "xyes"; then
8271
warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
8275
AC_MSG_RESULT($warnCXXFLAGS)
8277
AC_ARG_ENABLE(iso-cxx,
8278
AC_HELP_STRING([--enable-iso-cxx],
8279
[Try to warn if code is not ISO C++ ]),,
8280
[enable_iso_cxx=no])
8282
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
8284
if test "x$enable_iso_cxx" != "xno"; then
8285
if test "x$GCC" = "xyes"; then
8286
case " $CXXFLAGS " in
8287
*[\ \ ]-ansi[\ \ ]*) ;;
8288
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
8291
case " $CXXFLAGS " in
8292
*[\ \ ]-pedantic[\ \ ]*) ;;
8293
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
8297
AC_MSG_RESULT($complCXXFLAGS)
8299
WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
8300
AC_SUBST(WARN_CXXFLAGS)
8303
# Configure paths for GLIB
8304
# Owen Taylor 1997-2001
8306
dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
8307
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or
8308
dnl gthread is specified in MODULES, pass to pkg-config
8310
AC_DEFUN([AM_PATH_GLIB_2_0],
8312
dnl Get the cflags and libraries from pkg-config
8314
AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
8315
, enable_glibtest=yes)
8317
pkg_config_args=glib-2.0
8322
pkg_config_args="$pkg_config_args gmodule-2.0"
8325
pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
8328
pkg_config_args="$pkg_config_args gobject-2.0"
8331
pkg_config_args="$pkg_config_args gthread-2.0"
8336
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
8340
if test x$PKG_CONFIG != xno ; then
8341
if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
8344
echo *** pkg-config too old; version 0.7 or better required.
8352
min_glib_version=ifelse([$1], ,2.0.0,$1)
8353
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
8355
if test x$PKG_CONFIG != xno ; then
8356
## don't try to run the test against uninstalled libtool libs
8357
if $PKG_CONFIG --uninstalled $pkg_config_args; then
8358
echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
8362
if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
8369
if test x"$no_glib" = x ; then
8370
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
8371
GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
8372
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
8374
GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
8375
GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
8376
glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
8377
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
8378
glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
8379
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
8380
glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
8381
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
8382
if test "x$enable_glibtest" = "xyes" ; then
8383
ac_save_CFLAGS="$CFLAGS"
8384
ac_save_LIBS="$LIBS"
8385
CFLAGS="$CFLAGS $GLIB_CFLAGS"
8386
LIBS="$GLIB_LIBS $LIBS"
8388
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
8389
dnl checks the results of pkg-config to some extent)
8400
int major, minor, micro;
8403
system ("touch conf.glibtest");
8405
/* HP/UX 9 (%@#!) writes to sscanf strings */
8406
tmp_version = g_strdup("$min_glib_version");
8407
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
8408
printf("%s, bad version string\n", "$min_glib_version");
8412
if ((glib_major_version != $glib_config_major_version) ||
8413
(glib_minor_version != $glib_config_minor_version) ||
8414
(glib_micro_version != $glib_config_micro_version))
8416
printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
8417
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
8418
glib_major_version, glib_minor_version, glib_micro_version);
8419
printf ("*** was found! If pkg-config was correct, then it is best\n");
8420
printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
8421
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
8422
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
8423
printf("*** required on your system.\n");
8424
printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
8425
printf("*** to point to the correct configuration files\n");
8427
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
8428
(glib_minor_version != GLIB_MINOR_VERSION) ||
8429
(glib_micro_version != GLIB_MICRO_VERSION))
8431
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
8432
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
8433
printf("*** library (version %d.%d.%d)\n",
8434
glib_major_version, glib_minor_version, glib_micro_version);
8438
if ((glib_major_version > major) ||
8439
((glib_major_version == major) && (glib_minor_version > minor)) ||
8440
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
8446
printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
8447
glib_major_version, glib_minor_version, glib_micro_version);
8448
printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
8449
major, minor, micro);
8450
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
8452
printf("*** If you have already installed a sufficiently new version, this error\n");
8453
printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
8454
printf("*** being found. The easiest way to fix this is to remove the old version\n");
8455
printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
8456
printf("*** correct copy of pkg-config. (In this case, you will have to\n");
8457
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
8458
printf("*** so that the correct libraries are found at run-time))\n");
8463
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
8464
CFLAGS="$ac_save_CFLAGS"
8465
LIBS="$ac_save_LIBS"
8468
if test "x$no_glib" = x ; then
8469
AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
8470
ifelse([$2], , :, [$2])
8473
if test "$PKG_CONFIG" = "no" ; then
8474
echo "*** A new enough version of pkg-config was not found."
8475
echo "*** See http://www.freedesktop.org/software/pkgconfig/"
8477
if test -f conf.glibtest ; then
8480
echo "*** Could not run GLIB test program, checking why..."
8481
ac_save_CFLAGS="$CFLAGS"
8482
ac_save_LIBS="$LIBS"
8483
CFLAGS="$CFLAGS $GLIB_CFLAGS"
8484
LIBS="$LIBS $GLIB_LIBS"
8488
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
8489
[ echo "*** The test program compiled, but did not run. This usually means"
8490
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
8491
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
8492
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
8493
echo "*** to the installed location Also, make sure you have run ldconfig if that"
8494
echo "*** is required on your system"
8496
echo "*** If you have an old version installed, it is best to remove it, although"
8497
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
8498
[ echo "*** The test program failed to compile or link. See the file config.log for the"
8499
echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
8500
CFLAGS="$ac_save_CFLAGS"
8501
LIBS="$ac_save_LIBS"
8509
ifelse([$3], , :, [$3])
8511
AC_SUBST(GLIB_CFLAGS)
8513
AC_SUBST(GLIB_GENMARSHAL)
8514
AC_SUBST(GOBJECT_QUERY)
8515
AC_SUBST(GLIB_MKENUMS)
8519
dnl AM_PATH_ORBIT2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
8520
dnl Test for ORBit2, and define ORBIT_CFLAGS and ORBIT_LIBS
8522
AC_DEFUN([AM_PATH_ORBIT2],
8524
dnl Get the cflags and libraries from the orbit2-config script
8526
AC_ARG_WITH(orbit-prefix,[ --with-orbit-prefix=PFX Prefix where ORBIT is installed (optional)],
8527
orbit_config_prefix="$withval", orbit_config_prefix="")
8528
AC_ARG_WITH(orbit-exec-prefix,[ --with-orbit-exec-prefix=PFX Exec prefix where ORBIT is installed (optional)],
8529
orbit_config_exec_prefix="$withval", orbit_config_exec_prefix="")
8530
AC_ARG_ENABLE(orbittest, [ --disable-orbittest Do not try to compile and run a test ORBIT program],
8531
, enable_orbittest=yes)
8537
orbit_config_args="$orbit_config_args server"
8540
orbit_config_args="$orbit_config_args client"
8544
if test x$orbit_config_args = x ; then
8545
orbit_config_args=server
8548
if test x$orbit_config_exec_prefix != x ; then
8549
orbit_config_args="$orbit_config_args --exec-prefix=$orbit_config_exec_prefix"
8550
if test x${ORBIT_CONFIG+set} != xset ; then
8551
ORBIT_CONFIG=$orbit_config_exec_prefix/bin/orbit2-config
8554
if test x$orbit_config_prefix != x ; then
8555
orbit_config_args="$orbit_config_args --prefix=$orbit_config_prefix"
8556
if test x${ORBIT_CONFIG+set} != xset ; then
8557
ORBIT_CONFIG=$orbit_config_prefix/bin/orbit2-config
8561
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
8562
AC_PATH_PROG(ORBIT_CONFIG, orbit2-config, no)
8563
min_orbit_version=ifelse([$1], , 2.3.0, $1)
8564
AC_MSG_CHECKING(for ORBit - version >= $min_orbit_version)
8566
if test "$ORBIT_CONFIG" = "no" ; then
8569
ORBIT_CFLAGS=`$ORBIT_CONFIG $orbit_config_args --cflags`
8570
ORBIT_LIBS=`$ORBIT_CONFIG $orbit_config_args --libs`
8571
ORBIT_VERSION=`$PKG_CONFIG --modversion ORBit-2.0`
8572
orbit_config_major_version=`echo $ORBIT_VERSION | \
8573
sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
8574
orbit_config_minor_version=`echo $ORBIT_VERSION | \
8575
sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
8576
orbit_config_micro_version=`echo $ORBIT_VERSION | \
8577
sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
8578
if test "x$enable_orbittest" = "xyes" ; then
8579
ac_save_CFLAGS="$CFLAGS"
8580
ac_save_LIBS="$LIBS"
8581
CFLAGS="$CFLAGS $ORBIT_CFLAGS"
8582
LIBS="$ORBIT_LIBS $LIBS"
8584
dnl Now check if the installed ORBIT is sufficiently new. (Also sanity
8585
dnl checks the results of orbit2-config to some extent
8587
rm -f conf.orbittest
8589
#include <orbit/orbit.h>
8596
int major, minor, micro;
8599
system ("touch conf.orbittest");
8601
/* HP/UX 9 (%@#!) writes to sscanf strings */
8602
tmp_version = g_strdup("$min_orbit_version");
8603
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
8604
printf("%s, bad version string\n", "$min_orbit_version");
8608
if ((orbit_major_version != $orbit_config_major_version) ||
8609
(orbit_minor_version != $orbit_config_minor_version) ||
8610
(orbit_micro_version != $orbit_config_micro_version))
8612
printf("\n*** 'pkg-config --version ORBit-2.0' returned %d.%d.%d, but ORBit (%d.%d.%d)\n",
8613
$orbit_config_major_version, $orbit_config_minor_version, $orbit_config_micro_version,
8614
orbit_major_version, orbit_minor_version, orbit_micro_version);
8615
printf ("*** was found! If orbit2-config was correct, then it is best\n");
8616
printf ("*** to remove the old version of ORBit. You may also be able to fix the error\n");
8617
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
8618
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
8619
printf("*** required on your system.\n");
8620
printf("*** If orbit2-config was wrong, set the environment variable ORBIT_CONFIG\n");
8621
printf("*** to point to the correct copy of orbit2-config, and remove the file config.cache\n");
8622
printf("*** before re-running configure\n");
8624
#if defined (ORBIT_MAJOR_VERSION) && defined (ORBIT_MINOR_VERSION) && defined (ORBIT_MICRO_VERSION)
8625
else if ((orbit_major_version != ORBIT_MAJOR_VERSION) ||
8626
(orbit_minor_version != ORBIT_MINOR_VERSION) ||
8627
(orbit_micro_version != ORBIT_MICRO_VERSION))
8629
printf("*** ORBit header files (version %d.%d.%d) do not match\n",
8630
ORBIT_MAJOR_VERSION, ORBIT_MINOR_VERSION, ORBIT_MICRO_VERSION);
8631
printf("*** library (version %d.%d.%d)\n",
8632
orbit_major_version, orbit_minor_version, orbit_micro_version);
8634
#endif /* defined (ORBIT_MAJOR_VERSION) ... */
8637
if ((orbit_major_version > major) ||
8638
((orbit_major_version == major) && (orbit_minor_version > minor)) ||
8639
((orbit_major_version == major) && (orbit_minor_version == minor) && (orbit_micro_version >= micro)))
8645
printf("\n*** An old version of ORBit (%d.%d.%d) was found.\n",
8646
orbit_major_version, orbit_minor_version, orbit_micro_version);
8647
printf("*** You need a version of ORBit newer than %d.%d.%d. The latest version of\n",
8648
major, minor, micro);
8649
printf("*** ORBit is always available from ftp://ftp.orbit.org.\n");
8651
printf("*** If you have already installed a sufficiently new version, this error\n");
8652
printf("*** probably means that the wrong copy of the orbit2-config shell script is\n");
8653
printf("*** being found. The easiest way to fix this is to remove the old version\n");
8654
printf("*** of ORBit, but you can also set the ORBIT_CONFIG environment to point to the\n");
8655
printf("*** correct copy of orbit2-config. (In this case, you will have to\n");
8656
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
8657
printf("*** so that the correct libraries are found at run-time))\n");
8662
],, no_orbit=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
8663
CFLAGS="$ac_save_CFLAGS"
8664
LIBS="$ac_save_LIBS"
8667
if test "x$no_orbit" = x ; then
8669
ifelse([$2], , :, [$2])
8672
if test "$ORBIT_CONFIG" = "no" ; then
8673
echo "*** The orbit2-config script installed by ORBIT could not be found"
8674
echo "*** If ORBit was installed in PREFIX, make sure PREFIX/bin is in"
8675
echo "*** your path, or set the ORBIT_CONFIG environment variable to the"
8676
echo "*** full path to orbit2-config."
8678
if test -f conf.orbittest ; then
8681
echo "*** Could not run ORBIT test program, checking why..."
8682
CFLAGS="$CFLAGS $ORBIT_CFLAGS"
8683
LIBS="$LIBS $ORBIT_LIBS"
8685
#include <orbit/orbit.h>
8687
], [ return ((orbit_major_version) || (orbit_minor_version) || (orbit_micro_version)); ],
8688
[ echo "*** The test program compiled, but did not run. This usually means"
8689
echo "*** that the run-time linker is not finding ORBit or finding the wrong"
8690
echo "*** version of ORBit. If it is not finding ORBit, you'll need to set your"
8691
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
8692
echo "*** to the installed location Also, make sure you have run ldconfig if that"
8693
echo "*** is required on your system"
8695
echo "*** If you have an old version installed, it is best to remove it, although"
8696
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
8698
echo "*** If you have a RedHat 5.0 system, you should remove the ORBit package that"
8699
echo "*** came with the system with the command"
8701
echo "*** rpm --erase --nodeps orbit orbit-devel" ],
8702
[ echo "*** The test program failed to compile or link. See the file config.log for the"
8703
echo "*** exact error that occured. This usually means ORBIT was incorrectly installed"
8704
echo "*** or that you have moved ORBit since it was installed. In the latter case, you"
8705
echo "*** may want to edit the orbit2-config script: $ORBIT_CONFIG" ])
8706
CFLAGS="$ac_save_CFLAGS"
8707
LIBS="$ac_save_LIBS"
8712
ifelse([$3], , :, [$3])
8715
AC_PATH_PROG(ORBIT_IDL, orbit-idl-2, ifelse([$3], , :, [$3]))
8716
AC_SUBST(ORBIT_CFLAGS)
8717
AC_SUBST(ORBIT_LIBS)
8719
rm -f conf.orbittest
8722
dnl AM_GCONF_SOURCE_2
8723
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
8724
dnl (i.e. pass to gconftool-2
8725
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
8726
dnl you should install foo.schemas files
8729
AC_DEFUN([AM_GCONF_SOURCE_2],
8731
if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
8732
GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
8734
GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
8737
AC_ARG_WITH(gconf-source,
8738
[ --with-gconf-source=sourceaddress Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",)
8740
AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
8741
AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
8743
if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
8744
GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
8747
AC_ARG_WITH(gconf-schema-file-dir,
8748
[ --with-gconf-schema-file-dir=dir Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",)
8750
AC_SUBST(GCONF_SCHEMA_FILE_DIR)
8751
AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
8753
AC_ARG_ENABLE(schemas-install,
8754
[ --disable-schemas-install Disable the schemas installation],
8755
[case ${enableval} in
8757
*) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;;
8759
AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
8762
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
8764
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
8766
# This program is free software; you can redistribute it and/or modify
8767
# it under the terms of the GNU General Public License as published by
8768
# the Free Software Foundation; either version 2 of the License, or
8769
# (at your option) any later version.
8771
# This program is distributed in the hope that it will be useful, but
8772
# WITHOUT ANY WARRANTY; without even the implied warranty of
8773
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8774
# General Public License for more details.
8776
# You should have received a copy of the GNU General Public License
8777
# along with this program; if not, write to the Free Software
8778
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8780
# As a special exception to the GNU General Public License, if you
8781
# distribute this file as part of a program that contains a
8782
# configuration script generated by Autoconf, you may include it under
8783
# the same distribution terms that you use for the rest of that program.
8785
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
8786
# ----------------------------------
8787
AC_DEFUN([PKG_PROG_PKG_CONFIG],
8788
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8789
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8790
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8791
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8792
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8794
if test -n "$PKG_CONFIG"; then
8795
_pkg_min_version=m4_default([$1], [0.9.0])
8796
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8797
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8798
AC_MSG_RESULT([yes])
8805
])# PKG_PROG_PKG_CONFIG
8807
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8809
# Check to see whether a particular set of modules exists. Similar
8810
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8813
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8814
# this or PKG_CHECK_MODULES is called, or make sure to call
8815
# PKG_CHECK_EXISTS manually
8816
# --------------------------------------------------------------
8817
AC_DEFUN([PKG_CHECK_EXISTS],
8818
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8819
if test -n "$PKG_CONFIG" && \
8820
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8821
m4_ifval([$2], [$2], [:])
8822
m4_ifvaln([$3], [else
8827
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8828
# ---------------------------------------------
8829
m4_define([_PKG_CONFIG],
8830
[if test -n "$PKG_CONFIG"; then
8831
if test -n "$$1"; then
8834
PKG_CHECK_EXISTS([$3],
8835
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8843
# _PKG_SHORT_ERRORS_SUPPORTED
8844
# -----------------------------
8845
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8846
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8847
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8848
_pkg_short_errors_supported=yes
8850
_pkg_short_errors_supported=no
8852
])# _PKG_SHORT_ERRORS_SUPPORTED
8855
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8856
# [ACTION-IF-NOT-FOUND])
8859
# Note that if there is a possibility the first call to
8860
# PKG_CHECK_MODULES might not happen, you should be sure to include an
8861
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8864
# --------------------------------------------------------------
8865
AC_DEFUN([PKG_CHECK_MODULES],
8866
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8867
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8868
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8871
AC_MSG_CHECKING([for $1])
8873
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8874
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8876
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8877
and $1[]_LIBS to avoid the need to call pkg-config.
8878
See the pkg-config man page for more details.])
8880
if test $pkg_failed = yes; then
8881
_PKG_SHORT_ERRORS_SUPPORTED
8882
if test $_pkg_short_errors_supported = yes; then
8883
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
8885
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
8887
# Put the nasty error message in config.log where it belongs
8888
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8890
ifelse([$4], , [AC_MSG_ERROR(dnl
8891
[Package requirements ($2) were not met:
8895
Consider adjusting the PKG_CONFIG_PATH environment variable if you
8896
installed software in a non-standard prefix.
8901
elif test $pkg_failed = untried; then
8902
ifelse([$4], , [AC_MSG_FAILURE(dnl
8903
[The pkg-config script could not be found or is too old. Make sure it
8904
is in your PATH or set the PKG_CONFIG environment variable to the full
8909
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
8912
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8913
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8914
AC_MSG_RESULT([yes])
8915
ifelse([$3], , :, [$3])
8917
])# PKG_CHECK_MODULES
8352
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
8353
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
8355
AC_SUBST([am__untar])
8358
m4_include([acinclude.m4])