1
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
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
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
17
[m4_warning([this file was generated for autoconf 2.65.
18
You have another version of autoconf. It may work, but is not guaranteed to.
19
If you have problems, you may need to regenerate the build system entirely.
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
# gettext.m4 serial 63 (gettext-0.18)
23
dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
24
dnl This file is free software; the Free Software Foundation
25
dnl gives unlimited permission to copy and/or distribute it,
26
dnl with or without modifications, as long as this notice is preserved.
28
dnl This file can can be used in projects which are not available under
29
dnl the GNU General Public License or the GNU Library General Public
30
dnl License but which still want to provide support for the GNU gettext
32
dnl Please note that the actual code of the GNU gettext library is covered
33
dnl by the GNU Library General Public License, and the rest of the GNU
34
dnl gettext package package is covered by the GNU General Public License.
35
dnl They are *not* in the public domain.
38
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
39
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
41
dnl Macro to add for using GNU gettext.
43
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
44
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
45
dnl default (if it is not specified or empty) is 'no-libtool'.
46
dnl INTLSYMBOL should be 'external' for packages with no intl directory,
47
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
48
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
49
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
50
dnl depending on --{enable,disable}-{shared,static} and on the presence of
51
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
52
dnl $(top_builddir)/intl/libintl.a will be created.
53
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
54
dnl implementations (in libc or libintl) without the ngettext() function
55
dnl will be ignored. If NEEDSYMBOL is specified and is
56
dnl 'need-formatstring-macros', then GNU gettext implementations that don't
57
dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
58
dnl INTLDIR is used to find the intl libraries. If empty,
59
dnl the value `$(top_builddir)/intl/' is used.
61
dnl The result of the configuration is one of three cases:
62
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
64
dnl Catalog format: GNU --> install in $(datadir)
65
dnl Catalog extension: .mo after installation, .gmo in source tree
66
dnl 2) GNU gettext has been found in the system's C library.
67
dnl Catalog format: GNU --> install in $(datadir)
68
dnl Catalog extension: .mo after installation, .gmo in source tree
69
dnl 3) No internationalization, always use English msgid.
70
dnl Catalog format: none
71
dnl Catalog extension: none
72
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
73
dnl The use of .gmo is historical (it was needed to avoid overwriting the
74
dnl GNU format catalogs when building on a platform with an X/Open gettext),
75
dnl but we keep it in order not to force irrelevant filename changes on the
78
AC_DEFUN([AM_GNU_GETTEXT],
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
84
ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
85
[AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
86
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
87
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
89
define([gt_included_intl],
90
ifelse([$1], [external],
91
ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
93
define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
95
AM_GNU_GETTEXT_NEED([$2])
97
AC_REQUIRE([AM_PO_SUBDIRS])dnl
98
ifelse(gt_included_intl, yes, [
99
AC_REQUIRE([AM_INTL_SUBDIR])dnl
102
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
103
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
104
AC_REQUIRE([AC_LIB_RPATH])
106
dnl Sometimes libintl requires libiconv, so first search for libiconv.
107
dnl Ideally we would do this search only after the
108
dnl if test "$USE_NLS" = "yes"; then
109
dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
110
dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
111
dnl the configure script would need to contain the same shell code
112
dnl again, outside any 'if'. There are two solutions:
113
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
114
dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
115
dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
116
dnl documented, we avoid it.
117
ifelse(gt_included_intl, yes, , [
118
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
121
dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
127
ifelse(gt_included_intl, yes, [
128
BUILD_INCLUDED_LIBINTL=no
129
USE_INCLUDED_LIBINTL=no
135
dnl Add a version number to the cache macros.
136
case " $gt_needs " in
137
*" need-formatstring-macros "*) gt_api_version=3 ;;
138
*" need-ngettext "*) gt_api_version=2 ;;
139
*) gt_api_version=1 ;;
141
gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
142
gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
144
dnl If we use NLS figure out what method
145
if test "$USE_NLS" = "yes"; then
146
gt_use_preinstalled_gnugettext=no
147
ifelse(gt_included_intl, yes, [
148
AC_MSG_CHECKING([whether included gettext is requested])
149
AC_ARG_WITH([included-gettext],
150
[ --with-included-gettext use the GNU gettext library included here],
151
nls_cv_force_use_gnu_gettext=$withval,
152
nls_cv_force_use_gnu_gettext=no)
153
AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
155
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
156
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
158
dnl User does not insist on using GNU NLS library. Figure out what
159
dnl to use. If GNU gettext is available we use this. Else we have
160
dnl to fall back to GNU NLS library.
162
if test $gt_api_version -ge 3; then
163
gt_revision_test_code='
164
#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
165
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
168
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
172
gt_revision_test_code=
174
if test $gt_api_version -ge 2; then
175
gt_expression_test_code=' + * ngettext ("", "", 0)'
177
gt_expression_test_code=
180
AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
181
[AC_TRY_LINK([#include <libintl.h>
182
$gt_revision_test_code
183
extern int _nl_msg_cat_cntr;
184
extern int *_nl_domain_bindings;],
185
[bindtextdomain ("", "");
186
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
187
[eval "$gt_func_gnugettext_libc=yes"],
188
[eval "$gt_func_gnugettext_libc=no"])])
190
if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
191
dnl Sometimes libintl requires libiconv, so first search for libiconv.
192
ifelse(gt_included_intl, yes, , [
195
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
196
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
197
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
198
dnl even if libiconv doesn't exist.
199
AC_LIB_LINKFLAGS_BODY([intl])
200
AC_CACHE_CHECK([for GNU gettext in libintl],
201
[$gt_func_gnugettext_libintl],
202
[gt_save_CPPFLAGS="$CPPFLAGS"
203
CPPFLAGS="$CPPFLAGS $INCINTL"
205
LIBS="$LIBS $LIBINTL"
206
dnl Now see whether libintl exists and does not depend on libiconv.
207
AC_TRY_LINK([#include <libintl.h>
208
$gt_revision_test_code
209
extern int _nl_msg_cat_cntr;
214
const char *_nl_expand_alias (const char *);],
215
[bindtextdomain ("", "");
216
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
217
[eval "$gt_func_gnugettext_libintl=yes"],
218
[eval "$gt_func_gnugettext_libintl=no"])
219
dnl Now see whether libintl exists and depends on libiconv.
220
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
221
LIBS="$LIBS $LIBICONV"
222
AC_TRY_LINK([#include <libintl.h>
223
$gt_revision_test_code
224
extern int _nl_msg_cat_cntr;
229
const char *_nl_expand_alias (const char *);],
230
[bindtextdomain ("", "");
231
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
232
[LIBINTL="$LIBINTL $LIBICONV"
233
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
234
eval "$gt_func_gnugettext_libintl=yes"
237
CPPFLAGS="$gt_save_CPPFLAGS"
238
LIBS="$gt_save_LIBS"])
241
dnl If an already present or preinstalled GNU gettext() is found,
242
dnl use it. But if this macro is used in GNU gettext, and GNU
243
dnl gettext is already preinstalled in libintl, we update this
244
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
245
if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
246
|| { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
247
&& test "$PACKAGE" != gettext-runtime \
248
&& test "$PACKAGE" != gettext-tools; }; then
249
gt_use_preinstalled_gnugettext=yes
251
dnl Reset the values set by searching for libintl.
257
ifelse(gt_included_intl, yes, [
258
if test "$gt_use_preinstalled_gnugettext" != "yes"; then
259
dnl GNU gettext is not found in the C library.
260
dnl Fall back on included GNU gettext library.
261
nls_cv_use_gnu_gettext=yes
265
if test "$nls_cv_use_gnu_gettext" = "yes"; then
266
dnl Mark actions used to generate GNU NLS library.
267
BUILD_INCLUDED_LIBINTL=yes
268
USE_INCLUDED_LIBINTL=yes
269
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
270
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
271
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
275
if test "$gt_use_preinstalled_gnugettext" = "yes" \
276
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
277
dnl Mark actions to use GNU gettext tools.
282
if test -n "$INTL_MACOSX_LIBS"; then
283
if test "$gt_use_preinstalled_gnugettext" = "yes" \
284
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
285
dnl Some extra flags are needed during linking.
286
LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
287
LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
291
if test "$gt_use_preinstalled_gnugettext" = "yes" \
292
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
293
AC_DEFINE([ENABLE_NLS], [1],
294
[Define to 1 if translation of program messages to the user's native language
301
AC_MSG_CHECKING([whether to use NLS])
302
AC_MSG_RESULT([$USE_NLS])
303
if test "$USE_NLS" = "yes"; then
304
AC_MSG_CHECKING([where the gettext function comes from])
305
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
306
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
307
gt_source="external libintl"
312
gt_source="included intl directory"
314
AC_MSG_RESULT([$gt_source])
317
if test "$USE_NLS" = "yes"; then
319
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
320
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
321
AC_MSG_CHECKING([how to link with libintl])
322
AC_MSG_RESULT([$LIBINTL])
323
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
326
dnl For backward compatibility. Some packages may be using this.
327
AC_DEFINE([HAVE_GETTEXT], [1],
328
[Define if the GNU gettext() function is already present or preinstalled.])
329
AC_DEFINE([HAVE_DCGETTEXT], [1],
330
[Define if the GNU dcgettext() function is already present or preinstalled.])
333
dnl We need to process the po/ directory.
337
ifelse(gt_included_intl, yes, [
338
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
339
dnl to 'yes' because some of the testsuite requires it.
340
if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
341
BUILD_INCLUDED_LIBINTL=yes
344
dnl Make all variables we use known to autoconf.
345
AC_SUBST([BUILD_INCLUDED_LIBINTL])
346
AC_SUBST([USE_INCLUDED_LIBINTL])
347
AC_SUBST([CATOBJEXT])
349
dnl For backward compatibility. Some configure.ins may be using this.
353
dnl For backward compatibility. Some Makefiles may be using this.
355
AC_SUBST([DATADIRNAME])
357
dnl For backward compatibility. Some Makefiles may be using this.
359
AC_SUBST([INSTOBJEXT])
361
dnl For backward compatibility. Some Makefiles may be using this.
365
dnl For backward compatibility. Some Makefiles may be using this.
367
if test "$USE_INCLUDED_LIBINTL" = yes; then
368
INTLOBJS="\$(GETTOBJS)"
372
dnl Enable libtool support if the surrounding package wishes it.
373
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
374
AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
377
dnl For backward compatibility. Some Makefiles may be using this.
381
dnl Make all documented variables known to autoconf.
383
AC_SUBST([LTLIBINTL])
388
dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
389
m4_define([gt_NEEDS_INIT],
391
m4_divert_text([DEFAULTS], [gt_needs=])
392
m4_define([gt_NEEDS_INIT], [])
396
dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
397
AC_DEFUN([AM_GNU_GETTEXT_NEED],
399
m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
403
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
404
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
406
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
407
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
409
# This file is free software, distributed under the terms of the GNU
410
# General Public License. As a special exception to the GNU General
411
# Public License, this file may be distributed as part of a program
412
# that contains a configuration script generated by Autoconf, under
413
# the same distribution terms as the rest of that program.
415
# This file can be copied and used freely without restrictions. It can
416
# be used in projects which are not available under the GNU Public License
417
# but which still want to provide support for the GNU gettext functionality.
419
# Macro to add for using GNU gettext.
420
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
422
# Modified to never use included libintl.
423
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
425
# Major rework to remove unused code
426
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
428
# Added better handling of ALL_LINGUAS from GNU gettext version
429
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
431
# Modified to require ngettext
432
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
434
# We need this here as well, since someone might use autoconf-2.5x
435
# to configure GLib then an older version to configure a package
436
# using AM_GLIB_GNU_GETTEXT
440
dnl We go to great lengths to make sure that aclocal won't
441
dnl try to pull in the installed version of these macros
442
dnl when running aclocal in the glib directory.
444
m4_copy([AC_DEFUN],[glib_DEFUN])
445
m4_copy([AC_REQUIRE],[glib_REQUIRE])
447
dnl At the end, if we're not within glib, we'll define the public
448
dnl definitions in terms of our private definitions.
452
#--------------------
453
glib_DEFUN([GLIB_LC_MESSAGES],
454
[AC_CHECK_HEADERS([locale.h])
455
if test $ac_cv_header_locale_h = yes; then
456
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
457
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
458
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
459
if test $am_cv_val_LC_MESSAGES = yes; then
460
AC_DEFINE(HAVE_LC_MESSAGES, 1,
461
[Define if your <locale.h> file defines LC_MESSAGES.])
465
# GLIB_PATH_PROG_WITH_TEST
466
#----------------------------
467
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
468
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
469
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
470
[# Extract the first word of "$2", so it can be a program name with args.
471
set dummy $2; ac_word=[$]2
472
AC_MSG_CHECKING([for $ac_word])
473
AC_CACHE_VAL(ac_cv_path_$1,
476
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
479
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
480
for ac_dir in ifelse([$5], , $PATH, [$5]); do
481
test -z "$ac_dir" && ac_dir=.
482
if test -f $ac_dir/$ac_word; then
484
ac_cv_path_$1="$ac_dir/$ac_word"
490
dnl If no 4th arg is given, leave the cache variable unset,
491
dnl so AC_PATH_PROGS will keep looking.
492
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
497
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
507
glib_DEFUN([GLIB_WITH_NLS],
508
dnl NLS is obligatory
512
gt_cv_have_gettext=no
518
AC_CHECK_HEADER(libintl.h,
519
[gt_cv_func_dgettext_libintl="no"
520
libintl_extra_libs=""
523
# First check in libc
525
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
529
[return !ngettext ("","", 1)],
530
gt_cv_func_ngettext_libc=yes,
531
gt_cv_func_ngettext_libc=no)
534
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
535
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
539
[return !dgettext ("","")],
540
gt_cv_func_dgettext_libc=yes,
541
gt_cv_func_dgettext_libc=no)
545
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
546
AC_CHECK_FUNCS(bind_textdomain_codeset)
550
# If we don't have everything we want, check in libintl
552
if test "$gt_cv_func_dgettext_libc" != "yes" \
553
|| test "$gt_cv_func_ngettext_libc" != "yes" \
554
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
556
AC_CHECK_LIB(intl, bindtextdomain,
557
[AC_CHECK_LIB(intl, ngettext,
558
[AC_CHECK_LIB(intl, dgettext,
559
gt_cv_func_dgettext_libintl=yes)])])
561
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
562
AC_MSG_CHECKING([if -liconv is needed to use gettext])
564
AC_CHECK_LIB(intl, ngettext,
565
[AC_CHECK_LIB(intl, dcgettext,
566
[gt_cv_func_dgettext_libintl=yes
567
libintl_extra_libs=-liconv],
573
# If we found libintl, then check in it for bind_textdomain_codeset();
574
# we'll prefer libc if neither have bind_textdomain_codeset(),
575
# and both have dgettext and ngettext
577
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
578
glib_save_LIBS="$LIBS"
579
LIBS="$LIBS -lintl $libintl_extra_libs"
580
unset ac_cv_func_bind_textdomain_codeset
581
AC_CHECK_FUNCS(bind_textdomain_codeset)
582
LIBS="$glib_save_LIBS"
584
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
585
gt_cv_func_dgettext_libc=no
587
if test "$gt_cv_func_dgettext_libc" = "yes" \
588
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
589
gt_cv_func_dgettext_libintl=no
595
if test "$gt_cv_func_dgettext_libc" = "yes" \
596
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
597
gt_cv_have_gettext=yes
600
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
601
INTLLIBS="-lintl $libintl_extra_libs"
604
if test "$gt_cv_have_gettext" = "yes"; then
605
AC_DEFINE(HAVE_GETTEXT,1,
606
[Define if the GNU gettext() function is already present or preinstalled.])
607
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
608
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
609
if test "$MSGFMT" != "no"; then
610
glib_save_LIBS="$LIBS"
611
LIBS="$LIBS $INTLLIBS"
612
AC_CHECK_FUNCS(dcgettext)
614
AC_MSG_CHECKING([if msgfmt accepts -c])
615
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
618
"Content-Type: text/plain; charset=UTF-8\n"
619
"Project-Id-Version: test 1.0\n"
620
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
621
"Last-Translator: test <foo@bar.xx>\n"
622
"Language-Team: C <LL@li.org>\n"
623
"MIME-Version: 1.0\n"
624
"Content-Transfer-Encoding: 8bit\n"
625
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
626
AC_SUBST(MSGFMT_OPTS)
627
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
628
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
629
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
630
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
631
return _nl_msg_cat_cntr],
636
dnl On Solaris, if bind_textdomain_codeset is in libc,
637
dnl GNU format message catalog is always supported,
638
dnl since both are added to the libc all together.
639
dnl Hence, we'd like to go with DATADIRNAME=share and
640
dnl and CATOBJEXT=.gmo in this case.
641
AC_CHECK_FUNC(bind_textdomain_codeset,
652
LIBS="$glib_save_LIBS"
655
gt_cv_have_gettext=no
660
if test "$gt_cv_have_gettext" = "yes" ; then
661
AC_DEFINE(ENABLE_NLS, 1,
662
[always defined to indicate that i18n is enabled])
665
dnl Test whether we really found GNU xgettext.
666
if test "$XGETTEXT" != ":"; then
667
dnl If it is not GNU xgettext we define it as : so that the
668
dnl Makefiles still can work.
669
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
673
[found xgettext program is not GNU xgettext; ignore it])
678
# We need to process the po/ directory.
682
[case "$CONFIG_FILES" in *po/Makefile.in*)
683
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
686
dnl These rules are solely for the distribution goal. While doing this
687
dnl we only have to keep exactly one list of the available catalogs
689
for lang in $ALL_LINGUAS; do
690
GMOFILES="$GMOFILES $lang.gmo"
691
POFILES="$POFILES $lang.po"
694
dnl Make all variables we use known to autoconf.
697
AC_SUBST(DATADIRNAME)
701
AC_SUBST(PO_IN_DATADIR_TRUE)
702
AC_SUBST(PO_IN_DATADIR_FALSE)
707
# AM_GLIB_GNU_GETTEXT
708
# -------------------
709
# Do checks necessary for use of gettext. If a suitable implementation
710
# of gettext is found in either in libintl or in the C library,
711
# it will set INTLLIBS to the libraries needed for use of gettext
712
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
713
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
714
# on various variables needed by the Makefile.in.in installed by
717
glib_DEFUN([GLIB_GNU_GETTEXT],
718
[AC_REQUIRE([AC_PROG_CC])dnl
719
AC_REQUIRE([AC_HEADER_STDC])dnl
724
if test "$gt_cv_have_gettext" = "yes"; then
725
if test "x$ALL_LINGUAS" = "x"; then
728
AC_MSG_CHECKING(for catalogs to be installed)
730
for presentlang in $ALL_LINGUAS; do
732
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
733
desiredlanguages="$LINGUAS"
735
desiredlanguages="$ALL_LINGUAS"
737
for desiredlang in $desiredlanguages; do
738
# Use the presentlang catalog if desiredlang is
739
# a. equal to presentlang, or
740
# b. a variant of presentlang (because in this case,
741
# presentlang can be used as a fallback for messages
742
# which are not translated in the desiredlang catalog).
743
case "$desiredlang" in
744
"$presentlang"*) useit=yes;;
747
if test $useit = yes; then
748
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
752
AC_MSG_RESULT($LINGUAS)
755
dnl Construct list of names of catalog files to be constructed.
756
if test -n "$LINGUAS"; then
757
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
761
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
762
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
763
dnl Try to locate is.
765
if test -n "$ac_aux_dir"; then
766
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
768
if test -z "$MKINSTALLDIRS"; then
769
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
771
AC_SUBST(MKINSTALLDIRS)
773
dnl Generate list of files to be processed by xgettext which will
774
dnl be included in po/Makefile.
775
test -d po || mkdir po
776
if test "x$srcdir" != "x."; then
777
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
778
posrcprefix="$srcdir/"
780
posrcprefix="../$srcdir/"
786
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
787
< $srcdir/po/POTFILES.in > po/POTFILES
790
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
791
# -------------------------------
792
# Define VARIABLE to the location where catalog files will
793
# be installed by po/Makefile.
794
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
795
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
796
glib_save_prefix="$prefix"
797
glib_save_exec_prefix="$exec_prefix"
798
glib_save_datarootdir="$datarootdir"
799
test "x$prefix" = xNONE && prefix=$ac_default_prefix
800
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
801
datarootdir=`eval echo "${datarootdir}"`
802
if test "x$CATOBJEXT" = "x.mo" ; then
803
localedir=`eval echo "${libdir}/locale"`
805
localedir=`eval echo "${datadir}/locale"`
807
prefix="$glib_save_prefix"
808
exec_prefix="$glib_save_exec_prefix"
809
datarootdir="$glib_save_datarootdir"
810
AC_DEFINE_UNQUOTED($1, "$localedir",
811
[Define the location where the catalogs will be installed])
815
dnl Now the definitions that aclocal will find
817
ifdef(glib_configure_in,[],[
818
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
819
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
822
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
824
# Create a temporary file with TEST-FILE as its contents and pass the
825
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
826
# 0 and perform ACTION-IF-FAIL for any other exit status.
827
AC_DEFUN([GLIB_RUN_PROG],
828
[cat >conftest.foo <<_ACEOF
831
if AC_RUN_LOG([$1 conftest.foo]); then
832
m4_ifval([$3], [$3], [:])
833
m4_ifvaln([$4], [else $4])dnl
834
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
835
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
840
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
841
# serial 40 IT_PROG_INTLTOOL
842
AC_DEFUN([IT_PROG_INTLTOOL], [
844
AC_REQUIRE([AM_NLS])dnl
846
case "$am__api_version" in
848
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
854
if test -n "$1"; then
855
AC_MSG_CHECKING([for intltool >= $1])
857
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
858
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
859
[INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
861
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
862
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
863
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
866
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
867
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
868
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
869
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
870
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
873
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
874
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
875
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
876
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
877
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
878
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
879
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
880
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
881
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
882
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
883
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
884
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
885
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
886
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
887
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
888
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
889
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
890
INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
891
INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
893
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
894
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
895
_IT_SUBST(INTLTOOL_KEYS_RULE)
896
_IT_SUBST(INTLTOOL_PROP_RULE)
897
_IT_SUBST(INTLTOOL_OAF_RULE)
898
_IT_SUBST(INTLTOOL_PONG_RULE)
899
_IT_SUBST(INTLTOOL_SERVER_RULE)
900
_IT_SUBST(INTLTOOL_SHEET_RULE)
901
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
902
_IT_SUBST(INTLTOOL_UI_RULE)
903
_IT_SUBST(INTLTOOL_XAM_RULE)
904
_IT_SUBST(INTLTOOL_KBD_RULE)
905
_IT_SUBST(INTLTOOL_XML_RULE)
906
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
907
_IT_SUBST(INTLTOOL_CAVES_RULE)
908
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
909
_IT_SUBST(INTLTOOL_THEME_RULE)
910
_IT_SUBST(INTLTOOL_SERVICE_RULE)
911
_IT_SUBST(INTLTOOL_POLICY_RULE)
913
# Check the gettext tools to make sure they are GNU
914
AC_PATH_PROG(XGETTEXT, xgettext)
915
AC_PATH_PROG(MSGMERGE, msgmerge)
916
AC_PATH_PROG(MSGFMT, msgfmt)
917
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
918
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
919
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
921
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
922
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
923
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
924
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
925
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
928
AC_PATH_PROG(INTLTOOL_PERL, perl)
929
if test -z "$INTLTOOL_PERL"; then
930
AC_MSG_ERROR([perl not found])
932
AC_MSG_CHECKING([for perl >= 5.8.1])
933
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
934
if test $? -ne 0; then
935
AC_MSG_ERROR([perl 5.8.1 is required for intltool])
937
IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
938
AC_MSG_RESULT([$IT_PERL_VERSION])
940
if test "x$2" != "xno-xml"; then
941
AC_MSG_CHECKING([for XML::Parser])
942
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
945
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
949
# Substitute ALL_LINGUAS so we can use it in po/Makefile
950
AC_SUBST(ALL_LINGUAS)
952
# Set DATADIRNAME correctly if it is not set yet
953
# (copied from glib-gettext.m4)
954
if test -z "$DATADIRNAME"; then
956
[AC_LANG_PROGRAM([[]],
957
[[extern int _nl_msg_cat_cntr;
958
return _nl_msg_cat_cntr]])],
962
dnl On Solaris, if bind_textdomain_codeset is in libc,
963
dnl GNU format message catalog is always supported,
964
dnl since both are added to the libc all together.
965
dnl Hence, we'd like to go with DATADIRNAME=share
967
AC_CHECK_FUNC(bind_textdomain_codeset,
968
[DATADIRNAME=share], [DATADIRNAME=lib])
975
AC_SUBST(DATADIRNAME)
982
# IT_PO_SUBDIR(DIRNAME)
983
# ---------------------
984
# All po subdirs have to be declared with this macro; the subdir "po" is
985
# declared by IT_PROG_INTLTOOL.
987
AC_DEFUN([IT_PO_SUBDIR],
988
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
990
dnl The following CONFIG_COMMANDS should be exetuted at the very end
991
dnl of config.status.
992
AC_CONFIG_COMMANDS_PRE([
993
AC_CONFIG_COMMANDS([$1/stamp-it], [
994
if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
995
AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
997
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1002
'"s|^| $ac_top_srcdir/|" \
1003
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1005
[sed '/^POTFILES =/,/[^\\]$/ {
1009
' "$1/Makefile.in" >"$1/Makefile"]
1010
rm -f "$1/Makefile.tmp"
1011
mv "$1/stamp-it.tmp" "$1/stamp-it"
1016
# _IT_SUBST(VARIABLE)
1017
# -------------------
1018
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1020
AC_DEFUN([_IT_SUBST],
1023
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1028
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1029
# A hint is needed for aclocal from Automake <= 1.9.4:
1030
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
1033
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1035
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1036
# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
1038
# Written by Gordon Matzigkeit, 1996
1040
# This file is free software; the Free Software Foundation gives
1041
# unlimited permission to copy and/or distribute it, with or without
1042
# modifications, as long as this notice is preserved.
1044
m4_define([_LT_COPYING], [dnl
1045
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1046
# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
1048
# Written by Gordon Matzigkeit, 1996
1050
# This file is part of GNU Libtool.
1052
# GNU Libtool is free software; you can redistribute it and/or
1053
# modify it under the terms of the GNU General Public License as
1054
# published by the Free Software Foundation; either version 2 of
1055
# the License, or (at your option) any later version.
1057
# As a special exception to the GNU General Public License,
1058
# if you distribute this file as part of a program or library that
1059
# is built using GNU Libtool, you may include this file under the
1060
# same distribution terms that you use for the rest of that program.
1062
# GNU Libtool is distributed in the hope that it will be useful,
1063
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1064
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1065
# GNU General Public License for more details.
1067
# You should have received a copy of the GNU General Public License
1068
# along with GNU Libtool; see the file COPYING. If not, a copy
1069
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1070
# obtained by writing to the Free Software Foundation, Inc.,
1071
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1077
# LT_PREREQ(VERSION)
1078
# ------------------
1079
# Complain and exit if this libtool version is less that VERSION.
1080
m4_defun([LT_PREREQ],
1081
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1083
[m4_fatal([Libtool version $1 or higher is required],
1088
# _LT_CHECK_BUILDDIR
1089
# ------------------
1090
# Complain if the absolute build directory name contains unusual characters
1091
m4_defun([_LT_CHECK_BUILDDIR],
1094
AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1099
# LT_INIT([OPTIONS])
1100
# ------------------
1102
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1103
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1104
AC_BEFORE([$0], [LT_LANG])dnl
1105
AC_BEFORE([$0], [LT_OUTPUT])dnl
1106
AC_BEFORE([$0], [LTDL_INIT])dnl
1107
m4_require([_LT_CHECK_BUILDDIR])dnl
1109
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1110
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1111
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1112
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1113
dnl unless we require an AC_DEFUNed macro:
1114
AC_REQUIRE([LTOPTIONS_VERSION])dnl
1115
AC_REQUIRE([LTSUGAR_VERSION])dnl
1116
AC_REQUIRE([LTVERSION_VERSION])dnl
1117
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1118
m4_require([_LT_PROG_LTMAIN])dnl
1120
_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1123
_LT_SET_OPTIONS([$0], [$1])
1125
# This can be used to rebuild libtool when needed
1126
LIBTOOL_DEPS="$ltmain"
1128
# Always use our own libtool.
1129
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1130
AC_SUBST(LIBTOOL)dnl
1135
m4_define([LT_INIT])
1139
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1140
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1141
dnl aclocal-1.4 backwards compatibility:
1142
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1143
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1146
# _LT_CC_BASENAME(CC)
1147
# -------------------
1148
# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1149
m4_defun([_LT_CC_BASENAME],
1150
[for cc_temp in $1""; do
1152
compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1153
distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1158
cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1162
# _LT_FILEUTILS_DEFAULTS
1163
# ----------------------
1164
# It is okay to use these file commands and assume they have been set
1165
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1166
m4_defun([_LT_FILEUTILS_DEFAULTS],
1170
])# _LT_FILEUTILS_DEFAULTS
1175
m4_defun([_LT_SETUP],
1176
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1177
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1178
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1179
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1181
_LT_DECL([], [host_alias], [0], [The host system])dnl
1182
_LT_DECL([], [host], [0])dnl
1183
_LT_DECL([], [host_os], [0])dnl
1185
_LT_DECL([], [build_alias], [0], [The build system])dnl
1186
_LT_DECL([], [build], [0])dnl
1187
_LT_DECL([], [build_os], [0])dnl
1189
AC_REQUIRE([AC_PROG_CC])dnl
1190
AC_REQUIRE([LT_PATH_LD])dnl
1191
AC_REQUIRE([LT_PATH_NM])dnl
1193
AC_REQUIRE([AC_PROG_LN_S])dnl
1194
test -z "$LN_S" && LN_S="ln -s"
1195
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1197
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1198
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1199
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1201
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1202
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1203
m4_require([_LT_CMD_RELOAD])dnl
1204
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1205
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1206
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1208
_LT_CONFIG_LIBTOOL_INIT([
1209
# See if we are running on zsh, and set the options which allow our
1210
# commands through without removal of \ escapes INIT.
1211
if test -n "\${ZSH_VERSION+set}" ; then
1212
setopt NO_GLOB_SUBST
1215
if test -n "${ZSH_VERSION+set}" ; then
1216
setopt NO_GLOB_SUBST
1221
m4_require([_LT_TAG_COMPILER])dnl
1225
# AIX sometimes has problems with the GCC collect2 program. For some
1226
# reason, if we set the COLLECT_NAMES environment variable, the problems
1227
# vanish in a puff of smoke.
1228
if test "X${COLLECT_NAMES+set}" != Xset; then
1230
export COLLECT_NAMES
1237
can_build_shared=yes
1239
# All known linkers require a `.a' archive for static linking (except MSVC,
1240
# which needs '.lib').
1243
with_gnu_ld="$lt_cv_prog_gnu_ld"
1246
old_CFLAGS="$CFLAGS"
1248
# Set sane defaults for various variables
1249
test -z "$CC" && CC=cc
1250
test -z "$LTCC" && LTCC=$CC
1251
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1252
test -z "$LD" && LD=ld
1253
test -z "$ac_objext" && ac_objext=o
1255
_LT_CC_BASENAME([$compiler])
1257
# Only perform the check for file, if the check method requires it
1258
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1259
case $deplibs_check_method in
1261
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1267
# Use C for the default configuration in the libtool script
1268
LT_SUPPORTED_TAG([CC])
1270
_LT_LANG_DEFAULT_CONFIG
1275
# _LT_PREPARE_SED_QUOTE_VARS
1276
# --------------------------
1277
# Define a few sed substitution that help us do robust quoting.
1278
m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1279
[# Backslashify metacharacters that are still active within
1280
# double-quoted strings.
1281
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1283
# Same as above, but do not quote variable references.
1284
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1286
# Sed substitution to delay expansion of an escaped shell variable in a
1287
# double_quote_subst'ed string.
1288
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1290
# Sed substitution to delay expansion of an escaped single quote.
1291
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1293
# Sed substitution to avoid accidental globbing in evaled expressions
1294
no_glob_subst='s/\*/\\\*/g'
1299
# Note that this code is called both from `configure', and `config.status'
1300
# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
1301
# `config.status' has no value for ac_aux_dir unless we are using Automake,
1302
# so we pass a copy along to make sure it has a sensible value anyway.
1303
m4_defun([_LT_PROG_LTMAIN],
1304
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1305
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1306
ltmain="$ac_aux_dir/ltmain.sh"
1311
# So that we can recreate a full libtool script including additional
1312
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1313
# in macros and then make a single call at the end using the `libtool'
1317
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1318
# ----------------------------------------
1319
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1320
m4_define([_LT_CONFIG_LIBTOOL_INIT],
1322
[m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1327
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1330
# _LT_CONFIG_LIBTOOL([COMMANDS])
1331
# ------------------------------
1332
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1333
m4_define([_LT_CONFIG_LIBTOOL],
1335
[m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1340
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1343
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1344
# -----------------------------------------------------
1345
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1346
[_LT_CONFIG_LIBTOOL([$1])
1347
_LT_CONFIG_LIBTOOL_INIT([$2])
1351
# _LT_FORMAT_COMMENT([COMMENT])
1352
# -----------------------------
1353
# Add leading comment marks to the start of each line, and a trailing
1354
# full-stop to the whole comment if one is not present already.
1355
m4_define([_LT_FORMAT_COMMENT],
1357
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1358
[['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1365
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1366
# -------------------------------------------------------------------
1367
# CONFIGNAME is the name given to the value in the libtool script.
1368
# VARNAME is the (base) name used in the configure script.
1369
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1370
# VARNAME. Any other value will be used directly.
1371
m4_define([_LT_DECL],
1372
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1373
[lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1374
[m4_ifval([$1], [$1], [$2])])
1375
lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1377
[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1378
lt_dict_add_subkey([lt_decl_dict], [$2],
1379
[tagged?], [m4_ifval([$5], [yes], [no])])])
1383
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1384
# --------------------------------------------------------
1385
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1388
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1389
# ------------------------------------------------
1390
m4_define([lt_decl_tag_varnames],
1391
[_lt_decl_filter([tagged?], [yes], $@)])
1394
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1395
# ---------------------------------------------------------
1396
m4_define([_lt_decl_filter],
1398
[0], [m4_fatal([$0: too few arguments: $#])],
1399
[1], [m4_fatal([$0: too few arguments: $#: $1])],
1400
[2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1401
[3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1402
[lt_dict_filter([lt_decl_dict], $@)])[]dnl
1406
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1407
# --------------------------------------------------
1408
m4_define([lt_decl_quote_varnames],
1409
[_lt_decl_filter([value], [1], $@)])
1412
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1413
# ---------------------------------------------------
1414
m4_define([lt_decl_dquote_varnames],
1415
[_lt_decl_filter([value], [2], $@)])
1418
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1419
# ---------------------------------------------------
1420
m4_define([lt_decl_varnames_tagged],
1421
[m4_assert([$# <= 2])dnl
1422
_$0(m4_quote(m4_default([$1], [[, ]])),
1423
m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1424
m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1425
m4_define([_lt_decl_varnames_tagged],
1426
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1429
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1430
# ------------------------------------------------
1431
m4_define([lt_decl_all_varnames],
1432
[_$0(m4_quote(m4_default([$1], [[, ]])),
1434
m4_quote(lt_decl_varnames),
1435
m4_quote(m4_shift($@))))[]dnl
1437
m4_define([_lt_decl_all_varnames],
1438
[lt_join($@, lt_decl_varnames_tagged([$1],
1439
lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1443
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1444
# ------------------------------------
1445
# Quote a variable value, and forward it to `config.status' so that its
1446
# declaration there will have the same value as in `configure'. VARNAME
1447
# must have a single quote delimited value for this to work.
1448
m4_define([_LT_CONFIG_STATUS_DECLARE],
1449
[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1452
# _LT_CONFIG_STATUS_DECLARATIONS
1453
# ------------------------------
1454
# We delimit libtool config variables with single quotes, so when
1455
# we write them to config.status, we have to be sure to quote all
1456
# embedded single quotes properly. In configure, this macro expands
1457
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1459
# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1460
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1461
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1462
[m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1467
# Output comment and list of tags supported by the script
1468
m4_defun([_LT_LIBTOOL_TAGS],
1469
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1470
available_tags="_LT_TAGS"dnl
1474
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1475
# -----------------------------------
1476
# Extract the dictionary values for VARNAME (optionally with TAG) and
1477
# expand to a commented shell variable setting:
1479
# # Some comment about what VAR is for.
1480
# visible_name=$lt_internal_name
1481
m4_define([_LT_LIBTOOL_DECLARE],
1482
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1483
[description])))[]dnl
1484
m4_pushdef([_libtool_name],
1485
m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1486
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1487
[0], [_libtool_name=[$]$1],
1488
[1], [_libtool_name=$lt_[]$1],
1489
[2], [_libtool_name=$lt_[]$1],
1490
[_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1491
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1495
# _LT_LIBTOOL_CONFIG_VARS
1496
# -----------------------
1497
# Produce commented declarations of non-tagged libtool config variables
1498
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1499
# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
1500
# section) are produced by _LT_LIBTOOL_TAG_VARS.
1501
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1502
[m4_foreach([_lt_var],
1503
m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1504
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1507
# _LT_LIBTOOL_TAG_VARS(TAG)
1508
# -------------------------
1509
m4_define([_LT_LIBTOOL_TAG_VARS],
1510
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1511
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1514
# _LT_TAGVAR(VARNAME, [TAGNAME])
1515
# ------------------------------
1516
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1519
# _LT_CONFIG_COMMANDS
1520
# -------------------
1521
# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
1522
# variables for single and double quote escaping we saved from calls
1523
# to _LT_DECL, we can put quote escaped variables declarations
1524
# into `config.status', and then the shell code to quote escape them in
1525
# for loops in `config.status'. Finally, any additional code accumulated
1526
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1527
m4_defun([_LT_CONFIG_COMMANDS],
1528
[AC_PROVIDE_IFELSE([LT_OUTPUT],
1529
dnl If the libtool generation code has been placed in $CONFIG_LT,
1530
dnl instead of duplicating it all over again into config.status,
1531
dnl then we will have config.status run $CONFIG_LT later, so it
1532
dnl needs to know what name is stored there:
1533
[AC_CONFIG_COMMANDS([libtool],
1534
[$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1535
dnl If the libtool generation code is destined for config.status,
1536
dnl expand the accumulated commands and init code now:
1537
[AC_CONFIG_COMMANDS([libtool],
1538
[_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1539
])#_LT_CONFIG_COMMANDS
1543
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1546
# The HP-UX ksh and POSIX shell print the target directory to stdout
1548
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1550
sed_quote_subst='$sed_quote_subst'
1551
double_quote_subst='$double_quote_subst'
1552
delay_variable_subst='$delay_variable_subst'
1553
_LT_CONFIG_STATUS_DECLARATIONS
1555
LTCFLAGS='$LTCFLAGS'
1556
compiler='$compiler_DEFAULT'
1558
# A function that is used when there is no print builtin or printf.
1559
func_fallback_echo ()
1561
eval 'cat <<_LTECHO_EOF
1566
# Quote evaled strings.
1567
for var in lt_decl_all_varnames([[ \
1568
]], lt_decl_quote_varnames); do
1569
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1570
*[[\\\\\\\`\\"\\\$]]*)
1571
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1574
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1579
# Double-quote double-evaled strings.
1580
for var in lt_decl_all_varnames([[ \
1581
]], lt_decl_dquote_varnames); do
1582
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1583
*[[\\\\\\\`\\"\\\$]]*)
1584
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1587
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1592
_LT_OUTPUT_LIBTOOL_INIT
1595
# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1596
# ------------------------------------
1597
# Generate a child script FILE with all initialization necessary to
1598
# reuse the environment learned by the parent script, and make the
1599
# file executable. If COMMENT is supplied, it is inserted after the
1600
# `#!' sequence but before initialization text begins. After this
1601
# macro, additional text can be appended to FILE to form the body of
1602
# the child script. The macro ends with non-zero status if the
1603
# file could not be fully written (such as if the disk is full).
1604
m4_ifdef([AS_INIT_GENERATED],
1605
[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1606
[m4_defun([_LT_GENERATED_FILE_INIT],
1607
[m4_require([AS_PREPARE])]dnl
1608
[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1610
cat >$1 <<_ASEOF || lt_write_fail=1
1612
# Generated by $as_me.
1614
SHELL=\${CONFIG_SHELL-$SHELL}
1617
cat >>$1 <<\_ASEOF || lt_write_fail=1
1620
exec AS_MESSAGE_FD>&1
1622
test $lt_write_fail = 0 && chmod +x $1[]dnl
1623
m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1627
# This macro allows early generation of the libtool script (before
1628
# AC_OUTPUT is called), incase it is used in configure for compilation
1630
AC_DEFUN([LT_OUTPUT],
1631
[: ${CONFIG_LT=./config.lt}
1632
AC_MSG_NOTICE([creating $CONFIG_LT])
1633
_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1634
[# Run this file to recreate a libtool stub with the current configuration.])
1636
cat >>"$CONFIG_LT" <<\_LTEOF
1638
exec AS_MESSAGE_LOG_FD>>config.log
1641
AS_BOX([Running $as_me.])
1642
} >&AS_MESSAGE_LOG_FD
1645
\`$as_me' creates a local libtool stub from the current configuration,
1646
for use in further configure time tests before the real libtool is
1649
Usage: $[0] [[OPTIONS]]
1651
-h, --help print this help, then exit
1652
-V, --version print version number, then exit
1653
-q, --quiet do not print progress messages
1654
-d, --debug don't remove temporary files
1656
Report bugs to <bug-libtool@gnu.org>."
1659
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1660
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1661
configured by $[0], generated by m4_PACKAGE_STRING.
1663
Copyright (C) 2010 Free Software Foundation, Inc.
1664
This config.lt script is free software; the Free Software Foundation
1665
gives unlimited permision to copy, distribute and modify it."
1667
while test $[#] != 0
1670
--version | --v* | -V )
1671
echo "$lt_cl_version"; exit 0 ;;
1672
--help | --h* | -h )
1673
echo "$lt_cl_help"; exit 0 ;;
1674
--debug | --d* | -d )
1676
--quiet | --q* | --silent | --s* | -q )
1679
-*) AC_MSG_ERROR([unrecognized option: $[1]
1680
Try \`$[0] --help' for more information.]) ;;
1682
*) AC_MSG_ERROR([unrecognized argument: $[1]
1683
Try \`$[0] --help' for more information.]) ;;
1688
if $lt_cl_silent; then
1689
exec AS_MESSAGE_FD>/dev/null
1693
cat >>"$CONFIG_LT" <<_LTEOF
1694
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1697
cat >>"$CONFIG_LT" <<\_LTEOF
1698
AC_MSG_NOTICE([creating $ofile])
1699
_LT_OUTPUT_LIBTOOL_COMMANDS
1702
chmod +x "$CONFIG_LT"
1704
# configure is writing to config.log, but config.lt does its own redirection,
1705
# appending to config.log, which fails on DOS, as config.log is still kept
1706
# open by configure. Here we exec the FD to /dev/null, effectively closing
1707
# config.log, so it can be properly (re)opened and appended to by config.lt.
1709
test "$silent" = yes &&
1710
lt_config_lt_args="$lt_config_lt_args --quiet"
1711
exec AS_MESSAGE_LOG_FD>/dev/null
1712
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1713
exec AS_MESSAGE_LOG_FD>>config.log
1714
$lt_cl_success || AS_EXIT(1)
1720
# If TAG is the built-in tag, create an initial libtool script with a
1721
# default configuration from the untagged config vars. Otherwise add code
1722
# to config.status for appending the configuration named by TAG from the
1723
# matching tagged config vars.
1724
m4_defun([_LT_CONFIG],
1725
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1726
_LT_CONFIG_SAVE_COMMANDS([
1727
m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1728
m4_if(_LT_TAG, [C], [
1729
# See if we are running on zsh, and set the options which allow our
1730
# commands through without removal of \ escapes.
1731
if test -n "${ZSH_VERSION+set}" ; then
1732
setopt NO_GLOB_SUBST
1736
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1739
cat <<_LT_EOF >> "$cfgfile"
1742
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1743
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1744
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1745
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1750
# ### BEGIN LIBTOOL CONFIG
1751
_LT_LIBTOOL_CONFIG_VARS
1752
_LT_LIBTOOL_TAG_VARS
1753
# ### END LIBTOOL CONFIG
1759
cat <<\_LT_EOF >> "$cfgfile"
1760
# AIX sometimes has problems with the GCC collect2 program. For some
1761
# reason, if we set the COLLECT_NAMES environment variable, the problems
1762
# vanish in a puff of smoke.
1763
if test "X${COLLECT_NAMES+set}" != Xset; then
1765
export COLLECT_NAMES
1773
# We use sed instead of cat because bash on DJGPP gets confused if
1774
# if finds mixed CR/LF and LF-only lines. Since sed operates in
1775
# text mode, it properly converts lines to CR/LF. This bash problem
1776
# is reportedly fixed, but why not run on old versions too?
1777
sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
1778
|| (rm -f "$cfgfile"; exit 1)
1780
_LT_PROG_XSI_SHELLFNS
1782
sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
1783
|| (rm -f "$cfgfile"; exit 1)
1785
mv -f "$cfgfile" "$ofile" ||
1786
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1789
[cat <<_LT_EOF >> "$ofile"
1791
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1792
dnl in a comment (ie after a #).
1793
# ### BEGIN LIBTOOL TAG CONFIG: $1
1794
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1795
# ### END LIBTOOL TAG CONFIG: $1
1802
TIMESTAMP='$TIMESTAMP'
1804
ofile='$ofile'], [])
1805
])dnl /_LT_CONFIG_SAVE_COMMANDS
1809
# LT_SUPPORTED_TAG(TAG)
1810
# ---------------------
1811
# Trace this macro to discover what tags are supported by the libtool
1812
# --tag option, using:
1813
# autoconf --trace 'LT_SUPPORTED_TAG:$1'
1814
AC_DEFUN([LT_SUPPORTED_TAG], [])
1817
# C support is built-in for now
1818
m4_define([_LT_LANG_C_enabled], [])
1819
m4_define([_LT_TAGS], [])
1824
# Enable libtool support for the given language if not already enabled.
1826
[AC_BEFORE([$0], [LT_OUTPUT])dnl
1829
[C++], [_LT_LANG(CXX)],
1830
[Java], [_LT_LANG(GCJ)],
1831
[Fortran 77], [_LT_LANG(F77)],
1832
[Fortran], [_LT_LANG(FC)],
1833
[Windows Resource], [_LT_LANG(RC)],
1834
[m4_ifdef([_LT_LANG_]$1[_CONFIG],
1836
[m4_fatal([$0: unsupported language: "$1"])])])dnl
1840
# _LT_LANG(LANGNAME)
1841
# ------------------
1842
m4_defun([_LT_LANG],
1843
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1844
[LT_SUPPORTED_TAG([$1])dnl
1845
m4_append([_LT_TAGS], [$1 ])dnl
1846
m4_define([_LT_LANG_]$1[_enabled], [])dnl
1847
_LT_LANG_$1_CONFIG($1)])dnl
1851
# _LT_LANG_DEFAULT_CONFIG
1852
# -----------------------
1853
m4_defun([_LT_LANG_DEFAULT_CONFIG],
1854
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1856
[m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1858
AC_PROVIDE_IFELSE([AC_PROG_F77],
1860
[m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1862
AC_PROVIDE_IFELSE([AC_PROG_FC],
1864
[m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1866
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1867
dnl pulling things in needlessly.
1868
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1870
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1872
[AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1874
[m4_ifdef([AC_PROG_GCJ],
1875
[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1876
m4_ifdef([A][M_PROG_GCJ],
1877
[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1878
m4_ifdef([LT_PROG_GCJ],
1879
[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1881
AC_PROVIDE_IFELSE([LT_PROG_RC],
1883
[m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1884
])# _LT_LANG_DEFAULT_CONFIG
1887
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1888
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1889
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1890
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1891
AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
1892
dnl aclocal-1.4 backwards compatibility:
1893
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1894
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1895
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1896
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1897
dnl AC_DEFUN([AC_LIBTOOL_RC], [])
1902
m4_defun([_LT_TAG_COMPILER],
1903
[AC_REQUIRE([AC_PROG_CC])dnl
1905
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1906
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1907
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1908
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1910
# If no C compiler was specified, use CC.
1913
# If no C compiler flags were specified, use CFLAGS.
1914
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1916
# Allow CC to be a program name with arguments.
1918
])# _LT_TAG_COMPILER
1921
# _LT_COMPILER_BOILERPLATE
1922
# ------------------------
1923
# Check for compiler boilerplate output or warnings with
1924
# the simple compiler test code.
1925
m4_defun([_LT_COMPILER_BOILERPLATE],
1926
[m4_require([_LT_DECL_SED])dnl
1927
ac_outfile=conftest.$ac_objext
1928
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1929
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1930
_lt_compiler_boilerplate=`cat conftest.err`
1932
])# _LT_COMPILER_BOILERPLATE
1935
# _LT_LINKER_BOILERPLATE
1936
# ----------------------
1937
# Check for linker boilerplate output or warnings with
1938
# the simple link test code.
1939
m4_defun([_LT_LINKER_BOILERPLATE],
1940
[m4_require([_LT_DECL_SED])dnl
1941
ac_outfile=conftest.$ac_objext
1942
echo "$lt_simple_link_test_code" >conftest.$ac_ext
1943
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1944
_lt_linker_boilerplate=`cat conftest.err`
1946
])# _LT_LINKER_BOILERPLATE
1948
# _LT_REQUIRED_DARWIN_CHECKS
1949
# -------------------------
1950
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1952
rhapsody* | darwin*)
1953
AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1954
AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1955
AC_CHECK_TOOL([LIPO], [lipo], [:])
1956
AC_CHECK_TOOL([OTOOL], [otool], [:])
1957
AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1958
_LT_DECL([], [DSYMUTIL], [1],
1959
[Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1960
_LT_DECL([], [NMEDIT], [1],
1961
[Tool to change global to local symbols on Mac OS X])
1962
_LT_DECL([], [LIPO], [1],
1963
[Tool to manipulate fat objects and archives on Mac OS X])
1964
_LT_DECL([], [OTOOL], [1],
1965
[ldd/readelf like tool for Mach-O binaries on Mac OS X])
1966
_LT_DECL([], [OTOOL64], [1],
1967
[ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1969
AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1970
[lt_cv_apple_cc_single_mod=no
1971
if test -z "${LT_MULTI_MODULE}"; then
1972
# By default we will add the -single_module flag. You can override
1973
# by either setting the environment variable LT_MULTI_MODULE
1974
# non-empty at configure time, or by adding -multi_module to the
1976
rm -rf libconftest.dylib*
1977
echo "int foo(void){return 1;}" > conftest.c
1978
echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1979
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1980
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1981
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1983
if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1984
lt_cv_apple_cc_single_mod=yes
1986
cat conftest.err >&AS_MESSAGE_LOG_FD
1988
rm -rf libconftest.dylib*
1991
AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1992
[lt_cv_ld_exported_symbols_list],
1993
[lt_cv_ld_exported_symbols_list=no
1994
save_LDFLAGS=$LDFLAGS
1995
echo "_main" > conftest.sym
1996
LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1997
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1998
[lt_cv_ld_exported_symbols_list=yes],
1999
[lt_cv_ld_exported_symbols_list=no])
2000
LDFLAGS="$save_LDFLAGS"
2002
AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2003
[lt_cv_ld_force_load=no
2004
cat > conftest.c << _LT_EOF
2005
int forced_loaded() { return 2;}
2007
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2008
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2009
echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2010
$AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2011
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2012
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2013
cat > conftest.c << _LT_EOF
2014
int main() { return 0;}
2016
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2017
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2019
if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
2020
lt_cv_ld_force_load=yes
2022
cat conftest.err >&AS_MESSAGE_LOG_FD
2024
rm -f conftest.err libconftest.a conftest conftest.c
2025
rm -rf conftest.dSYM
2028
rhapsody* | darwin1.[[012]])
2029
_lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2031
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2032
darwin*) # darwin 5.x on
2033
# if running on 10.5 or later, the deployment target defaults
2034
# to the OS version, if on x86, and 10.4, the deployment
2035
# target defaults to 10.4. Don't you love it?
2036
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2037
10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2038
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2040
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2042
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2046
if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2047
_lt_dar_single_mod='$single_module'
2049
if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2050
_lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2052
_lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2054
if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2055
_lt_dsymutil='~$DSYMUTIL $lib || :'
2064
# _LT_DARWIN_LINKER_FEATURES
2065
# --------------------------
2066
# Checks for linker and compiler features on darwin
2067
m4_defun([_LT_DARWIN_LINKER_FEATURES],
2069
m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2070
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
2071
_LT_TAGVAR(hardcode_direct, $1)=no
2072
_LT_TAGVAR(hardcode_automatic, $1)=yes
2073
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2074
if test "$lt_cv_ld_force_load" = "yes"; then
2075
_LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
2077
_LT_TAGVAR(whole_archive_flag_spec, $1)=''
2079
_LT_TAGVAR(link_all_deplibs, $1)=yes
2080
_LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2081
case $cc_basename in
2082
ifort*) _lt_dar_can_shared=yes ;;
2083
*) _lt_dar_can_shared=$GCC ;;
2085
if test "$_lt_dar_can_shared" = "yes"; then
2086
output_verbose_link_cmd=func_echo_all
2087
_LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
2088
_LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2089
_LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
2090
_LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
2092
[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2093
_LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
2094
_LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
2098
_LT_TAGVAR(ld_shlibs, $1)=no
2102
# _LT_SYS_MODULE_PATH_AIX
2103
# -----------------------
2104
# Links a minimal program and checks the executable
2105
# for the system default hardcoded library path. In most cases,
2106
# this is /usr/lib:/lib, but when the MPI compilers are used
2107
# the location of the communication and MPI libs are included too.
2108
# If we don't find anything, use the default library path according
2109
# to the aix ld manual.
2110
m4_defun([_LT_SYS_MODULE_PATH_AIX],
2111
[m4_require([_LT_DECL_SED])dnl
2112
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2113
lt_aix_libpath_sed='
2114
/Import File Strings/,/^$/ {
2120
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2121
# Check for a 64-bit object if we didn't find anything.
2122
if test -z "$aix_libpath"; then
2123
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2125
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2126
])# _LT_SYS_MODULE_PATH_AIX
2129
# _LT_SHELL_INIT(ARG)
2130
# -------------------
2131
m4_define([_LT_SHELL_INIT],
2132
[m4_divert_text([M4SH-INIT], [$1
2133
])])# _LT_SHELL_INIT
2137
# _LT_PROG_ECHO_BACKSLASH
2138
# -----------------------
2139
# Find how we can fake an echo command that does not interpret backslash.
2140
# In particular, with Autoconf 2.60 or later we add some code to the start
2141
# of the generated configure script which will find a shell with a builtin
2142
# printf (which we can use as an echo command).
2143
m4_defun([_LT_PROG_ECHO_BACKSLASH],
2144
[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2145
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2146
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2148
AC_MSG_CHECKING([how to print strings])
2149
# Test print first, because it will be a builtin if present.
2150
if test "X`print -r -- -n 2>/dev/null`" = X-n && \
2151
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2153
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2156
# Use this function as a fallback that always works.
2157
func_fallback_echo ()
2159
eval 'cat <<_LTECHO_EOF
2163
ECHO='func_fallback_echo'
2166
# func_echo_all arg...
2167
# Invoke $ECHO with all args, space-separated.
2174
printf*) AC_MSG_RESULT([printf]) ;;
2175
print*) AC_MSG_RESULT([print -r]) ;;
2176
*) AC_MSG_RESULT([cat]) ;;
2179
m4_ifdef([_AS_DETECT_SUGGESTED],
2180
[_AS_DETECT_SUGGESTED([
2181
test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2182
ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2183
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2184
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2185
PATH=/empty FPATH=/empty; export PATH FPATH
2186
test "X`printf %s $ECHO`" = "X$ECHO" \
2187
|| test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2189
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2190
_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2191
])# _LT_PROG_ECHO_BACKSLASH
2196
m4_defun([_LT_ENABLE_LOCK],
2197
[AC_ARG_ENABLE([libtool-lock],
2198
[AS_HELP_STRING([--disable-libtool-lock],
2199
[avoid locking (might break parallel builds)])])
2200
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2202
# Some flags need to be propagated to the compiler or linker for good
2206
# Find out which ABI we are using.
2207
echo 'int i;' > conftest.$ac_ext
2208
if AC_TRY_EVAL(ac_compile); then
2209
case `/usr/bin/file conftest.$ac_objext` in
2221
# Find out which ABI we are using.
2222
echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2223
if AC_TRY_EVAL(ac_compile); then
2224
if test "$lt_cv_prog_gnu_ld" = yes; then
2225
case `/usr/bin/file conftest.$ac_objext` in
2227
LD="${LD-ld} -melf32bsmip"
2230
LD="${LD-ld} -melf32bmipn32"
2233
LD="${LD-ld} -melf64bmip"
2237
case `/usr/bin/file conftest.$ac_objext` in
2253
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2254
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2255
# Find out which ABI we are using.
2256
echo 'int i;' > conftest.$ac_ext
2257
if AC_TRY_EVAL(ac_compile); then
2258
case `/usr/bin/file conftest.o` in
2261
x86_64-*kfreebsd*-gnu)
2262
LD="${LD-ld} -m elf_i386_fbsd"
2265
LD="${LD-ld} -m elf_i386"
2267
ppc64-*linux*|powerpc64-*linux*)
2268
LD="${LD-ld} -m elf32ppclinux"
2271
LD="${LD-ld} -m elf_s390"
2274
LD="${LD-ld} -m elf32_sparc"
2280
x86_64-*kfreebsd*-gnu)
2281
LD="${LD-ld} -m elf_x86_64_fbsd"
2284
LD="${LD-ld} -m elf_x86_64"
2286
ppc*-*linux*|powerpc*-*linux*)
2287
LD="${LD-ld} -m elf64ppc"
2289
s390*-*linux*|s390*-*tpf*)
2290
LD="${LD-ld} -m elf64_s390"
2293
LD="${LD-ld} -m elf64_sparc"
2303
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
2304
SAVE_CFLAGS="$CFLAGS"
2305
CFLAGS="$CFLAGS -belf"
2306
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2308
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2310
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2311
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2312
CFLAGS="$SAVE_CFLAGS"
2316
# Find out which ABI we are using.
2317
echo 'int i;' > conftest.$ac_ext
2318
if AC_TRY_EVAL(ac_compile); then
2319
case `/usr/bin/file conftest.o` in
2321
case $lt_cv_prog_gnu_ld in
2322
yes*) LD="${LD-ld} -m elf64_sparc" ;;
2324
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2336
need_locks="$enable_libtool_lock"
2340
# _LT_CMD_OLD_ARCHIVE
2341
# -------------------
2342
m4_defun([_LT_CMD_OLD_ARCHIVE],
2343
[AC_CHECK_TOOL(AR, ar, false)
2344
test -z "$AR" && AR=ar
2345
test -z "$AR_FLAGS" && AR_FLAGS=cru
2346
_LT_DECL([], [AR], [1], [The archiver])
2347
_LT_DECL([], [AR_FLAGS], [1])
2349
AC_CHECK_TOOL(STRIP, strip, :)
2350
test -z "$STRIP" && STRIP=:
2351
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2353
AC_CHECK_TOOL(RANLIB, ranlib, :)
2354
test -z "$RANLIB" && RANLIB=:
2355
_LT_DECL([], [RANLIB], [1],
2356
[Commands used to install an old-style archive])
2358
# Determine commands to create old-style static archives.
2359
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2360
old_postinstall_cmds='chmod 644 $oldlib'
2361
old_postuninstall_cmds=
2363
if test -n "$RANLIB"; then
2366
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2369
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2372
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2377
lock_old_archive_extraction=yes ;;
2379
lock_old_archive_extraction=no ;;
2381
_LT_DECL([], [old_postinstall_cmds], [2])
2382
_LT_DECL([], [old_postuninstall_cmds], [2])
2383
_LT_TAGDECL([], [old_archive_cmds], [2],
2384
[Commands used to build an old-style archive])
2385
_LT_DECL([], [lock_old_archive_extraction], [0],
2386
[Whether to use a lock for old archive extraction])
2387
])# _LT_CMD_OLD_ARCHIVE
2390
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2391
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2392
# ----------------------------------------------------------------
2393
# Check whether the given compiler option works
2394
AC_DEFUN([_LT_COMPILER_OPTION],
2395
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2396
m4_require([_LT_DECL_SED])dnl
2397
AC_CACHE_CHECK([$1], [$2],
2399
m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2400
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2401
lt_compiler_flag="$3"
2402
# Insert the option either (1) after the last *FLAGS variable, or
2403
# (2) before a word containing "conftest.", or (3) at the end.
2404
# Note that $ac_compile itself does not contain backslashes and begins
2405
# with a dollar sign (not a hyphen), so the echo should work correctly.
2406
# The option is referenced via a variable to avoid confusing sed.
2407
lt_compile=`echo "$ac_compile" | $SED \
2408
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2409
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2410
-e 's:$: $lt_compiler_flag:'`
2411
(eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2412
(eval "$lt_compile" 2>conftest.err)
2414
cat conftest.err >&AS_MESSAGE_LOG_FD
2415
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2416
if (exit $ac_status) && test -s "$ac_outfile"; then
2417
# The compiler can only warn and ignore the option if not recognized
2418
# So say no if there are warnings other than the usual output.
2419
$ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2420
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2421
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2428
if test x"[$]$2" = xyes; then
2429
m4_if([$5], , :, [$5])
2431
m4_if([$6], , :, [$6])
2433
])# _LT_COMPILER_OPTION
2436
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2437
dnl aclocal-1.4 backwards compatibility:
2438
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2441
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2442
# [ACTION-SUCCESS], [ACTION-FAILURE])
2443
# ----------------------------------------------------
2444
# Check whether the given linker option works
2445
AC_DEFUN([_LT_LINKER_OPTION],
2446
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2447
m4_require([_LT_DECL_SED])dnl
2448
AC_CACHE_CHECK([$1], [$2],
2450
save_LDFLAGS="$LDFLAGS"
2451
LDFLAGS="$LDFLAGS $3"
2452
echo "$lt_simple_link_test_code" > conftest.$ac_ext
2453
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2454
# The linker can only warn and ignore the option if not recognized
2455
# So say no if there are warnings
2456
if test -s conftest.err; then
2457
# Append any errors to the config.log.
2458
cat conftest.err 1>&AS_MESSAGE_LOG_FD
2459
$ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2460
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2461
if diff conftest.exp conftest.er2 >/dev/null; then
2469
LDFLAGS="$save_LDFLAGS"
2472
if test x"[$]$2" = xyes; then
2473
m4_if([$4], , :, [$4])
2475
m4_if([$5], , :, [$5])
2477
])# _LT_LINKER_OPTION
2480
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2481
dnl aclocal-1.4 backwards compatibility:
2482
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2487
AC_DEFUN([LT_CMD_MAX_LEN],
2488
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2489
# find the maximum length of command line arguments
2490
AC_MSG_CHECKING([the maximum length of command line arguments])
2491
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2497
# On DJGPP, this test can blow up pretty badly due to problems in libc
2498
# (any single argument exceeding 2000 bytes causes a buffer overrun
2499
# during glob expansion). Even if it were fixed, the result of this
2500
# check would be larger than it should be.
2501
lt_cv_sys_max_cmd_len=12288; # 12K is about right
2505
# Under GNU Hurd, this test is not required because there is
2506
# no limit to the length of command line arguments.
2507
# Libtool will interpret -1 as no limit whatsoever
2508
lt_cv_sys_max_cmd_len=-1;
2511
cygwin* | mingw* | cegcc*)
2512
# On Win9x/ME, this test blows up -- it succeeds, but takes
2513
# about 5 minutes as the teststring grows exponentially.
2514
# Worse, since 9x/ME are not pre-emptively multitasking,
2515
# you end up with a "frozen" computer, even though with patience
2516
# the test eventually succeeds (with a max line length of 256k).
2517
# Instead, let's just punt: use the minimum linelength reported by
2518
# all of the supported platforms: 8192 (on NT/2K/XP).
2519
lt_cv_sys_max_cmd_len=8192;
2523
# On MiNT this can take a long time and run out of memory.
2524
lt_cv_sys_max_cmd_len=8192;
2528
# On AmigaOS with pdksh, this test takes hours, literally.
2529
# So we just punt and use a minimum line length of 8192.
2530
lt_cv_sys_max_cmd_len=8192;
2533
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2534
# This has been around since 386BSD, at least. Likely further.
2535
if test -x /sbin/sysctl; then
2536
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2537
elif test -x /usr/sbin/sysctl; then
2538
lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2540
lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
2542
# And add a safety zone
2543
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2544
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2548
# We know the value 262144 and hardcode it with a safety zone (like BSD)
2549
lt_cv_sys_max_cmd_len=196608
2553
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2554
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2555
# nice to cause kernel panics so lets avoid the loop below.
2556
# First set a reasonable default.
2557
lt_cv_sys_max_cmd_len=16384
2559
if test -x /sbin/sysconfig; then
2560
case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2561
*1*) lt_cv_sys_max_cmd_len=-1 ;;
2566
lt_cv_sys_max_cmd_len=102400
2568
sysv5* | sco5v6* | sysv4.2uw2*)
2569
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2570
if test -n "$kargmax"; then
2571
lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
2573
lt_cv_sys_max_cmd_len=32768
2577
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2578
if test -n "$lt_cv_sys_max_cmd_len"; then
2579
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2580
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2582
# Make teststring a little bigger before we do anything with it.
2583
# a 1K string should be a reasonable start.
2584
for i in 1 2 3 4 5 6 7 8 ; do
2585
teststring=$teststring$teststring
2587
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2588
# If test is not a shell built-in, we'll probably end up computing a
2589
# maximum length that is only half of the actual maximum length, but
2591
while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
2592
= "X$teststring$teststring"; } >/dev/null 2>&1 &&
2593
test $i != 17 # 1/2 MB should be enough
2596
teststring=$teststring$teststring
2598
# Only check the string length outside the loop.
2599
lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2601
# Add a significant safety factor because C++ compilers can tack on
2602
# massive amounts of additional arguments before passing them to the
2603
# linker. It appears as though 1/2 is a usable value.
2604
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2609
if test -n $lt_cv_sys_max_cmd_len ; then
2610
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2614
max_cmd_len=$lt_cv_sys_max_cmd_len
2615
_LT_DECL([], [max_cmd_len], [0],
2616
[What is the maximum length of a command?])
2620
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2621
dnl aclocal-1.4 backwards compatibility:
2622
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2627
m4_defun([_LT_HEADER_DLFCN],
2628
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2629
])# _LT_HEADER_DLFCN
2632
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2633
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2634
# ----------------------------------------------------------------
2635
m4_defun([_LT_TRY_DLOPEN_SELF],
2636
[m4_require([_LT_HEADER_DLFCN])dnl
2637
if test "$cross_compiling" = yes; then :
2640
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2641
lt_status=$lt_dlunknown
2642
cat > conftest.$ac_ext <<_LT_EOF
2643
[#line $LINENO "configure"
2644
#include "confdefs.h"
2653
# define LT_DLGLOBAL RTLD_GLOBAL
2656
# define LT_DLGLOBAL DL_GLOBAL
2658
# define LT_DLGLOBAL 0
2662
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2663
find out it does not work in some platform. */
2664
#ifndef LT_DLLAZY_OR_NOW
2666
# define LT_DLLAZY_OR_NOW RTLD_LAZY
2669
# define LT_DLLAZY_OR_NOW DL_LAZY
2672
# define LT_DLLAZY_OR_NOW RTLD_NOW
2675
# define LT_DLLAZY_OR_NOW DL_NOW
2677
# define LT_DLLAZY_OR_NOW 0
2684
/* When -fvisbility=hidden is used, assume the code has been annotated
2685
correspondingly for the symbols needed. */
2686
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2687
void fnord () __attribute__((visibility("default")));
2690
void fnord () { int i=42; }
2693
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2694
int status = $lt_dlunknown;
2698
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
2701
if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2702
else puts (dlerror ());
2704
/* dlclose (self); */
2712
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2713
(./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2716
x$lt_dlno_uscore) $1 ;;
2717
x$lt_dlneed_uscore) $2 ;;
2718
x$lt_dlunknown|x*) $3 ;;
2721
# compilation failed
2726
])# _LT_TRY_DLOPEN_SELF
2729
# LT_SYS_DLOPEN_SELF
2730
# ------------------
2731
AC_DEFUN([LT_SYS_DLOPEN_SELF],
2732
[m4_require([_LT_HEADER_DLFCN])dnl
2733
if test "x$enable_dlopen" != xyes; then
2734
enable_dlopen=unknown
2735
enable_dlopen_self=unknown
2736
enable_dlopen_self_static=unknown
2743
lt_cv_dlopen="load_add_on"
2745
lt_cv_dlopen_self=yes
2748
mingw* | pw32* | cegcc*)
2749
lt_cv_dlopen="LoadLibrary"
2754
lt_cv_dlopen="dlopen"
2759
# if libdl is installed we need to link against it
2760
AC_CHECK_LIB([dl], [dlopen],
2761
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2764
lt_cv_dlopen_self=yes
2769
AC_CHECK_FUNC([shl_load],
2770
[lt_cv_dlopen="shl_load"],
2771
[AC_CHECK_LIB([dld], [shl_load],
2772
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2773
[AC_CHECK_FUNC([dlopen],
2774
[lt_cv_dlopen="dlopen"],
2775
[AC_CHECK_LIB([dl], [dlopen],
2776
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2777
[AC_CHECK_LIB([svld], [dlopen],
2778
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2779
[AC_CHECK_LIB([dld], [dld_link],
2780
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2789
if test "x$lt_cv_dlopen" != xno; then
2795
case $lt_cv_dlopen in
2797
save_CPPFLAGS="$CPPFLAGS"
2798
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2800
save_LDFLAGS="$LDFLAGS"
2801
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2804
LIBS="$lt_cv_dlopen_libs $LIBS"
2806
AC_CACHE_CHECK([whether a program can dlopen itself],
2807
lt_cv_dlopen_self, [dnl
2808
_LT_TRY_DLOPEN_SELF(
2809
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2810
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2813
if test "x$lt_cv_dlopen_self" = xyes; then
2814
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2815
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2816
lt_cv_dlopen_self_static, [dnl
2817
_LT_TRY_DLOPEN_SELF(
2818
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2819
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2823
CPPFLAGS="$save_CPPFLAGS"
2824
LDFLAGS="$save_LDFLAGS"
2829
case $lt_cv_dlopen_self in
2830
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2831
*) enable_dlopen_self=unknown ;;
2834
case $lt_cv_dlopen_self_static in
2835
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2836
*) enable_dlopen_self_static=unknown ;;
2839
_LT_DECL([dlopen_support], [enable_dlopen], [0],
2840
[Whether dlopen is supported])
2841
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2842
[Whether dlopen of programs is supported])
2843
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2844
[Whether dlopen of statically linked programs is supported])
2845
])# LT_SYS_DLOPEN_SELF
2848
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2849
dnl aclocal-1.4 backwards compatibility:
2850
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2853
# _LT_COMPILER_C_O([TAGNAME])
2854
# ---------------------------
2855
# Check to see if options -c and -o are simultaneously supported by compiler.
2856
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2857
m4_defun([_LT_COMPILER_C_O],
2858
[m4_require([_LT_DECL_SED])dnl
2859
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2860
m4_require([_LT_TAG_COMPILER])dnl
2861
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2862
[_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2863
[_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2864
$RM -r conftest 2>/dev/null
2868
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2870
lt_compiler_flag="-o out/conftest2.$ac_objext"
2871
# Insert the option either (1) after the last *FLAGS variable, or
2872
# (2) before a word containing "conftest.", or (3) at the end.
2873
# Note that $ac_compile itself does not contain backslashes and begins
2874
# with a dollar sign (not a hyphen), so the echo should work correctly.
2875
lt_compile=`echo "$ac_compile" | $SED \
2876
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2877
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2878
-e 's:$: $lt_compiler_flag:'`
2879
(eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2880
(eval "$lt_compile" 2>out/conftest.err)
2882
cat out/conftest.err >&AS_MESSAGE_LOG_FD
2883
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2884
if (exit $ac_status) && test -s out/conftest2.$ac_objext
2886
# The compiler can only warn and ignore the option if not recognized
2887
# So say no if there are warnings
2888
$ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2889
$SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2890
if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2891
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2894
chmod u+w . 2>&AS_MESSAGE_LOG_FD
2896
# SGI C++ compiler will create directory out/ii_files/ for
2897
# template instantiation
2898
test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2899
$RM out/* && rmdir out
2904
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2905
[Does compiler simultaneously support -c and -o options?])
2906
])# _LT_COMPILER_C_O
2909
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2910
# ----------------------------------
2911
# Check to see if we can do hard links to lock some files if needed
2912
m4_defun([_LT_COMPILER_FILE_LOCKS],
2913
[m4_require([_LT_ENABLE_LOCK])dnl
2914
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2915
_LT_COMPILER_C_O([$1])
2917
hard_links="nottested"
2918
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2919
# do not overwrite the value of need_locks provided by the user
2920
AC_MSG_CHECKING([if we can lock with hard links])
2923
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2925
ln conftest.a conftest.b 2>&5 || hard_links=no
2926
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2927
AC_MSG_RESULT([$hard_links])
2928
if test "$hard_links" = no; then
2929
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2935
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2936
])# _LT_COMPILER_FILE_LOCKS
2941
m4_defun([_LT_CHECK_OBJDIR],
2942
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2943
[rm -f .libs 2>/dev/null
2944
mkdir .libs 2>/dev/null
2945
if test -d .libs; then
2948
# MS-DOS does not allow filenames that begin with a dot.
2951
rmdir .libs 2>/dev/null])
2952
objdir=$lt_cv_objdir
2953
_LT_DECL([], [objdir], [0],
2954
[The name of the directory that contains temporary libtool files])dnl
2955
m4_pattern_allow([LT_OBJDIR])dnl
2956
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2957
[Define to the sub-directory in which libtool stores uninstalled libraries.])
2958
])# _LT_CHECK_OBJDIR
2961
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2962
# --------------------------------------
2963
# Check hardcoding attributes.
2964
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2965
[AC_MSG_CHECKING([how to hardcode library paths into programs])
2966
_LT_TAGVAR(hardcode_action, $1)=
2967
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2968
test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2969
test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2971
# We can hardcode non-existent directories.
2972
if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2973
# If the only mechanism to avoid hardcoding is shlibpath_var, we
2974
# have to relink, otherwise we might link with an installed library
2975
# when we should be linking with a yet-to-be-installed one
2976
## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2977
test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2978
# Linking always hardcodes the temporary library directory.
2979
_LT_TAGVAR(hardcode_action, $1)=relink
2981
# We can link without hardcoding, and we can hardcode nonexisting dirs.
2982
_LT_TAGVAR(hardcode_action, $1)=immediate
2985
# We cannot hardcode anything, or else we can only hardcode existing
2987
_LT_TAGVAR(hardcode_action, $1)=unsupported
2989
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2991
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2992
test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2993
# Fast installation is not supported
2994
enable_fast_install=no
2995
elif test "$shlibpath_overrides_runpath" = yes ||
2996
test "$enable_shared" = no; then
2997
# Fast installation is not necessary
2998
enable_fast_install=needless
3000
_LT_TAGDECL([], [hardcode_action], [0],
3001
[How to hardcode a shared library path into an executable])
3002
])# _LT_LINKER_HARDCODE_LIBPATH
3007
m4_defun([_LT_CMD_STRIPLIB],
3008
[m4_require([_LT_DECL_EGREP])
3011
AC_MSG_CHECKING([whether stripping libraries is possible])
3012
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3013
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3014
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3015
AC_MSG_RESULT([yes])
3017
# FIXME - insert some real tests, host_os isn't really good enough
3020
if test -n "$STRIP" ; then
3021
striplib="$STRIP -x"
3022
old_striplib="$STRIP -S"
3023
AC_MSG_RESULT([yes])
3033
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3034
_LT_DECL([], [striplib], [1])
3035
])# _LT_CMD_STRIPLIB
3038
# _LT_SYS_DYNAMIC_LINKER([TAG])
3039
# -----------------------------
3040
# PORTME Fill in your ld.so characteristics
3041
m4_defun([_LT_SYS_DYNAMIC_LINKER],
3042
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3043
m4_require([_LT_DECL_EGREP])dnl
3044
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3045
m4_require([_LT_DECL_OBJDUMP])dnl
3046
m4_require([_LT_DECL_SED])dnl
3047
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3048
AC_MSG_CHECKING([dynamic linker characteristics])
3051
if test "$GCC" = yes; then
3053
darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3054
*) lt_awk_arg="/^libraries:/" ;;
3057
mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3058
*) lt_sed_strip_eq="s,=/,/,g" ;;
3060
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3061
case $lt_search_path_spec in
3063
# if the path contains ";" then we assume it to be the separator
3064
# otherwise default to the standard path separator (i.e. ":") - it is
3065
# assumed that no part of a normal pathname contains ";" but that should
3066
# okay in the real world where ";" in dirpaths is itself problematic.
3067
lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3070
lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3073
# Ok, now we have the path, separated by spaces, we can step through it
3074
# and add multilib dir if necessary.
3075
lt_tmp_lt_search_path_spec=
3076
lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3077
for lt_sys_path in $lt_search_path_spec; do
3078
if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3079
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3081
test -d "$lt_sys_path" && \
3082
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3085
lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3086
BEGIN {RS=" "; FS="/|\n";} {
3089
for (lt_i = NF; lt_i > 0; lt_i--) {
3090
if ($lt_i != "" && $lt_i != ".") {
3091
if ($lt_i == "..") {
3094
if (lt_count == 0) {
3095
lt_foo="/" $lt_i lt_foo;
3102
if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3103
if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3105
# AWK program above erroneously prepends '/' to C:/dos/paths
3108
mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3109
$SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3111
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3113
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3116
libname_spec='lib$name'
3124
shlibpath_overrides_runpath=unknown
3126
dynamic_linker="$host_os ld.so"
3127
sys_lib_dlsearch_path_spec="/lib /usr/lib"
3128
need_lib_prefix=unknown
3129
hardcode_into_libs=no
3131
# when you set need_version to no, make sure it does not cause -set_version
3132
# flags to be left without arguments
3133
need_version=unknown
3138
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3139
shlibpath_var=LIBPATH
3141
# AIX 3 has no versioning support, so we append a major version to the name.
3142
soname_spec='${libname}${release}${shared_ext}$major'
3149
hardcode_into_libs=yes
3150
if test "$host_cpu" = ia64; then
3151
# AIX 5 supports IA64
3152
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3153
shlibpath_var=LD_LIBRARY_PATH
3155
# With GCC up to 2.95.x, collect2 would create an import file
3156
# for dependence libraries. The import file would start with
3157
# the line `#! .'. This would cause the generated library to
3158
# depend on `.', always an invalid library. This was fixed in
3159
# development snapshots of GCC prior to 3.0.
3161
aix4 | aix4.[[01]] | aix4.[[01]].*)
3162
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3164
echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3171
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3172
# soname into executable. Probably we can add versioning support to
3173
# collect2, so additional links can be useful in future.
3174
if test "$aix_use_runtimelinking" = yes; then
3175
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
3176
# instead of lib<name>.a to let people know that these are not
3177
# typical AIX shared libraries.
3178
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3180
# We preserve .a as extension for shared libraries through AIX4.2
3181
# and later when we are not doing run time linking.
3182
library_names_spec='${libname}${release}.a $libname.a'
3183
soname_spec='${libname}${release}${shared_ext}$major'
3185
shlibpath_var=LIBPATH
3192
# Since July 2007 AmigaOS4 officially supports .so libraries.
3193
# When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3194
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3197
library_names_spec='$libname.ixlibrary $libname.a'
3198
# Create ${libname}_ixlibrary.a entries in /sys/libs.
3199
finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
3205
library_names_spec='${libname}${shared_ext}'
3206
dynamic_linker="$host_os ld.so"
3207
shlibpath_var=LIBRARY_PATH
3213
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3214
soname_spec='${libname}${release}${shared_ext}$major'
3215
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3216
shlibpath_var=LD_LIBRARY_PATH
3217
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3218
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3219
# the default ld.so.conf also contains /usr/contrib/lib and
3220
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3221
# libtool to hard-code these into programs
3224
cygwin* | mingw* | pw32* | cegcc*)
3225
version_type=windows
3230
case $GCC,$host_os in
3231
yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
3232
library_names_spec='$libname.dll.a'
3233
# DLL is installed to $(libdir)/../bin by postinstall_cmds
3234
postinstall_cmds='base_file=`basename \${file}`~
3235
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3236
dldir=$destdir/`dirname \$dlpath`~
3237
test -d \$dldir || mkdir -p \$dldir~
3238
$install_prog $dir/$dlname \$dldir/$dlname~
3239
chmod a+x \$dldir/$dlname~
3240
if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3241
eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3243
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3244
dlpath=$dir/\$dldll~
3246
shlibpath_overrides_runpath=yes
3250
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
3251
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3253
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3256
# MinGW DLLs use traditional 'lib' prefix
3257
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3260
# pw32 DLLs use 'pw' prefix rather than 'lib'
3261
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3267
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3270
dynamic_linker='Win32 ld.exe'
3271
# FIXME: first we should search . and the directory the executable is in
3275
darwin* | rhapsody*)
3276
dynamic_linker="$host_os dyld"
3280
library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3281
soname_spec='${libname}${release}${major}$shared_ext'
3282
shlibpath_overrides_runpath=yes
3283
shlibpath_var=DYLD_LIBRARY_PATH
3284
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3286
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3287
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3294
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3295
soname_spec='${libname}${release}${shared_ext}$major'
3296
shlibpath_var=LD_LIBRARY_PATH
3303
freebsd* | dragonfly*)
3304
# DragonFly does not have aout. When/if they implement a new
3305
# versioning mechanism, adjust this.
3306
if test -x /usr/bin/objformat; then
3307
objformat=`/usr/bin/objformat`
3310
freebsd[[123]]*) objformat=aout ;;
3314
version_type=freebsd-$objformat
3315
case $version_type in
3317
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3322
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3326
shlibpath_var=LD_LIBRARY_PATH
3329
shlibpath_overrides_runpath=yes
3331
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3332
shlibpath_overrides_runpath=yes
3333
hardcode_into_libs=yes
3335
freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3336
freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3337
shlibpath_overrides_runpath=no
3338
hardcode_into_libs=yes
3340
*) # from 4.6 on, and DragonFly
3341
shlibpath_overrides_runpath=yes
3342
hardcode_into_libs=yes
3351
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3352
soname_spec='${libname}${release}${shared_ext}$major'
3353
shlibpath_var=LD_LIBRARY_PATH
3354
hardcode_into_libs=yes
3361
dynamic_linker="$host_os runtime_loader"
3362
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3363
soname_spec='${libname}${release}${shared_ext}$major'
3364
shlibpath_var=LIBRARY_PATH
3365
shlibpath_overrides_runpath=yes
3366
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3367
hardcode_into_libs=yes
3370
hpux9* | hpux10* | hpux11*)
3371
# Give a soname corresponding to the major version so that dld.sl refuses to
3372
# link against other versions.
3379
hardcode_into_libs=yes
3380
dynamic_linker="$host_os dld.so"
3381
shlibpath_var=LD_LIBRARY_PATH
3382
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3383
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3384
soname_spec='${libname}${release}${shared_ext}$major'
3385
if test "X$HPUX_IA64_MODE" = X32; then
3386
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3388
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3390
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3394
hardcode_into_libs=yes
3395
dynamic_linker="$host_os dld.sl"
3396
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3397
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3398
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3399
soname_spec='${libname}${release}${shared_ext}$major'
3400
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3401
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3405
dynamic_linker="$host_os dld.sl"
3406
shlibpath_var=SHLIB_PATH
3407
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3408
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3409
soname_spec='${libname}${release}${shared_ext}$major'
3412
# HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3413
postinstall_cmds='chmod 555 $lib'
3414
# or fails outright, so override atomically:
3415
install_override_mode=555
3422
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3423
soname_spec='${libname}${release}${shared_ext}$major'
3424
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3425
shlibpath_var=LD_LIBRARY_PATH
3426
shlibpath_overrides_runpath=no
3427
hardcode_into_libs=yes
3430
irix5* | irix6* | nonstopux*)
3432
nonstopux*) version_type=nonstopux ;;
3434
if test "$lt_cv_prog_gnu_ld" = yes; then
3442
soname_spec='${libname}${release}${shared_ext}$major'
3443
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3445
irix5* | nonstopux*)
3449
case $LD in # libtool.m4 will add one of these switches to LD
3450
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3451
libsuff= shlibsuff= libmagic=32-bit;;
3452
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3453
libsuff=32 shlibsuff=N32 libmagic=N32;;
3454
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3455
libsuff=64 shlibsuff=64 libmagic=64-bit;;
3456
*) libsuff= shlibsuff= libmagic=never-match;;
3460
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3461
shlibpath_overrides_runpath=no
3462
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3463
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3464
hardcode_into_libs=yes
3467
# No shared lib support for Linux oldld, aout, or coff.
3468
linux*oldld* | linux*aout* | linux*coff*)
3472
# This must be Linux ELF.
3473
linux* | k*bsd*-gnu | kopensolaris*-gnu)
3477
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3478
soname_spec='${libname}${release}${shared_ext}$major'
3479
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3480
shlibpath_var=LD_LIBRARY_PATH
3481
shlibpath_overrides_runpath=no
3483
# Some binutils ld are patched to set DT_RUNPATH
3484
AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3485
[lt_cv_shlibpath_overrides_runpath=no
3486
save_LDFLAGS=$LDFLAGS
3488
eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3489
LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3490
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3491
[AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3492
[lt_cv_shlibpath_overrides_runpath=yes])])
3493
LDFLAGS=$save_LDFLAGS
3496
shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3498
# This implies no fast_install, which is unacceptable.
3499
# Some rework will be needed to allow for fast_install
3500
# before this can be enabled.
3501
hardcode_into_libs=yes
3503
# Append ld.so.conf contents to the search path
3504
if test -f /etc/ld.so.conf; then
3505
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;s/"//g;/^$/d' | tr '\n' ' '`
3506
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3509
# We used to test for /lib/ld.so.1 and disable shared libraries on
3510
# powerpc, because MkLinux only supported shared libraries with the
3511
# GNU dynamic linker. Since this was broken with cross compilers,
3512
# most powerpc-linux boxes support dynamic linking these days and
3513
# people can always --disable-shared, the test was removed, and we
3514
# assume the GNU/Linux dynamic linker is in use.
3515
dynamic_linker='GNU/Linux ld.so'
3522
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3523
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3524
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3525
dynamic_linker='NetBSD (a.out) ld.so'
3527
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3528
soname_spec='${libname}${release}${shared_ext}$major'
3529
dynamic_linker='NetBSD ld.elf_so'
3531
shlibpath_var=LD_LIBRARY_PATH
3532
shlibpath_overrides_runpath=yes
3533
hardcode_into_libs=yes
3538
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3539
shlibpath_var=LD_LIBRARY_PATH
3540
shlibpath_overrides_runpath=yes
3547
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3548
soname_spec='${libname}${release}${shared_ext}$major'
3549
shlibpath_var=LD_LIBRARY_PATH
3550
shlibpath_overrides_runpath=no
3551
hardcode_into_libs=yes
3552
dynamic_linker='ldqnx.so'
3557
sys_lib_dlsearch_path_spec="/usr/lib"
3559
# Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3561
openbsd3.3 | openbsd3.3.*) need_version=yes ;;
3562
*) need_version=no ;;
3564
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3565
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3566
shlibpath_var=LD_LIBRARY_PATH
3567
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3569
openbsd2.[[89]] | openbsd2.[[89]].*)
3570
shlibpath_overrides_runpath=no
3573
shlibpath_overrides_runpath=yes
3577
shlibpath_overrides_runpath=yes
3582
libname_spec='$name'
3585
library_names_spec='$libname${shared_ext} $libname.a'
3586
dynamic_linker='OS/2 ld.exe'
3587
shlibpath_var=LIBPATH
3590
osf3* | osf4* | osf5*)
3594
soname_spec='${libname}${release}${shared_ext}$major'
3595
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3596
shlibpath_var=LD_LIBRARY_PATH
3597
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3598
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3609
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3610
soname_spec='${libname}${release}${shared_ext}$major'
3611
shlibpath_var=LD_LIBRARY_PATH
3612
shlibpath_overrides_runpath=yes
3613
hardcode_into_libs=yes
3614
# ldd complains unless libraries are executable
3615
postinstall_cmds='chmod +x $lib'
3620
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3621
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3622
shlibpath_var=LD_LIBRARY_PATH
3623
shlibpath_overrides_runpath=yes
3624
if test "$with_gnu_ld" = yes; then
3632
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3633
soname_spec='${libname}${release}${shared_ext}$major'
3634
shlibpath_var=LD_LIBRARY_PATH
3635
case $host_vendor in
3637
shlibpath_overrides_runpath=no
3639
runpath_var=LD_RUN_PATH
3647
shlibpath_overrides_runpath=no
3648
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3654
if test -d /usr/nec ;then
3656
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3657
soname_spec='$libname${shared_ext}.$major'
3658
shlibpath_var=LD_LIBRARY_PATH
3662
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3663
version_type=freebsd-elf
3666
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3667
soname_spec='${libname}${release}${shared_ext}$major'
3668
shlibpath_var=LD_LIBRARY_PATH
3669
shlibpath_overrides_runpath=yes
3670
hardcode_into_libs=yes
3671
if test "$with_gnu_ld" = yes; then
3672
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3674
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3677
sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3681
sys_lib_dlsearch_path_spec='/usr/lib'
3685
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3689
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3690
shlibpath_var=LD_LIBRARY_PATH
3691
shlibpath_overrides_runpath=no
3692
hardcode_into_libs=yes
3697
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3698
soname_spec='${libname}${release}${shared_ext}$major'
3699
shlibpath_var=LD_LIBRARY_PATH
3706
AC_MSG_RESULT([$dynamic_linker])
3707
test "$dynamic_linker" = no && can_build_shared=no
3709
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3710
if test "$GCC" = yes; then
3711
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3714
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3715
sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3717
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3718
sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3721
_LT_DECL([], [variables_saved_for_relink], [1],
3722
[Variables whose values should be saved in libtool wrapper scripts and
3723
restored at link time])
3724
_LT_DECL([], [need_lib_prefix], [0],
3725
[Do we need the "lib" prefix for modules?])
3726
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3727
_LT_DECL([], [version_type], [0], [Library versioning type])
3728
_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3729
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3730
_LT_DECL([], [shlibpath_overrides_runpath], [0],
3731
[Is shlibpath searched before the hard-coded library search path?])
3732
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3733
_LT_DECL([], [library_names_spec], [1],
3734
[[List of archive names. First name is the real one, the rest are links.
3735
The last name is the one that the linker finds with -lNAME]])
3736
_LT_DECL([], [soname_spec], [1],
3737
[[The coded name of the library, if different from the real name]])
3738
_LT_DECL([], [install_override_mode], [1],
3739
[Permission mode override for installation of shared libraries])
3740
_LT_DECL([], [postinstall_cmds], [2],
3741
[Command to use after installation of a shared archive])
3742
_LT_DECL([], [postuninstall_cmds], [2],
3743
[Command to use after uninstallation of a shared archive])
3744
_LT_DECL([], [finish_cmds], [2],
3745
[Commands used to finish a libtool library installation in a directory])
3746
_LT_DECL([], [finish_eval], [1],
3747
[[As "finish_cmds", except a single script fragment to be evaled but
3749
_LT_DECL([], [hardcode_into_libs], [0],
3750
[Whether we should hardcode library paths into libraries])
3751
_LT_DECL([], [sys_lib_search_path_spec], [2],
3752
[Compile-time system search path for libraries])
3753
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3754
[Run-time system search path for libraries])
3755
])# _LT_SYS_DYNAMIC_LINKER
3758
# _LT_PATH_TOOL_PREFIX(TOOL)
3759
# --------------------------
3760
# find a file program which can recognize shared library
3761
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3762
[m4_require([_LT_DECL_EGREP])dnl
3763
AC_MSG_CHECKING([for $1])
3764
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3766
[[\\/*] | ?:[\\/]*])
3767
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3770
lt_save_MAGIC_CMD="$MAGIC_CMD"
3771
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3772
dnl $ac_dummy forces splitting on constant user-supplied paths.
3773
dnl POSIX.2 word splitting is done only on the output of word expansions,
3774
dnl not every word. This closes a longstanding sh security hole.
3775
ac_dummy="m4_if([$2], , $PATH, [$2])"
3776
for ac_dir in $ac_dummy; do
3778
test -z "$ac_dir" && ac_dir=.
3779
if test -f $ac_dir/$1; then
3780
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3781
if test -n "$file_magic_test_file"; then
3782
case $deplibs_check_method in
3784
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3785
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3786
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3787
$EGREP "$file_magic_regex" > /dev/null; then
3792
*** Warning: the command libtool uses to detect shared libraries,
3793
*** $file_magic_cmd, produces output that libtool cannot recognize.
3794
*** The result is that libtool may fail to recognize shared libraries
3795
*** as such. This will affect the creation of libtool libraries that
3796
*** depend on shared libraries, but programs linked with such libtool
3797
*** libraries will work regardless of this problem. Nevertheless, you
3798
*** may want to report the problem to your system manager and/or to
3799
*** bug-libtool@gnu.org
3809
MAGIC_CMD="$lt_save_MAGIC_CMD"
3812
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3813
if test -n "$MAGIC_CMD"; then
3814
AC_MSG_RESULT($MAGIC_CMD)
3818
_LT_DECL([], [MAGIC_CMD], [0],
3819
[Used to examine libraries when file_magic_cmd begins with "file"])dnl
3820
])# _LT_PATH_TOOL_PREFIX
3823
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3824
dnl aclocal-1.4 backwards compatibility:
3825
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3830
# find a file program which can recognize a shared library
3831
m4_defun([_LT_PATH_MAGIC],
3832
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3833
if test -z "$lt_cv_path_MAGIC_CMD"; then
3834
if test -n "$ac_tool_prefix"; then
3835
_LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3845
# find the pathname to the GNU or non-GNU linker
3846
AC_DEFUN([LT_PATH_LD],
3847
[AC_REQUIRE([AC_PROG_CC])dnl
3848
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3849
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3850
m4_require([_LT_DECL_SED])dnl
3851
m4_require([_LT_DECL_EGREP])dnl
3852
m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3854
AC_ARG_WITH([gnu-ld],
3855
[AS_HELP_STRING([--with-gnu-ld],
3856
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3857
[test "$withval" = no || with_gnu_ld=yes],
3858
[with_gnu_ld=no])dnl
3861
if test "$GCC" = yes; then
3862
# Check if gcc -print-prog-name=ld gives a path.
3863
AC_MSG_CHECKING([for ld used by $CC])
3866
# gcc leaves a trailing carriage return which upsets mingw
3867
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3869
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3872
# Accept absolute paths.
3873
[[\\/]]* | ?:[[\\/]]*)
3874
re_direlt='/[[^/]][[^/]]*/\.\./'
3875
# Canonicalize the pathname of ld
3876
ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3877
while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3878
ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3880
test -z "$LD" && LD="$ac_prog"
3883
# If it fails, then pretend we aren't using GCC.
3887
# If it is relative, then search for the first ld in PATH.
3891
elif test "$with_gnu_ld" = yes; then
3892
AC_MSG_CHECKING([for GNU ld])
3894
AC_MSG_CHECKING([for non-GNU ld])
3896
AC_CACHE_VAL(lt_cv_path_LD,
3897
[if test -z "$LD"; then
3898
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3899
for ac_dir in $PATH; do
3901
test -z "$ac_dir" && ac_dir=.
3902
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3903
lt_cv_path_LD="$ac_dir/$ac_prog"
3904
# Check to see if the program is GNU ld. I'd rather use --version,
3905
# but apparently some variants of GNU ld only accept -v.
3906
# Break only if it was the GNU/non-GNU ld that we prefer.
3907
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3908
*GNU* | *'with BFD'*)
3909
test "$with_gnu_ld" != no && break
3912
test "$with_gnu_ld" != yes && break
3919
lt_cv_path_LD="$LD" # Let the user override the test with a path.
3922
if test -n "$LD"; then
3927
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3931
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3935
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3936
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3937
dnl aclocal-1.4 backwards compatibility:
3938
dnl AC_DEFUN([AM_PROG_LD], [])
3939
dnl AC_DEFUN([AC_PROG_LD], [])
3944
m4_defun([_LT_PATH_LD_GNU],
3945
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3946
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3947
case `$LD -v 2>&1 </dev/null` in
3948
*GNU* | *'with BFD'*)
3949
lt_cv_prog_gnu_ld=yes
3952
lt_cv_prog_gnu_ld=no
3955
with_gnu_ld=$lt_cv_prog_gnu_ld
3961
# find reload flag for linker
3962
# -- PORTME Some linkers may need a different reload flag.
3963
m4_defun([_LT_CMD_RELOAD],
3964
[AC_CACHE_CHECK([for $LD option to reload object files],
3965
lt_cv_ld_reload_flag,
3966
[lt_cv_ld_reload_flag='-r'])
3967
reload_flag=$lt_cv_ld_reload_flag
3968
case $reload_flag in
3970
*) reload_flag=" $reload_flag" ;;
3972
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3975
if test "$GCC" = yes; then
3976
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3978
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3982
_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3983
_LT_TAGDECL([], [reload_cmds], [2])dnl
3987
# _LT_CHECK_MAGIC_METHOD
3988
# ----------------------
3989
# how to check for library dependencies
3990
# -- PORTME fill in with the dynamic library characteristics
3991
m4_defun([_LT_CHECK_MAGIC_METHOD],
3992
[m4_require([_LT_DECL_EGREP])
3993
m4_require([_LT_DECL_OBJDUMP])
3994
AC_CACHE_CHECK([how to recognize dependent libraries],
3995
lt_cv_deplibs_check_method,
3996
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3997
lt_cv_file_magic_test_file=
3998
lt_cv_deplibs_check_method='unknown'
3999
# Need to set the preceding variable on all platforms that support
4000
# interlibrary dependencies.
4001
# 'none' -- dependencies not supported.
4002
# `unknown' -- same as none, but documents that we really don't know.
4003
# 'pass_all' -- all dependencies passed with no checks.
4004
# 'test_compile' -- check by making test program.
4005
# 'file_magic [[regex]]' -- check by looking for files in library path
4006
# which responds to the $file_magic_cmd with a given extended regex.
4007
# If you have `file' or equivalent on your system and you're not sure
4008
# whether `pass_all' will *always* work, you probably want this one.
4012
lt_cv_deplibs_check_method=pass_all
4016
lt_cv_deplibs_check_method=pass_all
4020
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4021
lt_cv_file_magic_cmd='/usr/bin/file -L'
4022
lt_cv_file_magic_test_file=/shlib/libc.so
4026
# func_win32_libid is a shell function defined in ltmain.sh
4027
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4028
lt_cv_file_magic_cmd='func_win32_libid'
4032
# Base MSYS/MinGW do not provide the 'file' command needed by
4033
# func_win32_libid shell function, so use a weaker test based on 'objdump',
4034
# unless we find 'file', for example because we are cross-compiling.
4035
# func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4036
if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4037
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4038
lt_cv_file_magic_cmd='func_win32_libid'
4040
# Keep this pattern in sync with the one in func_win32_libid.
4041
lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4042
lt_cv_file_magic_cmd='$OBJDUMP -f'
4047
# use the weaker test based on 'objdump'. See mingw*.
4048
lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4049
lt_cv_file_magic_cmd='$OBJDUMP -f'
4052
darwin* | rhapsody*)
4053
lt_cv_deplibs_check_method=pass_all
4056
freebsd* | dragonfly*)
4057
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4060
# Not sure whether the presence of OpenBSD here was a mistake.
4061
# Let's accept both of them until this is cleared up.
4062
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4063
lt_cv_file_magic_cmd=/usr/bin/file
4064
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4068
lt_cv_deplibs_check_method=pass_all
4073
lt_cv_deplibs_check_method=pass_all
4077
lt_cv_deplibs_check_method=pass_all
4080
hpux10.20* | hpux11*)
4081
lt_cv_file_magic_cmd=/usr/bin/file
4084
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4085
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4088
[lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
4089
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4092
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4093
lt_cv_file_magic_test_file=/usr/lib/libc.sl
4099
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4100
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4103
irix5* | irix6* | nonstopux*)
4105
*-32|*"-32 ") libmagic=32-bit;;
4106
*-n32|*"-n32 ") libmagic=N32;;
4107
*-64|*"-64 ") libmagic=64-bit;;
4108
*) libmagic=never-match;;
4110
lt_cv_deplibs_check_method=pass_all
4113
# This must be Linux ELF.
4114
linux* | k*bsd*-gnu | kopensolaris*-gnu)
4115
lt_cv_deplibs_check_method=pass_all
4119
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4120
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4122
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4127
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4128
lt_cv_file_magic_cmd=/usr/bin/file
4129
lt_cv_file_magic_test_file=/usr/lib/libnls.so
4133
lt_cv_deplibs_check_method=pass_all
4137
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4138
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4140
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4144
osf3* | osf4* | osf5*)
4145
lt_cv_deplibs_check_method=pass_all
4149
lt_cv_deplibs_check_method=pass_all
4153
lt_cv_deplibs_check_method=pass_all
4156
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4157
lt_cv_deplibs_check_method=pass_all
4161
case $host_vendor in
4163
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
4164
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4167
lt_cv_deplibs_check_method=pass_all
4170
lt_cv_file_magic_cmd='/bin/file'
4171
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4174
lt_cv_file_magic_cmd='/bin/file'
4175
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4176
lt_cv_file_magic_test_file=/lib/libc.so
4179
lt_cv_deplibs_check_method=pass_all
4182
lt_cv_deplibs_check_method=pass_all
4188
lt_cv_deplibs_check_method=pass_all
4192
file_magic_cmd=$lt_cv_file_magic_cmd
4193
deplibs_check_method=$lt_cv_deplibs_check_method
4194
test -z "$deplibs_check_method" && deplibs_check_method=unknown
4196
_LT_DECL([], [deplibs_check_method], [1],
4197
[Method to check whether dependent libraries are shared objects])
4198
_LT_DECL([], [file_magic_cmd], [1],
4199
[Command to use when deplibs_check_method == "file_magic"])
4200
])# _LT_CHECK_MAGIC_METHOD
4205
# find the pathname to a BSD- or MS-compatible name lister
4206
AC_DEFUN([LT_PATH_NM],
4207
[AC_REQUIRE([AC_PROG_CC])dnl
4208
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4209
[if test -n "$NM"; then
4210
# Let the user override the test.
4213
lt_nm_to_check="${ac_tool_prefix}nm"
4214
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4215
lt_nm_to_check="$lt_nm_to_check nm"
4217
for lt_tmp_nm in $lt_nm_to_check; do
4218
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4219
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4221
test -z "$ac_dir" && ac_dir=.
4222
tmp_nm="$ac_dir/$lt_tmp_nm"
4223
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4224
# Check to see if the nm accepts a BSD-compat flag.
4225
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4226
# nm: unknown option "B" ignored
4227
# Tru64's nm complains that /dev/null is an invalid object file
4228
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4229
*/dev/null* | *'Invalid file or object type'*)
4230
lt_cv_path_NM="$tmp_nm -B"
4234
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4236
lt_cv_path_NM="$tmp_nm -p"
4240
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4241
continue # so that we can try to find one that supports BSD flags
4250
: ${lt_cv_path_NM=no}
4252
if test "$lt_cv_path_NM" != "no"; then
4255
# Didn't find any BSD compatible name lister, look for dumpbin.
4256
if test -n "$DUMPBIN"; then :
4257
# Let the user override the test.
4259
AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4260
case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4262
DUMPBIN="$DUMPBIN -symbols"
4270
if test "$DUMPBIN" != ":"; then
4274
test -z "$NM" && NM=nm
4276
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4278
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4279
[lt_cv_nm_interface="BSD nm"
4280
echo "int some_variable = 0;" > conftest.$ac_ext
4281
(eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4282
(eval "$ac_compile" 2>conftest.err)
4283
cat conftest.err >&AS_MESSAGE_LOG_FD
4284
(eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4285
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4286
cat conftest.err >&AS_MESSAGE_LOG_FD
4287
(eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4288
cat conftest.out >&AS_MESSAGE_LOG_FD
4289
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4290
lt_cv_nm_interface="MS dumpbin"
4296
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4297
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4298
dnl aclocal-1.4 backwards compatibility:
4299
dnl AC_DEFUN([AM_PROG_NM], [])
4300
dnl AC_DEFUN([AC_PROG_NM], [])
4305
# check for math library
4306
AC_DEFUN([LT_LIB_M],
4307
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4310
*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4311
# These system don't have libm, or don't need it
4314
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4315
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4318
AC_CHECK_LIB(m, cos, LIBM="-lm")
4325
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4326
dnl aclocal-1.4 backwards compatibility:
4327
dnl AC_DEFUN([AC_CHECK_LIBM], [])
4330
# _LT_COMPILER_NO_RTTI([TAGNAME])
4331
# -------------------------------
4332
m4_defun([_LT_COMPILER_NO_RTTI],
4333
[m4_require([_LT_TAG_COMPILER])dnl
4335
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4337
if test "$GCC" = yes; then
4338
case $cc_basename in
4340
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4342
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4345
_LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4346
lt_cv_prog_compiler_rtti_exceptions,
4347
[-fno-rtti -fno-exceptions], [],
4348
[_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4350
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4351
[Compiler flag to turn off builtin functions])
4352
])# _LT_COMPILER_NO_RTTI
4355
# _LT_CMD_GLOBAL_SYMBOLS
4356
# ----------------------
4357
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4358
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4359
AC_REQUIRE([AC_PROG_CC])dnl
4360
AC_REQUIRE([AC_PROG_AWK])dnl
4361
AC_REQUIRE([LT_PATH_NM])dnl
4362
AC_REQUIRE([LT_PATH_LD])dnl
4363
m4_require([_LT_DECL_SED])dnl
4364
m4_require([_LT_DECL_EGREP])dnl
4365
m4_require([_LT_TAG_COMPILER])dnl
4367
# Check for command to grab the raw symbol name followed by C symbol from nm.
4368
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4369
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4371
# These are sane defaults that work on at least a few old systems.
4372
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
4374
# Character class describing NM global symbol codes.
4375
symcode='[[BCDEGRST]]'
4377
# Regexp to match symbols that can be accessed directly from C.
4378
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4380
# Define system-specific variables.
4385
cygwin* | mingw* | pw32* | cegcc*)
4386
symcode='[[ABCDGISTW]]'
4389
if test "$host_cpu" = ia64; then
4390
symcode='[[ABCDEGRST]]'
4394
symcode='[[BCDEGRST]]'
4397
symcode='[[BCDEGQRST]]'
4408
sysv5* | sco5v6* | unixware* | OpenUNIX*)
4412
symcode='[[DFNSTU]]'
4416
# If we're using GNU nm, then use its standard symbol codes.
4417
case `$NM -V 2>&1` in
4418
*GNU* | *'with BFD'*)
4419
symcode='[[ABCDGIRSTW]]' ;;
4422
# Transform an extracted symbol line into a proper C declaration.
4423
# Some systems (esp. on ia64) link data and code symbols differently,
4424
# so use this general approach.
4425
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4427
# Transform an extracted symbol line into symbol name and symbol address
4428
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
4429
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
4431
# Handle CRLF in mingw tool chain
4435
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4439
# Try without a prefix underscore, then with it.
4440
for ac_symprfx in "" "_"; do
4442
# Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4443
symxfrm="\\1 $ac_symprfx\\2 \\2"
4445
# Write the raw and C identifiers.
4446
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4447
# Fake it for dumpbin and say T for any non-static function
4448
# and D for any global variable.
4449
# Also find C++ and __fastcall symbols from MSVC++,
4450
# which start with @ or ?.
4451
lt_cv_sys_global_symbol_pipe="$AWK ['"\
4452
" {last_section=section; section=\$ 3};"\
4453
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4454
" \$ 0!~/External *\|/{next};"\
4455
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4456
" {if(hide[section]) next};"\
4457
" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4458
" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4459
" s[1]~/^[@?]/{print s[1], s[1]; next};"\
4460
" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4461
" ' prfx=^$ac_symprfx]"
4463
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4466
# Check to see that the pipe works correctly.
4470
cat > conftest.$ac_ext <<_LT_EOF
4475
void nm_test_func(void);
4476
void nm_test_func(void){}
4480
int main(){nm_test_var='a';nm_test_func();return(0);}
4483
if AC_TRY_EVAL(ac_compile); then
4484
# Now try to grab the symbols.
4486
if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4487
# Try sorting and uniquifying the output.
4488
if sort "$nlist" | uniq > "$nlist"T; then
4489
mv -f "$nlist"T "$nlist"
4494
# Make sure that we snagged all the symbols we need.
4495
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4496
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4497
cat <<_LT_EOF > conftest.$ac_ext
4503
# Now generate the symbol file.
4504
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4506
cat <<_LT_EOF >> conftest.$ac_ext
4508
/* The mapping between symbol names and symbols. */
4513
lt__PROGRAM__LTX_preloaded_symbols[[]] =
4515
{ "@PROGRAM@", (void *) 0 },
4517
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4518
cat <<\_LT_EOF >> conftest.$ac_ext
4522
/* This works around a problem in FreeBSD linker */
4523
#ifdef FREEBSD_WORKAROUND
4524
static const void *lt_preloaded_setup() {
4525
return lt__PROGRAM__LTX_preloaded_symbols;
4533
# Now try linking the two files.
4534
mv conftest.$ac_objext conftstm.$ac_objext
4535
lt_save_LIBS="$LIBS"
4536
lt_save_CFLAGS="$CFLAGS"
4537
LIBS="conftstm.$ac_objext"
4538
CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4539
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4542
LIBS="$lt_save_LIBS"
4543
CFLAGS="$lt_save_CFLAGS"
4545
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4548
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4551
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4554
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4555
cat conftest.$ac_ext >&5
4557
rm -rf conftest* conftst*
4559
# Do not use the global_symbol_pipe unless it works.
4560
if test "$pipe_works" = yes; then
4563
lt_cv_sys_global_symbol_pipe=
4567
if test -z "$lt_cv_sys_global_symbol_pipe"; then
4568
lt_cv_sys_global_symbol_to_cdecl=
4570
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4571
AC_MSG_RESULT(failed)
4576
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4577
[Take the output of nm and produce a listing of raw symbols and C names])
4578
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4579
[Transform the output of nm in a proper C declaration])
4580
_LT_DECL([global_symbol_to_c_name_address],
4581
[lt_cv_sys_global_symbol_to_c_name_address], [1],
4582
[Transform the output of nm in a C name address pair])
4583
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4584
[lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4585
[Transform the output of nm in a C name address pair when lib prefix is needed])
4586
]) # _LT_CMD_GLOBAL_SYMBOLS
4589
# _LT_COMPILER_PIC([TAGNAME])
4590
# ---------------------------
4591
m4_defun([_LT_COMPILER_PIC],
4592
[m4_require([_LT_TAG_COMPILER])dnl
4593
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4594
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4595
_LT_TAGVAR(lt_prog_compiler_static, $1)=
4597
AC_MSG_CHECKING([for $compiler option to produce PIC])
4598
m4_if([$1], [CXX], [
4599
# C++ specific cases for pic, static, wl, etc.
4600
if test "$GXX" = yes; then
4601
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4602
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4606
# All AIX code is PIC.
4607
if test "$host_cpu" = ia64; then
4608
# AIX 5 now supports IA64 processor
4609
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4616
# see comment about AmigaOS4 .so support
4617
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4620
# FIXME: we need at least 68020 code to build shared libraries, but
4621
# adding the `-m68020' flag to GCC prevents building anything better,
4623
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4628
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4629
# PIC is the default for these OSes.
4631
mingw* | cygwin* | os2* | pw32* | cegcc*)
4632
# This hack is so that the source file can tell whether it is being
4633
# built for inclusion in a dll (and should export symbols for example).
4634
# Although the cygwin gcc ignores -fPIC, still need this for old-style
4635
# (--disable-auto-import) libraries
4636
m4_if([$1], [GCJ], [],
4637
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4639
darwin* | rhapsody*)
4640
# PIC is the default on this platform
4641
# Common symbols not allowed in MH_DYLIB files
4642
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4645
# DJGPP does not support shared libraries at all
4646
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4649
# PIC is the default for Haiku.
4650
# The "-static" flag exists, but is broken.
4651
_LT_TAGVAR(lt_prog_compiler_static, $1)=
4654
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
4655
# Instead, we relocate shared libraries at runtime.
4658
if test -d /usr/nec; then
4659
_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4663
# PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4664
# PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4665
# sets the default TLS model and affects inlining.
4670
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4675
# QNX uses GNU C++, but need to define -shared option too, otherwise
4677
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4680
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4686
# All AIX code is PIC.
4687
if test "$host_cpu" = ia64; then
4688
# AIX 5 now supports IA64 processor
4689
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4691
_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4695
case $cc_basename in
4697
# Green Hills C++ Compiler
4698
# _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4703
case $cc_basename in
4705
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4708
# Green Hills C++ Compiler
4709
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4715
freebsd* | dragonfly*)
4716
# FreeBSD uses GNU C++
4718
hpux9* | hpux10* | hpux11*)
4719
case $cc_basename in
4721
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4722
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4723
if test "$host_cpu" != ia64; then
4724
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4728
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4729
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4735
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4744
# This is c89, which is MS Visual C++ (no shared libs)
4745
# Anyone wants to do a port?
4747
irix5* | irix6* | nonstopux*)
4748
case $cc_basename in
4750
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4751
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4752
# CC pic flag -KPIC is the default.
4758
linux* | k*bsd*-gnu | kopensolaris*-gnu)
4759
case $cc_basename in
4762
_LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4763
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4766
# old Intel C++ for x86_64 which still supported -KPIC.
4767
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4768
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4769
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4772
# Intel C++, used to be incompatible with GCC.
4773
# ICC 10 doesn't accept -KPIC any more.
4774
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4775
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4776
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4779
# Portland Group C++ compiler
4780
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4781
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4782
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4786
# Make sure the PIC flag is empty. It appears that all Alpha
4787
# Linux and Compaq Tru64 Unix objects are PIC.
4788
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4789
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4791
xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4792
# IBM XL 8.0, 9.0 on PPC and BlueGene
4793
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4794
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4795
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4798
case `$CC -V 2>&1 | sed 5q` in
4801
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4802
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4803
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4814
case $cc_basename in
4816
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4825
# QNX uses GNU C++, but need to define -shared option too, otherwise
4827
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4829
osf3* | osf4* | osf5*)
4830
case $cc_basename in
4832
_LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4835
# Rational C++ 2.4.1
4836
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4839
# Digital/Compaq C++
4840
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4841
# Make sure the PIC flag is empty. It appears that all Alpha
4842
# Linux and Compaq Tru64 Unix objects are PIC.
4843
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4844
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4853
case $cc_basename in
4855
# Sun C++ 4.2, 5.x and Centerline C++
4856
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4857
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4858
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4861
# Green Hills C++ Compiler
4862
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4869
case $cc_basename in
4872
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4873
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4877
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4883
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4884
case $cc_basename in
4886
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4887
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4888
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4893
case $cc_basename in
4895
# NonStop-UX NCC 3.20
4896
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4905
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4911
if test "$GCC" = yes; then
4912
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4913
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4917
# All AIX code is PIC.
4918
if test "$host_cpu" = ia64; then
4919
# AIX 5 now supports IA64 processor
4920
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4927
# see comment about AmigaOS4 .so support
4928
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4931
# FIXME: we need at least 68020 code to build shared libraries, but
4932
# adding the `-m68020' flag to GCC prevents building anything better,
4934
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4939
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4940
# PIC is the default for these OSes.
4943
mingw* | cygwin* | pw32* | os2* | cegcc*)
4944
# This hack is so that the source file can tell whether it is being
4945
# built for inclusion in a dll (and should export symbols for example).
4946
# Although the cygwin gcc ignores -fPIC, still need this for old-style
4947
# (--disable-auto-import) libraries
4948
m4_if([$1], [GCJ], [],
4949
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4952
darwin* | rhapsody*)
4953
# PIC is the default on this platform
4954
# Common symbols not allowed in MH_DYLIB files
4955
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4959
# PIC is the default for Haiku.
4960
# The "-static" flag exists, but is broken.
4961
_LT_TAGVAR(lt_prog_compiler_static, $1)=
4965
# PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4966
# PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4967
# sets the default TLS model and affects inlining.
4973
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4979
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
4980
# Instead, we relocate shared libraries at runtime.
4984
# Just because we use GCC doesn't mean we suddenly get shared libraries
4985
# on systems that don't support them.
4986
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4991
# QNX uses GNU C++, but need to define -shared option too, otherwise
4993
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4997
if test -d /usr/nec; then
4998
_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5003
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5007
case $cc_basename in
5008
nvcc*) # Cuda Compiler Driver 2.2
5009
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5010
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
5014
# PORTME Check for flag to pass linker flags through the system compiler.
5017
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5018
if test "$host_cpu" = ia64; then
5019
# AIX 5 now supports IA64 processor
5020
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5022
_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5026
mingw* | cygwin* | pw32* | os2* | cegcc*)
5027
# This hack is so that the source file can tell whether it is being
5028
# built for inclusion in a dll (and should export symbols for example).
5029
m4_if([$1], [GCJ], [],
5030
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5033
hpux9* | hpux10* | hpux11*)
5034
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5035
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5042
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5045
# Is there a better lt_prog_compiler_static that works with the bundled CC?
5046
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5049
irix5* | irix6* | nonstopux*)
5050
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5051
# PIC (with -KPIC) is the default.
5052
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5055
linux* | k*bsd*-gnu | kopensolaris*-gnu)
5056
case $cc_basename in
5057
# old Intel for x86_64 which still supported -KPIC.
5059
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5060
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5061
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5063
# icc used to be incompatible with GCC.
5064
# ICC 10 doesn't accept -KPIC any more.
5066
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5067
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5068
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5070
# Lahey Fortran 8.1.
5072
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5073
_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5074
_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5076
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5077
# Portland Group compilers (*not* the Pentium gcc compiler,
5078
# which looks to be a dead project)
5079
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5080
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5081
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5084
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5085
# All Alpha code is PIC.
5086
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5088
xl* | bgxl* | bgf* | mpixl*)
5089
# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5090
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5091
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5092
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5095
case `$CC -V 2>&1 | sed 5q` in
5096
*Sun\ F* | *Sun*Fortran*)
5097
# Sun Fortran 8.3 passes all unrecognized flags to the linker
5098
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5099
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5100
_LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5104
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5105
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5106
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5114
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5115
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5119
# QNX uses GNU C++, but need to define -shared option too, otherwise
5121
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5124
osf3* | osf4* | osf5*)
5125
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5126
# All OSF/1 code is PIC.
5127
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5131
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5135
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5136
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5137
case $cc_basename in
5138
f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5139
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5141
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5146
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5147
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5148
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5151
sysv4 | sysv4.2uw2* | sysv4.3*)
5152
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5153
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5154
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5158
if test -d /usr/nec ;then
5159
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5160
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5164
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5165
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5166
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5167
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5171
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5172
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5176
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5177
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5181
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5187
# For platforms which do not support PIC, -DPIC is meaningless:
5189
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5192
_LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5195
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5196
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5197
[How to pass a linker flag through the compiler])
5200
# Check to make sure the PIC flag actually works.
5202
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5203
_LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5204
[_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5205
[$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5206
[case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5208
*) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5210
[_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5211
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5213
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5214
[Additional compiler flags for building library objects])
5217
# Check to make sure the static flag actually works.
5219
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5220
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5221
_LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5222
$lt_tmp_static_flag,
5224
[_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5225
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5226
[Compiler flag to prevent dynamic linking])
5227
])# _LT_COMPILER_PIC
5230
# _LT_LINKER_SHLIBS([TAGNAME])
5231
# ----------------------------
5232
# See if the linker supports building shared libraries.
5233
m4_defun([_LT_LINKER_SHLIBS],
5234
[AC_REQUIRE([LT_PATH_LD])dnl
5235
AC_REQUIRE([LT_PATH_NM])dnl
5236
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5237
m4_require([_LT_DECL_EGREP])dnl
5238
m4_require([_LT_DECL_SED])dnl
5239
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5240
m4_require([_LT_TAG_COMPILER])dnl
5241
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5242
m4_if([$1], [CXX], [
5243
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5246
# If we're using GNU nm, then we don't want the "-C" option.
5247
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5248
# Also, AIX nm treats weak defined symbols like other global defined
5249
# symbols, whereas GNU nm marks them as "W".
5250
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5251
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5253
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5257
_LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5259
cygwin* | mingw* | cegcc*)
5260
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5263
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5266
_LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5269
_LT_TAGVAR(allow_undefined_flag, $1)=
5270
_LT_TAGVAR(always_export_symbols, $1)=no
5271
_LT_TAGVAR(archive_cmds, $1)=
5272
_LT_TAGVAR(archive_expsym_cmds, $1)=
5273
_LT_TAGVAR(compiler_needs_object, $1)=no
5274
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5275
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5276
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5277
_LT_TAGVAR(hardcode_automatic, $1)=no
5278
_LT_TAGVAR(hardcode_direct, $1)=no
5279
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5280
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5281
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5282
_LT_TAGVAR(hardcode_libdir_separator, $1)=
5283
_LT_TAGVAR(hardcode_minus_L, $1)=no
5284
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5285
_LT_TAGVAR(inherit_rpath, $1)=no
5286
_LT_TAGVAR(link_all_deplibs, $1)=unknown
5287
_LT_TAGVAR(module_cmds, $1)=
5288
_LT_TAGVAR(module_expsym_cmds, $1)=
5289
_LT_TAGVAR(old_archive_from_new_cmds, $1)=
5290
_LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5291
_LT_TAGVAR(thread_safe_flag_spec, $1)=
5292
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5293
# include_expsyms should be a list of space-separated symbols to be *always*
5294
# included in the symbol list
5295
_LT_TAGVAR(include_expsyms, $1)=
5296
# exclude_expsyms can be an extended regexp of symbols to exclude
5297
# it will be wrapped by ` (' and `)$', so one must not match beginning or
5298
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5299
# as well as any symbol that contains `d'.
5300
_LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5301
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5302
# platforms (ab)use it in PIC code, but their linkers get confused if
5303
# the symbol is explicitly referenced. Since portable code cannot
5304
# rely on this symbol name, it's probably fine to never include it in
5305
# preloaded symbol tables.
5306
# Exclude shared library initialization/finalization symbols.
5307
dnl Note also adjust exclude_expsyms for C++ above.
5308
extract_expsyms_cmds=
5311
cygwin* | mingw* | pw32* | cegcc*)
5312
# FIXME: the MSVC++ port hasn't been tested in a loooong time
5313
# When not using gcc, we currently assume that we are using
5314
# Microsoft Visual C++.
5315
if test "$GCC" != yes; then
5320
# we just hope/assume this is gcc and not c89 (= MSVC++)
5328
_LT_TAGVAR(ld_shlibs, $1)=yes
5330
# On some targets, GNU ld is compatible enough with the native linker
5331
# that we're better off using the native interface for both.
5332
lt_use_gnu_ld_interface=no
5333
if test "$with_gnu_ld" = yes; then
5336
# The AIX port of GNU ld has always aspired to compatibility
5337
# with the native linker. However, as the warning in the GNU ld
5338
# block says, versions before 2.19.5* couldn't really create working
5339
# shared libraries, regardless of the interface used.
5340
case `$LD -v 2>&1` in
5341
*\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5342
*\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5343
*\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5345
lt_use_gnu_ld_interface=yes
5350
lt_use_gnu_ld_interface=yes
5355
if test "$lt_use_gnu_ld_interface" = yes; then
5356
# If archive_cmds runs LD, not CC, wlarc should be empty
5359
# Set some defaults for GNU ld with shared library support. These
5360
# are reset later if shared libraries are not supported. Putting them
5361
# here allows them to be overridden if necessary.
5362
runpath_var=LD_RUN_PATH
5363
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5364
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5365
# ancient GNU ld didn't support --whole-archive et. al.
5366
if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5367
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5369
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5371
supports_anon_versioning=no
5372
case `$LD -v 2>&1` in
5373
*GNU\ gold*) supports_anon_versioning=yes ;;
5374
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5375
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5376
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5377
*\ 2.11.*) ;; # other 2.11 versions
5378
*) supports_anon_versioning=yes ;;
5381
# See if GNU ld supports shared libraries.
5384
# On AIX/PPC, the GNU linker is very broken
5385
if test "$host_cpu" != ia64; then
5386
_LT_TAGVAR(ld_shlibs, $1)=no
5389
*** Warning: the GNU linker, at least up to release 2.19, is reported
5390
*** to be unable to reliably create shared libraries on AIX.
5391
*** Therefore, libtool is disabling shared libraries support. If you
5392
*** really care for shared libraries, you may want to install binutils
5393
*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5394
*** You will then need to restart the configuration process.
5403
# see comment about AmigaOS4 .so support
5404
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5405
_LT_TAGVAR(archive_expsym_cmds, $1)=''
5408
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5409
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5410
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5416
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5417
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5418
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5419
# support --undefined. This deserves some investigation. FIXME
5420
_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5422
_LT_TAGVAR(ld_shlibs, $1)=no
5426
cygwin* | mingw* | pw32* | cegcc*)
5427
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5428
# as there is no search path for DLLs.
5429
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5430
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5431
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5432
_LT_TAGVAR(always_export_symbols, $1)=no
5433
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5434
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5436
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5437
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5438
# If the export-symbols file already is a .def file (1st line
5439
# is EXPORTS), use it as is; otherwise, prepend...
5440
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5441
cp $export_symbols $output_objdir/$soname.def;
5443
echo EXPORTS > $output_objdir/$soname.def;
5444
cat $export_symbols >> $output_objdir/$soname.def;
5446
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5448
_LT_TAGVAR(ld_shlibs, $1)=no
5453
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5454
_LT_TAGVAR(link_all_deplibs, $1)=yes
5458
_LT_TAGVAR(hardcode_direct, $1)=no
5459
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5460
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5461
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5462
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5463
# Instead, shared libraries are loaded at an image base (0x10000000 by
5464
# default) and relocated if they conflict, which is a slow very memory
5465
# consuming and fragmenting process. To avoid this, we pick a random,
5466
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5467
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
5468
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5469
_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5472
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5474
if test "$host_os" = linux-dietlibc; then
5475
case $cc_basename in
5476
diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5479
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5480
&& test "$tmp_diet" = no
5483
tmp_sharedflag='-shared'
5484
case $cc_basename,$host_cpu in
5485
pgcc*) # Portland Group C compiler
5486
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5487
tmp_addflag=' $pic_flag'
5489
pgf77* | pgf90* | pgf95* | pgfortran*)
5490
# Portland Group f77 and f90 compilers
5491
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5492
tmp_addflag=' $pic_flag -Mnomain' ;;
5493
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5494
tmp_addflag=' -i_dynamic' ;;
5495
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5496
tmp_addflag=' -i_dynamic -nofor_main' ;;
5497
ifc* | ifort*) # Intel Fortran compiler
5498
tmp_addflag=' -nofor_main' ;;
5499
lf95*) # Lahey Fortran 8.1
5500
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5501
tmp_sharedflag='--shared' ;;
5502
xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5503
tmp_sharedflag='-qmkshrobj'
5505
nvcc*) # Cuda Compiler Driver 2.2
5506
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5507
_LT_TAGVAR(compiler_needs_object, $1)=yes
5510
case `$CC -V 2>&1 | sed 5q` in
5511
*Sun\ C*) # Sun C 5.9
5512
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5513
_LT_TAGVAR(compiler_needs_object, $1)=yes
5514
tmp_sharedflag='-G' ;;
5515
*Sun\ F*) # Sun Fortran 8.3
5516
tmp_sharedflag='-G' ;;
5518
_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5520
if test "x$supports_anon_versioning" = xyes; then
5521
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5522
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5523
echo "local: *; };" >> $output_objdir/$libname.ver~
5524
$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5527
case $cc_basename in
5528
xlf* | bgf* | bgxlf* | mpixlf*)
5529
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5530
_LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5531
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5532
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5533
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5534
if test "x$supports_anon_versioning" = xyes; then
5535
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5536
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5537
echo "local: *; };" >> $output_objdir/$libname.ver~
5538
$LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5543
_LT_TAGVAR(ld_shlibs, $1)=no
5548
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5549
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5552
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5553
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5558
if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5559
_LT_TAGVAR(ld_shlibs, $1)=no
5562
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5563
*** create shared libraries on Solaris systems. Therefore, libtool
5564
*** is disabling shared libraries support. We urge you to upgrade GNU
5565
*** binutils to release 2.9.1 or newer. Another option is to modify
5566
*** your PATH or compiler configuration so that the native linker is
5567
*** used, and then restart.
5570
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5571
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5572
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5574
_LT_TAGVAR(ld_shlibs, $1)=no
5578
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5579
case `$LD -v 2>&1` in
5580
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5581
_LT_TAGVAR(ld_shlibs, $1)=no
5584
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5585
*** reliably create shared libraries on SCO systems. Therefore, libtool
5586
*** is disabling shared libraries support. We urge you to upgrade GNU
5587
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5588
*** your PATH or compiler configuration so that the native linker is
5589
*** used, and then restart.
5594
# For security reasons, it is highly recommended that you always
5595
# use absolute paths for naming shared libraries, and exclude the
5596
# DT_RUNPATH tag from executables and libraries. But doing so
5597
# requires that you compile everything twice, which is a pain.
5598
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5599
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5600
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5601
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5603
_LT_TAGVAR(ld_shlibs, $1)=no
5610
_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5612
_LT_TAGVAR(hardcode_direct, $1)=yes
5613
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5617
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5618
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5619
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5621
_LT_TAGVAR(ld_shlibs, $1)=no
5626
if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5628
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5629
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5630
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5633
# PORTME fill in a description of your system's linker (not GNU ld)
5636
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5637
_LT_TAGVAR(always_export_symbols, $1)=yes
5638
_LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5639
# Note: this linker hardcodes the directories in LIBPATH if there
5640
# are no directories specified by -L.
5641
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5642
if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5643
# Neither direct hardcoding nor static linking is supported with a
5645
_LT_TAGVAR(hardcode_direct, $1)=unsupported
5650
if test "$host_cpu" = ia64; then
5651
# On IA64, the linker does run time linking by default, so we don't
5652
# have to do anything special.
5653
aix_use_runtimelinking=no
5654
exp_sym_flag='-Bexport'
5657
# If we're using GNU nm, then we don't want the "-C" option.
5658
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5659
# Also, AIX nm treats weak defined symbols like other global
5660
# defined symbols, whereas GNU nm marks them as "W".
5661
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5662
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5664
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5666
aix_use_runtimelinking=no
5668
# Test if we are trying to use run time linking or normal
5669
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5670
# need to do runtime linking.
5671
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5672
for ld_flag in $LDFLAGS; do
5673
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5674
aix_use_runtimelinking=yes
5681
exp_sym_flag='-bexport'
5682
no_entry_flag='-bnoentry'
5685
# When large executables or shared objects are built, AIX ld can
5686
# have problems creating the table of contents. If linking a library
5687
# or program results in "error TOC overflow" add -mminimal-toc to
5688
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5689
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5691
_LT_TAGVAR(archive_cmds, $1)=''
5692
_LT_TAGVAR(hardcode_direct, $1)=yes
5693
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5694
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5695
_LT_TAGVAR(link_all_deplibs, $1)=yes
5696
_LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5698
if test "$GCC" = yes; then
5699
case $host_os in aix4.[[012]]|aix4.[[012]].*)
5700
# We only want to do this on AIX 4.2 and lower, the check
5701
# below for broken collect2 doesn't work under 4.3+
5702
collect2name=`${CC} -print-prog-name=collect2`
5703
if test -f "$collect2name" &&
5704
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5706
# We have reworked collect2
5709
# We have old collect2
5710
_LT_TAGVAR(hardcode_direct, $1)=unsupported
5711
# It fails to find uninstalled libraries when the uninstalled
5712
# path is not listed in the libpath. Setting hardcode_minus_L
5713
# to unsupported forces relinking
5714
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5715
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5716
_LT_TAGVAR(hardcode_libdir_separator, $1)=
5720
shared_flag='-shared'
5721
if test "$aix_use_runtimelinking" = yes; then
5722
shared_flag="$shared_flag "'${wl}-G'
5726
if test "$host_cpu" = ia64; then
5727
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5728
# chokes on -Wl,-G. The following line is correct:
5731
if test "$aix_use_runtimelinking" = yes; then
5732
shared_flag='${wl}-G'
5734
shared_flag='${wl}-bM:SRE'
5739
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5740
# It seems that -bexpall does not export symbols beginning with
5741
# underscore (_), so it is better to generate a list of symbols to export.
5742
_LT_TAGVAR(always_export_symbols, $1)=yes
5743
if test "$aix_use_runtimelinking" = yes; then
5744
# Warning - without using the other runtime loading flags (-brtl),
5745
# -berok will link without error, but may produce a broken library.
5746
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5747
# Determine the default libpath from the value encoded in an
5749
_LT_SYS_MODULE_PATH_AIX
5750
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5751
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5753
if test "$host_cpu" = ia64; then
5754
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5755
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5756
_LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5758
# Determine the default libpath from the value encoded in an
5760
_LT_SYS_MODULE_PATH_AIX
5761
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5762
# Warning - without using the other run time loading flags,
5763
# -berok will link without error, but may produce a broken library.
5764
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5765
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5766
if test "$with_gnu_ld" = yes; then
5767
# We only use this code for GNU lds that support --whole-archive.
5768
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5770
# Exported symbols can be pulled into shared objects from archives
5771
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5773
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5774
# This is similar to how AIX traditionally builds its shared libraries.
5775
_LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5783
# see comment about AmigaOS4 .so support
5784
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5785
_LT_TAGVAR(archive_expsym_cmds, $1)=''
5788
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5789
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5790
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5796
_LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5799
cygwin* | mingw* | pw32* | cegcc*)
5800
# When not using gcc, we currently assume that we are using
5801
# Microsoft Visual C++.
5802
# hardcode_libdir_flag_spec is actually meaningless, as there is
5803
# no search path for DLLs.
5804
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5805
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5806
# Tell ltmain to make .lib files, not .a files.
5808
# Tell ltmain to make .dll files, not .so files.
5810
# FIXME: Setting linknames here is a bad hack.
5811
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5812
# The linker will automatically build a .lib file if we build a DLL.
5813
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5814
# FIXME: Should let the user specify the lib program.
5815
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5816
_LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5817
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5820
darwin* | rhapsody*)
5821
_LT_DARWIN_LINKER_FEATURES($1)
5825
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5826
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5827
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5831
_LT_TAGVAR(ld_shlibs, $1)=no
5834
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5835
# support. Future versions do this automatically, but an explicit c++rt0.o
5836
# does not break anything, and helps significantly (at the cost of a little
5839
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5840
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5841
_LT_TAGVAR(hardcode_direct, $1)=yes
5842
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5845
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
5847
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5848
_LT_TAGVAR(hardcode_direct, $1)=yes
5849
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5850
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5853
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5854
freebsd* | dragonfly*)
5855
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5856
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5857
_LT_TAGVAR(hardcode_direct, $1)=yes
5858
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5862
if test "$GCC" = yes; then
5863
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5865
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5867
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5868
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5869
_LT_TAGVAR(hardcode_direct, $1)=yes
5871
# hardcode_minus_L: Not really in the search PATH,
5872
# but as the default location of the library.
5873
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5874
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5878
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5879
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5881
_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5883
if test "$with_gnu_ld" = no; then
5884
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5885
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5886
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5887
_LT_TAGVAR(hardcode_direct, $1)=yes
5888
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5889
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5890
# hardcode_minus_L: Not really in the search PATH,
5891
# but as the default location of the library.
5892
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5897
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5900
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5903
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5906
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5912
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5915
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5919
# Older versions of the 11.00 compiler do not understand -b yet
5920
# (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5921
_LT_LINKER_OPTION([if $CC understands -b],
5922
_LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5923
[_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5924
[_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5925
[_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5929
if test "$with_gnu_ld" = no; then
5930
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5931
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5935
_LT_TAGVAR(hardcode_direct, $1)=no
5936
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5939
_LT_TAGVAR(hardcode_direct, $1)=yes
5940
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5941
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5943
# hardcode_minus_L: Not really in the search PATH,
5944
# but as the default location of the library.
5945
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5951
irix5* | irix6* | nonstopux*)
5952
if test "$GCC" = yes; then
5953
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5954
# Try to use the -exported_symbol ld option, if it does not
5955
# work, assume that -exports_file does not work either and
5956
# implicitly export all symbols.
5957
save_LDFLAGS="$LDFLAGS"
5958
LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5959
AC_LINK_IFELSE(int foo(void) {},
5960
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5962
LDFLAGS="$save_LDFLAGS"
5964
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5965
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5967
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5968
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5969
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5970
_LT_TAGVAR(inherit_rpath, $1)=yes
5971
_LT_TAGVAR(link_all_deplibs, $1)=yes
5975
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5976
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5978
_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5980
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5981
_LT_TAGVAR(hardcode_direct, $1)=yes
5982
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5986
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5987
_LT_TAGVAR(hardcode_direct, $1)=yes
5988
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5989
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5990
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5997
if test -f /usr/libexec/ld.so; then
5998
_LT_TAGVAR(hardcode_direct, $1)=yes
5999
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6000
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6001
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6002
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6003
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6004
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6005
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6008
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6009
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6010
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6013
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6014
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6019
_LT_TAGVAR(ld_shlibs, $1)=no
6024
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6025
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6026
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6027
_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6028
_LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6032
if test "$GCC" = yes; then
6033
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6034
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6036
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6037
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6039
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6040
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6041
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6044
osf4* | osf5*) # as osf3* with the addition of -msym flag
6045
if test "$GCC" = yes; then
6046
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6047
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6048
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6050
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6051
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6052
_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
6053
$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
6055
# Both c and cxx compiler support -rpath directly
6056
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6058
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6059
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6063
_LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6064
if test "$GCC" = yes; then
6066
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6067
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6068
$CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6070
case `$CC -V 2>&1` in
6073
_LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6074
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6075
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6079
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6080
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6081
$CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6085
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6086
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6088
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6090
# The compiler driver will combine and reorder linker options,
6091
# but understands `-z linker_flag'. GCC discards it without `$wl',
6092
# but is careful enough not to reorder.
6093
# Supported since Solaris 2.6 (maybe 2.5.1?)
6094
if test "$GCC" = yes; then
6095
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6097
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6101
_LT_TAGVAR(link_all_deplibs, $1)=yes
6105
if test "x$host_vendor" = xsequent; then
6106
# Use $CC to link under sequent, because it throws in some extra .o
6107
# files that make .init and .fini sections work.
6108
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6110
_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6112
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6113
_LT_TAGVAR(hardcode_direct, $1)=yes
6114
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6115
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6119
case $host_vendor in
6121
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6122
_LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6125
## LD is ld it makes a PLAMLIB
6126
## CC just makes a GrossModule.
6127
_LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6128
_LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6129
_LT_TAGVAR(hardcode_direct, $1)=no
6132
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6133
_LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6136
runpath_var='LD_RUN_PATH'
6137
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6141
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6142
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6143
_LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6147
if test -d /usr/nec; then
6148
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6149
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6150
runpath_var=LD_RUN_PATH
6151
hardcode_runpath_var=yes
6152
_LT_TAGVAR(ld_shlibs, $1)=yes
6156
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6157
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6158
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6159
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6160
runpath_var='LD_RUN_PATH'
6162
if test "$GCC" = yes; then
6163
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6164
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6166
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6167
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6171
sysv5* | sco3.2v5* | sco5v6*)
6172
# Note: We can NOT use -z defs as we might desire, because we do not
6173
# link with -lc, and that would cause any symbols used from libc to
6174
# always be unresolved, which means just about no library would
6175
# ever link correctly. If we're not using GNU ld we use -z text
6176
# though, which does catch some bad symbols but isn't as heavy-handed
6178
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6179
_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6180
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6181
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6182
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6183
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6184
_LT_TAGVAR(link_all_deplibs, $1)=yes
6185
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6186
runpath_var='LD_RUN_PATH'
6188
if test "$GCC" = yes; then
6189
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6190
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6192
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6193
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6198
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6199
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6200
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6204
_LT_TAGVAR(ld_shlibs, $1)=no
6208
if test x$host_vendor = xsni; then
6210
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6211
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6217
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6218
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6220
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6222
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6223
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6224
_LT_DECL([], [extract_expsyms_cmds], [2],
6225
[The commands to extract the exported symbol list from a shared archive])
6228
# Do we need to explicitly link libc?
6230
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6232
# Assume -lc should be added
6233
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6235
if test "$enable_shared" = yes && test "$GCC" = yes; then
6236
case $_LT_TAGVAR(archive_cmds, $1) in
6238
# FIXME: we may have to deal with multi-command sequences.
6241
# Test whether the compiler implicitly links with -lc since on some
6242
# systems, -lgcc has to come before -lc. If gcc already passes -lc
6243
# to ld, don't add -lc before -lgcc.
6244
AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6245
[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6247
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6249
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6252
libobjs=conftest.$ac_objext
6254
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6255
pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6261
lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6262
_LT_TAGVAR(allow_undefined_flag, $1)=
6263
if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6265
lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6267
lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6269
_LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6271
cat conftest.err 1>&5
6275
_LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6282
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6283
[Whether or not to add -lc for building shared libraries])
6284
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6285
[enable_shared_with_static_runtimes], [0],
6286
[Whether or not to disallow shared libs when runtime libs are static])
6287
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6288
[Compiler flag to allow reflexive dlopens])
6289
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6290
[Compiler flag to generate shared objects directly from archives])
6291
_LT_TAGDECL([], [compiler_needs_object], [1],
6292
[Whether the compiler copes with passing no objects directly])
6293
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6294
[Create an old-style archive from a shared archive])
6295
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6296
[Create a temporary old-style archive to link instead of a shared archive])
6297
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6298
_LT_TAGDECL([], [archive_expsym_cmds], [2])
6299
_LT_TAGDECL([], [module_cmds], [2],
6300
[Commands used to build a loadable module if different from building
6302
_LT_TAGDECL([], [module_expsym_cmds], [2])
6303
_LT_TAGDECL([], [with_gnu_ld], [1],
6304
[Whether we are building with GNU ld or not])
6305
_LT_TAGDECL([], [allow_undefined_flag], [1],
6306
[Flag that allows shared libraries with undefined symbols to be built])
6307
_LT_TAGDECL([], [no_undefined_flag], [1],
6308
[Flag that enforces no undefined symbols])
6309
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6310
[Flag to hardcode $libdir into a binary during linking.
6311
This must work even if $libdir does not exist])
6312
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6313
[[If ld is used when linking, flag to hardcode $libdir into a binary
6314
during linking. This must work even if $libdir does not exist]])
6315
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6316
[Whether we need a single "-rpath" flag with a separated argument])
6317
_LT_TAGDECL([], [hardcode_direct], [0],
6318
[Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6319
DIR into the resulting binary])
6320
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6321
[Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6322
DIR into the resulting binary and the resulting library dependency is
6323
"absolute", i.e impossible to change by setting ${shlibpath_var} if the
6324
library is relocated])
6325
_LT_TAGDECL([], [hardcode_minus_L], [0],
6326
[Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6327
into the resulting binary])
6328
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6329
[Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6330
into the resulting binary])
6331
_LT_TAGDECL([], [hardcode_automatic], [0],
6332
[Set to "yes" if building a shared library automatically hardcodes DIR
6333
into the library and all subsequent libraries and executables linked
6335
_LT_TAGDECL([], [inherit_rpath], [0],
6336
[Set to yes if linker adds runtime paths of dependent libraries
6337
to runtime path list])
6338
_LT_TAGDECL([], [link_all_deplibs], [0],
6339
[Whether libtool must link a program against all its dependency libraries])
6340
_LT_TAGDECL([], [fix_srcfile_path], [1],
6341
[Fix the shell variable $srcfile for the compiler])
6342
_LT_TAGDECL([], [always_export_symbols], [0],
6343
[Set to "yes" if exported symbols are required])
6344
_LT_TAGDECL([], [export_symbols_cmds], [2],
6345
[The commands to list exported symbols])
6346
_LT_TAGDECL([], [exclude_expsyms], [1],
6347
[Symbols that should not be listed in the preloaded symbols])
6348
_LT_TAGDECL([], [include_expsyms], [1],
6349
[Symbols that must always be exported])
6350
_LT_TAGDECL([], [prelink_cmds], [2],
6351
[Commands necessary for linking programs (against libraries) with templates])
6352
_LT_TAGDECL([], [file_list_spec], [1],
6353
[Specify filename containing input files])
6354
dnl FIXME: Not yet implemented
6355
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6356
dnl [Compiler flag to generate thread safe objects])
6357
])# _LT_LINKER_SHLIBS
6360
# _LT_LANG_C_CONFIG([TAG])
6361
# ------------------------
6362
# Ensure that the configuration variables for a C compiler are suitably
6363
# defined. These variables are subsequently used by _LT_CONFIG to write
6364
# the compiler configuration to `libtool'.
6365
m4_defun([_LT_LANG_C_CONFIG],
6366
[m4_require([_LT_DECL_EGREP])dnl
6370
# Source file extension for C test sources.
6373
# Object file extension for compiled C test sources.
6375
_LT_TAGVAR(objext, $1)=$objext
6377
# Code to be used in simple compile tests
6378
lt_simple_compile_test_code="int some_variable = 0;"
6380
# Code to be used in simple link tests
6381
lt_simple_link_test_code='int main(){return(0);}'
6384
# Save the default compiler, since it gets overwritten when the other
6385
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6386
compiler_DEFAULT=$CC
6388
# save warnings/boilerplate of simple test code
6389
_LT_COMPILER_BOILERPLATE
6390
_LT_LINKER_BOILERPLATE
6392
if test -n "$compiler"; then
6393
_LT_COMPILER_NO_RTTI($1)
6394
_LT_COMPILER_PIC($1)
6395
_LT_COMPILER_C_O($1)
6396
_LT_COMPILER_FILE_LOCKS($1)
6397
_LT_LINKER_SHLIBS($1)
6398
_LT_SYS_DYNAMIC_LINKER($1)
6399
_LT_LINKER_HARDCODE_LIBPATH($1)
6403
# Report which library types will actually be built
6404
AC_MSG_CHECKING([if libtool supports shared libraries])
6405
AC_MSG_RESULT([$can_build_shared])
6407
AC_MSG_CHECKING([whether to build shared libraries])
6408
test "$can_build_shared" = "no" && enable_shared=no
6410
# On AIX, shared libraries and static libraries use the same namespace, and
6411
# are all built from PIC.
6414
test "$enable_shared" = yes && enable_static=no
6415
if test -n "$RANLIB"; then
6416
archive_cmds="$archive_cmds~\$RANLIB \$lib"
6417
postinstall_cmds='$RANLIB $lib'
6422
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6423
test "$enable_shared" = yes && enable_static=no
6427
AC_MSG_RESULT([$enable_shared])
6429
AC_MSG_CHECKING([whether to build static libraries])
6430
# Make sure either enable_shared or enable_static is yes.
6431
test "$enable_shared" = yes || enable_static=yes
6432
AC_MSG_RESULT([$enable_static])
6438
])# _LT_LANG_C_CONFIG
6441
# _LT_LANG_CXX_CONFIG([TAG])
6442
# --------------------------
6443
# Ensure that the configuration variables for a C++ compiler are suitably
6444
# defined. These variables are subsequently used by _LT_CONFIG to write
6445
# the compiler configuration to `libtool'.
6446
m4_defun([_LT_LANG_CXX_CONFIG],
6447
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6448
m4_require([_LT_DECL_EGREP])dnl
6449
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6450
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6451
(test "X$CXX" != "Xg++"))) ; then
6454
_lt_caught_CXX_error=yes
6458
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6459
_LT_TAGVAR(allow_undefined_flag, $1)=
6460
_LT_TAGVAR(always_export_symbols, $1)=no
6461
_LT_TAGVAR(archive_expsym_cmds, $1)=
6462
_LT_TAGVAR(compiler_needs_object, $1)=no
6463
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6464
_LT_TAGVAR(hardcode_direct, $1)=no
6465
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6466
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6467
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6468
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6469
_LT_TAGVAR(hardcode_minus_L, $1)=no
6470
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6471
_LT_TAGVAR(hardcode_automatic, $1)=no
6472
_LT_TAGVAR(inherit_rpath, $1)=no
6473
_LT_TAGVAR(module_cmds, $1)=
6474
_LT_TAGVAR(module_expsym_cmds, $1)=
6475
_LT_TAGVAR(link_all_deplibs, $1)=unknown
6476
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6477
_LT_TAGVAR(reload_flag, $1)=$reload_flag
6478
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6479
_LT_TAGVAR(no_undefined_flag, $1)=
6480
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6481
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6483
# Source file extension for C++ test sources.
6486
# Object file extension for compiled C++ test sources.
6488
_LT_TAGVAR(objext, $1)=$objext
6490
# No sense in running all these tests if we already determined that
6491
# the CXX compiler isn't working. Some variables (like enable_shared)
6492
# are currently assumed to apply to all compilers on this platform,
6493
# and will be corrupted by setting them based on a non-working compiler.
6494
if test "$_lt_caught_CXX_error" != yes; then
6495
# Code to be used in simple compile tests
6496
lt_simple_compile_test_code="int some_variable = 0;"
6498
# Code to be used in simple link tests
6499
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6501
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6504
# save warnings/boilerplate of simple test code
6505
_LT_COMPILER_BOILERPLATE
6506
_LT_LINKER_BOILERPLATE
6508
# Allow CC to be a program name with arguments.
6513
lt_save_with_gnu_ld=$with_gnu_ld
6514
lt_save_path_LD=$lt_cv_path_LD
6515
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6516
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6518
$as_unset lt_cv_prog_gnu_ld
6520
if test -n "${lt_cv_path_LDCXX+set}"; then
6521
lt_cv_path_LD=$lt_cv_path_LDCXX
6523
$as_unset lt_cv_path_LD
6525
test -z "${LDCXX+set}" || LD=$LDCXX
6528
_LT_TAGVAR(compiler, $1)=$CC
6529
_LT_CC_BASENAME([$compiler])
6531
if test -n "$compiler"; then
6532
# We don't want -fno-exception when compiling C++ code, so set the
6533
# no_builtin_flag separately
6534
if test "$GXX" = yes; then
6535
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6537
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6540
if test "$GXX" = yes; then
6541
# Set up default GNU C++ configuration
6545
# Check if GNU C++ uses GNU ld as the underlying linker, since the
6546
# archiving commands below assume that GNU ld is being used.
6547
if test "$with_gnu_ld" = yes; then
6548
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6549
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6551
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6552
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6554
# If archive_cmds runs LD, not CC, wlarc should be empty
6555
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6556
# investigate it a little bit more. (MM)
6559
# ancient GNU ld didn't support --whole-archive et. al.
6560
if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6561
$GREP 'no-whole-archive' > /dev/null; then
6562
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6564
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6570
# A generic and very simple default shared library creation
6571
# command for GNU C++ for the case where it uses the native
6572
# linker, instead of GNU ld. If possible, this setting should
6573
# overridden to take advantage of the native linker features on
6574
# the platform it is being used on.
6575
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6578
# Commands to make compiler produce verbose output that lists
6579
# what "hidden" libraries, object files and flags are used when
6580
# linking a shared library.
6581
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6589
# PORTME: fill in a description of your system's C++ link characteristics
6590
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6591
_LT_TAGVAR(ld_shlibs, $1)=yes
6594
# FIXME: insert proper C++ library support
6595
_LT_TAGVAR(ld_shlibs, $1)=no
6598
if test "$host_cpu" = ia64; then
6599
# On IA64, the linker does run time linking by default, so we don't
6600
# have to do anything special.
6601
aix_use_runtimelinking=no
6602
exp_sym_flag='-Bexport'
6605
aix_use_runtimelinking=no
6607
# Test if we are trying to use run time linking or normal
6608
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6609
# need to do runtime linking.
6610
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6611
for ld_flag in $LDFLAGS; do
6614
aix_use_runtimelinking=yes
6622
exp_sym_flag='-bexport'
6623
no_entry_flag='-bnoentry'
6626
# When large executables or shared objects are built, AIX ld can
6627
# have problems creating the table of contents. If linking a library
6628
# or program results in "error TOC overflow" add -mminimal-toc to
6629
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6630
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6632
_LT_TAGVAR(archive_cmds, $1)=''
6633
_LT_TAGVAR(hardcode_direct, $1)=yes
6634
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6635
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6636
_LT_TAGVAR(link_all_deplibs, $1)=yes
6637
_LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6639
if test "$GXX" = yes; then
6640
case $host_os in aix4.[[012]]|aix4.[[012]].*)
6641
# We only want to do this on AIX 4.2 and lower, the check
6642
# below for broken collect2 doesn't work under 4.3+
6643
collect2name=`${CC} -print-prog-name=collect2`
6644
if test -f "$collect2name" &&
6645
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6647
# We have reworked collect2
6650
# We have old collect2
6651
_LT_TAGVAR(hardcode_direct, $1)=unsupported
6652
# It fails to find uninstalled libraries when the uninstalled
6653
# path is not listed in the libpath. Setting hardcode_minus_L
6654
# to unsupported forces relinking
6655
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6656
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6657
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6660
shared_flag='-shared'
6661
if test "$aix_use_runtimelinking" = yes; then
6662
shared_flag="$shared_flag "'${wl}-G'
6666
if test "$host_cpu" = ia64; then
6667
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6668
# chokes on -Wl,-G. The following line is correct:
6671
if test "$aix_use_runtimelinking" = yes; then
6672
shared_flag='${wl}-G'
6674
shared_flag='${wl}-bM:SRE'
6679
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6680
# It seems that -bexpall does not export symbols beginning with
6681
# underscore (_), so it is better to generate a list of symbols to
6683
_LT_TAGVAR(always_export_symbols, $1)=yes
6684
if test "$aix_use_runtimelinking" = yes; then
6685
# Warning - without using the other runtime loading flags (-brtl),
6686
# -berok will link without error, but may produce a broken library.
6687
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6688
# Determine the default libpath from the value encoded in an empty
6690
_LT_SYS_MODULE_PATH_AIX
6691
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6693
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6695
if test "$host_cpu" = ia64; then
6696
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6697
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6698
_LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6700
# Determine the default libpath from the value encoded in an
6702
_LT_SYS_MODULE_PATH_AIX
6703
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6704
# Warning - without using the other run time loading flags,
6705
# -berok will link without error, but may produce a broken library.
6706
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6707
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6708
if test "$with_gnu_ld" = yes; then
6709
# We only use this code for GNU lds that support --whole-archive.
6710
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6712
# Exported symbols can be pulled into shared objects from archives
6713
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6715
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6716
# This is similar to how AIX traditionally builds its shared
6718
_LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6724
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6725
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6726
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6727
# support --undefined. This deserves some investigation. FIXME
6728
_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6730
_LT_TAGVAR(ld_shlibs, $1)=no
6735
case $cc_basename in
6737
# FIXME: insert proper C++ library support
6738
_LT_TAGVAR(ld_shlibs, $1)=no
6743
cygwin* | mingw* | pw32* | cegcc*)
6744
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6745
# as there is no search path for DLLs.
6746
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6747
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6748
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6749
_LT_TAGVAR(always_export_symbols, $1)=no
6750
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6752
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6753
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6754
# If the export-symbols file already is a .def file (1st line
6755
# is EXPORTS), use it as is; otherwise, prepend...
6756
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6757
cp $export_symbols $output_objdir/$soname.def;
6759
echo EXPORTS > $output_objdir/$soname.def;
6760
cat $export_symbols >> $output_objdir/$soname.def;
6762
$CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6764
_LT_TAGVAR(ld_shlibs, $1)=no
6767
darwin* | rhapsody*)
6768
_LT_DARWIN_LINKER_FEATURES($1)
6772
case $cc_basename in
6774
# FIXME: insert proper C++ library support
6775
_LT_TAGVAR(ld_shlibs, $1)=no
6778
# Green Hills C++ Compiler
6779
# FIXME: insert proper C++ library support
6780
_LT_TAGVAR(ld_shlibs, $1)=no
6783
# FIXME: insert proper C++ library support
6784
_LT_TAGVAR(ld_shlibs, $1)=no
6790
# C++ shared libraries reported to be fairly broken before
6792
_LT_TAGVAR(ld_shlibs, $1)=no
6796
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6799
freebsd* | dragonfly*)
6800
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6802
_LT_TAGVAR(ld_shlibs, $1)=yes
6809
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6810
_LT_TAGVAR(link_all_deplibs, $1)=yes
6814
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6815
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6816
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6817
_LT_TAGVAR(hardcode_direct, $1)=yes
6818
_LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6819
# but as the default
6820
# location of the library.
6822
case $cc_basename in
6824
# FIXME: insert proper C++ library support
6825
_LT_TAGVAR(ld_shlibs, $1)=no
6828
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6829
# Commands to make compiler produce verbose output that lists
6830
# what "hidden" libraries, object files and flags are used when
6831
# linking a shared library.
6833
# There doesn't appear to be a way to prevent this compiler from
6834
# explicitly linking system object files so we need to strip them
6835
# from the output so that they don't get included in the library
6837
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6840
if test "$GXX" = yes; then
6841
_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6843
# FIXME: insert proper C++ library support
6844
_LT_TAGVAR(ld_shlibs, $1)=no
6851
if test $with_gnu_ld = no; then
6852
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6853
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6859
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6865
_LT_TAGVAR(hardcode_direct, $1)=no
6866
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6869
_LT_TAGVAR(hardcode_direct, $1)=yes
6870
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6871
_LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6872
# but as the default
6873
# location of the library.
6877
case $cc_basename in
6879
# FIXME: insert proper C++ library support
6880
_LT_TAGVAR(ld_shlibs, $1)=no
6885
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6888
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6891
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6894
# Commands to make compiler produce verbose output that lists
6895
# what "hidden" libraries, object files and flags are used when
6896
# linking a shared library.
6898
# There doesn't appear to be a way to prevent this compiler from
6899
# explicitly linking system object files so we need to strip them
6900
# from the output so that they don't get included in the library
6902
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6905
if test "$GXX" = yes; then
6906
if test $with_gnu_ld = no; then
6909
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6912
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6915
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6920
# FIXME: insert proper C++ library support
6921
_LT_TAGVAR(ld_shlibs, $1)=no
6928
_LT_TAGVAR(hardcode_direct, $1)=no
6929
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6930
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6931
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6932
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6933
# Instead, shared libraries are loaded at an image base (0x10000000 by
6934
# default) and relocated if they conflict, which is a slow very memory
6935
# consuming and fragmenting process. To avoid this, we pick a random,
6936
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6937
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
6938
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6939
_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6942
case $cc_basename in
6945
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6947
# Archives containing C++ object files must be created using
6948
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
6949
# necessary to make sure instantiated templates are included
6951
_LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6954
if test "$GXX" = yes; then
6955
if test "$with_gnu_ld" = no; then
6956
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6958
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
6961
_LT_TAGVAR(link_all_deplibs, $1)=yes
6964
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6965
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6966
_LT_TAGVAR(inherit_rpath, $1)=yes
6969
linux* | k*bsd*-gnu | kopensolaris*-gnu)
6970
case $cc_basename in
6972
# Kuck and Associates, Inc. (KAI) C++ Compiler
6974
# KCC will only create a shared library if the output file
6975
# ends with ".so" (or ".sl" for HP-UX), so rename the library
6976
# to its proper name (with version) after linking.
6977
_LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6978
_LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
6979
# Commands to make compiler produce verbose output that lists
6980
# what "hidden" libraries, object files and flags are used when
6981
# linking a shared library.
6983
# There doesn't appear to be a way to prevent this compiler from
6984
# explicitly linking system object files so we need to strip them
6985
# from the output so that they don't get included in the library
6987
output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6989
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6990
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6992
# Archives containing C++ object files must be created using
6993
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
6994
_LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6999
# version 8.0 and above of icpc choke on multiply defined symbols
7000
# if we add $predep_objects and $postdep_objects, however 7.1 and
7001
# earlier do not add the objects themselves.
7002
case `$CC -V 2>&1` in
7004
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7005
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7007
*) # Version 8.0 or newer
7010
ia64*) tmp_idyn=' -i_dynamic';;
7012
_LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7013
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7016
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7017
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7018
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7019
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7022
# Portland Group C++ compiler
7024
*pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7025
_LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7027
$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7028
compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7029
_LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7031
$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7032
$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7034
_LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7036
$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7037
$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7038
_LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7040
$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7041
$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7043
*) # Version 6 and above use weak symbols
7044
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7045
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7049
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7050
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7051
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7055
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7056
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
7058
runpath_var=LD_RUN_PATH
7059
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7060
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7062
# Commands to make compiler produce verbose output that lists
7063
# what "hidden" libraries, object files and flags are used when
7064
# linking a shared library.
7066
# There doesn't appear to be a way to prevent this compiler from
7067
# explicitly linking system object files so we need to strip them
7068
# from the output so that they don't get included in the library
7070
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
7072
xl* | mpixl* | bgxl*)
7073
# IBM XL 8.0 on PPC, with GNU ld
7074
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7075
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7076
_LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7077
if test "x$supports_anon_versioning" = xyes; then
7078
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7079
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7080
echo "local: *; };" >> $output_objdir/$libname.ver~
7081
$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7085
case `$CC -V 2>&1 | sed 5q` in
7088
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7089
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7090
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
7091
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7092
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7093
_LT_TAGVAR(compiler_needs_object, $1)=yes
7095
# Not sure whether something based on
7096
# $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7098
output_verbose_link_cmd='func_echo_all'
7100
# Archives containing C++ object files must be created using
7101
# "CC -xar", where "CC" is the Sun C++ compiler. This is
7102
# necessary to make sure instantiated templates are included
7104
_LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7112
# FIXME: insert proper C++ library support
7113
_LT_TAGVAR(ld_shlibs, $1)=no
7117
# FIXME: insert proper C++ library support
7118
_LT_TAGVAR(ld_shlibs, $1)=no
7122
case $cc_basename in
7124
# FIXME: insert proper C++ library support
7125
_LT_TAGVAR(ld_shlibs, $1)=no
7128
# FIXME: insert proper C++ library support
7129
_LT_TAGVAR(ld_shlibs, $1)=no
7135
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7136
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7138
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7139
_LT_TAGVAR(hardcode_direct, $1)=yes
7140
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7142
# Workaround some broken pre-1.5 toolchains
7143
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7147
_LT_TAGVAR(ld_shlibs, $1)=yes
7151
# C++ shared libraries are fairly broken
7152
_LT_TAGVAR(ld_shlibs, $1)=no
7156
if test -f /usr/libexec/ld.so; then
7157
_LT_TAGVAR(hardcode_direct, $1)=yes
7158
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7159
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7160
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7161
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7162
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7163
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
7164
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7165
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7167
output_verbose_link_cmd=func_echo_all
7169
_LT_TAGVAR(ld_shlibs, $1)=no
7173
osf3* | osf4* | osf5*)
7174
case $cc_basename in
7176
# Kuck and Associates, Inc. (KAI) C++ Compiler
7178
# KCC will only create a shared library if the output file
7179
# ends with ".so" (or ".sl" for HP-UX), so rename the library
7180
# to its proper name (with version) after linking.
7181
_LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7183
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7184
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7186
# Archives containing C++ object files must be created using
7187
# the KAI C++ compiler.
7189
osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7190
*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7194
# Rational C++ 2.4.1
7195
# FIXME: insert proper C++ library support
7196
_LT_TAGVAR(ld_shlibs, $1)=no
7201
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7202
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7203
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7206
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7207
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7208
_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7209
echo "-hidden">> $lib.exp~
7210
$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
7212
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7216
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7218
# Commands to make compiler produce verbose output that lists
7219
# what "hidden" libraries, object files and flags are used when
7220
# linking a shared library.
7222
# There doesn't appear to be a way to prevent this compiler from
7223
# explicitly linking system object files so we need to strip them
7224
# from the output so that they don't get included in the library
7226
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7229
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7230
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7233
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7236
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7240
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7241
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7243
# Commands to make compiler produce verbose output that lists
7244
# what "hidden" libraries, object files and flags are used when
7245
# linking a shared library.
7246
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7249
# FIXME: insert proper C++ library support
7250
_LT_TAGVAR(ld_shlibs, $1)=no
7257
# FIXME: insert proper C++ library support
7258
_LT_TAGVAR(ld_shlibs, $1)=no
7262
case $cc_basename in
7265
# FIXME: insert proper C++ library support
7266
_LT_TAGVAR(ld_shlibs, $1)=no
7270
# FIXME: insert proper C++ library support
7271
_LT_TAGVAR(ld_shlibs, $1)=no
7274
# FIXME: insert proper C++ library support
7275
_LT_TAGVAR(ld_shlibs, $1)=no
7281
case $cc_basename in
7283
# Sun C++ 4.2, 5.x and Centerline C++
7284
_LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7285
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7286
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7287
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7288
$CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7290
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7291
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7293
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7295
# The compiler driver will combine and reorder linker options,
7296
# but understands `-z linker_flag'.
7297
# Supported since Solaris 2.6 (maybe 2.5.1?)
7298
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7301
_LT_TAGVAR(link_all_deplibs, $1)=yes
7303
output_verbose_link_cmd='func_echo_all'
7305
# Archives containing C++ object files must be created using
7306
# "CC -xar", where "CC" is the Sun C++ compiler. This is
7307
# necessary to make sure instantiated templates are included
7309
_LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7312
# Green Hills C++ Compiler
7313
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7315
# The C++ compiler must be used to create the archive.
7316
_LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7319
# GNU C++ compiler with Solaris linker
7320
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7321
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7322
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7323
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7324
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7325
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7327
# Commands to make compiler produce verbose output that lists
7328
# what "hidden" libraries, object files and flags are used when
7329
# linking a shared library.
7330
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7332
# g++ 2.7 appears to require `-G' NOT `-shared' on this
7334
_LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7335
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7336
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7338
# Commands to make compiler produce verbose output that lists
7339
# what "hidden" libraries, object files and flags are used when
7340
# linking a shared library.
7341
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7344
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7346
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7348
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7356
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7357
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7358
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7359
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7360
runpath_var='LD_RUN_PATH'
7362
case $cc_basename in
7364
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7365
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7368
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7369
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7374
sysv5* | sco3.2v5* | sco5v6*)
7375
# Note: We can NOT use -z defs as we might desire, because we do not
7376
# link with -lc, and that would cause any symbols used from libc to
7377
# always be unresolved, which means just about no library would
7378
# ever link correctly. If we're not using GNU ld we use -z text
7379
# though, which does catch some bad symbols but isn't as heavy-handed
7381
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7382
_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7383
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7384
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7385
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7386
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7387
_LT_TAGVAR(link_all_deplibs, $1)=yes
7388
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7389
runpath_var='LD_RUN_PATH'
7391
case $cc_basename in
7393
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7394
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7395
_LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7396
'"$_LT_TAGVAR(old_archive_cmds, $1)"
7397
_LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7398
'"$_LT_TAGVAR(reload_cmds, $1)"
7401
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7402
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7408
case $cc_basename in
7410
# NonStop-UX NCC 3.20
7411
# FIXME: insert proper C++ library support
7412
_LT_TAGVAR(ld_shlibs, $1)=no
7415
# FIXME: insert proper C++ library support
7416
_LT_TAGVAR(ld_shlibs, $1)=no
7422
# FIXME: insert proper C++ library support
7423
_LT_TAGVAR(ld_shlibs, $1)=no
7427
# FIXME: insert proper C++ library support
7428
_LT_TAGVAR(ld_shlibs, $1)=no
7432
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7433
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7435
_LT_TAGVAR(GCC, $1)="$GXX"
7436
_LT_TAGVAR(LD, $1)="$LD"
7439
## There is no encapsulation within the following macros, do not change
7440
## the running order or otherwise move them around unless you know exactly
7441
## what you are doing...
7442
_LT_SYS_HIDDEN_LIBDEPS($1)
7443
_LT_COMPILER_PIC($1)
7444
_LT_COMPILER_C_O($1)
7445
_LT_COMPILER_FILE_LOCKS($1)
7446
_LT_LINKER_SHLIBS($1)
7447
_LT_SYS_DYNAMIC_LINKER($1)
7448
_LT_LINKER_HARDCODE_LIBPATH($1)
7451
fi # test -n "$compiler"
7457
with_gnu_ld=$lt_save_with_gnu_ld
7458
lt_cv_path_LDCXX=$lt_cv_path_LD
7459
lt_cv_path_LD=$lt_save_path_LD
7460
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7461
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7462
fi # test "$_lt_caught_CXX_error" != yes
7465
])# _LT_LANG_CXX_CONFIG
7468
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7469
# ---------------------------------
7470
# Figure out "hidden" library dependencies from verbose
7471
# compiler output when linking a shared library.
7472
# Parse the compiler output and extract the necessary
7473
# objects, libraries and library flags.
7474
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7475
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7476
# Dependencies to place before and after the object being linked:
7477
_LT_TAGVAR(predep_objects, $1)=
7478
_LT_TAGVAR(postdep_objects, $1)=
7479
_LT_TAGVAR(predeps, $1)=
7480
_LT_TAGVAR(postdeps, $1)=
7481
_LT_TAGVAR(compiler_lib_search_path, $1)=
7483
dnl we can't use the lt_simple_compile_test_code here,
7484
dnl because it contains code intended for an executable,
7485
dnl not a library. It's possible we should let each
7486
dnl tag define a new lt_????_link_test_code variable,
7487
dnl but it's only used here...
7488
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7490
void foo (void) { a = 0; }
7492
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7496
Foo (void) { a = 0; }
7501
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7509
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7517
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7520
public void bar (void) {
7526
dnl Parse the compiler output and extract the necessary
7527
dnl objects, libraries and library flags.
7528
if AC_TRY_EVAL(ac_compile); then
7529
# Parse the compiler output and extract the necessary
7530
# objects, libraries and library flags.
7532
# Sentinel used to keep track of whether or not we are before
7533
# the conftest object file.
7534
pre_test_object_deps_done=no
7536
for p in `eval "$output_verbose_link_cmd"`; do
7540
# Some compilers place space between "-{L,R}" and the path.
7542
if test $p = "-L" ||
7543
test $p = "-R"; then
7550
if test "$pre_test_object_deps_done" = no; then
7553
# Internal compiler library paths should come after those
7554
# provided the user. The postdeps already come after the
7555
# user supplied libs so there is no need to process them.
7556
if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7557
_LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7559
_LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7562
# The "-l" case would never come before the object being
7563
# linked, so don't bother handling this case.
7566
if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7567
_LT_TAGVAR(postdeps, $1)="${prev}${p}"
7569
_LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7575
# This assumes that the test object file only shows up
7576
# once in the compiler output.
7577
if test "$p" = "conftest.$objext"; then
7578
pre_test_object_deps_done=yes
7582
if test "$pre_test_object_deps_done" = no; then
7583
if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7584
_LT_TAGVAR(predep_objects, $1)="$p"
7586
_LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7589
if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7590
_LT_TAGVAR(postdep_objects, $1)="$p"
7592
_LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7597
*) ;; # Ignore the rest.
7605
echo "libtool.m4: error: problem compiling $1 test program"
7608
$RM -f confest.$objext
7610
# PORTME: override above test on systems where it is broken
7614
# Interix 3.5 installs completely hosed .la files for C++, so rather than
7615
# hack all around it, let's just trust "g++" to DTRT.
7616
_LT_TAGVAR(predep_objects,$1)=
7617
_LT_TAGVAR(postdep_objects,$1)=
7618
_LT_TAGVAR(postdeps,$1)=
7622
case `$CC -V 2>&1 | sed 5q` in
7626
# The more standards-conforming stlport4 library is
7627
# incompatible with the Cstd library. Avoid specifying
7628
# it if it's in CXXFLAGS. Ignore libCrun as
7629
# -library=stlport4 depends on it.
7630
case " $CXX $CXXFLAGS " in
7631
*" -library=stlport4 "*)
7632
solaris_use_stlport4=yes
7636
if test "$solaris_use_stlport4" != yes; then
7637
_LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7644
case $cc_basename in
7646
# The more standards-conforming stlport4 library is
7647
# incompatible with the Cstd library. Avoid specifying
7648
# it if it's in CXXFLAGS. Ignore libCrun as
7649
# -library=stlport4 depends on it.
7650
case " $CXX $CXXFLAGS " in
7651
*" -library=stlport4 "*)
7652
solaris_use_stlport4=yes
7656
# Adding this requires a known-good setup of shared libraries for
7657
# Sun compiler versions before 5.6, else PIC objects from an old
7658
# archive will be linked into the output, leading to subtle bugs.
7659
if test "$solaris_use_stlport4" != yes; then
7660
_LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7668
case " $_LT_TAGVAR(postdeps, $1) " in
7669
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7671
_LT_TAGVAR(compiler_lib_search_dirs, $1)=
7672
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7673
_LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7675
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7676
[The directories searched by this compiler when creating a shared library])
7677
_LT_TAGDECL([], [predep_objects], [1],
7678
[Dependencies to place before and after the objects being linked to
7679
create a shared library])
7680
_LT_TAGDECL([], [postdep_objects], [1])
7681
_LT_TAGDECL([], [predeps], [1])
7682
_LT_TAGDECL([], [postdeps], [1])
7683
_LT_TAGDECL([], [compiler_lib_search_path], [1],
7684
[The library search path used internally by the compiler when linking
7686
])# _LT_SYS_HIDDEN_LIBDEPS
7689
# _LT_LANG_F77_CONFIG([TAG])
7690
# --------------------------
7691
# Ensure that the configuration variables for a Fortran 77 compiler are
7692
# suitably defined. These variables are subsequently used by _LT_CONFIG
7693
# to write the compiler configuration to `libtool'.
7694
m4_defun([_LT_LANG_F77_CONFIG],
7695
[AC_LANG_PUSH(Fortran 77)
7696
if test -z "$F77" || test "X$F77" = "Xno"; then
7700
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7701
_LT_TAGVAR(allow_undefined_flag, $1)=
7702
_LT_TAGVAR(always_export_symbols, $1)=no
7703
_LT_TAGVAR(archive_expsym_cmds, $1)=
7704
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7705
_LT_TAGVAR(hardcode_direct, $1)=no
7706
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7707
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7708
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7709
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7710
_LT_TAGVAR(hardcode_minus_L, $1)=no
7711
_LT_TAGVAR(hardcode_automatic, $1)=no
7712
_LT_TAGVAR(inherit_rpath, $1)=no
7713
_LT_TAGVAR(module_cmds, $1)=
7714
_LT_TAGVAR(module_expsym_cmds, $1)=
7715
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7716
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7717
_LT_TAGVAR(reload_flag, $1)=$reload_flag
7718
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7719
_LT_TAGVAR(no_undefined_flag, $1)=
7720
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7721
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7723
# Source file extension for f77 test sources.
7726
# Object file extension for compiled f77 test sources.
7728
_LT_TAGVAR(objext, $1)=$objext
7730
# No sense in running all these tests if we already determined that
7731
# the F77 compiler isn't working. Some variables (like enable_shared)
7732
# are currently assumed to apply to all compilers on this platform,
7733
# and will be corrupted by setting them based on a non-working compiler.
7734
if test "$_lt_disable_F77" != yes; then
7735
# Code to be used in simple compile tests
7736
lt_simple_compile_test_code="\
7742
# Code to be used in simple link tests
7743
lt_simple_link_test_code="\
7748
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7751
# save warnings/boilerplate of simple test code
7752
_LT_COMPILER_BOILERPLATE
7753
_LT_LINKER_BOILERPLATE
7755
# Allow CC to be a program name with arguments.
7760
_LT_TAGVAR(compiler, $1)=$CC
7761
_LT_CC_BASENAME([$compiler])
7763
if test -n "$compiler"; then
7764
AC_MSG_CHECKING([if libtool supports shared libraries])
7765
AC_MSG_RESULT([$can_build_shared])
7767
AC_MSG_CHECKING([whether to build shared libraries])
7768
test "$can_build_shared" = "no" && enable_shared=no
7770
# On AIX, shared libraries and static libraries use the same namespace, and
7771
# are all built from PIC.
7774
test "$enable_shared" = yes && enable_static=no
7775
if test -n "$RANLIB"; then
7776
archive_cmds="$archive_cmds~\$RANLIB \$lib"
7777
postinstall_cmds='$RANLIB $lib'
7781
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7782
test "$enable_shared" = yes && enable_static=no
7786
AC_MSG_RESULT([$enable_shared])
7788
AC_MSG_CHECKING([whether to build static libraries])
7789
# Make sure either enable_shared or enable_static is yes.
7790
test "$enable_shared" = yes || enable_static=yes
7791
AC_MSG_RESULT([$enable_static])
7793
_LT_TAGVAR(GCC, $1)="$G77"
7794
_LT_TAGVAR(LD, $1)="$LD"
7797
## There is no encapsulation within the following macros, do not change
7798
## the running order or otherwise move them around unless you know exactly
7799
## what you are doing...
7800
_LT_COMPILER_PIC($1)
7801
_LT_COMPILER_C_O($1)
7802
_LT_COMPILER_FILE_LOCKS($1)
7803
_LT_LINKER_SHLIBS($1)
7804
_LT_SYS_DYNAMIC_LINKER($1)
7805
_LT_LINKER_HARDCODE_LIBPATH($1)
7808
fi # test -n "$compiler"
7812
fi # test "$_lt_disable_F77" != yes
7815
])# _LT_LANG_F77_CONFIG
7818
# _LT_LANG_FC_CONFIG([TAG])
7819
# -------------------------
7820
# Ensure that the configuration variables for a Fortran compiler are
7821
# suitably defined. These variables are subsequently used by _LT_CONFIG
7822
# to write the compiler configuration to `libtool'.
7823
m4_defun([_LT_LANG_FC_CONFIG],
7824
[AC_LANG_PUSH(Fortran)
7826
if test -z "$FC" || test "X$FC" = "Xno"; then
7830
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7831
_LT_TAGVAR(allow_undefined_flag, $1)=
7832
_LT_TAGVAR(always_export_symbols, $1)=no
7833
_LT_TAGVAR(archive_expsym_cmds, $1)=
7834
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7835
_LT_TAGVAR(hardcode_direct, $1)=no
7836
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7837
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7838
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7839
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7840
_LT_TAGVAR(hardcode_minus_L, $1)=no
7841
_LT_TAGVAR(hardcode_automatic, $1)=no
7842
_LT_TAGVAR(inherit_rpath, $1)=no
7843
_LT_TAGVAR(module_cmds, $1)=
7844
_LT_TAGVAR(module_expsym_cmds, $1)=
7845
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7846
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7847
_LT_TAGVAR(reload_flag, $1)=$reload_flag
7848
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7849
_LT_TAGVAR(no_undefined_flag, $1)=
7850
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7851
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7853
# Source file extension for fc test sources.
7854
ac_ext=${ac_fc_srcext-f}
7856
# Object file extension for compiled fc test sources.
7858
_LT_TAGVAR(objext, $1)=$objext
7860
# No sense in running all these tests if we already determined that
7861
# the FC compiler isn't working. Some variables (like enable_shared)
7862
# are currently assumed to apply to all compilers on this platform,
7863
# and will be corrupted by setting them based on a non-working compiler.
7864
if test "$_lt_disable_FC" != yes; then
7865
# Code to be used in simple compile tests
7866
lt_simple_compile_test_code="\
7872
# Code to be used in simple link tests
7873
lt_simple_link_test_code="\
7878
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7881
# save warnings/boilerplate of simple test code
7882
_LT_COMPILER_BOILERPLATE
7883
_LT_LINKER_BOILERPLATE
7885
# Allow CC to be a program name with arguments.
7890
GCC=$ac_cv_fc_compiler_gnu
7892
_LT_TAGVAR(compiler, $1)=$CC
7893
_LT_CC_BASENAME([$compiler])
7895
if test -n "$compiler"; then
7896
AC_MSG_CHECKING([if libtool supports shared libraries])
7897
AC_MSG_RESULT([$can_build_shared])
7899
AC_MSG_CHECKING([whether to build shared libraries])
7900
test "$can_build_shared" = "no" && enable_shared=no
7902
# On AIX, shared libraries and static libraries use the same namespace, and
7903
# are all built from PIC.
7906
test "$enable_shared" = yes && enable_static=no
7907
if test -n "$RANLIB"; then
7908
archive_cmds="$archive_cmds~\$RANLIB \$lib"
7909
postinstall_cmds='$RANLIB $lib'
7913
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7914
test "$enable_shared" = yes && enable_static=no
7918
AC_MSG_RESULT([$enable_shared])
7920
AC_MSG_CHECKING([whether to build static libraries])
7921
# Make sure either enable_shared or enable_static is yes.
7922
test "$enable_shared" = yes || enable_static=yes
7923
AC_MSG_RESULT([$enable_static])
7925
_LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7926
_LT_TAGVAR(LD, $1)="$LD"
7929
## There is no encapsulation within the following macros, do not change
7930
## the running order or otherwise move them around unless you know exactly
7931
## what you are doing...
7932
_LT_SYS_HIDDEN_LIBDEPS($1)
7933
_LT_COMPILER_PIC($1)
7934
_LT_COMPILER_C_O($1)
7935
_LT_COMPILER_FILE_LOCKS($1)
7936
_LT_LINKER_SHLIBS($1)
7937
_LT_SYS_DYNAMIC_LINKER($1)
7938
_LT_LINKER_HARDCODE_LIBPATH($1)
7941
fi # test -n "$compiler"
7945
fi # test "$_lt_disable_FC" != yes
7948
])# _LT_LANG_FC_CONFIG
7951
# _LT_LANG_GCJ_CONFIG([TAG])
7952
# --------------------------
7953
# Ensure that the configuration variables for the GNU Java Compiler compiler
7954
# are suitably defined. These variables are subsequently used by _LT_CONFIG
7955
# to write the compiler configuration to `libtool'.
7956
m4_defun([_LT_LANG_GCJ_CONFIG],
7957
[AC_REQUIRE([LT_PROG_GCJ])dnl
7960
# Source file extension for Java test sources.
7963
# Object file extension for compiled Java test sources.
7965
_LT_TAGVAR(objext, $1)=$objext
7967
# Code to be used in simple compile tests
7968
lt_simple_compile_test_code="class foo {}"
7970
# Code to be used in simple link tests
7971
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7973
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7976
# save warnings/boilerplate of simple test code
7977
_LT_COMPILER_BOILERPLATE
7978
_LT_LINKER_BOILERPLATE
7980
# Allow CC to be a program name with arguments.
7986
_LT_TAGVAR(compiler, $1)=$CC
7987
_LT_TAGVAR(LD, $1)="$LD"
7988
_LT_CC_BASENAME([$compiler])
7990
# GCJ did not exist at the time GCC didn't implicitly link libc in.
7991
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7993
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7994
_LT_TAGVAR(reload_flag, $1)=$reload_flag
7995
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7997
if test -n "$compiler"; then
7998
_LT_COMPILER_NO_RTTI($1)
7999
_LT_COMPILER_PIC($1)
8000
_LT_COMPILER_C_O($1)
8001
_LT_COMPILER_FILE_LOCKS($1)
8002
_LT_LINKER_SHLIBS($1)
8003
_LT_LINKER_HARDCODE_LIBPATH($1)
8012
])# _LT_LANG_GCJ_CONFIG
8015
# _LT_LANG_RC_CONFIG([TAG])
8016
# -------------------------
8017
# Ensure that the configuration variables for the Windows resource compiler
8018
# are suitably defined. These variables are subsequently used by _LT_CONFIG
8019
# to write the compiler configuration to `libtool'.
8020
m4_defun([_LT_LANG_RC_CONFIG],
8021
[AC_REQUIRE([LT_PROG_RC])dnl
8024
# Source file extension for RC test sources.
8027
# Object file extension for compiled RC test sources.
8029
_LT_TAGVAR(objext, $1)=$objext
8031
# Code to be used in simple compile tests
8032
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8034
# Code to be used in simple link tests
8035
lt_simple_link_test_code="$lt_simple_compile_test_code"
8037
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8040
# save warnings/boilerplate of simple test code
8041
_LT_COMPILER_BOILERPLATE
8042
_LT_LINKER_BOILERPLATE
8044
# Allow CC to be a program name with arguments.
8050
_LT_TAGVAR(compiler, $1)=$CC
8051
_LT_CC_BASENAME([$compiler])
8052
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8054
if test -n "$compiler"; then
8062
])# _LT_LANG_RC_CONFIG
8067
AC_DEFUN([LT_PROG_GCJ],
8068
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8069
[m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8070
[AC_CHECK_TOOL(GCJ, gcj,)
8071
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8072
AC_SUBST(GCJFLAGS)])])[]dnl
8076
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8077
dnl aclocal-1.4 backwards compatibility:
8078
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8083
AC_DEFUN([LT_PROG_RC],
8084
[AC_CHECK_TOOL(RC, windres,)
8088
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8089
dnl aclocal-1.4 backwards compatibility:
8090
dnl AC_DEFUN([LT_AC_PROG_RC], [])
8095
# If we don't have a new enough Autoconf to choose the best grep
8096
# available, choose the one first in the user's PATH.
8097
m4_defun([_LT_DECL_EGREP],
8098
[AC_REQUIRE([AC_PROG_EGREP])dnl
8099
AC_REQUIRE([AC_PROG_FGREP])dnl
8100
test -z "$GREP" && GREP=grep
8101
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8102
_LT_DECL([], [EGREP], [1], [An ERE matcher])
8103
_LT_DECL([], [FGREP], [1], [A literal string matcher])
8104
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8111
# If we don't have a new enough Autoconf to choose the best objdump
8112
# available, choose the one first in the user's PATH.
8113
m4_defun([_LT_DECL_OBJDUMP],
8114
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8115
test -z "$OBJDUMP" && OBJDUMP=objdump
8116
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8123
# Check for a fully-functional sed program, that truncates
8124
# as few characters as possible. Prefer GNU sed if found.
8125
m4_defun([_LT_DECL_SED],
8127
test -z "$SED" && SED=sed
8128
Xsed="$SED -e 1s/^X//"
8129
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8130
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8131
[Sed that helps us avoid accidentally triggering echo(1) options like -n])
8134
m4_ifndef([AC_PROG_SED], [
8135
# NOTE: This macro has been submitted for inclusion into #
8136
# GNU Autoconf as AC_PROG_SED. When it is available in #
8137
# a released version of Autoconf we should remove this #
8138
# macro and use it instead. #
8140
m4_defun([AC_PROG_SED],
8141
[AC_MSG_CHECKING([for a sed that does not truncate output])
8142
AC_CACHE_VAL(lt_cv_path_SED,
8143
[# Loop through the user's path and test for sed and gsed.
8144
# Then use that list of sed's as ones to test for truncation.
8145
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8149
test -z "$as_dir" && as_dir=.
8150
for lt_ac_prog in sed gsed; do
8151
for ac_exec_ext in '' $ac_executable_extensions; do
8152
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8153
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8161
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8162
# along with /bin/sed that truncates output.
8163
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8164
test ! -f $lt_ac_sed && continue
8165
cat /dev/null > conftest.in
8167
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8168
# Check for GNU sed and select it if it is found.
8169
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8170
lt_cv_path_SED=$lt_ac_sed
8174
cat conftest.in conftest.in >conftest.tmp
8175
mv conftest.tmp conftest.in
8176
cp conftest.in conftest.nl
8178
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8179
cmp -s conftest.out conftest.nl || break
8180
# 10000 chars as input seems more than enough
8181
test $lt_ac_count -gt 10 && break
8182
lt_ac_count=`expr $lt_ac_count + 1`
8183
if test $lt_ac_count -gt $lt_ac_max; then
8184
lt_ac_max=$lt_ac_count
8185
lt_cv_path_SED=$lt_ac_sed
8192
AC_MSG_RESULT([$SED])
8197
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8198
dnl aclocal-1.4 backwards compatibility:
8199
dnl AC_DEFUN([LT_AC_PROG_SED], [])
8202
# _LT_CHECK_SHELL_FEATURES
8203
# ------------------------
8204
# Find out whether the shell is Bourne or XSI compatible,
8205
# or has some other useful features.
8206
m4_defun([_LT_CHECK_SHELL_FEATURES],
8207
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8208
# Try some XSI features
8211
test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
8213
&& eval 'test $(( 1 + 1 )) -eq 2 \
8214
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8216
AC_MSG_RESULT([$xsi_shell])
8217
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8219
AC_MSG_CHECKING([whether the shell understands "+="])
8221
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8223
&& lt_shell_append=yes
8224
AC_MSG_RESULT([$lt_shell_append])
8225
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8227
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8232
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8234
# test EBCDIC or ASCII
8235
case `echo X|tr X '\101'` in
8236
A) # ASCII based system
8237
# \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8238
lt_SP2NL='tr \040 \012'
8239
lt_NL2SP='tr \015\012 \040\040'
8241
*) # EBCDIC based system
8242
lt_SP2NL='tr \100 \n'
8243
lt_NL2SP='tr \r\n \100\100'
8246
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8247
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8248
])# _LT_CHECK_SHELL_FEATURES
8251
# _LT_PROG_XSI_SHELLFNS
8252
# ---------------------
8253
# Bourne and XSI compatible variants of some useful shell functions.
8254
m4_defun([_LT_PROG_XSI_SHELLFNS],
8257
cat << \_LT_EOF >> "$cfgfile"
8259
# func_dirname file append nondir_replacement
8260
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
8261
# otherwise set result to NONDIR_REPLACEMENT.
8265
*/*) func_dirname_result="${1%/*}${2}" ;;
8266
* ) func_dirname_result="${3}" ;;
8270
# func_basename file
8273
func_basename_result="${1##*/}"
8276
# func_dirname_and_basename file append nondir_replacement
8277
# perform func_basename and func_dirname in a single function
8279
# dirname: Compute the dirname of FILE. If nonempty,
8280
# add APPEND to the result, otherwise set result
8281
# to NONDIR_REPLACEMENT.
8282
# value returned in "$func_dirname_result"
8283
# basename: Compute filename of FILE.
8284
# value retuned in "$func_basename_result"
8285
# Implementation must be kept synchronized with func_dirname
8286
# and func_basename. For efficiency, we do not delegate to
8287
# those functions but instead duplicate the functionality here.
8288
func_dirname_and_basename ()
8291
*/*) func_dirname_result="${1%/*}${2}" ;;
8292
* ) func_dirname_result="${3}" ;;
8294
func_basename_result="${1##*/}"
8297
# func_stripname prefix suffix name
8298
# strip PREFIX and SUFFIX off of NAME.
8299
# PREFIX and SUFFIX must not contain globbing or regex special
8300
# characters, hashes, percent signs, but SUFFIX may contain a leading
8301
# dot (in which case that matches only a dot).
8304
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8305
# positional parameters, so assign one to ordinary parameter first.
8306
func_stripname_result=${3}
8307
func_stripname_result=${func_stripname_result#"${1}"}
8308
func_stripname_result=${func_stripname_result%"${2}"}
8314
func_opt_split_opt=${1%%=*}
8315
func_opt_split_arg=${1#*=}
8322
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8323
*) func_lo2o_result=${1} ;;
8327
# func_xform libobj-or-source
8330
func_xform_result=${1%.*}.lo
8333
# func_arith arithmetic-term...
8336
func_arith_result=$(( $[*] ))
8340
# STRING may not start with a hyphen.
8343
func_len_result=${#1}
8348
*) # Bourne compatible functions.
8349
cat << \_LT_EOF >> "$cfgfile"
8351
# func_dirname file append nondir_replacement
8352
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
8353
# otherwise set result to NONDIR_REPLACEMENT.
8356
# Extract subdirectory from the argument.
8357
func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
8358
if test "X$func_dirname_result" = "X${1}"; then
8359
func_dirname_result="${3}"
8361
func_dirname_result="$func_dirname_result${2}"
8365
# func_basename file
8368
func_basename_result=`$ECHO "${1}" | $SED "$basename"`
8371
dnl func_dirname_and_basename
8372
dnl A portable version of this function is already defined in general.m4sh
8373
dnl so there is no need for it here.
8375
# func_stripname prefix suffix name
8376
# strip PREFIX and SUFFIX off of NAME.
8377
# PREFIX and SUFFIX must not contain globbing or regex special
8378
# characters, hashes, percent signs, but SUFFIX may contain a leading
8379
# dot (in which case that matches only a dot).
8380
# func_strip_suffix prefix name
8384
.*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
8385
*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
8390
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8391
my_sed_long_arg='1s/^-[[^=]]*=//'
8396
func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
8397
func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
8403
func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
8406
# func_xform libobj-or-source
8409
func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
8412
# func_arith arithmetic-term...
8415
func_arith_result=`expr "$[@]"`
8419
# STRING may not start with a hyphen.
8422
func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8428
case $lt_shell_append in
8430
cat << \_LT_EOF >> "$cfgfile"
8432
# func_append var value
8433
# Append VALUE to the end of shell variable VAR.
8441
cat << \_LT_EOF >> "$cfgfile"
8443
# func_append var value
8444
# Append VALUE to the end of shell variable VAR.
8447
eval "$[1]=\$$[1]\$[2]"
8455
# Helper functions for option handling. -*- Autoconf -*-
8457
# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8459
# Written by Gary V. Vaughan, 2004
8461
# This file is free software; the Free Software Foundation gives
8462
# unlimited permission to copy and/or distribute it, with or without
8463
# modifications, as long as this notice is preserved.
8465
# serial 7 ltoptions.m4
8467
# This is to help aclocal find these macros, as it can't see m4_define.
8468
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8471
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8472
# ------------------------------------------
8473
m4_define([_LT_MANGLE_OPTION],
8474
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8477
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8478
# ---------------------------------------
8479
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8480
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
8482
m4_define([_LT_SET_OPTION],
8483
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8484
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8485
_LT_MANGLE_DEFUN([$1], [$2]),
8486
[m4_warning([Unknown $1 option `$2'])])[]dnl
8490
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8491
# ------------------------------------------------------------
8492
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8493
m4_define([_LT_IF_OPTION],
8494
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8497
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8498
# -------------------------------------------------------
8499
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8501
m4_define([_LT_UNLESS_OPTIONS],
8502
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8503
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8504
[m4_define([$0_found])])])[]dnl
8505
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8510
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8511
# ----------------------------------------
8512
# OPTION-LIST is a space-separated list of Libtool options associated
8513
# with MACRO-NAME. If any OPTION has a matching handler declared with
8514
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8515
# the unknown option and exit.
8516
m4_defun([_LT_SET_OPTIONS],
8518
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8519
[_LT_SET_OPTION([$1], _LT_Option)])
8521
m4_if([$1],[LT_INIT],[
8523
dnl Simply set some default values (i.e off) if boolean options were not
8525
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8527
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8530
dnl If no reference was made to various pairs of opposing options, then
8531
dnl we run the default mode handler for the pair. For example, if neither
8532
dnl `shared' nor `disable-shared' was passed, we enable building of shared
8533
dnl archives by default:
8534
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8535
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8536
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8537
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8538
[_LT_ENABLE_FAST_INSTALL])
8544
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8545
# -----------------------------------------
8546
m4_define([_LT_MANGLE_DEFUN],
8547
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8550
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8551
# -----------------------------------------------
8552
m4_define([LT_OPTION_DEFINE],
8553
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8554
])# LT_OPTION_DEFINE
8559
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8562
AU_DEFUN([AC_LIBTOOL_DLOPEN],
8563
[_LT_SET_OPTION([LT_INIT], [dlopen])
8564
AC_DIAGNOSE([obsolete],
8565
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8566
put the `dlopen' option into LT_INIT's first parameter.])
8569
dnl aclocal-1.4 backwards compatibility:
8570
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8575
# Declare package support for building win32 dll's.
8576
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8577
[enable_win32_dll=yes
8580
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8581
AC_CHECK_TOOL(AS, as, false)
8582
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8583
AC_CHECK_TOOL(OBJDUMP, objdump, false)
8587
test -z "$AS" && AS=as
8588
_LT_DECL([], [AS], [1], [Assembler program])dnl
8590
test -z "$DLLTOOL" && DLLTOOL=dlltool
8591
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
8593
test -z "$OBJDUMP" && OBJDUMP=objdump
8594
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8597
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8598
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8599
_LT_SET_OPTION([LT_INIT], [win32-dll])
8600
AC_DIAGNOSE([obsolete],
8601
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8602
put the `win32-dll' option into LT_INIT's first parameter.])
8605
dnl aclocal-1.4 backwards compatibility:
8606
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8609
# _LT_ENABLE_SHARED([DEFAULT])
8610
# ----------------------------
8611
# implement the --enable-shared flag, and supports the `shared' and
8612
# `disable-shared' LT_INIT options.
8613
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8614
m4_define([_LT_ENABLE_SHARED],
8615
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8616
AC_ARG_ENABLE([shared],
8617
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8618
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8619
[p=${PACKAGE-default}
8621
yes) enable_shared=yes ;;
8622
no) enable_shared=no ;;
8625
# Look at the argument we got. We use all the common list separators.
8626
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8627
for pkg in $enableval; do
8629
if test "X$pkg" = "X$p"; then
8636
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8638
_LT_DECL([build_libtool_libs], [enable_shared], [0],
8639
[Whether or not to build shared libraries])
8640
])# _LT_ENABLE_SHARED
8642
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8643
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8646
AC_DEFUN([AC_ENABLE_SHARED],
8647
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8650
AC_DEFUN([AC_DISABLE_SHARED],
8651
[_LT_SET_OPTION([LT_INIT], [disable-shared])
8654
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8655
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8657
dnl aclocal-1.4 backwards compatibility:
8658
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8659
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8663
# _LT_ENABLE_STATIC([DEFAULT])
8664
# ----------------------------
8665
# implement the --enable-static flag, and support the `static' and
8666
# `disable-static' LT_INIT options.
8667
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8668
m4_define([_LT_ENABLE_STATIC],
8669
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8670
AC_ARG_ENABLE([static],
8671
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8672
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8673
[p=${PACKAGE-default}
8675
yes) enable_static=yes ;;
8676
no) enable_static=no ;;
8679
# Look at the argument we got. We use all the common list separators.
8680
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8681
for pkg in $enableval; do
8683
if test "X$pkg" = "X$p"; then
8690
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8692
_LT_DECL([build_old_libs], [enable_static], [0],
8693
[Whether or not to build static libraries])
8694
])# _LT_ENABLE_STATIC
8696
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8697
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8700
AC_DEFUN([AC_ENABLE_STATIC],
8701
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8704
AC_DEFUN([AC_DISABLE_STATIC],
8705
[_LT_SET_OPTION([LT_INIT], [disable-static])
8708
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8709
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8711
dnl aclocal-1.4 backwards compatibility:
8712
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8713
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8717
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
8718
# ----------------------------------
8719
# implement the --enable-fast-install flag, and support the `fast-install'
8720
# and `disable-fast-install' LT_INIT options.
8721
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8722
m4_define([_LT_ENABLE_FAST_INSTALL],
8723
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8724
AC_ARG_ENABLE([fast-install],
8725
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8726
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8727
[p=${PACKAGE-default}
8729
yes) enable_fast_install=yes ;;
8730
no) enable_fast_install=no ;;
8732
enable_fast_install=no
8733
# Look at the argument we got. We use all the common list separators.
8734
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8735
for pkg in $enableval; do
8737
if test "X$pkg" = "X$p"; then
8738
enable_fast_install=yes
8744
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8746
_LT_DECL([fast_install], [enable_fast_install], [0],
8747
[Whether or not to optimize for fast installation])dnl
8748
])# _LT_ENABLE_FAST_INSTALL
8750
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8751
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8754
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8755
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8756
AC_DIAGNOSE([obsolete],
8757
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8758
the `fast-install' option into LT_INIT's first parameter.])
8761
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8762
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8763
AC_DIAGNOSE([obsolete],
8764
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8765
the `disable-fast-install' option into LT_INIT's first parameter.])
8768
dnl aclocal-1.4 backwards compatibility:
8769
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8770
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8773
# _LT_WITH_PIC([MODE])
8774
# --------------------
8775
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
8777
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
8778
m4_define([_LT_WITH_PIC],
8780
[AS_HELP_STRING([--with-pic],
8781
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8782
[pic_mode="$withval"],
8785
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
8787
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8790
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8791
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8794
AU_DEFUN([AC_LIBTOOL_PICMODE],
8795
[_LT_SET_OPTION([LT_INIT], [pic-only])
8796
AC_DIAGNOSE([obsolete],
8797
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8798
put the `pic-only' option into LT_INIT's first parameter.])
8801
dnl aclocal-1.4 backwards compatibility:
8802
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8805
m4_define([_LTDL_MODE], [])
8806
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8807
[m4_define([_LTDL_MODE], [nonrecursive])])
8808
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8809
[m4_define([_LTDL_MODE], [recursive])])
8810
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8811
[m4_define([_LTDL_MODE], [subproject])])
8813
m4_define([_LTDL_TYPE], [])
8814
LT_OPTION_DEFINE([LTDL_INIT], [installable],
8815
[m4_define([_LTDL_TYPE], [installable])])
8816
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8817
[m4_define([_LTDL_TYPE], [convenience])])
8819
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
8821
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8822
# Written by Gary V. Vaughan, 2004
8824
# This file is free software; the Free Software Foundation gives
8825
# unlimited permission to copy and/or distribute it, with or without
8826
# modifications, as long as this notice is preserved.
8828
# serial 6 ltsugar.m4
8830
# This is to help aclocal find these macros, as it can't see m4_define.
8831
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8834
# lt_join(SEP, ARG1, [ARG2...])
8835
# -----------------------------
8836
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8837
# associated separator.
8838
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8839
# versions in m4sugar had bugs.
8840
m4_define([lt_join],
8841
[m4_if([$#], [1], [],
8843
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8844
m4_define([_lt_join],
8845
[m4_if([$#$2], [2], [],
8846
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8852
# Manipulate m4 lists.
8853
# These macros are necessary as long as will still need to support
8854
# Autoconf-2.59 which quotes differently.
8855
m4_define([lt_car], [[$1]])
8857
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8859
[m4_dquote(m4_shift($@))])])
8860
m4_define([lt_unquote], $1)
8863
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
8864
# ------------------------------------------
8865
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
8866
# Note that neither SEPARATOR nor STRING are expanded; they are appended
8867
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8868
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
8869
# than defined and empty).
8871
# This macro is needed until we can rely on Autoconf 2.62, since earlier
8872
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8873
m4_define([lt_append],
8875
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8879
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8880
# ----------------------------------------------------------
8881
# Produce a SEP delimited list of all paired combinations of elements of
8882
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
8883
# has the form PREFIXmINFIXSUFFIXn.
8884
# Needed until we can rely on m4_combine added in Autoconf 2.62.
8885
m4_define([lt_combine],
8886
[m4_if(m4_eval([$# > 3]), [1],
8887
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8888
[[m4_foreach([_Lt_prefix], [$2],
8889
[m4_foreach([_Lt_suffix],
8890
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8891
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8894
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8895
# -----------------------------------------------------------------------
8896
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8897
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8898
m4_define([lt_if_append_uniq],
8900
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8901
[lt_append([$1], [$2], [$3])$4],
8903
[lt_append([$1], [$2], [$3])$4])])
8906
# lt_dict_add(DICT, KEY, VALUE)
8907
# -----------------------------
8908
m4_define([lt_dict_add],
8909
[m4_define([$1($2)], [$3])])
8912
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8913
# --------------------------------------------
8914
m4_define([lt_dict_add_subkey],
8915
[m4_define([$1($2:$3)], [$4])])
8918
# lt_dict_fetch(DICT, KEY, [SUBKEY])
8919
# ----------------------------------
8920
m4_define([lt_dict_fetch],
8922
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8923
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8926
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8927
# -----------------------------------------------------------------
8928
m4_define([lt_if_dict_fetch],
8929
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8934
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8935
# --------------------------------------------------------------
8936
m4_define([lt_dict_filter],
8937
[m4_if([$5], [], [],
8938
[lt_join(m4_quote(m4_default([$4], [[, ]])),
8939
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8940
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8943
# ltversion.m4 -- version numbers -*- Autoconf -*-
8945
# Copyright (C) 2004 Free Software Foundation, Inc.
8946
# Written by Scott James Remnant, 2004
8948
# This file is free software; the Free Software Foundation gives
8949
# unlimited permission to copy and/or distribute it, with or without
8950
# modifications, as long as this notice is preserved.
8952
# Generated from ltversion.in.
8954
# serial 3175 ltversion.m4
8955
# This file is part of GNU Libtool
8957
m4_define([LT_PACKAGE_VERSION], [2.2.10])
8958
m4_define([LT_PACKAGE_REVISION], [1.3175])
8960
AC_DEFUN([LTVERSION_VERSION],
8961
[macro_version='2.2.10'
8962
macro_revision='1.3175'
8963
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8964
_LT_DECL(, macro_revision, 0)
8967
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
8969
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
8970
# Written by Scott James Remnant, 2004.
8972
# This file is free software; the Free Software Foundation gives
8973
# unlimited permission to copy and/or distribute it, with or without
8974
# modifications, as long as this notice is preserved.
8976
# serial 5 lt~obsolete.m4
8978
# These exist entirely to fool aclocal when bootstrapping libtool.
8980
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
8981
# which have later been changed to m4_define as they aren't part of the
8982
# exported API, or moved to Autoconf or Automake where they belong.
8984
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
8985
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8986
# using a macro with the same name in our local m4/libtool.m4 it'll
8987
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8988
# and doesn't know about Autoconf macros at all.)
8990
# So we provide this file, which has a silly filename so it's always
8991
# included after everything else. This provides aclocal with the
8992
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8993
# because those macros already exist, or will be overwritten later.
8994
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
8996
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8997
# Yes, that means every name once taken will need to remain here until
8998
# we give up compatibility with versions before 1.7, at which point
8999
# we need to keep only those names which we still refer to.
9001
# This is to help aclocal find these macros, as it can't see m4_define.
9002
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9004
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9005
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
9006
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9007
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
9008
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9009
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
9010
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
9011
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9012
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
9013
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9014
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
9015
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9016
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9017
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9018
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9019
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9020
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
9021
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9022
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9023
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
9024
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
9025
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9026
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9027
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9028
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9029
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9030
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9031
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9032
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
9033
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
9034
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
9035
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9036
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9037
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
9038
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
9039
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9040
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9041
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
9042
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9043
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
9044
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
9045
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
9046
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9047
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9048
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9049
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9050
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9051
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9052
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9053
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9054
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9055
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9056
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9057
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9058
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9059
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9060
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9061
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9062
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
9063
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
9064
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
9066
# nls.m4 serial 5 (gettext-0.18)
9067
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
9069
dnl This file is free software; the Free Software Foundation
9070
dnl gives unlimited permission to copy and/or distribute it,
9071
dnl with or without modifications, as long as this notice is preserved.
9073
dnl This file can can be used in projects which are not available under
9074
dnl the GNU General Public License or the GNU Library General Public
9075
dnl License but which still want to provide support for the GNU gettext
9077
dnl Please note that the actual code of the GNU gettext library is covered
9078
dnl by the GNU Library General Public License, and the rest of the GNU
9079
dnl gettext package package is covered by the GNU General Public License.
9080
dnl They are *not* in the public domain.
9083
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9084
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9090
AC_MSG_CHECKING([whether NLS is requested])
9091
dnl Default is enabled NLS
9092
AC_ARG_ENABLE([nls],
9093
[ --disable-nls do not use Native Language Support],
9094
USE_NLS=$enableval, USE_NLS=yes)
9095
AC_MSG_RESULT([$USE_NLS])
9099
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
9100
# serial 1 (pkg-config-0.24)
9102
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9104
# This program is free software; you can redistribute it and/or modify
9105
# it under the terms of the GNU General Public License as published by
9106
# the Free Software Foundation; either version 2 of the License, or
9107
# (at your option) any later version.
9109
# This program is distributed in the hope that it will be useful, but
9110
# WITHOUT ANY WARRANTY; without even the implied warranty of
9111
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9112
# General Public License for more details.
9114
# You should have received a copy of the GNU General Public License
9115
# along with this program; if not, write to the Free Software
9116
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9118
# As a special exception to the GNU General Public License, if you
9119
# distribute this file as part of a program that contains a
9120
# configuration script generated by Autoconf, you may include it under
9121
# the same distribution terms that you use for the rest of that program.
9123
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
9124
# ----------------------------------
9125
AC_DEFUN([PKG_PROG_PKG_CONFIG],
9126
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9127
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
9128
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9129
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9130
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9132
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9133
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9135
if test -n "$PKG_CONFIG"; then
9136
_pkg_min_version=m4_default([$1], [0.9.0])
9137
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9138
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9139
AC_MSG_RESULT([yes])
9145
])# PKG_PROG_PKG_CONFIG
9147
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9149
# Check to see whether a particular set of modules exists. Similar
9150
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
9152
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9153
# only at the first occurence in configure.ac, so if the first place
9154
# it's called might be skipped (such as if it is within an "if", you
9155
# have to call PKG_CHECK_EXISTS manually
9156
# --------------------------------------------------------------
9157
AC_DEFUN([PKG_CHECK_EXISTS],
9158
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9159
if test -n "$PKG_CONFIG" && \
9160
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9161
m4_default([$2], [:])
9162
m4_ifvaln([$3], [else
9166
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9167
# ---------------------------------------------
9168
m4_define([_PKG_CONFIG],
9169
[if test -n "$$1"; then
9171
elif test -n "$PKG_CONFIG"; then
9172
PKG_CHECK_EXISTS([$3],
9173
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
9180
# _PKG_SHORT_ERRORS_SUPPORTED
9181
# -----------------------------
9182
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9183
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9184
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9185
_pkg_short_errors_supported=yes
9187
_pkg_short_errors_supported=no
9189
])# _PKG_SHORT_ERRORS_SUPPORTED
9192
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9193
# [ACTION-IF-NOT-FOUND])
9196
# Note that if there is a possibility the first call to
9197
# PKG_CHECK_MODULES might not happen, you should be sure to include an
9198
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9201
# --------------------------------------------------------------
9202
AC_DEFUN([PKG_CHECK_MODULES],
9203
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9204
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9205
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9208
AC_MSG_CHECKING([for $1])
9210
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9211
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9213
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9214
and $1[]_LIBS to avoid the need to call pkg-config.
9215
See the pkg-config man page for more details.])
9217
if test $pkg_failed = yes; then
9219
_PKG_SHORT_ERRORS_SUPPORTED
9220
if test $_pkg_short_errors_supported = yes; then
9221
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
9223
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
9225
# Put the nasty error message in config.log where it belongs
9226
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9228
m4_default([$4], [AC_MSG_ERROR(
9229
[Package requirements ($2) were not met:
9233
Consider adjusting the PKG_CONFIG_PATH environment variable if you
9234
installed software in a non-standard prefix.
9238
elif test $pkg_failed = untried; then
9240
m4_default([$4], [AC_MSG_FAILURE(
9241
[The pkg-config script could not be found or is too old. Make sure it
9242
is in your PATH or set the PKG_CONFIG environment variable to the full
9247
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
9250
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9251
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9252
AC_MSG_RESULT([yes])
9255
])# PKG_CHECK_MODULES
9257
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
9259
# This file is free software; the Free Software Foundation
9260
# gives unlimited permission to copy and/or distribute it,
9261
# with or without modifications, as long as this notice is preserved.
9263
# AM_AUTOMAKE_VERSION(VERSION)
9264
# ----------------------------
9265
# Automake X.Y traces this macro to ensure aclocal.m4 has been
9266
# generated from the m4 files accompanying Automake X.Y.
9267
# (This private macro should not be called outside this file.)
9268
AC_DEFUN([AM_AUTOMAKE_VERSION],
9269
[am__api_version='1.11'
9270
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9271
dnl require some minimum version. Point them to the right macro.
9272
m4_if([$1], [1.11.1], [],
9273
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9276
# _AM_AUTOCONF_VERSION(VERSION)
9277
# -----------------------------
9278
# aclocal traces this macro to find the Autoconf version.
9279
# This is a private macro too. Using m4_define simplifies
9280
# the logic in aclocal, which can simply ignore this definition.
9281
m4_define([_AM_AUTOCONF_VERSION], [])
9283
# AM_SET_CURRENT_AUTOMAKE_VERSION
9284
# -------------------------------
9285
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9286
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9287
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9288
[AM_AUTOMAKE_VERSION([1.11.1])dnl
9289
m4_ifndef([AC_AUTOCONF_VERSION],
9290
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9291
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9293
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
9295
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
9297
# This file is free software; the Free Software Foundation
9298
# gives unlimited permission to copy and/or distribute it,
9299
# with or without modifications, as long as this notice is preserved.
9301
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9302
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
9303
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
9305
# Of course, Automake must honor this variable whenever it calls a
9306
# tool from the auxiliary directory. The problem is that $srcdir (and
9307
# therefore $ac_aux_dir as well) can be either absolute or relative,
9308
# depending on how configure is run. This is pretty annoying, since
9309
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
9310
# source directory, any form will work fine, but in subdirectories a
9311
# relative path needs to be adjusted first.
9313
# $ac_aux_dir/missing
9314
# fails when called from a subdirectory if $ac_aux_dir is relative
9315
# $top_srcdir/$ac_aux_dir/missing
9316
# fails if $ac_aux_dir is absolute,
9317
# fails when called from a subdirectory in a VPATH build with
9318
# a relative $ac_aux_dir
9320
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9321
# are both prefixed by $srcdir. In an in-source build this is usually
9322
# harmless because $srcdir is `.', but things will broke when you
9323
# start a VPATH build or use an absolute $srcdir.
9325
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9326
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
9327
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9328
# and then we would define $MISSING as
9329
# MISSING="\${SHELL} $am_aux_dir/missing"
9330
# This will work as long as MISSING is not called from configure, because
9331
# unfortunately $(top_srcdir) has no meaning in configure.
9332
# However there are other variables, like CC, which are often used in
9333
# configure, and could therefore not use this "fixed" $ac_aux_dir.
9335
# Another solution, used here, is to always expand $ac_aux_dir to an
9336
# absolute PATH. The drawback is that using absolute paths prevent a
9337
# configured tree to be moved without reconfiguration.
9339
AC_DEFUN([AM_AUX_DIR_EXPAND],
9340
[dnl Rely on autoconf to set up CDPATH properly.
9341
AC_PREREQ([2.50])dnl
9342
# expand $ac_aux_dir to an absolute path
9343
am_aux_dir=`cd $ac_aux_dir && pwd`
9346
# AM_CONDITIONAL -*- Autoconf -*-
9348
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
9349
# Free Software Foundation, Inc.
9351
# This file is free software; the Free Software Foundation
9352
# gives unlimited permission to copy and/or distribute it,
9353
# with or without modifications, as long as this notice is preserved.
9357
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
9358
# -------------------------------------
9359
# Define a conditional.
9360
AC_DEFUN([AM_CONDITIONAL],
9362
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
9363
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9364
AC_SUBST([$1_TRUE])dnl
9365
AC_SUBST([$1_FALSE])dnl
9366
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
9367
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
9368
m4_define([_AM_COND_VALUE_$1], [$2])dnl
9376
AC_CONFIG_COMMANDS_PRE(
9377
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9378
AC_MSG_ERROR([[conditional "$1" was never defined.
9379
Usually this means the macro was only invoked conditionally.]])
9382
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
9383
# Free Software Foundation, Inc.
9385
# This file is free software; the Free Software Foundation
9386
# gives unlimited permission to copy and/or distribute it,
9387
# with or without modifications, as long as this notice is preserved.
9391
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9392
# written in clear, in which case automake, when reading aclocal.m4,
9393
# will think it sees a *use*, and therefore will trigger all it's
9394
# C support machinery. Also note that it means that autoscan, seeing
9395
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9398
# _AM_DEPENDENCIES(NAME)
9399
# ----------------------
9400
# See how the compiler implements dependency checking.
9401
# NAME is "CC", "CXX", "GCJ", or "OBJC".
9402
# We try a few techniques and use that to set a single cache variable.
9404
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9405
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9406
# dependency, and given that the user is not expected to run this macro,
9407
# just rely on AC_PROG_CC.
9408
AC_DEFUN([_AM_DEPENDENCIES],
9409
[AC_REQUIRE([AM_SET_DEPDIR])dnl
9410
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9411
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9412
AC_REQUIRE([AM_DEP_TRACK])dnl
9414
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
9415
[$1], CXX, [depcc="$CXX" am_compiler_list=],
9416
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9417
[$1], UPC, [depcc="$UPC" am_compiler_list=],
9418
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
9419
[depcc="$$1" am_compiler_list=])
9421
AC_CACHE_CHECK([dependency style of $depcc],
9422
[am_cv_$1_dependencies_compiler_type],
9423
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9424
# We make a subdir and do the tests there. Otherwise we can end up
9425
# making bogus files that we don't know about and never remove. For
9426
# instance it was reported that on HP-UX the gcc test will end up
9427
# making a dummy file named `D' -- because `-MD' means `put the output
9430
# Copy depcomp to subdir because otherwise we won't find it if we're
9431
# using a relative directory.
9432
cp "$am_depcomp" conftest.dir
9434
# We will build objects and dependencies in a subdirectory because
9435
# it helps to detect inapplicable dependency modes. For instance
9436
# both Tru64's cc and ICC support -MD to output dependencies as a
9437
# side effect of compilation, but ICC will put the dependencies in
9438
# the current directory while Tru64 will put them in the object
9442
am_cv_$1_dependencies_compiler_type=none
9443
if test "$am_compiler_list" = ""; then
9444
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9448
[case " $depcc " in #(
9449
*\ -arch\ *\ -arch\ *) am__universal=true ;;
9452
[case " $depcc " in #(
9453
*\ -arch\ *\ -arch\ *) am__universal=true ;;
9456
for depmode in $am_compiler_list; do
9457
# Setup a source with many dependencies, because some compilers
9458
# like to wrap large dependency lists on column 80 (with \), and
9459
# we should not choose a depcomp mode which is confused by this.
9461
# We need to recreate these files for each test, as the compiler may
9462
# overwrite some of them when testing with obscure command lines.
9463
# This happens at least with the AIX C compiler.
9465
for i in 1 2 3 4 5 6; do
9466
echo '#include "conftst'$i'.h"' >> sub/conftest.c
9467
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9468
# Solaris 8's {/usr,}/bin/sh.
9469
touch sub/conftst$i.h
9471
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9473
# We check with `-c' and `-o' for the sake of the "dashmstdout"
9474
# mode. It turns out that the SunPro C++ compiler does not properly
9475
# handle `-M -o', and we need to detect this. Also, some Intel
9476
# versions had trouble with output in subdirs
9477
am__obj=sub/conftest.${OBJEXT-o}
9478
am__minus_obj="-o $am__obj"
9481
# This depmode causes a compiler race in universal mode.
9482
test "$am__universal" = false || continue
9485
# after this tag, mechanisms are not by side-effect, so they'll
9486
# only be used when explicitly requested
9487
if test "x$enable_dependency_tracking" = xyes; then
9493
msvisualcpp | msvcmsys)
9494
# This compiler won't grok `-c -o', but also, the minuso test has
9495
# not run yet. These depmodes are late enough in the game, and
9496
# so weak that their functioning should not be impacted.
9497
am__obj=conftest.${OBJEXT-o}
9502
if depmode=$depmode \
9503
source=sub/conftest.c object=$am__obj \
9504
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9505
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9506
>/dev/null 2>conftest.err &&
9507
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9508
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9509
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9510
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9511
# icc doesn't choke on unknown options, it will just issue warnings
9512
# or remarks (even with -Werror). So we grep stderr for any message
9513
# that says an option was ignored or not supported.
9514
# When given -MP, icc 7.0 and 7.1 complain thusly:
9515
# icc: Command line warning: ignoring option '-M'; no argument required
9516
# The diagnosis changed in icc 8.0:
9517
# icc: Command line remark: option '-MP' not supported
9518
if (grep 'ignoring option' conftest.err ||
9519
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9520
am_cv_$1_dependencies_compiler_type=$depmode
9529
am_cv_$1_dependencies_compiler_type=none
9532
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9533
AM_CONDITIONAL([am__fastdep$1], [
9534
test "x$enable_dependency_tracking" != xno \
9535
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9541
# Choose a directory name for dependency files.
9542
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
9543
AC_DEFUN([AM_SET_DEPDIR],
9544
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9545
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9551
AC_DEFUN([AM_DEP_TRACK],
9552
[AC_ARG_ENABLE(dependency-tracking,
9553
[ --disable-dependency-tracking speeds up one-time build
9554
--enable-dependency-tracking do not reject slow dependency extractors])
9555
if test "x$enable_dependency_tracking" != xno; then
9556
am_depcomp="$ac_aux_dir/depcomp"
9559
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9560
AC_SUBST([AMDEPBACKSLASH])dnl
9561
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9564
# Generate code to set up dependency tracking. -*- Autoconf -*-
9566
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9567
# Free Software Foundation, Inc.
9569
# This file is free software; the Free Software Foundation
9570
# gives unlimited permission to copy and/or distribute it,
9571
# with or without modifications, as long as this notice is preserved.
9575
# _AM_OUTPUT_DEPENDENCY_COMMANDS
9576
# ------------------------------
9577
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9579
# Autoconf 2.62 quotes --file arguments for eval, but not when files
9580
# are listed without --file. Let's play safe and only enable the eval
9581
# if we detect the quoting.
9582
case $CONFIG_FILES in
9583
*\'*) eval set x "$CONFIG_FILES" ;;
9584
*) set x $CONFIG_FILES ;;
9589
# Strip MF so we end up with the name of the file.
9590
mf=`echo "$mf" | sed -e 's/:.*$//'`
9591
# Check whether this is an Automake generated Makefile or not.
9592
# We used to match only the files named `Makefile.in', but
9593
# some people rename them; so instead we look at the file content.
9594
# Grep'ing the first line is not enough: some people post-process
9595
# each Makefile.in and add a new line on top of each file to say so.
9596
# Grep'ing the whole file is not good either: AIX grep has a line
9597
# limit of 2048, but all sed's we know have understand at least 4000.
9598
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9599
dirpart=`AS_DIRNAME("$mf")`
9603
# Extract the definition of DEPDIR, am__include, and am__quote
9604
# from the Makefile without running `make'.
9605
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9606
test -z "$DEPDIR" && continue
9607
am__include=`sed -n 's/^am__include = //p' < "$mf"`
9608
test -z "am__include" && continue
9609
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9610
# When using ansi2knr, U may be empty or an underscore; expand it
9611
U=`sed -n 's/^U = //p' < "$mf"`
9612
# Find all dependency output files, they are included files with
9613
# $(DEPDIR) in their names. We invoke sed twice because it is the
9614
# simplest approach to changing $(DEPDIR) to its actual value in the
9616
for file in `sed -n "
9617
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9618
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9619
# Make sure the directory exists.
9620
test -f "$dirpart/$file" && continue
9621
fdir=`AS_DIRNAME(["$file"])`
9622
AS_MKDIR_P([$dirpart/$fdir])
9623
# echo "creating $dirpart/$file"
9624
echo '# dummy' > "$dirpart/$file"
9628
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9631
# AM_OUTPUT_DEPENDENCY_COMMANDS
9632
# -----------------------------
9633
# This macro should only be invoked once -- use via AC_REQUIRE.
9635
# This code is only required when automatic dependency tracking
9636
# is enabled. FIXME. This creates each `.P' file that we will
9637
# need in order to bootstrap the dependency handling code.
9638
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9639
[AC_CONFIG_COMMANDS([depfiles],
9640
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9641
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9644
# Do all the work for Automake. -*- Autoconf -*-
9646
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9647
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
9649
# This file is free software; the Free Software Foundation
9650
# gives unlimited permission to copy and/or distribute it,
9651
# with or without modifications, as long as this notice is preserved.
9655
# This macro actually does too much. Some checks are only needed if
9656
# your package does certain things. But this isn't really a big deal.
9658
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9659
# AM_INIT_AUTOMAKE([OPTIONS])
9660
# -----------------------------------------------
9661
# The call with PACKAGE and VERSION arguments is the old style
9662
# call (pre autoconf-2.50), which is being phased out. PACKAGE
9663
# and VERSION should now be passed to AC_INIT and removed from
9664
# the call to AM_INIT_AUTOMAKE.
9665
# We support both call styles for the transition. After
9666
# the next Automake release, Autoconf can make the AC_INIT
9667
# arguments mandatory, and then we can depend on a new Autoconf
9668
# release and drop the old call support.
9669
AC_DEFUN([AM_INIT_AUTOMAKE],
9670
[AC_PREREQ([2.62])dnl
9671
dnl Autoconf wants to disallow AM_ names. We explicitly allow
9672
dnl the ones we care about.
9673
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9674
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9675
AC_REQUIRE([AC_PROG_INSTALL])dnl
9676
if test "`cd $srcdir && pwd`" != "`pwd`"; then
9677
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9678
# is not polluted with repeated "-I."
9679
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9680
# test to see if srcdir already configured
9681
if test -f $srcdir/config.status; then
9682
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9686
# test whether we have cygpath
9687
if test -z "$CYGPATH_W"; then
9688
if (cygpath --version) >/dev/null 2>/dev/null; then
9689
CYGPATH_W='cygpath -w'
9694
AC_SUBST([CYGPATH_W])
9696
# Define the identity of the package.
9697
dnl Distinguish between old-style and new-style calls.
9699
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9700
AC_SUBST([PACKAGE], [$1])dnl
9701
AC_SUBST([VERSION], [$2])],
9702
[_AM_SET_OPTIONS([$1])dnl
9703
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9704
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9705
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9706
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9707
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9709
_AM_IF_OPTION([no-define],,
9710
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9711
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9713
# Some tools Automake needs.
9714
AC_REQUIRE([AM_SANITY_CHECK])dnl
9715
AC_REQUIRE([AC_ARG_PROGRAM])dnl
9716
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9717
AM_MISSING_PROG(AUTOCONF, autoconf)
9718
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9719
AM_MISSING_PROG(AUTOHEADER, autoheader)
9720
AM_MISSING_PROG(MAKEINFO, makeinfo)
9721
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9722
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9723
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9724
# We need awk for the "check" target. The system "awk" is bad on
9726
AC_REQUIRE([AC_PROG_AWK])dnl
9727
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9728
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9729
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9730
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9731
[_AM_PROG_TAR([v7])])])
9732
_AM_IF_OPTION([no-dependencies],,
9733
[AC_PROVIDE_IFELSE([AC_PROG_CC],
9734
[_AM_DEPENDENCIES(CC)],
9735
[define([AC_PROG_CC],
9736
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9737
AC_PROVIDE_IFELSE([AC_PROG_CXX],
9738
[_AM_DEPENDENCIES(CXX)],
9739
[define([AC_PROG_CXX],
9740
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9741
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9742
[_AM_DEPENDENCIES(OBJC)],
9743
[define([AC_PROG_OBJC],
9744
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9746
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
9747
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
9748
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
9749
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
9750
AC_CONFIG_COMMANDS_PRE(dnl
9751
[m4_provide_if([_AM_COMPILER_EXEEXT],
9752
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9755
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
9756
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
9757
dnl mangled by Autoconf and run in a shell conditional statement.
9758
m4_define([_AC_COMPILER_EXEEXT],
9759
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
9762
# When config.status generates a header, we must update the stamp-h file.
9763
# This file resides in the same directory as the config header
9764
# that is generated. The stamp files are numbered to have different names.
9766
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9767
# loop where config.status creates the headers, so we can generate
9768
# our stamp files there.
9769
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9770
[# Compute $1's index in $config_headers.
9773
for _am_header in $config_headers :; do
9775
$_am_arg | $_am_arg:* )
9778
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
9781
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9783
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
9785
# This file is free software; the Free Software Foundation
9786
# gives unlimited permission to copy and/or distribute it,
9787
# with or without modifications, as long as this notice is preserved.
9789
# AM_PROG_INSTALL_SH
9790
# ------------------
9791
# Define $install_sh.
9792
AC_DEFUN([AM_PROG_INSTALL_SH],
9793
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9794
if test x"${install_sh}" != xset; then
9797
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
9799
install_sh="\${SHELL} $am_aux_dir/install-sh"
9802
AC_SUBST(install_sh)])
9804
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
9806
# This file is free software; the Free Software Foundation
9807
# gives unlimited permission to copy and/or distribute it,
9808
# with or without modifications, as long as this notice is preserved.
9812
# Check whether the underlying file-system supports filenames
9813
# with a leading dot. For instance MS-DOS doesn't.
9814
AC_DEFUN([AM_SET_LEADING_DOT],
9815
[rm -rf .tst 2>/dev/null
9816
mkdir .tst 2>/dev/null
9817
if test -d .tst; then
9822
rmdir .tst 2>/dev/null
9823
AC_SUBST([am__leading_dot])])
9825
# Check to see how 'make' treats includes. -*- Autoconf -*-
9827
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
9829
# This file is free software; the Free Software Foundation
9830
# gives unlimited permission to copy and/or distribute it,
9831
# with or without modifications, as long as this notice is preserved.
9837
# Check to see how make treats includes.
9838
AC_DEFUN([AM_MAKE_INCLUDE],
9839
[am_make=${MAKE-make}
9840
cat > confinc << 'END'
9842
@echo this is the am__doit target
9845
# If we don't find an include directive, just comment out the code.
9846
AC_MSG_CHECKING([for style of include used by $am_make])
9850
# First try GNU make style include.
9851
echo "include confinc" > confmf
9852
# Ignore all kinds of additional output from `make'.
9853
case `$am_make -s -f confmf 2> /dev/null` in #(
9854
*the\ am__doit\ target*)
9860
# Now try BSD make style include.
9861
if test "$am__include" = "#"; then
9862
echo '.include "confinc"' > confmf
9863
case `$am_make -s -f confmf 2> /dev/null` in #(
9864
*the\ am__doit\ target*)
9865
am__include=.include
9871
AC_SUBST([am__include])
9872
AC_SUBST([am__quote])
9873
AC_MSG_RESULT([$_am_result])
9874
rm -f confinc confmf
9877
# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
9878
# Free Software Foundation, Inc.
9880
# This file is free software; the Free Software Foundation
9881
# gives unlimited permission to copy and/or distribute it,
9882
# with or without modifications, as long as this notice is preserved.
9888
# Like AC_PROG_CC_C_O, but changed for automake.
9889
AC_DEFUN([AM_PROG_CC_C_O],
9890
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
9891
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9892
AC_REQUIRE_AUX_FILE([compile])dnl
9893
# FIXME: we rely on the cache variable name because
9894
# there is no other way.
9896
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
9897
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
9898
if test "$am_t" != yes; then
9899
# Losing compiler, so override with the script.
9900
# FIXME: It is wrong to rewrite CC.
9901
# But if we don't then we get into trouble of one sort or another.
9902
# A longer-term fix would be to have automake use am__CC in this case,
9903
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
9904
CC="$am_aux_dir/compile $CC"
9906
dnl Make sure AC_PROG_CC is never called again, or it will override our
9908
m4_define([AC_PROG_CC],
9909
[m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
9912
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
9914
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
9915
# Free Software Foundation, Inc.
9917
# This file is free software; the Free Software Foundation
9918
# gives unlimited permission to copy and/or distribute it,
9919
# with or without modifications, as long as this notice is preserved.
9923
# AM_MISSING_PROG(NAME, PROGRAM)
9924
# ------------------------------
9925
AC_DEFUN([AM_MISSING_PROG],
9926
[AC_REQUIRE([AM_MISSING_HAS_RUN])
9927
$1=${$1-"${am_missing_run}$2"}
9931
# AM_MISSING_HAS_RUN
9932
# ------------------
9933
# Define MISSING if not defined so far and test if it supports --run.
9934
# If it does, set am_missing_run to use it, otherwise, to nothing.
9935
AC_DEFUN([AM_MISSING_HAS_RUN],
9936
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9937
AC_REQUIRE_AUX_FILE([missing])dnl
9938
if test x"${MISSING+set}" != xset; then
9941
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
9943
MISSING="\${SHELL} $am_aux_dir/missing" ;;
9946
# Use eval to expand $SHELL
9947
if eval "$MISSING --run true"; then
9948
am_missing_run="$MISSING --run "
9951
AC_MSG_WARN([`missing' script is too old or missing])
9955
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
9957
# This file is free software; the Free Software Foundation
9958
# gives unlimited permission to copy and/or distribute it,
9959
# with or without modifications, as long as this notice is preserved.
9963
# Check for `mkdir -p'.
9964
AC_DEFUN([AM_PROG_MKDIR_P],
9965
[AC_PREREQ([2.60])dnl
9966
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
9967
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
9968
dnl while keeping a definition of mkdir_p for backward compatibility.
9969
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
9970
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
9971
dnl Makefile.ins that do not define MKDIR_P, so we do our own
9972
dnl adjustment using top_builddir (which is defined more often than
9974
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
9976
[[\\/$]]* | ?:[[\\/]]*) ;;
9977
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
9981
# Helper functions for option handling. -*- Autoconf -*-
9983
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
9985
# This file is free software; the Free Software Foundation
9986
# gives unlimited permission to copy and/or distribute it,
9987
# with or without modifications, as long as this notice is preserved.
9991
# _AM_MANGLE_OPTION(NAME)
9992
# -----------------------
9993
AC_DEFUN([_AM_MANGLE_OPTION],
9994
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9996
# _AM_SET_OPTION(NAME)
9997
# ------------------------------
9998
# Set option NAME. Presently that only means defining a flag for this option.
9999
AC_DEFUN([_AM_SET_OPTION],
10000
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
10002
# _AM_SET_OPTIONS(OPTIONS)
10003
# ----------------------------------
10004
# OPTIONS is a space-separated list of Automake options.
10005
AC_DEFUN([_AM_SET_OPTIONS],
10006
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10008
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10009
# -------------------------------------------
10010
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10011
AC_DEFUN([_AM_IF_OPTION],
10012
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10014
# Check to make sure that the build environment is sane. -*- Autoconf -*-
10016
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
10017
# Free Software Foundation, Inc.
10019
# This file is free software; the Free Software Foundation
10020
# gives unlimited permission to copy and/or distribute it,
10021
# with or without modifications, as long as this notice is preserved.
10027
AC_DEFUN([AM_SANITY_CHECK],
10028
[AC_MSG_CHECKING([whether build environment is sane])
10031
echo timestamp > conftest.file
10032
# Reject unsafe characters in $srcdir or the absolute working directory
10033
# name. Accept space and tab only in the latter.
10037
*[[\\\"\#\$\&\'\`$am_lf]]*)
10038
AC_MSG_ERROR([unsafe absolute working directory name]);;
10041
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
10042
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
10045
# Do `set' in a subshell so we don't clobber the current shell's
10046
# arguments. Must try -L first in case configure is actually a
10047
# symlink; some systems play weird games with the mod time of symlinks
10048
# (eg FreeBSD returns the mod time of the symlink's containing
10051
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10052
if test "$[*]" = "X"; then
10054
set X `ls -t "$srcdir/configure" conftest.file`
10056
rm -f conftest.file
10057
if test "$[*]" != "X $srcdir/configure conftest.file" \
10058
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
10060
# If neither matched, then we have a broken ls. This can happen
10061
# if, for instance, CONFIG_SHELL is bash and it inherits a
10062
# broken ls alias from the environment. This has actually
10063
# happened. Such a system could not be considered "sane".
10064
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
10065
alias in your environment])
10068
test "$[2]" = conftest.file
10074
AC_MSG_ERROR([newly created file is older than distributed files!
10075
Check your system clock])
10077
AC_MSG_RESULT(yes)])
10079
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
10081
# This file is free software; the Free Software Foundation
10082
# gives unlimited permission to copy and/or distribute it,
10083
# with or without modifications, as long as this notice is preserved.
10085
# AM_PROG_INSTALL_STRIP
10086
# ---------------------
10087
# One issue with vendor `install' (even GNU) is that you can't
10088
# specify the program used to strip binaries. This is especially
10089
# annoying in cross-compiling environments, where the build's strip
10090
# is unlikely to handle the host's binaries.
10091
# Fortunately install-sh will honor a STRIPPROG variable, so we
10092
# always use install-sh in `make install-strip', and initialize
10093
# STRIPPROG with the value of the STRIP variable (set by the user).
10094
AC_DEFUN([AM_PROG_INSTALL_STRIP],
10095
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10096
# Installed binaries are usually stripped using `strip' when the user
10097
# run `make install-strip'. However `strip' might not be the right
10098
# tool to use in cross-compilation environments, therefore Automake
10099
# will honor the `STRIP' environment variable to overrule this program.
10100
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
10101
if test "$cross_compiling" != no; then
10102
AC_CHECK_TOOL([STRIP], [strip], :)
10104
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10105
AC_SUBST([INSTALL_STRIP_PROGRAM])])
10107
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
10109
# This file is free software; the Free Software Foundation
10110
# gives unlimited permission to copy and/or distribute it,
10111
# with or without modifications, as long as this notice is preserved.
10115
# _AM_SUBST_NOTMAKE(VARIABLE)
10116
# ---------------------------
10117
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10118
# This macro is traced by Automake.
10119
AC_DEFUN([_AM_SUBST_NOTMAKE])
10121
# AM_SUBST_NOTMAKE(VARIABLE)
10122
# ---------------------------
10123
# Public sister of _AM_SUBST_NOTMAKE.
10124
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10126
# Check how to create a tarball. -*- Autoconf -*-
10128
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
10130
# This file is free software; the Free Software Foundation
10131
# gives unlimited permission to copy and/or distribute it,
10132
# with or without modifications, as long as this notice is preserved.
10136
# _AM_PROG_TAR(FORMAT)
10137
# --------------------
10138
# Check how to create a tarball in format FORMAT.
10139
# FORMAT should be one of `v7', `ustar', or `pax'.
10141
# Substitute a variable $(am__tar) that is a command
10142
# writing to stdout a FORMAT-tarball containing the directory
10144
# tardir=directory && $(am__tar) > result.tar
10146
# Substitute a variable $(am__untar) that extract such
10147
# a tarball read from stdin.
10148
# $(am__untar) < result.tar
10149
AC_DEFUN([_AM_PROG_TAR],
10150
[# Always define AMTAR for backward compatibility.
10151
AM_MISSING_PROG([AMTAR], [tar])
10153
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
10154
[m4_case([$1], [ustar],, [pax],,
10155
[m4_fatal([Unknown tar format])])
10156
AC_MSG_CHECKING([how to create a $1 tar archive])
10157
# Loop over all known methods to create a tar archive until one works.
10158
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10159
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
10160
# Do not fold the above two line into one, because Tru64 sh and
10161
# Solaris sh will not grok spaces in the rhs of `-'.
10162
for _am_tool in $_am_tools
10166
for _am_tar in tar gnutar gtar;
10168
AM_RUN_LOG([$_am_tar --version]) && break
10170
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10171
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10172
am__untar="$_am_tar -xf -"
10175
# Must skip GNU tar: if it does not support --format= it doesn't create
10176
# ustar tarball either.
10177
(tar --version) >/dev/null 2>&1 && continue
10178
am__tar='tar chf - "$$tardir"'
10179
am__tar_='tar chf - "$tardir"'
10180
am__untar='tar xf -'
10183
am__tar='pax -L -x $1 -w "$$tardir"'
10184
am__tar_='pax -L -x $1 -w "$tardir"'
10188
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10189
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10190
am__untar='cpio -i -H $1 -d'
10199
# If the value was cached, stop now. We just wanted to have am__tar
10200
# and am__untar set.
10201
test -n "${am_cv_prog_tar_$1}" && break
10203
# tar/untar a dummy directory, and stop if the command works
10204
rm -rf conftest.dir
10206
echo GrepMe > conftest.dir/file
10207
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10208
rm -rf conftest.dir
10209
if test -s conftest.tar; then
10210
AM_RUN_LOG([$am__untar <conftest.tar])
10211
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10214
rm -rf conftest.dir
10216
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10217
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10218
AC_SUBST([am__tar])
10219
AC_SUBST([am__untar])
10222
m4_include([acinclude.m4])