Adding upstream version 0.5.10.
[debian/lxpanel.git] / aclocal.m4
CommitLineData
eea54180 1# generated automatically by aclocal 1.11.5 -*- Autoconf -*-
6cc5e1a6
DB
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
514580cf
DB
4# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
5# Inc.
6cc5e1a6
DB
6# This file is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13# PARTICULAR PURPOSE.
14
39c13576
DB
15m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
eea54180
DB
17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18[m4_warning([this file was generated for autoconf 2.69.
39c13576
DB
19You have another version of autoconf. It may work, but is not guaranteed to.
20If you have problems, you may need to regenerate the build system entirely.
21To do so, use the procedure documented by the package, typically `autoreconf'.])])
6cc5e1a6 22
4652f59b
DB
23# gettext.m4 serial 63 (gettext-0.18)
24dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
6cc5e1a6
DB
25dnl This file is free software; the Free Software Foundation
26dnl gives unlimited permission to copy and/or distribute it,
27dnl with or without modifications, as long as this notice is preserved.
28dnl
29dnl This file can can be used in projects which are not available under
30dnl the GNU General Public License or the GNU Library General Public
31dnl License but which still want to provide support for the GNU gettext
32dnl functionality.
33dnl Please note that the actual code of the GNU gettext library is covered
34dnl by the GNU Library General Public License, and the rest of the GNU
35dnl gettext package package is covered by the GNU General Public License.
36dnl They are *not* in the public domain.
37
38dnl Authors:
39dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
4652f59b 40dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
6cc5e1a6
DB
41
42dnl Macro to add for using GNU gettext.
43
44dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
45dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
46dnl default (if it is not specified or empty) is 'no-libtool'.
47dnl INTLSYMBOL should be 'external' for packages with no intl directory,
48dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
49dnl If INTLSYMBOL is 'use-libtool', then a libtool library
50dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
51dnl depending on --{enable,disable}-{shared,static} and on the presence of
52dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
53dnl $(top_builddir)/intl/libintl.a will be created.
54dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
55dnl implementations (in libc or libintl) without the ngettext() function
56dnl will be ignored. If NEEDSYMBOL is specified and is
57dnl 'need-formatstring-macros', then GNU gettext implementations that don't
58dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
59dnl INTLDIR is used to find the intl libraries. If empty,
60dnl the value `$(top_builddir)/intl/' is used.
61dnl
62dnl The result of the configuration is one of three cases:
63dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
64dnl and used.
65dnl Catalog format: GNU --> install in $(datadir)
66dnl Catalog extension: .mo after installation, .gmo in source tree
67dnl 2) GNU gettext has been found in the system's C library.
68dnl Catalog format: GNU --> install in $(datadir)
69dnl Catalog extension: .mo after installation, .gmo in source tree
70dnl 3) No internationalization, always use English msgid.
71dnl Catalog format: none
72dnl Catalog extension: none
73dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
74dnl The use of .gmo is historical (it was needed to avoid overwriting the
75dnl GNU format catalogs when building on a platform with an X/Open gettext),
76dnl but we keep it in order not to force irrelevant filename changes on the
77dnl maintainers.
78dnl
79AC_DEFUN([AM_GNU_GETTEXT],
80[
81 dnl Argument checking.
82 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
83 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
84])])])])])
4652f59b
DB
85 ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
86 [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
6cc5e1a6
DB
87 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
88 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
89])])])])
90 define([gt_included_intl],
91 ifelse([$1], [external],
92 ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
93 [yes]))
94 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
95 gt_NEEDS_INIT
96 AM_GNU_GETTEXT_NEED([$2])
97
98 AC_REQUIRE([AM_PO_SUBDIRS])dnl
99 ifelse(gt_included_intl, yes, [
100 AC_REQUIRE([AM_INTL_SUBDIR])dnl
101 ])
102
103 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
104 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
105 AC_REQUIRE([AC_LIB_RPATH])
106
107 dnl Sometimes libintl requires libiconv, so first search for libiconv.
108 dnl Ideally we would do this search only after the
109 dnl if test "$USE_NLS" = "yes"; then
110 dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
111 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
112 dnl the configure script would need to contain the same shell code
113 dnl again, outside any 'if'. There are two solutions:
114 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
115 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
116 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
117 dnl documented, we avoid it.
118 ifelse(gt_included_intl, yes, , [
119 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
120 ])
121
122 dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
123 gt_INTL_MACOSX
124
125 dnl Set USE_NLS.
126 AC_REQUIRE([AM_NLS])
127
128 ifelse(gt_included_intl, yes, [
129 BUILD_INCLUDED_LIBINTL=no
130 USE_INCLUDED_LIBINTL=no
131 ])
132 LIBINTL=
133 LTLIBINTL=
134 POSUB=
135
136 dnl Add a version number to the cache macros.
137 case " $gt_needs " in
138 *" need-formatstring-macros "*) gt_api_version=3 ;;
139 *" need-ngettext "*) gt_api_version=2 ;;
140 *) gt_api_version=1 ;;
141 esac
142 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
143 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
144
145 dnl If we use NLS figure out what method
146 if test "$USE_NLS" = "yes"; then
147 gt_use_preinstalled_gnugettext=no
148 ifelse(gt_included_intl, yes, [
149 AC_MSG_CHECKING([whether included gettext is requested])
4652f59b 150 AC_ARG_WITH([included-gettext],
6cc5e1a6
DB
151 [ --with-included-gettext use the GNU gettext library included here],
152 nls_cv_force_use_gnu_gettext=$withval,
153 nls_cv_force_use_gnu_gettext=no)
4652f59b 154 AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
6cc5e1a6
DB
155
156 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
157 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
158 ])
159 dnl User does not insist on using GNU NLS library. Figure out what
160 dnl to use. If GNU gettext is available we use this. Else we have
161 dnl to fall back to GNU NLS library.
162
163 if test $gt_api_version -ge 3; then
164 gt_revision_test_code='
165#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
166#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
167#endif
168changequote(,)dnl
169typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
170changequote([,])dnl
171'
172 else
173 gt_revision_test_code=
174 fi
175 if test $gt_api_version -ge 2; then
176 gt_expression_test_code=' + * ngettext ("", "", 0)'
177 else
178 gt_expression_test_code=
179 fi
180
181 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
182 [AC_TRY_LINK([#include <libintl.h>
183$gt_revision_test_code
184extern int _nl_msg_cat_cntr;
185extern int *_nl_domain_bindings;],
186 [bindtextdomain ("", "");
187return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
188 [eval "$gt_func_gnugettext_libc=yes"],
189 [eval "$gt_func_gnugettext_libc=no"])])
190
191 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
192 dnl Sometimes libintl requires libiconv, so first search for libiconv.
193 ifelse(gt_included_intl, yes, , [
194 AM_ICONV_LINK
195 ])
196 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
197 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
198 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
199 dnl even if libiconv doesn't exist.
200 AC_LIB_LINKFLAGS_BODY([intl])
201 AC_CACHE_CHECK([for GNU gettext in libintl],
202 [$gt_func_gnugettext_libintl],
203 [gt_save_CPPFLAGS="$CPPFLAGS"
204 CPPFLAGS="$CPPFLAGS $INCINTL"
205 gt_save_LIBS="$LIBS"
206 LIBS="$LIBS $LIBINTL"
207 dnl Now see whether libintl exists and does not depend on libiconv.
208 AC_TRY_LINK([#include <libintl.h>
209$gt_revision_test_code
210extern int _nl_msg_cat_cntr;
211extern
212#ifdef __cplusplus
213"C"
214#endif
215const char *_nl_expand_alias (const char *);],
216 [bindtextdomain ("", "");
217return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
218 [eval "$gt_func_gnugettext_libintl=yes"],
219 [eval "$gt_func_gnugettext_libintl=no"])
220 dnl Now see whether libintl exists and depends on libiconv.
221 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
222 LIBS="$LIBS $LIBICONV"
223 AC_TRY_LINK([#include <libintl.h>
224$gt_revision_test_code
225extern int _nl_msg_cat_cntr;
226extern
227#ifdef __cplusplus
228"C"
229#endif
230const char *_nl_expand_alias (const char *);],
231 [bindtextdomain ("", "");
232return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
233 [LIBINTL="$LIBINTL $LIBICONV"
234 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
235 eval "$gt_func_gnugettext_libintl=yes"
236 ])
237 fi
238 CPPFLAGS="$gt_save_CPPFLAGS"
239 LIBS="$gt_save_LIBS"])
240 fi
241
242 dnl If an already present or preinstalled GNU gettext() is found,
243 dnl use it. But if this macro is used in GNU gettext, and GNU
244 dnl gettext is already preinstalled in libintl, we update this
245 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
246 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
247 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
248 && test "$PACKAGE" != gettext-runtime \
249 && test "$PACKAGE" != gettext-tools; }; then
250 gt_use_preinstalled_gnugettext=yes
251 else
252 dnl Reset the values set by searching for libintl.
253 LIBINTL=
254 LTLIBINTL=
255 INCINTL=
256 fi
257
258 ifelse(gt_included_intl, yes, [
259 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
260 dnl GNU gettext is not found in the C library.
261 dnl Fall back on included GNU gettext library.
262 nls_cv_use_gnu_gettext=yes
263 fi
264 fi
265
266 if test "$nls_cv_use_gnu_gettext" = "yes"; then
267 dnl Mark actions used to generate GNU NLS library.
268 BUILD_INCLUDED_LIBINTL=yes
269 USE_INCLUDED_LIBINTL=yes
270 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
271 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
272 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
273 fi
274
275 CATOBJEXT=
276 if test "$gt_use_preinstalled_gnugettext" = "yes" \
277 || test "$nls_cv_use_gnu_gettext" = "yes"; then
278 dnl Mark actions to use GNU gettext tools.
279 CATOBJEXT=.gmo
280 fi
281 ])
282
283 if test -n "$INTL_MACOSX_LIBS"; then
284 if test "$gt_use_preinstalled_gnugettext" = "yes" \
285 || test "$nls_cv_use_gnu_gettext" = "yes"; then
286 dnl Some extra flags are needed during linking.
287 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
288 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
289 fi
290 fi
291
292 if test "$gt_use_preinstalled_gnugettext" = "yes" \
293 || test "$nls_cv_use_gnu_gettext" = "yes"; then
4652f59b 294 AC_DEFINE([ENABLE_NLS], [1],
6cc5e1a6
DB
295 [Define to 1 if translation of program messages to the user's native language
296 is requested.])
297 else
298 USE_NLS=no
299 fi
300 fi
301
302 AC_MSG_CHECKING([whether to use NLS])
303 AC_MSG_RESULT([$USE_NLS])
304 if test "$USE_NLS" = "yes"; then
305 AC_MSG_CHECKING([where the gettext function comes from])
306 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
307 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
308 gt_source="external libintl"
309 else
310 gt_source="libc"
311 fi
312 else
313 gt_source="included intl directory"
314 fi
315 AC_MSG_RESULT([$gt_source])
316 fi
317
318 if test "$USE_NLS" = "yes"; then
319
320 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
321 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
322 AC_MSG_CHECKING([how to link with libintl])
323 AC_MSG_RESULT([$LIBINTL])
324 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
325 fi
326
327 dnl For backward compatibility. Some packages may be using this.
4652f59b 328 AC_DEFINE([HAVE_GETTEXT], [1],
6cc5e1a6 329 [Define if the GNU gettext() function is already present or preinstalled.])
4652f59b 330 AC_DEFINE([HAVE_DCGETTEXT], [1],
6cc5e1a6
DB
331 [Define if the GNU dcgettext() function is already present or preinstalled.])
332 fi
333
334 dnl We need to process the po/ directory.
335 POSUB=po
336 fi
337
338 ifelse(gt_included_intl, yes, [
339 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
340 dnl to 'yes' because some of the testsuite requires it.
341 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
342 BUILD_INCLUDED_LIBINTL=yes
343 fi
344
345 dnl Make all variables we use known to autoconf.
4652f59b
DB
346 AC_SUBST([BUILD_INCLUDED_LIBINTL])
347 AC_SUBST([USE_INCLUDED_LIBINTL])
348 AC_SUBST([CATOBJEXT])
6cc5e1a6
DB
349
350 dnl For backward compatibility. Some configure.ins may be using this.
351 nls_cv_header_intl=
352 nls_cv_header_libgt=
353
354 dnl For backward compatibility. Some Makefiles may be using this.
355 DATADIRNAME=share
4652f59b 356 AC_SUBST([DATADIRNAME])
6cc5e1a6
DB
357
358 dnl For backward compatibility. Some Makefiles may be using this.
359 INSTOBJEXT=.mo
4652f59b 360 AC_SUBST([INSTOBJEXT])
6cc5e1a6
DB
361
362 dnl For backward compatibility. Some Makefiles may be using this.
363 GENCAT=gencat
4652f59b 364 AC_SUBST([GENCAT])
6cc5e1a6
DB
365
366 dnl For backward compatibility. Some Makefiles may be using this.
367 INTLOBJS=
368 if test "$USE_INCLUDED_LIBINTL" = yes; then
369 INTLOBJS="\$(GETTOBJS)"
370 fi
4652f59b 371 AC_SUBST([INTLOBJS])
6cc5e1a6
DB
372
373 dnl Enable libtool support if the surrounding package wishes it.
374 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
4652f59b 375 AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
6cc5e1a6
DB
376 ])
377
378 dnl For backward compatibility. Some Makefiles may be using this.
379 INTLLIBS="$LIBINTL"
4652f59b 380 AC_SUBST([INTLLIBS])
6cc5e1a6
DB
381
382 dnl Make all documented variables known to autoconf.
4652f59b
DB
383 AC_SUBST([LIBINTL])
384 AC_SUBST([LTLIBINTL])
385 AC_SUBST([POSUB])
6cc5e1a6
DB
386])
387
388
389dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
390m4_define([gt_NEEDS_INIT],
391[
392 m4_divert_text([DEFAULTS], [gt_needs=])
393 m4_define([gt_NEEDS_INIT], [])
394])
395
396
397dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
398AC_DEFUN([AM_GNU_GETTEXT_NEED],
399[
400 m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
401])
402
403
404dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
405AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
406
407# Copyright (C) 1995-2002 Free Software Foundation, Inc.
408# Copyright (C) 2001-2003,2004 Red Hat, Inc.
409#
410# This file is free software, distributed under the terms of the GNU
411# General Public License. As a special exception to the GNU General
412# Public License, this file may be distributed as part of a program
413# that contains a configuration script generated by Autoconf, under
414# the same distribution terms as the rest of that program.
415#
416# This file can be copied and used freely without restrictions. It can
417# be used in projects which are not available under the GNU Public License
418# but which still want to provide support for the GNU gettext functionality.
419#
420# Macro to add for using GNU gettext.
421# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
422#
423# Modified to never use included libintl.
424# Owen Taylor <otaylor@redhat.com>, 12/15/1998
425#
426# Major rework to remove unused code
427# Owen Taylor <otaylor@redhat.com>, 12/11/2002
428#
429# Added better handling of ALL_LINGUAS from GNU gettext version
430# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
431#
432# Modified to require ngettext
433# Matthias Clasen <mclasen@redhat.com> 08/06/2004
434#
435# We need this here as well, since someone might use autoconf-2.5x
436# to configure GLib then an older version to configure a package
437# using AM_GLIB_GNU_GETTEXT
438AC_PREREQ(2.53)
439
440dnl
441dnl We go to great lengths to make sure that aclocal won't
442dnl try to pull in the installed version of these macros
443dnl when running aclocal in the glib directory.
444dnl
445m4_copy([AC_DEFUN],[glib_DEFUN])
446m4_copy([AC_REQUIRE],[glib_REQUIRE])
447dnl
448dnl At the end, if we're not within glib, we'll define the public
449dnl definitions in terms of our private definitions.
450dnl
451
452# GLIB_LC_MESSAGES
453#--------------------
454glib_DEFUN([GLIB_LC_MESSAGES],
455 [AC_CHECK_HEADERS([locale.h])
456 if test $ac_cv_header_locale_h = yes; then
457 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
458 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
459 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
460 if test $am_cv_val_LC_MESSAGES = yes; then
461 AC_DEFINE(HAVE_LC_MESSAGES, 1,
462 [Define if your <locale.h> file defines LC_MESSAGES.])
463 fi
464 fi])
465
466# GLIB_PATH_PROG_WITH_TEST
467#----------------------------
468dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
469dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
470glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
471[# Extract the first word of "$2", so it can be a program name with args.
472set dummy $2; ac_word=[$]2
473AC_MSG_CHECKING([for $ac_word])
474AC_CACHE_VAL(ac_cv_path_$1,
475[case "[$]$1" in
476 /*)
477 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
478 ;;
479 *)
480 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
481 for ac_dir in ifelse([$5], , $PATH, [$5]); do
482 test -z "$ac_dir" && ac_dir=.
483 if test -f $ac_dir/$ac_word; then
484 if [$3]; then
485 ac_cv_path_$1="$ac_dir/$ac_word"
486 break
487 fi
488 fi
489 done
490 IFS="$ac_save_ifs"
491dnl If no 4th arg is given, leave the cache variable unset,
492dnl so AC_PATH_PROGS will keep looking.
493ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
494])dnl
495 ;;
496esac])dnl
497$1="$ac_cv_path_$1"
498if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
499 AC_MSG_RESULT([$]$1)
500else
501 AC_MSG_RESULT(no)
502fi
503AC_SUBST($1)dnl
504])
505
506# GLIB_WITH_NLS
507#-----------------
508glib_DEFUN([GLIB_WITH_NLS],
509 dnl NLS is obligatory
39c13576 510 [USE_NLS=yes
6cc5e1a6
DB
511 AC_SUBST(USE_NLS)
512
513 gt_cv_have_gettext=no
514
515 CATOBJEXT=NONE
516 XGETTEXT=:
517 INTLLIBS=
518
519 AC_CHECK_HEADER(libintl.h,
520 [gt_cv_func_dgettext_libintl="no"
521 libintl_extra_libs=""
522
523 #
524 # First check in libc
525 #
526 AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
527 [AC_TRY_LINK([
528#include <libintl.h>
529],
530 [return !ngettext ("","", 1)],
531 gt_cv_func_ngettext_libc=yes,
532 gt_cv_func_ngettext_libc=no)
533 ])
534
535 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
536 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
537 [AC_TRY_LINK([
538#include <libintl.h>
539],
540 [return !dgettext ("","")],
541 gt_cv_func_dgettext_libc=yes,
542 gt_cv_func_dgettext_libc=no)
543 ])
544 fi
545
546 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
547 AC_CHECK_FUNCS(bind_textdomain_codeset)
548 fi
549
550 #
551 # If we don't have everything we want, check in libintl
552 #
553 if test "$gt_cv_func_dgettext_libc" != "yes" \
554 || test "$gt_cv_func_ngettext_libc" != "yes" \
555 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
556
557 AC_CHECK_LIB(intl, bindtextdomain,
558 [AC_CHECK_LIB(intl, ngettext,
559 [AC_CHECK_LIB(intl, dgettext,
560 gt_cv_func_dgettext_libintl=yes)])])
561
562 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
563 AC_MSG_CHECKING([if -liconv is needed to use gettext])
564 AC_MSG_RESULT([])
565 AC_CHECK_LIB(intl, ngettext,
566 [AC_CHECK_LIB(intl, dcgettext,
567 [gt_cv_func_dgettext_libintl=yes
568 libintl_extra_libs=-liconv],
569 :,-liconv)],
570 :,-liconv)
571 fi
572
573 #
574 # If we found libintl, then check in it for bind_textdomain_codeset();
575 # we'll prefer libc if neither have bind_textdomain_codeset(),
576 # and both have dgettext and ngettext
577 #
578 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
579 glib_save_LIBS="$LIBS"
580 LIBS="$LIBS -lintl $libintl_extra_libs"
581 unset ac_cv_func_bind_textdomain_codeset
582 AC_CHECK_FUNCS(bind_textdomain_codeset)
583 LIBS="$glib_save_LIBS"
584
585 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
586 gt_cv_func_dgettext_libc=no
587 else
588 if test "$gt_cv_func_dgettext_libc" = "yes" \
589 && test "$gt_cv_func_ngettext_libc" = "yes"; then
590 gt_cv_func_dgettext_libintl=no
591 fi
592 fi
593 fi
594 fi
595
596 if test "$gt_cv_func_dgettext_libc" = "yes" \
597 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
598 gt_cv_have_gettext=yes
599 fi
600
601 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
602 INTLLIBS="-lintl $libintl_extra_libs"
603 fi
604
605 if test "$gt_cv_have_gettext" = "yes"; then
606 AC_DEFINE(HAVE_GETTEXT,1,
607 [Define if the GNU gettext() function is already present or preinstalled.])
608 GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
609 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
610 if test "$MSGFMT" != "no"; then
611 glib_save_LIBS="$LIBS"
612 LIBS="$LIBS $INTLLIBS"
613 AC_CHECK_FUNCS(dcgettext)
614 MSGFMT_OPTS=
615 AC_MSG_CHECKING([if msgfmt accepts -c])
616 GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
617msgid ""
618msgstr ""
619"Content-Type: text/plain; charset=UTF-8\n"
620"Project-Id-Version: test 1.0\n"
621"PO-Revision-Date: 2007-02-15 12:01+0100\n"
622"Last-Translator: test <foo@bar.xx>\n"
623"Language-Team: C <LL@li.org>\n"
624"MIME-Version: 1.0\n"
625"Content-Transfer-Encoding: 8bit\n"
626], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
627 AC_SUBST(MSGFMT_OPTS)
628 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
629 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
630 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
631 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
632 return _nl_msg_cat_cntr],
633 [CATOBJEXT=.gmo
634 DATADIRNAME=share],
635 [case $host in
636 *-*-solaris*)
637 dnl On Solaris, if bind_textdomain_codeset is in libc,
638 dnl GNU format message catalog is always supported,
639 dnl since both are added to the libc all together.
640 dnl Hence, we'd like to go with DATADIRNAME=share and
641 dnl and CATOBJEXT=.gmo in this case.
642 AC_CHECK_FUNC(bind_textdomain_codeset,
643 [CATOBJEXT=.gmo
644 DATADIRNAME=share],
645 [CATOBJEXT=.mo
646 DATADIRNAME=lib])
647 ;;
514580cf
DB
648 *-*-openbsd*)
649 CATOBJEXT=.mo
650 DATADIRNAME=share
651 ;;
6cc5e1a6
DB
652 *)
653 CATOBJEXT=.mo
654 DATADIRNAME=lib
655 ;;
656 esac])
657 LIBS="$glib_save_LIBS"
658 INSTOBJEXT=.mo
659 else
660 gt_cv_have_gettext=no
661 fi
662 fi
663 ])
664
665 if test "$gt_cv_have_gettext" = "yes" ; then
666 AC_DEFINE(ENABLE_NLS, 1,
667 [always defined to indicate that i18n is enabled])
668 fi
669
670 dnl Test whether we really found GNU xgettext.
671 if test "$XGETTEXT" != ":"; then
672 dnl If it is not GNU xgettext we define it as : so that the
673 dnl Makefiles still can work.
674 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
675 : ;
676 else
677 AC_MSG_RESULT(
678 [found xgettext program is not GNU xgettext; ignore it])
679 XGETTEXT=":"
680 fi
681 fi
682
683 # We need to process the po/ directory.
684 POSUB=po
685
686 AC_OUTPUT_COMMANDS(
687 [case "$CONFIG_FILES" in *po/Makefile.in*)
688 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
689 esac])
690
691 dnl These rules are solely for the distribution goal. While doing this
692 dnl we only have to keep exactly one list of the available catalogs
cb7f7ba8 693 dnl in configure.ac.
6cc5e1a6
DB
694 for lang in $ALL_LINGUAS; do
695 GMOFILES="$GMOFILES $lang.gmo"
696 POFILES="$POFILES $lang.po"
697 done
698
699 dnl Make all variables we use known to autoconf.
700 AC_SUBST(CATALOGS)
701 AC_SUBST(CATOBJEXT)
702 AC_SUBST(DATADIRNAME)
703 AC_SUBST(GMOFILES)
704 AC_SUBST(INSTOBJEXT)
705 AC_SUBST(INTLLIBS)
706 AC_SUBST(PO_IN_DATADIR_TRUE)
707 AC_SUBST(PO_IN_DATADIR_FALSE)
708 AC_SUBST(POFILES)
709 AC_SUBST(POSUB)
710 ])
711
712# AM_GLIB_GNU_GETTEXT
713# -------------------
714# Do checks necessary for use of gettext. If a suitable implementation
715# of gettext is found in either in libintl or in the C library,
716# it will set INTLLIBS to the libraries needed for use of gettext
717# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
718# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
719# on various variables needed by the Makefile.in.in installed by
720# glib-gettextize.
721dnl
722glib_DEFUN([GLIB_GNU_GETTEXT],
723 [AC_REQUIRE([AC_PROG_CC])dnl
724 AC_REQUIRE([AC_HEADER_STDC])dnl
725
726 GLIB_LC_MESSAGES
727 GLIB_WITH_NLS
728
729 if test "$gt_cv_have_gettext" = "yes"; then
730 if test "x$ALL_LINGUAS" = "x"; then
731 LINGUAS=
732 else
733 AC_MSG_CHECKING(for catalogs to be installed)
734 NEW_LINGUAS=
735 for presentlang in $ALL_LINGUAS; do
736 useit=no
737 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
738 desiredlanguages="$LINGUAS"
739 else
740 desiredlanguages="$ALL_LINGUAS"
741 fi
742 for desiredlang in $desiredlanguages; do
743 # Use the presentlang catalog if desiredlang is
744 # a. equal to presentlang, or
745 # b. a variant of presentlang (because in this case,
746 # presentlang can be used as a fallback for messages
747 # which are not translated in the desiredlang catalog).
748 case "$desiredlang" in
749 "$presentlang"*) useit=yes;;
750 esac
751 done
752 if test $useit = yes; then
753 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
754 fi
755 done
756 LINGUAS=$NEW_LINGUAS
757 AC_MSG_RESULT($LINGUAS)
758 fi
759
760 dnl Construct list of names of catalog files to be constructed.
761 if test -n "$LINGUAS"; then
762 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
763 fi
764 fi
765
766 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
767 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
768 dnl Try to locate is.
769 MKINSTALLDIRS=
770 if test -n "$ac_aux_dir"; then
771 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
772 fi
773 if test -z "$MKINSTALLDIRS"; then
774 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
775 fi
776 AC_SUBST(MKINSTALLDIRS)
777
778 dnl Generate list of files to be processed by xgettext which will
779 dnl be included in po/Makefile.
780 test -d po || mkdir po
781 if test "x$srcdir" != "x."; then
782 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
783 posrcprefix="$srcdir/"
784 else
785 posrcprefix="../$srcdir/"
786 fi
787 else
788 posrcprefix="../"
789 fi
790 rm -f po/POTFILES
791 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
792 < $srcdir/po/POTFILES.in > po/POTFILES
793 ])
794
795# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
796# -------------------------------
797# Define VARIABLE to the location where catalog files will
798# be installed by po/Makefile.
799glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
800[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
801glib_save_prefix="$prefix"
802glib_save_exec_prefix="$exec_prefix"
803glib_save_datarootdir="$datarootdir"
804test "x$prefix" = xNONE && prefix=$ac_default_prefix
805test "x$exec_prefix" = xNONE && exec_prefix=$prefix
806datarootdir=`eval echo "${datarootdir}"`
807if test "x$CATOBJEXT" = "x.mo" ; then
808 localedir=`eval echo "${libdir}/locale"`
809else
810 localedir=`eval echo "${datadir}/locale"`
811fi
812prefix="$glib_save_prefix"
813exec_prefix="$glib_save_exec_prefix"
814datarootdir="$glib_save_datarootdir"
815AC_DEFINE_UNQUOTED($1, "$localedir",
816 [Define the location where the catalogs will be installed])
817])
818
819dnl
820dnl Now the definitions that aclocal will find
821dnl
cb7f7ba8 822ifdef(glib_configure_ac,[],[
6cc5e1a6
DB
823AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
824AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
825])dnl
826
827# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
828#
829# Create a temporary file with TEST-FILE as its contents and pass the
830# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
831# 0 and perform ACTION-IF-FAIL for any other exit status.
832AC_DEFUN([GLIB_RUN_PROG],
833[cat >conftest.foo <<_ACEOF
834$2
835_ACEOF
836if AC_RUN_LOG([$1 conftest.foo]); then
837 m4_ifval([$3], [$3], [:])
838m4_ifvaln([$4], [else $4])dnl
839echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
840sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
841fi])
842
843
844
845dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
514580cf 846# serial 42 IT_PROG_INTLTOOL
7486d297
DB
847AC_DEFUN([IT_PROG_INTLTOOL], [
848AC_PREREQ([2.50])dnl
849AC_REQUIRE([AM_NLS])dnl
6cc5e1a6
DB
850
851case "$am__api_version" in
852 1.[01234])
853 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
854 ;;
855 *)
856 ;;
857esac
858
514580cf
DB
859INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
860INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
861INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
6cc5e1a6
DB
862if test -n "$1"; then
863 AC_MSG_CHECKING([for intltool >= $1])
6cc5e1a6
DB
864 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
865 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
866 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
867fi
868
96dc8a45
DB
869AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
870AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
871AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
872if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
873 AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
874fi
875
514580cf
DB
876if test -z "$AM_DEFAULT_VERBOSITY"; then
877 AM_DEFAULT_VERBOSITY=1
878fi
879AC_SUBST([AM_DEFAULT_VERBOSITY])
880
881INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
882INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
883INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;'
884AC_SUBST(INTLTOOL_V_MERGE)
885AC_SUBST(INTLTOOL__v_MERGE_)
886AC_SUBST(INTLTOOL__v_MERGE_0)
887
888INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
889intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
890intltool__v_merge_options_0='-q'
891AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
892AC_SUBST(intltool__v_merge_options_)
893AC_SUBST(intltool__v_merge_options_0)
894
895 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 $< [$]@'
896INTLTOOL_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 $< [$]@'
897 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 $< [$]@'
898 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 $< [$]@'
899 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 $< [$]@'
900 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 $< [$]@'
901 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 $< [$]@'
902 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 $< [$]@'
903INTLTOOL_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 $< [$]@'
904 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 $< [$]@'
905 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 $< [$]@'
906if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
907 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 $< [$]@'
908else
909 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'
910fi
911 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 $< [$]@'
912 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 $< [$]@'
913 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 $< [$]@'
914 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 $< [$]@'
915 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 $< [$]@'
916 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 $< [$]@'
917 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 $< [$]@'
6cc5e1a6 918
7486d297
DB
919_IT_SUBST(INTLTOOL_DESKTOP_RULE)
920_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
921_IT_SUBST(INTLTOOL_KEYS_RULE)
922_IT_SUBST(INTLTOOL_PROP_RULE)
923_IT_SUBST(INTLTOOL_OAF_RULE)
924_IT_SUBST(INTLTOOL_PONG_RULE)
925_IT_SUBST(INTLTOOL_SERVER_RULE)
926_IT_SUBST(INTLTOOL_SHEET_RULE)
927_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
928_IT_SUBST(INTLTOOL_UI_RULE)
929_IT_SUBST(INTLTOOL_XAM_RULE)
930_IT_SUBST(INTLTOOL_KBD_RULE)
931_IT_SUBST(INTLTOOL_XML_RULE)
932_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
933_IT_SUBST(INTLTOOL_CAVES_RULE)
934_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
935_IT_SUBST(INTLTOOL_THEME_RULE)
936_IT_SUBST(INTLTOOL_SERVICE_RULE)
937_IT_SUBST(INTLTOOL_POLICY_RULE)
6cc5e1a6 938
39c13576
DB
939# Check the gettext tools to make sure they are GNU
940AC_PATH_PROG(XGETTEXT, xgettext)
941AC_PATH_PROG(MSGMERGE, msgmerge)
942AC_PATH_PROG(MSGFMT, msgfmt)
7486d297 943AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
39c13576
DB
944if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
945 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
946fi
947xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
948mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
949mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
950if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
951 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
952fi
953
7486d297 954AC_PATH_PROG(INTLTOOL_PERL, perl)
6cc5e1a6 955if test -z "$INTLTOOL_PERL"; then
7486d297 956 AC_MSG_ERROR([perl not found])
6cc5e1a6 957fi
7486d297
DB
958AC_MSG_CHECKING([for perl >= 5.8.1])
959$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
960if test $? -ne 0; then
961 AC_MSG_ERROR([perl 5.8.1 is required for intltool])
962else
514580cf 963 IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
7486d297 964 AC_MSG_RESULT([$IT_PERL_VERSION])
6cc5e1a6
DB
965fi
966if test "x$2" != "xno-xml"; then
967 AC_MSG_CHECKING([for XML::Parser])
968 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
969 AC_MSG_RESULT([ok])
970 else
971 AC_MSG_ERROR([XML::Parser perl module is required for intltool])
972 fi
973fi
974
975# Substitute ALL_LINGUAS so we can use it in po/Makefile
976AC_SUBST(ALL_LINGUAS)
977
978# Set DATADIRNAME correctly if it is not set yet
979# (copied from glib-gettext.m4)
980if test -z "$DATADIRNAME"; then
981 AC_LINK_IFELSE(
982 [AC_LANG_PROGRAM([[]],
983 [[extern int _nl_msg_cat_cntr;
984 return _nl_msg_cat_cntr]])],
985 [DATADIRNAME=share],
986 [case $host in
987 *-*-solaris*)
988 dnl On Solaris, if bind_textdomain_codeset is in libc,
989 dnl GNU format message catalog is always supported,
990 dnl since both are added to the libc all together.
991 dnl Hence, we'd like to go with DATADIRNAME=share
992 dnl in this case.
993 AC_CHECK_FUNC(bind_textdomain_codeset,
994 [DATADIRNAME=share], [DATADIRNAME=lib])
995 ;;
996 *)
997 [DATADIRNAME=lib]
998 ;;
999 esac])
1000fi
1001AC_SUBST(DATADIRNAME)
1002
1003IT_PO_SUBDIR([po])
1004
6cc5e1a6
DB
1005])
1006
1007
1008# IT_PO_SUBDIR(DIRNAME)
1009# ---------------------
1010# All po subdirs have to be declared with this macro; the subdir "po" is
1011# declared by IT_PROG_INTLTOOL.
1012#
1013AC_DEFUN([IT_PO_SUBDIR],
1014[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1015dnl
cb7f7ba8 1016dnl The following CONFIG_COMMANDS should be executed at the very end
6cc5e1a6
DB
1017dnl of config.status.
1018AC_CONFIG_COMMANDS_PRE([
1019 AC_CONFIG_COMMANDS([$1/stamp-it], [
7486d297
DB
1020 if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
1021 AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
1022 fi
6cc5e1a6
DB
1023 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1024 >"$1/stamp-it.tmp"
1025 [sed '/^#/d
1026 s/^[[].*] *//
1027 /^[ ]*$/d
1028 '"s|^| $ac_top_srcdir/|" \
1029 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1030 ]
6cc5e1a6
DB
1031 [sed '/^POTFILES =/,/[^\\]$/ {
1032 /^POTFILES =/!d
1033 r $1/POTFILES
1034 }
7486d297 1035 ' "$1/Makefile.in" >"$1/Makefile"]
6cc5e1a6
DB
1036 rm -f "$1/Makefile.tmp"
1037 mv "$1/stamp-it.tmp" "$1/stamp-it"
1038 ])
1039])dnl
1040])
1041
7486d297
DB
1042# _IT_SUBST(VARIABLE)
1043# -------------------
1044# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1045#
1046AC_DEFUN([_IT_SUBST],
1047[
1048AC_SUBST([$1])
1049m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1050]
1051)
6cc5e1a6
DB
1052
1053# deprecated macros
1054AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1055# A hint is needed for aclocal from Automake <= 1.9.4:
1056# AC_DEFUN([AC_PROG_INTLTOOL], ...)
1057
1058
1059# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
96dc8a45
DB
1060#
1061# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
514580cf
DB
1062# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1063# Foundation, Inc.
96dc8a45
DB
1064# Written by Gordon Matzigkeit, 1996
1065#
1066# This file is free software; the Free Software Foundation gives
1067# unlimited permission to copy and/or distribute it, with or without
1068# modifications, as long as this notice is preserved.
1069
1070m4_define([_LT_COPYING], [dnl
1071# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
514580cf
DB
1072# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1073# Foundation, Inc.
96dc8a45
DB
1074# Written by Gordon Matzigkeit, 1996
1075#
1076# This file is part of GNU Libtool.
1077#
1078# GNU Libtool is free software; you can redistribute it and/or
1079# modify it under the terms of the GNU General Public License as
1080# published by the Free Software Foundation; either version 2 of
1081# the License, or (at your option) any later version.
1082#
1083# As a special exception to the GNU General Public License,
1084# if you distribute this file as part of a program or library that
1085# is built using GNU Libtool, you may include this file under the
1086# same distribution terms that you use for the rest of that program.
1087#
1088# GNU Libtool is distributed in the hope that it will be useful,
1089# but WITHOUT ANY WARRANTY; without even the implied warranty of
1090# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1091# GNU General Public License for more details.
1092#
1093# You should have received a copy of the GNU General Public License
1094# along with GNU Libtool; see the file COPYING. If not, a copy
1095# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1096# obtained by writing to the Free Software Foundation, Inc.,
1097# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1098])
6cc5e1a6 1099
4652f59b 1100# serial 57 LT_INIT
6cc5e1a6
DB
1101
1102
96dc8a45
DB
1103# LT_PREREQ(VERSION)
1104# ------------------
1105# Complain and exit if this libtool version is less that VERSION.
1106m4_defun([LT_PREREQ],
1107[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1108 [m4_default([$3],
1109 [m4_fatal([Libtool version $1 or higher is required],
1110 63)])],
1111 [$2])])
6cc5e1a6
DB
1112
1113
96dc8a45
DB
1114# _LT_CHECK_BUILDDIR
1115# ------------------
1116# Complain if the absolute build directory name contains unusual characters
1117m4_defun([_LT_CHECK_BUILDDIR],
1118[case `pwd` in
1119 *\ * | *\ *)
1120 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1121esac
1122])
1123
1124
1125# LT_INIT([OPTIONS])
1126# ------------------
1127AC_DEFUN([LT_INIT],
1128[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
4652f59b 1129AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
96dc8a45
DB
1130AC_BEFORE([$0], [LT_LANG])dnl
1131AC_BEFORE([$0], [LT_OUTPUT])dnl
1132AC_BEFORE([$0], [LTDL_INIT])dnl
1133m4_require([_LT_CHECK_BUILDDIR])dnl
1134
1135dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1136m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1137m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1138dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1139dnl unless we require an AC_DEFUNed macro:
1140AC_REQUIRE([LTOPTIONS_VERSION])dnl
1141AC_REQUIRE([LTSUGAR_VERSION])dnl
1142AC_REQUIRE([LTVERSION_VERSION])dnl
1143AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1144m4_require([_LT_PROG_LTMAIN])dnl
1145
4652f59b
DB
1146_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1147
96dc8a45
DB
1148dnl Parse OPTIONS
1149_LT_SET_OPTIONS([$0], [$1])
6cc5e1a6
DB
1150
1151# This can be used to rebuild libtool when needed
96dc8a45 1152LIBTOOL_DEPS="$ltmain"
6cc5e1a6
DB
1153
1154# Always use our own libtool.
1155LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1156AC_SUBST(LIBTOOL)dnl
1157
96dc8a45 1158_LT_SETUP
6cc5e1a6 1159
96dc8a45
DB
1160# Only expand once:
1161m4_define([LT_INIT])
1162])# LT_INIT
6cc5e1a6 1163
96dc8a45
DB
1164# Old names:
1165AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1166AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1167dnl aclocal-1.4 backwards compatibility:
1168dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1169dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1170
1171
1172# _LT_CC_BASENAME(CC)
1173# -------------------
1174# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1175m4_defun([_LT_CC_BASENAME],
1176[for cc_temp in $1""; do
1177 case $cc_temp in
1178 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1179 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1180 \-*) ;;
1181 *) break;;
1182 esac
1183done
4652f59b 1184cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
96dc8a45
DB
1185])
1186
1187
1188# _LT_FILEUTILS_DEFAULTS
1189# ----------------------
1190# It is okay to use these file commands and assume they have been set
1191# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1192m4_defun([_LT_FILEUTILS_DEFAULTS],
1193[: ${CP="cp -f"}
1194: ${MV="mv -f"}
1195: ${RM="rm -f"}
1196])# _LT_FILEUTILS_DEFAULTS
1197
1198
1199# _LT_SETUP
1200# ---------
1201m4_defun([_LT_SETUP],
1202[AC_REQUIRE([AC_CANONICAL_HOST])dnl
6cc5e1a6 1203AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4652f59b
DB
1204AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1205AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1206
514580cf
DB
1207_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1208dnl
96dc8a45
DB
1209_LT_DECL([], [host_alias], [0], [The host system])dnl
1210_LT_DECL([], [host], [0])dnl
1211_LT_DECL([], [host_os], [0])dnl
1212dnl
1213_LT_DECL([], [build_alias], [0], [The build system])dnl
1214_LT_DECL([], [build], [0])dnl
1215_LT_DECL([], [build_os], [0])dnl
1216dnl
6cc5e1a6 1217AC_REQUIRE([AC_PROG_CC])dnl
96dc8a45
DB
1218AC_REQUIRE([LT_PATH_LD])dnl
1219AC_REQUIRE([LT_PATH_NM])dnl
1220dnl
6cc5e1a6 1221AC_REQUIRE([AC_PROG_LN_S])dnl
96dc8a45
DB
1222test -z "$LN_S" && LN_S="ln -s"
1223_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1224dnl
1225AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1226_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1227_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
6cc5e1a6 1228dnl
96dc8a45
DB
1229m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1230m4_require([_LT_CHECK_SHELL_FEATURES])dnl
cb7f7ba8 1231m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
96dc8a45
DB
1232m4_require([_LT_CMD_RELOAD])dnl
1233m4_require([_LT_CHECK_MAGIC_METHOD])dnl
cb7f7ba8 1234m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
96dc8a45
DB
1235m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1236m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
cb7f7ba8 1237m4_require([_LT_WITH_SYSROOT])dnl
96dc8a45
DB
1238
1239_LT_CONFIG_LIBTOOL_INIT([
1240# See if we are running on zsh, and set the options which allow our
1241# commands through without removal of \ escapes INIT.
1242if test -n "\${ZSH_VERSION+set}" ; then
1243 setopt NO_GLOB_SUBST
1244fi
1245])
1246if test -n "${ZSH_VERSION+set}" ; then
1247 setopt NO_GLOB_SUBST
1248fi
1249
1250_LT_CHECK_OBJDIR
6cc5e1a6 1251
96dc8a45 1252m4_require([_LT_TAG_COMPILER])dnl
6cc5e1a6
DB
1253
1254case $host_os in
1255aix3*)
1256 # AIX sometimes has problems with the GCC collect2 program. For some
1257 # reason, if we set the COLLECT_NAMES environment variable, the problems
1258 # vanish in a puff of smoke.
1259 if test "X${COLLECT_NAMES+set}" != Xset; then
1260 COLLECT_NAMES=
1261 export COLLECT_NAMES
1262 fi
1263 ;;
1264esac
1265
6cc5e1a6 1266# Global variables:
96dc8a45 1267ofile=libtool
6cc5e1a6
DB
1268can_build_shared=yes
1269
1270# All known linkers require a `.a' archive for static linking (except MSVC,
1271# which needs '.lib').
1272libext=a
6cc5e1a6 1273
96dc8a45 1274with_gnu_ld="$lt_cv_prog_gnu_ld"
6cc5e1a6
DB
1275
1276old_CC="$CC"
1277old_CFLAGS="$CFLAGS"
1278
1279# Set sane defaults for various variables
6cc5e1a6
DB
1280test -z "$CC" && CC=cc
1281test -z "$LTCC" && LTCC=$CC
1282test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
6cc5e1a6 1283test -z "$LD" && LD=ld
6cc5e1a6
DB
1284test -z "$ac_objext" && ac_objext=o
1285
6cc5e1a6
DB
1286_LT_CC_BASENAME([$compiler])
1287
1288# Only perform the check for file, if the check method requires it
96dc8a45 1289test -z "$MAGIC_CMD" && MAGIC_CMD=file
6cc5e1a6
DB
1290case $deplibs_check_method in
1291file_magic*)
1292 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
96dc8a45 1293 _LT_PATH_MAGIC
6cc5e1a6
DB
1294 fi
1295 ;;
1296esac
1297
96dc8a45
DB
1298# Use C for the default configuration in the libtool script
1299LT_SUPPORTED_TAG([CC])
1300_LT_LANG_C_CONFIG
1301_LT_LANG_DEFAULT_CONFIG
1302_LT_CONFIG_COMMANDS
1303])# _LT_SETUP
39c13576 1304
6cc5e1a6 1305
4652f59b
DB
1306# _LT_PREPARE_SED_QUOTE_VARS
1307# --------------------------
1308# Define a few sed substitution that help us do robust quoting.
1309m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1310[# Backslashify metacharacters that are still active within
1311# double-quoted strings.
1312sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1313
1314# Same as above, but do not quote variable references.
1315double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1316
1317# Sed substitution to delay expansion of an escaped shell variable in a
1318# double_quote_subst'ed string.
1319delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1320
1321# Sed substitution to delay expansion of an escaped single quote.
1322delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1323
1324# Sed substitution to avoid accidental globbing in evaled expressions
1325no_glob_subst='s/\*/\\\*/g'
1326])
1327
96dc8a45
DB
1328# _LT_PROG_LTMAIN
1329# ---------------
1330# Note that this code is called both from `configure', and `config.status'
1331# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
1332# `config.status' has no value for ac_aux_dir unless we are using Automake,
1333# so we pass a copy along to make sure it has a sensible value anyway.
1334m4_defun([_LT_PROG_LTMAIN],
1335[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1336_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1337ltmain="$ac_aux_dir/ltmain.sh"
1338])# _LT_PROG_LTMAIN
6cc5e1a6 1339
6cc5e1a6 1340
6cc5e1a6 1341
96dc8a45
DB
1342# So that we can recreate a full libtool script including additional
1343# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1344# in macros and then make a single call at the end using the `libtool'
1345# label.
6cc5e1a6 1346
6cc5e1a6 1347
96dc8a45
DB
1348# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1349# ----------------------------------------
1350# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1351m4_define([_LT_CONFIG_LIBTOOL_INIT],
1352[m4_ifval([$1],
1353 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1354 [$1
1355])])])
6cc5e1a6 1356
96dc8a45
DB
1357# Initialize.
1358m4_define([_LT_OUTPUT_LIBTOOL_INIT])
6cc5e1a6 1359
6cc5e1a6 1360
96dc8a45
DB
1361# _LT_CONFIG_LIBTOOL([COMMANDS])
1362# ------------------------------
1363# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1364m4_define([_LT_CONFIG_LIBTOOL],
1365[m4_ifval([$1],
1366 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1367 [$1
1368])])])
6cc5e1a6 1369
96dc8a45
DB
1370# Initialize.
1371m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1372
1373
1374# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1375# -----------------------------------------------------
1376m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1377[_LT_CONFIG_LIBTOOL([$1])
1378_LT_CONFIG_LIBTOOL_INIT([$2])
6cc5e1a6
DB
1379])
1380
1381
96dc8a45
DB
1382# _LT_FORMAT_COMMENT([COMMENT])
1383# -----------------------------
1384# Add leading comment marks to the start of each line, and a trailing
1385# full-stop to the whole comment if one is not present already.
1386m4_define([_LT_FORMAT_COMMENT],
1387[m4_ifval([$1], [
1388m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1389 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1390)])
1391
1392
1393
1394
1395
1396# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1397# -------------------------------------------------------------------
1398# CONFIGNAME is the name given to the value in the libtool script.
1399# VARNAME is the (base) name used in the configure script.
1400# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1401# VARNAME. Any other value will be used directly.
1402m4_define([_LT_DECL],
1403[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1404 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1405 [m4_ifval([$1], [$1], [$2])])
1406 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1407 m4_ifval([$4],
1408 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1409 lt_dict_add_subkey([lt_decl_dict], [$2],
1410 [tagged?], [m4_ifval([$5], [yes], [no])])])
1411])
6cc5e1a6
DB
1412
1413
96dc8a45
DB
1414# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1415# --------------------------------------------------------
1416m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
6cc5e1a6 1417
39c13576 1418
96dc8a45
DB
1419# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1420# ------------------------------------------------
1421m4_define([lt_decl_tag_varnames],
1422[_lt_decl_filter([tagged?], [yes], $@)])
1423
1424
1425# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1426# ---------------------------------------------------------
1427m4_define([_lt_decl_filter],
1428[m4_case([$#],
1429 [0], [m4_fatal([$0: too few arguments: $#])],
1430 [1], [m4_fatal([$0: too few arguments: $#: $1])],
1431 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1432 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1433 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
39c13576 1434])
6cc5e1a6 1435
6cc5e1a6 1436
96dc8a45
DB
1437# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1438# --------------------------------------------------
1439m4_define([lt_decl_quote_varnames],
1440[_lt_decl_filter([value], [1], $@)])
6cc5e1a6 1441
6cc5e1a6 1442
96dc8a45
DB
1443# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1444# ---------------------------------------------------
1445m4_define([lt_decl_dquote_varnames],
1446[_lt_decl_filter([value], [2], $@)])
6cc5e1a6 1447
6cc5e1a6 1448
96dc8a45
DB
1449# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1450# ---------------------------------------------------
1451m4_define([lt_decl_varnames_tagged],
7486d297
DB
1452[m4_assert([$# <= 2])dnl
1453_$0(m4_quote(m4_default([$1], [[, ]])),
1454 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1455 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1456m4_define([_lt_decl_varnames_tagged],
1457[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
6cc5e1a6 1458
6cc5e1a6 1459
96dc8a45
DB
1460# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1461# ------------------------------------------------
1462m4_define([lt_decl_all_varnames],
1463[_$0(m4_quote(m4_default([$1], [[, ]])),
1464 m4_if([$2], [],
1465 m4_quote(lt_decl_varnames),
1466 m4_quote(m4_shift($@))))[]dnl
1467])
1468m4_define([_lt_decl_all_varnames],
1469[lt_join($@, lt_decl_varnames_tagged([$1],
1470 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1471])
6cc5e1a6 1472
6cc5e1a6 1473
96dc8a45
DB
1474# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1475# ------------------------------------
1476# Quote a variable value, and forward it to `config.status' so that its
1477# declaration there will have the same value as in `configure'. VARNAME
1478# must have a single quote delimited value for this to work.
1479m4_define([_LT_CONFIG_STATUS_DECLARE],
4652f59b 1480[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
96dc8a45
DB
1481
1482
1483# _LT_CONFIG_STATUS_DECLARATIONS
1484# ------------------------------
1485# We delimit libtool config variables with single quotes, so when
1486# we write them to config.status, we have to be sure to quote all
1487# embedded single quotes properly. In configure, this macro expands
1488# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1489#
4652f59b 1490# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
96dc8a45
DB
1491m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1492[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1493 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
6cc5e1a6 1494
6cc5e1a6 1495
96dc8a45
DB
1496# _LT_LIBTOOL_TAGS
1497# ----------------
1498# Output comment and list of tags supported by the script
1499m4_defun([_LT_LIBTOOL_TAGS],
1500[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1501available_tags="_LT_TAGS"dnl
1502])
6cc5e1a6 1503
6cc5e1a6 1504
96dc8a45
DB
1505# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1506# -----------------------------------
1507# Extract the dictionary values for VARNAME (optionally with TAG) and
1508# expand to a commented shell variable setting:
1509#
1510# # Some comment about what VAR is for.
1511# visible_name=$lt_internal_name
1512m4_define([_LT_LIBTOOL_DECLARE],
1513[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1514 [description])))[]dnl
1515m4_pushdef([_libtool_name],
1516 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1517m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1518 [0], [_libtool_name=[$]$1],
1519 [1], [_libtool_name=$lt_[]$1],
1520 [2], [_libtool_name=$lt_[]$1],
1521 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1522m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1523])
6cc5e1a6 1524
6cc5e1a6 1525
96dc8a45
DB
1526# _LT_LIBTOOL_CONFIG_VARS
1527# -----------------------
1528# Produce commented declarations of non-tagged libtool config variables
1529# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1530# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
1531# section) are produced by _LT_LIBTOOL_TAG_VARS.
1532m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1533[m4_foreach([_lt_var],
1534 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1535 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
6cc5e1a6 1536
6cc5e1a6 1537
96dc8a45
DB
1538# _LT_LIBTOOL_TAG_VARS(TAG)
1539# -------------------------
1540m4_define([_LT_LIBTOOL_TAG_VARS],
1541[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1542 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
6cc5e1a6 1543
6cc5e1a6 1544
96dc8a45
DB
1545# _LT_TAGVAR(VARNAME, [TAGNAME])
1546# ------------------------------
1547m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
6cc5e1a6 1548
96dc8a45
DB
1549
1550# _LT_CONFIG_COMMANDS
1551# -------------------
1552# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
1553# variables for single and double quote escaping we saved from calls
1554# to _LT_DECL, we can put quote escaped variables declarations
1555# into `config.status', and then the shell code to quote escape them in
1556# for loops in `config.status'. Finally, any additional code accumulated
1557# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1558m4_defun([_LT_CONFIG_COMMANDS],
1559[AC_PROVIDE_IFELSE([LT_OUTPUT],
1560 dnl If the libtool generation code has been placed in $CONFIG_LT,
1561 dnl instead of duplicating it all over again into config.status,
1562 dnl then we will have config.status run $CONFIG_LT later, so it
1563 dnl needs to know what name is stored there:
1564 [AC_CONFIG_COMMANDS([libtool],
1565 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1566 dnl If the libtool generation code is destined for config.status,
1567 dnl expand the accumulated commands and init code now:
1568 [AC_CONFIG_COMMANDS([libtool],
1569 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1570])#_LT_CONFIG_COMMANDS
1571
1572
1573# Initialize.
1574m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1575[
1576
1577# The HP-UX ksh and POSIX shell print the target directory to stdout
1578# if CDPATH is set.
1579(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1580
1581sed_quote_subst='$sed_quote_subst'
1582double_quote_subst='$double_quote_subst'
1583delay_variable_subst='$delay_variable_subst'
1584_LT_CONFIG_STATUS_DECLARATIONS
1585LTCC='$LTCC'
1586LTCFLAGS='$LTCFLAGS'
1587compiler='$compiler_DEFAULT'
1588
4652f59b
DB
1589# A function that is used when there is no print builtin or printf.
1590func_fallback_echo ()
1591{
1592 eval 'cat <<_LTECHO_EOF
1593\$[]1
1594_LTECHO_EOF'
1595}
1596
96dc8a45
DB
1597# Quote evaled strings.
1598for var in lt_decl_all_varnames([[ \
1599]], lt_decl_quote_varnames); do
4652f59b 1600 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
96dc8a45 1601 *[[\\\\\\\`\\"\\\$]]*)
4652f59b 1602 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
6cc5e1a6 1603 ;;
96dc8a45
DB
1604 *)
1605 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
6cc5e1a6
DB
1606 ;;
1607 esac
96dc8a45 1608done
6cc5e1a6 1609
96dc8a45
DB
1610# Double-quote double-evaled strings.
1611for var in lt_decl_all_varnames([[ \
1612]], lt_decl_dquote_varnames); do
4652f59b 1613 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
96dc8a45 1614 *[[\\\\\\\`\\"\\\$]]*)
4652f59b 1615 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
96dc8a45
DB
1616 ;;
1617 *)
1618 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
6cc5e1a6
DB
1619 ;;
1620 esac
96dc8a45 1621done
6cc5e1a6 1622
96dc8a45
DB
1623_LT_OUTPUT_LIBTOOL_INIT
1624])
6cc5e1a6 1625
4652f59b
DB
1626# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1627# ------------------------------------
1628# Generate a child script FILE with all initialization necessary to
1629# reuse the environment learned by the parent script, and make the
1630# file executable. If COMMENT is supplied, it is inserted after the
1631# `#!' sequence but before initialization text begins. After this
1632# macro, additional text can be appended to FILE to form the body of
1633# the child script. The macro ends with non-zero status if the
1634# file could not be fully written (such as if the disk is full).
1635m4_ifdef([AS_INIT_GENERATED],
1636[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1637[m4_defun([_LT_GENERATED_FILE_INIT],
1638[m4_require([AS_PREPARE])]dnl
1639[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1640[lt_write_fail=0
1641cat >$1 <<_ASEOF || lt_write_fail=1
1642#! $SHELL
1643# Generated by $as_me.
1644$2
1645SHELL=\${CONFIG_SHELL-$SHELL}
1646export SHELL
1647_ASEOF
1648cat >>$1 <<\_ASEOF || lt_write_fail=1
1649AS_SHELL_SANITIZE
1650_AS_PREPARE
1651exec AS_MESSAGE_FD>&1
1652_ASEOF
1653test $lt_write_fail = 0 && chmod +x $1[]dnl
1654m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
6cc5e1a6 1655
96dc8a45
DB
1656# LT_OUTPUT
1657# ---------
1658# This macro allows early generation of the libtool script (before
1659# AC_OUTPUT is called), incase it is used in configure for compilation
1660# tests.
1661AC_DEFUN([LT_OUTPUT],
1662[: ${CONFIG_LT=./config.lt}
1663AC_MSG_NOTICE([creating $CONFIG_LT])
4652f59b
DB
1664_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1665[# Run this file to recreate a libtool stub with the current configuration.])
96dc8a45
DB
1666
1667cat >>"$CONFIG_LT" <<\_LTEOF
4652f59b 1668lt_cl_silent=false
96dc8a45
DB
1669exec AS_MESSAGE_LOG_FD>>config.log
1670{
1671 echo
1672 AS_BOX([Running $as_me.])
1673} >&AS_MESSAGE_LOG_FD
6cc5e1a6 1674
96dc8a45
DB
1675lt_cl_help="\
1676\`$as_me' creates a local libtool stub from the current configuration,
1677for use in further configure time tests before the real libtool is
1678generated.
6cc5e1a6 1679
96dc8a45 1680Usage: $[0] [[OPTIONS]]
6cc5e1a6 1681
96dc8a45
DB
1682 -h, --help print this help, then exit
1683 -V, --version print version number, then exit
1684 -q, --quiet do not print progress messages
1685 -d, --debug don't remove temporary files
6cc5e1a6 1686
96dc8a45 1687Report bugs to <bug-libtool@gnu.org>."
6cc5e1a6 1688
96dc8a45
DB
1689lt_cl_version="\
1690m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1691m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1692configured by $[0], generated by m4_PACKAGE_STRING.
6cc5e1a6 1693
514580cf 1694Copyright (C) 2011 Free Software Foundation, Inc.
96dc8a45
DB
1695This config.lt script is free software; the Free Software Foundation
1696gives unlimited permision to copy, distribute and modify it."
6cc5e1a6 1697
96dc8a45
DB
1698while test $[#] != 0
1699do
1700 case $[1] in
1701 --version | --v* | -V )
1702 echo "$lt_cl_version"; exit 0 ;;
1703 --help | --h* | -h )
1704 echo "$lt_cl_help"; exit 0 ;;
1705 --debug | --d* | -d )
1706 debug=: ;;
1707 --quiet | --q* | --silent | --s* | -q )
1708 lt_cl_silent=: ;;
1709
1710 -*) AC_MSG_ERROR([unrecognized option: $[1]
1711Try \`$[0] --help' for more information.]) ;;
1712
1713 *) AC_MSG_ERROR([unrecognized argument: $[1]
1714Try \`$[0] --help' for more information.]) ;;
1715 esac
1716 shift
1717done
6cc5e1a6 1718
96dc8a45
DB
1719if $lt_cl_silent; then
1720 exec AS_MESSAGE_FD>/dev/null
1721fi
1722_LTEOF
1723
1724cat >>"$CONFIG_LT" <<_LTEOF
1725_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1726_LTEOF
1727
1728cat >>"$CONFIG_LT" <<\_LTEOF
1729AC_MSG_NOTICE([creating $ofile])
1730_LT_OUTPUT_LIBTOOL_COMMANDS
1731AS_EXIT(0)
1732_LTEOF
1733chmod +x "$CONFIG_LT"
1734
1735# configure is writing to config.log, but config.lt does its own redirection,
1736# appending to config.log, which fails on DOS, as config.log is still kept
1737# open by configure. Here we exec the FD to /dev/null, effectively closing
1738# config.log, so it can be properly (re)opened and appended to by config.lt.
4652f59b
DB
1739lt_cl_success=:
1740test "$silent" = yes &&
1741 lt_config_lt_args="$lt_config_lt_args --quiet"
1742exec AS_MESSAGE_LOG_FD>/dev/null
1743$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1744exec AS_MESSAGE_LOG_FD>>config.log
1745$lt_cl_success || AS_EXIT(1)
96dc8a45 1746])# LT_OUTPUT
6cc5e1a6 1747
6cc5e1a6 1748
96dc8a45
DB
1749# _LT_CONFIG(TAG)
1750# ---------------
1751# If TAG is the built-in tag, create an initial libtool script with a
1752# default configuration from the untagged config vars. Otherwise add code
1753# to config.status for appending the configuration named by TAG from the
1754# matching tagged config vars.
1755m4_defun([_LT_CONFIG],
1756[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1757_LT_CONFIG_SAVE_COMMANDS([
1758 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1759 m4_if(_LT_TAG, [C], [
1760 # See if we are running on zsh, and set the options which allow our
1761 # commands through without removal of \ escapes.
1762 if test -n "${ZSH_VERSION+set}" ; then
1763 setopt NO_GLOB_SUBST
1764 fi
6cc5e1a6 1765
96dc8a45
DB
1766 cfgfile="${ofile}T"
1767 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1768 $RM "$cfgfile"
6cc5e1a6 1769
96dc8a45
DB
1770 cat <<_LT_EOF >> "$cfgfile"
1771#! $SHELL
6cc5e1a6 1772
96dc8a45
DB
1773# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1774# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1775# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1776# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1777#
1778_LT_COPYING
1779_LT_LIBTOOL_TAGS
6cc5e1a6 1780
96dc8a45
DB
1781# ### BEGIN LIBTOOL CONFIG
1782_LT_LIBTOOL_CONFIG_VARS
1783_LT_LIBTOOL_TAG_VARS
1784# ### END LIBTOOL CONFIG
1785
1786_LT_EOF
1787
1788 case $host_os in
1789 aix3*)
1790 cat <<\_LT_EOF >> "$cfgfile"
1791# AIX sometimes has problems with the GCC collect2 program. For some
1792# reason, if we set the COLLECT_NAMES environment variable, the problems
1793# vanish in a puff of smoke.
1794if test "X${COLLECT_NAMES+set}" != Xset; then
1795 COLLECT_NAMES=
1796 export COLLECT_NAMES
1797fi
1798_LT_EOF
6cc5e1a6
DB
1799 ;;
1800 esac
6cc5e1a6 1801
96dc8a45 1802 _LT_PROG_LTMAIN
6cc5e1a6 1803
96dc8a45
DB
1804 # We use sed instead of cat because bash on DJGPP gets confused if
1805 # if finds mixed CR/LF and LF-only lines. Since sed operates in
1806 # text mode, it properly converts lines to CR/LF. This bash problem
1807 # is reportedly fixed, but why not run on old versions too?
cb7f7ba8
DB
1808 sed '$q' "$ltmain" >> "$cfgfile" \
1809 || (rm -f "$cfgfile"; exit 1)
6cc5e1a6 1810
cb7f7ba8 1811 _LT_PROG_REPLACE_SHELLFNS
6cc5e1a6 1812
cb7f7ba8 1813 mv -f "$cfgfile" "$ofile" ||
96dc8a45
DB
1814 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1815 chmod +x "$ofile"
1816],
1817[cat <<_LT_EOF >> "$ofile"
6cc5e1a6 1818
96dc8a45
DB
1819dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1820dnl in a comment (ie after a #).
1821# ### BEGIN LIBTOOL TAG CONFIG: $1
1822_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1823# ### END LIBTOOL TAG CONFIG: $1
1824_LT_EOF
1825])dnl /m4_if
1826],
1827[m4_if([$1], [], [
1828 PACKAGE='$PACKAGE'
1829 VERSION='$VERSION'
1830 TIMESTAMP='$TIMESTAMP'
1831 RM='$RM'
1832 ofile='$ofile'], [])
1833])dnl /_LT_CONFIG_SAVE_COMMANDS
1834])# _LT_CONFIG
6cc5e1a6 1835
6cc5e1a6 1836
96dc8a45
DB
1837# LT_SUPPORTED_TAG(TAG)
1838# ---------------------
1839# Trace this macro to discover what tags are supported by the libtool
1840# --tag option, using:
1841# autoconf --trace 'LT_SUPPORTED_TAG:$1'
1842AC_DEFUN([LT_SUPPORTED_TAG], [])
6cc5e1a6 1843
6cc5e1a6 1844
96dc8a45
DB
1845# C support is built-in for now
1846m4_define([_LT_LANG_C_enabled], [])
1847m4_define([_LT_TAGS], [])
6cc5e1a6 1848
6cc5e1a6 1849
96dc8a45
DB
1850# LT_LANG(LANG)
1851# -------------
1852# Enable libtool support for the given language if not already enabled.
1853AC_DEFUN([LT_LANG],
1854[AC_BEFORE([$0], [LT_OUTPUT])dnl
1855m4_case([$1],
1856 [C], [_LT_LANG(C)],
1857 [C++], [_LT_LANG(CXX)],
514580cf 1858 [Go], [_LT_LANG(GO)],
96dc8a45
DB
1859 [Java], [_LT_LANG(GCJ)],
1860 [Fortran 77], [_LT_LANG(F77)],
1861 [Fortran], [_LT_LANG(FC)],
1862 [Windows Resource], [_LT_LANG(RC)],
1863 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1864 [_LT_LANG($1)],
1865 [m4_fatal([$0: unsupported language: "$1"])])])dnl
1866])# LT_LANG
1867
1868
1869# _LT_LANG(LANGNAME)
1870# ------------------
1871m4_defun([_LT_LANG],
1872[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1873 [LT_SUPPORTED_TAG([$1])dnl
1874 m4_append([_LT_TAGS], [$1 ])dnl
1875 m4_define([_LT_LANG_]$1[_enabled], [])dnl
1876 _LT_LANG_$1_CONFIG($1)])dnl
1877])# _LT_LANG
6cc5e1a6
DB
1878
1879
514580cf
DB
1880m4_ifndef([AC_PROG_GO], [
1881# NOTE: This macro has been submitted for inclusion into #
1882# GNU Autoconf as AC_PROG_GO. When it is available in #
1883# a released version of Autoconf we should remove this #
1884# macro and use it instead. #
1885m4_defun([AC_PROG_GO],
1886[AC_LANG_PUSH(Go)dnl
1887AC_ARG_VAR([GOC], [Go compiler command])dnl
1888AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
1889_AC_ARG_VAR_LDFLAGS()dnl
1890AC_CHECK_TOOL(GOC, gccgo)
1891if test -z "$GOC"; then
1892 if test -n "$ac_tool_prefix"; then
1893 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
1894 fi
1895fi
1896if test -z "$GOC"; then
1897 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
1898fi
1899])#m4_defun
1900])#m4_ifndef
1901
1902
96dc8a45
DB
1903# _LT_LANG_DEFAULT_CONFIG
1904# -----------------------
1905m4_defun([_LT_LANG_DEFAULT_CONFIG],
1906[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1907 [LT_LANG(CXX)],
1908 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1909
1910AC_PROVIDE_IFELSE([AC_PROG_F77],
1911 [LT_LANG(F77)],
1912 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1913
1914AC_PROVIDE_IFELSE([AC_PROG_FC],
1915 [LT_LANG(FC)],
1916 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1917
1918dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1919dnl pulling things in needlessly.
1920AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1921 [LT_LANG(GCJ)],
1922 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1923 [LT_LANG(GCJ)],
1924 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1925 [LT_LANG(GCJ)],
1926 [m4_ifdef([AC_PROG_GCJ],
1927 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1928 m4_ifdef([A][M_PROG_GCJ],
1929 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1930 m4_ifdef([LT_PROG_GCJ],
1931 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1932
514580cf
DB
1933AC_PROVIDE_IFELSE([AC_PROG_GO],
1934 [LT_LANG(GO)],
1935 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
1936
96dc8a45
DB
1937AC_PROVIDE_IFELSE([LT_PROG_RC],
1938 [LT_LANG(RC)],
1939 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1940])# _LT_LANG_DEFAULT_CONFIG
1941
1942# Obsolete macros:
1943AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1944AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1945AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1946AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
4652f59b 1947AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
96dc8a45
DB
1948dnl aclocal-1.4 backwards compatibility:
1949dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1950dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1951dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1952dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
4652f59b 1953dnl AC_DEFUN([AC_LIBTOOL_RC], [])
96dc8a45
DB
1954
1955
1956# _LT_TAG_COMPILER
1957# ----------------
1958m4_defun([_LT_TAG_COMPILER],
1959[AC_REQUIRE([AC_PROG_CC])dnl
6cc5e1a6 1960
96dc8a45
DB
1961_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1962_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1963_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1964_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
6cc5e1a6 1965
96dc8a45
DB
1966# If no C compiler was specified, use CC.
1967LTCC=${LTCC-"$CC"}
6cc5e1a6 1968
96dc8a45
DB
1969# If no C compiler flags were specified, use CFLAGS.
1970LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
6cc5e1a6 1971
96dc8a45
DB
1972# Allow CC to be a program name with arguments.
1973compiler=$CC
1974])# _LT_TAG_COMPILER
6cc5e1a6 1975
6cc5e1a6 1976
96dc8a45
DB
1977# _LT_COMPILER_BOILERPLATE
1978# ------------------------
1979# Check for compiler boilerplate output or warnings with
1980# the simple compiler test code.
1981m4_defun([_LT_COMPILER_BOILERPLATE],
1982[m4_require([_LT_DECL_SED])dnl
1983ac_outfile=conftest.$ac_objext
1984echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1985eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1986_lt_compiler_boilerplate=`cat conftest.err`
1987$RM conftest*
1988])# _LT_COMPILER_BOILERPLATE
6cc5e1a6 1989
6cc5e1a6 1990
96dc8a45
DB
1991# _LT_LINKER_BOILERPLATE
1992# ----------------------
1993# Check for linker boilerplate output or warnings with
1994# the simple link test code.
1995m4_defun([_LT_LINKER_BOILERPLATE],
1996[m4_require([_LT_DECL_SED])dnl
1997ac_outfile=conftest.$ac_objext
1998echo "$lt_simple_link_test_code" >conftest.$ac_ext
1999eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2000_lt_linker_boilerplate=`cat conftest.err`
2001$RM -r conftest*
2002])# _LT_LINKER_BOILERPLATE
6cc5e1a6 2003
96dc8a45
DB
2004# _LT_REQUIRED_DARWIN_CHECKS
2005# -------------------------
2006m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2007 case $host_os in
2008 rhapsody* | darwin*)
2009 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2010 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2011 AC_CHECK_TOOL([LIPO], [lipo], [:])
2012 AC_CHECK_TOOL([OTOOL], [otool], [:])
2013 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2014 _LT_DECL([], [DSYMUTIL], [1],
2015 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2016 _LT_DECL([], [NMEDIT], [1],
2017 [Tool to change global to local symbols on Mac OS X])
2018 _LT_DECL([], [LIPO], [1],
2019 [Tool to manipulate fat objects and archives on Mac OS X])
2020 _LT_DECL([], [OTOOL], [1],
2021 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2022 _LT_DECL([], [OTOOL64], [1],
2023 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
6cc5e1a6 2024
96dc8a45
DB
2025 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2026 [lt_cv_apple_cc_single_mod=no
2027 if test -z "${LT_MULTI_MODULE}"; then
2028 # By default we will add the -single_module flag. You can override
2029 # by either setting the environment variable LT_MULTI_MODULE
2030 # non-empty at configure time, or by adding -multi_module to the
2031 # link flags.
2032 rm -rf libconftest.dylib*
2033 echo "int foo(void){return 1;}" > conftest.c
2034 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2035-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2036 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2037 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2038 _lt_result=$?
514580cf
DB
2039 # If there is a non-empty error log, and "single_module"
2040 # appears in it, assume the flag caused a linker warning
2041 if test -s conftest.err && $GREP single_module conftest.err; then
2042 cat conftest.err >&AS_MESSAGE_LOG_FD
2043 # Otherwise, if the output was created with a 0 exit code from
2044 # the compiler, it worked.
2045 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
96dc8a45
DB
2046 lt_cv_apple_cc_single_mod=yes
2047 else
2048 cat conftest.err >&AS_MESSAGE_LOG_FD
2049 fi
2050 rm -rf libconftest.dylib*
2051 rm -f conftest.*
2052 fi])
514580cf 2053
96dc8a45
DB
2054 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2055 [lt_cv_ld_exported_symbols_list],
2056 [lt_cv_ld_exported_symbols_list=no
2057 save_LDFLAGS=$LDFLAGS
2058 echo "_main" > conftest.sym
2059 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2060 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2061 [lt_cv_ld_exported_symbols_list=yes],
2062 [lt_cv_ld_exported_symbols_list=no])
2063 LDFLAGS="$save_LDFLAGS"
6cc5e1a6 2064 ])
514580cf 2065
4652f59b
DB
2066 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2067 [lt_cv_ld_force_load=no
2068 cat > conftest.c << _LT_EOF
2069int forced_loaded() { return 2;}
2070_LT_EOF
2071 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2072 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2073 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2074 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2075 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2076 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2077 cat > conftest.c << _LT_EOF
2078int main() { return 0;}
2079_LT_EOF
2080 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2081 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2082 _lt_result=$?
514580cf
DB
2083 if test -s conftest.err && $GREP force_load conftest.err; then
2084 cat conftest.err >&AS_MESSAGE_LOG_FD
2085 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
4652f59b
DB
2086 lt_cv_ld_force_load=yes
2087 else
2088 cat conftest.err >&AS_MESSAGE_LOG_FD
2089 fi
2090 rm -f conftest.err libconftest.a conftest conftest.c
2091 rm -rf conftest.dSYM
2092 ])
96dc8a45
DB
2093 case $host_os in
2094 rhapsody* | darwin1.[[012]])
2095 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2096 darwin1.*)
2097 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
7486d297 2098 darwin*) # darwin 5.x on
96dc8a45
DB
2099 # if running on 10.5 or later, the deployment target defaults
2100 # to the OS version, if on x86, and 10.4, the deployment
7486d297 2101 # target defaults to 10.4. Don't you love it?
96dc8a45
DB
2102 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2103 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2104 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2105 10.[[012]]*)
2106 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2107 10.*)
2108 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2109 esac
6cc5e1a6
DB
2110 ;;
2111 esac
96dc8a45
DB
2112 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2113 _lt_dar_single_mod='$single_module'
2114 fi
2115 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2116 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2117 else
2118 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2119 fi
4652f59b 2120 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
96dc8a45
DB
2121 _lt_dsymutil='~$DSYMUTIL $lib || :'
2122 else
2123 _lt_dsymutil=
2124 fi
2125 ;;
6cc5e1a6 2126 esac
96dc8a45 2127])
6cc5e1a6 2128
6cc5e1a6 2129
514580cf
DB
2130# _LT_DARWIN_LINKER_FEATURES([TAG])
2131# ---------------------------------
96dc8a45
DB
2132# Checks for linker and compiler features on darwin
2133m4_defun([_LT_DARWIN_LINKER_FEATURES],
2134[
2135 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2136 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2137 _LT_TAGVAR(hardcode_direct, $1)=no
2138 _LT_TAGVAR(hardcode_automatic, $1)=yes
2139 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4652f59b
DB
2140 if test "$lt_cv_ld_force_load" = "yes"; then
2141 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
514580cf
DB
2142 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
2143 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
4652f59b
DB
2144 else
2145 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2146 fi
96dc8a45
DB
2147 _LT_TAGVAR(link_all_deplibs, $1)=yes
2148 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
7486d297
DB
2149 case $cc_basename in
2150 ifort*) _lt_dar_can_shared=yes ;;
2151 *) _lt_dar_can_shared=$GCC ;;
2152 esac
2153 if test "$_lt_dar_can_shared" = "yes"; then
4652f59b 2154 output_verbose_link_cmd=func_echo_all
96dc8a45
DB
2155 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
2156 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2157 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
2158 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
2159 m4_if([$1], [CXX],
2160[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2161 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
2162 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
2163 fi
2164],[])
2165 else
2166 _LT_TAGVAR(ld_shlibs, $1)=no
2167 fi
2168])
6cc5e1a6 2169
cb7f7ba8
DB
2170# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2171# ----------------------------------
96dc8a45
DB
2172# Links a minimal program and checks the executable
2173# for the system default hardcoded library path. In most cases,
2174# this is /usr/lib:/lib, but when the MPI compilers are used
2175# the location of the communication and MPI libs are included too.
2176# If we don't find anything, use the default library path according
2177# to the aix ld manual.
cb7f7ba8
DB
2178# Store the results from the different compilers for each TAGNAME.
2179# Allow to override them for all tags through lt_cv_aix_libpath.
96dc8a45
DB
2180m4_defun([_LT_SYS_MODULE_PATH_AIX],
2181[m4_require([_LT_DECL_SED])dnl
cb7f7ba8
DB
2182if test "${lt_cv_aix_libpath+set}" = set; then
2183 aix_libpath=$lt_cv_aix_libpath
2184else
2185 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2186 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2187 lt_aix_libpath_sed='[
2188 /Import File Strings/,/^$/ {
2189 /^0/ {
2190 s/^0 *\([^ ]*\) *$/\1/
2191 p
2192 }
2193 }]'
2194 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2195 # Check for a 64-bit object if we didn't find anything.
2196 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2197 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2198 fi],[])
2199 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2200 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2201 fi
2202 ])
2203 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2204fi
96dc8a45 2205])# _LT_SYS_MODULE_PATH_AIX
6cc5e1a6 2206
6cc5e1a6 2207
96dc8a45
DB
2208# _LT_SHELL_INIT(ARG)
2209# -------------------
2210m4_define([_LT_SHELL_INIT],
4652f59b
DB
2211[m4_divert_text([M4SH-INIT], [$1
2212])])# _LT_SHELL_INIT
2213
6cc5e1a6 2214
6cc5e1a6 2215
96dc8a45
DB
2216# _LT_PROG_ECHO_BACKSLASH
2217# -----------------------
4652f59b
DB
2218# Find how we can fake an echo command that does not interpret backslash.
2219# In particular, with Autoconf 2.60 or later we add some code to the start
2220# of the generated configure script which will find a shell with a builtin
2221# printf (which we can use as an echo command).
96dc8a45 2222m4_defun([_LT_PROG_ECHO_BACKSLASH],
4652f59b
DB
2223[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2224ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2225ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2226
2227AC_MSG_CHECKING([how to print strings])
2228# Test print first, because it will be a builtin if present.
cb7f7ba8 2229if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
4652f59b
DB
2230 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2231 ECHO='print -r --'
2232elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2233 ECHO='printf %s\n'
6cc5e1a6 2234else
4652f59b
DB
2235 # Use this function as a fallback that always works.
2236 func_fallback_echo ()
2237 {
2238 eval 'cat <<_LTECHO_EOF
2239$[]1
2240_LTECHO_EOF'
2241 }
2242 ECHO='func_fallback_echo'
96dc8a45 2243fi
6cc5e1a6 2244
4652f59b
DB
2245# func_echo_all arg...
2246# Invoke $ECHO with all args, space-separated.
2247func_echo_all ()
2248{
2249 $ECHO "$*"
2250}
96dc8a45 2251
4652f59b
DB
2252case "$ECHO" in
2253 printf*) AC_MSG_RESULT([printf]) ;;
2254 print*) AC_MSG_RESULT([print -r]) ;;
2255 *) AC_MSG_RESULT([cat]) ;;
2256esac
6cc5e1a6 2257
4652f59b
DB
2258m4_ifdef([_AS_DETECT_SUGGESTED],
2259[_AS_DETECT_SUGGESTED([
2260 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2261 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2262 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2263 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2264 PATH=/empty FPATH=/empty; export PATH FPATH
2265 test "X`printf %s $ECHO`" = "X$ECHO" \
2266 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
6cc5e1a6 2267
96dc8a45 2268_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
4652f59b 2269_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
96dc8a45 2270])# _LT_PROG_ECHO_BACKSLASH
6cc5e1a6 2271
6cc5e1a6 2272
cb7f7ba8
DB
2273# _LT_WITH_SYSROOT
2274# ----------------
2275AC_DEFUN([_LT_WITH_SYSROOT],
2276[AC_MSG_CHECKING([for sysroot])
2277AC_ARG_WITH([sysroot],
2278[ --with-sysroot[=DIR] Search for dependent libraries within DIR
2279 (or the compiler's sysroot if not specified).],
2280[], [with_sysroot=no])
2281
2282dnl lt_sysroot will always be passed unquoted. We quote it here
2283dnl in case the user passed a directory name.
2284lt_sysroot=
2285case ${with_sysroot} in #(
2286 yes)
2287 if test "$GCC" = yes; then
2288 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2289 fi
2290 ;; #(
2291 /*)
2292 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2293 ;; #(
2294 no|'')
2295 ;; #(
2296 *)
2297 AC_MSG_RESULT([${with_sysroot}])
2298 AC_MSG_ERROR([The sysroot must be an absolute path.])
2299 ;;
2300esac
2301
2302 AC_MSG_RESULT([${lt_sysroot:-no}])
2303_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2304[dependent libraries, and in which our libraries should be installed.])])
2305
96dc8a45
DB
2306# _LT_ENABLE_LOCK
2307# ---------------
2308m4_defun([_LT_ENABLE_LOCK],
2309[AC_ARG_ENABLE([libtool-lock],
2310 [AS_HELP_STRING([--disable-libtool-lock],
2311 [avoid locking (might break parallel builds)])])
2312test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6cc5e1a6 2313
96dc8a45
DB
2314# Some flags need to be propagated to the compiler or linker for good
2315# libtool support.
2316case $host in
2317ia64-*-hpux*)
2318 # Find out which ABI we are using.
2319 echo 'int i;' > conftest.$ac_ext
2320 if AC_TRY_EVAL(ac_compile); then
2321 case `/usr/bin/file conftest.$ac_objext` in
2322 *ELF-32*)
2323 HPUX_IA64_MODE="32"
2324 ;;
2325 *ELF-64*)
2326 HPUX_IA64_MODE="64"
2327 ;;
2328 esac
6cc5e1a6 2329 fi
96dc8a45
DB
2330 rm -rf conftest*
2331 ;;
2332*-*-irix6*)
2333 # Find out which ABI we are using.
4652f59b 2334 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
96dc8a45
DB
2335 if AC_TRY_EVAL(ac_compile); then
2336 if test "$lt_cv_prog_gnu_ld" = yes; then
2337 case `/usr/bin/file conftest.$ac_objext` in
2338 *32-bit*)
2339 LD="${LD-ld} -melf32bsmip"
2340 ;;
2341 *N32*)
2342 LD="${LD-ld} -melf32bmipn32"
2343 ;;
2344 *64-bit*)
2345 LD="${LD-ld} -melf64bmip"
2346 ;;
2347 esac
6cc5e1a6 2348 else
96dc8a45
DB
2349 case `/usr/bin/file conftest.$ac_objext` in
2350 *32-bit*)
2351 LD="${LD-ld} -32"
2352 ;;
2353 *N32*)
2354 LD="${LD-ld} -n32"
2355 ;;
2356 *64-bit*)
2357 LD="${LD-ld} -64"
2358 ;;
2359 esac
6cc5e1a6 2360 fi
96dc8a45
DB
2361 fi
2362 rm -rf conftest*
2363 ;;
6cc5e1a6 2364
96dc8a45
DB
2365x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2366s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2367 # Find out which ABI we are using.
2368 echo 'int i;' > conftest.$ac_ext
2369 if AC_TRY_EVAL(ac_compile); then
2370 case `/usr/bin/file conftest.o` in
2371 *32-bit*)
2372 case $host in
2373 x86_64-*kfreebsd*-gnu)
2374 LD="${LD-ld} -m elf_i386_fbsd"
2375 ;;
2376 x86_64-*linux*)
2377 LD="${LD-ld} -m elf_i386"
2378 ;;
2379 ppc64-*linux*|powerpc64-*linux*)
2380 LD="${LD-ld} -m elf32ppclinux"
2381 ;;
2382 s390x-*linux*)
2383 LD="${LD-ld} -m elf_s390"
2384 ;;
2385 sparc64-*linux*)
2386 LD="${LD-ld} -m elf32_sparc"
2387 ;;
2388 esac
2389 ;;
2390 *64-bit*)
2391 case $host in
2392 x86_64-*kfreebsd*-gnu)
2393 LD="${LD-ld} -m elf_x86_64_fbsd"
2394 ;;
2395 x86_64-*linux*)
2396 LD="${LD-ld} -m elf_x86_64"
2397 ;;
2398 ppc*-*linux*|powerpc*-*linux*)
2399 LD="${LD-ld} -m elf64ppc"
2400 ;;
2401 s390*-*linux*|s390*-*tpf*)
2402 LD="${LD-ld} -m elf64_s390"
2403 ;;
2404 sparc*-*linux*)
2405 LD="${LD-ld} -m elf64_sparc"
2406 ;;
2407 esac
2408 ;;
2409 esac
2410 fi
2411 rm -rf conftest*
6cc5e1a6
DB
2412 ;;
2413
96dc8a45
DB
2414*-*-sco3.2v5*)
2415 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2416 SAVE_CFLAGS="$CFLAGS"
2417 CFLAGS="$CFLAGS -belf"
2418 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2419 [AC_LANG_PUSH(C)
2420 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2421 AC_LANG_POP])
2422 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2423 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2424 CFLAGS="$SAVE_CFLAGS"
2425 fi
2426 ;;
514580cf 2427*-*solaris*)
96dc8a45
DB
2428 # Find out which ABI we are using.
2429 echo 'int i;' > conftest.$ac_ext
2430 if AC_TRY_EVAL(ac_compile); then
2431 case `/usr/bin/file conftest.o` in
2432 *64-bit*)
2433 case $lt_cv_prog_gnu_ld in
514580cf
DB
2434 yes*)
2435 case $host in
2436 i?86-*-solaris*)
2437 LD="${LD-ld} -m elf_x86_64"
2438 ;;
2439 sparc*-*-solaris*)
2440 LD="${LD-ld} -m elf64_sparc"
2441 ;;
2442 esac
2443 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
2444 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
2445 LD="${LD-ld}_sol2"
2446 fi
2447 ;;
96dc8a45
DB
2448 *)
2449 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2450 LD="${LD-ld} -64"
2451 fi
2452 ;;
2453 esac
6cc5e1a6
DB
2454 ;;
2455 esac
6cc5e1a6 2456 fi
96dc8a45 2457 rm -rf conftest*
6cc5e1a6 2458 ;;
96dc8a45 2459esac
6cc5e1a6 2460
96dc8a45
DB
2461need_locks="$enable_libtool_lock"
2462])# _LT_ENABLE_LOCK
6cc5e1a6 2463
6cc5e1a6 2464
cb7f7ba8
DB
2465# _LT_PROG_AR
2466# -----------
2467m4_defun([_LT_PROG_AR],
2468[AC_CHECK_TOOLS(AR, [ar], false)
2469: ${AR=ar}
2470: ${AR_FLAGS=cru}
2471_LT_DECL([], [AR], [1], [The archiver])
2472_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2473
2474AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2475 [lt_cv_ar_at_file=no
2476 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2477 [echo conftest.$ac_objext > conftest.lst
2478 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2479 AC_TRY_EVAL([lt_ar_try])
2480 if test "$ac_status" -eq 0; then
2481 # Ensure the archiver fails upon bogus file names.
2482 rm -f conftest.$ac_objext libconftest.a
2483 AC_TRY_EVAL([lt_ar_try])
2484 if test "$ac_status" -ne 0; then
2485 lt_cv_ar_at_file=@
2486 fi
2487 fi
2488 rm -f conftest.* libconftest.a
2489 ])
2490 ])
2491
2492if test "x$lt_cv_ar_at_file" = xno; then
2493 archiver_list_spec=
2494else
2495 archiver_list_spec=$lt_cv_ar_at_file
2496fi
2497_LT_DECL([], [archiver_list_spec], [1],
2498 [How to feed a file listing to the archiver])
2499])# _LT_PROG_AR
2500
2501
96dc8a45
DB
2502# _LT_CMD_OLD_ARCHIVE
2503# -------------------
2504m4_defun([_LT_CMD_OLD_ARCHIVE],
cb7f7ba8 2505[_LT_PROG_AR
6cc5e1a6 2506
96dc8a45
DB
2507AC_CHECK_TOOL(STRIP, strip, :)
2508test -z "$STRIP" && STRIP=:
2509_LT_DECL([], [STRIP], [1], [A symbol stripping program])
6cc5e1a6 2510
96dc8a45
DB
2511AC_CHECK_TOOL(RANLIB, ranlib, :)
2512test -z "$RANLIB" && RANLIB=:
2513_LT_DECL([], [RANLIB], [1],
2514 [Commands used to install an old-style archive])
6cc5e1a6 2515
96dc8a45
DB
2516# Determine commands to create old-style static archives.
2517old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2518old_postinstall_cmds='chmod 644 $oldlib'
2519old_postuninstall_cmds=
6cc5e1a6 2520
96dc8a45
DB
2521if test -n "$RANLIB"; then
2522 case $host_os in
2523 openbsd*)
514580cf 2524 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
96dc8a45 2525 ;;
6cc5e1a6 2526 *)
514580cf 2527 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
6cc5e1a6
DB
2528 ;;
2529 esac
514580cf 2530 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
96dc8a45 2531fi
4652f59b
DB
2532
2533case $host_os in
2534 darwin*)
2535 lock_old_archive_extraction=yes ;;
2536 *)
2537 lock_old_archive_extraction=no ;;
2538esac
96dc8a45
DB
2539_LT_DECL([], [old_postinstall_cmds], [2])
2540_LT_DECL([], [old_postuninstall_cmds], [2])
2541_LT_TAGDECL([], [old_archive_cmds], [2],
2542 [Commands used to build an old-style archive])
4652f59b
DB
2543_LT_DECL([], [lock_old_archive_extraction], [0],
2544 [Whether to use a lock for old archive extraction])
96dc8a45 2545])# _LT_CMD_OLD_ARCHIVE
6cc5e1a6 2546
6cc5e1a6 2547
96dc8a45
DB
2548# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2549# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2550# ----------------------------------------------------------------
2551# Check whether the given compiler option works
2552AC_DEFUN([_LT_COMPILER_OPTION],
2553[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2554m4_require([_LT_DECL_SED])dnl
2555AC_CACHE_CHECK([$1], [$2],
2556 [$2=no
2557 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2558 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2559 lt_compiler_flag="$3"
2560 # Insert the option either (1) after the last *FLAGS variable, or
2561 # (2) before a word containing "conftest.", or (3) at the end.
2562 # Note that $ac_compile itself does not contain backslashes and begins
2563 # with a dollar sign (not a hyphen), so the echo should work correctly.
2564 # The option is referenced via a variable to avoid confusing sed.
2565 lt_compile=`echo "$ac_compile" | $SED \
2566 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2567 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2568 -e 's:$: $lt_compiler_flag:'`
4652f59b 2569 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
96dc8a45
DB
2570 (eval "$lt_compile" 2>conftest.err)
2571 ac_status=$?
2572 cat conftest.err >&AS_MESSAGE_LOG_FD
4652f59b 2573 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
96dc8a45
DB
2574 if (exit $ac_status) && test -s "$ac_outfile"; then
2575 # The compiler can only warn and ignore the option if not recognized
2576 # So say no if there are warnings other than the usual output.
4652f59b 2577 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
96dc8a45
DB
2578 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2579 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2580 $2=yes
2581 fi
2582 fi
2583 $RM conftest*
2584])
6cc5e1a6 2585
96dc8a45
DB
2586if test x"[$]$2" = xyes; then
2587 m4_if([$5], , :, [$5])
2588else
2589 m4_if([$6], , :, [$6])
2590fi
2591])# _LT_COMPILER_OPTION
2592
2593# Old name:
2594AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2595dnl aclocal-1.4 backwards compatibility:
2596dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2597
2598
2599# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2600# [ACTION-SUCCESS], [ACTION-FAILURE])
2601# ----------------------------------------------------
2602# Check whether the given linker option works
2603AC_DEFUN([_LT_LINKER_OPTION],
2604[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2605m4_require([_LT_DECL_SED])dnl
2606AC_CACHE_CHECK([$1], [$2],
2607 [$2=no
2608 save_LDFLAGS="$LDFLAGS"
2609 LDFLAGS="$LDFLAGS $3"
2610 echo "$lt_simple_link_test_code" > conftest.$ac_ext
2611 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2612 # The linker can only warn and ignore the option if not recognized
2613 # So say no if there are warnings
2614 if test -s conftest.err; then
2615 # Append any errors to the config.log.
2616 cat conftest.err 1>&AS_MESSAGE_LOG_FD
4652f59b 2617 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
96dc8a45
DB
2618 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2619 if diff conftest.exp conftest.er2 >/dev/null; then
2620 $2=yes
2621 fi
2622 else
2623 $2=yes
2624 fi
2625 fi
2626 $RM -r conftest*
2627 LDFLAGS="$save_LDFLAGS"
2628])
2629
2630if test x"[$]$2" = xyes; then
2631 m4_if([$4], , :, [$4])
2632else
2633 m4_if([$5], , :, [$5])
2634fi
2635])# _LT_LINKER_OPTION
2636
2637# Old name:
2638AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2639dnl aclocal-1.4 backwards compatibility:
2640dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2641
2642
2643# LT_CMD_MAX_LEN
2644#---------------
2645AC_DEFUN([LT_CMD_MAX_LEN],
2646[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2647# find the maximum length of command line arguments
2648AC_MSG_CHECKING([the maximum length of command line arguments])
2649AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2650 i=0
2651 teststring="ABCD"
2652
2653 case $build_os in
2654 msdosdjgpp*)
2655 # On DJGPP, this test can blow up pretty badly due to problems in libc
2656 # (any single argument exceeding 2000 bytes causes a buffer overrun
2657 # during glob expansion). Even if it were fixed, the result of this
2658 # check would be larger than it should be.
2659 lt_cv_sys_max_cmd_len=12288; # 12K is about right
6cc5e1a6 2660 ;;
96dc8a45
DB
2661
2662 gnu*)
2663 # Under GNU Hurd, this test is not required because there is
2664 # no limit to the length of command line arguments.
2665 # Libtool will interpret -1 as no limit whatsoever
2666 lt_cv_sys_max_cmd_len=-1;
6cc5e1a6 2667 ;;
96dc8a45 2668
7486d297 2669 cygwin* | mingw* | cegcc*)
96dc8a45
DB
2670 # On Win9x/ME, this test blows up -- it succeeds, but takes
2671 # about 5 minutes as the teststring grows exponentially.
2672 # Worse, since 9x/ME are not pre-emptively multitasking,
2673 # you end up with a "frozen" computer, even though with patience
2674 # the test eventually succeeds (with a max line length of 256k).
2675 # Instead, let's just punt: use the minimum linelength reported by
2676 # all of the supported platforms: 8192 (on NT/2K/XP).
2677 lt_cv_sys_max_cmd_len=8192;
6cc5e1a6 2678 ;;
96dc8a45 2679
4652f59b
DB
2680 mint*)
2681 # On MiNT this can take a long time and run out of memory.
2682 lt_cv_sys_max_cmd_len=8192;
2683 ;;
2684
96dc8a45
DB
2685 amigaos*)
2686 # On AmigaOS with pdksh, this test takes hours, literally.
2687 # So we just punt and use a minimum line length of 8192.
2688 lt_cv_sys_max_cmd_len=8192;
6cc5e1a6 2689 ;;
6cc5e1a6 2690
96dc8a45
DB
2691 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2692 # This has been around since 386BSD, at least. Likely further.
2693 if test -x /sbin/sysctl; then
2694 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2695 elif test -x /usr/sbin/sysctl; then
2696 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2697 else
2698 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
2699 fi
2700 # And add a safety zone
2701 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2702 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2703 ;;
6cc5e1a6 2704
96dc8a45
DB
2705 interix*)
2706 # We know the value 262144 and hardcode it with a safety zone (like BSD)
2707 lt_cv_sys_max_cmd_len=196608
2708 ;;
2709
514580cf
DB
2710 os2*)
2711 # The test takes a long time on OS/2.
2712 lt_cv_sys_max_cmd_len=8192
2713 ;;
2714
96dc8a45
DB
2715 osf*)
2716 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2717 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2718 # nice to cause kernel panics so lets avoid the loop below.
2719 # First set a reasonable default.
2720 lt_cv_sys_max_cmd_len=16384
2721 #
2722 if test -x /sbin/sysconfig; then
2723 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2724 *1*) lt_cv_sys_max_cmd_len=-1 ;;
2725 esac
2726 fi
2727 ;;
2728 sco3.2v5*)
2729 lt_cv_sys_max_cmd_len=102400
2730 ;;
2731 sysv5* | sco5v6* | sysv4.2uw2*)
2732 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2733 if test -n "$kargmax"; then
2734 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
6cc5e1a6 2735 else
96dc8a45 2736 lt_cv_sys_max_cmd_len=32768
6cc5e1a6 2737 fi
6cc5e1a6 2738 ;;
96dc8a45
DB
2739 *)
2740 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2741 if test -n "$lt_cv_sys_max_cmd_len"; then
2742 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2743 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2744 else
2745 # Make teststring a little bigger before we do anything with it.
2746 # a 1K string should be a reasonable start.
2747 for i in 1 2 3 4 5 6 7 8 ; do
2748 teststring=$teststring$teststring
2749 done
2750 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2751 # If test is not a shell built-in, we'll probably end up computing a
2752 # maximum length that is only half of the actual maximum length, but
2753 # we can't tell.
514580cf 2754 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
4652f59b 2755 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
96dc8a45
DB
2756 test $i != 17 # 1/2 MB should be enough
2757 do
2758 i=`expr $i + 1`
2759 teststring=$teststring$teststring
2760 done
2761 # Only check the string length outside the loop.
2762 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2763 teststring=
2764 # Add a significant safety factor because C++ compilers can tack on
2765 # massive amounts of additional arguments before passing them to the
2766 # linker. It appears as though 1/2 is a usable value.
2767 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2768 fi
6cc5e1a6
DB
2769 ;;
2770 esac
96dc8a45
DB
2771])
2772if test -n $lt_cv_sys_max_cmd_len ; then
2773 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2774else
2775 AC_MSG_RESULT(none)
2776fi
2777max_cmd_len=$lt_cv_sys_max_cmd_len
2778_LT_DECL([], [max_cmd_len], [0],
2779 [What is the maximum length of a command?])
2780])# LT_CMD_MAX_LEN
6cc5e1a6 2781
96dc8a45
DB
2782# Old name:
2783AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2784dnl aclocal-1.4 backwards compatibility:
2785dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
6cc5e1a6 2786
6cc5e1a6 2787
96dc8a45
DB
2788# _LT_HEADER_DLFCN
2789# ----------------
2790m4_defun([_LT_HEADER_DLFCN],
2791[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2792])# _LT_HEADER_DLFCN
6cc5e1a6 2793
6cc5e1a6 2794
96dc8a45
DB
2795# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2796# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2797# ----------------------------------------------------------------
2798m4_defun([_LT_TRY_DLOPEN_SELF],
2799[m4_require([_LT_HEADER_DLFCN])dnl
2800if test "$cross_compiling" = yes; then :
2801 [$4]
2802else
2803 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2804 lt_status=$lt_dlunknown
2805 cat > conftest.$ac_ext <<_LT_EOF
4652f59b 2806[#line $LINENO "configure"
96dc8a45 2807#include "confdefs.h"
6cc5e1a6 2808
96dc8a45
DB
2809#if HAVE_DLFCN_H
2810#include <dlfcn.h>
2811#endif
6cc5e1a6 2812
96dc8a45 2813#include <stdio.h>
6cc5e1a6 2814
96dc8a45
DB
2815#ifdef RTLD_GLOBAL
2816# define LT_DLGLOBAL RTLD_GLOBAL
2817#else
2818# ifdef DL_GLOBAL
2819# define LT_DLGLOBAL DL_GLOBAL
2820# else
2821# define LT_DLGLOBAL 0
2822# endif
2823#endif
6cc5e1a6 2824
96dc8a45
DB
2825/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2826 find out it does not work in some platform. */
2827#ifndef LT_DLLAZY_OR_NOW
2828# ifdef RTLD_LAZY
2829# define LT_DLLAZY_OR_NOW RTLD_LAZY
2830# else
2831# ifdef DL_LAZY
2832# define LT_DLLAZY_OR_NOW DL_LAZY
2833# else
2834# ifdef RTLD_NOW
2835# define LT_DLLAZY_OR_NOW RTLD_NOW
2836# else
2837# ifdef DL_NOW
2838# define LT_DLLAZY_OR_NOW DL_NOW
2839# else
2840# define LT_DLLAZY_OR_NOW 0
2841# endif
2842# endif
2843# endif
2844# endif
2845#endif
6cc5e1a6 2846
4652f59b
DB
2847/* When -fvisbility=hidden is used, assume the code has been annotated
2848 correspondingly for the symbols needed. */
2849#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
cb7f7ba8 2850int fnord () __attribute__((visibility("default")));
4652f59b
DB
2851#endif
2852
cb7f7ba8 2853int fnord () { return 42; }
96dc8a45
DB
2854int main ()
2855{
2856 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2857 int status = $lt_dlunknown;
2858
2859 if (self)
2860 {
2861 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
4652f59b
DB
2862 else
2863 {
2864 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2865 else puts (dlerror ());
2866 }
96dc8a45
DB
2867 /* dlclose (self); */
2868 }
6cc5e1a6 2869 else
96dc8a45 2870 puts (dlerror ());
6cc5e1a6 2871
7486d297 2872 return status;
96dc8a45
DB
2873}]
2874_LT_EOF
2875 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2876 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2877 lt_status=$?
2878 case x$lt_status in
2879 x$lt_dlno_uscore) $1 ;;
2880 x$lt_dlneed_uscore) $2 ;;
2881 x$lt_dlunknown|x*) $3 ;;
2882 esac
2883 else :
2884 # compilation failed
2885 $3
2886 fi
2887fi
2888rm -fr conftest*
2889])# _LT_TRY_DLOPEN_SELF
6cc5e1a6 2890
6cc5e1a6 2891
96dc8a45
DB
2892# LT_SYS_DLOPEN_SELF
2893# ------------------
2894AC_DEFUN([LT_SYS_DLOPEN_SELF],
2895[m4_require([_LT_HEADER_DLFCN])dnl
2896if test "x$enable_dlopen" != xyes; then
2897 enable_dlopen=unknown
2898 enable_dlopen_self=unknown
2899 enable_dlopen_self_static=unknown
2900else
2901 lt_cv_dlopen=no
2902 lt_cv_dlopen_libs=
6cc5e1a6 2903
96dc8a45
DB
2904 case $host_os in
2905 beos*)
2906 lt_cv_dlopen="load_add_on"
2907 lt_cv_dlopen_libs=
2908 lt_cv_dlopen_self=yes
2909 ;;
6cc5e1a6 2910
7486d297 2911 mingw* | pw32* | cegcc*)
96dc8a45
DB
2912 lt_cv_dlopen="LoadLibrary"
2913 lt_cv_dlopen_libs=
2914 ;;
6cc5e1a6 2915
96dc8a45
DB
2916 cygwin*)
2917 lt_cv_dlopen="dlopen"
2918 lt_cv_dlopen_libs=
2919 ;;
6cc5e1a6 2920
96dc8a45
DB
2921 darwin*)
2922 # if libdl is installed we need to link against it
2923 AC_CHECK_LIB([dl], [dlopen],
2924 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2925 lt_cv_dlopen="dyld"
2926 lt_cv_dlopen_libs=
2927 lt_cv_dlopen_self=yes
2928 ])
2929 ;;
6cc5e1a6 2930
96dc8a45
DB
2931 *)
2932 AC_CHECK_FUNC([shl_load],
2933 [lt_cv_dlopen="shl_load"],
2934 [AC_CHECK_LIB([dld], [shl_load],
2935 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2936 [AC_CHECK_FUNC([dlopen],
2937 [lt_cv_dlopen="dlopen"],
2938 [AC_CHECK_LIB([dl], [dlopen],
2939 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2940 [AC_CHECK_LIB([svld], [dlopen],
2941 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2942 [AC_CHECK_LIB([dld], [dld_link],
2943 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2944 ])
2945 ])
2946 ])
2947 ])
2948 ])
2949 ;;
2950 esac
2951
2952 if test "x$lt_cv_dlopen" != xno; then
2953 enable_dlopen=yes
6cc5e1a6 2954 else
96dc8a45 2955 enable_dlopen=no
6cc5e1a6 2956 fi
6cc5e1a6 2957
96dc8a45
DB
2958 case $lt_cv_dlopen in
2959 dlopen)
2960 save_CPPFLAGS="$CPPFLAGS"
2961 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
39c13576 2962
96dc8a45
DB
2963 save_LDFLAGS="$LDFLAGS"
2964 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6cc5e1a6 2965
96dc8a45
DB
2966 save_LIBS="$LIBS"
2967 LIBS="$lt_cv_dlopen_libs $LIBS"
6cc5e1a6 2968
96dc8a45
DB
2969 AC_CACHE_CHECK([whether a program can dlopen itself],
2970 lt_cv_dlopen_self, [dnl
2971 _LT_TRY_DLOPEN_SELF(
2972 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2973 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2974 ])
6cc5e1a6 2975
96dc8a45
DB
2976 if test "x$lt_cv_dlopen_self" = xyes; then
2977 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2978 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2979 lt_cv_dlopen_self_static, [dnl
2980 _LT_TRY_DLOPEN_SELF(
2981 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2982 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2983 ])
6cc5e1a6 2984 fi
6cc5e1a6 2985
96dc8a45
DB
2986 CPPFLAGS="$save_CPPFLAGS"
2987 LDFLAGS="$save_LDFLAGS"
2988 LIBS="$save_LIBS"
2989 ;;
2990 esac
6cc5e1a6 2991
96dc8a45
DB
2992 case $lt_cv_dlopen_self in
2993 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2994 *) enable_dlopen_self=unknown ;;
2995 esac
6cc5e1a6 2996
96dc8a45
DB
2997 case $lt_cv_dlopen_self_static in
2998 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2999 *) enable_dlopen_self_static=unknown ;;
3000 esac
3001fi
3002_LT_DECL([dlopen_support], [enable_dlopen], [0],
3003 [Whether dlopen is supported])
3004_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3005 [Whether dlopen of programs is supported])
3006_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3007 [Whether dlopen of statically linked programs is supported])
3008])# LT_SYS_DLOPEN_SELF
6cc5e1a6 3009
96dc8a45
DB
3010# Old name:
3011AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3012dnl aclocal-1.4 backwards compatibility:
3013dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
6cc5e1a6 3014
6cc5e1a6 3015
96dc8a45
DB
3016# _LT_COMPILER_C_O([TAGNAME])
3017# ---------------------------
3018# Check to see if options -c and -o are simultaneously supported by compiler.
3019# This macro does not hard code the compiler like AC_PROG_CC_C_O.
3020m4_defun([_LT_COMPILER_C_O],
3021[m4_require([_LT_DECL_SED])dnl
3022m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3023m4_require([_LT_TAG_COMPILER])dnl
3024AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3025 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3026 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3027 $RM -r conftest 2>/dev/null
3028 mkdir conftest
3029 cd conftest
3030 mkdir out
3031 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6cc5e1a6 3032
96dc8a45
DB
3033 lt_compiler_flag="-o out/conftest2.$ac_objext"
3034 # Insert the option either (1) after the last *FLAGS variable, or
3035 # (2) before a word containing "conftest.", or (3) at the end.
3036 # Note that $ac_compile itself does not contain backslashes and begins
3037 # with a dollar sign (not a hyphen), so the echo should work correctly.
3038 lt_compile=`echo "$ac_compile" | $SED \
3039 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3040 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3041 -e 's:$: $lt_compiler_flag:'`
4652f59b 3042 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
96dc8a45
DB
3043 (eval "$lt_compile" 2>out/conftest.err)
3044 ac_status=$?
3045 cat out/conftest.err >&AS_MESSAGE_LOG_FD
4652f59b 3046 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
96dc8a45
DB
3047 if (exit $ac_status) && test -s out/conftest2.$ac_objext
3048 then
3049 # The compiler can only warn and ignore the option if not recognized
3050 # So say no if there are warnings
4652f59b 3051 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
96dc8a45
DB
3052 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3053 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3054 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3055 fi
3056 fi
3057 chmod u+w . 2>&AS_MESSAGE_LOG_FD
3058 $RM conftest*
3059 # SGI C++ compiler will create directory out/ii_files/ for
3060 # template instantiation
3061 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3062 $RM out/* && rmdir out
3063 cd ..
3064 $RM -r conftest
3065 $RM conftest*
3066])
3067_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3068 [Does compiler simultaneously support -c and -o options?])
3069])# _LT_COMPILER_C_O
6cc5e1a6 3070
6cc5e1a6 3071
96dc8a45
DB
3072# _LT_COMPILER_FILE_LOCKS([TAGNAME])
3073# ----------------------------------
3074# Check to see if we can do hard links to lock some files if needed
3075m4_defun([_LT_COMPILER_FILE_LOCKS],
3076[m4_require([_LT_ENABLE_LOCK])dnl
3077m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3078_LT_COMPILER_C_O([$1])
6cc5e1a6 3079
96dc8a45
DB
3080hard_links="nottested"
3081if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3082 # do not overwrite the value of need_locks provided by the user
3083 AC_MSG_CHECKING([if we can lock with hard links])
3084 hard_links=yes
3085 $RM conftest*
3086 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3087 touch conftest.a
3088 ln conftest.a conftest.b 2>&5 || hard_links=no
3089 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3090 AC_MSG_RESULT([$hard_links])
3091 if test "$hard_links" = no; then
3092 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3093 need_locks=warn
6cc5e1a6 3094 fi
96dc8a45
DB
3095else
3096 need_locks=no
6cc5e1a6 3097fi
96dc8a45
DB
3098_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3099])# _LT_COMPILER_FILE_LOCKS
6cc5e1a6
DB
3100
3101
96dc8a45
DB
3102# _LT_CHECK_OBJDIR
3103# ----------------
3104m4_defun([_LT_CHECK_OBJDIR],
3105[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3106[rm -f .libs 2>/dev/null
3107mkdir .libs 2>/dev/null
3108if test -d .libs; then
3109 lt_cv_objdir=.libs
3110else
3111 # MS-DOS does not allow filenames that begin with a dot.
3112 lt_cv_objdir=_libs
3113fi
3114rmdir .libs 2>/dev/null])
3115objdir=$lt_cv_objdir
3116_LT_DECL([], [objdir], [0],
3117 [The name of the directory that contains temporary libtool files])dnl
3118m4_pattern_allow([LT_OBJDIR])dnl
3119AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3120 [Define to the sub-directory in which libtool stores uninstalled libraries.])
3121])# _LT_CHECK_OBJDIR
6cc5e1a6
DB
3122
3123
96dc8a45
DB
3124# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3125# --------------------------------------
3126# Check hardcoding attributes.
3127m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3128[AC_MSG_CHECKING([how to hardcode library paths into programs])
3129_LT_TAGVAR(hardcode_action, $1)=
3130if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3131 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3132 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
6cc5e1a6 3133
96dc8a45
DB
3134 # We can hardcode non-existent directories.
3135 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3136 # If the only mechanism to avoid hardcoding is shlibpath_var, we
3137 # have to relink, otherwise we might link with an installed library
3138 # when we should be linking with a yet-to-be-installed one
3139 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3140 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3141 # Linking always hardcodes the temporary library directory.
3142 _LT_TAGVAR(hardcode_action, $1)=relink
3143 else
3144 # We can link without hardcoding, and we can hardcode nonexisting dirs.
3145 _LT_TAGVAR(hardcode_action, $1)=immediate
3146 fi
3147else
3148 # We cannot hardcode anything, or else we can only hardcode existing
3149 # directories.
3150 _LT_TAGVAR(hardcode_action, $1)=unsupported
3151fi
3152AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
6cc5e1a6 3153
96dc8a45
DB
3154if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3155 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3156 # Fast installation is not supported
3157 enable_fast_install=no
3158elif test "$shlibpath_overrides_runpath" = yes ||
3159 test "$enable_shared" = no; then
3160 # Fast installation is not necessary
3161 enable_fast_install=needless
3162fi
3163_LT_TAGDECL([], [hardcode_action], [0],
3164 [How to hardcode a shared library path into an executable])
3165])# _LT_LINKER_HARDCODE_LIBPATH
6cc5e1a6
DB
3166
3167
96dc8a45
DB
3168# _LT_CMD_STRIPLIB
3169# ----------------
3170m4_defun([_LT_CMD_STRIPLIB],
3171[m4_require([_LT_DECL_EGREP])
3172striplib=
3173old_striplib=
3174AC_MSG_CHECKING([whether stripping libraries is possible])
3175if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3176 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3177 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3178 AC_MSG_RESULT([yes])
3179else
3180# FIXME - insert some real tests, host_os isn't really good enough
3181 case $host_os in
3182 darwin*)
3183 if test -n "$STRIP" ; then
3184 striplib="$STRIP -x"
3185 old_striplib="$STRIP -S"
3186 AC_MSG_RESULT([yes])
3187 else
3188 AC_MSG_RESULT([no])
3189 fi
3190 ;;
3191 *)
3192 AC_MSG_RESULT([no])
3193 ;;
3194 esac
3195fi
3196_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3197_LT_DECL([], [striplib], [1])
3198])# _LT_CMD_STRIPLIB
6cc5e1a6
DB
3199
3200
96dc8a45
DB
3201# _LT_SYS_DYNAMIC_LINKER([TAG])
3202# -----------------------------
3203# PORTME Fill in your ld.so characteristics
3204m4_defun([_LT_SYS_DYNAMIC_LINKER],
3205[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3206m4_require([_LT_DECL_EGREP])dnl
3207m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7486d297 3208m4_require([_LT_DECL_OBJDUMP])dnl
96dc8a45 3209m4_require([_LT_DECL_SED])dnl
4652f59b 3210m4_require([_LT_CHECK_SHELL_FEATURES])dnl
96dc8a45
DB
3211AC_MSG_CHECKING([dynamic linker characteristics])
3212m4_if([$1],
3213 [], [
3214if test "$GCC" = yes; then
3215 case $host_os in
3216 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3217 *) lt_awk_arg="/^libraries:/" ;;
3218 esac
4652f59b
DB
3219 case $host_os in
3220 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3221 *) lt_sed_strip_eq="s,=/,/,g" ;;
3222 esac
3223 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3224 case $lt_search_path_spec in
3225 *\;*)
96dc8a45
DB
3226 # if the path contains ";" then we assume it to be the separator
3227 # otherwise default to the standard path separator (i.e. ":") - it is
3228 # assumed that no part of a normal pathname contains ";" but that should
3229 # okay in the real world where ";" in dirpaths is itself problematic.
4652f59b
DB
3230 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3231 ;;
3232 *)
3233 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3234 ;;
3235 esac
96dc8a45
DB
3236 # Ok, now we have the path, separated by spaces, we can step through it
3237 # and add multilib dir if necessary.
3238 lt_tmp_lt_search_path_spec=
3239 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3240 for lt_sys_path in $lt_search_path_spec; do
3241 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3242 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3243 else
3244 test -d "$lt_sys_path" && \
3245 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3246 fi
3247 done
4652f59b 3248 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
96dc8a45
DB
3249BEGIN {RS=" "; FS="/|\n";} {
3250 lt_foo="";
3251 lt_count=0;
3252 for (lt_i = NF; lt_i > 0; lt_i--) {
3253 if ($lt_i != "" && $lt_i != ".") {
3254 if ($lt_i == "..") {
3255 lt_count++;
3256 } else {
3257 if (lt_count == 0) {
3258 lt_foo="/" $lt_i lt_foo;
3259 } else {
3260 lt_count--;
3261 }
3262 }
3263 }
3264 }
3265 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3266 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3267}'`
4652f59b
DB
3268 # AWK program above erroneously prepends '/' to C:/dos/paths
3269 # for these hosts.
3270 case $host_os in
3271 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3272 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3273 esac
3274 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
96dc8a45
DB
3275else
3276 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3277fi])
3278library_names_spec=
3279libname_spec='lib$name'
3280soname_spec=
3281shrext_cmds=".so"
3282postinstall_cmds=
3283postuninstall_cmds=
3284finish_cmds=
3285finish_eval=
3286shlibpath_var=
3287shlibpath_overrides_runpath=unknown
3288version_type=none
3289dynamic_linker="$host_os ld.so"
3290sys_lib_dlsearch_path_spec="/lib /usr/lib"
3291need_lib_prefix=unknown
3292hardcode_into_libs=no
6cc5e1a6 3293
96dc8a45
DB
3294# when you set need_version to no, make sure it does not cause -set_version
3295# flags to be left without arguments
3296need_version=unknown
6cc5e1a6 3297
96dc8a45
DB
3298case $host_os in
3299aix3*)
514580cf 3300 version_type=linux # correct to gnu/linux during the next big refactor
96dc8a45
DB
3301 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3302 shlibpath_var=LIBPATH
6cc5e1a6 3303
96dc8a45
DB
3304 # AIX 3 has no versioning support, so we append a major version to the name.
3305 soname_spec='${libname}${release}${shared_ext}$major'
3306 ;;
6cc5e1a6 3307
96dc8a45 3308aix[[4-9]]*)
514580cf 3309 version_type=linux # correct to gnu/linux during the next big refactor
96dc8a45
DB
3310 need_lib_prefix=no
3311 need_version=no
3312 hardcode_into_libs=yes
3313 if test "$host_cpu" = ia64; then
3314 # AIX 5 supports IA64
3315 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3316 shlibpath_var=LD_LIBRARY_PATH
3317 else
3318 # With GCC up to 2.95.x, collect2 would create an import file
3319 # for dependence libraries. The import file would start with
3320 # the line `#! .'. This would cause the generated library to
3321 # depend on `.', always an invalid library. This was fixed in
3322 # development snapshots of GCC prior to 3.0.
3323 case $host_os in
3324 aix4 | aix4.[[01]] | aix4.[[01]].*)
3325 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3326 echo ' yes '
3327 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3328 :
3329 else
3330 can_build_shared=no
3331 fi
6cc5e1a6 3332 ;;
96dc8a45
DB
3333 esac
3334 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3335 # soname into executable. Probably we can add versioning support to
3336 # collect2, so additional links can be useful in future.
3337 if test "$aix_use_runtimelinking" = yes; then
3338 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3339 # instead of lib<name>.a to let people know that these are not
3340 # typical AIX shared libraries.
3341 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3342 else
3343 # We preserve .a as extension for shared libraries through AIX4.2
3344 # and later when we are not doing run time linking.
3345 library_names_spec='${libname}${release}.a $libname.a'
3346 soname_spec='${libname}${release}${shared_ext}$major'
3347 fi
3348 shlibpath_var=LIBPATH
3349 fi
3350 ;;
6cc5e1a6 3351
96dc8a45
DB
3352amigaos*)
3353 case $host_cpu in
3354 powerpc)
3355 # Since July 2007 AmigaOS4 officially supports .so libraries.
3356 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3357 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3358 ;;
3359 m68k)
3360 library_names_spec='$libname.ixlibrary $libname.a'
3361 # Create ${libname}_ixlibrary.a entries in /sys/libs.
4652f59b 3362 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
96dc8a45
DB
3363 ;;
3364 esac
3365 ;;
6cc5e1a6 3366
96dc8a45
DB
3367beos*)
3368 library_names_spec='${libname}${shared_ext}'
3369 dynamic_linker="$host_os ld.so"
3370 shlibpath_var=LIBRARY_PATH
3371 ;;
6cc5e1a6 3372
96dc8a45 3373bsdi[[45]]*)
514580cf 3374 version_type=linux # correct to gnu/linux during the next big refactor
96dc8a45
DB
3375 need_version=no
3376 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3377 soname_spec='${libname}${release}${shared_ext}$major'
3378 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3379 shlibpath_var=LD_LIBRARY_PATH
3380 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3381 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3382 # the default ld.so.conf also contains /usr/contrib/lib and
3383 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3384 # libtool to hard-code these into programs
3385 ;;
6cc5e1a6 3386
7486d297 3387cygwin* | mingw* | pw32* | cegcc*)
96dc8a45
DB
3388 version_type=windows
3389 shrext_cmds=".dll"
3390 need_version=no
3391 need_lib_prefix=no
6cc5e1a6 3392
cb7f7ba8
DB
3393 case $GCC,$cc_basename in
3394 yes,*)
3395 # gcc
96dc8a45
DB
3396 library_names_spec='$libname.dll.a'
3397 # DLL is installed to $(libdir)/../bin by postinstall_cmds
3398 postinstall_cmds='base_file=`basename \${file}`~
3399 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3400 dldir=$destdir/`dirname \$dlpath`~
3401 test -d \$dldir || mkdir -p \$dldir~
3402 $install_prog $dir/$dlname \$dldir/$dlname~
3403 chmod a+x \$dldir/$dlname~
3404 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3405 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3406 fi'
3407 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3408 dlpath=$dir/\$dldll~
3409 $RM \$dlpath'
3410 shlibpath_overrides_runpath=yes
6cc5e1a6 3411
96dc8a45
DB
3412 case $host_os in
3413 cygwin*)
3414 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3415 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4652f59b
DB
3416m4_if([$1], [],[
3417 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
96dc8a45 3418 ;;
7486d297 3419 mingw* | cegcc*)
96dc8a45
DB
3420 # MinGW DLLs use traditional 'lib' prefix
3421 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
96dc8a45
DB
3422 ;;
3423 pw32*)
3424 # pw32 DLLs use 'pw' prefix rather than 'lib'
3425 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3426 ;;
3427 esac
cb7f7ba8
DB
3428 dynamic_linker='Win32 ld.exe'
3429 ;;
3430
3431 *,cl*)
3432 # Native MSVC
3433 libname_spec='$name'
3434 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3435 library_names_spec='${libname}.dll.lib'
3436
3437 case $build_os in
3438 mingw*)
3439 sys_lib_search_path_spec=
3440 lt_save_ifs=$IFS
3441 IFS=';'
3442 for lt_path in $LIB
3443 do
3444 IFS=$lt_save_ifs
3445 # Let DOS variable expansion print the short 8.3 style file name.
3446 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3447 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3448 done
3449 IFS=$lt_save_ifs
3450 # Convert to MSYS style.
3451 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3452 ;;
3453 cygwin*)
3454 # Convert to unix form, then to dos form, then back to unix form
3455 # but this time dos style (no spaces!) so that the unix form looks
3456 # like /cygdrive/c/PROGRA~1:/cygdr...
3457 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3458 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3459 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3460 ;;
3461 *)
3462 sys_lib_search_path_spec="$LIB"
3463 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3464 # It is most probably a Windows format PATH.
3465 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3466 else
3467 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3468 fi
3469 # FIXME: find the short name or the path components, as spaces are
3470 # common. (e.g. "Program Files" -> "PROGRA~1")
3471 ;;
3472 esac
3473
3474 # DLL is installed to $(libdir)/../bin by postinstall_cmds
3475 postinstall_cmds='base_file=`basename \${file}`~
3476 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3477 dldir=$destdir/`dirname \$dlpath`~
3478 test -d \$dldir || mkdir -p \$dldir~
3479 $install_prog $dir/$dlname \$dldir/$dlname'
3480 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3481 dlpath=$dir/\$dldll~
3482 $RM \$dlpath'
3483 shlibpath_overrides_runpath=yes
3484 dynamic_linker='Win32 link.exe'
96dc8a45 3485 ;;
6cc5e1a6 3486
96dc8a45 3487 *)
cb7f7ba8 3488 # Assume MSVC wrapper
96dc8a45 3489 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
cb7f7ba8 3490 dynamic_linker='Win32 ld.exe'
96dc8a45
DB
3491 ;;
3492 esac
96dc8a45
DB
3493 # FIXME: first we should search . and the directory the executable is in
3494 shlibpath_var=PATH
3495 ;;
6cc5e1a6 3496
96dc8a45
DB
3497darwin* | rhapsody*)
3498 dynamic_linker="$host_os dyld"
3499 version_type=darwin
3500 need_lib_prefix=no
3501 need_version=no
3502 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3503 soname_spec='${libname}${release}${major}$shared_ext'
3504 shlibpath_overrides_runpath=yes
3505 shlibpath_var=DYLD_LIBRARY_PATH
3506 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3507m4_if([$1], [],[
3508 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3509 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3510 ;;
3511
3512dgux*)
514580cf 3513 version_type=linux # correct to gnu/linux during the next big refactor
96dc8a45
DB
3514 need_lib_prefix=no
3515 need_version=no
3516 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3517 soname_spec='${libname}${release}${shared_ext}$major'
3518 shlibpath_var=LD_LIBRARY_PATH
6cc5e1a6 3519 ;;
6cc5e1a6 3520
96dc8a45
DB
3521freebsd* | dragonfly*)
3522 # DragonFly does not have aout. When/if they implement a new
3523 # versioning mechanism, adjust this.
3524 if test -x /usr/bin/objformat; then
3525 objformat=`/usr/bin/objformat`
6cc5e1a6 3526 else
96dc8a45 3527 case $host_os in
514580cf 3528 freebsd[[23]].*) objformat=aout ;;
96dc8a45
DB
3529 *) objformat=elf ;;
3530 esac
6cc5e1a6 3531 fi
96dc8a45
DB
3532 version_type=freebsd-$objformat
3533 case $version_type in
3534 freebsd-elf*)
3535 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3536 need_version=no
3537 need_lib_prefix=no
6cc5e1a6 3538 ;;
96dc8a45
DB
3539 freebsd-*)
3540 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3541 need_version=yes
3542 ;;
3543 esac
3544 shlibpath_var=LD_LIBRARY_PATH
3545 case $host_os in
514580cf 3546 freebsd2.*)
96dc8a45 3547 shlibpath_overrides_runpath=yes
6cc5e1a6 3548 ;;
96dc8a45
DB
3549 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3550 shlibpath_overrides_runpath=yes
3551 hardcode_into_libs=yes
3552 ;;
3553 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3554 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3555 shlibpath_overrides_runpath=no
3556 hardcode_into_libs=yes
3557 ;;
3558 *) # from 4.6 on, and DragonFly
3559 shlibpath_overrides_runpath=yes
3560 hardcode_into_libs=yes
6cc5e1a6
DB
3561 ;;
3562 esac