1 | # generated automatically by aclocal 1.11.1 -*- Autoconf -*- |
---|
2 | |
---|
3 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
---|
4 | # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. |
---|
5 | # This file is free software; the Free Software Foundation |
---|
6 | # gives unlimited permission to copy and/or distribute it, |
---|
7 | # with or without modifications, as long as this notice is preserved. |
---|
8 | |
---|
9 | # This program is distributed in the hope that it will be useful, |
---|
10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
---|
11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
---|
12 | # PARTICULAR PURPOSE. |
---|
13 | |
---|
14 | m4_ifndef([AC_AUTOCONF_VERSION], |
---|
15 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
---|
16 | m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, |
---|
17 | [m4_warning([this file was generated for autoconf 2.68. |
---|
18 | You have another version of autoconf. It may work, but is not guaranteed to. |
---|
19 | If you have problems, you may need to regenerate the build system entirely. |
---|
20 | To do so, use the procedure documented by the package, typically `autoreconf'.])]) |
---|
21 | |
---|
22 | # gettext.m4 serial 63 (gettext-0.18) |
---|
23 | dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. |
---|
24 | dnl This file is free software; the Free Software Foundation |
---|
25 | dnl gives unlimited permission to copy and/or distribute it, |
---|
26 | dnl with or without modifications, as long as this notice is preserved. |
---|
27 | dnl |
---|
28 | dnl This file can can be used in projects which are not available under |
---|
29 | dnl the GNU General Public License or the GNU Library General Public |
---|
30 | dnl License but which still want to provide support for the GNU gettext |
---|
31 | dnl functionality. |
---|
32 | dnl Please note that the actual code of the GNU gettext library is covered |
---|
33 | dnl by the GNU Library General Public License, and the rest of the GNU |
---|
34 | dnl gettext package package is covered by the GNU General Public License. |
---|
35 | dnl They are *not* in the public domain. |
---|
36 | |
---|
37 | dnl Authors: |
---|
38 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
---|
39 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010. |
---|
40 | |
---|
41 | dnl Macro to add for using GNU gettext. |
---|
42 | |
---|
43 | dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). |
---|
44 | dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The |
---|
45 | dnl default (if it is not specified or empty) is 'no-libtool'. |
---|
46 | dnl INTLSYMBOL should be 'external' for packages with no intl directory, |
---|
47 | dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. |
---|
48 | dnl If INTLSYMBOL is 'use-libtool', then a libtool library |
---|
49 | dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, |
---|
50 | dnl depending on --{enable,disable}-{shared,static} and on the presence of |
---|
51 | dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library |
---|
52 | dnl $(top_builddir)/intl/libintl.a will be created. |
---|
53 | dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext |
---|
54 | dnl implementations (in libc or libintl) without the ngettext() function |
---|
55 | dnl will be ignored. If NEEDSYMBOL is specified and is |
---|
56 | dnl 'need-formatstring-macros', then GNU gettext implementations that don't |
---|
57 | dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. |
---|
58 | dnl INTLDIR is used to find the intl libraries. If empty, |
---|
59 | dnl the value `$(top_builddir)/intl/' is used. |
---|
60 | dnl |
---|
61 | dnl The result of the configuration is one of three cases: |
---|
62 | dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled |
---|
63 | dnl and used. |
---|
64 | dnl Catalog format: GNU --> install in $(datadir) |
---|
65 | dnl Catalog extension: .mo after installation, .gmo in source tree |
---|
66 | dnl 2) GNU gettext has been found in the system's C library. |
---|
67 | dnl Catalog format: GNU --> install in $(datadir) |
---|
68 | dnl Catalog extension: .mo after installation, .gmo in source tree |
---|
69 | dnl 3) No internationalization, always use English msgid. |
---|
70 | dnl Catalog format: none |
---|
71 | dnl Catalog extension: none |
---|
72 | dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. |
---|
73 | dnl The use of .gmo is historical (it was needed to avoid overwriting the |
---|
74 | dnl GNU format catalogs when building on a platform with an X/Open gettext), |
---|
75 | dnl but we keep it in order not to force irrelevant filename changes on the |
---|
76 | dnl maintainers. |
---|
77 | dnl |
---|
78 | AC_DEFUN([AM_GNU_GETTEXT], |
---|
79 | [ |
---|
80 | dnl Argument checking. |
---|
81 | ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , |
---|
82 | [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT |
---|
83 | ])])])])]) |
---|
84 | ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], |
---|
85 | [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) |
---|
86 | ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , |
---|
87 | [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT |
---|
88 | ])])])]) |
---|
89 | define([gt_included_intl], |
---|
90 | ifelse([$1], [external], |
---|
91 | ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), |
---|
92 | [yes])) |
---|
93 | define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) |
---|
94 | gt_NEEDS_INIT |
---|
95 | AM_GNU_GETTEXT_NEED([$2]) |
---|
96 | |
---|
97 | AC_REQUIRE([AM_PO_SUBDIRS])dnl |
---|
98 | ifelse(gt_included_intl, yes, [ |
---|
99 | AC_REQUIRE([AM_INTL_SUBDIR])dnl |
---|
100 | ]) |
---|
101 | |
---|
102 | dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. |
---|
103 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
---|
104 | AC_REQUIRE([AC_LIB_RPATH]) |
---|
105 | |
---|
106 | dnl Sometimes libintl requires libiconv, so first search for libiconv. |
---|
107 | dnl Ideally we would do this search only after the |
---|
108 | dnl if test "$USE_NLS" = "yes"; then |
---|
109 | dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then |
---|
110 | dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT |
---|
111 | dnl the configure script would need to contain the same shell code |
---|
112 | dnl again, outside any 'if'. There are two solutions: |
---|
113 | dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. |
---|
114 | dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. |
---|
115 | dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not |
---|
116 | dnl documented, we avoid it. |
---|
117 | ifelse(gt_included_intl, yes, , [ |
---|
118 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) |
---|
119 | ]) |
---|
120 | |
---|
121 | dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. |
---|
122 | gt_INTL_MACOSX |
---|
123 | |
---|
124 | dnl Set USE_NLS. |
---|
125 | AC_REQUIRE([AM_NLS]) |
---|
126 | |
---|
127 | ifelse(gt_included_intl, yes, [ |
---|
128 | BUILD_INCLUDED_LIBINTL=no |
---|
129 | USE_INCLUDED_LIBINTL=no |
---|
130 | ]) |
---|
131 | LIBINTL= |
---|
132 | LTLIBINTL= |
---|
133 | POSUB= |
---|
134 | |
---|
135 | dnl Add a version number to the cache macros. |
---|
136 | case " $gt_needs " in |
---|
137 | *" need-formatstring-macros "*) gt_api_version=3 ;; |
---|
138 | *" need-ngettext "*) gt_api_version=2 ;; |
---|
139 | *) gt_api_version=1 ;; |
---|
140 | esac |
---|
141 | gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" |
---|
142 | gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" |
---|
143 | |
---|
144 | dnl If we use NLS figure out what method |
---|
145 | if test "$USE_NLS" = "yes"; then |
---|
146 | gt_use_preinstalled_gnugettext=no |
---|
147 | ifelse(gt_included_intl, yes, [ |
---|
148 | AC_MSG_CHECKING([whether included gettext is requested]) |
---|
149 | AC_ARG_WITH([included-gettext], |
---|
150 | [ --with-included-gettext use the GNU gettext library included here], |
---|
151 | nls_cv_force_use_gnu_gettext=$withval, |
---|
152 | nls_cv_force_use_gnu_gettext=no) |
---|
153 | AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) |
---|
154 | |
---|
155 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" |
---|
156 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then |
---|
157 | ]) |
---|
158 | dnl User does not insist on using GNU NLS library. Figure out what |
---|
159 | dnl to use. If GNU gettext is available we use this. Else we have |
---|
160 | dnl to fall back to GNU NLS library. |
---|
161 | |
---|
162 | if test $gt_api_version -ge 3; then |
---|
163 | gt_revision_test_code=' |
---|
164 | #ifndef __GNU_GETTEXT_SUPPORTED_REVISION |
---|
165 | #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) |
---|
166 | #endif |
---|
167 | changequote(,)dnl |
---|
168 | typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; |
---|
169 | changequote([,])dnl |
---|
170 | ' |
---|
171 | else |
---|
172 | gt_revision_test_code= |
---|
173 | fi |
---|
174 | if test $gt_api_version -ge 2; then |
---|
175 | gt_expression_test_code=' + * ngettext ("", "", 0)' |
---|
176 | else |
---|
177 | gt_expression_test_code= |
---|
178 | fi |
---|
179 | |
---|
180 | AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], |
---|
181 | [AC_TRY_LINK([#include <libintl.h> |
---|
182 | $gt_revision_test_code |
---|
183 | extern int _nl_msg_cat_cntr; |
---|
184 | extern int *_nl_domain_bindings;], |
---|
185 | [bindtextdomain ("", ""); |
---|
186 | return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], |
---|
187 | [eval "$gt_func_gnugettext_libc=yes"], |
---|
188 | [eval "$gt_func_gnugettext_libc=no"])]) |
---|
189 | |
---|
190 | if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then |
---|
191 | dnl Sometimes libintl requires libiconv, so first search for libiconv. |
---|
192 | ifelse(gt_included_intl, yes, , [ |
---|
193 | AM_ICONV_LINK |
---|
194 | ]) |
---|
195 | dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL |
---|
196 | dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) |
---|
197 | dnl because that would add "-liconv" to LIBINTL and LTLIBINTL |
---|
198 | dnl even if libiconv doesn't exist. |
---|
199 | AC_LIB_LINKFLAGS_BODY([intl]) |
---|
200 | AC_CACHE_CHECK([for GNU gettext in libintl], |
---|
201 | [$gt_func_gnugettext_libintl], |
---|
202 | [gt_save_CPPFLAGS="$CPPFLAGS" |
---|
203 | CPPFLAGS="$CPPFLAGS $INCINTL" |
---|
204 | gt_save_LIBS="$LIBS" |
---|
205 | LIBS="$LIBS $LIBINTL" |
---|
206 | dnl Now see whether libintl exists and does not depend on libiconv. |
---|
207 | AC_TRY_LINK([#include <libintl.h> |
---|
208 | $gt_revision_test_code |
---|
209 | extern int _nl_msg_cat_cntr; |
---|
210 | extern |
---|
211 | #ifdef __cplusplus |
---|
212 | "C" |
---|
213 | #endif |
---|
214 | const char *_nl_expand_alias (const char *);], |
---|
215 | [bindtextdomain ("", ""); |
---|
216 | return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], |
---|
217 | [eval "$gt_func_gnugettext_libintl=yes"], |
---|
218 | [eval "$gt_func_gnugettext_libintl=no"]) |
---|
219 | dnl Now see whether libintl exists and depends on libiconv. |
---|
220 | if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then |
---|
221 | LIBS="$LIBS $LIBICONV" |
---|
222 | AC_TRY_LINK([#include <libintl.h> |
---|
223 | $gt_revision_test_code |
---|
224 | extern int _nl_msg_cat_cntr; |
---|
225 | extern |
---|
226 | #ifdef __cplusplus |
---|
227 | "C" |
---|
228 | #endif |
---|
229 | const char *_nl_expand_alias (const char *);], |
---|
230 | [bindtextdomain ("", ""); |
---|
231 | return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], |
---|
232 | [LIBINTL="$LIBINTL $LIBICONV" |
---|
233 | LTLIBINTL="$LTLIBINTL $LTLIBICONV" |
---|
234 | eval "$gt_func_gnugettext_libintl=yes" |
---|
235 | ]) |
---|
236 | fi |
---|
237 | CPPFLAGS="$gt_save_CPPFLAGS" |
---|
238 | LIBS="$gt_save_LIBS"]) |
---|
239 | fi |
---|
240 | |
---|
241 | dnl If an already present or preinstalled GNU gettext() is found, |
---|
242 | dnl use it. But if this macro is used in GNU gettext, and GNU |
---|
243 | dnl gettext is already preinstalled in libintl, we update this |
---|
244 | dnl libintl. (Cf. the install rule in intl/Makefile.in.) |
---|
245 | if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ |
---|
246 | || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ |
---|
247 | && test "$PACKAGE" != gettext-runtime \ |
---|
248 | && test "$PACKAGE" != gettext-tools; }; then |
---|
249 | gt_use_preinstalled_gnugettext=yes |
---|
250 | else |
---|
251 | dnl Reset the values set by searching for libintl. |
---|
252 | LIBINTL= |
---|
253 | LTLIBINTL= |
---|
254 | INCINTL= |
---|
255 | fi |
---|
256 | |
---|
257 | ifelse(gt_included_intl, yes, [ |
---|
258 | if test "$gt_use_preinstalled_gnugettext" != "yes"; then |
---|
259 | dnl GNU gettext is not found in the C library. |
---|
260 | dnl Fall back on included GNU gettext library. |
---|
261 | nls_cv_use_gnu_gettext=yes |
---|
262 | fi |
---|
263 | fi |
---|
264 | |
---|
265 | if test "$nls_cv_use_gnu_gettext" = "yes"; then |
---|
266 | dnl Mark actions used to generate GNU NLS library. |
---|
267 | BUILD_INCLUDED_LIBINTL=yes |
---|
268 | USE_INCLUDED_LIBINTL=yes |
---|
269 | LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" |
---|
270 | LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" |
---|
271 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` |
---|
272 | fi |
---|
273 | |
---|
274 | CATOBJEXT= |
---|
275 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ |
---|
276 | || test "$nls_cv_use_gnu_gettext" = "yes"; then |
---|
277 | dnl Mark actions to use GNU gettext tools. |
---|
278 | CATOBJEXT=.gmo |
---|
279 | fi |
---|
280 | ]) |
---|
281 | |
---|
282 | if test -n "$INTL_MACOSX_LIBS"; then |
---|
283 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ |
---|
284 | || test "$nls_cv_use_gnu_gettext" = "yes"; then |
---|
285 | dnl Some extra flags are needed during linking. |
---|
286 | LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" |
---|
287 | LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" |
---|
288 | fi |
---|
289 | fi |
---|
290 | |
---|
291 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ |
---|
292 | || test "$nls_cv_use_gnu_gettext" = "yes"; then |
---|
293 | AC_DEFINE([ENABLE_NLS], [1], |
---|
294 | [Define to 1 if translation of program messages to the user's native language |
---|
295 | is requested.]) |
---|
296 | else |
---|
297 | USE_NLS=no |
---|
298 | fi |
---|
299 | fi |
---|
300 | |
---|
301 | AC_MSG_CHECKING([whether to use NLS]) |
---|
302 | AC_MSG_RESULT([$USE_NLS]) |
---|
303 | if test "$USE_NLS" = "yes"; then |
---|
304 | AC_MSG_CHECKING([where the gettext function comes from]) |
---|
305 | if test "$gt_use_preinstalled_gnugettext" = "yes"; then |
---|
306 | if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then |
---|
307 | gt_source="external libintl" |
---|
308 | else |
---|
309 | gt_source="libc" |
---|
310 | fi |
---|
311 | else |
---|
312 | gt_source="included intl directory" |
---|
313 | fi |
---|
314 | AC_MSG_RESULT([$gt_source]) |
---|
315 | fi |
---|
316 | |
---|
317 | if test "$USE_NLS" = "yes"; then |
---|
318 | |
---|
319 | if test "$gt_use_preinstalled_gnugettext" = "yes"; then |
---|
320 | if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then |
---|
321 | AC_MSG_CHECKING([how to link with libintl]) |
---|
322 | AC_MSG_RESULT([$LIBINTL]) |
---|
323 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) |
---|
324 | fi |
---|
325 | |
---|
326 | dnl For backward compatibility. Some packages may be using this. |
---|
327 | AC_DEFINE([HAVE_GETTEXT], [1], |
---|
328 | [Define if the GNU gettext() function is already present or preinstalled.]) |
---|
329 | AC_DEFINE([HAVE_DCGETTEXT], [1], |
---|
330 | [Define if the GNU dcgettext() function is already present or preinstalled.]) |
---|
331 | fi |
---|
332 | |
---|
333 | dnl We need to process the po/ directory. |
---|
334 | POSUB=po |
---|
335 | fi |
---|
336 | |
---|
337 | ifelse(gt_included_intl, yes, [ |
---|
338 | dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL |
---|
339 | dnl to 'yes' because some of the testsuite requires it. |
---|
340 | if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then |
---|
341 | BUILD_INCLUDED_LIBINTL=yes |
---|
342 | fi |
---|
343 | |
---|
344 | dnl Make all variables we use known to autoconf. |
---|
345 | AC_SUBST([BUILD_INCLUDED_LIBINTL]) |
---|
346 | AC_SUBST([USE_INCLUDED_LIBINTL]) |
---|
347 | AC_SUBST([CATOBJEXT]) |
---|
348 | |
---|
349 | dnl For backward compatibility. Some configure.ins may be using this. |
---|
350 | nls_cv_header_intl= |
---|
351 | nls_cv_header_libgt= |
---|
352 | |
---|
353 | dnl For backward compatibility. Some Makefiles may be using this. |
---|
354 | DATADIRNAME=share |
---|
355 | AC_SUBST([DATADIRNAME]) |
---|
356 | |
---|
357 | dnl For backward compatibility. Some Makefiles may be using this. |
---|
358 | INSTOBJEXT=.mo |
---|
359 | AC_SUBST([INSTOBJEXT]) |
---|
360 | |
---|
361 | dnl For backward compatibility. Some Makefiles may be using this. |
---|
362 | GENCAT=gencat |
---|
363 | AC_SUBST([GENCAT]) |
---|
364 | |
---|
365 | dnl For backward compatibility. Some Makefiles may be using this. |
---|
366 | INTLOBJS= |
---|
367 | if test "$USE_INCLUDED_LIBINTL" = yes; then |
---|
368 | INTLOBJS="\$(GETTOBJS)" |
---|
369 | fi |
---|
370 | AC_SUBST([INTLOBJS]) |
---|
371 | |
---|
372 | dnl Enable libtool support if the surrounding package wishes it. |
---|
373 | INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix |
---|
374 | AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) |
---|
375 | ]) |
---|
376 | |
---|
377 | dnl For backward compatibility. Some Makefiles may be using this. |
---|
378 | INTLLIBS="$LIBINTL" |
---|
379 | AC_SUBST([INTLLIBS]) |
---|
380 | |
---|
381 | dnl Make all documented variables known to autoconf. |
---|
382 | AC_SUBST([LIBINTL]) |
---|
383 | AC_SUBST([LTLIBINTL]) |
---|
384 | AC_SUBST([POSUB]) |
---|
385 | ]) |
---|
386 | |
---|
387 | |
---|
388 | dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. |
---|
389 | m4_define([gt_NEEDS_INIT], |
---|
390 | [ |
---|
391 | m4_divert_text([DEFAULTS], [gt_needs=]) |
---|
392 | m4_define([gt_NEEDS_INIT], []) |
---|
393 | ]) |
---|
394 | |
---|
395 | |
---|
396 | dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) |
---|
397 | AC_DEFUN([AM_GNU_GETTEXT_NEED], |
---|
398 | [ |
---|
399 | m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) |
---|
400 | ]) |
---|
401 | |
---|
402 | |
---|
403 | dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) |
---|
404 | AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) |
---|
405 | |
---|
406 | # Copyright (C) 1995-2002 Free Software Foundation, Inc. |
---|
407 | # Copyright (C) 2001-2003,2004 Red Hat, Inc. |
---|
408 | # |
---|
409 | # This file is free software, distributed under the terms of the GNU |
---|
410 | # General Public License. As a special exception to the GNU General |
---|
411 | # Public License, this file may be distributed as part of a program |
---|
412 | # that contains a configuration script generated by Autoconf, under |
---|
413 | # the same distribution terms as the rest of that program. |
---|
414 | # |
---|
415 | # This file can be copied and used freely without restrictions. It can |
---|
416 | # be used in projects which are not available under the GNU Public License |
---|
417 | # but which still want to provide support for the GNU gettext functionality. |
---|
418 | # |
---|
419 | # Macro to add for using GNU gettext. |
---|
420 | # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996 |
---|
421 | # |
---|
422 | # Modified to never use included libintl. |
---|
423 | # Owen Taylor <otaylor@redhat.com>, 12/15/1998 |
---|
424 | # |
---|
425 | # Major rework to remove unused code |
---|
426 | # Owen Taylor <otaylor@redhat.com>, 12/11/2002 |
---|
427 | # |
---|
428 | # Added better handling of ALL_LINGUAS from GNU gettext version |
---|
429 | # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002 |
---|
430 | # |
---|
431 | # Modified to require ngettext |
---|
432 | # Matthias Clasen <mclasen@redhat.com> 08/06/2004 |
---|
433 | # |
---|
434 | # We need this here as well, since someone might use autoconf-2.5x |
---|
435 | # to configure GLib then an older version to configure a package |
---|
436 | # using AM_GLIB_GNU_GETTEXT |
---|
437 | AC_PREREQ(2.53) |
---|
438 | |
---|
439 | dnl |
---|
440 | dnl We go to great lengths to make sure that aclocal won't |
---|
441 | dnl try to pull in the installed version of these macros |
---|
442 | dnl when running aclocal in the glib directory. |
---|
443 | dnl |
---|
444 | m4_copy([AC_DEFUN],[glib_DEFUN]) |
---|
445 | m4_copy([AC_REQUIRE],[glib_REQUIRE]) |
---|
446 | dnl |
---|
447 | dnl At the end, if we're not within glib, we'll define the public |
---|
448 | dnl definitions in terms of our private definitions. |
---|
449 | dnl |
---|
450 | |
---|
451 | # GLIB_LC_MESSAGES |
---|
452 | #-------------------- |
---|
453 | glib_DEFUN([GLIB_LC_MESSAGES], |
---|
454 | [AC_CHECK_HEADERS([locale.h]) |
---|
455 | if test $ac_cv_header_locale_h = yes; then |
---|
456 | AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, |
---|
457 | [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], |
---|
458 | am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) |
---|
459 | if test $am_cv_val_LC_MESSAGES = yes; then |
---|
460 | AC_DEFINE(HAVE_LC_MESSAGES, 1, |
---|
461 | [Define if your <locale.h> file defines LC_MESSAGES.]) |
---|
462 | fi |
---|
463 | fi]) |
---|
464 | |
---|
465 | # GLIB_PATH_PROG_WITH_TEST |
---|
466 | #---------------------------- |
---|
467 | dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, |
---|
468 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) |
---|
469 | glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], |
---|
470 | [# Extract the first word of "$2", so it can be a program name with args. |
---|
471 | set dummy $2; ac_word=[$]2 |
---|
472 | AC_MSG_CHECKING([for $ac_word]) |
---|
473 | AC_CACHE_VAL(ac_cv_path_$1, |
---|
474 | [case "[$]$1" in |
---|
475 | /*) |
---|
476 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. |
---|
477 | ;; |
---|
478 | *) |
---|
479 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
---|
480 | for ac_dir in ifelse([$5], , $PATH, [$5]); do |
---|
481 | test -z "$ac_dir" && ac_dir=. |
---|
482 | if test -f $ac_dir/$ac_word; then |
---|
483 | if [$3]; then |
---|
484 | ac_cv_path_$1="$ac_dir/$ac_word" |
---|
485 | break |
---|
486 | fi |
---|
487 | fi |
---|
488 | done |
---|
489 | IFS="$ac_save_ifs" |
---|
490 | dnl If no 4th arg is given, leave the cache variable unset, |
---|
491 | dnl so AC_PATH_PROGS will keep looking. |
---|
492 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" |
---|
493 | ])dnl |
---|
494 | ;; |
---|
495 | esac])dnl |
---|
496 | $1="$ac_cv_path_$1" |
---|
497 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then |
---|
498 | AC_MSG_RESULT([$]$1) |
---|
499 | else |
---|
500 | AC_MSG_RESULT(no) |
---|
501 | fi |
---|
502 | AC_SUBST($1)dnl |
---|
503 | ]) |
---|
504 | |
---|
505 | # GLIB_WITH_NLS |
---|
506 | #----------------- |
---|
507 | glib_DEFUN([GLIB_WITH_NLS], |
---|
508 | dnl NLS is obligatory |
---|
509 | [USE_NLS=yes |
---|
510 | AC_SUBST(USE_NLS) |
---|
511 | |
---|
512 | gt_cv_have_gettext=no |
---|
513 | |
---|
514 | CATOBJEXT=NONE |
---|
515 | XGETTEXT=: |
---|
516 | INTLLIBS= |
---|
517 | |
---|
518 | AC_CHECK_HEADER(libintl.h, |
---|
519 | [gt_cv_func_dgettext_libintl="no" |
---|
520 | libintl_extra_libs="" |
---|
521 | |
---|
522 | # |
---|
523 | # First check in libc |
---|
524 | # |
---|
525 | AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, |
---|
526 | [AC_TRY_LINK([ |
---|
527 | #include <libintl.h> |
---|
528 | ], |
---|
529 | [return !ngettext ("","", 1)], |
---|
530 | gt_cv_func_ngettext_libc=yes, |
---|
531 | gt_cv_func_ngettext_libc=no) |
---|
532 | ]) |
---|
533 | |
---|
534 | if test "$gt_cv_func_ngettext_libc" = "yes" ; then |
---|
535 | AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, |
---|
536 | [AC_TRY_LINK([ |
---|
537 | #include <libintl.h> |
---|
538 | ], |
---|
539 | [return !dgettext ("","")], |
---|
540 | gt_cv_func_dgettext_libc=yes, |
---|
541 | gt_cv_func_dgettext_libc=no) |
---|
542 | ]) |
---|
543 | fi |
---|
544 | |
---|
545 | if test "$gt_cv_func_ngettext_libc" = "yes" ; then |
---|
546 | AC_CHECK_FUNCS(bind_textdomain_codeset) |
---|
547 | fi |
---|
548 | |
---|
549 | # |
---|
550 | # If we don't have everything we want, check in libintl |
---|
551 | # |
---|
552 | if test "$gt_cv_func_dgettext_libc" != "yes" \ |
---|
553 | || test "$gt_cv_func_ngettext_libc" != "yes" \ |
---|
554 | || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then |
---|
555 | |
---|
556 | AC_CHECK_LIB(intl, bindtextdomain, |
---|
557 | [AC_CHECK_LIB(intl, ngettext, |
---|
558 | [AC_CHECK_LIB(intl, dgettext, |
---|
559 | gt_cv_func_dgettext_libintl=yes)])]) |
---|
560 | |
---|
561 | if test "$gt_cv_func_dgettext_libintl" != "yes" ; then |
---|
562 | AC_MSG_CHECKING([if -liconv is needed to use gettext]) |
---|
563 | AC_MSG_RESULT([]) |
---|
564 | AC_CHECK_LIB(intl, ngettext, |
---|
565 | [AC_CHECK_LIB(intl, dcgettext, |
---|
566 | [gt_cv_func_dgettext_libintl=yes |
---|
567 | libintl_extra_libs=-liconv], |
---|
568 | :,-liconv)], |
---|
569 | :,-liconv) |
---|
570 | fi |
---|
571 | |
---|
572 | # |
---|
573 | # If we found libintl, then check in it for bind_textdomain_codeset(); |
---|
574 | # we'll prefer libc if neither have bind_textdomain_codeset(), |
---|
575 | # and both have dgettext and ngettext |
---|
576 | # |
---|
577 | if test "$gt_cv_func_dgettext_libintl" = "yes" ; then |
---|
578 | glib_save_LIBS="$LIBS" |
---|
579 | LIBS="$LIBS -lintl $libintl_extra_libs" |
---|
580 | unset ac_cv_func_bind_textdomain_codeset |
---|
581 | AC_CHECK_FUNCS(bind_textdomain_codeset) |
---|
582 | LIBS="$glib_save_LIBS" |
---|
583 | |
---|
584 | if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then |
---|
585 | gt_cv_func_dgettext_libc=no |
---|
586 | else |
---|
587 | if test "$gt_cv_func_dgettext_libc" = "yes" \ |
---|
588 | && test "$gt_cv_func_ngettext_libc" = "yes"; then |
---|
589 | gt_cv_func_dgettext_libintl=no |
---|
590 | fi |
---|
591 | fi |
---|
592 | fi |
---|
593 | fi |
---|
594 | |
---|
595 | if test "$gt_cv_func_dgettext_libc" = "yes" \ |
---|
596 | || test "$gt_cv_func_dgettext_libintl" = "yes"; then |
---|
597 | gt_cv_have_gettext=yes |
---|
598 | fi |
---|
599 | |
---|
600 | if test "$gt_cv_func_dgettext_libintl" = "yes"; then |
---|
601 | INTLLIBS="-lintl $libintl_extra_libs" |
---|
602 | fi |
---|
603 | |
---|
604 | if test "$gt_cv_have_gettext" = "yes"; then |
---|
605 | AC_DEFINE(HAVE_GETTEXT,1, |
---|
606 | [Define if the GNU gettext() function is already present or preinstalled.]) |
---|
607 | GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, |
---|
608 | [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl |
---|
609 | if test "$MSGFMT" != "no"; then |
---|
610 | glib_save_LIBS="$LIBS" |
---|
611 | LIBS="$LIBS $INTLLIBS" |
---|
612 | AC_CHECK_FUNCS(dcgettext) |
---|
613 | MSGFMT_OPTS= |
---|
614 | AC_MSG_CHECKING([if msgfmt accepts -c]) |
---|
615 | GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ |
---|
616 | msgid "" |
---|
617 | msgstr "" |
---|
618 | "Content-Type: text/plain; charset=UTF-8\n" |
---|
619 | "Project-Id-Version: test 1.0\n" |
---|
620 | "PO-Revision-Date: 2007-02-15 12:01+0100\n" |
---|
621 | "Last-Translator: test <foo@bar.xx>\n" |
---|
622 | "Language-Team: C <LL@li.org>\n" |
---|
623 | "MIME-Version: 1.0\n" |
---|
624 | "Content-Transfer-Encoding: 8bit\n" |
---|
625 | ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) |
---|
626 | AC_SUBST(MSGFMT_OPTS) |
---|
627 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) |
---|
628 | GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, |
---|
629 | [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) |
---|
630 | AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; |
---|
631 | return _nl_msg_cat_cntr], |
---|
632 | [CATOBJEXT=.gmo |
---|
633 | DATADIRNAME=share], |
---|
634 | [case $host in |
---|
635 | *-*-solaris*) |
---|
636 | dnl On Solaris, if bind_textdomain_codeset is in libc, |
---|
637 | dnl GNU format message catalog is always supported, |
---|
638 | dnl since both are added to the libc all together. |
---|
639 | dnl Hence, we'd like to go with DATADIRNAME=share and |
---|
640 | dnl and CATOBJEXT=.gmo in this case. |
---|
641 | AC_CHECK_FUNC(bind_textdomain_codeset, |
---|
642 | [CATOBJEXT=.gmo |
---|
643 | DATADIRNAME=share], |
---|
644 | [CATOBJEXT=.mo |
---|
645 | DATADIRNAME=lib]) |
---|
646 | ;; |
---|
647 | *-*-openbsd*) |
---|
648 | CATOBJEXT=.mo |
---|
649 | DATADIRNAME=share |
---|
650 | ;; |
---|
651 | *) |
---|
652 | CATOBJEXT=.mo |
---|
653 | DATADIRNAME=lib |
---|
654 | ;; |
---|
655 | esac]) |
---|
656 | LIBS="$glib_save_LIBS" |
---|
657 | INSTOBJEXT=.mo |
---|
658 | else |
---|
659 | gt_cv_have_gettext=no |
---|
660 | fi |
---|
661 | fi |
---|
662 | ]) |
---|
663 | |
---|
664 | if test "$gt_cv_have_gettext" = "yes" ; then |
---|
665 | AC_DEFINE(ENABLE_NLS, 1, |
---|
666 | [always defined to indicate that i18n is enabled]) |
---|
667 | fi |
---|
668 | |
---|
669 | dnl Test whether we really found GNU xgettext. |
---|
670 | if test "$XGETTEXT" != ":"; then |
---|
671 | dnl If it is not GNU xgettext we define it as : so that the |
---|
672 | dnl Makefiles still can work. |
---|
673 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then |
---|
674 | : ; |
---|
675 | else |
---|
676 | AC_MSG_RESULT( |
---|
677 | [found xgettext program is not GNU xgettext; ignore it]) |
---|
678 | XGETTEXT=":" |
---|
679 | fi |
---|
680 | fi |
---|
681 | |
---|
682 | # We need to process the po/ directory. |
---|
683 | POSUB=po |
---|
684 | |
---|
685 | AC_OUTPUT_COMMANDS( |
---|
686 | [case "$CONFIG_FILES" in *po/Makefile.in*) |
---|
687 | sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile |
---|
688 | esac]) |
---|
689 | |
---|
690 | dnl These rules are solely for the distribution goal. While doing this |
---|
691 | dnl we only have to keep exactly one list of the available catalogs |
---|
692 | dnl in configure.ac. |
---|
693 | for lang in $ALL_LINGUAS; do |
---|
694 | GMOFILES="$GMOFILES $lang.gmo" |
---|
695 | POFILES="$POFILES $lang.po" |
---|
696 | done |
---|
697 | |
---|
698 | dnl Make all variables we use known to autoconf. |
---|
699 | AC_SUBST(CATALOGS) |
---|
700 | AC_SUBST(CATOBJEXT) |
---|
701 | AC_SUBST(DATADIRNAME) |
---|
702 | AC_SUBST(GMOFILES) |
---|
703 | AC_SUBST(INSTOBJEXT) |
---|
704 | AC_SUBST(INTLLIBS) |
---|
705 | AC_SUBST(PO_IN_DATADIR_TRUE) |
---|
706 | AC_SUBST(PO_IN_DATADIR_FALSE) |
---|
707 | AC_SUBST(POFILES) |
---|
708 | AC_SUBST(POSUB) |
---|
709 | ]) |
---|
710 | |
---|
711 | # AM_GLIB_GNU_GETTEXT |
---|
712 | # ------------------- |
---|
713 | # Do checks necessary for use of gettext. If a suitable implementation |
---|
714 | # of gettext is found in either in libintl or in the C library, |
---|
715 | # it will set INTLLIBS to the libraries needed for use of gettext |
---|
716 | # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable |
---|
717 | # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() |
---|
718 | # on various variables needed by the Makefile.in.in installed by |
---|
719 | # glib-gettextize. |
---|
720 | dnl |
---|
721 | glib_DEFUN([GLIB_GNU_GETTEXT], |
---|
722 | [AC_REQUIRE([AC_PROG_CC])dnl |
---|
723 | AC_REQUIRE([AC_HEADER_STDC])dnl |
---|
724 | |
---|
725 | GLIB_LC_MESSAGES |
---|
726 | GLIB_WITH_NLS |
---|
727 | |
---|
728 | if test "$gt_cv_have_gettext" = "yes"; then |
---|
729 | if test "x$ALL_LINGUAS" = "x"; then |
---|
730 | LINGUAS= |
---|
731 | else |
---|
732 | AC_MSG_CHECKING(for catalogs to be installed) |
---|
733 | NEW_LINGUAS= |
---|
734 | for presentlang in $ALL_LINGUAS; do |
---|
735 | useit=no |
---|
736 | if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then |
---|
737 | desiredlanguages="$LINGUAS" |
---|
738 | else |
---|
739 | desiredlanguages="$ALL_LINGUAS" |
---|
740 | fi |
---|
741 | for desiredlang in $desiredlanguages; do |
---|
742 | # Use the presentlang catalog if desiredlang is |
---|
743 | # a. equal to presentlang, or |
---|
744 | # b. a variant of presentlang (because in this case, |
---|
745 | # presentlang can be used as a fallback for messages |
---|
746 | # which are not translated in the desiredlang catalog). |
---|
747 | case "$desiredlang" in |
---|
748 | "$presentlang"*) useit=yes;; |
---|
749 | esac |
---|
750 | done |
---|
751 | if test $useit = yes; then |
---|
752 | NEW_LINGUAS="$NEW_LINGUAS $presentlang" |
---|
753 | fi |
---|
754 | done |
---|
755 | LINGUAS=$NEW_LINGUAS |
---|
756 | AC_MSG_RESULT($LINGUAS) |
---|
757 | fi |
---|
758 | |
---|
759 | dnl Construct list of names of catalog files to be constructed. |
---|
760 | if test -n "$LINGUAS"; then |
---|
761 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done |
---|
762 | fi |
---|
763 | fi |
---|
764 | |
---|
765 | dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly |
---|
766 | dnl find the mkinstalldirs script in another subdir but ($top_srcdir). |
---|
767 | dnl Try to locate is. |
---|
768 | MKINSTALLDIRS= |
---|
769 | if test -n "$ac_aux_dir"; then |
---|
770 | MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" |
---|
771 | fi |
---|
772 | if test -z "$MKINSTALLDIRS"; then |
---|
773 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" |
---|
774 | fi |
---|
775 | AC_SUBST(MKINSTALLDIRS) |
---|
776 | |
---|
777 | dnl Generate list of files to be processed by xgettext which will |
---|
778 | dnl be included in po/Makefile. |
---|
779 | test -d po || mkdir po |
---|
780 | if test "x$srcdir" != "x."; then |
---|
781 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then |
---|
782 | posrcprefix="$srcdir/" |
---|
783 | else |
---|
784 | posrcprefix="../$srcdir/" |
---|
785 | fi |
---|
786 | else |
---|
787 | posrcprefix="../" |
---|
788 | fi |
---|
789 | rm -f po/POTFILES |
---|
790 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ |
---|
791 | < $srcdir/po/POTFILES.in > po/POTFILES |
---|
792 | ]) |
---|
793 | |
---|
794 | # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) |
---|
795 | # ------------------------------- |
---|
796 | # Define VARIABLE to the location where catalog files will |
---|
797 | # be installed by po/Makefile. |
---|
798 | glib_DEFUN([GLIB_DEFINE_LOCALEDIR], |
---|
799 | [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl |
---|
800 | glib_save_prefix="$prefix" |
---|
801 | glib_save_exec_prefix="$exec_prefix" |
---|
802 | glib_save_datarootdir="$datarootdir" |
---|
803 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
---|
804 | test "x$exec_prefix" = xNONE && exec_prefix=$prefix |
---|
805 | datarootdir=`eval echo "${datarootdir}"` |
---|
806 | if test "x$CATOBJEXT" = "x.mo" ; then |
---|
807 | localedir=`eval echo "${libdir}/locale"` |
---|
808 | else |
---|
809 | localedir=`eval echo "${datadir}/locale"` |
---|
810 | fi |
---|
811 | prefix="$glib_save_prefix" |
---|
812 | exec_prefix="$glib_save_exec_prefix" |
---|
813 | datarootdir="$glib_save_datarootdir" |
---|
814 | AC_DEFINE_UNQUOTED($1, "$localedir", |
---|
815 | [Define the location where the catalogs will be installed]) |
---|
816 | ]) |
---|
817 | |
---|
818 | dnl |
---|
819 | dnl Now the definitions that aclocal will find |
---|
820 | dnl |
---|
821 | ifdef(glib_configure_ac,[],[ |
---|
822 | AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) |
---|
823 | AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) |
---|
824 | ])dnl |
---|
825 | |
---|
826 | # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) |
---|
827 | # |
---|
828 | # Create a temporary file with TEST-FILE as its contents and pass the |
---|
829 | # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with |
---|
830 | # 0 and perform ACTION-IF-FAIL for any other exit status. |
---|
831 | AC_DEFUN([GLIB_RUN_PROG], |
---|
832 | [cat >conftest.foo <<_ACEOF |
---|
833 | $2 |
---|
834 | _ACEOF |
---|
835 | if AC_RUN_LOG([$1 conftest.foo]); then |
---|
836 | m4_ifval([$3], [$3], [:]) |
---|
837 | m4_ifvaln([$4], [else $4])dnl |
---|
838 | echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD |
---|
839 | sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD |
---|
840 | fi]) |
---|
841 | |
---|
842 | |
---|
843 | |
---|
844 | dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) |
---|
845 | # serial 42 IT_PROG_INTLTOOL |
---|
846 | AC_DEFUN([IT_PROG_INTLTOOL], [ |
---|
847 | AC_PREREQ([2.50])dnl |
---|
848 | AC_REQUIRE([AM_NLS])dnl |
---|
849 | |
---|
850 | case "$am__api_version" in |
---|
851 | 1.[01234]) |
---|
852 | AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool]) |
---|
853 | ;; |
---|
854 | *) |
---|
855 | ;; |
---|
856 | esac |
---|
857 | |
---|
858 | INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` |
---|
859 | INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` |
---|
860 | INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` |
---|
861 | if test -n "$1"; then |
---|
862 | AC_MSG_CHECKING([for intltool >= $1]) |
---|
863 | AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) |
---|
864 | test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || |
---|
865 | AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) |
---|
866 | fi |
---|
867 | |
---|
868 | AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update]) |
---|
869 | AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge]) |
---|
870 | AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract]) |
---|
871 | if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then |
---|
872 | AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.]) |
---|
873 | fi |
---|
874 | |
---|
875 | if test -z "$AM_DEFAULT_VERBOSITY"; then |
---|
876 | AM_DEFAULT_VERBOSITY=1 |
---|
877 | fi |
---|
878 | AC_SUBST([AM_DEFAULT_VERBOSITY]) |
---|
879 | |
---|
880 | INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))' |
---|
881 | INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))' |
---|
882 | INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;' |
---|
883 | AC_SUBST(INTLTOOL_V_MERGE) |
---|
884 | AC_SUBST(INTLTOOL__v_MERGE_) |
---|
885 | AC_SUBST(INTLTOOL__v_MERGE_0) |
---|
886 | |
---|
887 | INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))' |
---|
888 | intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))' |
---|
889 | intltool__v_merge_options_0='-q' |
---|
890 | AC_SUBST(INTLTOOL_V_MERGE_OPTIONS) |
---|
891 | AC_SUBST(intltool__v_merge_options_) |
---|
892 | AC_SUBST(intltool__v_merge_options_0) |
---|
893 | |
---|
894 | INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
895 | INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
896 | INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
897 | INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
898 | INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@' |
---|
899 | INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
900 | INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
901 | INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
902 | INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
903 | INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
904 | INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
905 | if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then |
---|
906 | INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@' |
---|
907 | else |
---|
908 | INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir' |
---|
909 | fi |
---|
910 | INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
911 | INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
912 | INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
913 | INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
914 | INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
915 | INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
916 | INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
917 | |
---|
918 | _IT_SUBST(INTLTOOL_DESKTOP_RULE) |
---|
919 | _IT_SUBST(INTLTOOL_DIRECTORY_RULE) |
---|
920 | _IT_SUBST(INTLTOOL_KEYS_RULE) |
---|
921 | _IT_SUBST(INTLTOOL_PROP_RULE) |
---|
922 | _IT_SUBST(INTLTOOL_OAF_RULE) |
---|
923 | _IT_SUBST(INTLTOOL_PONG_RULE) |
---|
924 | _IT_SUBST(INTLTOOL_SERVER_RULE) |
---|
925 | _IT_SUBST(INTLTOOL_SHEET_RULE) |
---|
926 | _IT_SUBST(INTLTOOL_SOUNDLIST_RULE) |
---|
927 | _IT_SUBST(INTLTOOL_UI_RULE) |
---|
928 | _IT_SUBST(INTLTOOL_XAM_RULE) |
---|
929 | _IT_SUBST(INTLTOOL_KBD_RULE) |
---|
930 | _IT_SUBST(INTLTOOL_XML_RULE) |
---|
931 | _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE) |
---|
932 | _IT_SUBST(INTLTOOL_CAVES_RULE) |
---|
933 | _IT_SUBST(INTLTOOL_SCHEMAS_RULE) |
---|
934 | _IT_SUBST(INTLTOOL_THEME_RULE) |
---|
935 | _IT_SUBST(INTLTOOL_SERVICE_RULE) |
---|
936 | _IT_SUBST(INTLTOOL_POLICY_RULE) |
---|
937 | |
---|
938 | # Check the gettext tools to make sure they are GNU |
---|
939 | AC_PATH_PROG(XGETTEXT, xgettext) |
---|
940 | AC_PATH_PROG(MSGMERGE, msgmerge) |
---|
941 | AC_PATH_PROG(MSGFMT, msgfmt) |
---|
942 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) |
---|
943 | if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then |
---|
944 | AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) |
---|
945 | fi |
---|
946 | xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" |
---|
947 | mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" |
---|
948 | mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" |
---|
949 | if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then |
---|
950 | AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) |
---|
951 | fi |
---|
952 | |
---|
953 | AC_PATH_PROG(INTLTOOL_PERL, perl) |
---|
954 | if test -z "$INTLTOOL_PERL"; then |
---|
955 | AC_MSG_ERROR([perl not found]) |
---|
956 | fi |
---|
957 | AC_MSG_CHECKING([for perl >= 5.8.1]) |
---|
958 | $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 |
---|
959 | if test $? -ne 0; then |
---|
960 | AC_MSG_ERROR([perl 5.8.1 is required for intltool]) |
---|
961 | else |
---|
962 | IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"` |
---|
963 | AC_MSG_RESULT([$IT_PERL_VERSION]) |
---|
964 | fi |
---|
965 | if test "x$2" != "xno-xml"; then |
---|
966 | AC_MSG_CHECKING([for XML::Parser]) |
---|
967 | if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then |
---|
968 | AC_MSG_RESULT([ok]) |
---|
969 | else |
---|
970 | AC_MSG_ERROR([XML::Parser perl module is required for intltool]) |
---|
971 | fi |
---|
972 | fi |
---|
973 | |
---|
974 | # Substitute ALL_LINGUAS so we can use it in po/Makefile |
---|
975 | AC_SUBST(ALL_LINGUAS) |
---|
976 | |
---|
977 | # Set DATADIRNAME correctly if it is not set yet |
---|
978 | # (copied from glib-gettext.m4) |
---|
979 | if test -z "$DATADIRNAME"; then |
---|
980 | AC_LINK_IFELSE( |
---|
981 | [AC_LANG_PROGRAM([[]], |
---|
982 | [[extern int _nl_msg_cat_cntr; |
---|
983 | return _nl_msg_cat_cntr]])], |
---|
984 | [DATADIRNAME=share], |
---|
985 | [case $host in |
---|
986 | *-*-solaris*) |
---|
987 | dnl On Solaris, if bind_textdomain_codeset is in libc, |
---|
988 | dnl GNU format message catalog is always supported, |
---|
989 | dnl since both are added to the libc all together. |
---|
990 | dnl Hence, we'd like to go with DATADIRNAME=share |
---|
991 | dnl in this case. |
---|
992 | AC_CHECK_FUNC(bind_textdomain_codeset, |
---|
993 | [DATADIRNAME=share], [DATADIRNAME=lib]) |
---|
994 | ;; |
---|
995 | *) |
---|
996 | [DATADIRNAME=lib] |
---|
997 | ;; |
---|
998 | esac]) |
---|
999 | fi |
---|
1000 | AC_SUBST(DATADIRNAME) |
---|
1001 | |
---|
1002 | IT_PO_SUBDIR([po]) |
---|
1003 | |
---|
1004 | ]) |
---|
1005 | |
---|
1006 | |
---|
1007 | # IT_PO_SUBDIR(DIRNAME) |
---|
1008 | # --------------------- |
---|
1009 | # All po subdirs have to be declared with this macro; the subdir "po" is |
---|
1010 | # declared by IT_PROG_INTLTOOL. |
---|
1011 | # |
---|
1012 | AC_DEFUN([IT_PO_SUBDIR], |
---|
1013 | [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. |
---|
1014 | dnl |
---|
1015 | dnl The following CONFIG_COMMANDS should be executed at the very end |
---|
1016 | dnl of config.status. |
---|
1017 | AC_CONFIG_COMMANDS_PRE([ |
---|
1018 | AC_CONFIG_COMMANDS([$1/stamp-it], [ |
---|
1019 | if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then |
---|
1020 | AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.]) |
---|
1021 | fi |
---|
1022 | rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp" |
---|
1023 | >"$1/stamp-it.tmp" |
---|
1024 | [sed '/^#/d |
---|
1025 | s/^[[].*] *// |
---|
1026 | /^[ ]*$/d |
---|
1027 | '"s|^| $ac_top_srcdir/|" \ |
---|
1028 | "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES" |
---|
1029 | ] |
---|
1030 | [sed '/^POTFILES =/,/[^\\]$/ { |
---|
1031 | /^POTFILES =/!d |
---|
1032 | r $1/POTFILES |
---|
1033 | } |
---|
1034 | ' "$1/Makefile.in" >"$1/Makefile"] |
---|
1035 | rm -f "$1/Makefile.tmp" |
---|
1036 | mv "$1/stamp-it.tmp" "$1/stamp-it" |
---|
1037 | ]) |
---|
1038 | ])dnl |
---|
1039 | ]) |
---|
1040 | |
---|
1041 | # _IT_SUBST(VARIABLE) |
---|
1042 | # ------------------- |
---|
1043 | # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST |
---|
1044 | # |
---|
1045 | AC_DEFUN([_IT_SUBST], |
---|
1046 | [ |
---|
1047 | AC_SUBST([$1]) |
---|
1048 | m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) |
---|
1049 | ] |
---|
1050 | ) |
---|
1051 | |
---|
1052 | # deprecated macros |
---|
1053 | AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) |
---|
1054 | # A hint is needed for aclocal from Automake <= 1.9.4: |
---|
1055 | # AC_DEFUN([AC_PROG_INTLTOOL], ...) |
---|
1056 | |
---|
1057 | |
---|
1058 | # nls.m4 serial 5 (gettext-0.18) |
---|
1059 | dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation, |
---|
1060 | dnl Inc. |
---|
1061 | dnl This file is free software; the Free Software Foundation |
---|
1062 | dnl gives unlimited permission to copy and/or distribute it, |
---|
1063 | dnl with or without modifications, as long as this notice is preserved. |
---|
1064 | dnl |
---|
1065 | dnl This file can can be used in projects which are not available under |
---|
1066 | dnl the GNU General Public License or the GNU Library General Public |
---|
1067 | dnl License but which still want to provide support for the GNU gettext |
---|
1068 | dnl functionality. |
---|
1069 | dnl Please note that the actual code of the GNU gettext library is covered |
---|
1070 | dnl by the GNU Library General Public License, and the rest of the GNU |
---|
1071 | dnl gettext package package is covered by the GNU General Public License. |
---|
1072 | dnl They are *not* in the public domain. |
---|
1073 | |
---|
1074 | dnl Authors: |
---|
1075 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
---|
1076 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. |
---|
1077 | |
---|
1078 | AC_PREREQ([2.50]) |
---|
1079 | |
---|
1080 | AC_DEFUN([AM_NLS], |
---|
1081 | [ |
---|
1082 | AC_MSG_CHECKING([whether NLS is requested]) |
---|
1083 | dnl Default is enabled NLS |
---|
1084 | AC_ARG_ENABLE([nls], |
---|
1085 | [ --disable-nls do not use Native Language Support], |
---|
1086 | USE_NLS=$enableval, USE_NLS=yes) |
---|
1087 | AC_MSG_RESULT([$USE_NLS]) |
---|
1088 | AC_SUBST([USE_NLS]) |
---|
1089 | ]) |
---|
1090 | |
---|
1091 | # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- |
---|
1092 | # serial 1 (pkg-config-0.24) |
---|
1093 | # |
---|
1094 | # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. |
---|
1095 | # |
---|
1096 | # This program is free software; you can redistribute it and/or modify |
---|
1097 | # it under the terms of the GNU General Public License as published by |
---|
1098 | # the Free Software Foundation; either version 2 of the License, or |
---|
1099 | # (at your option) any later version. |
---|
1100 | # |
---|
1101 | # This program is distributed in the hope that it will be useful, but |
---|
1102 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
1103 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
1104 | # General Public License for more details. |
---|
1105 | # |
---|
1106 | # You should have received a copy of the GNU General Public License |
---|
1107 | # along with this program; if not, write to the Free Software |
---|
1108 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
1109 | # |
---|
1110 | # As a special exception to the GNU General Public License, if you |
---|
1111 | # distribute this file as part of a program that contains a |
---|
1112 | # configuration script generated by Autoconf, you may include it under |
---|
1113 | # the same distribution terms that you use for the rest of that program. |
---|
1114 | |
---|
1115 | # PKG_PROG_PKG_CONFIG([MIN-VERSION]) |
---|
1116 | # ---------------------------------- |
---|
1117 | AC_DEFUN([PKG_PROG_PKG_CONFIG], |
---|
1118 | [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) |
---|
1119 | m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) |
---|
1120 | AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) |
---|
1121 | AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) |
---|
1122 | AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) |
---|
1123 | |
---|
1124 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then |
---|
1125 | AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) |
---|
1126 | fi |
---|
1127 | if test -n "$PKG_CONFIG"; then |
---|
1128 | _pkg_min_version=m4_default([$1], [0.9.0]) |
---|
1129 | AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) |
---|
1130 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then |
---|
1131 | AC_MSG_RESULT([yes]) |
---|
1132 | else |
---|
1133 | AC_MSG_RESULT([no]) |
---|
1134 | PKG_CONFIG="" |
---|
1135 | fi |
---|
1136 | fi[]dnl |
---|
1137 | ])# PKG_PROG_PKG_CONFIG |
---|
1138 | |
---|
1139 | # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
---|
1140 | # |
---|
1141 | # Check to see whether a particular set of modules exists. Similar |
---|
1142 | # to PKG_CHECK_MODULES(), but does not set variables or print errors. |
---|
1143 | # |
---|
1144 | # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
---|
1145 | # only at the first occurence in configure.ac, so if the first place |
---|
1146 | # it's called might be skipped (such as if it is within an "if", you |
---|
1147 | # have to call PKG_CHECK_EXISTS manually |
---|
1148 | # -------------------------------------------------------------- |
---|
1149 | AC_DEFUN([PKG_CHECK_EXISTS], |
---|
1150 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
---|
1151 | if test -n "$PKG_CONFIG" && \ |
---|
1152 | AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then |
---|
1153 | m4_default([$2], [:]) |
---|
1154 | m4_ifvaln([$3], [else |
---|
1155 | $3])dnl |
---|
1156 | fi]) |
---|
1157 | |
---|
1158 | # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) |
---|
1159 | # --------------------------------------------- |
---|
1160 | m4_define([_PKG_CONFIG], |
---|
1161 | [if test -n "$$1"; then |
---|
1162 | pkg_cv_[]$1="$$1" |
---|
1163 | elif test -n "$PKG_CONFIG"; then |
---|
1164 | PKG_CHECK_EXISTS([$3], |
---|
1165 | [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], |
---|
1166 | [pkg_failed=yes]) |
---|
1167 | else |
---|
1168 | pkg_failed=untried |
---|
1169 | fi[]dnl |
---|
1170 | ])# _PKG_CONFIG |
---|
1171 | |
---|
1172 | # _PKG_SHORT_ERRORS_SUPPORTED |
---|
1173 | # ----------------------------- |
---|
1174 | AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], |
---|
1175 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
---|
1176 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
---|
1177 | _pkg_short_errors_supported=yes |
---|
1178 | else |
---|
1179 | _pkg_short_errors_supported=no |
---|
1180 | fi[]dnl |
---|
1181 | ])# _PKG_SHORT_ERRORS_SUPPORTED |
---|
1182 | |
---|
1183 | |
---|
1184 | # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], |
---|
1185 | # [ACTION-IF-NOT-FOUND]) |
---|
1186 | # |
---|
1187 | # |
---|
1188 | # Note that if there is a possibility the first call to |
---|
1189 | # PKG_CHECK_MODULES might not happen, you should be sure to include an |
---|
1190 | # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac |
---|
1191 | # |
---|
1192 | # |
---|
1193 | # -------------------------------------------------------------- |
---|
1194 | AC_DEFUN([PKG_CHECK_MODULES], |
---|
1195 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
---|
1196 | AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl |
---|
1197 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl |
---|
1198 | |
---|
1199 | pkg_failed=no |
---|
1200 | AC_MSG_CHECKING([for $1]) |
---|
1201 | |
---|
1202 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) |
---|
1203 | _PKG_CONFIG([$1][_LIBS], [libs], [$2]) |
---|
1204 | |
---|
1205 | m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS |
---|
1206 | and $1[]_LIBS to avoid the need to call pkg-config. |
---|
1207 | See the pkg-config man page for more details.]) |
---|
1208 | |
---|
1209 | if test $pkg_failed = yes; then |
---|
1210 | AC_MSG_RESULT([no]) |
---|
1211 | _PKG_SHORT_ERRORS_SUPPORTED |
---|
1212 | if test $_pkg_short_errors_supported = yes; then |
---|
1213 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` |
---|
1214 | else |
---|
1215 | $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` |
---|
1216 | fi |
---|
1217 | # Put the nasty error message in config.log where it belongs |
---|
1218 | echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD |
---|
1219 | |
---|
1220 | m4_default([$4], [AC_MSG_ERROR( |
---|
1221 | [Package requirements ($2) were not met: |
---|
1222 | |
---|
1223 | $$1_PKG_ERRORS |
---|
1224 | |
---|
1225 | Consider adjusting the PKG_CONFIG_PATH environment variable if you |
---|
1226 | installed software in a non-standard prefix. |
---|
1227 | |
---|
1228 | _PKG_TEXT])dnl |
---|
1229 | ]) |
---|
1230 | elif test $pkg_failed = untried; then |
---|
1231 | AC_MSG_RESULT([no]) |
---|
1232 | m4_default([$4], [AC_MSG_FAILURE( |
---|
1233 | [The pkg-config script could not be found or is too old. Make sure it |
---|
1234 | is in your PATH or set the PKG_CONFIG environment variable to the full |
---|
1235 | path to pkg-config. |
---|
1236 | |
---|
1237 | _PKG_TEXT |
---|
1238 | |
---|
1239 | To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl |
---|
1240 | ]) |
---|
1241 | else |
---|
1242 | $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS |
---|
1243 | $1[]_LIBS=$pkg_cv_[]$1[]_LIBS |
---|
1244 | AC_MSG_RESULT([yes]) |
---|
1245 | $3 |
---|
1246 | fi[]dnl |
---|
1247 | ])# PKG_CHECK_MODULES |
---|
1248 | |
---|
1249 | # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
---|
1250 | # |
---|
1251 | # This file is free software; the Free Software Foundation |
---|
1252 | # gives unlimited permission to copy and/or distribute it, |
---|
1253 | # with or without modifications, as long as this notice is preserved. |
---|
1254 | |
---|
1255 | # AM_AUTOMAKE_VERSION(VERSION) |
---|
1256 | # ---------------------------- |
---|
1257 | # Automake X.Y traces this macro to ensure aclocal.m4 has been |
---|
1258 | # generated from the m4 files accompanying Automake X.Y. |
---|
1259 | # (This private macro should not be called outside this file.) |
---|
1260 | AC_DEFUN([AM_AUTOMAKE_VERSION], |
---|
1261 | [am__api_version='1.11' |
---|
1262 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to |
---|
1263 | dnl require some minimum version. Point them to the right macro. |
---|
1264 | m4_if([$1], [1.11.1], [], |
---|
1265 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl |
---|
1266 | ]) |
---|
1267 | |
---|
1268 | # _AM_AUTOCONF_VERSION(VERSION) |
---|
1269 | # ----------------------------- |
---|
1270 | # aclocal traces this macro to find the Autoconf version. |
---|
1271 | # This is a private macro too. Using m4_define simplifies |
---|
1272 | # the logic in aclocal, which can simply ignore this definition. |
---|
1273 | m4_define([_AM_AUTOCONF_VERSION], []) |
---|
1274 | |
---|
1275 | # AM_SET_CURRENT_AUTOMAKE_VERSION |
---|
1276 | # ------------------------------- |
---|
1277 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. |
---|
1278 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. |
---|
1279 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
---|
1280 | [AM_AUTOMAKE_VERSION([1.11.1])dnl |
---|
1281 | m4_ifndef([AC_AUTOCONF_VERSION], |
---|
1282 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
---|
1283 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) |
---|
1284 | |
---|
1285 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- |
---|
1286 | |
---|
1287 | # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. |
---|
1288 | # |
---|
1289 | # This file is free software; the Free Software Foundation |
---|
1290 | # gives unlimited permission to copy and/or distribute it, |
---|
1291 | # with or without modifications, as long as this notice is preserved. |
---|
1292 | |
---|
1293 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets |
---|
1294 | # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to |
---|
1295 | # `$srcdir', `$srcdir/..', or `$srcdir/../..'. |
---|
1296 | # |
---|
1297 | # Of course, Automake must honor this variable whenever it calls a |
---|
1298 | # tool from the auxiliary directory. The problem is that $srcdir (and |
---|
1299 | # therefore $ac_aux_dir as well) can be either absolute or relative, |
---|
1300 | # depending on how configure is run. This is pretty annoying, since |
---|
1301 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top |
---|
1302 | # source directory, any form will work fine, but in subdirectories a |
---|
1303 | # relative path needs to be adjusted first. |
---|
1304 | # |
---|
1305 | # $ac_aux_dir/missing |
---|
1306 | # fails when called from a subdirectory if $ac_aux_dir is relative |
---|
1307 | # $top_srcdir/$ac_aux_dir/missing |
---|
1308 | # fails if $ac_aux_dir is absolute, |
---|
1309 | # fails when called from a subdirectory in a VPATH build with |
---|
1310 | # a relative $ac_aux_dir |
---|
1311 | # |
---|
1312 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir |
---|
1313 | # are both prefixed by $srcdir. In an in-source build this is usually |
---|
1314 | # harmless because $srcdir is `.', but things will broke when you |
---|
1315 | # start a VPATH build or use an absolute $srcdir. |
---|
1316 | # |
---|
1317 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, |
---|
1318 | # iff we strip the leading $srcdir from $ac_aux_dir. That would be: |
---|
1319 | # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` |
---|
1320 | # and then we would define $MISSING as |
---|
1321 | # MISSING="\${SHELL} $am_aux_dir/missing" |
---|
1322 | # This will work as long as MISSING is not called from configure, because |
---|
1323 | # unfortunately $(top_srcdir) has no meaning in configure. |
---|
1324 | # However there are other variables, like CC, which are often used in |
---|
1325 | # configure, and could therefore not use this "fixed" $ac_aux_dir. |
---|
1326 | # |
---|
1327 | # Another solution, used here, is to always expand $ac_aux_dir to an |
---|
1328 | # absolute PATH. The drawback is that using absolute paths prevent a |
---|
1329 | # configured tree to be moved without reconfiguration. |
---|
1330 | |
---|
1331 | AC_DEFUN([AM_AUX_DIR_EXPAND], |
---|
1332 | [dnl Rely on autoconf to set up CDPATH properly. |
---|
1333 | AC_PREREQ([2.50])dnl |
---|
1334 | # expand $ac_aux_dir to an absolute path |
---|
1335 | am_aux_dir=`cd $ac_aux_dir && pwd` |
---|
1336 | ]) |
---|
1337 | |
---|
1338 | # AM_CONDITIONAL -*- Autoconf -*- |
---|
1339 | |
---|
1340 | # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 |
---|
1341 | # Free Software Foundation, Inc. |
---|
1342 | # |
---|
1343 | # This file is free software; the Free Software Foundation |
---|
1344 | # gives unlimited permission to copy and/or distribute it, |
---|
1345 | # with or without modifications, as long as this notice is preserved. |
---|
1346 | |
---|
1347 | # serial 9 |
---|
1348 | |
---|
1349 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) |
---|
1350 | # ------------------------------------- |
---|
1351 | # Define a conditional. |
---|
1352 | AC_DEFUN([AM_CONDITIONAL], |
---|
1353 | [AC_PREREQ(2.52)dnl |
---|
1354 | ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], |
---|
1355 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl |
---|
1356 | AC_SUBST([$1_TRUE])dnl |
---|
1357 | AC_SUBST([$1_FALSE])dnl |
---|
1358 | _AM_SUBST_NOTMAKE([$1_TRUE])dnl |
---|
1359 | _AM_SUBST_NOTMAKE([$1_FALSE])dnl |
---|
1360 | m4_define([_AM_COND_VALUE_$1], [$2])dnl |
---|
1361 | if $2; then |
---|
1362 | $1_TRUE= |
---|
1363 | $1_FALSE='#' |
---|
1364 | else |
---|
1365 | $1_TRUE='#' |
---|
1366 | $1_FALSE= |
---|
1367 | fi |
---|
1368 | AC_CONFIG_COMMANDS_PRE( |
---|
1369 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then |
---|
1370 | AC_MSG_ERROR([[conditional "$1" was never defined. |
---|
1371 | Usually this means the macro was only invoked conditionally.]]) |
---|
1372 | fi])]) |
---|
1373 | |
---|
1374 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 |
---|
1375 | # Free Software Foundation, Inc. |
---|
1376 | # |
---|
1377 | # This file is free software; the Free Software Foundation |
---|
1378 | # gives unlimited permission to copy and/or distribute it, |
---|
1379 | # with or without modifications, as long as this notice is preserved. |
---|
1380 | |
---|
1381 | # serial 10 |
---|
1382 | |
---|
1383 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be |
---|
1384 | # written in clear, in which case automake, when reading aclocal.m4, |
---|
1385 | # will think it sees a *use*, and therefore will trigger all it's |
---|
1386 | # C support machinery. Also note that it means that autoscan, seeing |
---|
1387 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... |
---|
1388 | |
---|
1389 | |
---|
1390 | # _AM_DEPENDENCIES(NAME) |
---|
1391 | # ---------------------- |
---|
1392 | # See how the compiler implements dependency checking. |
---|
1393 | # NAME is "CC", "CXX", "GCJ", or "OBJC". |
---|
1394 | # We try a few techniques and use that to set a single cache variable. |
---|
1395 | # |
---|
1396 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was |
---|
1397 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular |
---|
1398 | # dependency, and given that the user is not expected to run this macro, |
---|
1399 | # just rely on AC_PROG_CC. |
---|
1400 | AC_DEFUN([_AM_DEPENDENCIES], |
---|
1401 | [AC_REQUIRE([AM_SET_DEPDIR])dnl |
---|
1402 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl |
---|
1403 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl |
---|
1404 | AC_REQUIRE([AM_DEP_TRACK])dnl |
---|
1405 | |
---|
1406 | ifelse([$1], CC, [depcc="$CC" am_compiler_list=], |
---|
1407 | [$1], CXX, [depcc="$CXX" am_compiler_list=], |
---|
1408 | [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], |
---|
1409 | [$1], UPC, [depcc="$UPC" am_compiler_list=], |
---|
1410 | [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], |
---|
1411 | [depcc="$$1" am_compiler_list=]) |
---|
1412 | |
---|
1413 | AC_CACHE_CHECK([dependency style of $depcc], |
---|
1414 | [am_cv_$1_dependencies_compiler_type], |
---|
1415 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then |
---|
1416 | # We make a subdir and do the tests there. Otherwise we can end up |
---|
1417 | # making bogus files that we don't know about and never remove. For |
---|
1418 | # instance it was reported that on HP-UX the gcc test will end up |
---|
1419 | # making a dummy file named `D' -- because `-MD' means `put the output |
---|
1420 | # in D'. |
---|
1421 | mkdir conftest.dir |
---|
1422 | # Copy depcomp to subdir because otherwise we won't find it if we're |
---|
1423 | # using a relative directory. |
---|
1424 | cp "$am_depcomp" conftest.dir |
---|
1425 | cd conftest.dir |
---|
1426 | # We will build objects and dependencies in a subdirectory because |
---|
1427 | # it helps to detect inapplicable dependency modes. For instance |
---|
1428 | # both Tru64's cc and ICC support -MD to output dependencies as a |
---|
1429 | # side effect of compilation, but ICC will put the dependencies in |
---|
1430 | # the current directory while Tru64 will put them in the object |
---|
1431 | # directory. |
---|
1432 | mkdir sub |
---|
1433 | |
---|
1434 | am_cv_$1_dependencies_compiler_type=none |
---|
1435 | if test "$am_compiler_list" = ""; then |
---|
1436 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` |
---|
1437 | fi |
---|
1438 | am__universal=false |
---|
1439 | m4_case([$1], [CC], |
---|
1440 | [case " $depcc " in #( |
---|
1441 | *\ -arch\ *\ -arch\ *) am__universal=true ;; |
---|
1442 | esac], |
---|
1443 | [CXX], |
---|
1444 | [case " $depcc " in #( |
---|
1445 | *\ -arch\ *\ -arch\ *) am__universal=true ;; |
---|
1446 | esac]) |
---|
1447 | |
---|
1448 | for depmode in $am_compiler_list; do |
---|
1449 | # Setup a source with many dependencies, because some compilers |
---|
1450 | # like to wrap large dependency lists on column 80 (with \), and |
---|
1451 | # we should not choose a depcomp mode which is confused by this. |
---|
1452 | # |
---|
1453 | # We need to recreate these files for each test, as the compiler may |
---|
1454 | # overwrite some of them when testing with obscure command lines. |
---|
1455 | # This happens at least with the AIX C compiler. |
---|
1456 | : > sub/conftest.c |
---|
1457 | for i in 1 2 3 4 5 6; do |
---|
1458 | echo '#include "conftst'$i'.h"' >> sub/conftest.c |
---|
1459 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with |
---|
1460 | # Solaris 8's {/usr,}/bin/sh. |
---|
1461 | touch sub/conftst$i.h |
---|
1462 | done |
---|
1463 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf |
---|
1464 | |
---|
1465 | # We check with `-c' and `-o' for the sake of the "dashmstdout" |
---|
1466 | # mode. It turns out that the SunPro C++ compiler does not properly |
---|
1467 | # handle `-M -o', and we need to detect this. Also, some Intel |
---|
1468 | # versions had trouble with output in subdirs |
---|
1469 | am__obj=sub/conftest.${OBJEXT-o} |
---|
1470 | am__minus_obj="-o $am__obj" |
---|
1471 | case $depmode in |
---|
1472 | gcc) |
---|
1473 | # This depmode causes a compiler race in universal mode. |
---|
1474 | test "$am__universal" = false || continue |
---|
1475 | ;; |
---|
1476 | nosideeffect) |
---|
1477 | # after this tag, mechanisms are not by side-effect, so they'll |
---|
1478 | # only be used when explicitly requested |
---|
1479 | if test "x$enable_dependency_tracking" = xyes; then |
---|
1480 | continue |
---|
1481 | else |
---|
1482 | break |
---|
1483 | fi |
---|
1484 | ;; |
---|
1485 | msvisualcpp | msvcmsys) |
---|
1486 | # This compiler won't grok `-c -o', but also, the minuso test has |
---|
1487 | # not run yet. These depmodes are late enough in the game, and |
---|
1488 | # so weak that their functioning should not be impacted. |
---|
1489 | am__obj=conftest.${OBJEXT-o} |
---|
1490 | am__minus_obj= |
---|
1491 | ;; |
---|
1492 | none) break ;; |
---|
1493 | esac |
---|
1494 | if depmode=$depmode \ |
---|
1495 | source=sub/conftest.c object=$am__obj \ |
---|
1496 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ |
---|
1497 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ |
---|
1498 | >/dev/null 2>conftest.err && |
---|
1499 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && |
---|
1500 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && |
---|
1501 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && |
---|
1502 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
---|
1503 | # icc doesn't choke on unknown options, it will just issue warnings |
---|
1504 | # or remarks (even with -Werror). So we grep stderr for any message |
---|
1505 | # that says an option was ignored or not supported. |
---|
1506 | # When given -MP, icc 7.0 and 7.1 complain thusly: |
---|
1507 | # icc: Command line warning: ignoring option '-M'; no argument required |
---|
1508 | # The diagnosis changed in icc 8.0: |
---|
1509 | # icc: Command line remark: option '-MP' not supported |
---|
1510 | if (grep 'ignoring option' conftest.err || |
---|
1511 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else |
---|
1512 | am_cv_$1_dependencies_compiler_type=$depmode |
---|
1513 | break |
---|
1514 | fi |
---|
1515 | fi |
---|
1516 | done |
---|
1517 | |
---|
1518 | cd .. |
---|
1519 | rm -rf conftest.dir |
---|
1520 | else |
---|
1521 | am_cv_$1_dependencies_compiler_type=none |
---|
1522 | fi |
---|
1523 | ]) |
---|
1524 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) |
---|
1525 | AM_CONDITIONAL([am__fastdep$1], [ |
---|
1526 | test "x$enable_dependency_tracking" != xno \ |
---|
1527 | && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) |
---|
1528 | ]) |
---|
1529 | |
---|
1530 | |
---|
1531 | # AM_SET_DEPDIR |
---|
1532 | # ------------- |
---|
1533 | # Choose a directory name for dependency files. |
---|
1534 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES |
---|
1535 | AC_DEFUN([AM_SET_DEPDIR], |
---|
1536 | [AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
---|
1537 | AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl |
---|
1538 | ]) |
---|
1539 | |
---|
1540 | |
---|
1541 | # AM_DEP_TRACK |
---|
1542 | # ------------ |
---|
1543 | AC_DEFUN([AM_DEP_TRACK], |
---|
1544 | [AC_ARG_ENABLE(dependency-tracking, |
---|
1545 | [ --disable-dependency-tracking speeds up one-time build |
---|
1546 | --enable-dependency-tracking do not reject slow dependency extractors]) |
---|
1547 | if test "x$enable_dependency_tracking" != xno; then |
---|
1548 | am_depcomp="$ac_aux_dir/depcomp" |
---|
1549 | AMDEPBACKSLASH='\' |
---|
1550 | fi |
---|
1551 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) |
---|
1552 | AC_SUBST([AMDEPBACKSLASH])dnl |
---|
1553 | _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl |
---|
1554 | ]) |
---|
1555 | |
---|
1556 | # Generate code to set up dependency tracking. -*- Autoconf -*- |
---|
1557 | |
---|
1558 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 |
---|
1559 | # Free Software Foundation, Inc. |
---|
1560 | # |
---|
1561 | # This file is free software; the Free Software Foundation |
---|
1562 | # gives unlimited permission to copy and/or distribute it, |
---|
1563 | # with or without modifications, as long as this notice is preserved. |
---|
1564 | |
---|
1565 | #serial 5 |
---|
1566 | |
---|
1567 | # _AM_OUTPUT_DEPENDENCY_COMMANDS |
---|
1568 | # ------------------------------ |
---|
1569 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], |
---|
1570 | [{ |
---|
1571 | # Autoconf 2.62 quotes --file arguments for eval, but not when files |
---|
1572 | # are listed without --file. Let's play safe and only enable the eval |
---|
1573 | # if we detect the quoting. |
---|
1574 | case $CONFIG_FILES in |
---|
1575 | *\'*) eval set x "$CONFIG_FILES" ;; |
---|
1576 | *) set x $CONFIG_FILES ;; |
---|
1577 | esac |
---|
1578 | shift |
---|
1579 | for mf |
---|
1580 | do |
---|
1581 | # Strip MF so we end up with the name of the file. |
---|
1582 | mf=`echo "$mf" | sed -e 's/:.*$//'` |
---|
1583 | # Check whether this is an Automake generated Makefile or not. |
---|
1584 | # We used to match only the files named `Makefile.in', but |
---|
1585 | # some people rename them; so instead we look at the file content. |
---|
1586 | # Grep'ing the first line is not enough: some people post-process |
---|
1587 | # each Makefile.in and add a new line on top of each file to say so. |
---|
1588 | # Grep'ing the whole file is not good either: AIX grep has a line |
---|
1589 | # limit of 2048, but all sed's we know have understand at least 4000. |
---|
1590 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then |
---|
1591 | dirpart=`AS_DIRNAME("$mf")` |
---|
1592 | else |
---|
1593 | continue |
---|
1594 | fi |
---|
1595 | # Extract the definition of DEPDIR, am__include, and am__quote |
---|
1596 | # from the Makefile without running `make'. |
---|
1597 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` |
---|
1598 | test -z "$DEPDIR" && continue |
---|
1599 | am__include=`sed -n 's/^am__include = //p' < "$mf"` |
---|
1600 | test -z "am__include" && continue |
---|
1601 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` |
---|
1602 | # When using ansi2knr, U may be empty or an underscore; expand it |
---|
1603 | U=`sed -n 's/^U = //p' < "$mf"` |
---|
1604 | # Find all dependency output files, they are included files with |
---|
1605 | # $(DEPDIR) in their names. We invoke sed twice because it is the |
---|
1606 | # simplest approach to changing $(DEPDIR) to its actual value in the |
---|
1607 | # expansion. |
---|
1608 | for file in `sed -n " |
---|
1609 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ |
---|
1610 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do |
---|
1611 | # Make sure the directory exists. |
---|
1612 | test -f "$dirpart/$file" && continue |
---|
1613 | fdir=`AS_DIRNAME(["$file"])` |
---|
1614 | AS_MKDIR_P([$dirpart/$fdir]) |
---|
1615 | # echo "creating $dirpart/$file" |
---|
1616 | echo '# dummy' > "$dirpart/$file" |
---|
1617 | done |
---|
1618 | done |
---|
1619 | } |
---|
1620 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS |
---|
1621 | |
---|
1622 | |
---|
1623 | # AM_OUTPUT_DEPENDENCY_COMMANDS |
---|
1624 | # ----------------------------- |
---|
1625 | # This macro should only be invoked once -- use via AC_REQUIRE. |
---|
1626 | # |
---|
1627 | # This code is only required when automatic dependency tracking |
---|
1628 | # is enabled. FIXME. This creates each `.P' file that we will |
---|
1629 | # need in order to bootstrap the dependency handling code. |
---|
1630 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], |
---|
1631 | [AC_CONFIG_COMMANDS([depfiles], |
---|
1632 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], |
---|
1633 | [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) |
---|
1634 | ]) |
---|
1635 | |
---|
1636 | # Do all the work for Automake. -*- Autoconf -*- |
---|
1637 | |
---|
1638 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
---|
1639 | # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. |
---|
1640 | # |
---|
1641 | # This file is free software; the Free Software Foundation |
---|
1642 | # gives unlimited permission to copy and/or distribute it, |
---|
1643 | # with or without modifications, as long as this notice is preserved. |
---|
1644 | |
---|
1645 | # serial 16 |
---|
1646 | |
---|
1647 | # This macro actually does too much. Some checks are only needed if |
---|
1648 | # your package does certain things. But this isn't really a big deal. |
---|
1649 | |
---|
1650 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) |
---|
1651 | # AM_INIT_AUTOMAKE([OPTIONS]) |
---|
1652 | # ----------------------------------------------- |
---|
1653 | # The call with PACKAGE and VERSION arguments is the old style |
---|
1654 | # call (pre autoconf-2.50), which is being phased out. PACKAGE |
---|
1655 | # and VERSION should now be passed to AC_INIT and removed from |
---|
1656 | # the call to AM_INIT_AUTOMAKE. |
---|
1657 | # We support both call styles for the transition. After |
---|
1658 | # the next Automake release, Autoconf can make the AC_INIT |
---|
1659 | # arguments mandatory, and then we can depend on a new Autoconf |
---|
1660 | # release and drop the old call support. |
---|
1661 | AC_DEFUN([AM_INIT_AUTOMAKE], |
---|
1662 | [AC_PREREQ([2.62])dnl |
---|
1663 | dnl Autoconf wants to disallow AM_ names. We explicitly allow |
---|
1664 | dnl the ones we care about. |
---|
1665 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl |
---|
1666 | AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
---|
1667 | AC_REQUIRE([AC_PROG_INSTALL])dnl |
---|
1668 | if test "`cd $srcdir && pwd`" != "`pwd`"; then |
---|
1669 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output |
---|
1670 | # is not polluted with repeated "-I." |
---|
1671 | AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl |
---|
1672 | # test to see if srcdir already configured |
---|
1673 | if test -f $srcdir/config.status; then |
---|
1674 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
---|
1675 | fi |
---|
1676 | fi |
---|
1677 | |
---|
1678 | # test whether we have cygpath |
---|
1679 | if test -z "$CYGPATH_W"; then |
---|
1680 | if (cygpath --version) >/dev/null 2>/dev/null; then |
---|
1681 | CYGPATH_W='cygpath -w' |
---|
1682 | else |
---|
1683 | CYGPATH_W=echo |
---|
1684 | fi |
---|
1685 | fi |
---|
1686 | AC_SUBST([CYGPATH_W]) |
---|
1687 | |
---|
1688 | # Define the identity of the package. |
---|
1689 | dnl Distinguish between old-style and new-style calls. |
---|
1690 | m4_ifval([$2], |
---|
1691 | [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl |
---|
1692 | AC_SUBST([PACKAGE], [$1])dnl |
---|
1693 | AC_SUBST([VERSION], [$2])], |
---|
1694 | [_AM_SET_OPTIONS([$1])dnl |
---|
1695 | dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. |
---|
1696 | m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, |
---|
1697 | [m4_fatal([AC_INIT should be called with package and version arguments])])dnl |
---|
1698 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl |
---|
1699 | AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl |
---|
1700 | |
---|
1701 | _AM_IF_OPTION([no-define],, |
---|
1702 | [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
---|
1703 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl |
---|
1704 | |
---|
1705 | # Some tools Automake needs. |
---|
1706 | AC_REQUIRE([AM_SANITY_CHECK])dnl |
---|
1707 | AC_REQUIRE([AC_ARG_PROGRAM])dnl |
---|
1708 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) |
---|
1709 | AM_MISSING_PROG(AUTOCONF, autoconf) |
---|
1710 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) |
---|
1711 | AM_MISSING_PROG(AUTOHEADER, autoheader) |
---|
1712 | AM_MISSING_PROG(MAKEINFO, makeinfo) |
---|
1713 | AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
---|
1714 | AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl |
---|
1715 | AC_REQUIRE([AM_PROG_MKDIR_P])dnl |
---|
1716 | # We need awk for the "check" target. The system "awk" is bad on |
---|
1717 | # some platforms. |
---|
1718 | AC_REQUIRE([AC_PROG_AWK])dnl |
---|
1719 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
---|
1720 | AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
---|
1721 | _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], |
---|
1722 | [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], |
---|
1723 | [_AM_PROG_TAR([v7])])]) |
---|
1724 | _AM_IF_OPTION([no-dependencies],, |
---|
1725 | [AC_PROVIDE_IFELSE([AC_PROG_CC], |
---|
1726 | [_AM_DEPENDENCIES(CC)], |
---|
1727 | [define([AC_PROG_CC], |
---|
1728 | defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl |
---|
1729 | AC_PROVIDE_IFELSE([AC_PROG_CXX], |
---|
1730 | [_AM_DEPENDENCIES(CXX)], |
---|
1731 | [define([AC_PROG_CXX], |
---|
1732 | defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl |
---|
1733 | AC_PROVIDE_IFELSE([AC_PROG_OBJC], |
---|
1734 | [_AM_DEPENDENCIES(OBJC)], |
---|
1735 | [define([AC_PROG_OBJC], |
---|
1736 | defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl |
---|
1737 | ]) |
---|
1738 | _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl |
---|
1739 | dnl The `parallel-tests' driver may need to know about EXEEXT, so add the |
---|
1740 | dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro |
---|
1741 | dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. |
---|
1742 | AC_CONFIG_COMMANDS_PRE(dnl |
---|
1743 | [m4_provide_if([_AM_COMPILER_EXEEXT], |
---|
1744 | [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl |
---|
1745 | ]) |
---|
1746 | |
---|
1747 | dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not |
---|
1748 | dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further |
---|
1749 | dnl mangled by Autoconf and run in a shell conditional statement. |
---|
1750 | m4_define([_AC_COMPILER_EXEEXT], |
---|
1751 | m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) |
---|
1752 | |
---|
1753 | |
---|
1754 | # When config.status generates a header, we must update the stamp-h file. |
---|
1755 | # This file resides in the same directory as the config header |
---|
1756 | # that is generated. The stamp files are numbered to have different names. |
---|
1757 | |
---|
1758 | # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the |
---|
1759 | # loop where config.status creates the headers, so we can generate |
---|
1760 | # our stamp files there. |
---|
1761 | AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], |
---|
1762 | [# Compute $1's index in $config_headers. |
---|
1763 | _am_arg=$1 |
---|
1764 | _am_stamp_count=1 |
---|
1765 | for _am_header in $config_headers :; do |
---|
1766 | case $_am_header in |
---|
1767 | $_am_arg | $_am_arg:* ) |
---|
1768 | break ;; |
---|
1769 | * ) |
---|
1770 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; |
---|
1771 | esac |
---|
1772 | done |
---|
1773 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) |
---|
1774 | |
---|
1775 | # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. |
---|
1776 | # |
---|
1777 | # This file is free software; the Free Software Foundation |
---|
1778 | # gives unlimited permission to copy and/or distribute it, |
---|
1779 | # with or without modifications, as long as this notice is preserved. |
---|
1780 | |
---|
1781 | # AM_PROG_INSTALL_SH |
---|
1782 | # ------------------ |
---|
1783 | # Define $install_sh. |
---|
1784 | AC_DEFUN([AM_PROG_INSTALL_SH], |
---|
1785 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
---|
1786 | if test x"${install_sh}" != xset; then |
---|
1787 | case $am_aux_dir in |
---|
1788 | *\ * | *\ *) |
---|
1789 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; |
---|
1790 | *) |
---|
1791 | install_sh="\${SHELL} $am_aux_dir/install-sh" |
---|
1792 | esac |
---|
1793 | fi |
---|
1794 | AC_SUBST(install_sh)]) |
---|
1795 | |
---|
1796 | # Copyright (C) 2003, 2005 Free Software Foundation, Inc. |
---|
1797 | # |
---|
1798 | # This file is free software; the Free Software Foundation |
---|
1799 | # gives unlimited permission to copy and/or distribute it, |
---|
1800 | # with or without modifications, as long as this notice is preserved. |
---|
1801 | |
---|
1802 | # serial 2 |
---|
1803 | |
---|
1804 | # Check whether the underlying file-system supports filenames |
---|
1805 | # with a leading dot. For instance MS-DOS doesn't. |
---|
1806 | AC_DEFUN([AM_SET_LEADING_DOT], |
---|
1807 | [rm -rf .tst 2>/dev/null |
---|
1808 | mkdir .tst 2>/dev/null |
---|
1809 | if test -d .tst; then |
---|
1810 | am__leading_dot=. |
---|
1811 | else |
---|
1812 | am__leading_dot=_ |
---|
1813 | fi |
---|
1814 | rmdir .tst 2>/dev/null |
---|
1815 | AC_SUBST([am__leading_dot])]) |
---|
1816 | |
---|
1817 | # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- |
---|
1818 | # From Jim Meyering |
---|
1819 | |
---|
1820 | # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 |
---|
1821 | # Free Software Foundation, Inc. |
---|
1822 | # |
---|
1823 | # This file is free software; the Free Software Foundation |
---|
1824 | # gives unlimited permission to copy and/or distribute it, |
---|
1825 | # with or without modifications, as long as this notice is preserved. |
---|
1826 | |
---|
1827 | # serial 5 |
---|
1828 | |
---|
1829 | # AM_MAINTAINER_MODE([DEFAULT-MODE]) |
---|
1830 | # ---------------------------------- |
---|
1831 | # Control maintainer-specific portions of Makefiles. |
---|
1832 | # Default is to disable them, unless `enable' is passed literally. |
---|
1833 | # For symmetry, `disable' may be passed as well. Anyway, the user |
---|
1834 | # can override the default with the --enable/--disable switch. |
---|
1835 | AC_DEFUN([AM_MAINTAINER_MODE], |
---|
1836 | [m4_case(m4_default([$1], [disable]), |
---|
1837 | [enable], [m4_define([am_maintainer_other], [disable])], |
---|
1838 | [disable], [m4_define([am_maintainer_other], [enable])], |
---|
1839 | [m4_define([am_maintainer_other], [enable]) |
---|
1840 | m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) |
---|
1841 | AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) |
---|
1842 | dnl maintainer-mode's default is 'disable' unless 'enable' is passed |
---|
1843 | AC_ARG_ENABLE([maintainer-mode], |
---|
1844 | [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful |
---|
1845 | (and sometimes confusing) to the casual installer], |
---|
1846 | [USE_MAINTAINER_MODE=$enableval], |
---|
1847 | [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) |
---|
1848 | AC_MSG_RESULT([$USE_MAINTAINER_MODE]) |
---|
1849 | AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) |
---|
1850 | MAINT=$MAINTAINER_MODE_TRUE |
---|
1851 | AC_SUBST([MAINT])dnl |
---|
1852 | ] |
---|
1853 | ) |
---|
1854 | |
---|
1855 | AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) |
---|
1856 | |
---|
1857 | # Check to see how 'make' treats includes. -*- Autoconf -*- |
---|
1858 | |
---|
1859 | # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. |
---|
1860 | # |
---|
1861 | # This file is free software; the Free Software Foundation |
---|
1862 | # gives unlimited permission to copy and/or distribute it, |
---|
1863 | # with or without modifications, as long as this notice is preserved. |
---|
1864 | |
---|
1865 | # serial 4 |
---|
1866 | |
---|
1867 | # AM_MAKE_INCLUDE() |
---|
1868 | # ----------------- |
---|
1869 | # Check to see how make treats includes. |
---|
1870 | AC_DEFUN([AM_MAKE_INCLUDE], |
---|
1871 | [am_make=${MAKE-make} |
---|
1872 | cat > confinc << 'END' |
---|
1873 | am__doit: |
---|
1874 | @echo this is the am__doit target |
---|
1875 | .PHONY: am__doit |
---|
1876 | END |
---|
1877 | # If we don't find an include directive, just comment out the code. |
---|
1878 | AC_MSG_CHECKING([for style of include used by $am_make]) |
---|
1879 | am__include="#" |
---|
1880 | am__quote= |
---|
1881 | _am_result=none |
---|
1882 | # First try GNU make style include. |
---|
1883 | echo "include confinc" > confmf |
---|
1884 | # Ignore all kinds of additional output from `make'. |
---|
1885 | case `$am_make -s -f confmf 2> /dev/null` in #( |
---|
1886 | *the\ am__doit\ target*) |
---|
1887 | am__include=include |
---|
1888 | am__quote= |
---|
1889 | _am_result=GNU |
---|
1890 | ;; |
---|
1891 | esac |
---|
1892 | # Now try BSD make style include. |
---|
1893 | if test "$am__include" = "#"; then |
---|
1894 | echo '.include "confinc"' > confmf |
---|
1895 | case `$am_make -s -f confmf 2> /dev/null` in #( |
---|
1896 | *the\ am__doit\ target*) |
---|
1897 | am__include=.include |
---|
1898 | am__quote="\"" |
---|
1899 | _am_result=BSD |
---|
1900 | ;; |
---|
1901 | esac |
---|
1902 | fi |
---|
1903 | AC_SUBST([am__include]) |
---|
1904 | AC_SUBST([am__quote]) |
---|
1905 | AC_MSG_RESULT([$_am_result]) |
---|
1906 | rm -f confinc confmf |
---|
1907 | ]) |
---|
1908 | |
---|
1909 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- |
---|
1910 | |
---|
1911 | # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 |
---|
1912 | # Free Software Foundation, Inc. |
---|
1913 | # |
---|
1914 | # This file is free software; the Free Software Foundation |
---|
1915 | # gives unlimited permission to copy and/or distribute it, |
---|
1916 | # with or without modifications, as long as this notice is preserved. |
---|
1917 | |
---|
1918 | # serial 6 |
---|
1919 | |
---|
1920 | # AM_MISSING_PROG(NAME, PROGRAM) |
---|
1921 | # ------------------------------ |
---|
1922 | AC_DEFUN([AM_MISSING_PROG], |
---|
1923 | [AC_REQUIRE([AM_MISSING_HAS_RUN]) |
---|
1924 | $1=${$1-"${am_missing_run}$2"} |
---|
1925 | AC_SUBST($1)]) |
---|
1926 | |
---|
1927 | |
---|
1928 | # AM_MISSING_HAS_RUN |
---|
1929 | # ------------------ |
---|
1930 | # Define MISSING if not defined so far and test if it supports --run. |
---|
1931 | # If it does, set am_missing_run to use it, otherwise, to nothing. |
---|
1932 | AC_DEFUN([AM_MISSING_HAS_RUN], |
---|
1933 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
---|
1934 | AC_REQUIRE_AUX_FILE([missing])dnl |
---|
1935 | if test x"${MISSING+set}" != xset; then |
---|
1936 | case $am_aux_dir in |
---|
1937 | *\ * | *\ *) |
---|
1938 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; |
---|
1939 | *) |
---|
1940 | MISSING="\${SHELL} $am_aux_dir/missing" ;; |
---|
1941 | esac |
---|
1942 | fi |
---|
1943 | # Use eval to expand $SHELL |
---|
1944 | if eval "$MISSING --run true"; then |
---|
1945 | am_missing_run="$MISSING --run " |
---|
1946 | else |
---|
1947 | am_missing_run= |
---|
1948 | AC_MSG_WARN([`missing' script is too old or missing]) |
---|
1949 | fi |
---|
1950 | ]) |
---|
1951 | |
---|
1952 | # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
---|
1953 | # |
---|
1954 | # This file is free software; the Free Software Foundation |
---|
1955 | # gives unlimited permission to copy and/or distribute it, |
---|
1956 | # with or without modifications, as long as this notice is preserved. |
---|
1957 | |
---|
1958 | # AM_PROG_MKDIR_P |
---|
1959 | # --------------- |
---|
1960 | # Check for `mkdir -p'. |
---|
1961 | AC_DEFUN([AM_PROG_MKDIR_P], |
---|
1962 | [AC_PREREQ([2.60])dnl |
---|
1963 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl |
---|
1964 | dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, |
---|
1965 | dnl while keeping a definition of mkdir_p for backward compatibility. |
---|
1966 | dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. |
---|
1967 | dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of |
---|
1968 | dnl Makefile.ins that do not define MKDIR_P, so we do our own |
---|
1969 | dnl adjustment using top_builddir (which is defined more often than |
---|
1970 | dnl MKDIR_P). |
---|
1971 | AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl |
---|
1972 | case $mkdir_p in |
---|
1973 | [[\\/$]]* | ?:[[\\/]]*) ;; |
---|
1974 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; |
---|
1975 | esac |
---|
1976 | ]) |
---|
1977 | |
---|
1978 | # Helper functions for option handling. -*- Autoconf -*- |
---|
1979 | |
---|
1980 | # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. |
---|
1981 | # |
---|
1982 | # This file is free software; the Free Software Foundation |
---|
1983 | # gives unlimited permission to copy and/or distribute it, |
---|
1984 | # with or without modifications, as long as this notice is preserved. |
---|
1985 | |
---|
1986 | # serial 4 |
---|
1987 | |
---|
1988 | # _AM_MANGLE_OPTION(NAME) |
---|
1989 | # ----------------------- |
---|
1990 | AC_DEFUN([_AM_MANGLE_OPTION], |
---|
1991 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) |
---|
1992 | |
---|
1993 | # _AM_SET_OPTION(NAME) |
---|
1994 | # ------------------------------ |
---|
1995 | # Set option NAME. Presently that only means defining a flag for this option. |
---|
1996 | AC_DEFUN([_AM_SET_OPTION], |
---|
1997 | [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) |
---|
1998 | |
---|
1999 | # _AM_SET_OPTIONS(OPTIONS) |
---|
2000 | # ---------------------------------- |
---|
2001 | # OPTIONS is a space-separated list of Automake options. |
---|
2002 | AC_DEFUN([_AM_SET_OPTIONS], |
---|
2003 | [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) |
---|
2004 | |
---|
2005 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) |
---|
2006 | # ------------------------------------------- |
---|
2007 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. |
---|
2008 | AC_DEFUN([_AM_IF_OPTION], |
---|
2009 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
---|
2010 | |
---|
2011 | # Check to make sure that the build environment is sane. -*- Autoconf -*- |
---|
2012 | |
---|
2013 | # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 |
---|
2014 | # Free Software Foundation, Inc. |
---|
2015 | # |
---|
2016 | # This file is free software; the Free Software Foundation |
---|
2017 | # gives unlimited permission to copy and/or distribute it, |
---|
2018 | # with or without modifications, as long as this notice is preserved. |
---|
2019 | |
---|
2020 | # serial 5 |
---|
2021 | |
---|
2022 | # AM_SANITY_CHECK |
---|
2023 | # --------------- |
---|
2024 | AC_DEFUN([AM_SANITY_CHECK], |
---|
2025 | [AC_MSG_CHECKING([whether build environment is sane]) |
---|
2026 | # Just in case |
---|
2027 | sleep 1 |
---|
2028 | echo timestamp > conftest.file |
---|
2029 | # Reject unsafe characters in $srcdir or the absolute working directory |
---|
2030 | # name. Accept space and tab only in the latter. |
---|
2031 | am_lf=' |
---|
2032 | ' |
---|
2033 | case `pwd` in |
---|
2034 | *[[\\\"\#\$\&\'\`$am_lf]]*) |
---|
2035 | AC_MSG_ERROR([unsafe absolute working directory name]);; |
---|
2036 | esac |
---|
2037 | case $srcdir in |
---|
2038 | *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) |
---|
2039 | AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; |
---|
2040 | esac |
---|
2041 | |
---|
2042 | # Do `set' in a subshell so we don't clobber the current shell's |
---|
2043 | # arguments. Must try -L first in case configure is actually a |
---|
2044 | # symlink; some systems play weird games with the mod time of symlinks |
---|
2045 | # (eg FreeBSD returns the mod time of the symlink's containing |
---|
2046 | # directory). |
---|
2047 | if ( |
---|
2048 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` |
---|
2049 | if test "$[*]" = "X"; then |
---|
2050 | # -L didn't work. |
---|
2051 | set X `ls -t "$srcdir/configure" conftest.file` |
---|
2052 | fi |
---|
2053 | rm -f conftest.file |
---|
2054 | if test "$[*]" != "X $srcdir/configure conftest.file" \ |
---|
2055 | && test "$[*]" != "X conftest.file $srcdir/configure"; then |
---|
2056 | |
---|
2057 | # If neither matched, then we have a broken ls. This can happen |
---|
2058 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
---|
2059 | # broken ls alias from the environment. This has actually |
---|
2060 | # happened. Such a system could not be considered "sane". |
---|
2061 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
---|
2062 | alias in your environment]) |
---|
2063 | fi |
---|
2064 | |
---|
2065 | test "$[2]" = conftest.file |
---|
2066 | ) |
---|
2067 | then |
---|
2068 | # Ok. |
---|
2069 | : |
---|
2070 | else |
---|
2071 | AC_MSG_ERROR([newly created file is older than distributed files! |
---|
2072 | Check your system clock]) |
---|
2073 | fi |
---|
2074 | AC_MSG_RESULT(yes)]) |
---|
2075 | |
---|
2076 | # Copyright (C) 2009 Free Software Foundation, Inc. |
---|
2077 | # |
---|
2078 | # This file is free software; the Free Software Foundation |
---|
2079 | # gives unlimited permission to copy and/or distribute it, |
---|
2080 | # with or without modifications, as long as this notice is preserved. |
---|
2081 | |
---|
2082 | # serial 1 |
---|
2083 | |
---|
2084 | # AM_SILENT_RULES([DEFAULT]) |
---|
2085 | # -------------------------- |
---|
2086 | # Enable less verbose build rules; with the default set to DEFAULT |
---|
2087 | # (`yes' being less verbose, `no' or empty being verbose). |
---|
2088 | AC_DEFUN([AM_SILENT_RULES], |
---|
2089 | [AC_ARG_ENABLE([silent-rules], |
---|
2090 | [ --enable-silent-rules less verbose build output (undo: `make V=1') |
---|
2091 | --disable-silent-rules verbose build output (undo: `make V=0')]) |
---|
2092 | case $enable_silent_rules in |
---|
2093 | yes) AM_DEFAULT_VERBOSITY=0;; |
---|
2094 | no) AM_DEFAULT_VERBOSITY=1;; |
---|
2095 | *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; |
---|
2096 | esac |
---|
2097 | AC_SUBST([AM_DEFAULT_VERBOSITY])dnl |
---|
2098 | AM_BACKSLASH='\' |
---|
2099 | AC_SUBST([AM_BACKSLASH])dnl |
---|
2100 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl |
---|
2101 | ]) |
---|
2102 | |
---|
2103 | # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. |
---|
2104 | # |
---|
2105 | # This file is free software; the Free Software Foundation |
---|
2106 | # gives unlimited permission to copy and/or distribute it, |
---|
2107 | # with or without modifications, as long as this notice is preserved. |
---|
2108 | |
---|
2109 | # AM_PROG_INSTALL_STRIP |
---|
2110 | # --------------------- |
---|
2111 | # One issue with vendor `install' (even GNU) is that you can't |
---|
2112 | # specify the program used to strip binaries. This is especially |
---|
2113 | # annoying in cross-compiling environments, where the build's strip |
---|
2114 | # is unlikely to handle the host's binaries. |
---|
2115 | # Fortunately install-sh will honor a STRIPPROG variable, so we |
---|
2116 | # always use install-sh in `make install-strip', and initialize |
---|
2117 | # STRIPPROG with the value of the STRIP variable (set by the user). |
---|
2118 | AC_DEFUN([AM_PROG_INSTALL_STRIP], |
---|
2119 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
---|
2120 | # Installed binaries are usually stripped using `strip' when the user |
---|
2121 | # run `make install-strip'. However `strip' might not be the right |
---|
2122 | # tool to use in cross-compilation environments, therefore Automake |
---|
2123 | # will honor the `STRIP' environment variable to overrule this program. |
---|
2124 | dnl Don't test for $cross_compiling = yes, because it might be `maybe'. |
---|
2125 | if test "$cross_compiling" != no; then |
---|
2126 | AC_CHECK_TOOL([STRIP], [strip], :) |
---|
2127 | fi |
---|
2128 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
---|
2129 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
---|
2130 | |
---|
2131 | # Copyright (C) 2006, 2008 Free Software Foundation, Inc. |
---|
2132 | # |
---|
2133 | # This file is free software; the Free Software Foundation |
---|
2134 | # gives unlimited permission to copy and/or distribute it, |
---|
2135 | # with or without modifications, as long as this notice is preserved. |
---|
2136 | |
---|
2137 | # serial 2 |
---|
2138 | |
---|
2139 | # _AM_SUBST_NOTMAKE(VARIABLE) |
---|
2140 | # --------------------------- |
---|
2141 | # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. |
---|
2142 | # This macro is traced by Automake. |
---|
2143 | AC_DEFUN([_AM_SUBST_NOTMAKE]) |
---|
2144 | |
---|
2145 | # AM_SUBST_NOTMAKE(VARIABLE) |
---|
2146 | # --------------------------- |
---|
2147 | # Public sister of _AM_SUBST_NOTMAKE. |
---|
2148 | AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) |
---|
2149 | |
---|
2150 | # Check how to create a tarball. -*- Autoconf -*- |
---|
2151 | |
---|
2152 | # Copyright (C) 2004, 2005 Free Software Foundation, Inc. |
---|
2153 | # |
---|
2154 | # This file is free software; the Free Software Foundation |
---|
2155 | # gives unlimited permission to copy and/or distribute it, |
---|
2156 | # with or without modifications, as long as this notice is preserved. |
---|
2157 | |
---|
2158 | # serial 2 |
---|
2159 | |
---|
2160 | # _AM_PROG_TAR(FORMAT) |
---|
2161 | # -------------------- |
---|
2162 | # Check how to create a tarball in format FORMAT. |
---|
2163 | # FORMAT should be one of `v7', `ustar', or `pax'. |
---|
2164 | # |
---|
2165 | # Substitute a variable $(am__tar) that is a command |
---|
2166 | # writing to stdout a FORMAT-tarball containing the directory |
---|
2167 | # $tardir. |
---|
2168 | # tardir=directory && $(am__tar) > result.tar |
---|
2169 | # |
---|
2170 | # Substitute a variable $(am__untar) that extract such |
---|
2171 | # a tarball read from stdin. |
---|
2172 | # $(am__untar) < result.tar |
---|
2173 | AC_DEFUN([_AM_PROG_TAR], |
---|
2174 | [# Always define AMTAR for backward compatibility. |
---|
2175 | AM_MISSING_PROG([AMTAR], [tar]) |
---|
2176 | m4_if([$1], [v7], |
---|
2177 | [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], |
---|
2178 | [m4_case([$1], [ustar],, [pax],, |
---|
2179 | [m4_fatal([Unknown tar format])]) |
---|
2180 | AC_MSG_CHECKING([how to create a $1 tar archive]) |
---|
2181 | # Loop over all known methods to create a tar archive until one works. |
---|
2182 | _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' |
---|
2183 | _am_tools=${am_cv_prog_tar_$1-$_am_tools} |
---|
2184 | # Do not fold the above two line into one, because Tru64 sh and |
---|
2185 | # Solaris sh will not grok spaces in the rhs of `-'. |
---|
2186 | for _am_tool in $_am_tools |
---|
2187 | do |
---|
2188 | case $_am_tool in |
---|
2189 | gnutar) |
---|
2190 | for _am_tar in tar gnutar gtar; |
---|
2191 | do |
---|
2192 | AM_RUN_LOG([$_am_tar --version]) && break |
---|
2193 | done |
---|
2194 | am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' |
---|
2195 | am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' |
---|
2196 | am__untar="$_am_tar -xf -" |
---|
2197 | ;; |
---|
2198 | plaintar) |
---|
2199 | # Must skip GNU tar: if it does not support --format= it doesn't create |
---|
2200 | # ustar tarball either. |
---|
2201 | (tar --version) >/dev/null 2>&1 && continue |
---|
2202 | am__tar='tar chf - "$$tardir"' |
---|
2203 | am__tar_='tar chf - "$tardir"' |
---|
2204 | am__untar='tar xf -' |
---|
2205 | ;; |
---|
2206 | pax) |
---|
2207 | am__tar='pax -L -x $1 -w "$$tardir"' |
---|
2208 | am__tar_='pax -L -x $1 -w "$tardir"' |
---|
2209 | am__untar='pax -r' |
---|
2210 | ;; |
---|
2211 | cpio) |
---|
2212 | am__tar='find "$$tardir" -print | cpio -o -H $1 -L' |
---|
2213 | am__tar_='find "$tardir" -print | cpio -o -H $1 -L' |
---|
2214 | am__untar='cpio -i -H $1 -d' |
---|
2215 | ;; |
---|
2216 | none) |
---|
2217 | am__tar=false |
---|
2218 | am__tar_=false |
---|
2219 | am__untar=false |
---|
2220 | ;; |
---|
2221 | esac |
---|
2222 | |
---|
2223 | # If the value was cached, stop now. We just wanted to have am__tar |
---|
2224 | # and am__untar set. |
---|
2225 | test -n "${am_cv_prog_tar_$1}" && break |
---|
2226 | |
---|
2227 | # tar/untar a dummy directory, and stop if the command works |
---|
2228 | rm -rf conftest.dir |
---|
2229 | mkdir conftest.dir |
---|
2230 | echo GrepMe > conftest.dir/file |
---|
2231 | AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) |
---|
2232 | rm -rf conftest.dir |
---|
2233 | if test -s conftest.tar; then |
---|
2234 | AM_RUN_LOG([$am__untar <conftest.tar]) |
---|
2235 | grep GrepMe conftest.dir/file >/dev/null 2>&1 && break |
---|
2236 | fi |
---|
2237 | done |
---|
2238 | rm -rf conftest.dir |
---|
2239 | |
---|
2240 | AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) |
---|
2241 | AC_MSG_RESULT([$am_cv_prog_tar_$1])]) |
---|
2242 | AC_SUBST([am__tar]) |
---|
2243 | AC_SUBST([am__untar]) |
---|
2244 | ]) # _AM_PROG_TAR |
---|
2245 | |
---|
2246 | # Autoconf support for the Vala compiler |
---|
2247 | |
---|
2248 | # Copyright (C) 2008, 2009 Free Software Foundation, Inc. |
---|
2249 | # |
---|
2250 | # This file is free software; the Free Software Foundation |
---|
2251 | # gives unlimited permission to copy and/or distribute it, |
---|
2252 | # with or without modifications, as long as this notice is preserved. |
---|
2253 | |
---|
2254 | # serial 4 |
---|
2255 | |
---|
2256 | # Check whether the Vala compiler exists in `PATH'. If it is found, the |
---|
2257 | # variable VALAC is set. Optionally a minimum release number of the |
---|
2258 | # compiler can be requested. |
---|
2259 | # |
---|
2260 | # AM_PROG_VALAC([MINIMUM-VERSION]) |
---|
2261 | # -------------------------------- |
---|
2262 | AC_DEFUN([AM_PROG_VALAC], |
---|
2263 | [AC_PATH_PROG([VALAC], [valac], []) |
---|
2264 | AS_IF([test -z "$VALAC"], |
---|
2265 | [AC_MSG_WARN([No Vala compiler found. You will not be able to compile .vala source files.])], |
---|
2266 | [AS_IF([test -n "$1"], |
---|
2267 | [AC_MSG_CHECKING([$VALAC is at least version $1]) |
---|
2268 | am__vala_version=`$VALAC --version | sed 's/Vala *//'` |
---|
2269 | AS_VERSION_COMPARE([$1], ["$am__vala_version"], |
---|
2270 | [AC_MSG_RESULT([yes])], |
---|
2271 | [AC_MSG_RESULT([yes])], |
---|
2272 | [AC_MSG_RESULT([no]) |
---|
2273 | AC_MSG_ERROR([Vala $1 not found.])])])]) |
---|
2274 | ]) |
---|
2275 | |
---|