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