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