1
dnl aclocal.m4 generated automatically by aclocal 1.4-p6
3
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
1
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
# 2005 Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14
# codeset.m4 serial AM1 (gettext-0.10.40)
15
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
4
16
dnl This file is free software; the Free Software Foundation
5
17
dnl gives unlimited permission to copy and/or distribute it,
6
18
dnl with or without modifications, as long as this notice is preserved.
8
dnl This program is distributed in the hope that it will be useful,
9
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11
dnl PARTICULAR PURPOSE.
13
dnl Additional macros for Basilisk II
16
dnl Check for libgnomeui
17
dnl B2_PATH_GNOMEUI([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
18
dnl Test to see if libgnomeui is installed, and define GNOMEUI_CFLAGS, LIBS
19
AC_DEFUN(B2_PATH_GNOMEUI,
20
dnl From Bruno Haible.
22
AC_DEFUN([AM_LANGINFO_CODESET],
24
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
25
[AC_TRY_LINK([#include <langinfo.h>],
26
[char* cs = nl_langinfo(CODESET);],
27
am_cv_langinfo_codeset=yes,
28
am_cv_langinfo_codeset=no)
30
if test $am_cv_langinfo_codeset = yes; then
31
AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
32
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
36
# Configure paths for ESD
37
# Manish Singh 98-9-30
38
# stolen back from Frank Belew
39
# stolen from Manish Singh
40
# Shamelessly stolen from Owen Taylor
42
dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
43
dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
45
AC_DEFUN([AM_PATH_ESD],
47
dnl Get the cflags and libraries from the esd-config script
49
AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)],
50
esd_prefix="$withval", esd_prefix="")
51
AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)],
52
esd_exec_prefix="$withval", esd_exec_prefix="")
53
AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program],
56
if test x$esd_exec_prefix != x ; then
57
esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
58
if test x${ESD_CONFIG+set} != xset ; then
59
ESD_CONFIG=$esd_exec_prefix/bin/esd-config
62
if test x$esd_prefix != x ; then
63
esd_args="$esd_args --prefix=$esd_prefix"
64
if test x${ESD_CONFIG+set} != xset ; then
65
ESD_CONFIG=$esd_prefix/bin/esd-config
69
AC_PATH_PROG(ESD_CONFIG, esd-config, no)
70
min_esd_version=ifelse([$1], ,0.2.7,$1)
71
AC_MSG_CHECKING(for ESD - version >= $min_esd_version)
73
if test "$ESD_CONFIG" = "no" ; then
78
ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
79
ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`
81
esd_major_version=`$ESD_CONFIG $esd_args --version | \
82
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
83
esd_minor_version=`$ESD_CONFIG $esd_args --version | \
84
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
85
esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
86
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
87
if test "x$enable_esdtest" = "xyes" ; then
88
ac_save_CFLAGS="$CFLAGS"
90
CFLAGS="$CFLAGS $ESD_CFLAGS"
91
LIBS="$LIBS $ESD_LIBS"
93
dnl Now check if the installed ESD is sufficiently new. (Also sanity
94
dnl checks the results of esd-config to some extent
104
my_strdup (char *str)
110
new_str = malloc ((strlen (str) + 1) * sizeof(char));
111
strcpy (new_str, str);
121
int major, minor, micro;
124
system ("touch conf.esdtest");
126
/* HP/UX 9 (%@#!) writes to sscanf strings */
127
tmp_version = my_strdup("$min_esd_version");
128
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
129
printf("%s, bad version string\n", "$min_esd_version");
133
if (($esd_major_version > major) ||
134
(($esd_major_version == major) && ($esd_minor_version > minor)) ||
135
(($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
141
printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
142
printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
143
printf("*** best to upgrade to the required version.\n");
144
printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
145
printf("*** to point to the correct copy of esd-config, and remove the file\n");
146
printf("*** config.cache before re-running configure\n");
151
],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
152
CFLAGS="$ac_save_CFLAGS"
157
if test "x$no_esd" = x ; then
159
ifelse([$2], , :, [$2])
162
if test "$ESD_CONFIG" = "no" ; then
163
echo "*** The esd-config script installed by ESD could not be found"
164
echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
165
echo "*** your path, or set the ESD_CONFIG environment variable to the"
166
echo "*** full path to esd-config."
168
if test -f conf.esdtest ; then
171
echo "*** Could not run ESD test program, checking why..."
172
CFLAGS="$CFLAGS $ESD_CFLAGS"
173
LIBS="$LIBS $ESD_LIBS"
180
[ echo "*** The test program compiled, but did not run. This usually means"
181
echo "*** that the run-time linker is not finding ESD or finding the wrong"
182
echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
183
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
184
echo "*** to the installed location Also, make sure you have run ldconfig if that"
185
echo "*** is required on your system"
187
echo "*** If you have an old version installed, it is best to remove it, although"
188
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
189
[ echo "*** The test program failed to compile or link. See the file config.log for the"
190
echo "*** exact error that occured. This usually means ESD was incorrectly installed"
191
echo "*** or that you have moved ESD since it was installed. In the latter case, you"
192
echo "*** may want to edit the esd-config script: $ESD_CONFIG" ])
193
CFLAGS="$ac_save_CFLAGS"
200
ifelse([$3], , :, [$3])
207
dnl AM_ESD_SUPPORTS_MULTIPLE_RECORD([ACTION-IF-SUPPORTS [, ACTION-IF-NOT-SUPPORTS]])
208
dnl Test, whether esd supports multiple recording clients (version >=0.2.21)
210
AC_DEFUN([AM_ESD_SUPPORTS_MULTIPLE_RECORD],
21
dnl Get the cflags and libraries from the gnome-config script
23
AC_ARG_WITH(gnome-config,
24
[ --with-gnome-config=GNOME_CONFIG Location of gnome-config],
25
GNOME_CONFIG="$withval")
27
AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
28
AC_MSG_CHECKING(for libgnomeui)
29
if test "$GNOME_CONFIG" = "no"; then
212
AC_MSG_NOTICE([whether installed esd version supports multiple recording clients])
213
ac_save_ESD_CFLAGS="$ESD_CFLAGS"
214
ac_save_ESD_LIBS="$ESD_LIBS"
217
AM_CONDITIONAL(ESD_SUPPORTS_MULTIPLE_RECORD, true)
218
AC_DEFINE(ESD_SUPPORTS_MULTIPLE_RECORD, 1,
219
[Define if you have esound with support of multiple recording clients.])],
221
ifelse([$2], , [AM_CONDITIONAL(ESD_SUPPORTS_MULTIPLE_RECORD, false)], [$2])
222
if test "x$ac_save_ESD_CFLAGS" != x ; then
223
ESD_CFLAGS="$ac_save_ESD_CFLAGS"
225
if test "x$ac_save_ESD_LIBS" != x ; then
226
ESD_LIBS="$ac_save_ESD_LIBS"
231
# gettext.m4 serial 37 (gettext-0.14.4)
232
dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
233
dnl This file is free software; the Free Software Foundation
234
dnl gives unlimited permission to copy and/or distribute it,
235
dnl with or without modifications, as long as this notice is preserved.
237
dnl This file can can be used in projects which are not available under
238
dnl the GNU General Public License or the GNU Library General Public
239
dnl License but which still want to provide support for the GNU gettext
241
dnl Please note that the actual code of the GNU gettext library is covered
242
dnl by the GNU Library General Public License, and the rest of the GNU
243
dnl gettext package package is covered by the GNU General Public License.
244
dnl They are *not* in the public domain.
247
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
248
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
250
dnl Macro to add for using GNU gettext.
252
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
253
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
254
dnl default (if it is not specified or empty) is 'no-libtool'.
255
dnl INTLSYMBOL should be 'external' for packages with no intl directory,
256
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
257
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
258
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
259
dnl depending on --{enable,disable}-{shared,static} and on the presence of
260
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
261
dnl $(top_builddir)/intl/libintl.a will be created.
262
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
263
dnl implementations (in libc or libintl) without the ngettext() function
264
dnl will be ignored. If NEEDSYMBOL is specified and is
265
dnl 'need-formatstring-macros', then GNU gettext implementations that don't
266
dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
267
dnl INTLDIR is used to find the intl libraries. If empty,
268
dnl the value `$(top_builddir)/intl/' is used.
270
dnl The result of the configuration is one of three cases:
271
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
273
dnl Catalog format: GNU --> install in $(datadir)
274
dnl Catalog extension: .mo after installation, .gmo in source tree
275
dnl 2) GNU gettext has been found in the system's C library.
276
dnl Catalog format: GNU --> install in $(datadir)
277
dnl Catalog extension: .mo after installation, .gmo in source tree
278
dnl 3) No internationalization, always use English msgid.
279
dnl Catalog format: none
280
dnl Catalog extension: none
281
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
282
dnl The use of .gmo is historical (it was needed to avoid overwriting the
283
dnl GNU format catalogs when building on a platform with an X/Open gettext),
284
dnl but we keep it in order not to force irrelevant filename changes on the
287
AC_DEFUN([AM_GNU_GETTEXT],
289
dnl Argument checking.
290
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
291
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
293
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
294
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
296
define([gt_included_intl], ifelse([$1], [external], [no], [yes]))
297
define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
299
AC_REQUIRE([AM_PO_SUBDIRS])dnl
300
ifelse(gt_included_intl, yes, [
301
AC_REQUIRE([AM_INTL_SUBDIR])dnl
304
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
305
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
306
AC_REQUIRE([AC_LIB_RPATH])
308
dnl Sometimes libintl requires libiconv, so first search for libiconv.
309
dnl Ideally we would do this search only after the
310
dnl if test "$USE_NLS" = "yes"; then
311
dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
312
dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
313
dnl the configure script would need to contain the same shell code
314
dnl again, outside any 'if'. There are two solutions:
315
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
316
dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
317
dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
318
dnl documented, we avoid it.
319
ifelse(gt_included_intl, yes, , [
320
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
323
dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
329
ifelse(gt_included_intl, yes, [
330
BUILD_INCLUDED_LIBINTL=no
331
USE_INCLUDED_LIBINTL=no
337
dnl If we use NLS figure out what method
338
if test "$USE_NLS" = "yes"; then
339
gt_use_preinstalled_gnugettext=no
340
ifelse(gt_included_intl, yes, [
341
AC_MSG_CHECKING([whether included gettext is requested])
342
AC_ARG_WITH(included-gettext,
343
[ --with-included-gettext use the GNU gettext library included here],
344
nls_cv_force_use_gnu_gettext=$withval,
345
nls_cv_force_use_gnu_gettext=no)
346
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
348
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
349
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
351
dnl User does not insist on using GNU NLS library. Figure out what
352
dnl to use. If GNU gettext is available we use this. Else we have
353
dnl to fall back to GNU NLS library.
355
dnl Add a version number to the cache macros.
356
define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
357
define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
358
define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
360
AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
361
[AC_TRY_LINK([#include <libintl.h>
362
]ifelse([$2], [need-formatstring-macros],
363
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
364
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
367
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
369
], [])[extern int _nl_msg_cat_cntr;
370
extern int *_nl_domain_bindings;],
371
[bindtextdomain ("", "");
372
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
373
gt_cv_func_gnugettext_libc=yes,
374
gt_cv_func_gnugettext_libc=no)])
376
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
377
dnl Sometimes libintl requires libiconv, so first search for libiconv.
378
ifelse(gt_included_intl, yes, , [
381
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
382
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
383
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
384
dnl even if libiconv doesn't exist.
385
AC_LIB_LINKFLAGS_BODY([intl])
386
AC_CACHE_CHECK([for GNU gettext in libintl],
387
gt_cv_func_gnugettext_libintl,
388
[gt_save_CPPFLAGS="$CPPFLAGS"
389
CPPFLAGS="$CPPFLAGS $INCINTL"
391
LIBS="$LIBS $LIBINTL"
392
dnl Now see whether libintl exists and does not depend on libiconv.
393
AC_TRY_LINK([#include <libintl.h>
394
]ifelse([$2], [need-formatstring-macros],
395
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
396
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
399
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
401
], [])[extern int _nl_msg_cat_cntr;
406
const char *_nl_expand_alias (const char *);],
407
[bindtextdomain ("", "");
408
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
409
gt_cv_func_gnugettext_libintl=yes,
410
gt_cv_func_gnugettext_libintl=no)
411
dnl Now see whether libintl exists and depends on libiconv.
412
if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
413
LIBS="$LIBS $LIBICONV"
414
AC_TRY_LINK([#include <libintl.h>
415
]ifelse([$2], [need-formatstring-macros],
416
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
417
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
420
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
422
], [])[extern int _nl_msg_cat_cntr;
427
const char *_nl_expand_alias (const char *);],
428
[bindtextdomain ("", "");
429
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
430
[LIBINTL="$LIBINTL $LIBICONV"
431
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
432
gt_cv_func_gnugettext_libintl=yes
435
CPPFLAGS="$gt_save_CPPFLAGS"
436
LIBS="$gt_save_LIBS"])
439
dnl If an already present or preinstalled GNU gettext() is found,
440
dnl use it. But if this macro is used in GNU gettext, and GNU
441
dnl gettext is already preinstalled in libintl, we update this
442
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
443
if test "$gt_cv_func_gnugettext_libc" = "yes" \
444
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
445
&& test "$PACKAGE" != gettext-runtime \
446
&& test "$PACKAGE" != gettext-tools; }; then
447
gt_use_preinstalled_gnugettext=yes
449
dnl Reset the values set by searching for libintl.
455
ifelse(gt_included_intl, yes, [
456
if test "$gt_use_preinstalled_gnugettext" != "yes"; then
457
dnl GNU gettext is not found in the C library.
458
dnl Fall back on included GNU gettext library.
459
nls_cv_use_gnu_gettext=yes
463
if test "$nls_cv_use_gnu_gettext" = "yes"; then
464
dnl Mark actions used to generate GNU NLS library.
465
BUILD_INCLUDED_LIBINTL=yes
466
USE_INCLUDED_LIBINTL=yes
467
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
468
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
469
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
473
if test "$gt_use_preinstalled_gnugettext" = "yes" \
474
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
475
dnl Mark actions to use GNU gettext tools.
480
if test -n "$INTL_MACOSX_LIBS"; then
481
if test "$gt_use_preinstalled_gnugettext" = "yes" \
482
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
483
dnl Some extra flags are needed during linking.
484
LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
485
LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
489
if test "$gt_use_preinstalled_gnugettext" = "yes" \
490
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
491
AC_DEFINE(ENABLE_NLS, 1,
492
[Define to 1 if translation of program messages to the user's native language
499
AC_MSG_CHECKING([whether to use NLS])
500
AC_MSG_RESULT([$USE_NLS])
501
if test "$USE_NLS" = "yes"; then
502
AC_MSG_CHECKING([where the gettext function comes from])
503
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
504
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
505
gt_source="external libintl"
510
gt_source="included intl directory"
512
AC_MSG_RESULT([$gt_source])
515
if test "$USE_NLS" = "yes"; then
517
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
518
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
519
AC_MSG_CHECKING([how to link with libintl])
520
AC_MSG_RESULT([$LIBINTL])
521
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
524
dnl For backward compatibility. Some packages may be using this.
525
AC_DEFINE(HAVE_GETTEXT, 1,
526
[Define if the GNU gettext() function is already present or preinstalled.])
527
AC_DEFINE(HAVE_DCGETTEXT, 1,
528
[Define if the GNU dcgettext() function is already present or preinstalled.])
531
dnl We need to process the po/ directory.
535
ifelse(gt_included_intl, yes, [
536
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
537
dnl to 'yes' because some of the testsuite requires it.
538
if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
539
BUILD_INCLUDED_LIBINTL=yes
542
dnl Make all variables we use known to autoconf.
543
AC_SUBST(BUILD_INCLUDED_LIBINTL)
544
AC_SUBST(USE_INCLUDED_LIBINTL)
547
dnl For backward compatibility. Some configure.ins may be using this.
551
dnl For backward compatibility. Some Makefiles may be using this.
553
AC_SUBST(DATADIRNAME)
555
dnl For backward compatibility. Some Makefiles may be using this.
559
dnl For backward compatibility. Some Makefiles may be using this.
563
dnl For backward compatibility. Some Makefiles may be using this.
565
if test "$USE_INCLUDED_LIBINTL" = yes; then
566
INTLOBJS="\$(GETTOBJS)"
570
dnl Enable libtool support if the surrounding package wishes it.
571
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
572
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
575
dnl For backward compatibility. Some Makefiles may be using this.
579
dnl Make all documented variables known to autoconf.
586
dnl Checks for all prerequisites of the intl subdirectory,
587
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
588
dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
589
AC_DEFUN([AM_INTL_SUBDIR],
591
AC_REQUIRE([AC_PROG_INSTALL])dnl
592
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
593
AC_REQUIRE([AC_PROG_CC])dnl
594
AC_REQUIRE([AC_CANONICAL_HOST])dnl
595
AC_REQUIRE([gt_GLIBC2])dnl
596
AC_REQUIRE([AC_PROG_RANLIB])dnl
597
AC_REQUIRE([AC_ISC_POSIX])dnl
598
AC_REQUIRE([AC_HEADER_STDC])dnl
599
AC_REQUIRE([AC_C_CONST])dnl
600
AC_REQUIRE([bh_C_SIGNED])dnl
601
AC_REQUIRE([AC_C_INLINE])dnl
602
AC_REQUIRE([AC_TYPE_OFF_T])dnl
603
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
604
AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl
605
AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
606
AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
607
AC_REQUIRE([gt_TYPE_WINT_T])dnl
608
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
609
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
610
AC_REQUIRE([gt_TYPE_INTMAX_T])
611
AC_REQUIRE([gt_PRINTF_POSIX])
612
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
613
AC_REQUIRE([AC_FUNC_MMAP])dnl
614
AC_REQUIRE([gl_GLIBC21])dnl
615
AC_REQUIRE([gt_INTDIV0])dnl
616
AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
617
AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
618
AC_REQUIRE([gt_INTTYPES_PRI])dnl
619
AC_REQUIRE([gl_XSIZE])dnl
620
AC_REQUIRE([gt_INTL_MACOSX])dnl
622
AC_CHECK_TYPE([ptrdiff_t], ,
623
[AC_DEFINE([ptrdiff_t], [long],
624
[Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
626
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
627
stdlib.h string.h unistd.h sys/param.h])
628
AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
629
mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
630
strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
633
dnl Use the _snprintf function only if it is declared (because on NetBSD it
634
dnl is defined as a weak alias of snprintf; we prefer to use the latter).
635
gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
636
gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
638
dnl Use the *_unlocked functions only if they are declared.
639
dnl (because some of them were defined without being declared in Solaris
640
dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
641
dnl on Solaris 2.5.1 to run on Solaris 2.6).
642
dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
643
gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
644
gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
645
gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
647
case $gt_cv_func_printf_posix in
648
*yes) HAVE_POSIX_PRINTF=1 ;;
649
*) HAVE_POSIX_PRINTF=0 ;;
651
AC_SUBST([HAVE_POSIX_PRINTF])
652
if test "$ac_cv_func_asprintf" = yes; then
657
AC_SUBST([HAVE_ASPRINTF])
658
if test "$ac_cv_func_snprintf" = yes; then
663
AC_SUBST([HAVE_SNPRINTF])
664
if test "$ac_cv_func_wprintf" = yes; then
669
AC_SUBST([HAVE_WPRINTF])
673
if test $ac_cv_header_locale_h = yes; then
677
if test -n "$INTL_MACOSX_LIBS"; then
678
CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
681
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
682
dnl because plural.y uses bison specific features. It requires at least
683
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
685
dnl bison is only needed for the maintainer (who touches plural.y). But in
686
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
687
dnl the rule in general Makefile. Now, some people carelessly touch the
688
dnl files or have a broken "make" program, hence the plural.c rule will
689
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
690
dnl present or too old.
691
AC_CHECK_PROGS([INTLBISON], [bison])
692
if test -z "$INTLBISON"; then
695
dnl Found it, now check the version.
696
AC_MSG_CHECKING([version of bison])
697
changequote(<<,>>)dnl
698
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
699
case $ac_prog_version in
700
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
701
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
703
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
704
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
706
AC_MSG_RESULT([$ac_prog_version])
708
if test $ac_verc_fail = yes; then
714
dnl Checks for special options needed on MacOS X.
715
dnl Defines INTL_MACOSX_LIBS.
716
AC_DEFUN([gt_INTL_MACOSX],
718
dnl Check for API introduced in MacOS X 10.2.
719
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
720
gt_cv_func_CFPreferencesCopyAppValue,
721
[gt_save_CPPFLAGS="$CPPFLAGS"
722
CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
724
LIBS="$LIBS -framework CoreFoundation"
725
AC_TRY_LINK([#include <CFPreferences.h>],
726
[CFPreferencesCopyAppValue(NULL, NULL)],
727
[gt_cv_func_CFPreferencesCopyAppValue=yes],
728
[gt_cv_func_CFPreferencesCopyAppValue=no])
729
CPPFLAGS="$gt_save_CPPFLAGS"
730
LIBS="$gt_save_LIBS"])
731
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
732
AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
733
[Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
735
dnl Check for API introduced in MacOS X 10.3.
736
AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
737
[gt_save_CPPFLAGS="$CPPFLAGS"
738
CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
740
LIBS="$LIBS -framework CoreFoundation"
741
AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();],
742
[gt_cv_func_CFLocaleCopyCurrent=yes],
743
[gt_cv_func_CFLocaleCopyCurrent=no])
744
CPPFLAGS="$gt_save_CPPFLAGS"
745
LIBS="$gt_save_LIBS"])
746
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
747
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
748
[Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
751
if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
752
INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
754
AC_SUBST([INTL_MACOSX_LIBS])
758
dnl gt_CHECK_DECL(FUNC, INCLUDES)
759
dnl Check whether a function is declared.
760
AC_DEFUN([gt_CHECK_DECL],
762
AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
763
[AC_TRY_COMPILE([$2], [
765
char *p = (char *) $1;
767
], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
768
if test $ac_cv_have_decl_$1 = yes; then
773
AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
774
[Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
778
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
779
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
782
dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
783
dnl This file is free software; the Free Software Foundation
784
dnl gives unlimited permission to copy and/or distribute it,
785
dnl with or without modifications, as long as this notice is preserved.
787
# Test for the GNU C Library, version 2.0 or newer.
790
AC_DEFUN([gt_GLIBC2],
792
AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer,
794
[AC_EGREP_CPP([Lucky GNU user],
796
#include <features.h>
797
#ifdef __GNU_LIBRARY__
803
ac_cv_gnu_library_2=yes,
804
ac_cv_gnu_library_2=no)
808
GLIBC2="$ac_cv_gnu_library_2"
812
# glibc21.m4 serial 3
813
dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
814
dnl This file is free software; the Free Software Foundation
815
dnl gives unlimited permission to copy and/or distribute it,
816
dnl with or without modifications, as long as this notice is preserved.
818
# Test for the GNU C Library, version 2.1 or newer.
821
AC_DEFUN([gl_GLIBC21],
823
AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
824
ac_cv_gnu_library_2_1,
825
[AC_EGREP_CPP([Lucky GNU user],
827
#include <features.h>
828
#ifdef __GNU_LIBRARY__
829
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
834
ac_cv_gnu_library_2_1=yes,
835
ac_cv_gnu_library_2_1=no)
839
GLIBC21="$ac_cv_gnu_library_2_1"
843
# Configure paths for GTK+
844
# Owen Taylor 1997-2001
846
dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
847
dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
848
dnl pass to pkg-config
850
AC_DEFUN([AM_PATH_GTK_2_0],
852
dnl Get the cflags and libraries from pkg-config
854
AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
855
, enable_gtktest=yes)
857
pkg_config_args=gtk+-2.0
862
pkg_config_args="$pkg_config_args gthread-2.0"
869
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
871
if test x$PKG_CONFIG != xno ; then
872
if pkg-config --atleast-pkgconfig-version 0.7 ; then
875
echo "*** pkg-config too old; version 0.7 or better required."
883
min_gtk_version=ifelse([$1], ,2.0.0,$1)
884
AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
886
if test x$PKG_CONFIG != xno ; then
887
## don't try to run the test against uninstalled libtool libs
888
if $PKG_CONFIG --uninstalled $pkg_config_args; then
889
echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
893
if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
900
if test x"$no_gtk" = x ; then
901
GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
902
GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
903
gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
904
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
905
gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
906
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
907
gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
908
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
909
if test "x$enable_gtktest" = "xyes" ; then
910
ac_save_CFLAGS="$CFLAGS"
912
CFLAGS="$CFLAGS $GTK_CFLAGS"
913
LIBS="$GTK_LIBS $LIBS"
915
dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
916
dnl checks the results of pkg-config to some extent)
927
int major, minor, micro;
930
system ("touch conf.gtktest");
932
/* HP/UX 9 (%@#!) writes to sscanf strings */
933
tmp_version = g_strdup("$min_gtk_version");
934
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
935
printf("%s, bad version string\n", "$min_gtk_version");
939
if ((gtk_major_version != $gtk_config_major_version) ||
940
(gtk_minor_version != $gtk_config_minor_version) ||
941
(gtk_micro_version != $gtk_config_micro_version))
943
printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
944
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
945
gtk_major_version, gtk_minor_version, gtk_micro_version);
946
printf ("*** was found! If pkg-config was correct, then it is best\n");
947
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
948
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
949
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
950
printf("*** required on your system.\n");
951
printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
952
printf("*** to point to the correct configuration files\n");
954
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
955
(gtk_minor_version != GTK_MINOR_VERSION) ||
956
(gtk_micro_version != GTK_MICRO_VERSION))
958
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
959
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
960
printf("*** library (version %d.%d.%d)\n",
961
gtk_major_version, gtk_minor_version, gtk_micro_version);
965
if ((gtk_major_version > major) ||
966
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
967
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
973
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
974
gtk_major_version, gtk_minor_version, gtk_micro_version);
975
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
976
major, minor, micro);
977
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
979
printf("*** If you have already installed a sufficiently new version, this error\n");
980
printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
981
printf("*** being found. The easiest way to fix this is to remove the old version\n");
982
printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
983
printf("*** correct copy of pkg-config. (In this case, you will have to\n");
984
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
985
printf("*** so that the correct libraries are found at run-time))\n");
990
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
991
CFLAGS="$ac_save_CFLAGS"
995
if test "x$no_gtk" = x ; then
996
AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
997
ifelse([$2], , :, [$2])
1000
if test "$PKG_CONFIG" = "no" ; then
1001
echo "*** A new enough version of pkg-config was not found."
1002
echo "*** See http://pkgconfig.sourceforge.net"
1004
if test -f conf.gtktest ; then
1007
echo "*** Could not run GTK+ test program, checking why..."
1008
ac_save_CFLAGS="$CFLAGS"
1009
ac_save_LIBS="$LIBS"
1010
CFLAGS="$CFLAGS $GTK_CFLAGS"
1011
LIBS="$LIBS $GTK_LIBS"
1013
#include <gtk/gtk.h>
1015
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
1016
[ echo "*** The test program compiled, but did not run. This usually means"
1017
echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
1018
echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
1019
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1020
echo "*** to the installed location Also, make sure you have run ldconfig if that"
1021
echo "*** is required on your system"
1023
echo "*** If you have an old version installed, it is best to remove it, although"
1024
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
1025
[ echo "*** The test program failed to compile or link. See the file config.log for the"
1026
echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
1027
CFLAGS="$ac_save_CFLAGS"
1028
LIBS="$ac_save_LIBS"
1033
ifelse([$3], , :, [$3])
1035
AC_SUBST(GTK_CFLAGS)
1040
# Configure paths for GTK+
1041
# Owen Taylor 97-11-3
1043
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
1044
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
1046
AC_DEFUN(AM_PATH_GTK,
1048
dnl Get the cflags and libraries from the gtk-config script
1050
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
1051
gtk_config_prefix="$withval", gtk_config_prefix="")
1052
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
1053
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
1054
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
1055
, enable_gtktest=yes)
1061
gtk_config_args="$gtk_config_args gthread"
1066
if test x$gtk_config_exec_prefix != x ; then
1067
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
1068
if test x${GTK_CONFIG+set} != xset ; then
1069
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
1072
if test x$gtk_config_prefix != x ; then
1073
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
1074
if test x${GTK_CONFIG+set} != xset ; then
1075
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
1079
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
1080
min_gtk_version=ifelse([$1], ,0.99.7,$1)
1081
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
1083
if test "$GTK_CONFIG" = "no" ; then
1086
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
1087
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
1088
gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
1089
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1090
gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
1091
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1092
gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
1093
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1094
if test "x$enable_gtktest" = "xyes" ; then
1095
ac_save_CFLAGS="$CFLAGS"
1096
ac_save_LIBS="$LIBS"
1097
CFLAGS="$CFLAGS $GTK_CFLAGS"
1098
LIBS="$GTK_LIBS $LIBS"
1100
dnl Now check if the installed GTK is sufficiently new. (Also sanity
1101
dnl checks the results of gtk-config to some extent
1105
#include <gtk/gtk.h>
1112
int major, minor, micro;
1115
system ("touch conf.gtktest");
1117
/* HP/UX 9 (%@#!) writes to sscanf strings */
1118
tmp_version = g_strdup("$min_gtk_version");
1119
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
1120
printf("%s, bad version string\n", "$min_gtk_version");
1124
if ((gtk_major_version != $gtk_config_major_version) ||
1125
(gtk_minor_version != $gtk_config_minor_version) ||
1126
(gtk_micro_version != $gtk_config_micro_version))
1128
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
1129
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
1130
gtk_major_version, gtk_minor_version, gtk_micro_version);
1131
printf ("*** was found! If gtk-config was correct, then it is best\n");
1132
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
1133
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
1134
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
1135
printf("*** required on your system.\n");
1136
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
1137
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
1138
printf("*** before re-running configure\n");
1140
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
1141
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
1142
(gtk_minor_version != GTK_MINOR_VERSION) ||
1143
(gtk_micro_version != GTK_MICRO_VERSION))
1145
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
1146
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
1147
printf("*** library (version %d.%d.%d)\n",
1148
gtk_major_version, gtk_minor_version, gtk_micro_version);
1150
#endif /* defined (GTK_MAJOR_VERSION) ... */
1153
if ((gtk_major_version > major) ||
1154
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
1155
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
1161
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
1162
gtk_major_version, gtk_minor_version, gtk_micro_version);
1163
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
1164
major, minor, micro);
1165
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
1167
printf("*** If you have already installed a sufficiently new version, this error\n");
1168
printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
1169
printf("*** being found. The easiest way to fix this is to remove the old version\n");
1170
printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
1171
printf("*** correct copy of gtk-config. (In this case, you will have to\n");
1172
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
1173
printf("*** so that the correct libraries are found at run-time))\n");
1178
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1179
CFLAGS="$ac_save_CFLAGS"
1180
LIBS="$ac_save_LIBS"
1183
if test "x$no_gtk" = x ; then
1185
ifelse([$2], , :, [$2])
1188
if test "$GTK_CONFIG" = "no" ; then
1189
echo "*** The gtk-config script installed by GTK could not be found"
1190
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
1191
echo "*** your path, or set the GTK_CONFIG environment variable to the"
1192
echo "*** full path to gtk-config."
1194
if test -f conf.gtktest ; then
1197
echo "*** Could not run GTK test program, checking why..."
1198
CFLAGS="$CFLAGS $GTK_CFLAGS"
1199
LIBS="$LIBS $GTK_LIBS"
1201
#include <gtk/gtk.h>
1203
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
1204
[ echo "*** The test program compiled, but did not run. This usually means"
1205
echo "*** that the run-time linker is not finding GTK or finding the wrong"
1206
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
1207
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1208
echo "*** to the installed location Also, make sure you have run ldconfig if that"
1209
echo "*** is required on your system"
1211
echo "*** If you have an old version installed, it is best to remove it, although"
1212
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
1214
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
1215
echo "*** came with the system with the command"
1217
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
1218
[ echo "*** The test program failed to compile or link. See the file config.log for the"
1219
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
1220
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
1221
echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
1222
CFLAGS="$ac_save_CFLAGS"
1223
LIBS="$ac_save_LIBS"
1228
ifelse([$3], , :, [$3])
1230
AC_SUBST(GTK_CFLAGS)
1235
# iconv.m4 serial AM4 (gettext-0.11.3)
1236
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
1237
dnl This file is free software; the Free Software Foundation
1238
dnl gives unlimited permission to copy and/or distribute it,
1239
dnl with or without modifications, as long as this notice is preserved.
1241
dnl From Bruno Haible.
1243
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
1245
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
1246
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1247
AC_REQUIRE([AC_LIB_RPATH])
1249
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
1251
AC_LIB_LINKFLAGS_BODY([iconv])
1254
AC_DEFUN([AM_ICONV_LINK],
1256
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
1257
dnl those with the standalone portable GNU libiconv installed).
1259
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
1261
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
1263
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
1264
dnl because if the user has installed libiconv and not disabled its use
1265
dnl via --without-libiconv-prefix, he wants to use it. The first
1266
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
1267
am_save_CPPFLAGS="$CPPFLAGS"
1268
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
1270
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
1271
am_cv_func_iconv="no, consider installing GNU libiconv"
1273
AC_TRY_LINK([#include <stdlib.h>
1274
#include <iconv.h>],
1275
[iconv_t cd = iconv_open("","");
1276
iconv(cd,NULL,NULL,NULL,NULL);
1278
am_cv_func_iconv=yes)
1279
if test "$am_cv_func_iconv" != yes; then
1280
am_save_LIBS="$LIBS"
1281
LIBS="$LIBS $LIBICONV"
1282
AC_TRY_LINK([#include <stdlib.h>
1283
#include <iconv.h>],
1284
[iconv_t cd = iconv_open("","");
1285
iconv(cd,NULL,NULL,NULL,NULL);
1288
am_cv_func_iconv=yes)
1289
LIBS="$am_save_LIBS"
1292
if test "$am_cv_func_iconv" = yes; then
1293
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
1295
if test "$am_cv_lib_iconv" = yes; then
1296
AC_MSG_CHECKING([how to link with libiconv])
1297
AC_MSG_RESULT([$LIBICONV])
1299
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
1301
CPPFLAGS="$am_save_CPPFLAGS"
1306
AC_SUBST(LTLIBICONV)
1309
AC_DEFUN([AM_ICONV],
1312
if test "$am_cv_func_iconv" = yes; then
1313
AC_MSG_CHECKING([for iconv declaration])
1314
AC_CACHE_VAL(am_cv_proto_iconv, [
1322
#if defined(__STDC__) || defined(__cplusplus)
1323
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
1327
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
1328
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
1329
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
1330
AC_MSG_RESULT([$]{ac_t:-
1331
}[$]am_cv_proto_iconv)
1332
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
1333
[Define as const if the declaration of iconv() needs const.])
1337
# intdiv0.m4 serial 1 (gettext-0.11.3)
1338
dnl Copyright (C) 2002 Free Software Foundation, Inc.
1339
dnl This file is free software; the Free Software Foundation
1340
dnl gives unlimited permission to copy and/or distribute it,
1341
dnl with or without modifications, as long as this notice is preserved.
1343
dnl From Bruno Haible.
1345
AC_DEFUN([gt_INTDIV0],
1347
AC_REQUIRE([AC_PROG_CC])dnl
1348
AC_REQUIRE([AC_CANONICAL_HOST])dnl
1350
AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
1351
gt_cv_int_divbyzero_sigfpe,
1359
sigfpe_handler (int sig)
1361
sigfpe_handler (sig) int sig;
1364
/* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
1365
exit (sig != SIGFPE);
1375
signal (SIGFPE, sigfpe_handler);
1376
/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
1377
#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
1378
signal (SIGTRAP, sigfpe_handler);
1380
/* Linux/SPARC yields signal SIGILL. */
1381
#if defined (__sparc__) && defined (__linux__)
1382
signal (SIGILL, sigfpe_handler);
1389
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
1391
# Guess based on the CPU.
1393
alpha* | i[34567]86 | m68k | s390*)
1394
gt_cv_int_divbyzero_sigfpe="guessing yes";;
1396
gt_cv_int_divbyzero_sigfpe="guessing no";;
1400
case "$gt_cv_int_divbyzero_sigfpe" in
1404
AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
1405
[Define if integer division by zero raises signal SIGFPE.])
1408
# intmax.m4 serial 2 (gettext-0.14.2)
1409
dnl Copyright (C) 2002-2005 Free Software Foundation, Inc.
1410
dnl This file is free software; the Free Software Foundation
1411
dnl gives unlimited permission to copy and/or distribute it,
1412
dnl with or without modifications, as long as this notice is preserved.
1414
dnl From Bruno Haible.
1415
dnl Test whether the system has the 'intmax_t' type, but don't attempt to
1416
dnl find a replacement if it is lacking.
1418
AC_DEFUN([gt_TYPE_INTMAX_T],
1420
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
1421
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
1422
AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
1426
#if HAVE_STDINT_H_WITH_UINTMAX
1429
#if HAVE_INTTYPES_H_WITH_UINTMAX
1430
#include <inttypes.h>
1432
], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
1433
if test $gt_cv_c_intmax_t = yes; then
1434
AC_DEFINE(HAVE_INTMAX_T, 1,
1435
[Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
1439
# inttypes-pri.m4 serial 1 (gettext-0.11.4)
1440
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
1441
dnl This file is free software; the Free Software Foundation
1442
dnl gives unlimited permission to copy and/or distribute it,
1443
dnl with or without modifications, as long as this notice is preserved.
1445
dnl From Bruno Haible.
1447
# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
1448
# macros to non-string values. This is the case on AIX 4.3.3.
1450
AC_DEFUN([gt_INTTYPES_PRI],
1452
AC_REQUIRE([gt_HEADER_INTTYPES_H])
1453
if test $gt_cv_header_inttypes_h = yes; then
1454
AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
1455
gt_cv_inttypes_pri_broken,
1457
AC_TRY_COMPILE([#include <inttypes.h>
1461
], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
1464
if test "$gt_cv_inttypes_pri_broken" = yes; then
1465
AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
1466
[Define if <inttypes.h> exists and defines unusable PRI* macros.])
1470
# inttypes.m4 serial 1 (gettext-0.11.4)
1471
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
1472
dnl This file is free software; the Free Software Foundation
1473
dnl gives unlimited permission to copy and/or distribute it,
1474
dnl with or without modifications, as long as this notice is preserved.
1476
dnl From Paul Eggert.
1478
# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
1481
AC_DEFUN([gt_HEADER_INTTYPES_H],
1483
AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
1486
[#include <sys/types.h>
1487
#include <inttypes.h>],
1488
[], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
1490
if test $gt_cv_header_inttypes_h = yes; then
1491
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
1492
[Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
1496
# inttypes_h.m4 serial 6
1497
dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
1498
dnl This file is free software; the Free Software Foundation
1499
dnl gives unlimited permission to copy and/or distribute it,
1500
dnl with or without modifications, as long as this notice is preserved.
1502
dnl From Paul Eggert.
1504
# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
1505
# doesn't clash with <sys/types.h>, and declares uintmax_t.
1507
AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
1509
AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h,
1511
[#include <sys/types.h>
1512
#include <inttypes.h>],
1513
[uintmax_t i = (uintmax_t) -1;],
1514
gl_cv_header_inttypes_h=yes,
1515
gl_cv_header_inttypes_h=no)])
1516
if test $gl_cv_header_inttypes_h = yes; then
1517
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
1518
[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
1519
and declares uintmax_t. ])
1523
# lcmessage.m4 serial 4 (gettext-0.14.2)
1524
dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc.
1525
dnl This file is free software; the Free Software Foundation
1526
dnl gives unlimited permission to copy and/or distribute it,
1527
dnl with or without modifications, as long as this notice is preserved.
1529
dnl This file can can be used in projects which are not available under
1530
dnl the GNU General Public License or the GNU Library General Public
1531
dnl License but which still want to provide support for the GNU gettext
1533
dnl Please note that the actual code of the GNU gettext library is covered
1534
dnl by the GNU Library General Public License, and the rest of the GNU
1535
dnl gettext package package is covered by the GNU General Public License.
1536
dnl They are *not* in the public domain.
1539
dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
1541
# Check whether LC_MESSAGES is available in <locale.h>.
1543
AC_DEFUN([gt_LC_MESSAGES],
1545
AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES,
1546
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1547
gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)])
1548
if test $gt_cv_val_LC_MESSAGES = yes; then
1549
AC_DEFINE(HAVE_LC_MESSAGES, 1,
1550
[Define if your <locale.h> file defines LC_MESSAGES.])
1554
# lib-ld.m4 serial 3 (gettext-0.13)
1555
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
1556
dnl This file is free software; the Free Software Foundation
1557
dnl gives unlimited permission to copy and/or distribute it,
1558
dnl with or without modifications, as long as this notice is preserved.
1560
dnl Subroutines of libtool.m4,
1561
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
1562
dnl with libtool.m4.
1564
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
1565
AC_DEFUN([AC_LIB_PROG_LD_GNU],
1566
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
1567
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1568
case `$LD -v 2>&1 </dev/null` in
1569
*GNU* | *'with BFD'*)
1570
acl_cv_prog_gnu_ld=yes ;;
1572
acl_cv_prog_gnu_ld=no ;;
1574
with_gnu_ld=$acl_cv_prog_gnu_ld
1577
dnl From libtool-1.4. Sets the variable LD.
1578
AC_DEFUN([AC_LIB_PROG_LD],
1579
[AC_ARG_WITH(gnu-ld,
1580
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
1581
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
1582
AC_REQUIRE([AC_PROG_CC])dnl
1583
AC_REQUIRE([AC_CANONICAL_HOST])dnl
1584
# Prepare PATH_SEPARATOR.
1585
# The user is always right.
1586
if test "${PATH_SEPARATOR+set}" != set; then
1587
echo "#! /bin/sh" >conf$$.sh
1588
echo "exit 0" >>conf$$.sh
1590
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
1598
if test "$GCC" = yes; then
1599
# Check if gcc -print-prog-name=ld gives a path.
1600
AC_MSG_CHECKING([for ld used by GCC])
1603
# gcc leaves a trailing carriage return which upsets mingw
1604
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1606
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1609
# Accept absolute paths.
1610
[[\\/]* | [A-Za-z]:[\\/]*)]
1611
[re_direlt='/[^/][^/]*/\.\./']
1612
# Canonicalize the path of ld
1613
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1614
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1615
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1617
test -z "$LD" && LD="$ac_prog"
1620
# If it fails, then pretend we aren't using GCC.
1624
# If it is relative, then search for the first ld in PATH.
1628
elif test "$with_gnu_ld" = yes; then
1629
AC_MSG_CHECKING([for GNU ld])
1631
AC_MSG_CHECKING([for non-GNU ld])
1633
AC_CACHE_VAL(acl_cv_path_LD,
1634
[if test -z "$LD"; then
1635
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1636
for ac_dir in $PATH; do
1637
test -z "$ac_dir" && ac_dir=.
1638
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1639
acl_cv_path_LD="$ac_dir/$ac_prog"
1640
# Check to see if the program is GNU ld. I'd rather use --version,
1641
# but apparently some GNU ld's only accept -v.
1642
# Break only if it was the GNU/non-GNU ld that we prefer.
1643
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
1644
*GNU* | *'with BFD'*)
1645
test "$with_gnu_ld" != no && break ;;
1647
test "$with_gnu_ld" != yes && break ;;
1653
acl_cv_path_LD="$LD" # Let the user override the test with a path.
1655
LD="$acl_cv_path_LD"
1656
if test -n "$LD"; then
30
1659
AC_MSG_RESULT(no)
31
ifelse([$2], , :, [$2])
34
GNOMEUI_CFLAGS=`$GNOME_CONFIG --cflags gnomeui`
35
GNOMEUI_LIBS=`$GNOME_CONFIG --libs gnomeui`
36
ifelse([$1], , :, [$1])
38
AC_SUBST(GNOMEUI_CFLAGS)
39
AC_SUBST(GNOMEUI_LIBS)
41
AC_SUBST(EXTRACXXFLAGS)
44
# lib-prefix.m4 serial 3 (gettext-0.12.2)
45
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
46
dnl This file is free software, distributed under the terms of the GNU
47
dnl General Public License. As a special exception to the GNU General
48
dnl Public License, this file may be distributed as part of a program
49
dnl that contains a configuration script generated by Autoconf, under
50
dnl the same distribution terms as the rest of that program.
52
dnl From Bruno Haible.
54
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
55
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
56
dnl require excessive bracketing.
57
ifdef([AC_HELP_STRING],
58
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
59
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
61
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
62
dnl to access previously installed libraries. The basic assumption is that
63
dnl a user will want packages to use other packages he previously installed
64
dnl with the same --prefix option.
65
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
66
dnl libraries, but is otherwise very convenient.
67
AC_DEFUN([AC_LIB_PREFIX],
69
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
70
AC_REQUIRE([AC_PROG_CC])
71
AC_REQUIRE([AC_CANONICAL_HOST])
72
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
73
dnl By default, look in $includedir and $libdir.
75
AC_LIB_WITH_FINAL_PREFIX([
76
eval additional_includedir=\"$includedir\"
77
eval additional_libdir=\"$libdir\"
79
AC_LIB_ARG_WITH([lib-prefix],
80
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
81
--without-lib-prefix don't search for libraries in includedir and libdir],
83
if test "X$withval" = "Xno"; then
86
if test "X$withval" = "X"; then
87
AC_LIB_WITH_FINAL_PREFIX([
88
eval additional_includedir=\"$includedir\"
89
eval additional_libdir=\"$libdir\"
92
additional_includedir="$withval/include"
93
additional_libdir="$withval/lib"
97
if test $use_additional = yes; then
98
dnl Potentially add $additional_includedir to $CPPFLAGS.
100
dnl 1. if it's the standard /usr/include,
101
dnl 2. if it's already present in $CPPFLAGS,
102
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
103
dnl 4. if it doesn't exist as a directory.
104
if test "X$additional_includedir" != "X/usr/include"; then
106
for x in $CPPFLAGS; do
107
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
108
if test "X$x" = "X-I$additional_includedir"; then
113
if test -z "$haveit"; then
114
if test "X$additional_includedir" = "X/usr/local/include"; then
115
if test -n "$GCC"; then
121
if test -z "$haveit"; then
122
if test -d "$additional_includedir"; then
123
dnl Really add $additional_includedir to $CPPFLAGS.
124
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
129
dnl Potentially add $additional_libdir to $LDFLAGS.
131
dnl 1. if it's the standard /usr/lib,
132
dnl 2. if it's already present in $LDFLAGS,
133
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
134
dnl 4. if it doesn't exist as a directory.
135
if test "X$additional_libdir" != "X/usr/lib"; then
137
for x in $LDFLAGS; do
138
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
139
if test "X$x" = "X-L$additional_libdir"; then
144
if test -z "$haveit"; then
145
if test "X$additional_libdir" = "X/usr/local/lib"; then
146
if test -n "$GCC"; then
152
if test -z "$haveit"; then
153
if test -d "$additional_libdir"; then
154
dnl Really add $additional_libdir to $LDFLAGS.
155
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
163
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
164
dnl acl_final_exec_prefix, containing the values to which $prefix and
165
dnl $exec_prefix will expand at the end of the configure script.
166
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
168
dnl Unfortunately, prefix and exec_prefix get only finally determined
169
dnl at the end of configure.
170
if test "X$prefix" = "XNONE"; then
171
acl_final_prefix="$ac_default_prefix"
173
acl_final_prefix="$prefix"
175
if test "X$exec_prefix" = "XNONE"; then
176
acl_final_exec_prefix='${prefix}'
178
acl_final_exec_prefix="$exec_prefix"
180
acl_save_prefix="$prefix"
181
prefix="$acl_final_prefix"
182
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
183
prefix="$acl_save_prefix"
186
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
187
dnl variables prefix and exec_prefix bound to the values they will have
188
dnl at the end of the configure script.
189
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
191
acl_save_prefix="$prefix"
192
prefix="$acl_final_prefix"
193
acl_save_exec_prefix="$exec_prefix"
194
exec_prefix="$acl_final_exec_prefix"
196
exec_prefix="$acl_save_exec_prefix"
197
prefix="$acl_save_prefix"
200
# lib-link.m4 serial 4 (gettext-0.12)
201
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
202
dnl This file is free software, distributed under the terms of the GNU
203
dnl General Public License. As a special exception to the GNU General
204
dnl Public License, this file may be distributed as part of a program
205
dnl that contains a configuration script generated by Autoconf, under
206
dnl the same distribution terms as the rest of that program.
208
dnl From Bruno Haible.
1661
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1665
# lib-link.m4 serial 6 (gettext-0.14.3)
1666
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
1667
dnl This file is free software; the Free Software Foundation
1668
dnl gives unlimited permission to copy and/or distribute it,
1669
dnl with or without modifications, as long as this notice is preserved.
1671
dnl From Bruno Haible.
210
1675
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
211
1676
dnl the libraries corresponding to explicit and implicit dependencies.
752
# lib-ld.m4 serial 2 (gettext-0.12)
753
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
754
dnl This file is free software, distributed under the terms of the GNU
755
dnl General Public License. As a special exception to the GNU General
756
dnl Public License, this file may be distributed as part of a program
757
dnl that contains a configuration script generated by Autoconf, under
758
dnl the same distribution terms as the rest of that program.
760
dnl Subroutines of libtool.m4,
761
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
764
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
765
AC_DEFUN([AC_LIB_PROG_LD_GNU],
766
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
767
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
768
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
769
acl_cv_prog_gnu_ld=yes
771
acl_cv_prog_gnu_ld=no
773
with_gnu_ld=$acl_cv_prog_gnu_ld
776
dnl From libtool-1.4. Sets the variable LD.
777
AC_DEFUN([AC_LIB_PROG_LD],
779
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
780
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
781
AC_REQUIRE([AC_PROG_CC])dnl
782
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2219
# lib-prefix.m4 serial 4 (gettext-0.14.2)
2220
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
2221
dnl This file is free software; the Free Software Foundation
2222
dnl gives unlimited permission to copy and/or distribute it,
2223
dnl with or without modifications, as long as this notice is preserved.
2225
dnl From Bruno Haible.
2227
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
2228
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
2229
dnl require excessive bracketing.
2230
ifdef([AC_HELP_STRING],
2231
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
2232
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
2234
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
2235
dnl to access previously installed libraries. The basic assumption is that
2236
dnl a user will want packages to use other packages he previously installed
2237
dnl with the same --prefix option.
2238
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
2239
dnl libraries, but is otherwise very convenient.
2240
AC_DEFUN([AC_LIB_PREFIX],
2242
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
2243
AC_REQUIRE([AC_PROG_CC])
2244
AC_REQUIRE([AC_CANONICAL_HOST])
2245
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2246
dnl By default, look in $includedir and $libdir.
2248
AC_LIB_WITH_FINAL_PREFIX([
2249
eval additional_includedir=\"$includedir\"
2250
eval additional_libdir=\"$libdir\"
2252
AC_LIB_ARG_WITH([lib-prefix],
2253
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
2254
--without-lib-prefix don't search for libraries in includedir and libdir],
2256
if test "X$withval" = "Xno"; then
2259
if test "X$withval" = "X"; then
2260
AC_LIB_WITH_FINAL_PREFIX([
2261
eval additional_includedir=\"$includedir\"
2262
eval additional_libdir=\"$libdir\"
2265
additional_includedir="$withval/include"
2266
additional_libdir="$withval/lib"
2270
if test $use_additional = yes; then
2271
dnl Potentially add $additional_includedir to $CPPFLAGS.
2272
dnl But don't add it
2273
dnl 1. if it's the standard /usr/include,
2274
dnl 2. if it's already present in $CPPFLAGS,
2275
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
2276
dnl 4. if it doesn't exist as a directory.
2277
if test "X$additional_includedir" != "X/usr/include"; then
2279
for x in $CPPFLAGS; do
2280
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2281
if test "X$x" = "X-I$additional_includedir"; then
2286
if test -z "$haveit"; then
2287
if test "X$additional_includedir" = "X/usr/local/include"; then
2288
if test -n "$GCC"; then
2290
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
2294
if test -z "$haveit"; then
2295
if test -d "$additional_includedir"; then
2296
dnl Really add $additional_includedir to $CPPFLAGS.
2297
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
2302
dnl Potentially add $additional_libdir to $LDFLAGS.
2303
dnl But don't add it
2304
dnl 1. if it's the standard /usr/lib,
2305
dnl 2. if it's already present in $LDFLAGS,
2306
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
2307
dnl 4. if it doesn't exist as a directory.
2308
if test "X$additional_libdir" != "X/usr/lib"; then
2310
for x in $LDFLAGS; do
2311
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2312
if test "X$x" = "X-L$additional_libdir"; then
2317
if test -z "$haveit"; then
2318
if test "X$additional_libdir" = "X/usr/local/lib"; then
2319
if test -n "$GCC"; then
2321
linux*) haveit=yes;;
2325
if test -z "$haveit"; then
2326
if test -d "$additional_libdir"; then
2327
dnl Really add $additional_libdir to $LDFLAGS.
2328
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
2336
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
2337
dnl acl_final_exec_prefix, containing the values to which $prefix and
2338
dnl $exec_prefix will expand at the end of the configure script.
2339
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
2341
dnl Unfortunately, prefix and exec_prefix get only finally determined
2342
dnl at the end of configure.
2343
if test "X$prefix" = "XNONE"; then
2344
acl_final_prefix="$ac_default_prefix"
2346
acl_final_prefix="$prefix"
2348
if test "X$exec_prefix" = "XNONE"; then
2349
acl_final_exec_prefix='${prefix}'
2351
acl_final_exec_prefix="$exec_prefix"
2353
acl_save_prefix="$prefix"
2354
prefix="$acl_final_prefix"
2355
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
2356
prefix="$acl_save_prefix"
2359
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
2360
dnl variables prefix and exec_prefix bound to the values they will have
2361
dnl at the end of the configure script.
2362
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
2364
acl_save_prefix="$prefix"
2365
prefix="$acl_final_prefix"
2366
acl_save_exec_prefix="$exec_prefix"
2367
exec_prefix="$acl_final_exec_prefix"
2369
exec_prefix="$acl_save_exec_prefix"
2370
prefix="$acl_save_prefix"
2373
# longdouble.m4 serial 1 (gettext-0.12)
2374
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
2375
dnl This file is free software; the Free Software Foundation
2376
dnl gives unlimited permission to copy and/or distribute it,
2377
dnl with or without modifications, as long as this notice is preserved.
2379
dnl From Bruno Haible.
2380
dnl Test whether the compiler supports the 'long double' type.
2381
dnl Prerequisite: AC_PROG_CC
2383
AC_DEFUN([gt_TYPE_LONGDOUBLE],
2385
AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
2386
[if test "$GCC" = yes; then
2387
gt_cv_c_long_double=yes
2390
/* The Stardent Vistra knows sizeof(long double), but does not support it. */
2391
long double foo = 0.0;
2392
/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
2393
int array [2*(sizeof(long double) >= sizeof(double)) - 1];
2395
gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
2397
if test $gt_cv_c_long_double = yes; then
2398
AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
2402
# longlong.m4 serial 5
2403
dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
2404
dnl This file is free software; the Free Software Foundation
2405
dnl gives unlimited permission to copy and/or distribute it,
2406
dnl with or without modifications, as long as this notice is preserved.
2408
dnl From Paul Eggert.
2410
# Define HAVE_LONG_LONG if 'long long' works.
2412
AC_DEFUN([gl_AC_TYPE_LONG_LONG],
2414
AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
2415
[AC_TRY_LINK([long long ll = 1LL; int i = 63;],
2416
[long long llmax = (long long) -1;
2417
return ll << i | ll >> i | llmax / ll | llmax % ll;],
2418
ac_cv_type_long_long=yes,
2419
ac_cv_type_long_long=no)])
2420
if test $ac_cv_type_long_long = yes; then
2421
AC_DEFINE(HAVE_LONG_LONG, 1,
2422
[Define if you have the 'long long' type.])
2426
# nls.m4 serial 2 (gettext-0.14.3)
2427
dnl Copyright (C) 1995-2003, 2005 Free Software Foundation, Inc.
2428
dnl This file is free software; the Free Software Foundation
2429
dnl gives unlimited permission to copy and/or distribute it,
2430
dnl with or without modifications, as long as this notice is preserved.
2432
dnl This file can can be used in projects which are not available under
2433
dnl the GNU General Public License or the GNU Library General Public
2434
dnl License but which still want to provide support for the GNU gettext
2436
dnl Please note that the actual code of the GNU gettext library is covered
2437
dnl by the GNU Library General Public License, and the rest of the GNU
2438
dnl gettext package package is covered by the GNU General Public License.
2439
dnl They are *not* in the public domain.
2442
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
2443
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
2449
AC_MSG_CHECKING([whether NLS is requested])
2450
dnl Default is enabled NLS
2452
[ --disable-nls do not use Native Language Support],
2453
USE_NLS=$enableval, USE_NLS=yes)
2454
AC_MSG_RESULT($USE_NLS)
2458
AC_DEFUN([AM_MKINSTALLDIRS],
2460
dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing.
2461
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])])
2462
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
2463
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
2464
dnl Try to locate it.
2466
if test -n "$ac_aux_dir"; then
2467
case "$ac_aux_dir" in
2468
/*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
2469
*) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
2472
if test -z "$MKINSTALLDIRS"; then
2473
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
2475
AC_SUBST(MKINSTALLDIRS)
2478
# po.m4 serial 7 (gettext-0.14.3)
2479
dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
2480
dnl This file is free software; the Free Software Foundation
2481
dnl gives unlimited permission to copy and/or distribute it,
2482
dnl with or without modifications, as long as this notice is preserved.
2484
dnl This file can can be used in projects which are not available under
2485
dnl the GNU General Public License or the GNU Library General Public
2486
dnl License but which still want to provide support for the GNU gettext
2488
dnl Please note that the actual code of the GNU gettext library is covered
2489
dnl by the GNU Library General Public License, and the rest of the GNU
2490
dnl gettext package package is covered by the GNU General Public License.
2491
dnl They are *not* in the public domain.
2494
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
2495
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
2499
dnl Checks for all prerequisites of the po subdirectory.
2500
AC_DEFUN([AM_PO_SUBDIRS],
2502
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2503
AC_REQUIRE([AC_PROG_INSTALL])dnl
2504
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
2505
AC_REQUIRE([AM_NLS])dnl
2507
dnl Perform the following tests also if --disable-nls has been given,
2508
dnl because they are needed for "make dist" to work.
2510
dnl Search for GNU msgfmt in the PATH.
2511
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
2512
dnl The second test excludes FreeBSD msgfmt.
2513
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
2514
[$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
2515
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
2517
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
2519
dnl Search for GNU xgettext 0.12 or newer in the PATH.
2520
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
2521
dnl The second test excludes FreeBSD xgettext.
2522
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
2523
[$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
2524
(if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
2526
dnl Remove leftover from FreeBSD xgettext call.
2529
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
2530
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
2531
[$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
2533
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
2534
dnl Test whether we really found GNU msgfmt.
2535
if test "$GMSGFMT" != ":"; then
2536
dnl If it is no GNU msgfmt we define it as : so that the
2537
dnl Makefiles still can work.
2538
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
2539
(if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
2542
GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
2544
[found $GMSGFMT program is not GNU msgfmt; ignore it])
2549
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
2550
dnl Test whether we really found GNU xgettext.
2551
if test "$XGETTEXT" != ":"; then
2552
dnl If it is no GNU xgettext we define it as : so that the
2553
dnl Makefiles still can work.
2554
if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
2555
(if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
2559
[found xgettext program is not GNU xgettext; ignore it])
2562
dnl Remove leftover from FreeBSD xgettext call.
2566
AC_OUTPUT_COMMANDS([
2567
for ac_file in $CONFIG_FILES; do
2568
# Support "outfile[:infile[:infile...]]"
2570
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2572
# PO directories have a Makefile.in generated from Makefile.in.in.
2573
case "$ac_file" in */Makefile.in)
2574
# Adjust a relative srcdir.
2575
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2576
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
2577
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2578
# In autoconf-2.13 it is called $ac_given_srcdir.
2579
# In autoconf-2.50 it is called $srcdir.
2580
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2581
case "$ac_given_srcdir" in
2582
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2583
/*) top_srcdir="$ac_given_srcdir" ;;
2584
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
2586
# Treat a directory as a PO directory if and only if it has a
2587
# POTFILES.in file. This allows packages to have multiple PO
2588
# directories under different names or in different locations.
2589
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
2590
rm -f "$ac_dir/POTFILES"
2591
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
2592
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
2593
POMAKEFILEDEPS="POTFILES.in"
2594
# ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
2595
# on $ac_dir but don't depend on user-specified configuration
2597
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2598
# The LINGUAS file contains the set of available languages.
2599
if test -n "$OBSOLETE_ALL_LINGUAS"; then
2600
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2602
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2603
# Hide the ALL_LINGUAS assigment from automake.
2604
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2605
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2607
# The set of available languages was given in configure.in.
2608
eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
2611
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2612
# Compute UPDATEPOFILES
2613
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2614
# Compute DUMMYPOFILES
2615
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2617
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2618
case "$ac_given_srcdir" in
2620
*) srcdirpre='$(srcdir)/' ;;
2626
for lang in $ALL_LINGUAS; do
2627
POFILES="$POFILES $srcdirpre$lang.po"
2628
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2629
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2630
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2632
# CATALOGS depends on both $ac_dir and the user's LINGUAS
2633
# environment variable.
2635
if test -n "$ALL_LINGUAS"; then
2636
for presentlang in $ALL_LINGUAS; do
2638
if test "%UNSET%" != "$LINGUAS"; then
2639
desiredlanguages="$LINGUAS"
2641
desiredlanguages="$ALL_LINGUAS"
2643
for desiredlang in $desiredlanguages; do
2644
# Use the presentlang catalog if desiredlang is
2645
# a. equal to presentlang, or
2646
# b. a variant of presentlang (because in this case,
2647
# presentlang can be used as a fallback for messages
2648
# which are not translated in the desiredlang catalog).
2649
case "$desiredlang" in
2650
"$presentlang"*) useit=yes;;
2653
if test $useit = yes; then
2654
INST_LINGUAS="$INST_LINGUAS $presentlang"
2659
if test -n "$INST_LINGUAS"; then
2660
for lang in $INST_LINGUAS; do
2661
CATALOGS="$CATALOGS $lang.gmo"
2664
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
2665
sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
2666
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
2667
if test -f "$f"; then
2669
*.orig | *.bak | *~) ;;
2670
*) cat "$f" >> "$ac_dir/Makefile" ;;
2678
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute
2679
# POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
2681
eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
2682
# Capture the value of LINGUAS because we need it to compute CATALOGS.
2683
LINGUAS="${LINGUAS-%UNSET%}"
2687
dnl Postprocesses a Makefile in a directory containing PO files.
2688
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
2690
# When this code is run, in config.status, two variables have already been
2692
# - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
2693
# - LINGUAS is the value of the environment variable LINGUAS at configure
2697
# Adjust a relative srcdir.
2698
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2699
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
2700
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2701
# In autoconf-2.13 it is called $ac_given_srcdir.
2702
# In autoconf-2.50 it is called $srcdir.
2703
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2704
case "$ac_given_srcdir" in
2705
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2706
/*) top_srcdir="$ac_given_srcdir" ;;
2707
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
2710
# Find a way to echo strings without interpreting backslash.
2711
if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
2714
if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
2715
gt_echo='printf %s\n'
2726
# A sed script that extracts the value of VARIABLE from a Makefile.
2728
# Test if the hold space is empty.
2733
# Yes it was empty. Look if we have the expected variable definition.
2734
/^[ ]*VARIABLE[ ]*=/{
2735
# Seen the first line of the variable definition.
2736
s/^[ ]*VARIABLE[ ]*=//
2741
# Here we are processing a line from the variable definition.
2742
# Remove comment, more precisely replace it with a space.
2744
# See if the line ends in a backslash.
2748
# Print the line, without the trailing backslash.
2751
# There was no trailing backslash. The end of the variable definition is
2752
# reached. Clear the hold space.
2757
# A trailing backslash means that the variable definition continues in the
2758
# next line. Put a nonempty string into the hold space to indicate this.
2765
# Set POTFILES to the value of the Makefile variable POTFILES.
2766
sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
2767
POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
2768
# Compute POTFILES_DEPS as
2769
# $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
2771
for file in $POTFILES; do
2772
POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
2776
if test -n "$OBSOLETE_ALL_LINGUAS"; then
2777
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2779
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2780
# The LINGUAS file contains the set of available languages.
2781
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2782
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2784
# Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
2785
sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
2786
ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
2788
# Hide the ALL_LINGUAS assigment from automake.
2789
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2791
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2792
# Compute UPDATEPOFILES
2793
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2794
# Compute DUMMYPOFILES
2795
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2797
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2798
# Compute PROPERTIESFILES
2799
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
2800
# Compute CLASSFILES
2801
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
2803
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
2805
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
2806
# Compute RESOURCESDLLFILES
2807
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
2808
case "$ac_given_srcdir" in
2810
*) srcdirpre='$(srcdir)/' ;;
2821
for lang in $ALL_LINGUAS; do
2822
POFILES="$POFILES $srcdirpre$lang.po"
2823
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2824
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2825
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2826
PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
2827
CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
2828
QMFILES="$QMFILES $srcdirpre$lang.qm"
2829
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2830
MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
2831
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
2832
RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
2834
# CATALOGS depends on both $ac_dir and the user's LINGUAS
2835
# environment variable.
2837
if test -n "$ALL_LINGUAS"; then
2838
for presentlang in $ALL_LINGUAS; do
2840
if test "%UNSET%" != "$LINGUAS"; then
2841
desiredlanguages="$LINGUAS"
2843
desiredlanguages="$ALL_LINGUAS"
2845
for desiredlang in $desiredlanguages; do
2846
# Use the presentlang catalog if desiredlang is
2847
# a. equal to presentlang, or
2848
# b. a variant of presentlang (because in this case,
2849
# presentlang can be used as a fallback for messages
2850
# which are not translated in the desiredlang catalog).
2851
case "$desiredlang" in
2852
"$presentlang"*) useit=yes;;
2855
if test $useit = yes; then
2856
INST_LINGUAS="$INST_LINGUAS $presentlang"
2865
if test -n "$INST_LINGUAS"; then
2866
for lang in $INST_LINGUAS; do
2867
CATALOGS="$CATALOGS $lang.gmo"
2868
JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
2869
QTCATALOGS="$QTCATALOGS $lang.qm"
2870
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2871
TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
2872
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
2873
CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
2877
sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
2878
if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
2879
# Add dependencies that cannot be formulated as a simple suffix rule.
2880
for lang in $ALL_LINGUAS; do
2881
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2882
cat >> "$ac_file.tmp" <<EOF
2883
$frobbedlang.msg: $lang.po
2884
@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
2885
\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2889
if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
2890
# Add dependencies that cannot be formulated as a simple suffix rule.
2891
for lang in $ALL_LINGUAS; do
2892
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
2893
cat >> "$ac_file.tmp" <<EOF
2894
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
2895
@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
2896
\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2900
if test -n "$POMAKEFILEDEPS"; then
2901
cat >> "$ac_file.tmp" <<EOF
2902
Makefile: $POMAKEFILEDEPS
2905
mv "$ac_file.tmp" "$ac_file"
2908
# printf-posix.m4 serial 2 (gettext-0.13.1)
2909
dnl Copyright (C) 2003 Free Software Foundation, Inc.
2910
dnl This file is free software; the Free Software Foundation
2911
dnl gives unlimited permission to copy and/or distribute it,
2912
dnl with or without modifications, as long as this notice is preserved.
2914
dnl From Bruno Haible.
2915
dnl Test whether the printf() function supports POSIX/XSI format strings with
2918
AC_DEFUN([gt_PRINTF_POSIX],
2920
AC_REQUIRE([AC_PROG_CC])
2921
AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
2922
gt_cv_func_printf_posix,
2927
/* The string "%2$d %1$d", with dollar characters protected from the shell's
2928
dollar expansion (possibly an autoconf bug). */
2929
static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
2930
static char buf[100];
2933
sprintf (buf, format, 33, 55);
2934
return (strcmp (buf, "55 33") != 0);
2935
}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
2937
AC_EGREP_CPP(notposix, [
2938
#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
2941
], gt_cv_func_printf_posix="guessing no",
2942
gt_cv_func_printf_posix="guessing yes")
2945
case $gt_cv_func_printf_posix in
2947
AC_DEFINE(HAVE_POSIX_PRINTF, 1,
2948
[Define if your printf() function supports format strings with positions.])
2953
# progtest.m4 serial 4 (gettext-0.14.2)
2954
dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
2955
dnl This file is free software; the Free Software Foundation
2956
dnl gives unlimited permission to copy and/or distribute it,
2957
dnl with or without modifications, as long as this notice is preserved.
2959
dnl This file can can be used in projects which are not available under
2960
dnl the GNU General Public License or the GNU Library General Public
2961
dnl License but which still want to provide support for the GNU gettext
2963
dnl Please note that the actual code of the GNU gettext library is covered
2964
dnl by the GNU Library General Public License, and the rest of the GNU
2965
dnl gettext package package is covered by the GNU General Public License.
2966
dnl They are *not* in the public domain.
2969
dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
2973
# Search path for a program which passes the given test.
2975
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2976
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2977
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
783
2979
# Prepare PATH_SEPARATOR.
784
2980
# The user is always right.
785
2981
if test "${PATH_SEPARATOR+set}" != set; then
797
if test "$GCC" = yes; then
798
# Check if gcc -print-prog-name=ld gives a path.
799
AC_MSG_CHECKING([for ld used by GCC])
802
# gcc leaves a trailing carriage return which upsets mingw
803
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2993
# Find out how to test for executable files. Don't use a zero-byte file,
2994
# as systems may use methods other than mode bits to determine executability.
2995
cat >conf$$.file <<_ASEOF
2999
chmod +x conf$$.file
3000
if test -x conf$$.file >/dev/null 2>&1; then
3001
ac_executable_p="test -x"
3003
ac_executable_p="test -f"
3007
# Extract the first word of "$2", so it can be a program name with args.
3008
set dummy $2; ac_word=[$]2
3009
AC_MSG_CHECKING([for $ac_word])
3010
AC_CACHE_VAL(ac_cv_path_$1,
3012
[[\\/]]* | ?:[[\\/]]*)
3013
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
805
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
808
# Accept absolute paths.
809
[[\\/]* | [A-Za-z]:[\\/]*)]
810
[re_direlt='/[^/][^/]*/\.\./']
811
# Canonicalize the path of ld
812
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
813
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
814
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3016
ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
3017
for ac_dir in ifelse([$5], , $PATH, [$5]); do
3019
test -z "$ac_dir" && ac_dir=.
3020
for ac_exec_ext in '' $ac_executable_extensions; do
3021
if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
3022
echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
3024
ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
816
test -z "$LD" && LD="$ac_prog"
819
# If it fails, then pretend we aren't using GCC.
823
# If it is relative, then search for the first ld in PATH.
827
elif test "$with_gnu_ld" = yes; then
828
AC_MSG_CHECKING([for GNU ld])
830
AC_MSG_CHECKING([for non-GNU ld])
832
AC_CACHE_VAL(acl_cv_path_LD,
833
[if test -z "$LD"; then
834
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
835
for ac_dir in $PATH; do
836
test -z "$ac_dir" && ac_dir=.
837
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
838
acl_cv_path_LD="$ac_dir/$ac_prog"
839
# Check to see if the program is GNU ld. I'd rather use --version,
840
# but apparently some GNU ld's only accept -v.
841
# Break only if it was the GNU/non-GNU ld that we prefer.
842
if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
843
test "$with_gnu_ld" != no && break
845
test "$with_gnu_ld" != yes && break
851
acl_cv_path_LD="$LD" # Let the user override the test with a path.
854
if test -n "$LD"; then
3031
dnl If no 4th arg is given, leave the cache variable unset,
3032
dnl so AC_PATH_PROGS will keep looking.
3033
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3038
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
3039
AC_MSG_RESULT([$]$1)
857
3041
AC_MSG_RESULT(no)
859
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
863
# Configure paths for GTK+
864
# Owen Taylor 97-11-3
866
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
867
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
869
AC_DEFUN(AM_PATH_GTK,
871
dnl Get the cflags and libraries from the gtk-config script
873
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
874
gtk_config_prefix="$withval", gtk_config_prefix="")
875
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
876
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
877
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
878
, enable_gtktest=yes)
884
gtk_config_args="$gtk_config_args gthread"
889
if test x$gtk_config_exec_prefix != x ; then
890
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
891
if test x${GTK_CONFIG+set} != xset ; then
892
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
895
if test x$gtk_config_prefix != x ; then
896
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
897
if test x${GTK_CONFIG+set} != xset ; then
898
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
902
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
903
min_gtk_version=ifelse([$1], ,0.99.7,$1)
904
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
906
if test "$GTK_CONFIG" = "no" ; then
909
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
910
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
911
gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
912
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
913
gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
914
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
915
gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
916
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
917
if test "x$enable_gtktest" = "xyes" ; then
918
ac_save_CFLAGS="$CFLAGS"
920
CFLAGS="$CFLAGS $GTK_CFLAGS"
921
LIBS="$GTK_LIBS $LIBS"
923
dnl Now check if the installed GTK is sufficiently new. (Also sanity
924
dnl checks the results of gtk-config to some extent
935
int major, minor, micro;
938
system ("touch conf.gtktest");
940
/* HP/UX 9 (%@#!) writes to sscanf strings */
941
tmp_version = g_strdup("$min_gtk_version");
942
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
943
printf("%s, bad version string\n", "$min_gtk_version");
947
if ((gtk_major_version != $gtk_config_major_version) ||
948
(gtk_minor_version != $gtk_config_minor_version) ||
949
(gtk_micro_version != $gtk_config_micro_version))
951
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
952
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
953
gtk_major_version, gtk_minor_version, gtk_micro_version);
954
printf ("*** was found! If gtk-config was correct, then it is best\n");
955
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
956
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
957
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
958
printf("*** required on your system.\n");
959
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
960
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
961
printf("*** before re-running configure\n");
963
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
964
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
965
(gtk_minor_version != GTK_MINOR_VERSION) ||
966
(gtk_micro_version != GTK_MICRO_VERSION))
968
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
969
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
970
printf("*** library (version %d.%d.%d)\n",
971
gtk_major_version, gtk_minor_version, gtk_micro_version);
973
#endif /* defined (GTK_MAJOR_VERSION) ... */
976
if ((gtk_major_version > major) ||
977
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
978
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
984
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
985
gtk_major_version, gtk_minor_version, gtk_micro_version);
986
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
987
major, minor, micro);
988
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
990
printf("*** If you have already installed a sufficiently new version, this error\n");
991
printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
992
printf("*** being found. The easiest way to fix this is to remove the old version\n");
993
printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
994
printf("*** correct copy of gtk-config. (In this case, you will have to\n");
995
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
996
printf("*** so that the correct libraries are found at run-time))\n");
1001
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1002
CFLAGS="$ac_save_CFLAGS"
1003
LIBS="$ac_save_LIBS"
1006
if test "x$no_gtk" = x ; then
1008
ifelse([$2], , :, [$2])
1011
if test "$GTK_CONFIG" = "no" ; then
1012
echo "*** The gtk-config script installed by GTK could not be found"
1013
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
1014
echo "*** your path, or set the GTK_CONFIG environment variable to the"
1015
echo "*** full path to gtk-config."
1017
if test -f conf.gtktest ; then
1020
echo "*** Could not run GTK test program, checking why..."
1021
CFLAGS="$CFLAGS $GTK_CFLAGS"
1022
LIBS="$LIBS $GTK_LIBS"
1024
#include <gtk/gtk.h>
1026
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
1027
[ echo "*** The test program compiled, but did not run. This usually means"
1028
echo "*** that the run-time linker is not finding GTK or finding the wrong"
1029
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
1030
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1031
echo "*** to the installed location Also, make sure you have run ldconfig if that"
1032
echo "*** is required on your system"
1034
echo "*** If you have an old version installed, it is best to remove it, although"
1035
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
1037
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
1038
echo "*** came with the system with the command"
1040
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
1041
[ echo "*** The test program failed to compile or link. See the file config.log for the"
1042
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
1043
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
1044
echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
1045
CFLAGS="$ac_save_CFLAGS"
1046
LIBS="$ac_save_LIBS"
1051
ifelse([$3], , :, [$3])
1053
AC_SUBST(GTK_CFLAGS)
1058
# Configure paths for ESD
1059
# Manish Singh 98-9-30
1060
# stolen back from Frank Belew
1061
# stolen from Manish Singh
1062
# Shamelessly stolen from Owen Taylor
1064
dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
1065
dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
1067
AC_DEFUN(AM_PATH_ESD,
1069
dnl Get the cflags and libraries from the esd-config script
1071
AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)],
1072
esd_prefix="$withval", esd_prefix="")
1073
AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)],
1074
esd_exec_prefix="$withval", esd_exec_prefix="")
1075
AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program],
1076
, enable_esdtest=yes)
1078
if test x$esd_exec_prefix != x ; then
1079
esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
1080
if test x${ESD_CONFIG+set} != xset ; then
1081
ESD_CONFIG=$esd_exec_prefix/bin/esd-config
1084
if test x$esd_prefix != x ; then
1085
esd_args="$esd_args --prefix=$esd_prefix"
1086
if test x${ESD_CONFIG+set} != xset ; then
1087
ESD_CONFIG=$esd_prefix/bin/esd-config
1091
AC_PATH_PROG(ESD_CONFIG, esd-config, no)
1092
min_esd_version=ifelse([$1], ,0.2.7,$1)
1093
AC_MSG_CHECKING(for ESD - version >= $min_esd_version)
1095
if test "$ESD_CONFIG" = "no" ; then
1100
ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
1101
ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`
1103
esd_major_version=`$ESD_CONFIG $esd_args --version | \
1104
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1105
esd_minor_version=`$ESD_CONFIG $esd_args --version | \
1106
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1107
esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
1108
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1109
if test "x$enable_esdtest" = "xyes" ; then
1110
ac_save_CFLAGS="$CFLAGS"
1111
ac_save_LIBS="$LIBS"
1112
CFLAGS="$CFLAGS $ESD_CFLAGS"
1113
LIBS="$LIBS $ESD_LIBS"
1115
dnl Now check if the installed ESD is sufficiently new. (Also sanity
1116
dnl checks the results of esd-config to some extent
1126
my_strdup (char *str)
1132
new_str = malloc ((strlen (str) + 1) * sizeof(char));
1133
strcpy (new_str, str);
1143
int major, minor, micro;
1146
system ("touch conf.esdtest");
1148
/* HP/UX 9 (%@#!) writes to sscanf strings */
1149
tmp_version = my_strdup("$min_esd_version");
1150
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
1151
printf("%s, bad version string\n", "$min_esd_version");
1155
if (($esd_major_version > major) ||
1156
(($esd_major_version == major) && ($esd_minor_version > minor)) ||
1157
(($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
1163
printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
1164
printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
1165
printf("*** best to upgrade to the required version.\n");
1166
printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
1167
printf("*** to point to the correct copy of esd-config, and remove the file\n");
1168
printf("*** config.cache before re-running configure\n");
1173
],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1174
CFLAGS="$ac_save_CFLAGS"
1175
LIBS="$ac_save_LIBS"
1179
if test "x$no_esd" = x ; then
1181
ifelse([$2], , :, [$2])
1184
if test "$ESD_CONFIG" = "no" ; then
1185
echo "*** The esd-config script installed by ESD could not be found"
1186
echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
1187
echo "*** your path, or set the ESD_CONFIG environment variable to the"
1188
echo "*** full path to esd-config."
1190
if test -f conf.esdtest ; then
1193
echo "*** Could not run ESD test program, checking why..."
1194
CFLAGS="$CFLAGS $ESD_CFLAGS"
1195
LIBS="$LIBS $ESD_LIBS"
1202
[ echo "*** The test program compiled, but did not run. This usually means"
1203
echo "*** that the run-time linker is not finding ESD or finding the wrong"
1204
echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
1205
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1206
echo "*** to the installed location Also, make sure you have run ldconfig if that"
1207
echo "*** is required on your system"
1209
echo "*** If you have an old version installed, it is best to remove it, although"
1210
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
1211
[ echo "*** The test program failed to compile or link. See the file config.log for the"
1212
echo "*** exact error that occured. This usually means ESD was incorrectly installed"
1213
echo "*** or that you have moved ESD since it was installed. In the latter case, you"
1214
echo "*** may want to edit the esd-config script: $ESD_CONFIG" ])
1215
CFLAGS="$ac_save_CFLAGS"
1216
LIBS="$ac_save_LIBS"
1222
ifelse([$3], , :, [$3])
1224
AC_SUBST(ESD_CFLAGS)
1229
dnl AM_ESD_SUPPORTS_MULTIPLE_RECORD([ACTION-IF-SUPPORTS [, ACTION-IF-NOT-SUPPORTS]])
1230
dnl Test, whether esd supports multiple recording clients (version >=0.2.21)
1232
AC_DEFUN(AM_ESD_SUPPORTS_MULTIPLE_RECORD,
1234
AC_MSG_NOTICE([whether installed esd version supports multiple recording clients])
1235
ac_save_ESD_CFLAGS="$ESD_CFLAGS"
1236
ac_save_ESD_LIBS="$ESD_LIBS"
1239
AM_CONDITIONAL(ESD_SUPPORTS_MULTIPLE_RECORD, true)
1240
AC_DEFINE(ESD_SUPPORTS_MULTIPLE_RECORD, 1,
1241
[Define if you have esound with support of multiple recording clients.])],
1243
ifelse([$2], , [AM_CONDITIONAL(ESD_SUPPORTS_MULTIPLE_RECORD, false)], [$2])
1244
if test "x$ac_save_ESD_CFLAGS" != x ; then
1245
ESD_CFLAGS="$ac_save_ESD_CFLAGS"
1247
if test "x$ac_save_ESD_LIBS" != x ; then
1248
ESD_LIBS="$ac_save_ESD_LIBS"
1253
# Define a conditional.
1255
AC_DEFUN([AM_CONDITIONAL],
3046
# signed.m4 serial 1 (gettext-0.10.40)
3047
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
3048
dnl This file is free software; the Free Software Foundation
3049
dnl gives unlimited permission to copy and/or distribute it,
3050
dnl with or without modifications, as long as this notice is preserved.
3052
dnl From Bruno Haible.
3054
AC_DEFUN([bh_C_SIGNED],
3056
AC_CACHE_CHECK([for signed], bh_cv_c_signed,
3057
[AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
3058
if test $bh_cv_c_signed = no; then
3060
[Define to empty if the C compiler doesn't support this keyword.])
3064
# size_max.m4 serial 2
3065
dnl Copyright (C) 2003 Free Software Foundation, Inc.
3066
dnl This file is free software; the Free Software Foundation
3067
dnl gives unlimited permission to copy and/or distribute it,
3068
dnl with or without modifications, as long as this notice is preserved.
3070
dnl From Bruno Haible.
3072
AC_DEFUN([gl_SIZE_MAX],
3074
AC_CHECK_HEADERS(stdint.h)
3075
dnl First test whether the system already has SIZE_MAX.
3076
AC_MSG_CHECKING([for SIZE_MAX])
3078
AC_EGREP_CPP([Found it], [
3087
if test -z "$result"; then
3088
dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
3089
dnl than the type 'unsigned long'.
3090
dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
3091
dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
3092
_AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
3093
[#include <stddef.h>], result=?)
3094
_AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
3095
[#include <stddef.h>], result=?)
3096
_AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
3097
[#include <stddef.h>], result=?)
3098
if test "$fits_in_uint" = 1; then
3099
dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
3100
dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
3101
AC_TRY_COMPILE([#include <stddef.h>
3103
extern unsigned long foo;
3104
], [], fits_in_uint=0)
3106
if test -z "$result"; then
3107
if test "$fits_in_uint" = 1; then
3108
result="$res_hi$res_lo"U
3110
result="$res_hi$res_lo"UL
3113
dnl Shouldn't happen, but who knows...
3117
AC_MSG_RESULT([$result])
3118
if test "$result" != yes; then
3119
AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
3120
[Define as the maximum value of type 'size_t', if the system doesn't define it.])
3124
# stdint_h.m4 serial 5
3125
dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
3126
dnl This file is free software; the Free Software Foundation
3127
dnl gives unlimited permission to copy and/or distribute it,
3128
dnl with or without modifications, as long as this notice is preserved.
3130
dnl From Paul Eggert.
3132
# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
3133
# doesn't clash with <sys/types.h>, and declares uintmax_t.
3135
AC_DEFUN([gl_AC_HEADER_STDINT_H],
3137
AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h,
3139
[#include <sys/types.h>
3140
#include <stdint.h>],
3141
[uintmax_t i = (uintmax_t) -1;],
3142
gl_cv_header_stdint_h=yes,
3143
gl_cv_header_stdint_h=no)])
3144
if test $gl_cv_header_stdint_h = yes; then
3145
AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
3146
[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
3147
and declares uintmax_t. ])
3151
# uintmax_t.m4 serial 9
3152
dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
3153
dnl This file is free software; the Free Software Foundation
3154
dnl gives unlimited permission to copy and/or distribute it,
3155
dnl with or without modifications, as long as this notice is preserved.
3157
dnl From Paul Eggert.
3161
# Define uintmax_t to 'unsigned long' or 'unsigned long long'
3162
# if it is not already defined in <stdint.h> or <inttypes.h>.
3164
AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
3166
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
3167
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
3168
if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
3169
AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
3170
test $ac_cv_type_unsigned_long_long = yes \
3171
&& ac_type='unsigned long long' \
3172
|| ac_type='unsigned long'
3173
AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
3174
[Define to unsigned long or unsigned long long
3175
if <stdint.h> and <inttypes.h> don't define.])
3177
AC_DEFINE(HAVE_UINTMAX_T, 1,
3178
[Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
3182
# ulonglong.m4 serial 4
3183
dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
3184
dnl This file is free software; the Free Software Foundation
3185
dnl gives unlimited permission to copy and/or distribute it,
3186
dnl with or without modifications, as long as this notice is preserved.
3188
dnl From Paul Eggert.
3190
# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
3192
AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG],
3194
AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
3195
[AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
3196
[unsigned long long ullmax = (unsigned long long) -1;
3197
return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
3198
ac_cv_type_unsigned_long_long=yes,
3199
ac_cv_type_unsigned_long_long=no)])
3200
if test $ac_cv_type_unsigned_long_long = yes; then
3201
AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
3202
[Define if you have the 'unsigned long long' type.])
3206
# wchar_t.m4 serial 1 (gettext-0.12)
3207
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
3208
dnl This file is free software; the Free Software Foundation
3209
dnl gives unlimited permission to copy and/or distribute it,
3210
dnl with or without modifications, as long as this notice is preserved.
3212
dnl From Bruno Haible.
3213
dnl Test whether <stddef.h> has the 'wchar_t' type.
3214
dnl Prerequisite: AC_PROG_CC
3216
AC_DEFUN([gt_TYPE_WCHAR_T],
3218
AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
3219
[AC_TRY_COMPILE([#include <stddef.h>
3220
wchar_t foo = (wchar_t)'\0';], ,
3221
gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
3222
if test $gt_cv_c_wchar_t = yes; then
3223
AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
3227
# wint_t.m4 serial 1 (gettext-0.12)
3228
dnl Copyright (C) 2003 Free Software Foundation, Inc.
3229
dnl This file is free software; the Free Software Foundation
3230
dnl gives unlimited permission to copy and/or distribute it,
3231
dnl with or without modifications, as long as this notice is preserved.
3233
dnl From Bruno Haible.
3234
dnl Test whether <wchar.h> has the 'wint_t' type.
3235
dnl Prerequisite: AC_PROG_CC
3237
AC_DEFUN([gt_TYPE_WINT_T],
3239
AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
3240
[AC_TRY_COMPILE([#include <wchar.h>
3241
wint_t foo = (wchar_t)'\0';], ,
3242
gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
3243
if test $gt_cv_c_wint_t = yes; then
3244
AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
3249
dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
3250
dnl This file is free software; the Free Software Foundation
3251
dnl gives unlimited permission to copy and/or distribute it,
3252
dnl with or without modifications, as long as this notice is preserved.
3254
AC_DEFUN([gl_XSIZE],
3256
dnl Prerequisites of lib/xsize.h.
3257
AC_REQUIRE([gl_SIZE_MAX])
3258
AC_REQUIRE([AC_C_INLINE])
3259
AC_CHECK_HEADERS(stdint.h)
3262
m4_include([acinclude.m4])