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