1
# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
6
# This file is free software; the Free Software Foundation
7
# gives unlimited permission to copy and/or distribute it,
8
# with or without modifications, as long as this notice is preserved.
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15
m4_ifndef([AC_AUTOCONF_VERSION],
16
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
18
[m4_warning([this file was generated for autoconf 2.68.
19
You have another version of autoconf. It may work, but is not guaranteed to.
20
If you have problems, you may need to regenerate the build system entirely.
21
To do so, use the procedure documented by the package, typically `autoreconf'.])])
23
# gettext.m4 serial 63 (gettext-0.18)
24
dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
25
dnl This file is free software; the Free Software Foundation
26
dnl gives unlimited permission to copy and/or distribute it,
27
dnl with or without modifications, as long as this notice is preserved.
29
dnl This file can can be used in projects which are not available under
30
dnl the GNU General Public License or the GNU Library General Public
31
dnl License but which still want to provide support for the GNU gettext
33
dnl Please note that the actual code of the GNU gettext library is covered
34
dnl by the GNU Library General Public License, and the rest of the GNU
35
dnl gettext package package is covered by the GNU General Public License.
36
dnl They are *not* in the public domain.
39
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
40
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
42
dnl Macro to add for using GNU gettext.
44
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
45
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
46
dnl default (if it is not specified or empty) is 'no-libtool'.
47
dnl INTLSYMBOL should be 'external' for packages with no intl directory,
48
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
49
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
50
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
51
dnl depending on --{enable,disable}-{shared,static} and on the presence of
52
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
53
dnl $(top_builddir)/intl/libintl.a will be created.
54
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
55
dnl implementations (in libc or libintl) without the ngettext() function
56
dnl will be ignored. If NEEDSYMBOL is specified and is
57
dnl 'need-formatstring-macros', then GNU gettext implementations that don't
58
dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
59
dnl INTLDIR is used to find the intl libraries. If empty,
60
dnl the value `$(top_builddir)/intl/' is used.
62
dnl The result of the configuration is one of three cases:
63
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
65
dnl Catalog format: GNU --> install in $(datadir)
66
dnl Catalog extension: .mo after installation, .gmo in source tree
67
dnl 2) GNU gettext has been found in the system's C library.
68
dnl Catalog format: GNU --> install in $(datadir)
69
dnl Catalog extension: .mo after installation, .gmo in source tree
70
dnl 3) No internationalization, always use English msgid.
71
dnl Catalog format: none
72
dnl Catalog extension: none
73
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
74
dnl The use of .gmo is historical (it was needed to avoid overwriting the
75
dnl GNU format catalogs when building on a platform with an X/Open gettext),
76
dnl but we keep it in order not to force irrelevant filename changes on the
79
AC_DEFUN([AM_GNU_GETTEXT],
81
dnl Argument checking.
82
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
83
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
85
ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
86
[AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
87
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
88
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
90
define([gt_included_intl],
91
ifelse([$1], [external],
92
ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
94
define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
96
AM_GNU_GETTEXT_NEED([$2])
98
AC_REQUIRE([AM_PO_SUBDIRS])dnl
99
ifelse(gt_included_intl, yes, [
100
AC_REQUIRE([AM_INTL_SUBDIR])dnl
103
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
104
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
105
AC_REQUIRE([AC_LIB_RPATH])
107
dnl Sometimes libintl requires libiconv, so first search for libiconv.
108
dnl Ideally we would do this search only after the
109
dnl if test "$USE_NLS" = "yes"; then
110
dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
111
dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
112
dnl the configure script would need to contain the same shell code
113
dnl again, outside any 'if'. There are two solutions:
114
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
115
dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
116
dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
117
dnl documented, we avoid it.
118
ifelse(gt_included_intl, yes, , [
119
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
122
dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
128
ifelse(gt_included_intl, yes, [
129
BUILD_INCLUDED_LIBINTL=no
130
USE_INCLUDED_LIBINTL=no
136
dnl Add a version number to the cache macros.
137
case " $gt_needs " in
138
*" need-formatstring-macros "*) gt_api_version=3 ;;
139
*" need-ngettext "*) gt_api_version=2 ;;
140
*) gt_api_version=1 ;;
142
gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
143
gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
145
dnl If we use NLS figure out what method
146
if test "$USE_NLS" = "yes"; then
147
gt_use_preinstalled_gnugettext=no
148
ifelse(gt_included_intl, yes, [
149
AC_MSG_CHECKING([whether included gettext is requested])
150
AC_ARG_WITH([included-gettext],
151
[ --with-included-gettext use the GNU gettext library included here],
152
nls_cv_force_use_gnu_gettext=$withval,
153
nls_cv_force_use_gnu_gettext=no)
154
AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
156
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
157
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
159
dnl User does not insist on using GNU NLS library. Figure out what
160
dnl to use. If GNU gettext is available we use this. Else we have
161
dnl to fall back to GNU NLS library.
163
if test $gt_api_version -ge 3; then
164
gt_revision_test_code='
165
#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
166
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
169
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
173
gt_revision_test_code=
175
if test $gt_api_version -ge 2; then
176
gt_expression_test_code=' + * ngettext ("", "", 0)'
178
gt_expression_test_code=
181
AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
182
[AC_TRY_LINK([#include <libintl.h>
183
$gt_revision_test_code
184
extern int _nl_msg_cat_cntr;
185
extern int *_nl_domain_bindings;],
186
[bindtextdomain ("", "");
187
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
188
[eval "$gt_func_gnugettext_libc=yes"],
189
[eval "$gt_func_gnugettext_libc=no"])])
191
if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
192
dnl Sometimes libintl requires libiconv, so first search for libiconv.
193
ifelse(gt_included_intl, yes, , [
196
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
197
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
198
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
199
dnl even if libiconv doesn't exist.
200
AC_LIB_LINKFLAGS_BODY([intl])
201
AC_CACHE_CHECK([for GNU gettext in libintl],
202
[$gt_func_gnugettext_libintl],
203
[gt_save_CPPFLAGS="$CPPFLAGS"
204
CPPFLAGS="$CPPFLAGS $INCINTL"
206
LIBS="$LIBS $LIBINTL"
207
dnl Now see whether libintl exists and does not depend on libiconv.
208
AC_TRY_LINK([#include <libintl.h>
209
$gt_revision_test_code
210
extern int _nl_msg_cat_cntr;
215
const char *_nl_expand_alias (const char *);],
216
[bindtextdomain ("", "");
217
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
218
[eval "$gt_func_gnugettext_libintl=yes"],
219
[eval "$gt_func_gnugettext_libintl=no"])
220
dnl Now see whether libintl exists and depends on libiconv.
221
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
222
LIBS="$LIBS $LIBICONV"
223
AC_TRY_LINK([#include <libintl.h>
224
$gt_revision_test_code
225
extern int _nl_msg_cat_cntr;
230
const char *_nl_expand_alias (const char *);],
231
[bindtextdomain ("", "");
232
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
233
[LIBINTL="$LIBINTL $LIBICONV"
234
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
235
eval "$gt_func_gnugettext_libintl=yes"
238
CPPFLAGS="$gt_save_CPPFLAGS"
239
LIBS="$gt_save_LIBS"])
242
dnl If an already present or preinstalled GNU gettext() is found,
243
dnl use it. But if this macro is used in GNU gettext, and GNU
244
dnl gettext is already preinstalled in libintl, we update this
245
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
246
if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
247
|| { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
248
&& test "$PACKAGE" != gettext-runtime \
249
&& test "$PACKAGE" != gettext-tools; }; then
250
gt_use_preinstalled_gnugettext=yes
252
dnl Reset the values set by searching for libintl.
258
ifelse(gt_included_intl, yes, [
259
if test "$gt_use_preinstalled_gnugettext" != "yes"; then
260
dnl GNU gettext is not found in the C library.
261
dnl Fall back on included GNU gettext library.
262
nls_cv_use_gnu_gettext=yes
266
if test "$nls_cv_use_gnu_gettext" = "yes"; then
267
dnl Mark actions used to generate GNU NLS library.
268
BUILD_INCLUDED_LIBINTL=yes
269
USE_INCLUDED_LIBINTL=yes
270
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
271
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
272
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
276
if test "$gt_use_preinstalled_gnugettext" = "yes" \
277
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
278
dnl Mark actions to use GNU gettext tools.
283
if test -n "$INTL_MACOSX_LIBS"; then
284
if test "$gt_use_preinstalled_gnugettext" = "yes" \
285
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
286
dnl Some extra flags are needed during linking.
287
LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
288
LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
292
if test "$gt_use_preinstalled_gnugettext" = "yes" \
293
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
294
AC_DEFINE([ENABLE_NLS], [1],
295
[Define to 1 if translation of program messages to the user's native language
302
AC_MSG_CHECKING([whether to use NLS])
303
AC_MSG_RESULT([$USE_NLS])
304
if test "$USE_NLS" = "yes"; then
305
AC_MSG_CHECKING([where the gettext function comes from])
306
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
307
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
308
gt_source="external libintl"
313
gt_source="included intl directory"
315
AC_MSG_RESULT([$gt_source])
318
if test "$USE_NLS" = "yes"; then
320
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
321
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
322
AC_MSG_CHECKING([how to link with libintl])
323
AC_MSG_RESULT([$LIBINTL])
324
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
327
dnl For backward compatibility. Some packages may be using this.
328
AC_DEFINE([HAVE_GETTEXT], [1],
329
[Define if the GNU gettext() function is already present or preinstalled.])
330
AC_DEFINE([HAVE_DCGETTEXT], [1],
331
[Define if the GNU dcgettext() function is already present or preinstalled.])
334
dnl We need to process the po/ directory.
338
ifelse(gt_included_intl, yes, [
339
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
340
dnl to 'yes' because some of the testsuite requires it.
341
if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
342
BUILD_INCLUDED_LIBINTL=yes
345
dnl Make all variables we use known to autoconf.
346
AC_SUBST([BUILD_INCLUDED_LIBINTL])
347
AC_SUBST([USE_INCLUDED_LIBINTL])
348
AC_SUBST([CATOBJEXT])
350
dnl For backward compatibility. Some configure.ins may be using this.
354
dnl For backward compatibility. Some Makefiles may be using this.
356
AC_SUBST([DATADIRNAME])
358
dnl For backward compatibility. Some Makefiles may be using this.
360
AC_SUBST([INSTOBJEXT])
362
dnl For backward compatibility. Some Makefiles may be using this.
366
dnl For backward compatibility. Some Makefiles may be using this.
368
if test "$USE_INCLUDED_LIBINTL" = yes; then
369
INTLOBJS="\$(GETTOBJS)"
373
dnl Enable libtool support if the surrounding package wishes it.
374
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
375
AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
378
dnl For backward compatibility. Some Makefiles may be using this.
382
dnl Make all documented variables known to autoconf.
384
AC_SUBST([LTLIBINTL])
389
dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
390
m4_define([gt_NEEDS_INIT],
392
m4_divert_text([DEFAULTS], [gt_needs=])
393
m4_define([gt_NEEDS_INIT], [])
397
dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
398
AC_DEFUN([AM_GNU_GETTEXT_NEED],
400
m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
404
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
405
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
407
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
408
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
410
# This file is free software, distributed under the terms of the GNU
411
# General Public License. As a special exception to the GNU General
412
# Public License, this file may be distributed as part of a program
413
# that contains a configuration script generated by Autoconf, under
414
# the same distribution terms as the rest of that program.
416
# This file can be copied and used freely without restrictions. It can
417
# be used in projects which are not available under the GNU Public License
418
# but which still want to provide support for the GNU gettext functionality.
420
# Macro to add for using GNU gettext.
421
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
423
# Modified to never use included libintl.
424
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
426
# Major rework to remove unused code
427
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
429
# Added better handling of ALL_LINGUAS from GNU gettext version
430
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
432
# Modified to require ngettext
433
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
435
# We need this here as well, since someone might use autoconf-2.5x
436
# to configure GLib then an older version to configure a package
437
# using AM_GLIB_GNU_GETTEXT
441
dnl We go to great lengths to make sure that aclocal won't
442
dnl try to pull in the installed version of these macros
443
dnl when running aclocal in the glib directory.
445
m4_copy([AC_DEFUN],[glib_DEFUN])
446
m4_copy([AC_REQUIRE],[glib_REQUIRE])
448
dnl At the end, if we're not within glib, we'll define the public
449
dnl definitions in terms of our private definitions.
453
#--------------------
454
glib_DEFUN([GLIB_LC_MESSAGES],
455
[AC_CHECK_HEADERS([locale.h])
456
if test $ac_cv_header_locale_h = yes; then
457
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
458
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
459
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
460
if test $am_cv_val_LC_MESSAGES = yes; then
461
AC_DEFINE(HAVE_LC_MESSAGES, 1,
462
[Define if your <locale.h> file defines LC_MESSAGES.])
466
# GLIB_PATH_PROG_WITH_TEST
467
#----------------------------
468
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
469
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
470
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
471
[# Extract the first word of "$2", so it can be a program name with args.
472
set dummy $2; ac_word=[$]2
473
AC_MSG_CHECKING([for $ac_word])
474
AC_CACHE_VAL(ac_cv_path_$1,
477
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
480
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
481
for ac_dir in ifelse([$5], , $PATH, [$5]); do
482
test -z "$ac_dir" && ac_dir=.
483
if test -f $ac_dir/$ac_word; then
485
ac_cv_path_$1="$ac_dir/$ac_word"
491
dnl If no 4th arg is given, leave the cache variable unset,
492
dnl so AC_PATH_PROGS will keep looking.
493
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
498
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
508
glib_DEFUN([GLIB_WITH_NLS],
509
dnl NLS is obligatory
513
gt_cv_have_gettext=no
519
AC_CHECK_HEADER(libintl.h,
520
[gt_cv_func_dgettext_libintl="no"
521
libintl_extra_libs=""
524
# First check in libc
526
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
530
[return !ngettext ("","", 1)],
531
gt_cv_func_ngettext_libc=yes,
532
gt_cv_func_ngettext_libc=no)
535
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
536
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
540
[return !dgettext ("","")],
541
gt_cv_func_dgettext_libc=yes,
542
gt_cv_func_dgettext_libc=no)
546
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
547
AC_CHECK_FUNCS(bind_textdomain_codeset)
551
# If we don't have everything we want, check in libintl
553
if test "$gt_cv_func_dgettext_libc" != "yes" \
554
|| test "$gt_cv_func_ngettext_libc" != "yes" \
555
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
557
AC_CHECK_LIB(intl, bindtextdomain,
558
[AC_CHECK_LIB(intl, ngettext,
559
[AC_CHECK_LIB(intl, dgettext,
560
gt_cv_func_dgettext_libintl=yes)])])
562
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
563
AC_MSG_CHECKING([if -liconv is needed to use gettext])
565
AC_CHECK_LIB(intl, ngettext,
566
[AC_CHECK_LIB(intl, dcgettext,
567
[gt_cv_func_dgettext_libintl=yes
568
libintl_extra_libs=-liconv],
574
# If we found libintl, then check in it for bind_textdomain_codeset();
575
# we'll prefer libc if neither have bind_textdomain_codeset(),
576
# and both have dgettext and ngettext
578
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
579
glib_save_LIBS="$LIBS"
580
LIBS="$LIBS -lintl $libintl_extra_libs"
581
unset ac_cv_func_bind_textdomain_codeset
582
AC_CHECK_FUNCS(bind_textdomain_codeset)
583
LIBS="$glib_save_LIBS"
585
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
586
gt_cv_func_dgettext_libc=no
588
if test "$gt_cv_func_dgettext_libc" = "yes" \
589
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
590
gt_cv_func_dgettext_libintl=no
596
if test "$gt_cv_func_dgettext_libc" = "yes" \
597
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
598
gt_cv_have_gettext=yes
601
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
602
INTLLIBS="-lintl $libintl_extra_libs"
605
if test "$gt_cv_have_gettext" = "yes"; then
606
AC_DEFINE(HAVE_GETTEXT,1,
607
[Define if the GNU gettext() function is already present or preinstalled.])
608
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
609
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
610
if test "$MSGFMT" != "no"; then
611
glib_save_LIBS="$LIBS"
612
LIBS="$LIBS $INTLLIBS"
613
AC_CHECK_FUNCS(dcgettext)
615
AC_MSG_CHECKING([if msgfmt accepts -c])
616
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
619
"Content-Type: text/plain; charset=UTF-8\n"
620
"Project-Id-Version: test 1.0\n"
621
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
622
"Last-Translator: test <foo@bar.xx>\n"
623
"Language-Team: C <LL@li.org>\n"
624
"MIME-Version: 1.0\n"
625
"Content-Transfer-Encoding: 8bit\n"
626
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
627
AC_SUBST(MSGFMT_OPTS)
628
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
629
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
630
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
631
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
632
return _nl_msg_cat_cntr],
637
dnl On Solaris, if bind_textdomain_codeset is in libc,
638
dnl GNU format message catalog is always supported,
639
dnl since both are added to the libc all together.
640
dnl Hence, we'd like to go with DATADIRNAME=share and
641
dnl and CATOBJEXT=.gmo in this case.
642
AC_CHECK_FUNC(bind_textdomain_codeset,
657
LIBS="$glib_save_LIBS"
660
gt_cv_have_gettext=no
665
if test "$gt_cv_have_gettext" = "yes" ; then
666
AC_DEFINE(ENABLE_NLS, 1,
667
[always defined to indicate that i18n is enabled])
670
dnl Test whether we really found GNU xgettext.
671
if test "$XGETTEXT" != ":"; then
672
dnl If it is not GNU xgettext we define it as : so that the
673
dnl Makefiles still can work.
674
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
678
[found xgettext program is not GNU xgettext; ignore it])
683
# We need to process the po/ directory.
687
[case "$CONFIG_FILES" in *po/Makefile.in*)
688
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
691
dnl These rules are solely for the distribution goal. While doing this
692
dnl we only have to keep exactly one list of the available catalogs
694
for lang in $ALL_LINGUAS; do
695
GMOFILES="$GMOFILES $lang.gmo"
696
POFILES="$POFILES $lang.po"
699
dnl Make all variables we use known to autoconf.
702
AC_SUBST(DATADIRNAME)
706
AC_SUBST(PO_IN_DATADIR_TRUE)
707
AC_SUBST(PO_IN_DATADIR_FALSE)
712
# AM_GLIB_GNU_GETTEXT
713
# -------------------
714
# Do checks necessary for use of gettext. If a suitable implementation
715
# of gettext is found in either in libintl or in the C library,
716
# it will set INTLLIBS to the libraries needed for use of gettext
717
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
718
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
719
# on various variables needed by the Makefile.in.in installed by
722
glib_DEFUN([GLIB_GNU_GETTEXT],
723
[AC_REQUIRE([AC_PROG_CC])dnl
724
AC_REQUIRE([AC_HEADER_STDC])dnl
729
if test "$gt_cv_have_gettext" = "yes"; then
730
if test "x$ALL_LINGUAS" = "x"; then
733
AC_MSG_CHECKING(for catalogs to be installed)
735
for presentlang in $ALL_LINGUAS; do
737
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
738
desiredlanguages="$LINGUAS"
740
desiredlanguages="$ALL_LINGUAS"
742
for desiredlang in $desiredlanguages; do
743
# Use the presentlang catalog if desiredlang is
744
# a. equal to presentlang, or
745
# b. a variant of presentlang (because in this case,
746
# presentlang can be used as a fallback for messages
747
# which are not translated in the desiredlang catalog).
748
case "$desiredlang" in
749
"$presentlang"*) useit=yes;;
752
if test $useit = yes; then
753
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
757
AC_MSG_RESULT($LINGUAS)
760
dnl Construct list of names of catalog files to be constructed.
761
if test -n "$LINGUAS"; then
762
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
766
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
767
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
768
dnl Try to locate is.
770
if test -n "$ac_aux_dir"; then
771
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
773
if test -z "$MKINSTALLDIRS"; then
774
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
776
AC_SUBST(MKINSTALLDIRS)
778
dnl Generate list of files to be processed by xgettext which will
779
dnl be included in po/Makefile.
780
test -d po || mkdir po
781
if test "x$srcdir" != "x."; then
782
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
783
posrcprefix="$srcdir/"
785
posrcprefix="../$srcdir/"
791
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
792
< $srcdir/po/POTFILES.in > po/POTFILES
795
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
796
# -------------------------------
797
# Define VARIABLE to the location where catalog files will
798
# be installed by po/Makefile.
799
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
800
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
801
glib_save_prefix="$prefix"
802
glib_save_exec_prefix="$exec_prefix"
803
glib_save_datarootdir="$datarootdir"
804
test "x$prefix" = xNONE && prefix=$ac_default_prefix
805
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
806
datarootdir=`eval echo "${datarootdir}"`
807
if test "x$CATOBJEXT" = "x.mo" ; then
808
localedir=`eval echo "${libdir}/locale"`
810
localedir=`eval echo "${datadir}/locale"`
812
prefix="$glib_save_prefix"
813
exec_prefix="$glib_save_exec_prefix"
814
datarootdir="$glib_save_datarootdir"
815
AC_DEFINE_UNQUOTED($1, "$localedir",
816
[Define the location where the catalogs will be installed])
820
dnl Now the definitions that aclocal will find
822
ifdef(glib_configure_ac,[],[
823
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
824
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
827
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
829
# Create a temporary file with TEST-FILE as its contents and pass the
830
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
831
# 0 and perform ACTION-IF-FAIL for any other exit status.
832
AC_DEFUN([GLIB_RUN_PROG],
833
[cat >conftest.foo <<_ACEOF
836
if AC_RUN_LOG([$1 conftest.foo]); then
837
m4_ifval([$3], [$3], [:])
838
m4_ifvaln([$4], [else $4])dnl
839
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
840
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
849
dnl GNOME_COMMON_INIT
851
AU_DEFUN([GNOME_COMMON_INIT],
853
dnl this macro should come after AC_CONFIG_MACRO_DIR
854
AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
856
dnl ensure that when the Automake generated makefile calls aclocal,
857
dnl it honours the $ACLOCAL_FLAGS environment variable
858
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
859
if test -n "$ac_macro_dir"; then
860
ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
863
AC_SUBST([ACLOCAL_AMFLAGS])
865
[[$0: This macro is deprecated. You should set put "ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}"
866
in your top-level Makefile.am, instead, where "m4" is the macro directory set
867
with AC_CONFIG_MACRO_DIR() in your configure.ac]])
869
AC_DEFUN([GNOME_DEBUG_CHECK],
871
AC_ARG_ENABLE([debug],
872
AC_HELP_STRING([--enable-debug],
873
[turn on debugging]),,
876
if test x$enable_debug = xyes ; then
877
AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
878
[Enable additional debugging at the expense of performance and size])
882
dnl GNOME_MAINTAINER_MODE_DEFINES ()
883
dnl define DISABLE_DEPRECATED
885
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
887
AC_REQUIRE([AM_MAINTAINER_MODE])
889
DISABLE_DEPRECATED=""
890
if test $USE_MAINTAINER_MODE = yes; then
891
DOMAINS="G ATK PANGO GDK GDK_PIXBUF GTK GCONF BONOBO BONOBO_UI GNOME LIBGLADE VTE GNOME_VFS WNCK LIBSOUP"
892
for DOMAIN in $DOMAINS; do
893
DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
897
AC_SUBST(DISABLE_DEPRECATED)
900
dnl GNOME_COMPILE_WARNINGS
901
dnl Turn on many useful compiler warnings
902
dnl For now, only works on GCC
903
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
904
dnl ******************************
905
dnl More compiler warnings
906
dnl ******************************
908
AC_ARG_ENABLE(compile-warnings,
909
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
910
[Turn on compiler warnings]),,
911
[enable_compile_warnings="m4_default([$1],[yes])"])
914
if test "x$GCC" != xyes; then
915
enable_compile_warnings=no
919
realsave_CFLAGS="$CFLAGS"
921
case "$enable_compile_warnings" in
926
warning_flags="-Wall"
929
warning_flags="-Wall -Wmissing-prototypes"
932
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
933
CFLAGS="$warning_flags $CFLAGS"
934
for option in -Wno-sign-compare; do
935
SAVE_CFLAGS="$CFLAGS"
936
CFLAGS="$CFLAGS $option"
937
AC_MSG_CHECKING([whether gcc understands $option])
938
AC_TRY_COMPILE([], [],
941
CFLAGS="$SAVE_CFLAGS"
942
AC_MSG_RESULT($has_option)
943
if test $has_option = yes; then
944
warning_flags="$warning_flags $option"
950
if test "$enable_compile_warnings" = "error" ; then
951
warning_flags="$warning_flags -Werror"
955
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
958
CFLAGS="$realsave_CFLAGS"
959
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
960
AC_MSG_RESULT($warning_flags)
963
AC_HELP_STRING([--enable-iso-c],
964
[Try to warn if code is not ISO C ]),,
967
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
969
if test "x$enable_iso_c" != "xno"; then
970
if test "x$GCC" = "xyes"; then
972
*[\ \ ]-ansi[\ \ ]*) ;;
973
*) complCFLAGS="$complCFLAGS -ansi" ;;
976
*[\ \ ]-pedantic[\ \ ]*) ;;
977
*) complCFLAGS="$complCFLAGS -pedantic" ;;
981
AC_MSG_RESULT($complCFLAGS)
983
WARN_CFLAGS="$warning_flags $complCFLAGS"
984
AC_SUBST(WARN_CFLAGS)
987
dnl For C++, do basically the same thing.
989
AC_DEFUN([GNOME_CXX_WARNINGS],[
990
AC_ARG_ENABLE(cxx-warnings,
991
AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
992
[Turn on compiler warnings.]),,
993
[enable_cxx_warnings="m4_default([$1],[minimum])"])
995
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
997
if test "x$GXX" != xyes; then
998
enable_cxx_warnings=no
1000
if test "x$enable_cxx_warnings" != "xno"; then
1001
if test "x$GXX" = "xyes"; then
1002
case " $CXXFLAGS " in
1003
*[\ \ ]-Wall[\ \ ]*) ;;
1004
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
1007
## -W is not all that useful. And it cannot be controlled
1008
## with individual -Wno-xxx flags, unlike -Wall
1009
if test "x$enable_cxx_warnings" = "xyes"; then
1010
warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
1014
AC_MSG_RESULT($warnCXXFLAGS)
1016
AC_ARG_ENABLE(iso-cxx,
1017
AC_HELP_STRING([--enable-iso-cxx],
1018
[Try to warn if code is not ISO C++ ]),,
1019
[enable_iso_cxx=no])
1021
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
1023
if test "x$enable_iso_cxx" != "xno"; then
1024
if test "x$GXX" = "xyes"; then
1025
case " $CXXFLAGS " in
1026
*[\ \ ]-ansi[\ \ ]*) ;;
1027
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
1030
case " $CXXFLAGS " in
1031
*[\ \ ]-pedantic[\ \ ]*) ;;
1032
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
1036
AC_MSG_RESULT($complCXXFLAGS)
1038
WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
1039
AC_SUBST(WARN_CXXFLAGS)
1043
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
1044
dnl the schema should be compiled
1047
AC_DEFUN([GLIB_GSETTINGS],
1049
m4_pattern_allow([AM_V_GEN])
1050
AC_ARG_ENABLE(schemas-compile,
1051
AS_HELP_STRING([--disable-schemas-compile],
1052
[Disable regeneration of gschemas.compiled on install]),
1053
[case ${enableval} in
1054
yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
1055
no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
1056
*) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
1058
AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
1059
PKG_PROG_PKG_CONFIG([0.16])
1060
AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
1061
if test x$cross_compiling != xyes; then
1062
GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
1064
AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
1066
AC_SUBST(GLIB_COMPILE_SCHEMAS)
1067
if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
1068
ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
1070
ifelse([$1],,[:],[$1])
1074
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
1076
mostlyclean-am: clean-gsettings-schemas
1078
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
1080
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
1081
$(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 [$]@
1083
all-am: $(gsettings_SCHEMAS:.xml=.valid)
1084
uninstall-am: uninstall-gsettings-schemas
1085
install-data-am: install-gsettings-schemas
1087
.SECONDARY: $(gsettings_SCHEMAS)
1089
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
1091
if test -n "$^"; then \
1092
test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
1093
$(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
1094
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
1097
uninstall-gsettings-schemas:
1098
@$(NORMAL_UNINSTALL)
1099
@list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
1100
files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
1101
test -n "$$files" || exit 0; \
1102
echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
1103
cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
1104
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
1106
clean-gsettings-schemas:
1107
rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
1109
ifdef gsettings_ENUM_NAMESPACE
1110
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
1111
$(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 [$]@
1114
_GSETTINGS_SUBST(GSETTINGS_RULES)
1117
dnl _GSETTINGS_SUBST(VARIABLE)
1118
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1119
AC_DEFUN([_GSETTINGS_SUBST],
1122
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1126
# iconv.m4 serial 11 (gettext-0.18.1)
1127
dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
1128
dnl This file is free software; the Free Software Foundation
1129
dnl gives unlimited permission to copy and/or distribute it,
1130
dnl with or without modifications, as long as this notice is preserved.
1132
dnl From Bruno Haible.
1134
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
1136
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
1137
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1138
AC_REQUIRE([AC_LIB_RPATH])
1140
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
1142
AC_LIB_LINKFLAGS_BODY([iconv])
1145
AC_DEFUN([AM_ICONV_LINK],
1147
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
1148
dnl those with the standalone portable GNU libiconv installed).
1149
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
1151
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
1153
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
1155
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
1156
dnl because if the user has installed libiconv and not disabled its use
1157
dnl via --without-libiconv-prefix, he wants to use it. The first
1158
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
1159
am_save_CPPFLAGS="$CPPFLAGS"
1160
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
1162
AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
1163
am_cv_func_iconv="no, consider installing GNU libiconv"
1165
AC_TRY_LINK([#include <stdlib.h>
1166
#include <iconv.h>],
1167
[iconv_t cd = iconv_open("","");
1168
iconv(cd,NULL,NULL,NULL,NULL);
1170
[am_cv_func_iconv=yes])
1171
if test "$am_cv_func_iconv" != yes; then
1172
am_save_LIBS="$LIBS"
1173
LIBS="$LIBS $LIBICONV"
1174
AC_TRY_LINK([#include <stdlib.h>
1175
#include <iconv.h>],
1176
[iconv_t cd = iconv_open("","");
1177
iconv(cd,NULL,NULL,NULL,NULL);
1179
[am_cv_lib_iconv=yes]
1180
[am_cv_func_iconv=yes])
1181
LIBS="$am_save_LIBS"
1184
if test "$am_cv_func_iconv" = yes; then
1185
AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
1186
dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
1187
am_save_LIBS="$LIBS"
1188
if test $am_cv_lib_iconv = yes; then
1189
LIBS="$LIBS $LIBICONV"
1196
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
1199
iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
1200
if (cd_utf8_to_88591 != (iconv_t)(-1))
1202
static const char input[] = "\342\202\254"; /* EURO SIGN */
1204
const char *inptr = input;
1205
size_t inbytesleft = strlen (input);
1207
size_t outbytesleft = sizeof (buf);
1208
size_t res = iconv (cd_utf8_to_88591,
1209
(char **) &inptr, &inbytesleft,
1210
&outptr, &outbytesleft);
1215
/* Test against Solaris 10 bug: Failures are not distinguishable from
1216
successful returns. */
1218
iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
1219
if (cd_ascii_to_88591 != (iconv_t)(-1))
1221
static const char input[] = "\263";
1223
const char *inptr = input;
1224
size_t inbytesleft = strlen (input);
1226
size_t outbytesleft = sizeof (buf);
1227
size_t res = iconv (cd_ascii_to_88591,
1228
(char **) &inptr, &inbytesleft,
1229
&outptr, &outbytesleft);
1234
#if 0 /* This bug could be worked around by the caller. */
1235
/* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
1237
iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
1238
if (cd_88591_to_utf8 != (iconv_t)(-1))
1240
static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
1242
const char *inptr = input;
1243
size_t inbytesleft = strlen (input);
1245
size_t outbytesleft = sizeof (buf);
1246
size_t res = iconv (cd_88591_to_utf8,
1247
(char **) &inptr, &inbytesleft,
1248
&outptr, &outbytesleft);
1254
/* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
1256
if (/* Try standardized names. */
1257
iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
1258
/* Try IRIX, OSF/1 names. */
1259
&& iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
1260
/* Try AIX names. */
1261
&& iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
1262
/* Try HP-UX names. */
1263
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
1266
}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
1268
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
1269
*) am_cv_func_iconv_works="guessing yes" ;;
1271
LIBS="$am_save_LIBS"
1273
case "$am_cv_func_iconv_works" in
1274
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
1275
*) am_func_iconv=yes ;;
1278
am_func_iconv=no am_cv_lib_iconv=no
1280
if test "$am_func_iconv" = yes; then
1281
AC_DEFINE([HAVE_ICONV], [1],
1282
[Define if you have the iconv() function and it works.])
1284
if test "$am_cv_lib_iconv" = yes; then
1285
AC_MSG_CHECKING([how to link with libiconv])
1286
AC_MSG_RESULT([$LIBICONV])
1288
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
1290
CPPFLAGS="$am_save_CPPFLAGS"
1294
AC_SUBST([LIBICONV])
1295
AC_SUBST([LTLIBICONV])
1298
dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
1299
dnl avoid warnings like
1300
dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
1301
dnl This is tricky because of the way 'aclocal' is implemented:
1302
dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
1303
dnl Otherwise aclocal's initial scan pass would miss the macro definition.
1304
dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
1305
dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
1307
m4_define([gl_iconv_AC_DEFUN],
1308
m4_version_prereq([2.64],
1313
gl_iconv_AC_DEFUN([AM_ICONV],
1316
if test "$am_cv_func_iconv" = yes; then
1317
AC_MSG_CHECKING([for iconv declaration])
1318
AC_CACHE_VAL([am_cv_proto_iconv], [
1326
#if defined(__STDC__) || defined(__cplusplus)
1327
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
1331
], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
1332
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);"])
1333
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
1335
$am_cv_proto_iconv])
1336
AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
1337
[Define as const if the declaration of iconv() needs const.])
1341
# intlmacosx.m4 serial 3 (gettext-0.18)
1342
dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
1343
dnl This file is free software; the Free Software Foundation
1344
dnl gives unlimited permission to copy and/or distribute it,
1345
dnl with or without modifications, as long as this notice is preserved.
1347
dnl This file can can be used in projects which are not available under
1348
dnl the GNU General Public License or the GNU Library General Public
1349
dnl License but which still want to provide support for the GNU gettext
1351
dnl Please note that the actual code of the GNU gettext library is covered
1352
dnl by the GNU Library General Public License, and the rest of the GNU
1353
dnl gettext package package is covered by the GNU General Public License.
1354
dnl They are *not* in the public domain.
1356
dnl Checks for special options needed on MacOS X.
1357
dnl Defines INTL_MACOSX_LIBS.
1358
AC_DEFUN([gt_INTL_MACOSX],
1360
dnl Check for API introduced in MacOS X 10.2.
1361
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
1362
[gt_cv_func_CFPreferencesCopyAppValue],
1363
[gt_save_LIBS="$LIBS"
1364
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
1365
AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
1366
[CFPreferencesCopyAppValue(NULL, NULL)],
1367
[gt_cv_func_CFPreferencesCopyAppValue=yes],
1368
[gt_cv_func_CFPreferencesCopyAppValue=no])
1369
LIBS="$gt_save_LIBS"])
1370
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
1371
AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
1372
[Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
1374
dnl Check for API introduced in MacOS X 10.3.
1375
AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
1376
[gt_save_LIBS="$LIBS"
1377
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
1378
AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
1379
[gt_cv_func_CFLocaleCopyCurrent=yes],
1380
[gt_cv_func_CFLocaleCopyCurrent=no])
1381
LIBS="$gt_save_LIBS"])
1382
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
1383
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
1384
[Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
1387
if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
1388
INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
1390
AC_SUBST([INTL_MACOSX_LIBS])
1393
# lib-ld.m4 serial 4 (gettext-0.18)
1394
dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
1395
dnl This file is free software; the Free Software Foundation
1396
dnl gives unlimited permission to copy and/or distribute it,
1397
dnl with or without modifications, as long as this notice is preserved.
1399
dnl Subroutines of libtool.m4,
1400
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
1401
dnl with libtool.m4.
1403
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
1404
AC_DEFUN([AC_LIB_PROG_LD_GNU],
1405
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
1406
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1407
case `$LD -v 2>&1 </dev/null` in
1408
*GNU* | *'with BFD'*)
1409
acl_cv_prog_gnu_ld=yes ;;
1411
acl_cv_prog_gnu_ld=no ;;
1413
with_gnu_ld=$acl_cv_prog_gnu_ld
1416
dnl From libtool-1.4. Sets the variable LD.
1417
AC_DEFUN([AC_LIB_PROG_LD],
1418
[AC_ARG_WITH([gnu-ld],
1419
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
1420
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
1421
AC_REQUIRE([AC_PROG_CC])dnl
1422
AC_REQUIRE([AC_CANONICAL_HOST])dnl
1423
# Prepare PATH_SEPARATOR.
1424
# The user is always right.
1425
if test "${PATH_SEPARATOR+set}" != set; then
1426
echo "#! /bin/sh" >conf$$.sh
1427
echo "exit 0" >>conf$$.sh
1429
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
1437
if test "$GCC" = yes; then
1438
# Check if gcc -print-prog-name=ld gives a path.
1439
AC_MSG_CHECKING([for ld used by GCC])
1442
# gcc leaves a trailing carriage return which upsets mingw
1443
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1445
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1448
# Accept absolute paths.
1449
[[\\/]* | [A-Za-z]:[\\/]*)]
1450
[re_direlt='/[^/][^/]*/\.\./']
1451
# Canonicalize the path of ld
1452
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1453
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1454
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1456
test -z "$LD" && LD="$ac_prog"
1459
# If it fails, then pretend we aren't using GCC.
1463
# If it is relative, then search for the first ld in PATH.
1467
elif test "$with_gnu_ld" = yes; then
1468
AC_MSG_CHECKING([for GNU ld])
1470
AC_MSG_CHECKING([for non-GNU ld])
1472
AC_CACHE_VAL([acl_cv_path_LD],
1473
[if test -z "$LD"; then
1474
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1475
for ac_dir in $PATH; do
1476
test -z "$ac_dir" && ac_dir=.
1477
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1478
acl_cv_path_LD="$ac_dir/$ac_prog"
1479
# Check to see if the program is GNU ld. I'd rather use --version,
1480
# but apparently some GNU ld's only accept -v.
1481
# Break only if it was the GNU/non-GNU ld that we prefer.
1482
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
1483
*GNU* | *'with BFD'*)
1484
test "$with_gnu_ld" != no && break ;;
1486
test "$with_gnu_ld" != yes && break ;;
1492
acl_cv_path_LD="$LD" # Let the user override the test with a path.
1494
LD="$acl_cv_path_LD"
1495
if test -n "$LD"; then
1496
AC_MSG_RESULT([$LD])
1500
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1504
# lib-link.m4 serial 21 (gettext-0.18)
1505
dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
1506
dnl This file is free software; the Free Software Foundation
1507
dnl gives unlimited permission to copy and/or distribute it,
1508
dnl with or without modifications, as long as this notice is preserved.
1510
dnl From Bruno Haible.
1514
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1515
dnl the libraries corresponding to explicit and implicit dependencies.
1516
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1517
dnl augments the CPPFLAGS variable.
1518
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
1519
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1520
AC_DEFUN([AC_LIB_LINKFLAGS],
1522
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1523
AC_REQUIRE([AC_LIB_RPATH])
1524
pushdef([Name],[translit([$1],[./-], [___])])
1525
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1526
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1527
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1528
AC_LIB_LINKFLAGS_BODY([$1], [$2])
1529
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1530
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1531
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1532
ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
1534
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1535
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1536
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1537
LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
1538
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1540
AC_SUBST([LTLIB]NAME)
1541
AC_SUBST([LIB]NAME[_PREFIX])
1542
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1543
dnl results of this search when this library appears as a dependency.
1549
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
1550
dnl searches for libname and the libraries corresponding to explicit and
1551
dnl implicit dependencies, together with the specified include files and
1552
dnl the ability to compile and link the specified testcode. The missing-message
1553
dnl defaults to 'no' and may contain additional hints for the user.
1554
dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
1555
dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1556
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1557
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1558
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
1559
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1560
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1562
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1563
AC_REQUIRE([AC_LIB_RPATH])
1564
pushdef([Name],[translit([$1],[./-], [___])])
1565
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1566
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1568
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1570
AC_LIB_LINKFLAGS_BODY([$1], [$2])
1572
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1573
dnl because if the user has installed lib[]Name and not disabled its use
1574
dnl via --without-lib[]Name-prefix, he wants to use it.
1575
ac_save_CPPFLAGS="$CPPFLAGS"
1576
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1578
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1579
ac_save_LIBS="$LIBS"
1580
dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
1581
dnl because these -l options might require -L options that are present in
1582
dnl LIBS. -l options benefit only from the -L options listed before it.
1583
dnl Otherwise, add it to the front of LIBS, because it may be a static
1584
dnl library that depends on another static library that is present in LIBS.
1585
dnl Static libraries benefit only from the static libraries listed after
1587
case " $LIB[]NAME" in
1588
*" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
1589
*) LIBS="$LIB[]NAME $LIBS" ;;
1591
AC_TRY_LINK([$3], [$4],
1592
[ac_cv_lib[]Name=yes],
1593
[ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
1594
LIBS="$ac_save_LIBS"
1596
if test "$ac_cv_lib[]Name" = yes; then
1598
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
1599
AC_MSG_CHECKING([how to link with lib[]$1])
1600
AC_MSG_RESULT([$LIB[]NAME])
1603
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1604
dnl $INC[]NAME either.
1605
CPPFLAGS="$ac_save_CPPFLAGS"
1610
AC_SUBST([HAVE_LIB]NAME)
1612
AC_SUBST([LTLIB]NAME)
1613
AC_SUBST([LIB]NAME[_PREFIX])
1618
dnl Determine the platform dependent parameters needed to use rpath:
1621
dnl acl_hardcode_libdir_flag_spec,
1622
dnl acl_hardcode_libdir_separator,
1623
dnl acl_hardcode_direct,
1624
dnl acl_hardcode_minus_L.
1625
AC_DEFUN([AC_LIB_RPATH],
1627
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
1628
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
1629
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1630
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1631
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1632
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1633
AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
1634
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1635
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1641
acl_libext="$acl_cv_libext"
1642
acl_shlibext="$acl_cv_shlibext"
1643
acl_libname_spec="$acl_cv_libname_spec"
1644
acl_library_names_spec="$acl_cv_library_names_spec"
1645
acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1646
acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1647
acl_hardcode_direct="$acl_cv_hardcode_direct"
1648
acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
1649
dnl Determine whether the user wants rpath handling at all.
1650
AC_ARG_ENABLE([rpath],
1651
[ --disable-rpath do not hardcode runtime library paths],
1652
:, enable_rpath=yes)
1655
dnl AC_LIB_FROMPACKAGE(name, package)
1656
dnl declares that libname comes from the given package. The configure file
1657
dnl will then not have a --with-libname-prefix option but a
1658
dnl --with-package-prefix option. Several libraries can come from the same
1659
dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
1660
dnl macro call that searches for libname.
1661
AC_DEFUN([AC_LIB_FROMPACKAGE],
1663
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1664
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1665
define([acl_frompackage_]NAME, [$2])
1667
pushdef([PACK],[$2])
1668
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
1669
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1670
define([acl_libsinpackage_]PACKUP,
1671
m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
1676
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1677
dnl the libraries corresponding to explicit and implicit dependencies.
1678
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1679
dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
1680
dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1681
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1683
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1684
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1685
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1686
pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
1687
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
1688
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1689
pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
1690
dnl Autoconf >= 2.61 supports dots in --with options.
1691
pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
1692
dnl By default, look in $includedir and $libdir.
1694
AC_LIB_WITH_FINAL_PREFIX([
1695
eval additional_includedir=\"$includedir\"
1696
eval additional_libdir=\"$libdir\"
1698
AC_ARG_WITH(P_A_C_K[-prefix],
1699
[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
1700
--without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
1702
if test "X$withval" = "Xno"; then
1705
if test "X$withval" = "X"; then
1706
AC_LIB_WITH_FINAL_PREFIX([
1707
eval additional_includedir=\"$includedir\"
1708
eval additional_libdir=\"$libdir\"
1711
additional_includedir="$withval/include"
1712
additional_libdir="$withval/$acl_libdirstem"
1713
if test "$acl_libdirstem2" != "$acl_libdirstem" \
1714
&& ! test -d "$withval/$acl_libdirstem"; then
1715
additional_libdir="$withval/$acl_libdirstem2"
1720
dnl Search the library and its dependencies in $additional_libdir and
1721
dnl $LDFLAGS. Using breadth-first-seach.
1726
dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
1727
dnl computed. So it has to be reset here.
1731
names_already_handled=
1732
names_next_round='$1 $2'
1733
while test -n "$names_next_round"; do
1734
names_this_round="$names_next_round"
1736
for name in $names_this_round; do
1738
for n in $names_already_handled; do
1739
if test "$n" = "$name"; then
1744
if test -z "$already_handled"; then
1745
names_already_handled="$names_already_handled $name"
1746
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1747
dnl or AC_LIB_HAVE_LINKFLAGS call.
1748
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1749
eval value=\"\$HAVE_LIB$uppername\"
1750
if test -n "$value"; then
1751
if test "$value" = yes; then
1752
eval value=\"\$LIB$uppername\"
1753
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1754
eval value=\"\$LTLIB$uppername\"
1755
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1757
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1758
dnl that this library doesn't exist. So just drop it.
1762
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1763
dnl and the already constructed $LIBNAME/$LTLIBNAME.
1768
eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
1769
if test -n "$acl_shlibext"; then
1770
shrext=".$acl_shlibext" # typically: shrext=.so
1774
if test $use_additional = yes; then
1775
dir="$additional_libdir"
1776
dnl The same code as in the loop below:
1777
dnl First look for a shared library.
1778
if test -n "$acl_shlibext"; then
1779
if test -f "$dir/$libname$shrext"; then
1781
found_so="$dir/$libname$shrext"
1783
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1784
ver=`(cd "$dir" && \
1785
for f in "$libname$shrext".*; do echo "$f"; done \
1786
| sed -e "s,^$libname$shrext\\\\.,," \
1787
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1788
| sed 1q ) 2>/dev/null`
1789
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1791
found_so="$dir/$libname$shrext.$ver"
1794
eval library_names=\"$acl_library_names_spec\"
1795
for f in $library_names; do
1796
if test -f "$dir/$f"; then
1805
dnl Then look for a static library.
1806
if test "X$found_dir" = "X"; then
1807
if test -f "$dir/$libname.$acl_libext"; then
1809
found_a="$dir/$libname.$acl_libext"
1812
if test "X$found_dir" != "X"; then
1813
if test -f "$dir/$libname.la"; then
1814
found_la="$dir/$libname.la"
1818
if test "X$found_dir" = "X"; then
1819
for x in $LDFLAGS $LTLIB[]NAME; do
1820
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1823
dir=`echo "X$x" | sed -e 's/^X-L//'`
1824
dnl First look for a shared library.
1825
if test -n "$acl_shlibext"; then
1826
if test -f "$dir/$libname$shrext"; then
1828
found_so="$dir/$libname$shrext"
1830
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1831
ver=`(cd "$dir" && \
1832
for f in "$libname$shrext".*; do echo "$f"; done \
1833
| sed -e "s,^$libname$shrext\\\\.,," \
1834
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1835
| sed 1q ) 2>/dev/null`
1836
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1838
found_so="$dir/$libname$shrext.$ver"
1841
eval library_names=\"$acl_library_names_spec\"
1842
for f in $library_names; do
1843
if test -f "$dir/$f"; then
1852
dnl Then look for a static library.
1853
if test "X$found_dir" = "X"; then
1854
if test -f "$dir/$libname.$acl_libext"; then
1856
found_a="$dir/$libname.$acl_libext"
1859
if test "X$found_dir" != "X"; then
1860
if test -f "$dir/$libname.la"; then
1861
found_la="$dir/$libname.la"
1866
if test "X$found_dir" != "X"; then
1871
if test "X$found_dir" != "X"; then
1872
dnl Found the library.
1873
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1874
if test "X$found_so" != "X"; then
1875
dnl Linking with a shared library. We attempt to hardcode its
1876
dnl directory into the executable's runpath, unless it's the
1877
dnl standard /usr/lib.
1878
if test "$enable_rpath" = no \
1879
|| test "X$found_dir" = "X/usr/$acl_libdirstem" \
1880
|| test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
1881
dnl No hardcoding is needed.
1882
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1884
dnl Use an explicit option to hardcode DIR into the resulting
1886
dnl Potentially add DIR to ltrpathdirs.
1887
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1889
for x in $ltrpathdirs; do
1890
if test "X$x" = "X$found_dir"; then
1895
if test -z "$haveit"; then
1896
ltrpathdirs="$ltrpathdirs $found_dir"
1898
dnl The hardcoding into $LIBNAME is system dependent.
1899
if test "$acl_hardcode_direct" = yes; then
1900
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1901
dnl resulting binary.
1902
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1904
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1905
dnl Use an explicit option to hardcode DIR into the resulting
1907
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1908
dnl Potentially add DIR to rpathdirs.
1909
dnl The rpathdirs will be appended to $LIBNAME at the end.
1911
for x in $rpathdirs; do
1912
if test "X$x" = "X$found_dir"; then
1917
if test -z "$haveit"; then
1918
rpathdirs="$rpathdirs $found_dir"
1921
dnl Rely on "-L$found_dir".
1922
dnl But don't add it if it's already contained in the LDFLAGS
1923
dnl or the already constructed $LIBNAME
1925
for x in $LDFLAGS $LIB[]NAME; do
1926
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1927
if test "X$x" = "X-L$found_dir"; then
1932
if test -z "$haveit"; then
1933
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1935
if test "$acl_hardcode_minus_L" != no; then
1936
dnl FIXME: Not sure whether we should use
1937
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1939
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1941
dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
1942
dnl here, because this doesn't fit in flags passed to the
1943
dnl compiler. So give up. No hardcoding. This affects only
1944
dnl very old systems.
1945
dnl FIXME: Not sure whether we should use
1946
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1948
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1954
if test "X$found_a" != "X"; then
1955
dnl Linking with a static library.
1956
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1958
dnl We shouldn't come here, but anyway it's good to have a
1960
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1963
dnl Assume the include files are nearby.
1964
additional_includedir=
1965
case "$found_dir" in
1966
*/$acl_libdirstem | */$acl_libdirstem/)
1967
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1968
if test "$name" = '$1'; then
1969
LIB[]NAME[]_PREFIX="$basedir"
1971
additional_includedir="$basedir/include"
1973
*/$acl_libdirstem2 | */$acl_libdirstem2/)
1974
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
1975
if test "$name" = '$1'; then
1976
LIB[]NAME[]_PREFIX="$basedir"
1978
additional_includedir="$basedir/include"
1981
if test "X$additional_includedir" != "X"; then
1982
dnl Potentially add $additional_includedir to $INCNAME.
1983
dnl But don't add it
1984
dnl 1. if it's the standard /usr/include,
1985
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1986
dnl 3. if it's already present in $CPPFLAGS or the already
1987
dnl constructed $INCNAME,
1988
dnl 4. if it doesn't exist as a directory.
1989
if test "X$additional_includedir" != "X/usr/include"; then
1991
if test "X$additional_includedir" = "X/usr/local/include"; then
1992
if test -n "$GCC"; then
1994
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1998
if test -z "$haveit"; then
1999
for x in $CPPFLAGS $INC[]NAME; do
2000
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2001
if test "X$x" = "X-I$additional_includedir"; then
2006
if test -z "$haveit"; then
2007
if test -d "$additional_includedir"; then
2008
dnl Really add $additional_includedir to $INCNAME.
2009
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
2015
dnl Look for dependencies.
2016
if test -n "$found_la"; then
2017
dnl Read the .la file. It defines the variables
2018
dnl dlname, library_names, old_library, dependency_libs, current,
2019
dnl age, revision, installed, dlopen, dlpreopen, libdir.
2020
save_libdir="$libdir"
2022
*/* | *\\*) . "$found_la" ;;
2023
*) . "./$found_la" ;;
2025
libdir="$save_libdir"
2026
dnl We use only dependency_libs.
2027
for dep in $dependency_libs; do
2030
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
2031
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
2032
dnl But don't add it
2033
dnl 1. if it's the standard /usr/lib,
2034
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
2035
dnl 3. if it's already present in $LDFLAGS or the already
2036
dnl constructed $LIBNAME,
2037
dnl 4. if it doesn't exist as a directory.
2038
if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
2039
&& test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
2041
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
2042
|| test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
2043
if test -n "$GCC"; then
2045
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
2049
if test -z "$haveit"; then
2051
for x in $LDFLAGS $LIB[]NAME; do
2052
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2053
if test "X$x" = "X-L$additional_libdir"; then
2058
if test -z "$haveit"; then
2059
if test -d "$additional_libdir"; then
2060
dnl Really add $additional_libdir to $LIBNAME.
2061
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
2065
for x in $LDFLAGS $LTLIB[]NAME; do
2066
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2067
if test "X$x" = "X-L$additional_libdir"; then
2072
if test -z "$haveit"; then
2073
if test -d "$additional_libdir"; then
2074
dnl Really add $additional_libdir to $LTLIBNAME.
2075
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
2082
dir=`echo "X$dep" | sed -e 's/^X-R//'`
2083
if test "$enable_rpath" != no; then
2084
dnl Potentially add DIR to rpathdirs.
2085
dnl The rpathdirs will be appended to $LIBNAME at the end.
2087
for x in $rpathdirs; do
2088
if test "X$x" = "X$dir"; then
2093
if test -z "$haveit"; then
2094
rpathdirs="$rpathdirs $dir"
2096
dnl Potentially add DIR to ltrpathdirs.
2097
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
2099
for x in $ltrpathdirs; do
2100
if test "X$x" = "X$dir"; then
2105
if test -z "$haveit"; then
2106
ltrpathdirs="$ltrpathdirs $dir"
2111
dnl Handle this in the next round.
2112
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
2115
dnl Handle this in the next round. Throw away the .la's
2116
dnl directory; it is already contained in a preceding -L
2118
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
2121
dnl Most likely an immediate library name.
2122
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
2123
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
2129
dnl Didn't find the library; assume it is in the system directories
2130
dnl known to the linker and runtime loader. (All the system
2131
dnl directories known to the linker should also be known to the
2132
dnl runtime loader, otherwise the system is severely misconfigured.)
2133
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2134
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
2140
if test "X$rpathdirs" != "X"; then
2141
if test -n "$acl_hardcode_libdir_separator"; then
2142
dnl Weird platform: only the last -rpath option counts, the user must
2143
dnl pass all path elements in one option. We can arrange that for a
2144
dnl single library, but not when more than one $LIBNAMEs are used.
2146
for found_dir in $rpathdirs; do
2147
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
2149
dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
2150
acl_save_libdir="$libdir"
2152
eval flag=\"$acl_hardcode_libdir_flag_spec\"
2153
libdir="$acl_save_libdir"
2154
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2156
dnl The -rpath options are cumulative.
2157
for found_dir in $rpathdirs; do
2158
acl_save_libdir="$libdir"
2160
eval flag=\"$acl_hardcode_libdir_flag_spec\"
2161
libdir="$acl_save_libdir"
2162
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2166
if test "X$ltrpathdirs" != "X"; then
2167
dnl When using libtool, the option that works for both libraries and
2168
dnl executables is -R. The -R options are cumulative.
2169
for found_dir in $ltrpathdirs; do
2170
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
2180
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
2181
dnl unless already present in VAR.
2182
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
2183
dnl contains two or three consecutive elements that belong together.
2184
AC_DEFUN([AC_LIB_APPENDTOVAR],
2186
for element in [$2]; do
2189
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2190
if test "X$x" = "X$element"; then
2195
if test -z "$haveit"; then
2196
[$1]="${[$1]}${[$1]:+ }$element"
2201
dnl For those cases where a variable contains several -L and -l options
2202
dnl referring to unknown libraries and directories, this macro determines the
2203
dnl necessary additional linker options for the runtime path.
2204
dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
2205
dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
2206
dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
2207
dnl otherwise linking without libtool is assumed.
2208
AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
2210
AC_REQUIRE([AC_LIB_RPATH])
2211
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
2213
if test "$enable_rpath" != no; then
2214
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
2215
dnl Use an explicit option to hardcode directories into the resulting
2220
if test -n "$next"; then
2222
dnl No need to hardcode the standard /usr/lib.
2223
if test "X$dir" != "X/usr/$acl_libdirstem" \
2224
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
2225
rpathdirs="$rpathdirs $dir"
2231
-L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
2232
dnl No need to hardcode the standard /usr/lib.
2233
if test "X$dir" != "X/usr/$acl_libdirstem" \
2234
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
2235
rpathdirs="$rpathdirs $dir"
2242
if test "X$rpathdirs" != "X"; then
2243
if test -n ""$3""; then
2244
dnl libtool is used for linking. Use -R options.
2245
for dir in $rpathdirs; do
2246
$1="${$1}${$1:+ }-R$dir"
2249
dnl The linker is used for linking directly.
2250
if test -n "$acl_hardcode_libdir_separator"; then
2251
dnl Weird platform: only the last -rpath option counts, the user
2252
dnl must pass all path elements in one option.
2254
for dir in $rpathdirs; do
2255
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
2257
acl_save_libdir="$libdir"
2259
eval flag=\"$acl_hardcode_libdir_flag_spec\"
2260
libdir="$acl_save_libdir"
2263
dnl The -rpath options are cumulative.
2264
for dir in $rpathdirs; do
2265
acl_save_libdir="$libdir"
2267
eval flag=\"$acl_hardcode_libdir_flag_spec\"
2268
libdir="$acl_save_libdir"
2269
$1="${$1}${$1:+ }$flag"
2279
# lib-prefix.m4 serial 7 (gettext-0.18)
2280
dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
2281
dnl This file is free software; the Free Software Foundation
2282
dnl gives unlimited permission to copy and/or distribute it,
2283
dnl with or without modifications, as long as this notice is preserved.
2285
dnl From Bruno Haible.
2287
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
2288
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
2289
dnl require excessive bracketing.
2290
ifdef([AC_HELP_STRING],
2291
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
2292
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
2294
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
2295
dnl to access previously installed libraries. The basic assumption is that
2296
dnl a user will want packages to use other packages he previously installed
2297
dnl with the same --prefix option.
2298
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
2299
dnl libraries, but is otherwise very convenient.
2300
AC_DEFUN([AC_LIB_PREFIX],
2302
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
2303
AC_REQUIRE([AC_PROG_CC])
2304
AC_REQUIRE([AC_CANONICAL_HOST])
2305
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
2306
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2307
dnl By default, look in $includedir and $libdir.
2309
AC_LIB_WITH_FINAL_PREFIX([
2310
eval additional_includedir=\"$includedir\"
2311
eval additional_libdir=\"$libdir\"
2313
AC_LIB_ARG_WITH([lib-prefix],
2314
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
2315
--without-lib-prefix don't search for libraries in includedir and libdir],
2317
if test "X$withval" = "Xno"; then
2320
if test "X$withval" = "X"; then
2321
AC_LIB_WITH_FINAL_PREFIX([
2322
eval additional_includedir=\"$includedir\"
2323
eval additional_libdir=\"$libdir\"
2326
additional_includedir="$withval/include"
2327
additional_libdir="$withval/$acl_libdirstem"
2331
if test $use_additional = yes; then
2332
dnl Potentially add $additional_includedir to $CPPFLAGS.
2333
dnl But don't add it
2334
dnl 1. if it's the standard /usr/include,
2335
dnl 2. if it's already present in $CPPFLAGS,
2336
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
2337
dnl 4. if it doesn't exist as a directory.
2338
if test "X$additional_includedir" != "X/usr/include"; then
2340
for x in $CPPFLAGS; do
2341
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2342
if test "X$x" = "X-I$additional_includedir"; then
2347
if test -z "$haveit"; then
2348
if test "X$additional_includedir" = "X/usr/local/include"; then
2349
if test -n "$GCC"; then
2351
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
2355
if test -z "$haveit"; then
2356
if test -d "$additional_includedir"; then
2357
dnl Really add $additional_includedir to $CPPFLAGS.
2358
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
2363
dnl Potentially add $additional_libdir to $LDFLAGS.
2364
dnl But don't add it
2365
dnl 1. if it's the standard /usr/lib,
2366
dnl 2. if it's already present in $LDFLAGS,
2367
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
2368
dnl 4. if it doesn't exist as a directory.
2369
if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
2371
for x in $LDFLAGS; do
2372
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2373
if test "X$x" = "X-L$additional_libdir"; then
2378
if test -z "$haveit"; then
2379
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
2380
if test -n "$GCC"; then
2382
linux*) haveit=yes;;
2386
if test -z "$haveit"; then
2387
if test -d "$additional_libdir"; then
2388
dnl Really add $additional_libdir to $LDFLAGS.
2389
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
2397
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
2398
dnl acl_final_exec_prefix, containing the values to which $prefix and
2399
dnl $exec_prefix will expand at the end of the configure script.
2400
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
2402
dnl Unfortunately, prefix and exec_prefix get only finally determined
2403
dnl at the end of configure.
2404
if test "X$prefix" = "XNONE"; then
2405
acl_final_prefix="$ac_default_prefix"
2407
acl_final_prefix="$prefix"
2409
if test "X$exec_prefix" = "XNONE"; then
2410
acl_final_exec_prefix='${prefix}'
2412
acl_final_exec_prefix="$exec_prefix"
2414
acl_save_prefix="$prefix"
2415
prefix="$acl_final_prefix"
2416
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
2417
prefix="$acl_save_prefix"
2420
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
2421
dnl variables prefix and exec_prefix bound to the values they will have
2422
dnl at the end of the configure script.
2423
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
2425
acl_save_prefix="$prefix"
2426
prefix="$acl_final_prefix"
2427
acl_save_exec_prefix="$exec_prefix"
2428
exec_prefix="$acl_final_exec_prefix"
2430
exec_prefix="$acl_save_exec_prefix"
2431
prefix="$acl_save_prefix"
2434
dnl AC_LIB_PREPARE_MULTILIB creates
2435
dnl - a variable acl_libdirstem, containing the basename of the libdir, either
2436
dnl "lib" or "lib64" or "lib/64",
2437
dnl - a variable acl_libdirstem2, as a secondary possible value for
2438
dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
2440
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
2442
dnl There is no formal standard regarding lib and lib64.
2443
dnl On glibc systems, the current practice is that on a system supporting
2444
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
2445
dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
2446
dnl the compiler's default mode by looking at the compiler's library search
2447
dnl path. If at least one of its elements ends in /lib64 or points to a
2448
dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
2449
dnl Otherwise we use the default, namely "lib".
2450
dnl On Solaris systems, the current practice is that on a system supporting
2451
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
2452
dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
2453
dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
2454
AC_REQUIRE([AC_CANONICAL_HOST])
2459
dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
2460
dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
2461
dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
2462
dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
2463
dnl symlink is missing, so we set acl_libdirstem2 too.
2464
AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
2465
[AC_EGREP_CPP([sixtyfour bits], [
2469
], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
2471
if test $gl_cv_solaris_64bit = yes; then
2472
acl_libdirstem=lib/64
2474
sparc*) acl_libdirstem2=lib/sparcv9 ;;
2475
i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
2480
searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
2481
if test -n "$searchpath"; then
2482
acl_save_IFS="${IFS= }"; IFS=":"
2483
for searchdir in $searchpath; do
2484
if test -d "$searchdir"; then
2485
case "$searchdir" in
2486
*/lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
2488
# Better ignore directories of this form. They are misleading.
2490
*) searchdir=`cd "$searchdir" && pwd`
2491
case "$searchdir" in
2492
*/lib64 ) acl_libdirstem=lib64 ;;
2501
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
2504
# nls.m4 serial 5 (gettext-0.18)
2505
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
2507
dnl This file is free software; the Free Software Foundation
2508
dnl gives unlimited permission to copy and/or distribute it,
2509
dnl with or without modifications, as long as this notice is preserved.
2511
dnl This file can can be used in projects which are not available under
2512
dnl the GNU General Public License or the GNU Library General Public
2513
dnl License but which still want to provide support for the GNU gettext
2515
dnl Please note that the actual code of the GNU gettext library is covered
2516
dnl by the GNU Library General Public License, and the rest of the GNU
2517
dnl gettext package package is covered by the GNU General Public License.
2518
dnl They are *not* in the public domain.
2521
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
2522
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
2528
AC_MSG_CHECKING([whether NLS is requested])
2529
dnl Default is enabled NLS
2530
AC_ARG_ENABLE([nls],
2531
[ --disable-nls do not use Native Language Support],
2532
USE_NLS=$enableval, USE_NLS=yes)
2533
AC_MSG_RESULT([$USE_NLS])
2537
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
2538
# serial 1 (pkg-config-0.24)
2540
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2542
# This program is free software; you can redistribute it and/or modify
2543
# it under the terms of the GNU General Public License as published by
2544
# the Free Software Foundation; either version 2 of the License, or
2545
# (at your option) any later version.
2547
# This program is distributed in the hope that it will be useful, but
2548
# WITHOUT ANY WARRANTY; without even the implied warranty of
2549
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2550
# General Public License for more details.
2552
# You should have received a copy of the GNU General Public License
2553
# along with this program; if not, write to the Free Software
2554
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2556
# As a special exception to the GNU General Public License, if you
2557
# distribute this file as part of a program that contains a
2558
# configuration script generated by Autoconf, you may include it under
2559
# the same distribution terms that you use for the rest of that program.
2561
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2562
# ----------------------------------
2563
AC_DEFUN([PKG_PROG_PKG_CONFIG],
2564
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
2565
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
2566
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
2567
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
2568
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
2569
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
2571
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
2572
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
2574
if test -n "$PKG_CONFIG"; then
2575
_pkg_min_version=m4_default([$1], [0.9.0])
2576
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
2577
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
2578
AC_MSG_RESULT([yes])
2584
])# PKG_PROG_PKG_CONFIG
2586
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2588
# Check to see whether a particular set of modules exists. Similar
2589
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2591
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2592
# only at the first occurence in configure.ac, so if the first place
2593
# it's called might be skipped (such as if it is within an "if", you
2594
# have to call PKG_CHECK_EXISTS manually
2595
# --------------------------------------------------------------
2596
AC_DEFUN([PKG_CHECK_EXISTS],
2597
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2598
if test -n "$PKG_CONFIG" && \
2599
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
2600
m4_default([$2], [:])
2601
m4_ifvaln([$3], [else
2605
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2606
# ---------------------------------------------
2607
m4_define([_PKG_CONFIG],
2608
[if test -n "$$1"; then
2610
elif test -n "$PKG_CONFIG"; then
2611
PKG_CHECK_EXISTS([$3],
2612
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
2613
test "x$?" != "x0" && pkg_failed=yes ],
2620
# _PKG_SHORT_ERRORS_SUPPORTED
2621
# -----------------------------
2622
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
2623
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2624
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
2625
_pkg_short_errors_supported=yes
2627
_pkg_short_errors_supported=no
2629
])# _PKG_SHORT_ERRORS_SUPPORTED
2632
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2633
# [ACTION-IF-NOT-FOUND])
2636
# Note that if there is a possibility the first call to
2637
# PKG_CHECK_MODULES might not happen, you should be sure to include an
2638
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2641
# --------------------------------------------------------------
2642
AC_DEFUN([PKG_CHECK_MODULES],
2643
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2644
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
2645
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2648
AC_MSG_CHECKING([for $1])
2650
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
2651
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
2653
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
2654
and $1[]_LIBS to avoid the need to call pkg-config.
2655
See the pkg-config man page for more details.])
2657
if test $pkg_failed = yes; then
2659
_PKG_SHORT_ERRORS_SUPPORTED
2660
if test $_pkg_short_errors_supported = yes; then
2661
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
2663
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
2665
# Put the nasty error message in config.log where it belongs
2666
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2668
m4_default([$4], [AC_MSG_ERROR(
2669
[Package requirements ($2) were not met:
2673
Consider adjusting the PKG_CONFIG_PATH environment variable if you
2674
installed software in a non-standard prefix.
2678
elif test $pkg_failed = untried; then
2680
m4_default([$4], [AC_MSG_FAILURE(
2681
[The pkg-config script could not be found or is too old. Make sure it
2682
is in your PATH or set the PKG_CONFIG environment variable to the full
2687
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
2690
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
2691
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
2692
AC_MSG_RESULT([yes])
2695
])# PKG_CHECK_MODULES
2697
# po.m4 serial 17 (gettext-0.18)
2698
dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
2699
dnl This file is free software; the Free Software Foundation
2700
dnl gives unlimited permission to copy and/or distribute it,
2701
dnl with or without modifications, as long as this notice is preserved.
2703
dnl This file can can be used in projects which are not available under
2704
dnl the GNU General Public License or the GNU Library General Public
2705
dnl License but which still want to provide support for the GNU gettext
2707
dnl Please note that the actual code of the GNU gettext library is covered
2708
dnl by the GNU Library General Public License, and the rest of the GNU
2709
dnl gettext package package is covered by the GNU General Public License.
2710
dnl They are *not* in the public domain.
2713
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
2714
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
2718
dnl Checks for all prerequisites of the po subdirectory.
2719
AC_DEFUN([AM_PO_SUBDIRS],
2721
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2722
AC_REQUIRE([AC_PROG_INSTALL])dnl
2723
AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
2724
AC_REQUIRE([AM_NLS])dnl
2726
dnl Release version of the gettext macros. This is used to ensure that
2727
dnl the gettext macros and po/Makefile.in.in are in sync.
2728
AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
2730
dnl Perform the following tests also if --disable-nls has been given,
2731
dnl because they are needed for "make dist" to work.
2733
dnl Search for GNU msgfmt in the PATH.
2734
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
2735
dnl The second test excludes FreeBSD msgfmt.
2736
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
2737
[$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
2738
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
2740
AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
2742
dnl Test whether it is GNU msgfmt >= 0.15.
2744
case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2745
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
2746
*) MSGFMT_015=$MSGFMT ;;
2749
AC_SUBST([MSGFMT_015])
2751
case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2752
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
2753
*) GMSGFMT_015=$GMSGFMT ;;
2756
AC_SUBST([GMSGFMT_015])
2758
dnl Search for GNU xgettext 0.12 or newer in the PATH.
2759
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
2760
dnl The second test excludes FreeBSD xgettext.
2761
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
2762
[$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
2763
(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)],
2765
dnl Remove leftover from FreeBSD xgettext call.
2768
dnl Test whether it is GNU xgettext >= 0.15.
2770
case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2771
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
2772
*) XGETTEXT_015=$XGETTEXT ;;
2775
AC_SUBST([XGETTEXT_015])
2777
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
2778
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
2779
[$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
2781
dnl Installation directories.
2782
dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
2783
dnl have to define it here, so that it can be used in po/Makefile.
2784
test -n "$localedir" || localedir='${datadir}/locale'
2785
AC_SUBST([localedir])
2787
dnl Support for AM_XGETTEXT_OPTION.
2788
test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
2789
AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
2791
AC_CONFIG_COMMANDS([po-directories], [[
2792
for ac_file in $CONFIG_FILES; do
2793
# Support "outfile[:infile[:infile...]]"
2795
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2797
# PO directories have a Makefile.in generated from Makefile.in.in.
2798
case "$ac_file" in */Makefile.in)
2799
# Adjust a relative srcdir.
2800
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2801
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
2802
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2803
# In autoconf-2.13 it is called $ac_given_srcdir.
2804
# In autoconf-2.50 it is called $srcdir.
2805
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2806
case "$ac_given_srcdir" in
2807
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2808
/*) top_srcdir="$ac_given_srcdir" ;;
2809
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
2811
# Treat a directory as a PO directory if and only if it has a
2812
# POTFILES.in file. This allows packages to have multiple PO
2813
# directories under different names or in different locations.
2814
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
2815
rm -f "$ac_dir/POTFILES"
2816
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
2817
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
2818
POMAKEFILEDEPS="POTFILES.in"
2819
# ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
2820
# on $ac_dir but don't depend on user-specified configuration
2822
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2823
# The LINGUAS file contains the set of available languages.
2824
if test -n "$OBSOLETE_ALL_LINGUAS"; then
2825
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2827
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2828
# Hide the ALL_LINGUAS assigment from automake < 1.5.
2829
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2830
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2832
# The set of available languages was given in configure.in.
2833
# Hide the ALL_LINGUAS assigment from automake < 1.5.
2834
eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
2837
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2838
# Compute UPDATEPOFILES
2839
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2840
# Compute DUMMYPOFILES
2841
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2843
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2844
case "$ac_given_srcdir" in
2846
*) srcdirpre='$(srcdir)/' ;;
2852
for lang in $ALL_LINGUAS; do
2853
POFILES="$POFILES $srcdirpre$lang.po"
2854
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2855
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2856
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2858
# CATALOGS depends on both $ac_dir and the user's LINGUAS
2859
# environment variable.
2861
if test -n "$ALL_LINGUAS"; then
2862
for presentlang in $ALL_LINGUAS; do
2864
if test "%UNSET%" != "$LINGUAS"; then
2865
desiredlanguages="$LINGUAS"
2867
desiredlanguages="$ALL_LINGUAS"
2869
for desiredlang in $desiredlanguages; do
2870
# Use the presentlang catalog if desiredlang is
2871
# a. equal to presentlang, or
2872
# b. a variant of presentlang (because in this case,
2873
# presentlang can be used as a fallback for messages
2874
# which are not translated in the desiredlang catalog).
2875
case "$desiredlang" in
2876
"$presentlang"*) useit=yes;;
2879
if test $useit = yes; then
2880
INST_LINGUAS="$INST_LINGUAS $presentlang"
2885
if test -n "$INST_LINGUAS"; then
2886
for lang in $INST_LINGUAS; do
2887
CATALOGS="$CATALOGS $lang.gmo"
2890
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
2891
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"
2892
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
2893
if test -f "$f"; then
2895
*.orig | *.bak | *~) ;;
2896
*) cat "$f" >> "$ac_dir/Makefile" ;;
2904
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute
2905
# POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
2906
# from automake < 1.5.
2907
eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
2908
# Capture the value of LINGUAS because we need it to compute CATALOGS.
2909
LINGUAS="${LINGUAS-%UNSET%}"
2913
dnl Postprocesses a Makefile in a directory containing PO files.
2914
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
2916
# When this code is run, in config.status, two variables have already been
2918
# - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
2919
# - LINGUAS is the value of the environment variable LINGUAS at configure
2923
# Adjust a relative srcdir.
2924
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2925
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
2926
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2927
# In autoconf-2.13 it is called $ac_given_srcdir.
2928
# In autoconf-2.50 it is called $srcdir.
2929
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2930
case "$ac_given_srcdir" in
2931
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2932
/*) top_srcdir="$ac_given_srcdir" ;;
2933
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
2936
# Find a way to echo strings without interpreting backslash.
2937
if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
2940
if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
2941
gt_echo='printf %s\n'
2952
# A sed script that extracts the value of VARIABLE from a Makefile.
2954
# Test if the hold space is empty.
2959
# Yes it was empty. Look if we have the expected variable definition.
2960
/^[ ]*VARIABLE[ ]*=/{
2961
# Seen the first line of the variable definition.
2962
s/^[ ]*VARIABLE[ ]*=//
2967
# Here we are processing a line from the variable definition.
2968
# Remove comment, more precisely replace it with a space.
2970
# See if the line ends in a backslash.
2974
# Print the line, without the trailing backslash.
2977
# There was no trailing backslash. The end of the variable definition is
2978
# reached. Clear the hold space.
2983
# A trailing backslash means that the variable definition continues in the
2984
# next line. Put a nonempty string into the hold space to indicate this.
2991
# Set POTFILES to the value of the Makefile variable POTFILES.
2992
sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
2993
POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
2994
# Compute POTFILES_DEPS as
2995
# $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
2997
for file in $POTFILES; do
2998
POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
3002
if test -n "$OBSOLETE_ALL_LINGUAS"; then
3003
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
3005
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
3006
# The LINGUAS file contains the set of available languages.
3007
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
3008
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
3010
# Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
3011
sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
3012
ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
3014
# Hide the ALL_LINGUAS assigment from automake < 1.5.
3015
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
3017
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
3018
# Compute UPDATEPOFILES
3019
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
3020
# Compute DUMMYPOFILES
3021
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
3023
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
3024
# Compute PROPERTIESFILES
3025
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
3026
# Compute CLASSFILES
3027
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
3029
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
3031
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
3032
# Compute RESOURCESDLLFILES
3033
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
3034
case "$ac_given_srcdir" in
3036
*) srcdirpre='$(srcdir)/' ;;
3047
for lang in $ALL_LINGUAS; do
3048
POFILES="$POFILES $srcdirpre$lang.po"
3049
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
3050
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
3051
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
3052
PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
3053
CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
3054
QMFILES="$QMFILES $srcdirpre$lang.qm"
3055
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
3056
MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
3057
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/'`
3058
RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
3060
# CATALOGS depends on both $ac_dir and the user's LINGUAS
3061
# environment variable.
3063
if test -n "$ALL_LINGUAS"; then
3064
for presentlang in $ALL_LINGUAS; do
3066
if test "%UNSET%" != "$LINGUAS"; then
3067
desiredlanguages="$LINGUAS"
3069
desiredlanguages="$ALL_LINGUAS"
3071
for desiredlang in $desiredlanguages; do
3072
# Use the presentlang catalog if desiredlang is
3073
# a. equal to presentlang, or
3074
# b. a variant of presentlang (because in this case,
3075
# presentlang can be used as a fallback for messages
3076
# which are not translated in the desiredlang catalog).
3077
case "$desiredlang" in
3078
"$presentlang"*) useit=yes;;
3081
if test $useit = yes; then
3082
INST_LINGUAS="$INST_LINGUAS $presentlang"
3091
if test -n "$INST_LINGUAS"; then
3092
for lang in $INST_LINGUAS; do
3093
CATALOGS="$CATALOGS $lang.gmo"
3094
JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
3095
QTCATALOGS="$QTCATALOGS $lang.qm"
3096
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
3097
TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
3098
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/'`
3099
CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
3103
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"
3104
if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
3105
# Add dependencies that cannot be formulated as a simple suffix rule.
3106
for lang in $ALL_LINGUAS; do
3107
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
3108
cat >> "$ac_file.tmp" <<EOF
3109
$frobbedlang.msg: $lang.po
3110
@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
3111
\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
3115
if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
3116
# Add dependencies that cannot be formulated as a simple suffix rule.
3117
for lang in $ALL_LINGUAS; do
3118
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/'`
3119
cat >> "$ac_file.tmp" <<EOF
3120
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
3121
@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
3122
\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
3126
if test -n "$POMAKEFILEDEPS"; then
3127
cat >> "$ac_file.tmp" <<EOF
3128
Makefile: $POMAKEFILEDEPS
3131
mv "$ac_file.tmp" "$ac_file"
3134
dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
3135
AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
3137
XGETTEXT_EXTRA_OPTIONS=
3140
dnl Registers an option to be passed to xgettext in the po subdirectory.
3141
AC_DEFUN([AM_XGETTEXT_OPTION],
3143
AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
3144
XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
3147
# progtest.m4 serial 6 (gettext-0.18)
3148
dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc.
3149
dnl This file is free software; the Free Software Foundation
3150
dnl gives unlimited permission to copy and/or distribute it,
3151
dnl with or without modifications, as long as this notice is preserved.
3153
dnl This file can can be used in projects which are not available under
3154
dnl the GNU General Public License or the GNU Library General Public
3155
dnl License but which still want to provide support for the GNU gettext
3157
dnl Please note that the actual code of the GNU gettext library is covered
3158
dnl by the GNU Library General Public License, and the rest of the GNU
3159
dnl gettext package package is covered by the GNU General Public License.
3160
dnl They are *not* in the public domain.
3163
dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
3167
# Search path for a program which passes the given test.
3169
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
3170
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3171
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
3173
# Prepare PATH_SEPARATOR.
3174
# The user is always right.
3175
if test "${PATH_SEPARATOR+set}" != set; then
3176
echo "#! /bin/sh" >conf$$.sh
3177
echo "exit 0" >>conf$$.sh
3179
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
3187
# Find out how to test for executable files. Don't use a zero-byte file,
3188
# as systems may use methods other than mode bits to determine executability.
3189
cat >conf$$.file <<_ASEOF
3193
chmod +x conf$$.file
3194
if test -x conf$$.file >/dev/null 2>&1; then
3195
ac_executable_p="test -x"
3197
ac_executable_p="test -f"
3201
# Extract the first word of "$2", so it can be a program name with args.
3202
set dummy $2; ac_word=[$]2
3203
AC_MSG_CHECKING([for $ac_word])
3204
AC_CACHE_VAL([ac_cv_path_$1],
3206
[[\\/]]* | ?:[[\\/]]*)
3207
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3210
ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
3211
for ac_dir in ifelse([$5], , $PATH, [$5]); do
3213
test -z "$ac_dir" && ac_dir=.
3214
for ac_exec_ext in '' $ac_executable_extensions; do
3215
if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
3216
echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
3218
ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
3225
dnl If no 4th arg is given, leave the cache variable unset,
3226
dnl so AC_PATH_PROGS will keep looking.
3227
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3232
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
3233
AC_MSG_RESULT([$][$1])
3240
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
3243
# This file is free software; the Free Software Foundation
3244
# gives unlimited permission to copy and/or distribute it,
3245
# with or without modifications, as long as this notice is preserved.
3249
# AM_AUTOMAKE_VERSION(VERSION)
3250
# ----------------------------
3251
# Automake X.Y traces this macro to ensure aclocal.m4 has been
3252
# generated from the m4 files accompanying Automake X.Y.
3253
# (This private macro should not be called outside this file.)
3254
AC_DEFUN([AM_AUTOMAKE_VERSION],
3255
[am__api_version='1.11'
3256
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
3257
dnl require some minimum version. Point them to the right macro.
3258
m4_if([$1], [1.11.3], [],
3259
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
3262
# _AM_AUTOCONF_VERSION(VERSION)
3263
# -----------------------------
3264
# aclocal traces this macro to find the Autoconf version.
3265
# This is a private macro too. Using m4_define simplifies
3266
# the logic in aclocal, which can simply ignore this definition.
3267
m4_define([_AM_AUTOCONF_VERSION], [])
3269
# AM_SET_CURRENT_AUTOMAKE_VERSION
3270
# -------------------------------
3271
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
3272
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
3273
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
3274
[AM_AUTOMAKE_VERSION([1.11.3])dnl
3275
m4_ifndef([AC_AUTOCONF_VERSION],
3276
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
3277
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
3279
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
3281
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
3283
# This file is free software; the Free Software Foundation
3284
# gives unlimited permission to copy and/or distribute it,
3285
# with or without modifications, as long as this notice is preserved.
3289
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
3290
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
3291
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
3293
# Of course, Automake must honor this variable whenever it calls a
3294
# tool from the auxiliary directory. The problem is that $srcdir (and
3295
# therefore $ac_aux_dir as well) can be either absolute or relative,
3296
# depending on how configure is run. This is pretty annoying, since
3297
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
3298
# source directory, any form will work fine, but in subdirectories a
3299
# relative path needs to be adjusted first.
3301
# $ac_aux_dir/missing
3302
# fails when called from a subdirectory if $ac_aux_dir is relative
3303
# $top_srcdir/$ac_aux_dir/missing
3304
# fails if $ac_aux_dir is absolute,
3305
# fails when called from a subdirectory in a VPATH build with
3306
# a relative $ac_aux_dir
3308
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
3309
# are both prefixed by $srcdir. In an in-source build this is usually
3310
# harmless because $srcdir is `.', but things will broke when you
3311
# start a VPATH build or use an absolute $srcdir.
3313
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
3314
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
3315
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
3316
# and then we would define $MISSING as
3317
# MISSING="\${SHELL} $am_aux_dir/missing"
3318
# This will work as long as MISSING is not called from configure, because
3319
# unfortunately $(top_srcdir) has no meaning in configure.
3320
# However there are other variables, like CC, which are often used in
3321
# configure, and could therefore not use this "fixed" $ac_aux_dir.
3323
# Another solution, used here, is to always expand $ac_aux_dir to an
3324
# absolute PATH. The drawback is that using absolute paths prevent a
3325
# configured tree to be moved without reconfiguration.
3327
AC_DEFUN([AM_AUX_DIR_EXPAND],
3328
[dnl Rely on autoconf to set up CDPATH properly.
3329
AC_PREREQ([2.50])dnl
3330
# expand $ac_aux_dir to an absolute path
3331
am_aux_dir=`cd $ac_aux_dir && pwd`
3334
# AM_CONDITIONAL -*- Autoconf -*-
3336
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
3337
# Free Software Foundation, Inc.
3339
# This file is free software; the Free Software Foundation
3340
# gives unlimited permission to copy and/or distribute it,
3341
# with or without modifications, as long as this notice is preserved.
3345
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
3346
# -------------------------------------
3347
# Define a conditional.
3348
AC_DEFUN([AM_CONDITIONAL],
3350
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
3351
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
3352
AC_SUBST([$1_TRUE])dnl
3353
AC_SUBST([$1_FALSE])dnl
3354
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
3355
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
3356
m4_define([_AM_COND_VALUE_$1], [$2])dnl
3364
AC_CONFIG_COMMANDS_PRE(
3365
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
3366
AC_MSG_ERROR([[conditional "$1" was never defined.
3367
Usually this means the macro was only invoked conditionally.]])
3370
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
3371
# 2010, 2011 Free Software Foundation, Inc.
3373
# This file is free software; the Free Software Foundation
3374
# gives unlimited permission to copy and/or distribute it,
3375
# with or without modifications, as long as this notice is preserved.
3379
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
3380
# written in clear, in which case automake, when reading aclocal.m4,
3381
# will think it sees a *use*, and therefore will trigger all it's
3382
# C support machinery. Also note that it means that autoscan, seeing
3383
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
3386
# _AM_DEPENDENCIES(NAME)
3387
# ----------------------
3388
# See how the compiler implements dependency checking.
3389
# NAME is "CC", "CXX", "GCJ", or "OBJC".
3390
# We try a few techniques and use that to set a single cache variable.
3392
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
3393
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
3394
# dependency, and given that the user is not expected to run this macro,
3395
# just rely on AC_PROG_CC.
3396
AC_DEFUN([_AM_DEPENDENCIES],
3397
[AC_REQUIRE([AM_SET_DEPDIR])dnl
3398
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
3399
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
3400
AC_REQUIRE([AM_DEP_TRACK])dnl
3402
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
3403
[$1], CXX, [depcc="$CXX" am_compiler_list=],
3404
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
3405
[$1], UPC, [depcc="$UPC" am_compiler_list=],
3406
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
3407
[depcc="$$1" am_compiler_list=])
3409
AC_CACHE_CHECK([dependency style of $depcc],
3410
[am_cv_$1_dependencies_compiler_type],
3411
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
3412
# We make a subdir and do the tests there. Otherwise we can end up
3413
# making bogus files that we don't know about and never remove. For
3414
# instance it was reported that on HP-UX the gcc test will end up
3415
# making a dummy file named `D' -- because `-MD' means `put the output
3419
# Copy depcomp to subdir because otherwise we won't find it if we're
3420
# using a relative directory.
3421
cp "$am_depcomp" conftest.dir
3423
# We will build objects and dependencies in a subdirectory because
3424
# it helps to detect inapplicable dependency modes. For instance
3425
# both Tru64's cc and ICC support -MD to output dependencies as a
3426
# side effect of compilation, but ICC will put the dependencies in
3427
# the current directory while Tru64 will put them in the object
3431
am_cv_$1_dependencies_compiler_type=none
3432
if test "$am_compiler_list" = ""; then
3433
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
3437
[case " $depcc " in #(
3438
*\ -arch\ *\ -arch\ *) am__universal=true ;;
3441
[case " $depcc " in #(
3442
*\ -arch\ *\ -arch\ *) am__universal=true ;;
3445
for depmode in $am_compiler_list; do
3446
# Setup a source with many dependencies, because some compilers
3447
# like to wrap large dependency lists on column 80 (with \), and
3448
# we should not choose a depcomp mode which is confused by this.
3450
# We need to recreate these files for each test, as the compiler may
3451
# overwrite some of them when testing with obscure command lines.
3452
# This happens at least with the AIX C compiler.
3454
for i in 1 2 3 4 5 6; do
3455
echo '#include "conftst'$i'.h"' >> sub/conftest.c
3456
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
3457
# Solaris 8's {/usr,}/bin/sh.
3458
touch sub/conftst$i.h
3460
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
3462
# We check with `-c' and `-o' for the sake of the "dashmstdout"
3463
# mode. It turns out that the SunPro C++ compiler does not properly
3464
# handle `-M -o', and we need to detect this. Also, some Intel
3465
# versions had trouble with output in subdirs
3466
am__obj=sub/conftest.${OBJEXT-o}
3467
am__minus_obj="-o $am__obj"
3470
# This depmode causes a compiler race in universal mode.
3471
test "$am__universal" = false || continue
3474
# after this tag, mechanisms are not by side-effect, so they'll
3475
# only be used when explicitly requested
3476
if test "x$enable_dependency_tracking" = xyes; then
3482
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
3483
# This compiler won't grok `-c -o', but also, the minuso test has
3484
# not run yet. These depmodes are late enough in the game, and
3485
# so weak that their functioning should not be impacted.
3486
am__obj=conftest.${OBJEXT-o}
3491
if depmode=$depmode \
3492
source=sub/conftest.c object=$am__obj \
3493
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3494
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
3495
>/dev/null 2>conftest.err &&
3496
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3497
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3498
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
3499
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3500
# icc doesn't choke on unknown options, it will just issue warnings
3501
# or remarks (even with -Werror). So we grep stderr for any message
3502
# that says an option was ignored or not supported.
3503
# When given -MP, icc 7.0 and 7.1 complain thusly:
3504
# icc: Command line warning: ignoring option '-M'; no argument required
3505
# The diagnosis changed in icc 8.0:
3506
# icc: Command line remark: option '-MP' not supported
3507
if (grep 'ignoring option' conftest.err ||
3508
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3509
am_cv_$1_dependencies_compiler_type=$depmode
3518
am_cv_$1_dependencies_compiler_type=none
3521
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
3522
AM_CONDITIONAL([am__fastdep$1], [
3523
test "x$enable_dependency_tracking" != xno \
3524
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
3530
# Choose a directory name for dependency files.
3531
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
3532
AC_DEFUN([AM_SET_DEPDIR],
3533
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3534
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
3540
AC_DEFUN([AM_DEP_TRACK],
3541
[AC_ARG_ENABLE(dependency-tracking,
3542
[ --disable-dependency-tracking speeds up one-time build
3543
--enable-dependency-tracking do not reject slow dependency extractors])
3544
if test "x$enable_dependency_tracking" != xno; then
3545
am_depcomp="$ac_aux_dir/depcomp"
3549
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
3550
AC_SUBST([AMDEPBACKSLASH])dnl
3551
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
3552
AC_SUBST([am__nodep])dnl
3553
_AM_SUBST_NOTMAKE([am__nodep])dnl
3556
# Generate code to set up dependency tracking. -*- Autoconf -*-
3558
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
3559
# Free Software Foundation, Inc.
3561
# This file is free software; the Free Software Foundation
3562
# gives unlimited permission to copy and/or distribute it,
3563
# with or without modifications, as long as this notice is preserved.
3567
# _AM_OUTPUT_DEPENDENCY_COMMANDS
3568
# ------------------------------
3569
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
3571
# Autoconf 2.62 quotes --file arguments for eval, but not when files
3572
# are listed without --file. Let's play safe and only enable the eval
3573
# if we detect the quoting.
3574
case $CONFIG_FILES in
3575
*\'*) eval set x "$CONFIG_FILES" ;;
3576
*) set x $CONFIG_FILES ;;
3581
# Strip MF so we end up with the name of the file.
3582
mf=`echo "$mf" | sed -e 's/:.*$//'`
3583
# Check whether this is an Automake generated Makefile or not.
3584
# We used to match only the files named `Makefile.in', but
3585
# some people rename them; so instead we look at the file content.
3586
# Grep'ing the first line is not enough: some people post-process
3587
# each Makefile.in and add a new line on top of each file to say so.
3588
# Grep'ing the whole file is not good either: AIX grep has a line
3589
# limit of 2048, but all sed's we know have understand at least 4000.
3590
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
3591
dirpart=`AS_DIRNAME("$mf")`
3595
# Extract the definition of DEPDIR, am__include, and am__quote
3596
# from the Makefile without running `make'.
3597
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
3598
test -z "$DEPDIR" && continue
3599
am__include=`sed -n 's/^am__include = //p' < "$mf"`
3600
test -z "am__include" && continue
3601
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
3602
# When using ansi2knr, U may be empty or an underscore; expand it
3603
U=`sed -n 's/^U = //p' < "$mf"`
3604
# Find all dependency output files, they are included files with
3605
# $(DEPDIR) in their names. We invoke sed twice because it is the
3606
# simplest approach to changing $(DEPDIR) to its actual value in the
3608
for file in `sed -n "
3609
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
3610
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
3611
# Make sure the directory exists.
3612
test -f "$dirpart/$file" && continue
3613
fdir=`AS_DIRNAME(["$file"])`
3614
AS_MKDIR_P([$dirpart/$fdir])
3615
# echo "creating $dirpart/$file"
3616
echo '# dummy' > "$dirpart/$file"
3620
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
3623
# AM_OUTPUT_DEPENDENCY_COMMANDS
3624
# -----------------------------
3625
# This macro should only be invoked once -- use via AC_REQUIRE.
3627
# This code is only required when automatic dependency tracking
3628
# is enabled. FIXME. This creates each `.P' file that we will
3629
# need in order to bootstrap the dependency handling code.
3630
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
3631
[AC_CONFIG_COMMANDS([depfiles],
3632
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
3633
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
3636
# Do all the work for Automake. -*- Autoconf -*-
3638
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3639
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
3641
# This file is free software; the Free Software Foundation
3642
# gives unlimited permission to copy and/or distribute it,
3643
# with or without modifications, as long as this notice is preserved.
3647
# This macro actually does too much. Some checks are only needed if
3648
# your package does certain things. But this isn't really a big deal.
3650
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
3651
# AM_INIT_AUTOMAKE([OPTIONS])
3652
# -----------------------------------------------
3653
# The call with PACKAGE and VERSION arguments is the old style
3654
# call (pre autoconf-2.50), which is being phased out. PACKAGE
3655
# and VERSION should now be passed to AC_INIT and removed from
3656
# the call to AM_INIT_AUTOMAKE.
3657
# We support both call styles for the transition. After
3658
# the next Automake release, Autoconf can make the AC_INIT
3659
# arguments mandatory, and then we can depend on a new Autoconf
3660
# release and drop the old call support.
3661
AC_DEFUN([AM_INIT_AUTOMAKE],
3662
[AC_PREREQ([2.62])dnl
3663
dnl Autoconf wants to disallow AM_ names. We explicitly allow
3664
dnl the ones we care about.
3665
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
3666
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
3667
AC_REQUIRE([AC_PROG_INSTALL])dnl
3668
if test "`cd $srcdir && pwd`" != "`pwd`"; then
3669
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3670
# is not polluted with repeated "-I."
3671
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
3672
# test to see if srcdir already configured
3673
if test -f $srcdir/config.status; then
3674
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
3678
# test whether we have cygpath
3679
if test -z "$CYGPATH_W"; then
3680
if (cygpath --version) >/dev/null 2>/dev/null; then
3681
CYGPATH_W='cygpath -w'
3686
AC_SUBST([CYGPATH_W])
3688
# Define the identity of the package.
3689
dnl Distinguish between old-style and new-style calls.
3691
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
3692
AC_SUBST([PACKAGE], [$1])dnl
3693
AC_SUBST([VERSION], [$2])],
3694
[_AM_SET_OPTIONS([$1])dnl
3695
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
3696
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
3697
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
3698
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
3699
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
3701
_AM_IF_OPTION([no-define],,
3702
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
3703
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
3705
# Some tools Automake needs.
3706
AC_REQUIRE([AM_SANITY_CHECK])dnl
3707
AC_REQUIRE([AC_ARG_PROGRAM])dnl
3708
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
3709
AM_MISSING_PROG(AUTOCONF, autoconf)
3710
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
3711
AM_MISSING_PROG(AUTOHEADER, autoheader)
3712
AM_MISSING_PROG(MAKEINFO, makeinfo)
3713
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
3714
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
3715
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
3716
# We need awk for the "check" target. The system "awk" is bad on
3718
AC_REQUIRE([AC_PROG_AWK])dnl
3719
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3720
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3721
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
3722
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
3723
[_AM_PROG_TAR([v7])])])
3724
_AM_IF_OPTION([no-dependencies],,
3725
[AC_PROVIDE_IFELSE([AC_PROG_CC],
3726
[_AM_DEPENDENCIES(CC)],
3727
[define([AC_PROG_CC],
3728
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
3729
AC_PROVIDE_IFELSE([AC_PROG_CXX],
3730
[_AM_DEPENDENCIES(CXX)],
3731
[define([AC_PROG_CXX],
3732
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
3733
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
3734
[_AM_DEPENDENCIES(OBJC)],
3735
[define([AC_PROG_OBJC],
3736
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
3738
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
3739
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
3740
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
3741
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
3742
AC_CONFIG_COMMANDS_PRE(dnl
3743
[m4_provide_if([_AM_COMPILER_EXEEXT],
3744
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
3747
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
3748
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
3749
dnl mangled by Autoconf and run in a shell conditional statement.
3750
m4_define([_AC_COMPILER_EXEEXT],
3751
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
3754
# When config.status generates a header, we must update the stamp-h file.
3755
# This file resides in the same directory as the config header
3756
# that is generated. The stamp files are numbered to have different names.
3758
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
3759
# loop where config.status creates the headers, so we can generate
3760
# our stamp files there.
3761
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
3762
[# Compute $1's index in $config_headers.
3765
for _am_header in $config_headers :; do
3767
$_am_arg | $_am_arg:* )
3770
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
3773
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
3775
# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
3778
# This file is free software; the Free Software Foundation
3779
# gives unlimited permission to copy and/or distribute it,
3780
# with or without modifications, as long as this notice is preserved.
3784
# AM_PROG_INSTALL_SH
3785
# ------------------
3786
# Define $install_sh.
3787
AC_DEFUN([AM_PROG_INSTALL_SH],
3788
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3789
if test x"${install_sh}" != xset; then
3792
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3794
install_sh="\${SHELL} $am_aux_dir/install-sh"
3797
AC_SUBST(install_sh)])
3799
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
3801
# This file is free software; the Free Software Foundation
3802
# gives unlimited permission to copy and/or distribute it,
3803
# with or without modifications, as long as this notice is preserved.
3807
# Check whether the underlying file-system supports filenames
3808
# with a leading dot. For instance MS-DOS doesn't.
3809
AC_DEFUN([AM_SET_LEADING_DOT],
3810
[rm -rf .tst 2>/dev/null
3811
mkdir .tst 2>/dev/null
3812
if test -d .tst; then
3817
rmdir .tst 2>/dev/null
3818
AC_SUBST([am__leading_dot])])
3820
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
3823
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
3824
# 2011 Free Software Foundation, Inc.
3826
# This file is free software; the Free Software Foundation
3827
# gives unlimited permission to copy and/or distribute it,
3828
# with or without modifications, as long as this notice is preserved.
3832
# AM_MAINTAINER_MODE([DEFAULT-MODE])
3833
# ----------------------------------
3834
# Control maintainer-specific portions of Makefiles.
3835
# Default is to disable them, unless `enable' is passed literally.
3836
# For symmetry, `disable' may be passed as well. Anyway, the user
3837
# can override the default with the --enable/--disable switch.
3838
AC_DEFUN([AM_MAINTAINER_MODE],
3839
[m4_case(m4_default([$1], [disable]),
3840
[enable], [m4_define([am_maintainer_other], [disable])],
3841
[disable], [m4_define([am_maintainer_other], [enable])],
3842
[m4_define([am_maintainer_other], [enable])
3843
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
3844
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
3845
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
3846
AC_ARG_ENABLE([maintainer-mode],
3847
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
3848
(and sometimes confusing) to the casual installer],
3849
[USE_MAINTAINER_MODE=$enableval],
3850
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
3851
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
3852
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
3853
MAINT=$MAINTAINER_MODE_TRUE
3854
AC_SUBST([MAINT])dnl
3858
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
3860
# Check to see how 'make' treats includes. -*- Autoconf -*-
3862
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
3864
# This file is free software; the Free Software Foundation
3865
# gives unlimited permission to copy and/or distribute it,
3866
# with or without modifications, as long as this notice is preserved.
3872
# Check to see how make treats includes.
3873
AC_DEFUN([AM_MAKE_INCLUDE],
3874
[am_make=${MAKE-make}
3875
cat > confinc << 'END'
3877
@echo this is the am__doit target
3880
# If we don't find an include directive, just comment out the code.
3881
AC_MSG_CHECKING([for style of include used by $am_make])
3885
# First try GNU make style include.
3886
echo "include confinc" > confmf
3887
# Ignore all kinds of additional output from `make'.
3888
case `$am_make -s -f confmf 2> /dev/null` in #(
3889
*the\ am__doit\ target*)
3895
# Now try BSD make style include.
3896
if test "$am__include" = "#"; then
3897
echo '.include "confinc"' > confmf
3898
case `$am_make -s -f confmf 2> /dev/null` in #(
3899
*the\ am__doit\ target*)
3900
am__include=.include
3906
AC_SUBST([am__include])
3907
AC_SUBST([am__quote])
3908
AC_MSG_RESULT([$_am_result])
3909
rm -f confinc confmf
3912
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
3914
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
3915
# Free Software Foundation, Inc.
3917
# This file is free software; the Free Software Foundation
3918
# gives unlimited permission to copy and/or distribute it,
3919
# with or without modifications, as long as this notice is preserved.
3923
# AM_MISSING_PROG(NAME, PROGRAM)
3924
# ------------------------------
3925
AC_DEFUN([AM_MISSING_PROG],
3926
[AC_REQUIRE([AM_MISSING_HAS_RUN])
3927
$1=${$1-"${am_missing_run}$2"}
3931
# AM_MISSING_HAS_RUN
3932
# ------------------
3933
# Define MISSING if not defined so far and test if it supports --run.
3934
# If it does, set am_missing_run to use it, otherwise, to nothing.
3935
AC_DEFUN([AM_MISSING_HAS_RUN],
3936
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3937
AC_REQUIRE_AUX_FILE([missing])dnl
3938
if test x"${MISSING+set}" != xset; then
3941
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3943
MISSING="\${SHELL} $am_aux_dir/missing" ;;
3946
# Use eval to expand $SHELL
3947
if eval "$MISSING --run true"; then
3948
am_missing_run="$MISSING --run "
3951
AC_MSG_WARN([`missing' script is too old or missing])
3955
# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
3958
# This file is free software; the Free Software Foundation
3959
# gives unlimited permission to copy and/or distribute it,
3960
# with or without modifications, as long as this notice is preserved.
3966
# Check for `mkdir -p'.
3967
AC_DEFUN([AM_PROG_MKDIR_P],
3968
[AC_PREREQ([2.60])dnl
3969
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
3970
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
3971
dnl while keeping a definition of mkdir_p for backward compatibility.
3972
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
3973
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
3974
dnl Makefile.ins that do not define MKDIR_P, so we do our own
3975
dnl adjustment using top_builddir (which is defined more often than
3977
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
3979
[[\\/$]]* | ?:[[\\/]]*) ;;
3980
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3984
# Helper functions for option handling. -*- Autoconf -*-
3986
# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
3989
# This file is free software; the Free Software Foundation
3990
# gives unlimited permission to copy and/or distribute it,
3991
# with or without modifications, as long as this notice is preserved.
3995
# _AM_MANGLE_OPTION(NAME)
3996
# -----------------------
3997
AC_DEFUN([_AM_MANGLE_OPTION],
3998
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
4000
# _AM_SET_OPTION(NAME)
4001
# --------------------
4002
# Set option NAME. Presently that only means defining a flag for this option.
4003
AC_DEFUN([_AM_SET_OPTION],
4004
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
4006
# _AM_SET_OPTIONS(OPTIONS)
4007
# ------------------------
4008
# OPTIONS is a space-separated list of Automake options.
4009
AC_DEFUN([_AM_SET_OPTIONS],
4010
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
4012
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
4013
# -------------------------------------------
4014
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
4015
AC_DEFUN([_AM_IF_OPTION],
4016
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
4018
# Check to make sure that the build environment is sane. -*- Autoconf -*-
4020
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
4021
# Free Software Foundation, Inc.
4023
# This file is free software; the Free Software Foundation
4024
# gives unlimited permission to copy and/or distribute it,
4025
# with or without modifications, as long as this notice is preserved.
4031
AC_DEFUN([AM_SANITY_CHECK],
4032
[AC_MSG_CHECKING([whether build environment is sane])
4035
echo timestamp > conftest.file
4036
# Reject unsafe characters in $srcdir or the absolute working directory
4037
# name. Accept space and tab only in the latter.
4041
*[[\\\"\#\$\&\'\`$am_lf]]*)
4042
AC_MSG_ERROR([unsafe absolute working directory name]);;
4045
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
4046
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
4049
# Do `set' in a subshell so we don't clobber the current shell's
4050
# arguments. Must try -L first in case configure is actually a
4051
# symlink; some systems play weird games with the mod time of symlinks
4052
# (eg FreeBSD returns the mod time of the symlink's containing
4055
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
4056
if test "$[*]" = "X"; then
4058
set X `ls -t "$srcdir/configure" conftest.file`
4061
if test "$[*]" != "X $srcdir/configure conftest.file" \
4062
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
4064
# If neither matched, then we have a broken ls. This can happen
4065
# if, for instance, CONFIG_SHELL is bash and it inherits a
4066
# broken ls alias from the environment. This has actually
4067
# happened. Such a system could not be considered "sane".
4068
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
4069
alias in your environment])
4072
test "$[2]" = conftest.file
4078
AC_MSG_ERROR([newly created file is older than distributed files!
4079
Check your system clock])
4081
AC_MSG_RESULT(yes)])
4083
# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
4085
# This file is free software; the Free Software Foundation
4086
# gives unlimited permission to copy and/or distribute it,
4087
# with or without modifications, as long as this notice is preserved.
4091
# AM_SILENT_RULES([DEFAULT])
4092
# --------------------------
4093
# Enable less verbose build rules; with the default set to DEFAULT
4094
# (`yes' being less verbose, `no' or empty being verbose).
4095
AC_DEFUN([AM_SILENT_RULES],
4096
[AC_ARG_ENABLE([silent-rules],
4097
[ --enable-silent-rules less verbose build output (undo: `make V=1')
4098
--disable-silent-rules verbose build output (undo: `make V=0')])
4099
case $enable_silent_rules in
4100
yes) AM_DEFAULT_VERBOSITY=0;;
4101
no) AM_DEFAULT_VERBOSITY=1;;
4102
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
4105
dnl A few `make' implementations (e.g., NonStop OS and NextStep)
4106
dnl do not support nested variable expansions.
4107
dnl See automake bug#9928 and bug#10237.
4108
am_make=${MAKE-make}
4109
AC_CACHE_CHECK([whether $am_make supports nested variables],
4110
[am_cv_make_support_nested_variables],
4111
[if AS_ECHO([['TRUE=$(BAR$(V))
4117
.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
4118
am_cv_make_support_nested_variables=yes
4120
am_cv_make_support_nested_variables=no
4122
if test $am_cv_make_support_nested_variables = yes; then
4123
dnl Using `$V' instead of `$(V)' breaks IRIX make.
4125
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4127
AM_V=$AM_DEFAULT_VERBOSITY
4128
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4131
AM_SUBST_NOTMAKE([AM_V])dnl
4132
AC_SUBST([AM_DEFAULT_V])dnl
4133
AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
4134
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
4136
AC_SUBST([AM_BACKSLASH])dnl
4137
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
4140
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
4142
# This file is free software; the Free Software Foundation
4143
# gives unlimited permission to copy and/or distribute it,
4144
# with or without modifications, as long as this notice is preserved.
4148
# AM_PROG_INSTALL_STRIP
4149
# ---------------------
4150
# One issue with vendor `install' (even GNU) is that you can't
4151
# specify the program used to strip binaries. This is especially
4152
# annoying in cross-compiling environments, where the build's strip
4153
# is unlikely to handle the host's binaries.
4154
# Fortunately install-sh will honor a STRIPPROG variable, so we
4155
# always use install-sh in `make install-strip', and initialize
4156
# STRIPPROG with the value of the STRIP variable (set by the user).
4157
AC_DEFUN([AM_PROG_INSTALL_STRIP],
4158
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
4159
# Installed binaries are usually stripped using `strip' when the user
4160
# run `make install-strip'. However `strip' might not be the right
4161
# tool to use in cross-compilation environments, therefore Automake
4162
# will honor the `STRIP' environment variable to overrule this program.
4163
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
4164
if test "$cross_compiling" != no; then
4165
AC_CHECK_TOOL([STRIP], [strip], :)
4167
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4168
AC_SUBST([INSTALL_STRIP_PROGRAM])])
4170
# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
4172
# This file is free software; the Free Software Foundation
4173
# gives unlimited permission to copy and/or distribute it,
4174
# with or without modifications, as long as this notice is preserved.
4178
# _AM_SUBST_NOTMAKE(VARIABLE)
4179
# ---------------------------
4180
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
4181
# This macro is traced by Automake.
4182
AC_DEFUN([_AM_SUBST_NOTMAKE])
4184
# AM_SUBST_NOTMAKE(VARIABLE)
4185
# --------------------------
4186
# Public sister of _AM_SUBST_NOTMAKE.
4187
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
4189
# Check how to create a tarball. -*- Autoconf -*-
4191
# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
4193
# This file is free software; the Free Software Foundation
4194
# gives unlimited permission to copy and/or distribute it,
4195
# with or without modifications, as long as this notice is preserved.
4199
# _AM_PROG_TAR(FORMAT)
4200
# --------------------
4201
# Check how to create a tarball in format FORMAT.
4202
# FORMAT should be one of `v7', `ustar', or `pax'.
4204
# Substitute a variable $(am__tar) that is a command
4205
# writing to stdout a FORMAT-tarball containing the directory
4207
# tardir=directory && $(am__tar) > result.tar
4209
# Substitute a variable $(am__untar) that extract such
4210
# a tarball read from stdin.
4211
# $(am__untar) < result.tar
4212
AC_DEFUN([_AM_PROG_TAR],
4213
[# Always define AMTAR for backward compatibility. Yes, it's still used
4214
# in the wild :-( We should find a proper way to deprecate it ...
4215
AC_SUBST([AMTAR], ['$${TAR-tar}'])
4217
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
4218
[m4_case([$1], [ustar],, [pax],,
4219
[m4_fatal([Unknown tar format])])
4220
AC_MSG_CHECKING([how to create a $1 tar archive])
4221
# Loop over all known methods to create a tar archive until one works.
4222
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
4223
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
4224
# Do not fold the above two line into one, because Tru64 sh and
4225
# Solaris sh will not grok spaces in the rhs of `-'.
4226
for _am_tool in $_am_tools
4230
for _am_tar in tar gnutar gtar;
4232
AM_RUN_LOG([$_am_tar --version]) && break
4234
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
4235
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
4236
am__untar="$_am_tar -xf -"
4239
# Must skip GNU tar: if it does not support --format= it doesn't create
4240
# ustar tarball either.
4241
(tar --version) >/dev/null 2>&1 && continue
4242
am__tar='tar chf - "$$tardir"'
4243
am__tar_='tar chf - "$tardir"'
4244
am__untar='tar xf -'
4247
am__tar='pax -L -x $1 -w "$$tardir"'
4248
am__tar_='pax -L -x $1 -w "$tardir"'
4252
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
4253
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
4254
am__untar='cpio -i -H $1 -d'
4263
# If the value was cached, stop now. We just wanted to have am__tar
4264
# and am__untar set.
4265
test -n "${am_cv_prog_tar_$1}" && break
4267
# tar/untar a dummy directory, and stop if the command works
4270
echo GrepMe > conftest.dir/file
4271
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
4273
if test -s conftest.tar; then
4274
AM_RUN_LOG([$am__untar <conftest.tar])
4275
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
4280
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
4281
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
4283
AC_SUBST([am__untar])
4286
m4_include([m4/intltool.m4])
4287
m4_include([m4/libtool.m4])
4288
m4_include([m4/ltoptions.m4])
4289
m4_include([m4/ltsugar.m4])
4290
m4_include([m4/ltversion.m4])
4291
m4_include([m4/lt~obsolete.m4])