1
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
# 2005, 2006, 2007, 2008, 2009 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
m4_ifndef([AC_AUTOCONF_VERSION],
15
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17
[m4_warning([this file was generated for autoconf 2.68.
18
You have another version of autoconf. It may work, but is not guaranteed to.
19
If you have problems, you may need to regenerate the build system entirely.
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
# gettext.m4 serial 63 (gettext-0.18)
23
dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
24
dnl This file is free software; the Free Software Foundation
25
dnl gives unlimited permission to copy and/or distribute it,
26
dnl with or without modifications, as long as this notice is preserved.
28
dnl This file can can be used in projects which are not available under
29
dnl the GNU General Public License or the GNU Library General Public
30
dnl License but which still want to provide support for the GNU gettext
32
dnl Please note that the actual code of the GNU gettext library is covered
33
dnl by the GNU Library General Public License, and the rest of the GNU
34
dnl gettext package package is covered by the GNU General Public License.
35
dnl They are *not* in the public domain.
38
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
39
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
41
dnl Macro to add for using GNU gettext.
43
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
44
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
45
dnl default (if it is not specified or empty) is 'no-libtool'.
46
dnl INTLSYMBOL should be 'external' for packages with no intl directory,
47
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
48
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
49
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
50
dnl depending on --{enable,disable}-{shared,static} and on the presence of
51
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
52
dnl $(top_builddir)/intl/libintl.a will be created.
53
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
54
dnl implementations (in libc or libintl) without the ngettext() function
55
dnl will be ignored. If NEEDSYMBOL is specified and is
56
dnl 'need-formatstring-macros', then GNU gettext implementations that don't
57
dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
58
dnl INTLDIR is used to find the intl libraries. If empty,
59
dnl the value `$(top_builddir)/intl/' is used.
61
dnl The result of the configuration is one of three cases:
62
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
64
dnl Catalog format: GNU --> install in $(datadir)
65
dnl Catalog extension: .mo after installation, .gmo in source tree
66
dnl 2) GNU gettext has been found in the system's C library.
67
dnl Catalog format: GNU --> install in $(datadir)
68
dnl Catalog extension: .mo after installation, .gmo in source tree
69
dnl 3) No internationalization, always use English msgid.
70
dnl Catalog format: none
71
dnl Catalog extension: none
72
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
73
dnl The use of .gmo is historical (it was needed to avoid overwriting the
74
dnl GNU format catalogs when building on a platform with an X/Open gettext),
75
dnl but we keep it in order not to force irrelevant filename changes on the
78
AC_DEFUN([AM_GNU_GETTEXT],
80
dnl Argument checking.
81
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
82
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
84
ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
85
[AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
86
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
87
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
89
define([gt_included_intl],
90
ifelse([$1], [external],
91
ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
93
define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
95
AM_GNU_GETTEXT_NEED([$2])
97
AC_REQUIRE([AM_PO_SUBDIRS])dnl
98
ifelse(gt_included_intl, yes, [
99
AC_REQUIRE([AM_INTL_SUBDIR])dnl
102
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
103
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
104
AC_REQUIRE([AC_LIB_RPATH])
106
dnl Sometimes libintl requires libiconv, so first search for libiconv.
107
dnl Ideally we would do this search only after the
108
dnl if test "$USE_NLS" = "yes"; then
109
dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
110
dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
111
dnl the configure script would need to contain the same shell code
112
dnl again, outside any 'if'. There are two solutions:
113
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
114
dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
115
dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
116
dnl documented, we avoid it.
117
ifelse(gt_included_intl, yes, , [
118
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
121
dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
127
ifelse(gt_included_intl, yes, [
128
BUILD_INCLUDED_LIBINTL=no
129
USE_INCLUDED_LIBINTL=no
135
dnl Add a version number to the cache macros.
136
case " $gt_needs " in
137
*" need-formatstring-macros "*) gt_api_version=3 ;;
138
*" need-ngettext "*) gt_api_version=2 ;;
139
*) gt_api_version=1 ;;
141
gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
142
gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
144
dnl If we use NLS figure out what method
145
if test "$USE_NLS" = "yes"; then
146
gt_use_preinstalled_gnugettext=no
147
ifelse(gt_included_intl, yes, [
148
AC_MSG_CHECKING([whether included gettext is requested])
149
AC_ARG_WITH([included-gettext],
150
[ --with-included-gettext use the GNU gettext library included here],
151
nls_cv_force_use_gnu_gettext=$withval,
152
nls_cv_force_use_gnu_gettext=no)
153
AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
155
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
156
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
158
dnl User does not insist on using GNU NLS library. Figure out what
159
dnl to use. If GNU gettext is available we use this. Else we have
160
dnl to fall back to GNU NLS library.
162
if test $gt_api_version -ge 3; then
163
gt_revision_test_code='
164
#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
165
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
168
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
172
gt_revision_test_code=
174
if test $gt_api_version -ge 2; then
175
gt_expression_test_code=' + * ngettext ("", "", 0)'
177
gt_expression_test_code=
180
AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
181
[AC_TRY_LINK([#include <libintl.h>
182
$gt_revision_test_code
183
extern int _nl_msg_cat_cntr;
184
extern int *_nl_domain_bindings;],
185
[bindtextdomain ("", "");
186
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
187
[eval "$gt_func_gnugettext_libc=yes"],
188
[eval "$gt_func_gnugettext_libc=no"])])
190
if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
191
dnl Sometimes libintl requires libiconv, so first search for libiconv.
192
ifelse(gt_included_intl, yes, , [
195
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
196
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
197
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
198
dnl even if libiconv doesn't exist.
199
AC_LIB_LINKFLAGS_BODY([intl])
200
AC_CACHE_CHECK([for GNU gettext in libintl],
201
[$gt_func_gnugettext_libintl],
202
[gt_save_CPPFLAGS="$CPPFLAGS"
203
CPPFLAGS="$CPPFLAGS $INCINTL"
205
LIBS="$LIBS $LIBINTL"
206
dnl Now see whether libintl exists and does not depend on libiconv.
207
AC_TRY_LINK([#include <libintl.h>
208
$gt_revision_test_code
209
extern int _nl_msg_cat_cntr;
214
const char *_nl_expand_alias (const char *);],
215
[bindtextdomain ("", "");
216
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
217
[eval "$gt_func_gnugettext_libintl=yes"],
218
[eval "$gt_func_gnugettext_libintl=no"])
219
dnl Now see whether libintl exists and depends on libiconv.
220
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
221
LIBS="$LIBS $LIBICONV"
222
AC_TRY_LINK([#include <libintl.h>
223
$gt_revision_test_code
224
extern int _nl_msg_cat_cntr;
229
const char *_nl_expand_alias (const char *);],
230
[bindtextdomain ("", "");
231
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
232
[LIBINTL="$LIBINTL $LIBICONV"
233
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
234
eval "$gt_func_gnugettext_libintl=yes"
237
CPPFLAGS="$gt_save_CPPFLAGS"
238
LIBS="$gt_save_LIBS"])
241
dnl If an already present or preinstalled GNU gettext() is found,
242
dnl use it. But if this macro is used in GNU gettext, and GNU
243
dnl gettext is already preinstalled in libintl, we update this
244
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
245
if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
246
|| { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
247
&& test "$PACKAGE" != gettext-runtime \
248
&& test "$PACKAGE" != gettext-tools; }; then
249
gt_use_preinstalled_gnugettext=yes
251
dnl Reset the values set by searching for libintl.
257
ifelse(gt_included_intl, yes, [
258
if test "$gt_use_preinstalled_gnugettext" != "yes"; then
259
dnl GNU gettext is not found in the C library.
260
dnl Fall back on included GNU gettext library.
261
nls_cv_use_gnu_gettext=yes
265
if test "$nls_cv_use_gnu_gettext" = "yes"; then
266
dnl Mark actions used to generate GNU NLS library.
267
BUILD_INCLUDED_LIBINTL=yes
268
USE_INCLUDED_LIBINTL=yes
269
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
270
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
271
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
275
if test "$gt_use_preinstalled_gnugettext" = "yes" \
276
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
277
dnl Mark actions to use GNU gettext tools.
282
if test -n "$INTL_MACOSX_LIBS"; then
283
if test "$gt_use_preinstalled_gnugettext" = "yes" \
284
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
285
dnl Some extra flags are needed during linking.
286
LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
287
LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
291
if test "$gt_use_preinstalled_gnugettext" = "yes" \
292
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
293
AC_DEFINE([ENABLE_NLS], [1],
294
[Define to 1 if translation of program messages to the user's native language
301
AC_MSG_CHECKING([whether to use NLS])
302
AC_MSG_RESULT([$USE_NLS])
303
if test "$USE_NLS" = "yes"; then
304
AC_MSG_CHECKING([where the gettext function comes from])
305
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
306
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
307
gt_source="external libintl"
312
gt_source="included intl directory"
314
AC_MSG_RESULT([$gt_source])
317
if test "$USE_NLS" = "yes"; then
319
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
320
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
321
AC_MSG_CHECKING([how to link with libintl])
322
AC_MSG_RESULT([$LIBINTL])
323
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
326
dnl For backward compatibility. Some packages may be using this.
327
AC_DEFINE([HAVE_GETTEXT], [1],
328
[Define if the GNU gettext() function is already present or preinstalled.])
329
AC_DEFINE([HAVE_DCGETTEXT], [1],
330
[Define if the GNU dcgettext() function is already present or preinstalled.])
333
dnl We need to process the po/ directory.
337
ifelse(gt_included_intl, yes, [
338
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
339
dnl to 'yes' because some of the testsuite requires it.
340
if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
341
BUILD_INCLUDED_LIBINTL=yes
344
dnl Make all variables we use known to autoconf.
345
AC_SUBST([BUILD_INCLUDED_LIBINTL])
346
AC_SUBST([USE_INCLUDED_LIBINTL])
347
AC_SUBST([CATOBJEXT])
349
dnl For backward compatibility. Some configure.ins may be using this.
353
dnl For backward compatibility. Some Makefiles may be using this.
355
AC_SUBST([DATADIRNAME])
357
dnl For backward compatibility. Some Makefiles may be using this.
359
AC_SUBST([INSTOBJEXT])
361
dnl For backward compatibility. Some Makefiles may be using this.
365
dnl For backward compatibility. Some Makefiles may be using this.
367
if test "$USE_INCLUDED_LIBINTL" = yes; then
368
INTLOBJS="\$(GETTOBJS)"
372
dnl Enable libtool support if the surrounding package wishes it.
373
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
374
AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
377
dnl For backward compatibility. Some Makefiles may be using this.
381
dnl Make all documented variables known to autoconf.
383
AC_SUBST([LTLIBINTL])
388
dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
389
m4_define([gt_NEEDS_INIT],
391
m4_divert_text([DEFAULTS], [gt_needs=])
392
m4_define([gt_NEEDS_INIT], [])
396
dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
397
AC_DEFUN([AM_GNU_GETTEXT_NEED],
399
m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
403
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
404
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
406
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
407
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
409
# This file is free software, distributed under the terms of the GNU
410
# General Public License. As a special exception to the GNU General
411
# Public License, this file may be distributed as part of a program
412
# that contains a configuration script generated by Autoconf, under
413
# the same distribution terms as the rest of that program.
415
# This file can be copied and used freely without restrictions. It can
416
# be used in projects which are not available under the GNU Public License
417
# but which still want to provide support for the GNU gettext functionality.
419
# Macro to add for using GNU gettext.
420
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
422
# Modified to never use included libintl.
423
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
425
# Major rework to remove unused code
426
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
428
# Added better handling of ALL_LINGUAS from GNU gettext version
429
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
431
# Modified to require ngettext
432
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
434
# We need this here as well, since someone might use autoconf-2.5x
435
# to configure GLib then an older version to configure a package
436
# using AM_GLIB_GNU_GETTEXT
440
dnl We go to great lengths to make sure that aclocal won't
441
dnl try to pull in the installed version of these macros
442
dnl when running aclocal in the glib directory.
444
m4_copy([AC_DEFUN],[glib_DEFUN])
445
m4_copy([AC_REQUIRE],[glib_REQUIRE])
447
dnl At the end, if we're not within glib, we'll define the public
448
dnl definitions in terms of our private definitions.
452
#--------------------
453
glib_DEFUN([GLIB_LC_MESSAGES],
454
[AC_CHECK_HEADERS([locale.h])
455
if test $ac_cv_header_locale_h = yes; then
456
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
457
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
458
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
459
if test $am_cv_val_LC_MESSAGES = yes; then
460
AC_DEFINE(HAVE_LC_MESSAGES, 1,
461
[Define if your <locale.h> file defines LC_MESSAGES.])
465
# GLIB_PATH_PROG_WITH_TEST
466
#----------------------------
467
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
468
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
469
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
470
[# Extract the first word of "$2", so it can be a program name with args.
471
set dummy $2; ac_word=[$]2
472
AC_MSG_CHECKING([for $ac_word])
473
AC_CACHE_VAL(ac_cv_path_$1,
476
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
479
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
480
for ac_dir in ifelse([$5], , $PATH, [$5]); do
481
test -z "$ac_dir" && ac_dir=.
482
if test -f $ac_dir/$ac_word; then
484
ac_cv_path_$1="$ac_dir/$ac_word"
490
dnl If no 4th arg is given, leave the cache variable unset,
491
dnl so AC_PATH_PROGS will keep looking.
492
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
497
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
507
glib_DEFUN([GLIB_WITH_NLS],
508
dnl NLS is obligatory
512
gt_cv_have_gettext=no
518
AC_CHECK_HEADER(libintl.h,
519
[gt_cv_func_dgettext_libintl="no"
520
libintl_extra_libs=""
523
# First check in libc
525
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
529
[return !ngettext ("","", 1)],
530
gt_cv_func_ngettext_libc=yes,
531
gt_cv_func_ngettext_libc=no)
534
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
535
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
539
[return !dgettext ("","")],
540
gt_cv_func_dgettext_libc=yes,
541
gt_cv_func_dgettext_libc=no)
545
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
546
AC_CHECK_FUNCS(bind_textdomain_codeset)
550
# If we don't have everything we want, check in libintl
552
if test "$gt_cv_func_dgettext_libc" != "yes" \
553
|| test "$gt_cv_func_ngettext_libc" != "yes" \
554
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
556
AC_CHECK_LIB(intl, bindtextdomain,
557
[AC_CHECK_LIB(intl, ngettext,
558
[AC_CHECK_LIB(intl, dgettext,
559
gt_cv_func_dgettext_libintl=yes)])])
561
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
562
AC_MSG_CHECKING([if -liconv is needed to use gettext])
564
AC_CHECK_LIB(intl, ngettext,
565
[AC_CHECK_LIB(intl, dcgettext,
566
[gt_cv_func_dgettext_libintl=yes
567
libintl_extra_libs=-liconv],
573
# If we found libintl, then check in it for bind_textdomain_codeset();
574
# we'll prefer libc if neither have bind_textdomain_codeset(),
575
# and both have dgettext and ngettext
577
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
578
glib_save_LIBS="$LIBS"
579
LIBS="$LIBS -lintl $libintl_extra_libs"
580
unset ac_cv_func_bind_textdomain_codeset
581
AC_CHECK_FUNCS(bind_textdomain_codeset)
582
LIBS="$glib_save_LIBS"
584
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
585
gt_cv_func_dgettext_libc=no
587
if test "$gt_cv_func_dgettext_libc" = "yes" \
588
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
589
gt_cv_func_dgettext_libintl=no
595
if test "$gt_cv_func_dgettext_libc" = "yes" \
596
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
597
gt_cv_have_gettext=yes
600
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
601
INTLLIBS="-lintl $libintl_extra_libs"
604
if test "$gt_cv_have_gettext" = "yes"; then
605
AC_DEFINE(HAVE_GETTEXT,1,
606
[Define if the GNU gettext() function is already present or preinstalled.])
607
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
608
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
609
if test "$MSGFMT" != "no"; then
610
glib_save_LIBS="$LIBS"
611
LIBS="$LIBS $INTLLIBS"
612
AC_CHECK_FUNCS(dcgettext)
614
AC_MSG_CHECKING([if msgfmt accepts -c])
615
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
618
"Content-Type: text/plain; charset=UTF-8\n"
619
"Project-Id-Version: test 1.0\n"
620
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
621
"Last-Translator: test <foo@bar.xx>\n"
622
"Language-Team: C <LL@li.org>\n"
623
"MIME-Version: 1.0\n"
624
"Content-Transfer-Encoding: 8bit\n"
625
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
626
AC_SUBST(MSGFMT_OPTS)
627
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
628
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
629
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
630
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
631
return _nl_msg_cat_cntr],
636
dnl On Solaris, if bind_textdomain_codeset is in libc,
637
dnl GNU format message catalog is always supported,
638
dnl since both are added to the libc all together.
639
dnl Hence, we'd like to go with DATADIRNAME=share and
640
dnl and CATOBJEXT=.gmo in this case.
641
AC_CHECK_FUNC(bind_textdomain_codeset,
652
LIBS="$glib_save_LIBS"
655
gt_cv_have_gettext=no
660
if test "$gt_cv_have_gettext" = "yes" ; then
661
AC_DEFINE(ENABLE_NLS, 1,
662
[always defined to indicate that i18n is enabled])
665
dnl Test whether we really found GNU xgettext.
666
if test "$XGETTEXT" != ":"; then
667
dnl If it is not GNU xgettext we define it as : so that the
668
dnl Makefiles still can work.
669
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
673
[found xgettext program is not GNU xgettext; ignore it])
678
# We need to process the po/ directory.
682
[case "$CONFIG_FILES" in *po/Makefile.in*)
683
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
686
dnl These rules are solely for the distribution goal. While doing this
687
dnl we only have to keep exactly one list of the available catalogs
689
for lang in $ALL_LINGUAS; do
690
GMOFILES="$GMOFILES $lang.gmo"
691
POFILES="$POFILES $lang.po"
694
dnl Make all variables we use known to autoconf.
697
AC_SUBST(DATADIRNAME)
701
AC_SUBST(PO_IN_DATADIR_TRUE)
702
AC_SUBST(PO_IN_DATADIR_FALSE)
707
# AM_GLIB_GNU_GETTEXT
708
# -------------------
709
# Do checks necessary for use of gettext. If a suitable implementation
710
# of gettext is found in either in libintl or in the C library,
711
# it will set INTLLIBS to the libraries needed for use of gettext
712
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
713
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
714
# on various variables needed by the Makefile.in.in installed by
717
glib_DEFUN([GLIB_GNU_GETTEXT],
718
[AC_REQUIRE([AC_PROG_CC])dnl
719
AC_REQUIRE([AC_HEADER_STDC])dnl
724
if test "$gt_cv_have_gettext" = "yes"; then
725
if test "x$ALL_LINGUAS" = "x"; then
728
AC_MSG_CHECKING(for catalogs to be installed)
730
for presentlang in $ALL_LINGUAS; do
732
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
733
desiredlanguages="$LINGUAS"
735
desiredlanguages="$ALL_LINGUAS"
737
for desiredlang in $desiredlanguages; do
738
# Use the presentlang catalog if desiredlang is
739
# a. equal to presentlang, or
740
# b. a variant of presentlang (because in this case,
741
# presentlang can be used as a fallback for messages
742
# which are not translated in the desiredlang catalog).
743
case "$desiredlang" in
744
"$presentlang"*) useit=yes;;
747
if test $useit = yes; then
748
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
752
AC_MSG_RESULT($LINGUAS)
755
dnl Construct list of names of catalog files to be constructed.
756
if test -n "$LINGUAS"; then
757
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
761
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
762
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
763
dnl Try to locate is.
765
if test -n "$ac_aux_dir"; then
766
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
768
if test -z "$MKINSTALLDIRS"; then
769
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
771
AC_SUBST(MKINSTALLDIRS)
773
dnl Generate list of files to be processed by xgettext which will
774
dnl be included in po/Makefile.
775
test -d po || mkdir po
776
if test "x$srcdir" != "x."; then
777
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
778
posrcprefix="$srcdir/"
780
posrcprefix="../$srcdir/"
786
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
787
< $srcdir/po/POTFILES.in > po/POTFILES
790
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
791
# -------------------------------
792
# Define VARIABLE to the location where catalog files will
793
# be installed by po/Makefile.
794
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
795
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
796
glib_save_prefix="$prefix"
797
glib_save_exec_prefix="$exec_prefix"
798
glib_save_datarootdir="$datarootdir"
799
test "x$prefix" = xNONE && prefix=$ac_default_prefix
800
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
801
datarootdir=`eval echo "${datarootdir}"`
802
if test "x$CATOBJEXT" = "x.mo" ; then
803
localedir=`eval echo "${libdir}/locale"`
805
localedir=`eval echo "${datadir}/locale"`
807
prefix="$glib_save_prefix"
808
exec_prefix="$glib_save_exec_prefix"
809
datarootdir="$glib_save_datarootdir"
810
AC_DEFINE_UNQUOTED($1, "$localedir",
811
[Define the location where the catalogs will be installed])
815
dnl Now the definitions that aclocal will find
817
ifdef(glib_configure_ac,[],[
818
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
819
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
822
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
824
# Create a temporary file with TEST-FILE as its contents and pass the
825
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
826
# 0 and perform ACTION-IF-FAIL for any other exit status.
827
AC_DEFUN([GLIB_RUN_PROG],
828
[cat >conftest.foo <<_ACEOF
831
if AC_RUN_LOG([$1 conftest.foo]); then
832
m4_ifval([$3], [$3], [:])
833
m4_ifvaln([$4], [else $4])dnl
834
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
835
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
844
dnl GNOME_COMMON_INIT
846
AU_DEFUN([GNOME_COMMON_INIT],
848
dnl this macro should come after AC_CONFIG_MACRO_DIR
849
AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
851
dnl ensure that when the Automake generated makefile calls aclocal,
852
dnl it honours the $ACLOCAL_FLAGS environment variable
853
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
854
if test -n "$ac_macro_dir"; then
855
ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
858
AC_SUBST([ACLOCAL_AMFLAGS])
860
[[$0: This macro is deprecated. You should set put "ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}"
861
in your top-level Makefile.am, instead, where "m4" is the macro directory set
862
with AC_CONFIG_MACRO_DIR() in your configure.ac]])
864
AC_DEFUN([GNOME_DEBUG_CHECK],
866
AC_ARG_ENABLE([debug],
867
AC_HELP_STRING([--enable-debug],
868
[turn on debugging]),,
871
if test x$enable_debug = xyes ; then
872
AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
873
[Enable additional debugging at the expense of performance and size])
877
dnl GNOME_MAINTAINER_MODE_DEFINES ()
878
dnl define DISABLE_DEPRECATED
880
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
882
AC_REQUIRE([AM_MAINTAINER_MODE])
884
DISABLE_DEPRECATED=""
885
if test $USE_MAINTAINER_MODE = yes; then
886
DOMAINS="G ATK PANGO GDK GDK_PIXBUF GTK GCONF BONOBO BONOBO_UI GNOME LIBGLADE VTE GNOME_VFS WNCK LIBSOUP"
887
for DOMAIN in $DOMAINS; do
888
DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
892
AC_SUBST(DISABLE_DEPRECATED)
895
dnl GNOME_COMPILE_WARNINGS
896
dnl Turn on many useful compiler warnings
897
dnl For now, only works on GCC
898
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
899
dnl ******************************
900
dnl More compiler warnings
901
dnl ******************************
903
AC_ARG_ENABLE(compile-warnings,
904
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
905
[Turn on compiler warnings]),,
906
[enable_compile_warnings="m4_default([$1],[yes])"])
909
if test "x$GCC" != xyes; then
910
enable_compile_warnings=no
914
realsave_CFLAGS="$CFLAGS"
916
case "$enable_compile_warnings" in
921
warning_flags="-Wall"
924
warning_flags="-Wall -Wmissing-prototypes"
927
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
928
CFLAGS="$warning_flags $CFLAGS"
929
for option in -Wno-sign-compare; do
930
SAVE_CFLAGS="$CFLAGS"
931
CFLAGS="$CFLAGS $option"
932
AC_MSG_CHECKING([whether gcc understands $option])
933
AC_TRY_COMPILE([], [],
936
CFLAGS="$SAVE_CFLAGS"
937
AC_MSG_RESULT($has_option)
938
if test $has_option = yes; then
939
warning_flags="$warning_flags $option"
945
if test "$enable_compile_warnings" = "error" ; then
946
warning_flags="$warning_flags -Werror"
950
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
953
CFLAGS="$realsave_CFLAGS"
954
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
955
AC_MSG_RESULT($warning_flags)
958
AC_HELP_STRING([--enable-iso-c],
959
[Try to warn if code is not ISO C ]),,
962
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
964
if test "x$enable_iso_c" != "xno"; then
965
if test "x$GCC" = "xyes"; then
967
*[\ \ ]-ansi[\ \ ]*) ;;
968
*) complCFLAGS="$complCFLAGS -ansi" ;;
971
*[\ \ ]-pedantic[\ \ ]*) ;;
972
*) complCFLAGS="$complCFLAGS -pedantic" ;;
976
AC_MSG_RESULT($complCFLAGS)
978
WARN_CFLAGS="$warning_flags $complCFLAGS"
979
AC_SUBST(WARN_CFLAGS)
982
dnl For C++, do basically the same thing.
984
AC_DEFUN([GNOME_CXX_WARNINGS],[
985
AC_ARG_ENABLE(cxx-warnings,
986
AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
987
[Turn on compiler warnings.]),,
988
[enable_cxx_warnings="m4_default([$1],[minimum])"])
990
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
992
if test "x$GXX" != xyes; then
993
enable_cxx_warnings=no
995
if test "x$enable_cxx_warnings" != "xno"; then
996
if test "x$GXX" = "xyes"; then
997
case " $CXXFLAGS " in
998
*[\ \ ]-Wall[\ \ ]*) ;;
999
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
1002
## -W is not all that useful. And it cannot be controlled
1003
## with individual -Wno-xxx flags, unlike -Wall
1004
if test "x$enable_cxx_warnings" = "xyes"; then
1005
warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
1009
AC_MSG_RESULT($warnCXXFLAGS)
1011
AC_ARG_ENABLE(iso-cxx,
1012
AC_HELP_STRING([--enable-iso-cxx],
1013
[Try to warn if code is not ISO C++ ]),,
1014
[enable_iso_cxx=no])
1016
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
1018
if test "x$enable_iso_cxx" != "xno"; then
1019
if test "x$GXX" = "xyes"; then
1020
case " $CXXFLAGS " in
1021
*[\ \ ]-ansi[\ \ ]*) ;;
1022
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
1025
case " $CXXFLAGS " in
1026
*[\ \ ]-pedantic[\ \ ]*) ;;
1027
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
1031
AC_MSG_RESULT($complCXXFLAGS)
1033
WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
1034
AC_SUBST(WARN_CXXFLAGS)
1038
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
1039
dnl the schema should be compiled
1042
AC_DEFUN([GLIB_GSETTINGS],
1044
m4_pattern_allow([AM_V_GEN])
1045
AC_ARG_ENABLE(schemas-compile,
1046
AS_HELP_STRING([--disable-schemas-compile],
1047
[Disable regeneration of gschemas.compiled on install]),
1048
[case ${enableval} in
1049
yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
1050
no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
1051
*) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
1053
AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
1054
PKG_PROG_PKG_CONFIG([0.16])
1055
AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
1056
if test x$cross_compiling != xyes; then
1057
GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
1059
AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
1061
AC_SUBST(GLIB_COMPILE_SCHEMAS)
1062
if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
1063
ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
1065
ifelse([$1],,[:],[$1])
1069
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
1071
mostlyclean-am: clean-gsettings-schemas
1073
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
1075
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
1076
$(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$${d}$< && touch [$]@
1078
all-am: $(gsettings_SCHEMAS:.xml=.valid)
1079
uninstall-am: uninstall-gsettings-schemas
1080
install-data-am: install-gsettings-schemas
1082
.SECONDARY: $(gsettings_SCHEMAS)
1084
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
1086
if test -n "$^"; then \
1087
test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
1088
$(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
1089
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
1092
uninstall-gsettings-schemas:
1093
@$(NORMAL_UNINSTALL)
1094
@list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
1095
files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
1096
test -n "$$files" || exit 0; \
1097
echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
1098
cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
1099
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
1101
clean-gsettings-schemas:
1102
rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
1104
ifdef gsettings_ENUM_NAMESPACE
1105
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
1106
$(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead " <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod " <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail " </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
1109
_GSETTINGS_SUBST(GSETTINGS_RULES)
1112
dnl _GSETTINGS_SUBST(VARIABLE)
1113
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1114
AC_DEFUN([_GSETTINGS_SUBST],
1117
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1121
dnl Perform a check for a GStreamer element using gst-inspect
1122
dnl Thomas Vander Stichele <thomas at apestaart dot org>
1123
dnl Last modification: 25/01/2005
1125
dnl AM_GST_ELEMENT_CHECK(ELEMENT-NAME, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
1127
AC_DEFUN([AM_GST_ELEMENT_CHECK],
1129
if test "x$GST_INSPECT" = "x"; then
1130
AC_CHECK_PROG(GST_INSPECT, gst-inspect-0.10, gst-inspect-0.10, [])
1133
if test "x$GST_INSPECT" != "x"; then
1134
AC_MSG_CHECKING(GStreamer 0.10 element $1)
1135
if [ $GST_INSPECT $1 > /dev/null 2> /dev/null ]; then
1136
AC_MSG_RESULT(found.)
1139
AC_MSG_RESULT(not found.)
1145
# Configure paths for GTK+
1146
# Owen Taylor 1997-2001
1148
dnl AM_PATH_GTK_3_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
1149
dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
1150
dnl pass to pkg-config
1152
AC_DEFUN([AM_PATH_GTK_3_0],
1154
dnl Get the cflags and libraries from pkg-config
1156
AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
1157
, enable_gtktest=yes)
1159
pkg_config_args=gtk+-3.0
1164
pkg_config_args="$pkg_config_args gthread-2.0"
1171
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
1173
if test x$PKG_CONFIG != xno ; then
1174
if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
1177
echo "*** pkg-config too old; version 0.7 or better required."
1185
min_gtk_version=ifelse([$1], ,3.0.0,$1)
1186
AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
1188
if test x$PKG_CONFIG != xno ; then
1189
## don't try to run the test against uninstalled libtool libs
1190
if $PKG_CONFIG --uninstalled $pkg_config_args; then
1191
echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
1195
if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
1202
if test x"$no_gtk" = x ; then
1203
GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
1204
GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
1205
gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
1206
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1207
gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
1208
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1209
gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
1210
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1211
if test "x$enable_gtktest" = "xyes" ; then
1212
ac_save_CFLAGS="$CFLAGS"
1213
ac_save_LIBS="$LIBS"
1214
CFLAGS="$CFLAGS $GTK_CFLAGS"
1215
LIBS="$GTK_LIBS $LIBS"
1217
dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
1218
dnl checks the results of pkg-config to some extent)
1222
#include <gtk/gtk.h>
1229
int major, minor, micro;
1232
fclose (fopen ("conf.gtktest", "w"));
1234
/* HP/UX 9 (%@#!) writes to sscanf strings */
1235
tmp_version = g_strdup("$min_gtk_version");
1236
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
1237
printf("%s, bad version string\n", "$min_gtk_version");
1241
if ((gtk_major_version != $gtk_config_major_version) ||
1242
(gtk_minor_version != $gtk_config_minor_version) ||
1243
(gtk_micro_version != $gtk_config_micro_version))
1245
printf("\n*** 'pkg-config --modversion gtk+-3.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
1246
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
1247
gtk_major_version, gtk_minor_version, gtk_micro_version);
1248
printf ("*** was found! If pkg-config was correct, then it is best\n");
1249
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
1250
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
1251
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
1252
printf("*** required on your system.\n");
1253
printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
1254
printf("*** to point to the correct configuration files\n");
1256
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
1257
(gtk_minor_version != GTK_MINOR_VERSION) ||
1258
(gtk_micro_version != GTK_MICRO_VERSION))
1260
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
1261
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
1262
printf("*** library (version %d.%d.%d)\n",
1263
gtk_major_version, gtk_minor_version, gtk_micro_version);
1267
if ((gtk_major_version > major) ||
1268
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
1269
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
1275
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
1276
gtk_major_version, gtk_minor_version, gtk_micro_version);
1277
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
1278
major, minor, micro);
1279
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
1281
printf("*** If you have already installed a sufficiently new version, this error\n");
1282
printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
1283
printf("*** being found. The easiest way to fix this is to remove the old version\n");
1284
printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
1285
printf("*** correct copy of pkg-config. (In this case, you will have to\n");
1286
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
1287
printf("*** so that the correct libraries are found at run-time))\n");
1292
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1293
CFLAGS="$ac_save_CFLAGS"
1294
LIBS="$ac_save_LIBS"
1297
if test "x$no_gtk" = x ; then
1298
AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
1299
ifelse([$2], , :, [$2])
1302
if test "$PKG_CONFIG" = "no" ; then
1303
echo "*** A new enough version of pkg-config was not found."
1304
echo "*** See http://pkgconfig.sourceforge.net"
1306
if test -f conf.gtktest ; then
1309
echo "*** Could not run GTK+ test program, checking why..."
1310
ac_save_CFLAGS="$CFLAGS"
1311
ac_save_LIBS="$LIBS"
1312
CFLAGS="$CFLAGS $GTK_CFLAGS"
1313
LIBS="$LIBS $GTK_LIBS"
1315
#include <gtk/gtk.h>
1317
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
1318
[ echo "*** The test program compiled, but did not run. This usually means"
1319
echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
1320
echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
1321
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1322
echo "*** to the installed location Also, make sure you have run ldconfig if that"
1323
echo "*** is required on your system"
1325
echo "*** If you have an old version installed, it is best to remove it, although"
1326
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
1327
[ echo "*** The test program failed to compile or link. See the file config.log for the"
1328
echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
1329
CFLAGS="$ac_save_CFLAGS"
1330
LIBS="$ac_save_LIBS"
1335
ifelse([$3], , :, [$3])
1337
AC_SUBST(GTK_CFLAGS)
1342
dnl GTK_CHECK_BACKEND(BACKEND-NAME [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
1343
dnl Tests for BACKEND-NAME in the GTK targets list
1345
AC_DEFUN([GTK_CHECK_BACKEND],
1347
pkg_config_args=ifelse([$1],,gtk+-3.0, gtk+-$1-3.0)
1348
min_gtk_version=ifelse([$2],,3.0.0,$2)
1350
AC_PATH_PROG(PKG_CONFIG, [pkg-config], [AC_MSG_ERROR([No pkg-config found])])
1352
if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args ; then
1358
if test "x$target_found" = "xno"; then
1359
ifelse([$4],,[AC_MSG_ERROR([Backend $backend not found.])],[$4])
1361
ifelse([$3],,[:],[$3])
1365
# nls.m4 serial 5 (gettext-0.18)
1366
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
1368
dnl This file is free software; the Free Software Foundation
1369
dnl gives unlimited permission to copy and/or distribute it,
1370
dnl with or without modifications, as long as this notice is preserved.
1372
dnl This file can can be used in projects which are not available under
1373
dnl the GNU General Public License or the GNU Library General Public
1374
dnl License but which still want to provide support for the GNU gettext
1376
dnl Please note that the actual code of the GNU gettext library is covered
1377
dnl by the GNU Library General Public License, and the rest of the GNU
1378
dnl gettext package package is covered by the GNU General Public License.
1379
dnl They are *not* in the public domain.
1382
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1383
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1389
AC_MSG_CHECKING([whether NLS is requested])
1390
dnl Default is enabled NLS
1391
AC_ARG_ENABLE([nls],
1392
[ --disable-nls do not use Native Language Support],
1393
USE_NLS=$enableval, USE_NLS=yes)
1394
AC_MSG_RESULT([$USE_NLS])
1398
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1399
# serial 1 (pkg-config-0.24)
1401
# Copyright Ā© 2004 Scott James Remnant <scott@netsplit.com>.
1403
# This program is free software; you can redistribute it and/or modify
1404
# it under the terms of the GNU General Public License as published by
1405
# the Free Software Foundation; either version 2 of the License, or
1406
# (at your option) any later version.
1408
# This program is distributed in the hope that it will be useful, but
1409
# WITHOUT ANY WARRANTY; without even the implied warranty of
1410
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1411
# General Public License for more details.
1413
# You should have received a copy of the GNU General Public License
1414
# along with this program; if not, write to the Free Software
1415
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1417
# As a special exception to the GNU General Public License, if you
1418
# distribute this file as part of a program that contains a
1419
# configuration script generated by Autoconf, you may include it under
1420
# the same distribution terms that you use for the rest of that program.
1422
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1423
# ----------------------------------
1424
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1425
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1426
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
1427
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
1428
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1429
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1430
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1432
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1433
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1435
if test -n "$PKG_CONFIG"; then
1436
_pkg_min_version=m4_default([$1], [0.9.0])
1437
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1438
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1439
AC_MSG_RESULT([yes])
1445
])# PKG_PROG_PKG_CONFIG
1447
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1449
# Check to see whether a particular set of modules exists. Similar
1450
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1452
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1453
# only at the first occurence in configure.ac, so if the first place
1454
# it's called might be skipped (such as if it is within an "if", you
1455
# have to call PKG_CHECK_EXISTS manually
1456
# --------------------------------------------------------------
1457
AC_DEFUN([PKG_CHECK_EXISTS],
1458
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1459
if test -n "$PKG_CONFIG" && \
1460
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1461
m4_default([$2], [:])
1462
m4_ifvaln([$3], [else
1466
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1467
# ---------------------------------------------
1468
m4_define([_PKG_CONFIG],
1469
[if test -n "$$1"; then
1471
elif test -n "$PKG_CONFIG"; then
1472
PKG_CHECK_EXISTS([$3],
1473
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
1474
test "x$?" != "x0" && pkg_failed=yes ],
1481
# _PKG_SHORT_ERRORS_SUPPORTED
1482
# -----------------------------
1483
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1484
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1485
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1486
_pkg_short_errors_supported=yes
1488
_pkg_short_errors_supported=no
1490
])# _PKG_SHORT_ERRORS_SUPPORTED
1493
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1494
# [ACTION-IF-NOT-FOUND])
1497
# Note that if there is a possibility the first call to
1498
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1499
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1502
# --------------------------------------------------------------
1503
AC_DEFUN([PKG_CHECK_MODULES],
1504
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1505
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1506
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1509
AC_MSG_CHECKING([for $1])
1511
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1512
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1514
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1515
and $1[]_LIBS to avoid the need to call pkg-config.
1516
See the pkg-config man page for more details.])
1518
if test $pkg_failed = yes; then
1520
_PKG_SHORT_ERRORS_SUPPORTED
1521
if test $_pkg_short_errors_supported = yes; then
1522
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
1524
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
1526
# Put the nasty error message in config.log where it belongs
1527
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1529
m4_default([$4], [AC_MSG_ERROR(
1530
[Package requirements ($2) were not met:
1534
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1535
installed software in a non-standard prefix.
1539
elif test $pkg_failed = untried; then
1541
m4_default([$4], [AC_MSG_FAILURE(
1542
[The pkg-config script could not be found or is too old. Make sure it
1543
is in your PATH or set the PKG_CONFIG environment variable to the full
1548
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1551
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1552
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1553
AC_MSG_RESULT([yes])
1556
])# PKG_CHECK_MODULES
1558
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1560
# This file is free software; the Free Software Foundation
1561
# gives unlimited permission to copy and/or distribute it,
1562
# with or without modifications, as long as this notice is preserved.
1564
# AM_AUTOMAKE_VERSION(VERSION)
1565
# ----------------------------
1566
# Automake X.Y traces this macro to ensure aclocal.m4 has been
1567
# generated from the m4 files accompanying Automake X.Y.
1568
# (This private macro should not be called outside this file.)
1569
AC_DEFUN([AM_AUTOMAKE_VERSION],
1570
[am__api_version='1.11'
1571
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1572
dnl require some minimum version. Point them to the right macro.
1573
m4_if([$1], [1.11.1], [],
1574
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1577
# _AM_AUTOCONF_VERSION(VERSION)
1578
# -----------------------------
1579
# aclocal traces this macro to find the Autoconf version.
1580
# This is a private macro too. Using m4_define simplifies
1581
# the logic in aclocal, which can simply ignore this definition.
1582
m4_define([_AM_AUTOCONF_VERSION], [])
1584
# AM_SET_CURRENT_AUTOMAKE_VERSION
1585
# -------------------------------
1586
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1587
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1588
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1589
[AM_AUTOMAKE_VERSION([1.11.1])dnl
1590
m4_ifndef([AC_AUTOCONF_VERSION],
1591
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1592
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1594
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
1596
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1598
# This file is free software; the Free Software Foundation
1599
# gives unlimited permission to copy and/or distribute it,
1600
# with or without modifications, as long as this notice is preserved.
1602
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1603
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
1604
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
1606
# Of course, Automake must honor this variable whenever it calls a
1607
# tool from the auxiliary directory. The problem is that $srcdir (and
1608
# therefore $ac_aux_dir as well) can be either absolute or relative,
1609
# depending on how configure is run. This is pretty annoying, since
1610
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
1611
# source directory, any form will work fine, but in subdirectories a
1612
# relative path needs to be adjusted first.
1614
# $ac_aux_dir/missing
1615
# fails when called from a subdirectory if $ac_aux_dir is relative
1616
# $top_srcdir/$ac_aux_dir/missing
1617
# fails if $ac_aux_dir is absolute,
1618
# fails when called from a subdirectory in a VPATH build with
1619
# a relative $ac_aux_dir
1621
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1622
# are both prefixed by $srcdir. In an in-source build this is usually
1623
# harmless because $srcdir is `.', but things will broke when you
1624
# start a VPATH build or use an absolute $srcdir.
1626
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1627
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1628
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1629
# and then we would define $MISSING as
1630
# MISSING="\${SHELL} $am_aux_dir/missing"
1631
# This will work as long as MISSING is not called from configure, because
1632
# unfortunately $(top_srcdir) has no meaning in configure.
1633
# However there are other variables, like CC, which are often used in
1634
# configure, and could therefore not use this "fixed" $ac_aux_dir.
1636
# Another solution, used here, is to always expand $ac_aux_dir to an
1637
# absolute PATH. The drawback is that using absolute paths prevent a
1638
# configured tree to be moved without reconfiguration.
1640
AC_DEFUN([AM_AUX_DIR_EXPAND],
1641
[dnl Rely on autoconf to set up CDPATH properly.
1642
AC_PREREQ([2.50])dnl
1643
# expand $ac_aux_dir to an absolute path
1644
am_aux_dir=`cd $ac_aux_dir && pwd`
1647
# AM_CONDITIONAL -*- Autoconf -*-
1649
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
1650
# Free Software Foundation, Inc.
1652
# This file is free software; the Free Software Foundation
1653
# gives unlimited permission to copy and/or distribute it,
1654
# with or without modifications, as long as this notice is preserved.
1658
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1659
# -------------------------------------
1660
# Define a conditional.
1661
AC_DEFUN([AM_CONDITIONAL],
1663
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1664
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1665
AC_SUBST([$1_TRUE])dnl
1666
AC_SUBST([$1_FALSE])dnl
1667
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
1668
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1669
m4_define([_AM_COND_VALUE_$1], [$2])dnl
1677
AC_CONFIG_COMMANDS_PRE(
1678
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1679
AC_MSG_ERROR([[conditional "$1" was never defined.
1680
Usually this means the macro was only invoked conditionally.]])
1683
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
1684
# Free Software Foundation, Inc.
1686
# This file is free software; the Free Software Foundation
1687
# gives unlimited permission to copy and/or distribute it,
1688
# with or without modifications, as long as this notice is preserved.
1692
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1693
# written in clear, in which case automake, when reading aclocal.m4,
1694
# will think it sees a *use*, and therefore will trigger all it's
1695
# C support machinery. Also note that it means that autoscan, seeing
1696
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1699
# _AM_DEPENDENCIES(NAME)
1700
# ----------------------
1701
# See how the compiler implements dependency checking.
1702
# NAME is "CC", "CXX", "GCJ", or "OBJC".
1703
# We try a few techniques and use that to set a single cache variable.
1705
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1706
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1707
# dependency, and given that the user is not expected to run this macro,
1708
# just rely on AC_PROG_CC.
1709
AC_DEFUN([_AM_DEPENDENCIES],
1710
[AC_REQUIRE([AM_SET_DEPDIR])dnl
1711
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1712
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1713
AC_REQUIRE([AM_DEP_TRACK])dnl
1715
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
1716
[$1], CXX, [depcc="$CXX" am_compiler_list=],
1717
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1718
[$1], UPC, [depcc="$UPC" am_compiler_list=],
1719
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1720
[depcc="$$1" am_compiler_list=])
1722
AC_CACHE_CHECK([dependency style of $depcc],
1723
[am_cv_$1_dependencies_compiler_type],
1724
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1725
# We make a subdir and do the tests there. Otherwise we can end up
1726
# making bogus files that we don't know about and never remove. For
1727
# instance it was reported that on HP-UX the gcc test will end up
1728
# making a dummy file named `D' -- because `-MD' means `put the output
1731
# Copy depcomp to subdir because otherwise we won't find it if we're
1732
# using a relative directory.
1733
cp "$am_depcomp" conftest.dir
1735
# We will build objects and dependencies in a subdirectory because
1736
# it helps to detect inapplicable dependency modes. For instance
1737
# both Tru64's cc and ICC support -MD to output dependencies as a
1738
# side effect of compilation, but ICC will put the dependencies in
1739
# the current directory while Tru64 will put them in the object
1743
am_cv_$1_dependencies_compiler_type=none
1744
if test "$am_compiler_list" = ""; then
1745
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1749
[case " $depcc " in #(
1750
*\ -arch\ *\ -arch\ *) am__universal=true ;;
1753
[case " $depcc " in #(
1754
*\ -arch\ *\ -arch\ *) am__universal=true ;;
1757
for depmode in $am_compiler_list; do
1758
# Setup a source with many dependencies, because some compilers
1759
# like to wrap large dependency lists on column 80 (with \), and
1760
# we should not choose a depcomp mode which is confused by this.
1762
# We need to recreate these files for each test, as the compiler may
1763
# overwrite some of them when testing with obscure command lines.
1764
# This happens at least with the AIX C compiler.
1766
for i in 1 2 3 4 5 6; do
1767
echo '#include "conftst'$i'.h"' >> sub/conftest.c
1768
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
1769
# Solaris 8's {/usr,}/bin/sh.
1770
touch sub/conftst$i.h
1772
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1774
# We check with `-c' and `-o' for the sake of the "dashmstdout"
1775
# mode. It turns out that the SunPro C++ compiler does not properly
1776
# handle `-M -o', and we need to detect this. Also, some Intel
1777
# versions had trouble with output in subdirs
1778
am__obj=sub/conftest.${OBJEXT-o}
1779
am__minus_obj="-o $am__obj"
1782
# This depmode causes a compiler race in universal mode.
1783
test "$am__universal" = false || continue
1786
# after this tag, mechanisms are not by side-effect, so they'll
1787
# only be used when explicitly requested
1788
if test "x$enable_dependency_tracking" = xyes; then
1794
msvisualcpp | msvcmsys)
1795
# This compiler won't grok `-c -o', but also, the minuso test has
1796
# not run yet. These depmodes are late enough in the game, and
1797
# so weak that their functioning should not be impacted.
1798
am__obj=conftest.${OBJEXT-o}
1803
if depmode=$depmode \
1804
source=sub/conftest.c object=$am__obj \
1805
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1806
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1807
>/dev/null 2>conftest.err &&
1808
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1809
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1810
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1811
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1812
# icc doesn't choke on unknown options, it will just issue warnings
1813
# or remarks (even with -Werror). So we grep stderr for any message
1814
# that says an option was ignored or not supported.
1815
# When given -MP, icc 7.0 and 7.1 complain thusly:
1816
# icc: Command line warning: ignoring option '-M'; no argument required
1817
# The diagnosis changed in icc 8.0:
1818
# icc: Command line remark: option '-MP' not supported
1819
if (grep 'ignoring option' conftest.err ||
1820
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1821
am_cv_$1_dependencies_compiler_type=$depmode
1830
am_cv_$1_dependencies_compiler_type=none
1833
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1834
AM_CONDITIONAL([am__fastdep$1], [
1835
test "x$enable_dependency_tracking" != xno \
1836
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1842
# Choose a directory name for dependency files.
1843
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
1844
AC_DEFUN([AM_SET_DEPDIR],
1845
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1846
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1852
AC_DEFUN([AM_DEP_TRACK],
1853
[AC_ARG_ENABLE(dependency-tracking,
1854
[ --disable-dependency-tracking speeds up one-time build
1855
--enable-dependency-tracking do not reject slow dependency extractors])
1856
if test "x$enable_dependency_tracking" != xno; then
1857
am_depcomp="$ac_aux_dir/depcomp"
1860
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1861
AC_SUBST([AMDEPBACKSLASH])dnl
1862
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1865
# Generate code to set up dependency tracking. -*- Autoconf -*-
1867
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1868
# Free Software Foundation, Inc.
1870
# This file is free software; the Free Software Foundation
1871
# gives unlimited permission to copy and/or distribute it,
1872
# with or without modifications, as long as this notice is preserved.
1876
# _AM_OUTPUT_DEPENDENCY_COMMANDS
1877
# ------------------------------
1878
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1880
# Autoconf 2.62 quotes --file arguments for eval, but not when files
1881
# are listed without --file. Let's play safe and only enable the eval
1882
# if we detect the quoting.
1883
case $CONFIG_FILES in
1884
*\'*) eval set x "$CONFIG_FILES" ;;
1885
*) set x $CONFIG_FILES ;;
1890
# Strip MF so we end up with the name of the file.
1891
mf=`echo "$mf" | sed -e 's/:.*$//'`
1892
# Check whether this is an Automake generated Makefile or not.
1893
# We used to match only the files named `Makefile.in', but
1894
# some people rename them; so instead we look at the file content.
1895
# Grep'ing the first line is not enough: some people post-process
1896
# each Makefile.in and add a new line on top of each file to say so.
1897
# Grep'ing the whole file is not good either: AIX grep has a line
1898
# limit of 2048, but all sed's we know have understand at least 4000.
1899
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1900
dirpart=`AS_DIRNAME("$mf")`
1904
# Extract the definition of DEPDIR, am__include, and am__quote
1905
# from the Makefile without running `make'.
1906
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1907
test -z "$DEPDIR" && continue
1908
am__include=`sed -n 's/^am__include = //p' < "$mf"`
1909
test -z "am__include" && continue
1910
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1911
# When using ansi2knr, U may be empty or an underscore; expand it
1912
U=`sed -n 's/^U = //p' < "$mf"`
1913
# Find all dependency output files, they are included files with
1914
# $(DEPDIR) in their names. We invoke sed twice because it is the
1915
# simplest approach to changing $(DEPDIR) to its actual value in the
1917
for file in `sed -n "
1918
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1919
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1920
# Make sure the directory exists.
1921
test -f "$dirpart/$file" && continue
1922
fdir=`AS_DIRNAME(["$file"])`
1923
AS_MKDIR_P([$dirpart/$fdir])
1924
# echo "creating $dirpart/$file"
1925
echo '# dummy' > "$dirpart/$file"
1929
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1932
# AM_OUTPUT_DEPENDENCY_COMMANDS
1933
# -----------------------------
1934
# This macro should only be invoked once -- use via AC_REQUIRE.
1936
# This code is only required when automatic dependency tracking
1937
# is enabled. FIXME. This creates each `.P' file that we will
1938
# need in order to bootstrap the dependency handling code.
1939
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1940
[AC_CONFIG_COMMANDS([depfiles],
1941
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1942
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1945
# Do all the work for Automake. -*- Autoconf -*-
1947
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1948
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1950
# This file is free software; the Free Software Foundation
1951
# gives unlimited permission to copy and/or distribute it,
1952
# with or without modifications, as long as this notice is preserved.
1956
# This macro actually does too much. Some checks are only needed if
1957
# your package does certain things. But this isn't really a big deal.
1959
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1960
# AM_INIT_AUTOMAKE([OPTIONS])
1961
# -----------------------------------------------
1962
# The call with PACKAGE and VERSION arguments is the old style
1963
# call (pre autoconf-2.50), which is being phased out. PACKAGE
1964
# and VERSION should now be passed to AC_INIT and removed from
1965
# the call to AM_INIT_AUTOMAKE.
1966
# We support both call styles for the transition. After
1967
# the next Automake release, Autoconf can make the AC_INIT
1968
# arguments mandatory, and then we can depend on a new Autoconf
1969
# release and drop the old call support.
1970
AC_DEFUN([AM_INIT_AUTOMAKE],
1971
[AC_PREREQ([2.62])dnl
1972
dnl Autoconf wants to disallow AM_ names. We explicitly allow
1973
dnl the ones we care about.
1974
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1975
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1976
AC_REQUIRE([AC_PROG_INSTALL])dnl
1977
if test "`cd $srcdir && pwd`" != "`pwd`"; then
1978
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1979
# is not polluted with repeated "-I."
1980
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1981
# test to see if srcdir already configured
1982
if test -f $srcdir/config.status; then
1983
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1987
# test whether we have cygpath
1988
if test -z "$CYGPATH_W"; then
1989
if (cygpath --version) >/dev/null 2>/dev/null; then
1990
CYGPATH_W='cygpath -w'
1995
AC_SUBST([CYGPATH_W])
1997
# Define the identity of the package.
1998
dnl Distinguish between old-style and new-style calls.
2000
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
2001
AC_SUBST([PACKAGE], [$1])dnl
2002
AC_SUBST([VERSION], [$2])],
2003
[_AM_SET_OPTIONS([$1])dnl
2004
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
2005
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
2006
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
2007
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
2008
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
2010
_AM_IF_OPTION([no-define],,
2011
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
2012
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
2014
# Some tools Automake needs.
2015
AC_REQUIRE([AM_SANITY_CHECK])dnl
2016
AC_REQUIRE([AC_ARG_PROGRAM])dnl
2017
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
2018
AM_MISSING_PROG(AUTOCONF, autoconf)
2019
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
2020
AM_MISSING_PROG(AUTOHEADER, autoheader)
2021
AM_MISSING_PROG(MAKEINFO, makeinfo)
2022
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2023
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
2024
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
2025
# We need awk for the "check" target. The system "awk" is bad on
2027
AC_REQUIRE([AC_PROG_AWK])dnl
2028
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2029
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
2030
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
2031
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
2032
[_AM_PROG_TAR([v7])])])
2033
_AM_IF_OPTION([no-dependencies],,
2034
[AC_PROVIDE_IFELSE([AC_PROG_CC],
2035
[_AM_DEPENDENCIES(CC)],
2036
[define([AC_PROG_CC],
2037
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
2038
AC_PROVIDE_IFELSE([AC_PROG_CXX],
2039
[_AM_DEPENDENCIES(CXX)],
2040
[define([AC_PROG_CXX],
2041
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
2042
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
2043
[_AM_DEPENDENCIES(OBJC)],
2044
[define([AC_PROG_OBJC],
2045
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
2047
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
2048
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
2049
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
2050
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
2051
AC_CONFIG_COMMANDS_PRE(dnl
2052
[m4_provide_if([_AM_COMPILER_EXEEXT],
2053
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
2056
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
2057
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
2058
dnl mangled by Autoconf and run in a shell conditional statement.
2059
m4_define([_AC_COMPILER_EXEEXT],
2060
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
2063
# When config.status generates a header, we must update the stamp-h file.
2064
# This file resides in the same directory as the config header
2065
# that is generated. The stamp files are numbered to have different names.
2067
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
2068
# loop where config.status creates the headers, so we can generate
2069
# our stamp files there.
2070
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
2071
[# Compute $1's index in $config_headers.
2074
for _am_header in $config_headers :; do
2076
$_am_arg | $_am_arg:* )
2079
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
2082
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
2084
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
2086
# This file is free software; the Free Software Foundation
2087
# gives unlimited permission to copy and/or distribute it,
2088
# with or without modifications, as long as this notice is preserved.
2090
# AM_PROG_INSTALL_SH
2091
# ------------------
2092
# Define $install_sh.
2093
AC_DEFUN([AM_PROG_INSTALL_SH],
2094
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2095
if test x"${install_sh}" != xset; then
2098
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2100
install_sh="\${SHELL} $am_aux_dir/install-sh"
2103
AC_SUBST(install_sh)])
2105
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
2107
# This file is free software; the Free Software Foundation
2108
# gives unlimited permission to copy and/or distribute it,
2109
# with or without modifications, as long as this notice is preserved.
2113
# Check whether the underlying file-system supports filenames
2114
# with a leading dot. For instance MS-DOS doesn't.
2115
AC_DEFUN([AM_SET_LEADING_DOT],
2116
[rm -rf .tst 2>/dev/null
2117
mkdir .tst 2>/dev/null
2118
if test -d .tst; then
2123
rmdir .tst 2>/dev/null
2124
AC_SUBST([am__leading_dot])])
2126
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
2129
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
2130
# Free Software Foundation, Inc.
2132
# This file is free software; the Free Software Foundation
2133
# gives unlimited permission to copy and/or distribute it,
2134
# with or without modifications, as long as this notice is preserved.
2138
# AM_MAINTAINER_MODE([DEFAULT-MODE])
2139
# ----------------------------------
2140
# Control maintainer-specific portions of Makefiles.
2141
# Default is to disable them, unless `enable' is passed literally.
2142
# For symmetry, `disable' may be passed as well. Anyway, the user
2143
# can override the default with the --enable/--disable switch.
2144
AC_DEFUN([AM_MAINTAINER_MODE],
2145
[m4_case(m4_default([$1], [disable]),
2146
[enable], [m4_define([am_maintainer_other], [disable])],
2147
[disable], [m4_define([am_maintainer_other], [enable])],
2148
[m4_define([am_maintainer_other], [enable])
2149
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
2150
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
2151
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
2152
AC_ARG_ENABLE([maintainer-mode],
2153
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
2154
(and sometimes confusing) to the casual installer],
2155
[USE_MAINTAINER_MODE=$enableval],
2156
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
2157
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
2158
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
2159
MAINT=$MAINTAINER_MODE_TRUE
2160
AC_SUBST([MAINT])dnl
2164
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
2166
# Check to see how 'make' treats includes. -*- Autoconf -*-
2168
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
2170
# This file is free software; the Free Software Foundation
2171
# gives unlimited permission to copy and/or distribute it,
2172
# with or without modifications, as long as this notice is preserved.
2178
# Check to see how make treats includes.
2179
AC_DEFUN([AM_MAKE_INCLUDE],
2180
[am_make=${MAKE-make}
2181
cat > confinc << 'END'
2183
@echo this is the am__doit target
2186
# If we don't find an include directive, just comment out the code.
2187
AC_MSG_CHECKING([for style of include used by $am_make])
2191
# First try GNU make style include.
2192
echo "include confinc" > confmf
2193
# Ignore all kinds of additional output from `make'.
2194
case `$am_make -s -f confmf 2> /dev/null` in #(
2195
*the\ am__doit\ target*)
2201
# Now try BSD make style include.
2202
if test "$am__include" = "#"; then
2203
echo '.include "confinc"' > confmf
2204
case `$am_make -s -f confmf 2> /dev/null` in #(
2205
*the\ am__doit\ target*)
2206
am__include=.include
2212
AC_SUBST([am__include])
2213
AC_SUBST([am__quote])
2214
AC_MSG_RESULT([$_am_result])
2215
rm -f confinc confmf
2218
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
2220
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
2221
# Free Software Foundation, Inc.
2223
# This file is free software; the Free Software Foundation
2224
# gives unlimited permission to copy and/or distribute it,
2225
# with or without modifications, as long as this notice is preserved.
2229
# AM_MISSING_PROG(NAME, PROGRAM)
2230
# ------------------------------
2231
AC_DEFUN([AM_MISSING_PROG],
2232
[AC_REQUIRE([AM_MISSING_HAS_RUN])
2233
$1=${$1-"${am_missing_run}$2"}
2237
# AM_MISSING_HAS_RUN
2238
# ------------------
2239
# Define MISSING if not defined so far and test if it supports --run.
2240
# If it does, set am_missing_run to use it, otherwise, to nothing.
2241
AC_DEFUN([AM_MISSING_HAS_RUN],
2242
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2243
AC_REQUIRE_AUX_FILE([missing])dnl
2244
if test x"${MISSING+set}" != xset; then
2247
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2249
MISSING="\${SHELL} $am_aux_dir/missing" ;;
2252
# Use eval to expand $SHELL
2253
if eval "$MISSING --run true"; then
2254
am_missing_run="$MISSING --run "
2257
AC_MSG_WARN([`missing' script is too old or missing])
2261
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
2263
# This file is free software; the Free Software Foundation
2264
# gives unlimited permission to copy and/or distribute it,
2265
# with or without modifications, as long as this notice is preserved.
2269
# Check for `mkdir -p'.
2270
AC_DEFUN([AM_PROG_MKDIR_P],
2271
[AC_PREREQ([2.60])dnl
2272
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
2273
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
2274
dnl while keeping a definition of mkdir_p for backward compatibility.
2275
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
2276
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
2277
dnl Makefile.ins that do not define MKDIR_P, so we do our own
2278
dnl adjustment using top_builddir (which is defined more often than
2280
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
2282
[[\\/$]]* | ?:[[\\/]]*) ;;
2283
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
2287
# Helper functions for option handling. -*- Autoconf -*-
2289
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
2291
# This file is free software; the Free Software Foundation
2292
# gives unlimited permission to copy and/or distribute it,
2293
# with or without modifications, as long as this notice is preserved.
2297
# _AM_MANGLE_OPTION(NAME)
2298
# -----------------------
2299
AC_DEFUN([_AM_MANGLE_OPTION],
2300
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2302
# _AM_SET_OPTION(NAME)
2303
# ------------------------------
2304
# Set option NAME. Presently that only means defining a flag for this option.
2305
AC_DEFUN([_AM_SET_OPTION],
2306
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
2308
# _AM_SET_OPTIONS(OPTIONS)
2309
# ----------------------------------
2310
# OPTIONS is a space-separated list of Automake options.
2311
AC_DEFUN([_AM_SET_OPTIONS],
2312
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2314
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2315
# -------------------------------------------
2316
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2317
AC_DEFUN([_AM_IF_OPTION],
2318
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2320
# Check to make sure that the build environment is sane. -*- Autoconf -*-
2322
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
2323
# Free Software Foundation, Inc.
2325
# This file is free software; the Free Software Foundation
2326
# gives unlimited permission to copy and/or distribute it,
2327
# with or without modifications, as long as this notice is preserved.
2333
AC_DEFUN([AM_SANITY_CHECK],
2334
[AC_MSG_CHECKING([whether build environment is sane])
2337
echo timestamp > conftest.file
2338
# Reject unsafe characters in $srcdir or the absolute working directory
2339
# name. Accept space and tab only in the latter.
2343
*[[\\\"\#\$\&\'\`$am_lf]]*)
2344
AC_MSG_ERROR([unsafe absolute working directory name]);;
2347
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
2348
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
2351
# Do `set' in a subshell so we don't clobber the current shell's
2352
# arguments. Must try -L first in case configure is actually a
2353
# symlink; some systems play weird games with the mod time of symlinks
2354
# (eg FreeBSD returns the mod time of the symlink's containing
2357
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2358
if test "$[*]" = "X"; then
2360
set X `ls -t "$srcdir/configure" conftest.file`
2363
if test "$[*]" != "X $srcdir/configure conftest.file" \
2364
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
2366
# If neither matched, then we have a broken ls. This can happen
2367
# if, for instance, CONFIG_SHELL is bash and it inherits a
2368
# broken ls alias from the environment. This has actually
2369
# happened. Such a system could not be considered "sane".
2370
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2371
alias in your environment])
2374
test "$[2]" = conftest.file
2380
AC_MSG_ERROR([newly created file is older than distributed files!
2381
Check your system clock])
2383
AC_MSG_RESULT(yes)])
2385
# Copyright (C) 2009 Free Software Foundation, Inc.
2387
# This file is free software; the Free Software Foundation
2388
# gives unlimited permission to copy and/or distribute it,
2389
# with or without modifications, as long as this notice is preserved.
2393
# AM_SILENT_RULES([DEFAULT])
2394
# --------------------------
2395
# Enable less verbose build rules; with the default set to DEFAULT
2396
# (`yes' being less verbose, `no' or empty being verbose).
2397
AC_DEFUN([AM_SILENT_RULES],
2398
[AC_ARG_ENABLE([silent-rules],
2399
[ --enable-silent-rules less verbose build output (undo: `make V=1')
2400
--disable-silent-rules verbose build output (undo: `make V=0')])
2401
case $enable_silent_rules in
2402
yes) AM_DEFAULT_VERBOSITY=0;;
2403
no) AM_DEFAULT_VERBOSITY=1;;
2404
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
2406
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
2408
AC_SUBST([AM_BACKSLASH])dnl
2409
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
2412
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
2414
# This file is free software; the Free Software Foundation
2415
# gives unlimited permission to copy and/or distribute it,
2416
# with or without modifications, as long as this notice is preserved.
2418
# AM_PROG_INSTALL_STRIP
2419
# ---------------------
2420
# One issue with vendor `install' (even GNU) is that you can't
2421
# specify the program used to strip binaries. This is especially
2422
# annoying in cross-compiling environments, where the build's strip
2423
# is unlikely to handle the host's binaries.
2424
# Fortunately install-sh will honor a STRIPPROG variable, so we
2425
# always use install-sh in `make install-strip', and initialize
2426
# STRIPPROG with the value of the STRIP variable (set by the user).
2427
AC_DEFUN([AM_PROG_INSTALL_STRIP],
2428
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2429
# Installed binaries are usually stripped using `strip' when the user
2430
# run `make install-strip'. However `strip' might not be the right
2431
# tool to use in cross-compilation environments, therefore Automake
2432
# will honor the `STRIP' environment variable to overrule this program.
2433
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
2434
if test "$cross_compiling" != no; then
2435
AC_CHECK_TOOL([STRIP], [strip], :)
2437
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2438
AC_SUBST([INSTALL_STRIP_PROGRAM])])
2440
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
2442
# This file is free software; the Free Software Foundation
2443
# gives unlimited permission to copy and/or distribute it,
2444
# with or without modifications, as long as this notice is preserved.
2448
# _AM_SUBST_NOTMAKE(VARIABLE)
2449
# ---------------------------
2450
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2451
# This macro is traced by Automake.
2452
AC_DEFUN([_AM_SUBST_NOTMAKE])
2454
# AM_SUBST_NOTMAKE(VARIABLE)
2455
# ---------------------------
2456
# Public sister of _AM_SUBST_NOTMAKE.
2457
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2459
# Check how to create a tarball. -*- Autoconf -*-
2461
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
2463
# This file is free software; the Free Software Foundation
2464
# gives unlimited permission to copy and/or distribute it,
2465
# with or without modifications, as long as this notice is preserved.
2469
# _AM_PROG_TAR(FORMAT)
2470
# --------------------
2471
# Check how to create a tarball in format FORMAT.
2472
# FORMAT should be one of `v7', `ustar', or `pax'.
2474
# Substitute a variable $(am__tar) that is a command
2475
# writing to stdout a FORMAT-tarball containing the directory
2477
# tardir=directory && $(am__tar) > result.tar
2479
# Substitute a variable $(am__untar) that extract such
2480
# a tarball read from stdin.
2481
# $(am__untar) < result.tar
2482
AC_DEFUN([_AM_PROG_TAR],
2483
[# Always define AMTAR for backward compatibility.
2484
AM_MISSING_PROG([AMTAR], [tar])
2486
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
2487
[m4_case([$1], [ustar],, [pax],,
2488
[m4_fatal([Unknown tar format])])
2489
AC_MSG_CHECKING([how to create a $1 tar archive])
2490
# Loop over all known methods to create a tar archive until one works.
2491
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2492
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
2493
# Do not fold the above two line into one, because Tru64 sh and
2494
# Solaris sh will not grok spaces in the rhs of `-'.
2495
for _am_tool in $_am_tools
2499
for _am_tar in tar gnutar gtar;
2501
AM_RUN_LOG([$_am_tar --version]) && break
2503
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2504
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2505
am__untar="$_am_tar -xf -"
2508
# Must skip GNU tar: if it does not support --format= it doesn't create
2509
# ustar tarball either.
2510
(tar --version) >/dev/null 2>&1 && continue
2511
am__tar='tar chf - "$$tardir"'
2512
am__tar_='tar chf - "$tardir"'
2513
am__untar='tar xf -'
2516
am__tar='pax -L -x $1 -w "$$tardir"'
2517
am__tar_='pax -L -x $1 -w "$tardir"'
2521
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2522
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2523
am__untar='cpio -i -H $1 -d'
2532
# If the value was cached, stop now. We just wanted to have am__tar
2533
# and am__untar set.
2534
test -n "${am_cv_prog_tar_$1}" && break
2536
# tar/untar a dummy directory, and stop if the command works
2539
echo GrepMe > conftest.dir/file
2540
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2542
if test -s conftest.tar; then
2543
AM_RUN_LOG([$am__untar <conftest.tar])
2544
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2549
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2550
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2552
AC_SUBST([am__untar])
2555
m4_include([m4/gnome-doc-utils.m4])
2556
m4_include([m4/intltool.m4])
2557
m4_include([m4/libtool.m4])
2558
m4_include([m4/ltoptions.m4])
2559
m4_include([m4/ltsugar.m4])
2560
m4_include([m4/ltversion.m4])
2561
m4_include([m4/lt~obsolete.m4])