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.67],,
17
[m4_warning([this file was generated for autoconf 2.67.
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
# iconv.m4 serial 11 (gettext-0.18.1)
407
dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
408
dnl This file is free software; the Free Software Foundation
409
dnl gives unlimited permission to copy and/or distribute it,
410
dnl with or without modifications, as long as this notice is preserved.
412
dnl From Bruno Haible.
414
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
416
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
417
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
418
AC_REQUIRE([AC_LIB_RPATH])
420
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
422
AC_LIB_LINKFLAGS_BODY([iconv])
425
AC_DEFUN([AM_ICONV_LINK],
427
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
428
dnl those with the standalone portable GNU libiconv installed).
429
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
431
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
433
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
435
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
436
dnl because if the user has installed libiconv and not disabled its use
437
dnl via --without-libiconv-prefix, he wants to use it. The first
438
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
439
am_save_CPPFLAGS="$CPPFLAGS"
440
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
442
AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
443
am_cv_func_iconv="no, consider installing GNU libiconv"
445
AC_TRY_LINK([#include <stdlib.h>
447
[iconv_t cd = iconv_open("","");
448
iconv(cd,NULL,NULL,NULL,NULL);
450
[am_cv_func_iconv=yes])
451
if test "$am_cv_func_iconv" != yes; then
453
LIBS="$LIBS $LIBICONV"
454
AC_TRY_LINK([#include <stdlib.h>
456
[iconv_t cd = iconv_open("","");
457
iconv(cd,NULL,NULL,NULL,NULL);
459
[am_cv_lib_iconv=yes]
460
[am_cv_func_iconv=yes])
464
if test "$am_cv_func_iconv" = yes; then
465
AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
466
dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
468
if test $am_cv_lib_iconv = yes; then
469
LIBS="$LIBS $LIBICONV"
476
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
479
iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
480
if (cd_utf8_to_88591 != (iconv_t)(-1))
482
static const char input[] = "\342\202\254"; /* EURO SIGN */
484
const char *inptr = input;
485
size_t inbytesleft = strlen (input);
487
size_t outbytesleft = sizeof (buf);
488
size_t res = iconv (cd_utf8_to_88591,
489
(char **) &inptr, &inbytesleft,
490
&outptr, &outbytesleft);
495
/* Test against Solaris 10 bug: Failures are not distinguishable from
496
successful returns. */
498
iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
499
if (cd_ascii_to_88591 != (iconv_t)(-1))
501
static const char input[] = "\263";
503
const char *inptr = input;
504
size_t inbytesleft = strlen (input);
506
size_t outbytesleft = sizeof (buf);
507
size_t res = iconv (cd_ascii_to_88591,
508
(char **) &inptr, &inbytesleft,
509
&outptr, &outbytesleft);
514
#if 0 /* This bug could be worked around by the caller. */
515
/* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
517
iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
518
if (cd_88591_to_utf8 != (iconv_t)(-1))
520
static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
522
const char *inptr = input;
523
size_t inbytesleft = strlen (input);
525
size_t outbytesleft = sizeof (buf);
526
size_t res = iconv (cd_88591_to_utf8,
527
(char **) &inptr, &inbytesleft,
528
&outptr, &outbytesleft);
534
/* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
536
if (/* Try standardized names. */
537
iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
538
/* Try IRIX, OSF/1 names. */
539
&& iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
541
&& iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
542
/* Try HP-UX names. */
543
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
546
}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
548
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
549
*) am_cv_func_iconv_works="guessing yes" ;;
553
case "$am_cv_func_iconv_works" in
554
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
555
*) am_func_iconv=yes ;;
558
am_func_iconv=no am_cv_lib_iconv=no
560
if test "$am_func_iconv" = yes; then
561
AC_DEFINE([HAVE_ICONV], [1],
562
[Define if you have the iconv() function and it works.])
564
if test "$am_cv_lib_iconv" = yes; then
565
AC_MSG_CHECKING([how to link with libiconv])
566
AC_MSG_RESULT([$LIBICONV])
568
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
570
CPPFLAGS="$am_save_CPPFLAGS"
575
AC_SUBST([LTLIBICONV])
578
dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
579
dnl avoid warnings like
580
dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
581
dnl This is tricky because of the way 'aclocal' is implemented:
582
dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
583
dnl Otherwise aclocal's initial scan pass would miss the macro definition.
584
dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
585
dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
587
m4_define([gl_iconv_AC_DEFUN],
588
m4_version_prereq([2.64],
593
gl_iconv_AC_DEFUN([AM_ICONV],
596
if test "$am_cv_func_iconv" = yes; then
597
AC_MSG_CHECKING([for iconv declaration])
598
AC_CACHE_VAL([am_cv_proto_iconv], [
606
#if defined(__STDC__) || defined(__cplusplus)
607
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
611
], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
612
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
613
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
616
AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
617
[Define as const if the declaration of iconv() needs const.])
621
# intlmacosx.m4 serial 3 (gettext-0.18)
622
dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
623
dnl This file is free software; the Free Software Foundation
624
dnl gives unlimited permission to copy and/or distribute it,
625
dnl with or without modifications, as long as this notice is preserved.
627
dnl This file can can be used in projects which are not available under
628
dnl the GNU General Public License or the GNU Library General Public
629
dnl License but which still want to provide support for the GNU gettext
631
dnl Please note that the actual code of the GNU gettext library is covered
632
dnl by the GNU Library General Public License, and the rest of the GNU
633
dnl gettext package package is covered by the GNU General Public License.
634
dnl They are *not* in the public domain.
636
dnl Checks for special options needed on MacOS X.
637
dnl Defines INTL_MACOSX_LIBS.
638
AC_DEFUN([gt_INTL_MACOSX],
640
dnl Check for API introduced in MacOS X 10.2.
641
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
642
[gt_cv_func_CFPreferencesCopyAppValue],
643
[gt_save_LIBS="$LIBS"
644
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
645
AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
646
[CFPreferencesCopyAppValue(NULL, NULL)],
647
[gt_cv_func_CFPreferencesCopyAppValue=yes],
648
[gt_cv_func_CFPreferencesCopyAppValue=no])
649
LIBS="$gt_save_LIBS"])
650
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
651
AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
652
[Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
654
dnl Check for API introduced in MacOS X 10.3.
655
AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
656
[gt_save_LIBS="$LIBS"
657
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
658
AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
659
[gt_cv_func_CFLocaleCopyCurrent=yes],
660
[gt_cv_func_CFLocaleCopyCurrent=no])
661
LIBS="$gt_save_LIBS"])
662
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
663
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
664
[Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
667
if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
668
INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
670
AC_SUBST([INTL_MACOSX_LIBS])
674
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
675
# serial 40 IT_PROG_INTLTOOL
676
AC_DEFUN([IT_PROG_INTLTOOL], [
678
AC_REQUIRE([AM_NLS])dnl
680
case "$am__api_version" in
682
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
688
if test -n "$1"; then
689
AC_MSG_CHECKING([for intltool >= $1])
691
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
692
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
693
[INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
695
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
696
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
697
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
700
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
701
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
702
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
703
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
704
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
707
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 $< [$]@'
708
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 $< [$]@'
709
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 $< [$]@'
710
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 $< [$]@'
711
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
712
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 $< [$]@'
713
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 $< [$]@'
714
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 $< [$]@'
715
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 $< [$]@'
716
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 $< [$]@'
717
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 $< [$]@'
718
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
719
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 $< [$]@'
720
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 $< [$]@'
721
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 $< [$]@'
722
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 $< [$]@'
723
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 $< [$]@'
724
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 $< [$]@'
725
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 $< [$]@'
727
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
728
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
729
_IT_SUBST(INTLTOOL_KEYS_RULE)
730
_IT_SUBST(INTLTOOL_PROP_RULE)
731
_IT_SUBST(INTLTOOL_OAF_RULE)
732
_IT_SUBST(INTLTOOL_PONG_RULE)
733
_IT_SUBST(INTLTOOL_SERVER_RULE)
734
_IT_SUBST(INTLTOOL_SHEET_RULE)
735
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
736
_IT_SUBST(INTLTOOL_UI_RULE)
737
_IT_SUBST(INTLTOOL_XAM_RULE)
738
_IT_SUBST(INTLTOOL_KBD_RULE)
739
_IT_SUBST(INTLTOOL_XML_RULE)
740
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
741
_IT_SUBST(INTLTOOL_CAVES_RULE)
742
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
743
_IT_SUBST(INTLTOOL_THEME_RULE)
744
_IT_SUBST(INTLTOOL_SERVICE_RULE)
745
_IT_SUBST(INTLTOOL_POLICY_RULE)
747
# Check the gettext tools to make sure they are GNU
748
AC_PATH_PROG(XGETTEXT, xgettext)
749
AC_PATH_PROG(MSGMERGE, msgmerge)
750
AC_PATH_PROG(MSGFMT, msgfmt)
751
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
752
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
753
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
755
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
756
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
757
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
758
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
759
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
762
AC_PATH_PROG(INTLTOOL_PERL, perl)
763
if test -z "$INTLTOOL_PERL"; then
764
AC_MSG_ERROR([perl not found])
766
AC_MSG_CHECKING([for perl >= 5.8.1])
767
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
768
if test $? -ne 0; then
769
AC_MSG_ERROR([perl 5.8.1 is required for intltool])
771
IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
772
AC_MSG_RESULT([$IT_PERL_VERSION])
774
if test "x$2" != "xno-xml"; then
775
AC_MSG_CHECKING([for XML::Parser])
776
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
779
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
783
# Substitute ALL_LINGUAS so we can use it in po/Makefile
784
AC_SUBST(ALL_LINGUAS)
786
# Set DATADIRNAME correctly if it is not set yet
787
# (copied from glib-gettext.m4)
788
if test -z "$DATADIRNAME"; then
790
[AC_LANG_PROGRAM([[]],
791
[[extern int _nl_msg_cat_cntr;
792
return _nl_msg_cat_cntr]])],
796
dnl On Solaris, if bind_textdomain_codeset is in libc,
797
dnl GNU format message catalog is always supported,
798
dnl since both are added to the libc all together.
799
dnl Hence, we'd like to go with DATADIRNAME=share
801
AC_CHECK_FUNC(bind_textdomain_codeset,
802
[DATADIRNAME=share], [DATADIRNAME=lib])
809
AC_SUBST(DATADIRNAME)
816
# IT_PO_SUBDIR(DIRNAME)
817
# ---------------------
818
# All po subdirs have to be declared with this macro; the subdir "po" is
819
# declared by IT_PROG_INTLTOOL.
821
AC_DEFUN([IT_PO_SUBDIR],
822
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
824
dnl The following CONFIG_COMMANDS should be executed at the very end
825
dnl of config.status.
826
AC_CONFIG_COMMANDS_PRE([
827
AC_CONFIG_COMMANDS([$1/stamp-it], [
828
if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
829
AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
831
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
836
'"s|^| $ac_top_srcdir/|" \
837
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
839
[sed '/^POTFILES =/,/[^\\]$/ {
843
' "$1/Makefile.in" >"$1/Makefile"]
844
rm -f "$1/Makefile.tmp"
845
mv "$1/stamp-it.tmp" "$1/stamp-it"
850
# _IT_SUBST(VARIABLE)
851
# -------------------
852
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
854
AC_DEFUN([_IT_SUBST],
857
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
862
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
863
# A hint is needed for aclocal from Automake <= 1.9.4:
864
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
867
# lib-ld.m4 serial 4 (gettext-0.18)
868
dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
869
dnl This file is free software; the Free Software Foundation
870
dnl gives unlimited permission to copy and/or distribute it,
871
dnl with or without modifications, as long as this notice is preserved.
873
dnl Subroutines of libtool.m4,
874
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
877
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
878
AC_DEFUN([AC_LIB_PROG_LD_GNU],
879
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
880
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
881
case `$LD -v 2>&1 </dev/null` in
882
*GNU* | *'with BFD'*)
883
acl_cv_prog_gnu_ld=yes ;;
885
acl_cv_prog_gnu_ld=no ;;
887
with_gnu_ld=$acl_cv_prog_gnu_ld
890
dnl From libtool-1.4. Sets the variable LD.
891
AC_DEFUN([AC_LIB_PROG_LD],
892
[AC_ARG_WITH([gnu-ld],
893
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
894
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
895
AC_REQUIRE([AC_PROG_CC])dnl
896
AC_REQUIRE([AC_CANONICAL_HOST])dnl
897
# Prepare PATH_SEPARATOR.
898
# The user is always right.
899
if test "${PATH_SEPARATOR+set}" != set; then
900
echo "#! /bin/sh" >conf$$.sh
901
echo "exit 0" >>conf$$.sh
903
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
911
if test "$GCC" = yes; then
912
# Check if gcc -print-prog-name=ld gives a path.
913
AC_MSG_CHECKING([for ld used by GCC])
916
# gcc leaves a trailing carriage return which upsets mingw
917
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
919
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
922
# Accept absolute paths.
923
[[\\/]* | [A-Za-z]:[\\/]*)]
924
[re_direlt='/[^/][^/]*/\.\./']
925
# Canonicalize the path of ld
926
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
927
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
928
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
930
test -z "$LD" && LD="$ac_prog"
933
# If it fails, then pretend we aren't using GCC.
937
# If it is relative, then search for the first ld in PATH.
941
elif test "$with_gnu_ld" = yes; then
942
AC_MSG_CHECKING([for GNU ld])
944
AC_MSG_CHECKING([for non-GNU ld])
946
AC_CACHE_VAL([acl_cv_path_LD],
947
[if test -z "$LD"; then
948
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
949
for ac_dir in $PATH; do
950
test -z "$ac_dir" && ac_dir=.
951
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
952
acl_cv_path_LD="$ac_dir/$ac_prog"
953
# Check to see if the program is GNU ld. I'd rather use --version,
954
# but apparently some GNU ld's only accept -v.
955
# Break only if it was the GNU/non-GNU ld that we prefer.
956
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
957
*GNU* | *'with BFD'*)
958
test "$with_gnu_ld" != no && break ;;
960
test "$with_gnu_ld" != yes && break ;;
966
acl_cv_path_LD="$LD" # Let the user override the test with a path.
969
if test -n "$LD"; then
974
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
978
# lib-link.m4 serial 21 (gettext-0.18)
979
dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
980
dnl This file is free software; the Free Software Foundation
981
dnl gives unlimited permission to copy and/or distribute it,
982
dnl with or without modifications, as long as this notice is preserved.
984
dnl From Bruno Haible.
988
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
989
dnl the libraries corresponding to explicit and implicit dependencies.
990
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
991
dnl augments the CPPFLAGS variable.
992
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
993
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
994
AC_DEFUN([AC_LIB_LINKFLAGS],
996
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
997
AC_REQUIRE([AC_LIB_RPATH])
998
pushdef([Name],[translit([$1],[./-], [___])])
999
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1000
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1001
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1002
AC_LIB_LINKFLAGS_BODY([$1], [$2])
1003
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1004
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1005
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1006
ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
1008
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1009
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1010
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1011
LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
1012
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1014
AC_SUBST([LTLIB]NAME)
1015
AC_SUBST([LIB]NAME[_PREFIX])
1016
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1017
dnl results of this search when this library appears as a dependency.
1023
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
1024
dnl searches for libname and the libraries corresponding to explicit and
1025
dnl implicit dependencies, together with the specified include files and
1026
dnl the ability to compile and link the specified testcode. The missing-message
1027
dnl defaults to 'no' and may contain additional hints for the user.
1028
dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
1029
dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1030
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1031
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1032
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
1033
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1034
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1036
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1037
AC_REQUIRE([AC_LIB_RPATH])
1038
pushdef([Name],[translit([$1],[./-], [___])])
1039
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1040
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1042
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1044
AC_LIB_LINKFLAGS_BODY([$1], [$2])
1046
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1047
dnl because if the user has installed lib[]Name and not disabled its use
1048
dnl via --without-lib[]Name-prefix, he wants to use it.
1049
ac_save_CPPFLAGS="$CPPFLAGS"
1050
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1052
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1053
ac_save_LIBS="$LIBS"
1054
dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
1055
dnl because these -l options might require -L options that are present in
1056
dnl LIBS. -l options benefit only from the -L options listed before it.
1057
dnl Otherwise, add it to the front of LIBS, because it may be a static
1058
dnl library that depends on another static library that is present in LIBS.
1059
dnl Static libraries benefit only from the static libraries listed after
1061
case " $LIB[]NAME" in
1062
*" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
1063
*) LIBS="$LIB[]NAME $LIBS" ;;
1065
AC_TRY_LINK([$3], [$4],
1066
[ac_cv_lib[]Name=yes],
1067
[ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
1068
LIBS="$ac_save_LIBS"
1070
if test "$ac_cv_lib[]Name" = yes; then
1072
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
1073
AC_MSG_CHECKING([how to link with lib[]$1])
1074
AC_MSG_RESULT([$LIB[]NAME])
1077
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1078
dnl $INC[]NAME either.
1079
CPPFLAGS="$ac_save_CPPFLAGS"
1084
AC_SUBST([HAVE_LIB]NAME)
1086
AC_SUBST([LTLIB]NAME)
1087
AC_SUBST([LIB]NAME[_PREFIX])
1092
dnl Determine the platform dependent parameters needed to use rpath:
1095
dnl acl_hardcode_libdir_flag_spec,
1096
dnl acl_hardcode_libdir_separator,
1097
dnl acl_hardcode_direct,
1098
dnl acl_hardcode_minus_L.
1099
AC_DEFUN([AC_LIB_RPATH],
1101
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
1102
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
1103
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1104
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1105
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1106
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1107
AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
1108
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1109
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1115
acl_libext="$acl_cv_libext"
1116
acl_shlibext="$acl_cv_shlibext"
1117
acl_libname_spec="$acl_cv_libname_spec"
1118
acl_library_names_spec="$acl_cv_library_names_spec"
1119
acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1120
acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1121
acl_hardcode_direct="$acl_cv_hardcode_direct"
1122
acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
1123
dnl Determine whether the user wants rpath handling at all.
1124
AC_ARG_ENABLE([rpath],
1125
[ --disable-rpath do not hardcode runtime library paths],
1126
:, enable_rpath=yes)
1129
dnl AC_LIB_FROMPACKAGE(name, package)
1130
dnl declares that libname comes from the given package. The configure file
1131
dnl will then not have a --with-libname-prefix option but a
1132
dnl --with-package-prefix option. Several libraries can come from the same
1133
dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
1134
dnl macro call that searches for libname.
1135
AC_DEFUN([AC_LIB_FROMPACKAGE],
1137
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1138
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1139
define([acl_frompackage_]NAME, [$2])
1141
pushdef([PACK],[$2])
1142
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
1143
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1144
define([acl_libsinpackage_]PACKUP,
1145
m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
1150
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1151
dnl the libraries corresponding to explicit and implicit dependencies.
1152
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1153
dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
1154
dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1155
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1157
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1158
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1159
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1160
pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
1161
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
1162
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1163
pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
1164
dnl Autoconf >= 2.61 supports dots in --with options.
1165
pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
1166
dnl By default, look in $includedir and $libdir.
1168
AC_LIB_WITH_FINAL_PREFIX([
1169
eval additional_includedir=\"$includedir\"
1170
eval additional_libdir=\"$libdir\"
1172
AC_ARG_WITH(P_A_C_K[-prefix],
1173
[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
1174
--without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
1176
if test "X$withval" = "Xno"; then
1179
if test "X$withval" = "X"; then
1180
AC_LIB_WITH_FINAL_PREFIX([
1181
eval additional_includedir=\"$includedir\"
1182
eval additional_libdir=\"$libdir\"
1185
additional_includedir="$withval/include"
1186
additional_libdir="$withval/$acl_libdirstem"
1187
if test "$acl_libdirstem2" != "$acl_libdirstem" \
1188
&& ! test -d "$withval/$acl_libdirstem"; then
1189
additional_libdir="$withval/$acl_libdirstem2"
1194
dnl Search the library and its dependencies in $additional_libdir and
1195
dnl $LDFLAGS. Using breadth-first-seach.
1200
dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
1201
dnl computed. So it has to be reset here.
1205
names_already_handled=
1206
names_next_round='$1 $2'
1207
while test -n "$names_next_round"; do
1208
names_this_round="$names_next_round"
1210
for name in $names_this_round; do
1212
for n in $names_already_handled; do
1213
if test "$n" = "$name"; then
1218
if test -z "$already_handled"; then
1219
names_already_handled="$names_already_handled $name"
1220
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1221
dnl or AC_LIB_HAVE_LINKFLAGS call.
1222
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1223
eval value=\"\$HAVE_LIB$uppername\"
1224
if test -n "$value"; then
1225
if test "$value" = yes; then
1226
eval value=\"\$LIB$uppername\"
1227
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1228
eval value=\"\$LTLIB$uppername\"
1229
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1231
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1232
dnl that this library doesn't exist. So just drop it.
1236
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1237
dnl and the already constructed $LIBNAME/$LTLIBNAME.
1242
eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
1243
if test -n "$acl_shlibext"; then
1244
shrext=".$acl_shlibext" # typically: shrext=.so
1248
if test $use_additional = yes; then
1249
dir="$additional_libdir"
1250
dnl The same code as in the loop below:
1251
dnl First look for a shared library.
1252
if test -n "$acl_shlibext"; then
1253
if test -f "$dir/$libname$shrext"; then
1255
found_so="$dir/$libname$shrext"
1257
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1258
ver=`(cd "$dir" && \
1259
for f in "$libname$shrext".*; do echo "$f"; done \
1260
| sed -e "s,^$libname$shrext\\\\.,," \
1261
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1262
| sed 1q ) 2>/dev/null`
1263
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1265
found_so="$dir/$libname$shrext.$ver"
1268
eval library_names=\"$acl_library_names_spec\"
1269
for f in $library_names; do
1270
if test -f "$dir/$f"; then
1279
dnl Then look for a static library.
1280
if test "X$found_dir" = "X"; then
1281
if test -f "$dir/$libname.$acl_libext"; then
1283
found_a="$dir/$libname.$acl_libext"
1286
if test "X$found_dir" != "X"; then
1287
if test -f "$dir/$libname.la"; then
1288
found_la="$dir/$libname.la"
1292
if test "X$found_dir" = "X"; then
1293
for x in $LDFLAGS $LTLIB[]NAME; do
1294
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1297
dir=`echo "X$x" | sed -e 's/^X-L//'`
1298
dnl First look for a shared library.
1299
if test -n "$acl_shlibext"; then
1300
if test -f "$dir/$libname$shrext"; then
1302
found_so="$dir/$libname$shrext"
1304
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1305
ver=`(cd "$dir" && \
1306
for f in "$libname$shrext".*; do echo "$f"; done \
1307
| sed -e "s,^$libname$shrext\\\\.,," \
1308
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1309
| sed 1q ) 2>/dev/null`
1310
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1312
found_so="$dir/$libname$shrext.$ver"
1315
eval library_names=\"$acl_library_names_spec\"
1316
for f in $library_names; do
1317
if test -f "$dir/$f"; then
1326
dnl Then look for a static library.
1327
if test "X$found_dir" = "X"; then
1328
if test -f "$dir/$libname.$acl_libext"; then
1330
found_a="$dir/$libname.$acl_libext"
1333
if test "X$found_dir" != "X"; then
1334
if test -f "$dir/$libname.la"; then
1335
found_la="$dir/$libname.la"
1340
if test "X$found_dir" != "X"; then
1345
if test "X$found_dir" != "X"; then
1346
dnl Found the library.
1347
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1348
if test "X$found_so" != "X"; then
1349
dnl Linking with a shared library. We attempt to hardcode its
1350
dnl directory into the executable's runpath, unless it's the
1351
dnl standard /usr/lib.
1352
if test "$enable_rpath" = no \
1353
|| test "X$found_dir" = "X/usr/$acl_libdirstem" \
1354
|| test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
1355
dnl No hardcoding is needed.
1356
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1358
dnl Use an explicit option to hardcode DIR into the resulting
1360
dnl Potentially add DIR to ltrpathdirs.
1361
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1363
for x in $ltrpathdirs; do
1364
if test "X$x" = "X$found_dir"; then
1369
if test -z "$haveit"; then
1370
ltrpathdirs="$ltrpathdirs $found_dir"
1372
dnl The hardcoding into $LIBNAME is system dependent.
1373
if test "$acl_hardcode_direct" = yes; then
1374
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1375
dnl resulting binary.
1376
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1378
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1379
dnl Use an explicit option to hardcode DIR into the resulting
1381
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1382
dnl Potentially add DIR to rpathdirs.
1383
dnl The rpathdirs will be appended to $LIBNAME at the end.
1385
for x in $rpathdirs; do
1386
if test "X$x" = "X$found_dir"; then
1391
if test -z "$haveit"; then
1392
rpathdirs="$rpathdirs $found_dir"
1395
dnl Rely on "-L$found_dir".
1396
dnl But don't add it if it's already contained in the LDFLAGS
1397
dnl or the already constructed $LIBNAME
1399
for x in $LDFLAGS $LIB[]NAME; do
1400
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1401
if test "X$x" = "X-L$found_dir"; then
1406
if test -z "$haveit"; then
1407
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1409
if test "$acl_hardcode_minus_L" != no; then
1410
dnl FIXME: Not sure whether we should use
1411
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1413
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1415
dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
1416
dnl here, because this doesn't fit in flags passed to the
1417
dnl compiler. So give up. No hardcoding. This affects only
1418
dnl very old systems.
1419
dnl FIXME: Not sure whether we should use
1420
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1422
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1428
if test "X$found_a" != "X"; then
1429
dnl Linking with a static library.
1430
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1432
dnl We shouldn't come here, but anyway it's good to have a
1434
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1437
dnl Assume the include files are nearby.
1438
additional_includedir=
1439
case "$found_dir" in
1440
*/$acl_libdirstem | */$acl_libdirstem/)
1441
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1442
if test "$name" = '$1'; then
1443
LIB[]NAME[]_PREFIX="$basedir"
1445
additional_includedir="$basedir/include"
1447
*/$acl_libdirstem2 | */$acl_libdirstem2/)
1448
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
1449
if test "$name" = '$1'; then
1450
LIB[]NAME[]_PREFIX="$basedir"
1452
additional_includedir="$basedir/include"
1455
if test "X$additional_includedir" != "X"; then
1456
dnl Potentially add $additional_includedir to $INCNAME.
1457
dnl But don't add it
1458
dnl 1. if it's the standard /usr/include,
1459
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1460
dnl 3. if it's already present in $CPPFLAGS or the already
1461
dnl constructed $INCNAME,
1462
dnl 4. if it doesn't exist as a directory.
1463
if test "X$additional_includedir" != "X/usr/include"; then
1465
if test "X$additional_includedir" = "X/usr/local/include"; then
1466
if test -n "$GCC"; then
1468
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1472
if test -z "$haveit"; then
1473
for x in $CPPFLAGS $INC[]NAME; do
1474
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1475
if test "X$x" = "X-I$additional_includedir"; then
1480
if test -z "$haveit"; then
1481
if test -d "$additional_includedir"; then
1482
dnl Really add $additional_includedir to $INCNAME.
1483
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1489
dnl Look for dependencies.
1490
if test -n "$found_la"; then
1491
dnl Read the .la file. It defines the variables
1492
dnl dlname, library_names, old_library, dependency_libs, current,
1493
dnl age, revision, installed, dlopen, dlpreopen, libdir.
1494
save_libdir="$libdir"
1496
*/* | *\\*) . "$found_la" ;;
1497
*) . "./$found_la" ;;
1499
libdir="$save_libdir"
1500
dnl We use only dependency_libs.
1501
for dep in $dependency_libs; do
1504
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1505
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1506
dnl But don't add it
1507
dnl 1. if it's the standard /usr/lib,
1508
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1509
dnl 3. if it's already present in $LDFLAGS or the already
1510
dnl constructed $LIBNAME,
1511
dnl 4. if it doesn't exist as a directory.
1512
if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
1513
&& test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
1515
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
1516
|| test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
1517
if test -n "$GCC"; then
1519
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1523
if test -z "$haveit"; then
1525
for x in $LDFLAGS $LIB[]NAME; do
1526
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1527
if test "X$x" = "X-L$additional_libdir"; then
1532
if test -z "$haveit"; then
1533
if test -d "$additional_libdir"; then
1534
dnl Really add $additional_libdir to $LIBNAME.
1535
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1539
for x in $LDFLAGS $LTLIB[]NAME; do
1540
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1541
if test "X$x" = "X-L$additional_libdir"; then
1546
if test -z "$haveit"; then
1547
if test -d "$additional_libdir"; then
1548
dnl Really add $additional_libdir to $LTLIBNAME.
1549
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1556
dir=`echo "X$dep" | sed -e 's/^X-R//'`
1557
if test "$enable_rpath" != no; then
1558
dnl Potentially add DIR to rpathdirs.
1559
dnl The rpathdirs will be appended to $LIBNAME at the end.
1561
for x in $rpathdirs; do
1562
if test "X$x" = "X$dir"; then
1567
if test -z "$haveit"; then
1568
rpathdirs="$rpathdirs $dir"
1570
dnl Potentially add DIR to ltrpathdirs.
1571
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1573
for x in $ltrpathdirs; do
1574
if test "X$x" = "X$dir"; then
1579
if test -z "$haveit"; then
1580
ltrpathdirs="$ltrpathdirs $dir"
1585
dnl Handle this in the next round.
1586
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1589
dnl Handle this in the next round. Throw away the .la's
1590
dnl directory; it is already contained in a preceding -L
1592
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1595
dnl Most likely an immediate library name.
1596
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1597
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1603
dnl Didn't find the library; assume it is in the system directories
1604
dnl known to the linker and runtime loader. (All the system
1605
dnl directories known to the linker should also be known to the
1606
dnl runtime loader, otherwise the system is severely misconfigured.)
1607
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1608
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1614
if test "X$rpathdirs" != "X"; then
1615
if test -n "$acl_hardcode_libdir_separator"; then
1616
dnl Weird platform: only the last -rpath option counts, the user must
1617
dnl pass all path elements in one option. We can arrange that for a
1618
dnl single library, but not when more than one $LIBNAMEs are used.
1620
for found_dir in $rpathdirs; do
1621
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1623
dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1624
acl_save_libdir="$libdir"
1626
eval flag=\"$acl_hardcode_libdir_flag_spec\"
1627
libdir="$acl_save_libdir"
1628
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1630
dnl The -rpath options are cumulative.
1631
for found_dir in $rpathdirs; do
1632
acl_save_libdir="$libdir"
1634
eval flag=\"$acl_hardcode_libdir_flag_spec\"
1635
libdir="$acl_save_libdir"
1636
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1640
if test "X$ltrpathdirs" != "X"; then
1641
dnl When using libtool, the option that works for both libraries and
1642
dnl executables is -R. The -R options are cumulative.
1643
for found_dir in $ltrpathdirs; do
1644
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1654
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1655
dnl unless already present in VAR.
1656
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1657
dnl contains two or three consecutive elements that belong together.
1658
AC_DEFUN([AC_LIB_APPENDTOVAR],
1660
for element in [$2]; do
1663
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1664
if test "X$x" = "X$element"; then
1669
if test -z "$haveit"; then
1670
[$1]="${[$1]}${[$1]:+ }$element"
1675
dnl For those cases where a variable contains several -L and -l options
1676
dnl referring to unknown libraries and directories, this macro determines the
1677
dnl necessary additional linker options for the runtime path.
1678
dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1679
dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1680
dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1681
dnl otherwise linking without libtool is assumed.
1682
AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1684
AC_REQUIRE([AC_LIB_RPATH])
1685
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1687
if test "$enable_rpath" != no; then
1688
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1689
dnl Use an explicit option to hardcode directories into the resulting
1694
if test -n "$next"; then
1696
dnl No need to hardcode the standard /usr/lib.
1697
if test "X$dir" != "X/usr/$acl_libdirstem" \
1698
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
1699
rpathdirs="$rpathdirs $dir"
1705
-L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1706
dnl No need to hardcode the standard /usr/lib.
1707
if test "X$dir" != "X/usr/$acl_libdirstem" \
1708
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
1709
rpathdirs="$rpathdirs $dir"
1716
if test "X$rpathdirs" != "X"; then
1717
if test -n ""$3""; then
1718
dnl libtool is used for linking. Use -R options.
1719
for dir in $rpathdirs; do
1720
$1="${$1}${$1:+ }-R$dir"
1723
dnl The linker is used for linking directly.
1724
if test -n "$acl_hardcode_libdir_separator"; then
1725
dnl Weird platform: only the last -rpath option counts, the user
1726
dnl must pass all path elements in one option.
1728
for dir in $rpathdirs; do
1729
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1731
acl_save_libdir="$libdir"
1733
eval flag=\"$acl_hardcode_libdir_flag_spec\"
1734
libdir="$acl_save_libdir"
1737
dnl The -rpath options are cumulative.
1738
for dir in $rpathdirs; do
1739
acl_save_libdir="$libdir"
1741
eval flag=\"$acl_hardcode_libdir_flag_spec\"
1742
libdir="$acl_save_libdir"
1743
$1="${$1}${$1:+ }$flag"
1753
# lib-prefix.m4 serial 7 (gettext-0.18)
1754
dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
1755
dnl This file is free software; the Free Software Foundation
1756
dnl gives unlimited permission to copy and/or distribute it,
1757
dnl with or without modifications, as long as this notice is preserved.
1759
dnl From Bruno Haible.
1761
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1762
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1763
dnl require excessive bracketing.
1764
ifdef([AC_HELP_STRING],
1765
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1766
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1768
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1769
dnl to access previously installed libraries. The basic assumption is that
1770
dnl a user will want packages to use other packages he previously installed
1771
dnl with the same --prefix option.
1772
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1773
dnl libraries, but is otherwise very convenient.
1774
AC_DEFUN([AC_LIB_PREFIX],
1776
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1777
AC_REQUIRE([AC_PROG_CC])
1778
AC_REQUIRE([AC_CANONICAL_HOST])
1779
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1780
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1781
dnl By default, look in $includedir and $libdir.
1783
AC_LIB_WITH_FINAL_PREFIX([
1784
eval additional_includedir=\"$includedir\"
1785
eval additional_libdir=\"$libdir\"
1787
AC_LIB_ARG_WITH([lib-prefix],
1788
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1789
--without-lib-prefix don't search for libraries in includedir and libdir],
1791
if test "X$withval" = "Xno"; then
1794
if test "X$withval" = "X"; then
1795
AC_LIB_WITH_FINAL_PREFIX([
1796
eval additional_includedir=\"$includedir\"
1797
eval additional_libdir=\"$libdir\"
1800
additional_includedir="$withval/include"
1801
additional_libdir="$withval/$acl_libdirstem"
1805
if test $use_additional = yes; then
1806
dnl Potentially add $additional_includedir to $CPPFLAGS.
1807
dnl But don't add it
1808
dnl 1. if it's the standard /usr/include,
1809
dnl 2. if it's already present in $CPPFLAGS,
1810
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1811
dnl 4. if it doesn't exist as a directory.
1812
if test "X$additional_includedir" != "X/usr/include"; then
1814
for x in $CPPFLAGS; do
1815
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1816
if test "X$x" = "X-I$additional_includedir"; then
1821
if test -z "$haveit"; then
1822
if test "X$additional_includedir" = "X/usr/local/include"; then
1823
if test -n "$GCC"; then
1825
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1829
if test -z "$haveit"; then
1830
if test -d "$additional_includedir"; then
1831
dnl Really add $additional_includedir to $CPPFLAGS.
1832
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1837
dnl Potentially add $additional_libdir to $LDFLAGS.
1838
dnl But don't add it
1839
dnl 1. if it's the standard /usr/lib,
1840
dnl 2. if it's already present in $LDFLAGS,
1841
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1842
dnl 4. if it doesn't exist as a directory.
1843
if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1845
for x in $LDFLAGS; do
1846
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1847
if test "X$x" = "X-L$additional_libdir"; then
1852
if test -z "$haveit"; then
1853
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1854
if test -n "$GCC"; then
1856
linux*) haveit=yes;;
1860
if test -z "$haveit"; then
1861
if test -d "$additional_libdir"; then
1862
dnl Really add $additional_libdir to $LDFLAGS.
1863
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1871
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1872
dnl acl_final_exec_prefix, containing the values to which $prefix and
1873
dnl $exec_prefix will expand at the end of the configure script.
1874
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1876
dnl Unfortunately, prefix and exec_prefix get only finally determined
1877
dnl at the end of configure.
1878
if test "X$prefix" = "XNONE"; then
1879
acl_final_prefix="$ac_default_prefix"
1881
acl_final_prefix="$prefix"
1883
if test "X$exec_prefix" = "XNONE"; then
1884
acl_final_exec_prefix='${prefix}'
1886
acl_final_exec_prefix="$exec_prefix"
1888
acl_save_prefix="$prefix"
1889
prefix="$acl_final_prefix"
1890
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1891
prefix="$acl_save_prefix"
1894
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1895
dnl variables prefix and exec_prefix bound to the values they will have
1896
dnl at the end of the configure script.
1897
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1899
acl_save_prefix="$prefix"
1900
prefix="$acl_final_prefix"
1901
acl_save_exec_prefix="$exec_prefix"
1902
exec_prefix="$acl_final_exec_prefix"
1904
exec_prefix="$acl_save_exec_prefix"
1905
prefix="$acl_save_prefix"
1908
dnl AC_LIB_PREPARE_MULTILIB creates
1909
dnl - a variable acl_libdirstem, containing the basename of the libdir, either
1910
dnl "lib" or "lib64" or "lib/64",
1911
dnl - a variable acl_libdirstem2, as a secondary possible value for
1912
dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
1914
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1916
dnl There is no formal standard regarding lib and lib64.
1917
dnl On glibc systems, the current practice is that on a system supporting
1918
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1919
dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
1920
dnl the compiler's default mode by looking at the compiler's library search
1921
dnl path. If at least one of its elements ends in /lib64 or points to a
1922
dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
1923
dnl Otherwise we use the default, namely "lib".
1924
dnl On Solaris systems, the current practice is that on a system supporting
1925
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1926
dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
1927
dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
1928
AC_REQUIRE([AC_CANONICAL_HOST])
1933
dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
1934
dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
1935
dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
1936
dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
1937
dnl symlink is missing, so we set acl_libdirstem2 too.
1938
AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
1939
[AC_EGREP_CPP([sixtyfour bits], [
1943
], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
1945
if test $gl_cv_solaris_64bit = yes; then
1946
acl_libdirstem=lib/64
1948
sparc*) acl_libdirstem2=lib/sparcv9 ;;
1949
i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
1954
searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1955
if test -n "$searchpath"; then
1956
acl_save_IFS="${IFS= }"; IFS=":"
1957
for searchdir in $searchpath; do
1958
if test -d "$searchdir"; then
1959
case "$searchdir" in
1960
*/lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1962
# Better ignore directories of this form. They are misleading.
1964
*) searchdir=`cd "$searchdir" && pwd`
1965
case "$searchdir" in
1966
*/lib64 ) acl_libdirstem=lib64 ;;
1975
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
1978
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1980
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1981
# 2006, 2007, 2008 Free Software Foundation, Inc.
1982
# Written by Gordon Matzigkeit, 1996
1984
# This file is free software; the Free Software Foundation gives
1985
# unlimited permission to copy and/or distribute it, with or without
1986
# modifications, as long as this notice is preserved.
1988
m4_define([_LT_COPYING], [dnl
1989
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1990
# 2006, 2007, 2008 Free Software Foundation, Inc.
1991
# Written by Gordon Matzigkeit, 1996
1993
# This file is part of GNU Libtool.
1995
# GNU Libtool is free software; you can redistribute it and/or
1996
# modify it under the terms of the GNU General Public License as
1997
# published by the Free Software Foundation; either version 2 of
1998
# the License, or (at your option) any later version.
2000
# As a special exception to the GNU General Public License,
2001
# if you distribute this file as part of a program or library that
2002
# is built using GNU Libtool, you may include this file under the
2003
# same distribution terms that you use for the rest of that program.
2005
# GNU Libtool is distributed in the hope that it will be useful,
2006
# but WITHOUT ANY WARRANTY; without even the implied warranty of
2007
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2008
# GNU General Public License for more details.
2010
# You should have received a copy of the GNU General Public License
2011
# along with GNU Libtool; see the file COPYING. If not, a copy
2012
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
2013
# obtained by writing to the Free Software Foundation, Inc.,
2014
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2020
# LT_PREREQ(VERSION)
2021
# ------------------
2022
# Complain and exit if this libtool version is less that VERSION.
2023
m4_defun([LT_PREREQ],
2024
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
2026
[m4_fatal([Libtool version $1 or higher is required],
2031
# _LT_CHECK_BUILDDIR
2032
# ------------------
2033
# Complain if the absolute build directory name contains unusual characters
2034
m4_defun([_LT_CHECK_BUILDDIR],
2037
AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
2042
# LT_INIT([OPTIONS])
2043
# ------------------
2045
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
2046
AC_BEFORE([$0], [LT_LANG])dnl
2047
AC_BEFORE([$0], [LT_OUTPUT])dnl
2048
AC_BEFORE([$0], [LTDL_INIT])dnl
2049
m4_require([_LT_CHECK_BUILDDIR])dnl
2051
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
2052
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
2053
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
2054
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
2055
dnl unless we require an AC_DEFUNed macro:
2056
AC_REQUIRE([LTOPTIONS_VERSION])dnl
2057
AC_REQUIRE([LTSUGAR_VERSION])dnl
2058
AC_REQUIRE([LTVERSION_VERSION])dnl
2059
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
2060
m4_require([_LT_PROG_LTMAIN])dnl
2063
_LT_SET_OPTIONS([$0], [$1])
2065
# This can be used to rebuild libtool when needed
2066
LIBTOOL_DEPS="$ltmain"
2068
# Always use our own libtool.
2069
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2070
AC_SUBST(LIBTOOL)dnl
2075
m4_define([LT_INIT])
2079
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
2080
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
2081
dnl aclocal-1.4 backwards compatibility:
2082
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
2083
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
2086
# _LT_CC_BASENAME(CC)
2087
# -------------------
2088
# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
2089
m4_defun([_LT_CC_BASENAME],
2090
[for cc_temp in $1""; do
2092
compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
2093
distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
2098
cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
2102
# _LT_FILEUTILS_DEFAULTS
2103
# ----------------------
2104
# It is okay to use these file commands and assume they have been set
2105
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
2106
m4_defun([_LT_FILEUTILS_DEFAULTS],
2110
])# _LT_FILEUTILS_DEFAULTS
2115
m4_defun([_LT_SETUP],
2116
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2117
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2118
_LT_DECL([], [host_alias], [0], [The host system])dnl
2119
_LT_DECL([], [host], [0])dnl
2120
_LT_DECL([], [host_os], [0])dnl
2122
_LT_DECL([], [build_alias], [0], [The build system])dnl
2123
_LT_DECL([], [build], [0])dnl
2124
_LT_DECL([], [build_os], [0])dnl
2126
AC_REQUIRE([AC_PROG_CC])dnl
2127
AC_REQUIRE([LT_PATH_LD])dnl
2128
AC_REQUIRE([LT_PATH_NM])dnl
2130
AC_REQUIRE([AC_PROG_LN_S])dnl
2131
test -z "$LN_S" && LN_S="ln -s"
2132
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
2134
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
2135
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
2136
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
2138
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2139
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2140
m4_require([_LT_CMD_RELOAD])dnl
2141
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
2142
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
2143
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
2145
_LT_CONFIG_LIBTOOL_INIT([
2146
# See if we are running on zsh, and set the options which allow our
2147
# commands through without removal of \ escapes INIT.
2148
if test -n "\${ZSH_VERSION+set}" ; then
2149
setopt NO_GLOB_SUBST
2152
if test -n "${ZSH_VERSION+set}" ; then
2153
setopt NO_GLOB_SUBST
2158
m4_require([_LT_TAG_COMPILER])dnl
2159
_LT_PROG_ECHO_BACKSLASH
2163
# AIX sometimes has problems with the GCC collect2 program. For some
2164
# reason, if we set the COLLECT_NAMES environment variable, the problems
2165
# vanish in a puff of smoke.
2166
if test "X${COLLECT_NAMES+set}" != Xset; then
2168
export COLLECT_NAMES
2173
# Sed substitution that helps us do robust quoting. It backslashifies
2174
# metacharacters that are still active within double-quoted strings.
2175
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2177
# Same as above, but do not quote variable references.
2178
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
2180
# Sed substitution to delay expansion of an escaped shell variable in a
2181
# double_quote_subst'ed string.
2182
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2184
# Sed substitution to delay expansion of an escaped single quote.
2185
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2187
# Sed substitution to avoid accidental globbing in evaled expressions
2188
no_glob_subst='s/\*/\\\*/g'
2192
can_build_shared=yes
2194
# All known linkers require a `.a' archive for static linking (except MSVC,
2195
# which needs '.lib').
2198
with_gnu_ld="$lt_cv_prog_gnu_ld"
2201
old_CFLAGS="$CFLAGS"
2203
# Set sane defaults for various variables
2204
test -z "$CC" && CC=cc
2205
test -z "$LTCC" && LTCC=$CC
2206
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2207
test -z "$LD" && LD=ld
2208
test -z "$ac_objext" && ac_objext=o
2210
_LT_CC_BASENAME([$compiler])
2212
# Only perform the check for file, if the check method requires it
2213
test -z "$MAGIC_CMD" && MAGIC_CMD=file
2214
case $deplibs_check_method in
2216
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2222
# Use C for the default configuration in the libtool script
2223
LT_SUPPORTED_TAG([CC])
2225
_LT_LANG_DEFAULT_CONFIG
2232
# Note that this code is called both from `configure', and `config.status'
2233
# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
2234
# `config.status' has no value for ac_aux_dir unless we are using Automake,
2235
# so we pass a copy along to make sure it has a sensible value anyway.
2236
m4_defun([_LT_PROG_LTMAIN],
2237
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2238
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2239
ltmain="$ac_aux_dir/ltmain.sh"
2244
# So that we can recreate a full libtool script including additional
2245
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2246
# in macros and then make a single call at the end using the `libtool'
2250
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2251
# ----------------------------------------
2252
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2253
m4_define([_LT_CONFIG_LIBTOOL_INIT],
2255
[m4_append([_LT_OUTPUT_LIBTOOL_INIT],
2260
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
2263
# _LT_CONFIG_LIBTOOL([COMMANDS])
2264
# ------------------------------
2265
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2266
m4_define([_LT_CONFIG_LIBTOOL],
2268
[m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
2273
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
2276
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
2277
# -----------------------------------------------------
2278
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
2279
[_LT_CONFIG_LIBTOOL([$1])
2280
_LT_CONFIG_LIBTOOL_INIT([$2])
2284
# _LT_FORMAT_COMMENT([COMMENT])
2285
# -----------------------------
2286
# Add leading comment marks to the start of each line, and a trailing
2287
# full-stop to the whole comment if one is not present already.
2288
m4_define([_LT_FORMAT_COMMENT],
2290
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
2291
[['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
2298
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
2299
# -------------------------------------------------------------------
2300
# CONFIGNAME is the name given to the value in the libtool script.
2301
# VARNAME is the (base) name used in the configure script.
2302
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
2303
# VARNAME. Any other value will be used directly.
2304
m4_define([_LT_DECL],
2305
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
2306
[lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
2307
[m4_ifval([$1], [$1], [$2])])
2308
lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
2310
[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
2311
lt_dict_add_subkey([lt_decl_dict], [$2],
2312
[tagged?], [m4_ifval([$5], [yes], [no])])])
2316
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
2317
# --------------------------------------------------------
2318
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
2321
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
2322
# ------------------------------------------------
2323
m4_define([lt_decl_tag_varnames],
2324
[_lt_decl_filter([tagged?], [yes], $@)])
2327
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
2328
# ---------------------------------------------------------
2329
m4_define([_lt_decl_filter],
2331
[0], [m4_fatal([$0: too few arguments: $#])],
2332
[1], [m4_fatal([$0: too few arguments: $#: $1])],
2333
[2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2334
[3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2335
[lt_dict_filter([lt_decl_dict], $@)])[]dnl
2339
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2340
# --------------------------------------------------
2341
m4_define([lt_decl_quote_varnames],
2342
[_lt_decl_filter([value], [1], $@)])
2345
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2346
# ---------------------------------------------------
2347
m4_define([lt_decl_dquote_varnames],
2348
[_lt_decl_filter([value], [2], $@)])
2351
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2352
# ---------------------------------------------------
2353
m4_define([lt_decl_varnames_tagged],
2354
[m4_assert([$# <= 2])dnl
2355
_$0(m4_quote(m4_default([$1], [[, ]])),
2356
m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2357
m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2358
m4_define([_lt_decl_varnames_tagged],
2359
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2362
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2363
# ------------------------------------------------
2364
m4_define([lt_decl_all_varnames],
2365
[_$0(m4_quote(m4_default([$1], [[, ]])),
2367
m4_quote(lt_decl_varnames),
2368
m4_quote(m4_shift($@))))[]dnl
2370
m4_define([_lt_decl_all_varnames],
2371
[lt_join($@, lt_decl_varnames_tagged([$1],
2372
lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2376
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
2377
# ------------------------------------
2378
# Quote a variable value, and forward it to `config.status' so that its
2379
# declaration there will have the same value as in `configure'. VARNAME
2380
# must have a single quote delimited value for this to work.
2381
m4_define([_LT_CONFIG_STATUS_DECLARE],
2382
[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
2385
# _LT_CONFIG_STATUS_DECLARATIONS
2386
# ------------------------------
2387
# We delimit libtool config variables with single quotes, so when
2388
# we write them to config.status, we have to be sure to quote all
2389
# embedded single quotes properly. In configure, this macro expands
2390
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2392
# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
2393
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2394
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2395
[m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2400
# Output comment and list of tags supported by the script
2401
m4_defun([_LT_LIBTOOL_TAGS],
2402
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2403
available_tags="_LT_TAGS"dnl
2407
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2408
# -----------------------------------
2409
# Extract the dictionary values for VARNAME (optionally with TAG) and
2410
# expand to a commented shell variable setting:
2412
# # Some comment about what VAR is for.
2413
# visible_name=$lt_internal_name
2414
m4_define([_LT_LIBTOOL_DECLARE],
2415
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2416
[description])))[]dnl
2417
m4_pushdef([_libtool_name],
2418
m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2419
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2420
[0], [_libtool_name=[$]$1],
2421
[1], [_libtool_name=$lt_[]$1],
2422
[2], [_libtool_name=$lt_[]$1],
2423
[_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2424
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2428
# _LT_LIBTOOL_CONFIG_VARS
2429
# -----------------------
2430
# Produce commented declarations of non-tagged libtool config variables
2431
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
2432
# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
2433
# section) are produced by _LT_LIBTOOL_TAG_VARS.
2434
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2435
[m4_foreach([_lt_var],
2436
m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2437
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2440
# _LT_LIBTOOL_TAG_VARS(TAG)
2441
# -------------------------
2442
m4_define([_LT_LIBTOOL_TAG_VARS],
2443
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2444
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2447
# _LT_TAGVAR(VARNAME, [TAGNAME])
2448
# ------------------------------
2449
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2452
# _LT_CONFIG_COMMANDS
2453
# -------------------
2454
# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
2455
# variables for single and double quote escaping we saved from calls
2456
# to _LT_DECL, we can put quote escaped variables declarations
2457
# into `config.status', and then the shell code to quote escape them in
2458
# for loops in `config.status'. Finally, any additional code accumulated
2459
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2460
m4_defun([_LT_CONFIG_COMMANDS],
2461
[AC_PROVIDE_IFELSE([LT_OUTPUT],
2462
dnl If the libtool generation code has been placed in $CONFIG_LT,
2463
dnl instead of duplicating it all over again into config.status,
2464
dnl then we will have config.status run $CONFIG_LT later, so it
2465
dnl needs to know what name is stored there:
2466
[AC_CONFIG_COMMANDS([libtool],
2467
[$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2468
dnl If the libtool generation code is destined for config.status,
2469
dnl expand the accumulated commands and init code now:
2470
[AC_CONFIG_COMMANDS([libtool],
2471
[_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2472
])#_LT_CONFIG_COMMANDS
2476
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2479
# The HP-UX ksh and POSIX shell print the target directory to stdout
2481
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2483
sed_quote_subst='$sed_quote_subst'
2484
double_quote_subst='$double_quote_subst'
2485
delay_variable_subst='$delay_variable_subst'
2486
_LT_CONFIG_STATUS_DECLARATIONS
2488
LTCFLAGS='$LTCFLAGS'
2489
compiler='$compiler_DEFAULT'
2491
# Quote evaled strings.
2492
for var in lt_decl_all_varnames([[ \
2493
]], lt_decl_quote_varnames); do
2494
case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2495
*[[\\\\\\\`\\"\\\$]]*)
2496
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
2499
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2504
# Double-quote double-evaled strings.
2505
for var in lt_decl_all_varnames([[ \
2506
]], lt_decl_dquote_varnames); do
2507
case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2508
*[[\\\\\\\`\\"\\\$]]*)
2509
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
2512
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2517
# Fix-up fallback echo if it was mangled by the above quoting rules.
2519
*'\\\[$]0 --fallback-echo"')dnl "
2520
lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
2524
_LT_OUTPUT_LIBTOOL_INIT
2530
# This macro allows early generation of the libtool script (before
2531
# AC_OUTPUT is called), incase it is used in configure for compilation
2533
AC_DEFUN([LT_OUTPUT],
2534
[: ${CONFIG_LT=./config.lt}
2535
AC_MSG_NOTICE([creating $CONFIG_LT])
2536
cat >"$CONFIG_LT" <<_LTEOF
2538
# Generated by $as_me.
2539
# Run this file to recreate a libtool stub with the current configuration.
2542
SHELL=\${CONFIG_SHELL-$SHELL}
2545
cat >>"$CONFIG_LT" <<\_LTEOF
2549
exec AS_MESSAGE_FD>&1
2550
exec AS_MESSAGE_LOG_FD>>config.log
2553
AS_BOX([Running $as_me.])
2554
} >&AS_MESSAGE_LOG_FD
2557
\`$as_me' creates a local libtool stub from the current configuration,
2558
for use in further configure time tests before the real libtool is
2561
Usage: $[0] [[OPTIONS]]
2563
-h, --help print this help, then exit
2564
-V, --version print version number, then exit
2565
-q, --quiet do not print progress messages
2566
-d, --debug don't remove temporary files
2568
Report bugs to <bug-libtool@gnu.org>."
2571
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2572
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2573
configured by $[0], generated by m4_PACKAGE_STRING.
2575
Copyright (C) 2008 Free Software Foundation, Inc.
2576
This config.lt script is free software; the Free Software Foundation
2577
gives unlimited permision to copy, distribute and modify it."
2579
while test $[#] != 0
2582
--version | --v* | -V )
2583
echo "$lt_cl_version"; exit 0 ;;
2584
--help | --h* | -h )
2585
echo "$lt_cl_help"; exit 0 ;;
2586
--debug | --d* | -d )
2588
--quiet | --q* | --silent | --s* | -q )
2591
-*) AC_MSG_ERROR([unrecognized option: $[1]
2592
Try \`$[0] --help' for more information.]) ;;
2594
*) AC_MSG_ERROR([unrecognized argument: $[1]
2595
Try \`$[0] --help' for more information.]) ;;
2600
if $lt_cl_silent; then
2601
exec AS_MESSAGE_FD>/dev/null
2605
cat >>"$CONFIG_LT" <<_LTEOF
2606
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
2609
cat >>"$CONFIG_LT" <<\_LTEOF
2610
AC_MSG_NOTICE([creating $ofile])
2611
_LT_OUTPUT_LIBTOOL_COMMANDS
2614
chmod +x "$CONFIG_LT"
2616
# configure is writing to config.log, but config.lt does its own redirection,
2617
# appending to config.log, which fails on DOS, as config.log is still kept
2618
# open by configure. Here we exec the FD to /dev/null, effectively closing
2619
# config.log, so it can be properly (re)opened and appended to by config.lt.
2620
if test "$no_create" != yes; then
2622
test "$silent" = yes &&
2623
lt_config_lt_args="$lt_config_lt_args --quiet"
2624
exec AS_MESSAGE_LOG_FD>/dev/null
2625
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
2626
exec AS_MESSAGE_LOG_FD>>config.log
2627
$lt_cl_success || AS_EXIT(1)
2634
# If TAG is the built-in tag, create an initial libtool script with a
2635
# default configuration from the untagged config vars. Otherwise add code
2636
# to config.status for appending the configuration named by TAG from the
2637
# matching tagged config vars.
2638
m4_defun([_LT_CONFIG],
2639
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2640
_LT_CONFIG_SAVE_COMMANDS([
2641
m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2642
m4_if(_LT_TAG, [C], [
2643
# See if we are running on zsh, and set the options which allow our
2644
# commands through without removal of \ escapes.
2645
if test -n "${ZSH_VERSION+set}" ; then
2646
setopt NO_GLOB_SUBST
2650
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2653
cat <<_LT_EOF >> "$cfgfile"
2656
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2657
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
2658
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2659
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
2664
# ### BEGIN LIBTOOL CONFIG
2665
_LT_LIBTOOL_CONFIG_VARS
2666
_LT_LIBTOOL_TAG_VARS
2667
# ### END LIBTOOL CONFIG
2673
cat <<\_LT_EOF >> "$cfgfile"
2674
# AIX sometimes has problems with the GCC collect2 program. For some
2675
# reason, if we set the COLLECT_NAMES environment variable, the problems
2676
# vanish in a puff of smoke.
2677
if test "X${COLLECT_NAMES+set}" != Xset; then
2679
export COLLECT_NAMES
2687
# We use sed instead of cat because bash on DJGPP gets confused if
2688
# if finds mixed CR/LF and LF-only lines. Since sed operates in
2689
# text mode, it properly converts lines to CR/LF. This bash problem
2690
# is reportedly fixed, but why not run on old versions too?
2691
sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
2692
|| (rm -f "$cfgfile"; exit 1)
2694
_LT_PROG_XSI_SHELLFNS
2696
sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
2697
|| (rm -f "$cfgfile"; exit 1)
2699
mv -f "$cfgfile" "$ofile" ||
2700
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2703
[cat <<_LT_EOF >> "$ofile"
2705
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2706
dnl in a comment (ie after a #).
2707
# ### BEGIN LIBTOOL TAG CONFIG: $1
2708
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
2709
# ### END LIBTOOL TAG CONFIG: $1
2716
TIMESTAMP='$TIMESTAMP'
2718
ofile='$ofile'], [])
2719
])dnl /_LT_CONFIG_SAVE_COMMANDS
2723
# LT_SUPPORTED_TAG(TAG)
2724
# ---------------------
2725
# Trace this macro to discover what tags are supported by the libtool
2726
# --tag option, using:
2727
# autoconf --trace 'LT_SUPPORTED_TAG:$1'
2728
AC_DEFUN([LT_SUPPORTED_TAG], [])
2731
# C support is built-in for now
2732
m4_define([_LT_LANG_C_enabled], [])
2733
m4_define([_LT_TAGS], [])
2738
# Enable libtool support for the given language if not already enabled.
2740
[AC_BEFORE([$0], [LT_OUTPUT])dnl
2743
[C++], [_LT_LANG(CXX)],
2744
[Java], [_LT_LANG(GCJ)],
2745
[Fortran 77], [_LT_LANG(F77)],
2746
[Fortran], [_LT_LANG(FC)],
2747
[Windows Resource], [_LT_LANG(RC)],
2748
[m4_ifdef([_LT_LANG_]$1[_CONFIG],
2750
[m4_fatal([$0: unsupported language: "$1"])])])dnl
2754
# _LT_LANG(LANGNAME)
2755
# ------------------
2756
m4_defun([_LT_LANG],
2757
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
2758
[LT_SUPPORTED_TAG([$1])dnl
2759
m4_append([_LT_TAGS], [$1 ])dnl
2760
m4_define([_LT_LANG_]$1[_enabled], [])dnl
2761
_LT_LANG_$1_CONFIG($1)])dnl
2765
# _LT_LANG_DEFAULT_CONFIG
2766
# -----------------------
2767
m4_defun([_LT_LANG_DEFAULT_CONFIG],
2768
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
2770
[m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2772
AC_PROVIDE_IFELSE([AC_PROG_F77],
2774
[m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2776
AC_PROVIDE_IFELSE([AC_PROG_FC],
2778
[m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2780
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2781
dnl pulling things in needlessly.
2782
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2784
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2786
[AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2788
[m4_ifdef([AC_PROG_GCJ],
2789
[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2790
m4_ifdef([A][M_PROG_GCJ],
2791
[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2792
m4_ifdef([LT_PROG_GCJ],
2793
[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2795
AC_PROVIDE_IFELSE([LT_PROG_RC],
2797
[m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2798
])# _LT_LANG_DEFAULT_CONFIG
2801
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2802
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2803
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2804
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2805
dnl aclocal-1.4 backwards compatibility:
2806
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2807
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2808
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2809
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2814
m4_defun([_LT_TAG_COMPILER],
2815
[AC_REQUIRE([AC_PROG_CC])dnl
2817
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2818
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2819
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2820
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2822
# If no C compiler was specified, use CC.
2825
# If no C compiler flags were specified, use CFLAGS.
2826
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2828
# Allow CC to be a program name with arguments.
2830
])# _LT_TAG_COMPILER
2833
# _LT_COMPILER_BOILERPLATE
2834
# ------------------------
2835
# Check for compiler boilerplate output or warnings with
2836
# the simple compiler test code.
2837
m4_defun([_LT_COMPILER_BOILERPLATE],
2838
[m4_require([_LT_DECL_SED])dnl
2839
ac_outfile=conftest.$ac_objext
2840
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2841
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2842
_lt_compiler_boilerplate=`cat conftest.err`
2844
])# _LT_COMPILER_BOILERPLATE
2847
# _LT_LINKER_BOILERPLATE
2848
# ----------------------
2849
# Check for linker boilerplate output or warnings with
2850
# the simple link test code.
2851
m4_defun([_LT_LINKER_BOILERPLATE],
2852
[m4_require([_LT_DECL_SED])dnl
2853
ac_outfile=conftest.$ac_objext
2854
echo "$lt_simple_link_test_code" >conftest.$ac_ext
2855
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2856
_lt_linker_boilerplate=`cat conftest.err`
2858
])# _LT_LINKER_BOILERPLATE
2860
# _LT_REQUIRED_DARWIN_CHECKS
2861
# -------------------------
2862
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2864
rhapsody* | darwin*)
2865
AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2866
AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2867
AC_CHECK_TOOL([LIPO], [lipo], [:])
2868
AC_CHECK_TOOL([OTOOL], [otool], [:])
2869
AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2870
_LT_DECL([], [DSYMUTIL], [1],
2871
[Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2872
_LT_DECL([], [NMEDIT], [1],
2873
[Tool to change global to local symbols on Mac OS X])
2874
_LT_DECL([], [LIPO], [1],
2875
[Tool to manipulate fat objects and archives on Mac OS X])
2876
_LT_DECL([], [OTOOL], [1],
2877
[ldd/readelf like tool for Mach-O binaries on Mac OS X])
2878
_LT_DECL([], [OTOOL64], [1],
2879
[ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2881
AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2882
[lt_cv_apple_cc_single_mod=no
2883
if test -z "${LT_MULTI_MODULE}"; then
2884
# By default we will add the -single_module flag. You can override
2885
# by either setting the environment variable LT_MULTI_MODULE
2886
# non-empty at configure time, or by adding -multi_module to the
2888
rm -rf libconftest.dylib*
2889
echo "int foo(void){return 1;}" > conftest.c
2890
echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2891
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2892
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2893
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2895
if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
2896
lt_cv_apple_cc_single_mod=yes
2898
cat conftest.err >&AS_MESSAGE_LOG_FD
2900
rm -rf libconftest.dylib*
2903
AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2904
[lt_cv_ld_exported_symbols_list],
2905
[lt_cv_ld_exported_symbols_list=no
2906
save_LDFLAGS=$LDFLAGS
2907
echo "_main" > conftest.sym
2908
LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2909
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2910
[lt_cv_ld_exported_symbols_list=yes],
2911
[lt_cv_ld_exported_symbols_list=no])
2912
LDFLAGS="$save_LDFLAGS"
2915
rhapsody* | darwin1.[[012]])
2916
_lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2918
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2919
darwin*) # darwin 5.x on
2920
# if running on 10.5 or later, the deployment target defaults
2921
# to the OS version, if on x86, and 10.4, the deployment
2922
# target defaults to 10.4. Don't you love it?
2923
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2924
10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2925
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2927
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2929
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2933
if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2934
_lt_dar_single_mod='$single_module'
2936
if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2937
_lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2939
_lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2941
if test "$DSYMUTIL" != ":"; then
2942
_lt_dsymutil='~$DSYMUTIL $lib || :'
2951
# _LT_DARWIN_LINKER_FEATURES
2952
# --------------------------
2953
# Checks for linker and compiler features on darwin
2954
m4_defun([_LT_DARWIN_LINKER_FEATURES],
2956
m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2957
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
2958
_LT_TAGVAR(hardcode_direct, $1)=no
2959
_LT_TAGVAR(hardcode_automatic, $1)=yes
2960
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2961
_LT_TAGVAR(whole_archive_flag_spec, $1)=''
2962
_LT_TAGVAR(link_all_deplibs, $1)=yes
2963
_LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2964
case $cc_basename in
2965
ifort*) _lt_dar_can_shared=yes ;;
2966
*) _lt_dar_can_shared=$GCC ;;
2968
if test "$_lt_dar_can_shared" = "yes"; then
2969
output_verbose_link_cmd=echo
2970
_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}"
2971
_LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2972
_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}"
2973
_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}"
2975
[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2976
_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}"
2977
_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}"
2981
_LT_TAGVAR(ld_shlibs, $1)=no
2985
# _LT_SYS_MODULE_PATH_AIX
2986
# -----------------------
2987
# Links a minimal program and checks the executable
2988
# for the system default hardcoded library path. In most cases,
2989
# this is /usr/lib:/lib, but when the MPI compilers are used
2990
# the location of the communication and MPI libs are included too.
2991
# If we don't find anything, use the default library path according
2992
# to the aix ld manual.
2993
m4_defun([_LT_SYS_MODULE_PATH_AIX],
2994
[m4_require([_LT_DECL_SED])dnl
2995
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2996
lt_aix_libpath_sed='
2997
/Import File Strings/,/^$/ {
3003
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3004
# Check for a 64-bit object if we didn't find anything.
3005
if test -z "$aix_libpath"; then
3006
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3008
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
3009
])# _LT_SYS_MODULE_PATH_AIX
3012
# _LT_SHELL_INIT(ARG)
3013
# -------------------
3014
m4_define([_LT_SHELL_INIT],
3015
[ifdef([AC_DIVERSION_NOTICE],
3016
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
3017
[AC_DIVERT_PUSH(NOTICE)])
3023
# _LT_PROG_ECHO_BACKSLASH
3024
# -----------------------
3025
# Add some code to the start of the generated configure script which
3026
# will find an echo command which doesn't interpret backslashes.
3027
m4_defun([_LT_PROG_ECHO_BACKSLASH],
3029
# Check that we are running under the correct shell.
3030
SHELL=${CONFIG_SHELL-/bin/sh}
3034
# Remove one level of quotation (which was required for Make).
3035
ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
3039
ECHO=${lt_ECHO-echo}
3040
if test "X[$]1" = X--no-reexec; then
3041
# Discard the --no-reexec flag, and continue.
3043
elif test "X[$]1" = X--fallback-echo; then
3044
# Avoid inline document here, it may be left over
3046
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
3047
# Yippee, $ECHO works!
3050
# Restart under the correct shell.
3051
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
3054
if test "X[$]1" = X--fallback-echo; then
3055
# used as fallback echo
3063
# The HP-UX ksh and POSIX shell print the target directory to stdout
3065
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3067
if test -z "$lt_ECHO"; then
3068
if test "X${echo_test_string+set}" != Xset; then
3069
# find a string as large as possible, as long as the shell can cope with it
3070
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
3071
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
3072
if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
3073
{ test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
3080
if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
3081
echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
3082
test "X$echo_testing_string" = "X$echo_test_string"; then
3085
# The Solaris, AIX, and Digital Unix default echo programs unquote
3086
# backslashes. This makes it impossible to quote backslashes using
3087
# echo "$something" | sed 's/\\/\\\\/g'
3089
# So, first we look for a working echo in the user's PATH.
3091
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3092
for dir in $PATH /usr/ucb; do
3094
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
3095
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
3096
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
3097
test "X$echo_testing_string" = "X$echo_test_string"; then
3104
if test "X$ECHO" = Xecho; then
3105
# We didn't find a better echo, so look for alternatives.
3106
if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
3107
echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
3108
test "X$echo_testing_string" = "X$echo_test_string"; then
3109
# This shell has a builtin print -r that does the trick.
3111
elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
3112
test "X$CONFIG_SHELL" != X/bin/ksh; then
3113
# If we have ksh, try running configure again with it.
3114
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
3115
export ORIGINAL_CONFIG_SHELL
3116
CONFIG_SHELL=/bin/ksh
3118
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
3122
if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
3123
echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
3124
test "X$echo_testing_string" = "X$echo_test_string"; then
3125
# Cool, printf works
3127
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3128
test "X$echo_testing_string" = 'X\t' &&
3129
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3130
test "X$echo_testing_string" = "X$echo_test_string"; then
3131
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
3133
SHELL="$CONFIG_SHELL"
3135
ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
3136
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3137
test "X$echo_testing_string" = 'X\t' &&
3138
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3139
test "X$echo_testing_string" = "X$echo_test_string"; then
3140
ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
3142
# maybe with a smaller string...
3145
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
3146
if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
3153
if test "$prev" != 'sed 50q "[$]0"'; then
3154
echo_test_string=`eval $prev`
3155
export echo_test_string
3156
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
3158
# Oops. We lost completely, so just stick with echo.
3167
# Copy echo and quote the copy suitably for passing to libtool from
3168
# the Makefile, instead of quoting the original, which is used later.
3170
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
3171
lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
3176
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
3177
_LT_DECL([], [ECHO], [1],
3178
[An echo program that does not interpret backslashes])
3179
])# _LT_PROG_ECHO_BACKSLASH
3184
m4_defun([_LT_ENABLE_LOCK],
3185
[AC_ARG_ENABLE([libtool-lock],
3186
[AS_HELP_STRING([--disable-libtool-lock],
3187
[avoid locking (might break parallel builds)])])
3188
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3190
# Some flags need to be propagated to the compiler or linker for good
3194
# Find out which ABI we are using.
3195
echo 'int i;' > conftest.$ac_ext
3196
if AC_TRY_EVAL(ac_compile); then
3197
case `/usr/bin/file conftest.$ac_objext` in
3209
# Find out which ABI we are using.
3210
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
3211
if AC_TRY_EVAL(ac_compile); then
3212
if test "$lt_cv_prog_gnu_ld" = yes; then
3213
case `/usr/bin/file conftest.$ac_objext` in
3215
LD="${LD-ld} -melf32bsmip"
3218
LD="${LD-ld} -melf32bmipn32"
3221
LD="${LD-ld} -melf64bmip"
3225
case `/usr/bin/file conftest.$ac_objext` in
3241
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
3242
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
3243
# Find out which ABI we are using.
3244
echo 'int i;' > conftest.$ac_ext
3245
if AC_TRY_EVAL(ac_compile); then
3246
case `/usr/bin/file conftest.o` in
3249
x86_64-*kfreebsd*-gnu)
3250
LD="${LD-ld} -m elf_i386_fbsd"
3253
LD="${LD-ld} -m elf_i386"
3255
ppc64-*linux*|powerpc64-*linux*)
3256
LD="${LD-ld} -m elf32ppclinux"
3259
LD="${LD-ld} -m elf_s390"
3262
LD="${LD-ld} -m elf32_sparc"
3268
x86_64-*kfreebsd*-gnu)
3269
LD="${LD-ld} -m elf_x86_64_fbsd"
3272
LD="${LD-ld} -m elf_x86_64"
3274
ppc*-*linux*|powerpc*-*linux*)
3275
LD="${LD-ld} -m elf64ppc"
3277
s390*-*linux*|s390*-*tpf*)
3278
LD="${LD-ld} -m elf64_s390"
3281
LD="${LD-ld} -m elf64_sparc"
3291
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
3292
SAVE_CFLAGS="$CFLAGS"
3293
CFLAGS="$CFLAGS -belf"
3294
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3296
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3298
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3299
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3300
CFLAGS="$SAVE_CFLAGS"
3304
# Find out which ABI we are using.
3305
echo 'int i;' > conftest.$ac_ext
3306
if AC_TRY_EVAL(ac_compile); then
3307
case `/usr/bin/file conftest.o` in
3309
case $lt_cv_prog_gnu_ld in
3310
yes*) LD="${LD-ld} -m elf64_sparc" ;;
3312
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3324
need_locks="$enable_libtool_lock"
3328
# _LT_CMD_OLD_ARCHIVE
3329
# -------------------
3330
m4_defun([_LT_CMD_OLD_ARCHIVE],
3331
[AC_CHECK_TOOL(AR, ar, false)
3332
test -z "$AR" && AR=ar
3333
test -z "$AR_FLAGS" && AR_FLAGS=cru
3334
_LT_DECL([], [AR], [1], [The archiver])
3335
_LT_DECL([], [AR_FLAGS], [1])
3337
AC_CHECK_TOOL(STRIP, strip, :)
3338
test -z "$STRIP" && STRIP=:
3339
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
3341
AC_CHECK_TOOL(RANLIB, ranlib, :)
3342
test -z "$RANLIB" && RANLIB=:
3343
_LT_DECL([], [RANLIB], [1],
3344
[Commands used to install an old-style archive])
3346
# Determine commands to create old-style static archives.
3347
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3348
old_postinstall_cmds='chmod 644 $oldlib'
3349
old_postuninstall_cmds=
3351
if test -n "$RANLIB"; then
3354
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
3357
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
3360
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3362
_LT_DECL([], [old_postinstall_cmds], [2])
3363
_LT_DECL([], [old_postuninstall_cmds], [2])
3364
_LT_TAGDECL([], [old_archive_cmds], [2],
3365
[Commands used to build an old-style archive])
3366
])# _LT_CMD_OLD_ARCHIVE
3369
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3370
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3371
# ----------------------------------------------------------------
3372
# Check whether the given compiler option works
3373
AC_DEFUN([_LT_COMPILER_OPTION],
3374
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3375
m4_require([_LT_DECL_SED])dnl
3376
AC_CACHE_CHECK([$1], [$2],
3378
m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3379
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3380
lt_compiler_flag="$3"
3381
# Insert the option either (1) after the last *FLAGS variable, or
3382
# (2) before a word containing "conftest.", or (3) at the end.
3383
# Note that $ac_compile itself does not contain backslashes and begins
3384
# with a dollar sign (not a hyphen), so the echo should work correctly.
3385
# The option is referenced via a variable to avoid confusing sed.
3386
lt_compile=`echo "$ac_compile" | $SED \
3387
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3388
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3389
-e 's:$: $lt_compiler_flag:'`
3390
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3391
(eval "$lt_compile" 2>conftest.err)
3393
cat conftest.err >&AS_MESSAGE_LOG_FD
3394
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3395
if (exit $ac_status) && test -s "$ac_outfile"; then
3396
# The compiler can only warn and ignore the option if not recognized
3397
# So say no if there are warnings other than the usual output.
3398
$ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
3399
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3400
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3407
if test x"[$]$2" = xyes; then
3408
m4_if([$5], , :, [$5])
3410
m4_if([$6], , :, [$6])
3412
])# _LT_COMPILER_OPTION
3415
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3416
dnl aclocal-1.4 backwards compatibility:
3417
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3420
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3421
# [ACTION-SUCCESS], [ACTION-FAILURE])
3422
# ----------------------------------------------------
3423
# Check whether the given linker option works
3424
AC_DEFUN([_LT_LINKER_OPTION],
3425
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3426
m4_require([_LT_DECL_SED])dnl
3427
AC_CACHE_CHECK([$1], [$2],
3429
save_LDFLAGS="$LDFLAGS"
3430
LDFLAGS="$LDFLAGS $3"
3431
echo "$lt_simple_link_test_code" > conftest.$ac_ext
3432
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3433
# The linker can only warn and ignore the option if not recognized
3434
# So say no if there are warnings
3435
if test -s conftest.err; then
3436
# Append any errors to the config.log.
3437
cat conftest.err 1>&AS_MESSAGE_LOG_FD
3438
$ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
3439
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3440
if diff conftest.exp conftest.er2 >/dev/null; then
3448
LDFLAGS="$save_LDFLAGS"
3451
if test x"[$]$2" = xyes; then
3452
m4_if([$4], , :, [$4])
3454
m4_if([$5], , :, [$5])
3456
])# _LT_LINKER_OPTION
3459
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3460
dnl aclocal-1.4 backwards compatibility:
3461
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3466
AC_DEFUN([LT_CMD_MAX_LEN],
3467
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3468
# find the maximum length of command line arguments
3469
AC_MSG_CHECKING([the maximum length of command line arguments])
3470
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3476
# On DJGPP, this test can blow up pretty badly due to problems in libc
3477
# (any single argument exceeding 2000 bytes causes a buffer overrun
3478
# during glob expansion). Even if it were fixed, the result of this
3479
# check would be larger than it should be.
3480
lt_cv_sys_max_cmd_len=12288; # 12K is about right
3484
# Under GNU Hurd, this test is not required because there is
3485
# no limit to the length of command line arguments.
3486
# Libtool will interpret -1 as no limit whatsoever
3487
lt_cv_sys_max_cmd_len=-1;
3490
cygwin* | mingw* | cegcc*)
3491
# On Win9x/ME, this test blows up -- it succeeds, but takes
3492
# about 5 minutes as the teststring grows exponentially.
3493
# Worse, since 9x/ME are not pre-emptively multitasking,
3494
# you end up with a "frozen" computer, even though with patience
3495
# the test eventually succeeds (with a max line length of 256k).
3496
# Instead, let's just punt: use the minimum linelength reported by
3497
# all of the supported platforms: 8192 (on NT/2K/XP).
3498
lt_cv_sys_max_cmd_len=8192;
3502
# On AmigaOS with pdksh, this test takes hours, literally.
3503
# So we just punt and use a minimum line length of 8192.
3504
lt_cv_sys_max_cmd_len=8192;
3507
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3508
# This has been around since 386BSD, at least. Likely further.
3509
if test -x /sbin/sysctl; then
3510
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3511
elif test -x /usr/sbin/sysctl; then
3512
lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3514
lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
3516
# And add a safety zone
3517
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3518
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3522
# We know the value 262144 and hardcode it with a safety zone (like BSD)
3523
lt_cv_sys_max_cmd_len=196608
3527
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3528
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3529
# nice to cause kernel panics so lets avoid the loop below.
3530
# First set a reasonable default.
3531
lt_cv_sys_max_cmd_len=16384
3533
if test -x /sbin/sysconfig; then
3534
case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3535
*1*) lt_cv_sys_max_cmd_len=-1 ;;
3540
lt_cv_sys_max_cmd_len=102400
3542
sysv5* | sco5v6* | sysv4.2uw2*)
3543
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3544
if test -n "$kargmax"; then
3545
lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
3547
lt_cv_sys_max_cmd_len=32768
3551
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3552
if test -n "$lt_cv_sys_max_cmd_len"; then
3553
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3554
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3556
# Make teststring a little bigger before we do anything with it.
3557
# a 1K string should be a reasonable start.
3558
for i in 1 2 3 4 5 6 7 8 ; do
3559
teststring=$teststring$teststring
3561
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3562
# If test is not a shell built-in, we'll probably end up computing a
3563
# maximum length that is only half of the actual maximum length, but
3565
while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
3566
= "XX$teststring$teststring"; } >/dev/null 2>&1 &&
3567
test $i != 17 # 1/2 MB should be enough
3570
teststring=$teststring$teststring
3572
# Only check the string length outside the loop.
3573
lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3575
# Add a significant safety factor because C++ compilers can tack on
3576
# massive amounts of additional arguments before passing them to the
3577
# linker. It appears as though 1/2 is a usable value.
3578
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3583
if test -n $lt_cv_sys_max_cmd_len ; then
3584
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3588
max_cmd_len=$lt_cv_sys_max_cmd_len
3589
_LT_DECL([], [max_cmd_len], [0],
3590
[What is the maximum length of a command?])
3594
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3595
dnl aclocal-1.4 backwards compatibility:
3596
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3601
m4_defun([_LT_HEADER_DLFCN],
3602
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3603
])# _LT_HEADER_DLFCN
3606
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3607
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3608
# ----------------------------------------------------------------
3609
m4_defun([_LT_TRY_DLOPEN_SELF],
3610
[m4_require([_LT_HEADER_DLFCN])dnl
3611
if test "$cross_compiling" = yes; then :
3614
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3615
lt_status=$lt_dlunknown
3616
cat > conftest.$ac_ext <<_LT_EOF
3617
[#line __oline__ "configure"
3618
#include "confdefs.h"
3627
# define LT_DLGLOBAL RTLD_GLOBAL
3630
# define LT_DLGLOBAL DL_GLOBAL
3632
# define LT_DLGLOBAL 0
3636
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3637
find out it does not work in some platform. */
3638
#ifndef LT_DLLAZY_OR_NOW
3640
# define LT_DLLAZY_OR_NOW RTLD_LAZY
3643
# define LT_DLLAZY_OR_NOW DL_LAZY
3646
# define LT_DLLAZY_OR_NOW RTLD_NOW
3649
# define LT_DLLAZY_OR_NOW DL_NOW
3651
# define LT_DLLAZY_OR_NOW 0
3658
void fnord() { int i=42;}
3661
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3662
int status = $lt_dlunknown;
3666
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
3667
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
3668
/* dlclose (self); */
3676
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3677
(./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
3680
x$lt_dlno_uscore) $1 ;;
3681
x$lt_dlneed_uscore) $2 ;;
3682
x$lt_dlunknown|x*) $3 ;;
3685
# compilation failed
3690
])# _LT_TRY_DLOPEN_SELF
3693
# LT_SYS_DLOPEN_SELF
3694
# ------------------
3695
AC_DEFUN([LT_SYS_DLOPEN_SELF],
3696
[m4_require([_LT_HEADER_DLFCN])dnl
3697
if test "x$enable_dlopen" != xyes; then
3698
enable_dlopen=unknown
3699
enable_dlopen_self=unknown
3700
enable_dlopen_self_static=unknown
3707
lt_cv_dlopen="load_add_on"
3709
lt_cv_dlopen_self=yes
3712
mingw* | pw32* | cegcc*)
3713
lt_cv_dlopen="LoadLibrary"
3718
lt_cv_dlopen="dlopen"
3723
# if libdl is installed we need to link against it
3724
AC_CHECK_LIB([dl], [dlopen],
3725
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3728
lt_cv_dlopen_self=yes
3733
AC_CHECK_FUNC([shl_load],
3734
[lt_cv_dlopen="shl_load"],
3735
[AC_CHECK_LIB([dld], [shl_load],
3736
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
3737
[AC_CHECK_FUNC([dlopen],
3738
[lt_cv_dlopen="dlopen"],
3739
[AC_CHECK_LIB([dl], [dlopen],
3740
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3741
[AC_CHECK_LIB([svld], [dlopen],
3742
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3743
[AC_CHECK_LIB([dld], [dld_link],
3744
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3753
if test "x$lt_cv_dlopen" != xno; then
3759
case $lt_cv_dlopen in
3761
save_CPPFLAGS="$CPPFLAGS"
3762
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3764
save_LDFLAGS="$LDFLAGS"
3765
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3768
LIBS="$lt_cv_dlopen_libs $LIBS"
3770
AC_CACHE_CHECK([whether a program can dlopen itself],
3771
lt_cv_dlopen_self, [dnl
3772
_LT_TRY_DLOPEN_SELF(
3773
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3774
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3777
if test "x$lt_cv_dlopen_self" = xyes; then
3778
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3779
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3780
lt_cv_dlopen_self_static, [dnl
3781
_LT_TRY_DLOPEN_SELF(
3782
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3783
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
3787
CPPFLAGS="$save_CPPFLAGS"
3788
LDFLAGS="$save_LDFLAGS"
3793
case $lt_cv_dlopen_self in
3794
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3795
*) enable_dlopen_self=unknown ;;
3798
case $lt_cv_dlopen_self_static in
3799
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3800
*) enable_dlopen_self_static=unknown ;;
3803
_LT_DECL([dlopen_support], [enable_dlopen], [0],
3804
[Whether dlopen is supported])
3805
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3806
[Whether dlopen of programs is supported])
3807
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3808
[Whether dlopen of statically linked programs is supported])
3809
])# LT_SYS_DLOPEN_SELF
3812
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3813
dnl aclocal-1.4 backwards compatibility:
3814
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3817
# _LT_COMPILER_C_O([TAGNAME])
3818
# ---------------------------
3819
# Check to see if options -c and -o are simultaneously supported by compiler.
3820
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
3821
m4_defun([_LT_COMPILER_C_O],
3822
[m4_require([_LT_DECL_SED])dnl
3823
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3824
m4_require([_LT_TAG_COMPILER])dnl
3825
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3826
[_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3827
[_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3828
$RM -r conftest 2>/dev/null
3832
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3834
lt_compiler_flag="-o out/conftest2.$ac_objext"
3835
# Insert the option either (1) after the last *FLAGS variable, or
3836
# (2) before a word containing "conftest.", or (3) at the end.
3837
# Note that $ac_compile itself does not contain backslashes and begins
3838
# with a dollar sign (not a hyphen), so the echo should work correctly.
3839
lt_compile=`echo "$ac_compile" | $SED \
3840
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3841
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3842
-e 's:$: $lt_compiler_flag:'`
3843
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3844
(eval "$lt_compile" 2>out/conftest.err)
3846
cat out/conftest.err >&AS_MESSAGE_LOG_FD
3847
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3848
if (exit $ac_status) && test -s out/conftest2.$ac_objext
3850
# The compiler can only warn and ignore the option if not recognized
3851
# So say no if there are warnings
3852
$ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
3853
$SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3854
if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3855
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3858
chmod u+w . 2>&AS_MESSAGE_LOG_FD
3860
# SGI C++ compiler will create directory out/ii_files/ for
3861
# template instantiation
3862
test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3863
$RM out/* && rmdir out
3868
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3869
[Does compiler simultaneously support -c and -o options?])
3870
])# _LT_COMPILER_C_O
3873
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
3874
# ----------------------------------
3875
# Check to see if we can do hard links to lock some files if needed
3876
m4_defun([_LT_COMPILER_FILE_LOCKS],
3877
[m4_require([_LT_ENABLE_LOCK])dnl
3878
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3879
_LT_COMPILER_C_O([$1])
3881
hard_links="nottested"
3882
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3883
# do not overwrite the value of need_locks provided by the user
3884
AC_MSG_CHECKING([if we can lock with hard links])
3887
ln conftest.a conftest.b 2>/dev/null && hard_links=no
3889
ln conftest.a conftest.b 2>&5 || hard_links=no
3890
ln conftest.a conftest.b 2>/dev/null && hard_links=no
3891
AC_MSG_RESULT([$hard_links])
3892
if test "$hard_links" = no; then
3893
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3899
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3900
])# _LT_COMPILER_FILE_LOCKS
3905
m4_defun([_LT_CHECK_OBJDIR],
3906
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3907
[rm -f .libs 2>/dev/null
3908
mkdir .libs 2>/dev/null
3909
if test -d .libs; then
3912
# MS-DOS does not allow filenames that begin with a dot.
3915
rmdir .libs 2>/dev/null])
3916
objdir=$lt_cv_objdir
3917
_LT_DECL([], [objdir], [0],
3918
[The name of the directory that contains temporary libtool files])dnl
3919
m4_pattern_allow([LT_OBJDIR])dnl
3920
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3921
[Define to the sub-directory in which libtool stores uninstalled libraries.])
3922
])# _LT_CHECK_OBJDIR
3925
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3926
# --------------------------------------
3927
# Check hardcoding attributes.
3928
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3929
[AC_MSG_CHECKING([how to hardcode library paths into programs])
3930
_LT_TAGVAR(hardcode_action, $1)=
3931
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3932
test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3933
test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3935
# We can hardcode non-existent directories.
3936
if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3937
# If the only mechanism to avoid hardcoding is shlibpath_var, we
3938
# have to relink, otherwise we might link with an installed library
3939
# when we should be linking with a yet-to-be-installed one
3940
## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3941
test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3942
# Linking always hardcodes the temporary library directory.
3943
_LT_TAGVAR(hardcode_action, $1)=relink
3945
# We can link without hardcoding, and we can hardcode nonexisting dirs.
3946
_LT_TAGVAR(hardcode_action, $1)=immediate
3949
# We cannot hardcode anything, or else we can only hardcode existing
3951
_LT_TAGVAR(hardcode_action, $1)=unsupported
3953
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3955
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3956
test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3957
# Fast installation is not supported
3958
enable_fast_install=no
3959
elif test "$shlibpath_overrides_runpath" = yes ||
3960
test "$enable_shared" = no; then
3961
# Fast installation is not necessary
3962
enable_fast_install=needless
3964
_LT_TAGDECL([], [hardcode_action], [0],
3965
[How to hardcode a shared library path into an executable])
3966
])# _LT_LINKER_HARDCODE_LIBPATH
3971
m4_defun([_LT_CMD_STRIPLIB],
3972
[m4_require([_LT_DECL_EGREP])
3975
AC_MSG_CHECKING([whether stripping libraries is possible])
3976
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3977
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3978
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3979
AC_MSG_RESULT([yes])
3981
# FIXME - insert some real tests, host_os isn't really good enough
3984
if test -n "$STRIP" ; then
3985
striplib="$STRIP -x"
3986
old_striplib="$STRIP -S"
3987
AC_MSG_RESULT([yes])
3997
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3998
_LT_DECL([], [striplib], [1])
3999
])# _LT_CMD_STRIPLIB
4002
# _LT_SYS_DYNAMIC_LINKER([TAG])
4003
# -----------------------------
4004
# PORTME Fill in your ld.so characteristics
4005
m4_defun([_LT_SYS_DYNAMIC_LINKER],
4006
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4007
m4_require([_LT_DECL_EGREP])dnl
4008
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4009
m4_require([_LT_DECL_OBJDUMP])dnl
4010
m4_require([_LT_DECL_SED])dnl
4011
AC_MSG_CHECKING([dynamic linker characteristics])
4014
if test "$GCC" = yes; then
4016
darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
4017
*) lt_awk_arg="/^libraries:/" ;;
4019
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
4020
if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
4021
# if the path contains ";" then we assume it to be the separator
4022
# otherwise default to the standard path separator (i.e. ":") - it is
4023
# assumed that no part of a normal pathname contains ";" but that should
4024
# okay in the real world where ";" in dirpaths is itself problematic.
4025
lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
4027
lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4029
# Ok, now we have the path, separated by spaces, we can step through it
4030
# and add multilib dir if necessary.
4031
lt_tmp_lt_search_path_spec=
4032
lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
4033
for lt_sys_path in $lt_search_path_spec; do
4034
if test -d "$lt_sys_path/$lt_multi_os_dir"; then
4035
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
4037
test -d "$lt_sys_path" && \
4038
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
4041
lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
4042
BEGIN {RS=" "; FS="/|\n";} {
4045
for (lt_i = NF; lt_i > 0; lt_i--) {
4046
if ($lt_i != "" && $lt_i != ".") {
4047
if ($lt_i == "..") {
4050
if (lt_count == 0) {
4051
lt_foo="/" $lt_i lt_foo;
4058
if (lt_foo != "") { lt_freq[[lt_foo]]++; }
4059
if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
4061
sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
4063
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4066
libname_spec='lib$name'
4074
shlibpath_overrides_runpath=unknown
4076
dynamic_linker="$host_os ld.so"
4077
sys_lib_dlsearch_path_spec="/lib /usr/lib"
4078
need_lib_prefix=unknown
4079
hardcode_into_libs=no
4081
# when you set need_version to no, make sure it does not cause -set_version
4082
# flags to be left without arguments
4083
need_version=unknown
4088
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
4089
shlibpath_var=LIBPATH
4091
# AIX 3 has no versioning support, so we append a major version to the name.
4092
soname_spec='${libname}${release}${shared_ext}$major'
4099
hardcode_into_libs=yes
4100
if test "$host_cpu" = ia64; then
4101
# AIX 5 supports IA64
4102
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
4103
shlibpath_var=LD_LIBRARY_PATH
4105
# With GCC up to 2.95.x, collect2 would create an import file
4106
# for dependence libraries. The import file would start with
4107
# the line `#! .'. This would cause the generated library to
4108
# depend on `.', always an invalid library. This was fixed in
4109
# development snapshots of GCC prior to 3.0.
4111
aix4 | aix4.[[01]] | aix4.[[01]].*)
4112
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
4114
echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
4121
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
4122
# soname into executable. Probably we can add versioning support to
4123
# collect2, so additional links can be useful in future.
4124
if test "$aix_use_runtimelinking" = yes; then
4125
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
4126
# instead of lib<name>.a to let people know that these are not
4127
# typical AIX shared libraries.
4128
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4130
# We preserve .a as extension for shared libraries through AIX4.2
4131
# and later when we are not doing run time linking.
4132
library_names_spec='${libname}${release}.a $libname.a'
4133
soname_spec='${libname}${release}${shared_ext}$major'
4135
shlibpath_var=LIBPATH
4142
# Since July 2007 AmigaOS4 officially supports .so libraries.
4143
# When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
4144
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4147
library_names_spec='$libname.ixlibrary $libname.a'
4148
# Create ${libname}_ixlibrary.a entries in /sys/libs.
4149
finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
4155
library_names_spec='${libname}${shared_ext}'
4156
dynamic_linker="$host_os ld.so"
4157
shlibpath_var=LIBRARY_PATH
4163
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4164
soname_spec='${libname}${release}${shared_ext}$major'
4165
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4166
shlibpath_var=LD_LIBRARY_PATH
4167
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4168
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4169
# the default ld.so.conf also contains /usr/contrib/lib and
4170
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4171
# libtool to hard-code these into programs
4174
cygwin* | mingw* | pw32* | cegcc*)
4175
version_type=windows
4180
case $GCC,$host_os in
4181
yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
4182
library_names_spec='$libname.dll.a'
4183
# DLL is installed to $(libdir)/../bin by postinstall_cmds
4184
postinstall_cmds='base_file=`basename \${file}`~
4185
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
4186
dldir=$destdir/`dirname \$dlpath`~
4187
test -d \$dldir || mkdir -p \$dldir~
4188
$install_prog $dir/$dlname \$dldir/$dlname~
4189
chmod a+x \$dldir/$dlname~
4190
if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4191
eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4193
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4194
dlpath=$dir/\$dldll~
4196
shlibpath_overrides_runpath=yes
4200
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
4201
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4202
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
4205
# MinGW DLLs use traditional 'lib' prefix
4206
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4207
sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
4208
if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
4209
# It is most probably a Windows format PATH printed by
4210
# mingw gcc, but we are running on Cygwin. Gcc prints its search
4211
# path with ; separators, and with drive letters. We can handle the
4212
# drive letters (cygwin fileutils understands them), so leave them,
4213
# especially as we might pass files found there to a mingw objdump,
4214
# which wouldn't understand a cygwinified path. Ahh.
4215
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
4217
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4221
# pw32 DLLs use 'pw' prefix rather than 'lib'
4222
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4228
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
4231
dynamic_linker='Win32 ld.exe'
4232
# FIXME: first we should search . and the directory the executable is in
4236
darwin* | rhapsody*)
4237
dynamic_linker="$host_os dyld"
4241
library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
4242
soname_spec='${libname}${release}${major}$shared_ext'
4243
shlibpath_overrides_runpath=yes
4244
shlibpath_var=DYLD_LIBRARY_PATH
4245
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4247
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
4248
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4255
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
4256
soname_spec='${libname}${release}${shared_ext}$major'
4257
shlibpath_var=LD_LIBRARY_PATH
4264
freebsd* | dragonfly*)
4265
# DragonFly does not have aout. When/if they implement a new
4266
# versioning mechanism, adjust this.
4267
if test -x /usr/bin/objformat; then
4268
objformat=`/usr/bin/objformat`
4271
freebsd[[123]]*) objformat=aout ;;
4275
version_type=freebsd-$objformat
4276
case $version_type in
4278
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4283
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
4287
shlibpath_var=LD_LIBRARY_PATH
4290
shlibpath_overrides_runpath=yes
4292
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4293
shlibpath_overrides_runpath=yes
4294
hardcode_into_libs=yes
4296
freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4297
freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
4298
shlibpath_overrides_runpath=no
4299
hardcode_into_libs=yes
4301
*) # from 4.6 on, and DragonFly
4302
shlibpath_overrides_runpath=yes
4303
hardcode_into_libs=yes
4312
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4313
soname_spec='${libname}${release}${shared_ext}$major'
4314
shlibpath_var=LD_LIBRARY_PATH
4315
hardcode_into_libs=yes
4318
hpux9* | hpux10* | hpux11*)
4319
# Give a soname corresponding to the major version so that dld.sl refuses to
4320
# link against other versions.
4327
hardcode_into_libs=yes
4328
dynamic_linker="$host_os dld.so"
4329
shlibpath_var=LD_LIBRARY_PATH
4330
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4331
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4332
soname_spec='${libname}${release}${shared_ext}$major'
4333
if test "X$HPUX_IA64_MODE" = X32; then
4334
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4336
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4338
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4342
hardcode_into_libs=yes
4343
dynamic_linker="$host_os dld.sl"
4344
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4345
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4346
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4347
soname_spec='${libname}${release}${shared_ext}$major'
4348
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4349
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4353
dynamic_linker="$host_os dld.sl"
4354
shlibpath_var=SHLIB_PATH
4355
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4356
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4357
soname_spec='${libname}${release}${shared_ext}$major'
4360
# HP-UX runs *really* slowly unless shared libraries are mode 555.
4361
postinstall_cmds='chmod 555 $lib'
4368
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4369
soname_spec='${libname}${release}${shared_ext}$major'
4370
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4371
shlibpath_var=LD_LIBRARY_PATH
4372
shlibpath_overrides_runpath=no
4373
hardcode_into_libs=yes
4376
irix5* | irix6* | nonstopux*)
4378
nonstopux*) version_type=nonstopux ;;
4380
if test "$lt_cv_prog_gnu_ld" = yes; then
4388
soname_spec='${libname}${release}${shared_ext}$major'
4389
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4391
irix5* | nonstopux*)
4395
case $LD in # libtool.m4 will add one of these switches to LD
4396
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4397
libsuff= shlibsuff= libmagic=32-bit;;
4398
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4399
libsuff=32 shlibsuff=N32 libmagic=N32;;
4400
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4401
libsuff=64 shlibsuff=64 libmagic=64-bit;;
4402
*) libsuff= shlibsuff= libmagic=never-match;;
4406
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4407
shlibpath_overrides_runpath=no
4408
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4409
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4410
hardcode_into_libs=yes
4413
# No shared lib support for Linux oldld, aout, or coff.
4414
linux*oldld* | linux*aout* | linux*coff*)
4418
# This must be Linux ELF.
4419
linux* | k*bsd*-gnu | kopensolaris*-gnu)
4423
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4424
soname_spec='${libname}${release}${shared_ext}$major'
4425
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4426
shlibpath_var=LD_LIBRARY_PATH
4427
shlibpath_overrides_runpath=no
4428
# Some binutils ld are patched to set DT_RUNPATH
4429
save_LDFLAGS=$LDFLAGS
4431
eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4432
LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4433
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4434
[AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4435
[shlibpath_overrides_runpath=yes])])
4436
LDFLAGS=$save_LDFLAGS
4439
# This implies no fast_install, which is unacceptable.
4440
# Some rework will be needed to allow for fast_install
4441
# before this can be enabled.
4442
hardcode_into_libs=yes
4444
# Append ld.so.conf contents to the search path
4445
if test -f /etc/ld.so.conf; then
4446
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
4447
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4450
# We used to test for /lib/ld.so.1 and disable shared libraries on
4451
# powerpc, because MkLinux only supported shared libraries with the
4452
# GNU dynamic linker. Since this was broken with cross compilers,
4453
# most powerpc-linux boxes support dynamic linking these days and
4454
# people can always --disable-shared, the test was removed, and we
4455
# assume the GNU/Linux dynamic linker is in use.
4456
dynamic_linker='GNU/Linux ld.so'
4463
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4464
soname_spec='${libname}${release}${shared_ext}$major'
4465
shlibpath_var=LD_LIBRARY_PATH
4466
shlibpath_overrides_runpath=no
4467
hardcode_into_libs=yes
4468
dynamic_linker='NetBSD ld.elf_so'
4475
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4476
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4477
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4478
dynamic_linker='NetBSD (a.out) ld.so'
4480
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4481
soname_spec='${libname}${release}${shared_ext}$major'
4482
dynamic_linker='NetBSD ld.elf_so'
4484
shlibpath_var=LD_LIBRARY_PATH
4485
shlibpath_overrides_runpath=yes
4486
hardcode_into_libs=yes
4491
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4492
shlibpath_var=LD_LIBRARY_PATH
4493
shlibpath_overrides_runpath=yes
4500
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4501
soname_spec='${libname}${release}${shared_ext}$major'
4502
shlibpath_var=LD_LIBRARY_PATH
4503
shlibpath_overrides_runpath=no
4504
hardcode_into_libs=yes
4505
dynamic_linker='ldqnx.so'
4510
sys_lib_dlsearch_path_spec="/usr/lib"
4512
# Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4514
openbsd3.3 | openbsd3.3.*) need_version=yes ;;
4515
*) need_version=no ;;
4517
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4518
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4519
shlibpath_var=LD_LIBRARY_PATH
4520
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4522
openbsd2.[[89]] | openbsd2.[[89]].*)
4523
shlibpath_overrides_runpath=no
4526
shlibpath_overrides_runpath=yes
4530
shlibpath_overrides_runpath=yes
4535
libname_spec='$name'
4538
library_names_spec='$libname${shared_ext} $libname.a'
4539
dynamic_linker='OS/2 ld.exe'
4540
shlibpath_var=LIBPATH
4543
osf3* | osf4* | osf5*)
4547
soname_spec='${libname}${release}${shared_ext}$major'
4548
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4549
shlibpath_var=LD_LIBRARY_PATH
4550
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4551
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4562
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4563
soname_spec='${libname}${release}${shared_ext}$major'
4564
shlibpath_var=LD_LIBRARY_PATH
4565
shlibpath_overrides_runpath=yes
4566
hardcode_into_libs=yes
4567
# ldd complains unless libraries are executable
4568
postinstall_cmds='chmod +x $lib'
4573
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4574
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4575
shlibpath_var=LD_LIBRARY_PATH
4576
shlibpath_overrides_runpath=yes
4577
if test "$with_gnu_ld" = yes; then
4585
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4586
soname_spec='${libname}${release}${shared_ext}$major'
4587
shlibpath_var=LD_LIBRARY_PATH
4588
case $host_vendor in
4590
shlibpath_overrides_runpath=no
4592
runpath_var=LD_RUN_PATH
4600
shlibpath_overrides_runpath=no
4601
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4607
if test -d /usr/nec ;then
4609
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4610
soname_spec='$libname${shared_ext}.$major'
4611
shlibpath_var=LD_LIBRARY_PATH
4615
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4616
version_type=freebsd-elf
4619
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4620
soname_spec='${libname}${release}${shared_ext}$major'
4621
shlibpath_var=LD_LIBRARY_PATH
4622
shlibpath_overrides_runpath=yes
4623
hardcode_into_libs=yes
4624
if test "$with_gnu_ld" = yes; then
4625
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4627
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4630
sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4634
sys_lib_dlsearch_path_spec='/usr/lib'
4638
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
4642
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4643
shlibpath_var=LD_LIBRARY_PATH
4644
shlibpath_overrides_runpath=no
4645
hardcode_into_libs=yes
4650
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4651
soname_spec='${libname}${release}${shared_ext}$major'
4652
shlibpath_var=LD_LIBRARY_PATH
4659
AC_MSG_RESULT([$dynamic_linker])
4660
test "$dynamic_linker" = no && can_build_shared=no
4662
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4663
if test "$GCC" = yes; then
4664
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4667
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
4668
sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4670
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
4671
sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4674
_LT_DECL([], [variables_saved_for_relink], [1],
4675
[Variables whose values should be saved in libtool wrapper scripts and
4676
restored at link time])
4677
_LT_DECL([], [need_lib_prefix], [0],
4678
[Do we need the "lib" prefix for modules?])
4679
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4680
_LT_DECL([], [version_type], [0], [Library versioning type])
4681
_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
4682
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4683
_LT_DECL([], [shlibpath_overrides_runpath], [0],
4684
[Is shlibpath searched before the hard-coded library search path?])
4685
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4686
_LT_DECL([], [library_names_spec], [1],
4687
[[List of archive names. First name is the real one, the rest are links.
4688
The last name is the one that the linker finds with -lNAME]])
4689
_LT_DECL([], [soname_spec], [1],
4690
[[The coded name of the library, if different from the real name]])
4691
_LT_DECL([], [postinstall_cmds], [2],
4692
[Command to use after installation of a shared archive])
4693
_LT_DECL([], [postuninstall_cmds], [2],
4694
[Command to use after uninstallation of a shared archive])
4695
_LT_DECL([], [finish_cmds], [2],
4696
[Commands used to finish a libtool library installation in a directory])
4697
_LT_DECL([], [finish_eval], [1],
4698
[[As "finish_cmds", except a single script fragment to be evaled but
4700
_LT_DECL([], [hardcode_into_libs], [0],
4701
[Whether we should hardcode library paths into libraries])
4702
_LT_DECL([], [sys_lib_search_path_spec], [2],
4703
[Compile-time system search path for libraries])
4704
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
4705
[Run-time system search path for libraries])
4706
])# _LT_SYS_DYNAMIC_LINKER
4709
# _LT_PATH_TOOL_PREFIX(TOOL)
4710
# --------------------------
4711
# find a file program which can recognize shared library
4712
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4713
[m4_require([_LT_DECL_EGREP])dnl
4714
AC_MSG_CHECKING([for $1])
4715
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4717
[[\\/*] | ?:[\\/]*])
4718
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4721
lt_save_MAGIC_CMD="$MAGIC_CMD"
4722
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4723
dnl $ac_dummy forces splitting on constant user-supplied paths.
4724
dnl POSIX.2 word splitting is done only on the output of word expansions,
4725
dnl not every word. This closes a longstanding sh security hole.
4726
ac_dummy="m4_if([$2], , $PATH, [$2])"
4727
for ac_dir in $ac_dummy; do
4729
test -z "$ac_dir" && ac_dir=.
4730
if test -f $ac_dir/$1; then
4731
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4732
if test -n "$file_magic_test_file"; then
4733
case $deplibs_check_method in
4735
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4736
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4737
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4738
$EGREP "$file_magic_regex" > /dev/null; then
4743
*** Warning: the command libtool uses to detect shared libraries,
4744
*** $file_magic_cmd, produces output that libtool cannot recognize.
4745
*** The result is that libtool may fail to recognize shared libraries
4746
*** as such. This will affect the creation of libtool libraries that
4747
*** depend on shared libraries, but programs linked with such libtool
4748
*** libraries will work regardless of this problem. Nevertheless, you
4749
*** may want to report the problem to your system manager and/or to
4750
*** bug-libtool@gnu.org
4760
MAGIC_CMD="$lt_save_MAGIC_CMD"
4763
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4764
if test -n "$MAGIC_CMD"; then
4765
AC_MSG_RESULT($MAGIC_CMD)
4769
_LT_DECL([], [MAGIC_CMD], [0],
4770
[Used to examine libraries when file_magic_cmd begins with "file"])dnl
4771
])# _LT_PATH_TOOL_PREFIX
4774
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4775
dnl aclocal-1.4 backwards compatibility:
4776
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4781
# find a file program which can recognize a shared library
4782
m4_defun([_LT_PATH_MAGIC],
4783
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4784
if test -z "$lt_cv_path_MAGIC_CMD"; then
4785
if test -n "$ac_tool_prefix"; then
4786
_LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4796
# find the pathname to the GNU or non-GNU linker
4797
AC_DEFUN([LT_PATH_LD],
4798
[AC_REQUIRE([AC_PROG_CC])dnl
4799
AC_REQUIRE([AC_CANONICAL_HOST])dnl
4800
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4801
m4_require([_LT_DECL_SED])dnl
4802
m4_require([_LT_DECL_EGREP])dnl
4804
AC_ARG_WITH([gnu-ld],
4805
[AS_HELP_STRING([--with-gnu-ld],
4806
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
4807
[test "$withval" = no || with_gnu_ld=yes],
4808
[with_gnu_ld=no])dnl
4811
if test "$GCC" = yes; then
4812
# Check if gcc -print-prog-name=ld gives a path.
4813
AC_MSG_CHECKING([for ld used by $CC])
4816
# gcc leaves a trailing carriage return which upsets mingw
4817
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4819
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4822
# Accept absolute paths.
4823
[[\\/]]* | ?:[[\\/]]*)
4824
re_direlt='/[[^/]][[^/]]*/\.\./'
4825
# Canonicalize the pathname of ld
4826
ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4827
while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4828
ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4830
test -z "$LD" && LD="$ac_prog"
4833
# If it fails, then pretend we aren't using GCC.
4837
# If it is relative, then search for the first ld in PATH.
4841
elif test "$with_gnu_ld" = yes; then
4842
AC_MSG_CHECKING([for GNU ld])
4844
AC_MSG_CHECKING([for non-GNU ld])
4846
AC_CACHE_VAL(lt_cv_path_LD,
4847
[if test -z "$LD"; then
4848
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4849
for ac_dir in $PATH; do
4851
test -z "$ac_dir" && ac_dir=.
4852
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4853
lt_cv_path_LD="$ac_dir/$ac_prog"
4854
# Check to see if the program is GNU ld. I'd rather use --version,
4855
# but apparently some variants of GNU ld only accept -v.
4856
# Break only if it was the GNU/non-GNU ld that we prefer.
4857
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4858
*GNU* | *'with BFD'*)
4859
test "$with_gnu_ld" != no && break
4862
test "$with_gnu_ld" != yes && break
4869
lt_cv_path_LD="$LD" # Let the user override the test with a path.
4872
if test -n "$LD"; then
4877
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4881
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4885
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4886
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4887
dnl aclocal-1.4 backwards compatibility:
4888
dnl AC_DEFUN([AM_PROG_LD], [])
4889
dnl AC_DEFUN([AC_PROG_LD], [])
4894
m4_defun([_LT_PATH_LD_GNU],
4895
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4896
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
4897
case `$LD -v 2>&1 </dev/null` in
4898
*GNU* | *'with BFD'*)
4899
lt_cv_prog_gnu_ld=yes
4902
lt_cv_prog_gnu_ld=no
4905
with_gnu_ld=$lt_cv_prog_gnu_ld
4911
# find reload flag for linker
4912
# -- PORTME Some linkers may need a different reload flag.
4913
m4_defun([_LT_CMD_RELOAD],
4914
[AC_CACHE_CHECK([for $LD option to reload object files],
4915
lt_cv_ld_reload_flag,
4916
[lt_cv_ld_reload_flag='-r'])
4917
reload_flag=$lt_cv_ld_reload_flag
4918
case $reload_flag in
4920
*) reload_flag=" $reload_flag" ;;
4922
reload_cmds='$LD$reload_flag -o $output$reload_objs'
4925
if test "$GCC" = yes; then
4926
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4928
reload_cmds='$LD$reload_flag -o $output$reload_objs'
4932
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4933
_LT_DECL([], [reload_cmds], [2])dnl
4937
# _LT_CHECK_MAGIC_METHOD
4938
# ----------------------
4939
# how to check for library dependencies
4940
# -- PORTME fill in with the dynamic library characteristics
4941
m4_defun([_LT_CHECK_MAGIC_METHOD],
4942
[m4_require([_LT_DECL_EGREP])
4943
m4_require([_LT_DECL_OBJDUMP])
4944
AC_CACHE_CHECK([how to recognize dependent libraries],
4945
lt_cv_deplibs_check_method,
4946
[lt_cv_file_magic_cmd='$MAGIC_CMD'
4947
lt_cv_file_magic_test_file=
4948
lt_cv_deplibs_check_method='unknown'
4949
# Need to set the preceding variable on all platforms that support
4950
# interlibrary dependencies.
4951
# 'none' -- dependencies not supported.
4952
# `unknown' -- same as none, but documents that we really don't know.
4953
# 'pass_all' -- all dependencies passed with no checks.
4954
# 'test_compile' -- check by making test program.
4955
# 'file_magic [[regex]]' -- check by looking for files in library path
4956
# which responds to the $file_magic_cmd with a given extended regex.
4957
# If you have `file' or equivalent on your system and you're not sure
4958
# whether `pass_all' will *always* work, you probably want this one.
4962
lt_cv_deplibs_check_method=pass_all
4966
lt_cv_deplibs_check_method=pass_all
4970
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4971
lt_cv_file_magic_cmd='/usr/bin/file -L'
4972
lt_cv_file_magic_test_file=/shlib/libc.so
4976
# func_win32_libid is a shell function defined in ltmain.sh
4977
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4978
lt_cv_file_magic_cmd='func_win32_libid'
4982
# Base MSYS/MinGW do not provide the 'file' command needed by
4983
# func_win32_libid shell function, so use a weaker test based on 'objdump',
4984
# unless we find 'file', for example because we are cross-compiling.
4985
if ( file / ) >/dev/null 2>&1; then
4986
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4987
lt_cv_file_magic_cmd='func_win32_libid'
4989
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4990
lt_cv_file_magic_cmd='$OBJDUMP -f'
4995
# use the weaker test based on 'objdump'. See mingw*.
4996
lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4997
lt_cv_file_magic_cmd='$OBJDUMP -f'
5000
darwin* | rhapsody*)
5001
lt_cv_deplibs_check_method=pass_all
5004
freebsd* | dragonfly*)
5005
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5008
# Not sure whether the presence of OpenBSD here was a mistake.
5009
# Let's accept both of them until this is cleared up.
5010
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5011
lt_cv_file_magic_cmd=/usr/bin/file
5012
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5016
lt_cv_deplibs_check_method=pass_all
5021
lt_cv_deplibs_check_method=pass_all
5024
hpux10.20* | hpux11*)
5025
lt_cv_file_magic_cmd=/usr/bin/file
5028
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5029
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5032
[lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
5033
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5036
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
5037
lt_cv_file_magic_test_file=/usr/lib/libc.sl
5043
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5044
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
5047
irix5* | irix6* | nonstopux*)
5049
*-32|*"-32 ") libmagic=32-bit;;
5050
*-n32|*"-n32 ") libmagic=N32;;
5051
*-64|*"-64 ") libmagic=64-bit;;
5052
*) libmagic=never-match;;
5054
lt_cv_deplibs_check_method=pass_all
5057
# This must be Linux ELF.
5058
linux* | k*bsd*-gnu | kopensolaris*-gnu)
5059
lt_cv_deplibs_check_method=pass_all
5062
netbsd* | netbsdelf*-gnu)
5063
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5064
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5066
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5071
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5072
lt_cv_file_magic_cmd=/usr/bin/file
5073
lt_cv_file_magic_test_file=/usr/lib/libnls.so
5077
lt_cv_deplibs_check_method=pass_all
5081
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5082
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5084
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5088
osf3* | osf4* | osf5*)
5089
lt_cv_deplibs_check_method=pass_all
5093
lt_cv_deplibs_check_method=pass_all
5097
lt_cv_deplibs_check_method=pass_all
5100
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5101
lt_cv_deplibs_check_method=pass_all
5105
case $host_vendor in
5107
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]]'
5108
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5111
lt_cv_deplibs_check_method=pass_all
5114
lt_cv_file_magic_cmd='/bin/file'
5115
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5118
lt_cv_file_magic_cmd='/bin/file'
5119
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5120
lt_cv_file_magic_test_file=/lib/libc.so
5123
lt_cv_deplibs_check_method=pass_all
5126
lt_cv_deplibs_check_method=pass_all
5132
lt_cv_deplibs_check_method=pass_all
5136
file_magic_cmd=$lt_cv_file_magic_cmd
5137
deplibs_check_method=$lt_cv_deplibs_check_method
5138
test -z "$deplibs_check_method" && deplibs_check_method=unknown
5140
_LT_DECL([], [deplibs_check_method], [1],
5141
[Method to check whether dependent libraries are shared objects])
5142
_LT_DECL([], [file_magic_cmd], [1],
5143
[Command to use when deplibs_check_method == "file_magic"])
5144
])# _LT_CHECK_MAGIC_METHOD
5149
# find the pathname to a BSD- or MS-compatible name lister
5150
AC_DEFUN([LT_PATH_NM],
5151
[AC_REQUIRE([AC_PROG_CC])dnl
5152
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
5153
[if test -n "$NM"; then
5154
# Let the user override the test.
5157
lt_nm_to_check="${ac_tool_prefix}nm"
5158
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5159
lt_nm_to_check="$lt_nm_to_check nm"
5161
for lt_tmp_nm in $lt_nm_to_check; do
5162
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5163
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5165
test -z "$ac_dir" && ac_dir=.
5166
tmp_nm="$ac_dir/$lt_tmp_nm"
5167
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5168
# Check to see if the nm accepts a BSD-compat flag.
5169
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
5170
# nm: unknown option "B" ignored
5171
# Tru64's nm complains that /dev/null is an invalid object file
5172
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5173
*/dev/null* | *'Invalid file or object type'*)
5174
lt_cv_path_NM="$tmp_nm -B"
5178
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5180
lt_cv_path_NM="$tmp_nm -p"
5184
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5185
continue # so that we can try to find one that supports BSD flags
5194
: ${lt_cv_path_NM=no}
5196
if test "$lt_cv_path_NM" != "no"; then
5199
# Didn't find any BSD compatible name lister, look for dumpbin.
5200
AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
5202
if test "$DUMPBIN" != ":"; then
5206
test -z "$NM" && NM=nm
5208
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
5210
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
5211
[lt_cv_nm_interface="BSD nm"
5212
echo "int some_variable = 0;" > conftest.$ac_ext
5213
(eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
5214
(eval "$ac_compile" 2>conftest.err)
5215
cat conftest.err >&AS_MESSAGE_LOG_FD
5216
(eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
5217
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5218
cat conftest.err >&AS_MESSAGE_LOG_FD
5219
(eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
5220
cat conftest.out >&AS_MESSAGE_LOG_FD
5221
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5222
lt_cv_nm_interface="MS dumpbin"
5228
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
5229
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
5230
dnl aclocal-1.4 backwards compatibility:
5231
dnl AC_DEFUN([AM_PROG_NM], [])
5232
dnl AC_DEFUN([AC_PROG_NM], [])
5237
# check for math library
5238
AC_DEFUN([LT_LIB_M],
5239
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5242
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
5243
# These system don't have libm, or don't need it
5246
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
5247
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5250
AC_CHECK_LIB(m, cos, LIBM="-lm")
5257
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
5258
dnl aclocal-1.4 backwards compatibility:
5259
dnl AC_DEFUN([AC_CHECK_LIBM], [])
5262
# _LT_COMPILER_NO_RTTI([TAGNAME])
5263
# -------------------------------
5264
m4_defun([_LT_COMPILER_NO_RTTI],
5265
[m4_require([_LT_TAG_COMPILER])dnl
5267
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5269
if test "$GCC" = yes; then
5270
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5272
_LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5273
lt_cv_prog_compiler_rtti_exceptions,
5274
[-fno-rtti -fno-exceptions], [],
5275
[_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5277
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
5278
[Compiler flag to turn off builtin functions])
5279
])# _LT_COMPILER_NO_RTTI
5282
# _LT_CMD_GLOBAL_SYMBOLS
5283
# ----------------------
5284
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
5285
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5286
AC_REQUIRE([AC_PROG_CC])dnl
5287
AC_REQUIRE([LT_PATH_NM])dnl
5288
AC_REQUIRE([LT_PATH_LD])dnl
5289
m4_require([_LT_DECL_SED])dnl
5290
m4_require([_LT_DECL_EGREP])dnl
5291
m4_require([_LT_TAG_COMPILER])dnl
5293
# Check for command to grab the raw symbol name followed by C symbol from nm.
5294
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5295
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5297
# These are sane defaults that work on at least a few old systems.
5298
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
5300
# Character class describing NM global symbol codes.
5301
symcode='[[BCDEGRST]]'
5303
# Regexp to match symbols that can be accessed directly from C.
5304
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5306
# Define system-specific variables.
5311
cygwin* | mingw* | pw32* | cegcc*)
5312
symcode='[[ABCDGISTW]]'
5315
if test "$host_cpu" = ia64; then
5316
symcode='[[ABCDEGRST]]'
5320
symcode='[[BCDEGRST]]'
5323
symcode='[[BCDEGQRST]]'
5334
sysv5* | sco5v6* | unixware* | OpenUNIX*)
5338
symcode='[[DFNSTU]]'
5342
# If we're using GNU nm, then use its standard symbol codes.
5343
case `$NM -V 2>&1` in
5344
*GNU* | *'with BFD'*)
5345
symcode='[[ABCDGIRSTW]]' ;;
5348
# Transform an extracted symbol line into a proper C declaration.
5349
# Some systems (esp. on ia64) link data and code symbols differently,
5350
# so use this general approach.
5351
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5353
# Transform an extracted symbol line into symbol name and symbol address
5354
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
5355
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'"
5357
# Handle CRLF in mingw tool chain
5361
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5365
# Try without a prefix underscore, then with it.
5366
for ac_symprfx in "" "_"; do
5368
# Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5369
symxfrm="\\1 $ac_symprfx\\2 \\2"
5371
# Write the raw and C identifiers.
5372
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5373
# Fake it for dumpbin and say T for any non-static function
5374
# and D for any global variable.
5375
# Also find C++ and __fastcall symbols from MSVC++,
5376
# which start with @ or ?.
5377
lt_cv_sys_global_symbol_pipe="$AWK ['"\
5378
" {last_section=section; section=\$ 3};"\
5379
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5380
" \$ 0!~/External *\|/{next};"\
5381
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5382
" {if(hide[section]) next};"\
5383
" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5384
" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5385
" s[1]~/^[@?]/{print s[1], s[1]; next};"\
5386
" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5387
" ' prfx=^$ac_symprfx]"
5389
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5392
# Check to see that the pipe works correctly.
5396
cat > conftest.$ac_ext <<_LT_EOF
5401
void nm_test_func(void);
5402
void nm_test_func(void){}
5406
int main(){nm_test_var='a';nm_test_func();return(0);}
5409
if AC_TRY_EVAL(ac_compile); then
5410
# Now try to grab the symbols.
5412
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5413
# Try sorting and uniquifying the output.
5414
if sort "$nlist" | uniq > "$nlist"T; then
5415
mv -f "$nlist"T "$nlist"
5420
# Make sure that we snagged all the symbols we need.
5421
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5422
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5423
cat <<_LT_EOF > conftest.$ac_ext
5429
# Now generate the symbol file.
5430
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5432
cat <<_LT_EOF >> conftest.$ac_ext
5434
/* The mapping between symbol names and symbols. */
5439
lt__PROGRAM__LTX_preloaded_symbols[[]] =
5441
{ "@PROGRAM@", (void *) 0 },
5443
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5444
cat <<\_LT_EOF >> conftest.$ac_ext
5448
/* This works around a problem in FreeBSD linker */
5449
#ifdef FREEBSD_WORKAROUND
5450
static const void *lt_preloaded_setup() {
5451
return lt__PROGRAM__LTX_preloaded_symbols;
5459
# Now try linking the two files.
5460
mv conftest.$ac_objext conftstm.$ac_objext
5461
lt_save_LIBS="$LIBS"
5462
lt_save_CFLAGS="$CFLAGS"
5463
LIBS="conftstm.$ac_objext"
5464
CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5465
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5468
LIBS="$lt_save_LIBS"
5469
CFLAGS="$lt_save_CFLAGS"
5471
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5474
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5477
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5480
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5481
cat conftest.$ac_ext >&5
5483
rm -rf conftest* conftst*
5485
# Do not use the global_symbol_pipe unless it works.
5486
if test "$pipe_works" = yes; then
5489
lt_cv_sys_global_symbol_pipe=
5493
if test -z "$lt_cv_sys_global_symbol_pipe"; then
5494
lt_cv_sys_global_symbol_to_cdecl=
5496
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5497
AC_MSG_RESULT(failed)
5502
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5503
[Take the output of nm and produce a listing of raw symbols and C names])
5504
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5505
[Transform the output of nm in a proper C declaration])
5506
_LT_DECL([global_symbol_to_c_name_address],
5507
[lt_cv_sys_global_symbol_to_c_name_address], [1],
5508
[Transform the output of nm in a C name address pair])
5509
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5510
[lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5511
[Transform the output of nm in a C name address pair when lib prefix is needed])
5512
]) # _LT_CMD_GLOBAL_SYMBOLS
5515
# _LT_COMPILER_PIC([TAGNAME])
5516
# ---------------------------
5517
m4_defun([_LT_COMPILER_PIC],
5518
[m4_require([_LT_TAG_COMPILER])dnl
5519
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
5520
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5521
_LT_TAGVAR(lt_prog_compiler_static, $1)=
5523
AC_MSG_CHECKING([for $compiler option to produce PIC])
5524
m4_if([$1], [CXX], [
5525
# C++ specific cases for pic, static, wl, etc.
5526
if test "$GXX" = yes; then
5527
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5528
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5532
# All AIX code is PIC.
5533
if test "$host_cpu" = ia64; then
5534
# AIX 5 now supports IA64 processor
5535
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5542
# see comment about AmigaOS4 .so support
5543
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5546
# FIXME: we need at least 68020 code to build shared libraries, but
5547
# adding the `-m68020' flag to GCC prevents building anything better,
5549
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5554
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5555
# PIC is the default for these OSes.
5557
mingw* | cygwin* | os2* | pw32* | cegcc*)
5558
# This hack is so that the source file can tell whether it is being
5559
# built for inclusion in a dll (and should export symbols for example).
5560
# Although the cygwin gcc ignores -fPIC, still need this for old-style
5561
# (--disable-auto-import) libraries
5562
m4_if([$1], [GCJ], [],
5563
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5565
darwin* | rhapsody*)
5566
# PIC is the default on this platform
5567
# Common symbols not allowed in MH_DYLIB files
5568
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5571
# DJGPP does not support shared libraries at all
5572
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5575
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
5576
# Instead, we relocate shared libraries at runtime.
5579
if test -d /usr/nec; then
5580
_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5584
# PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5585
# PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
5586
# sets the default TLS model and affects inlining.
5591
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5596
# QNX uses GNU C++, but need to define -shared option too, otherwise
5598
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5601
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5607
# All AIX code is PIC.
5608
if test "$host_cpu" = ia64; then
5609
# AIX 5 now supports IA64 processor
5610
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5612
_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5616
case $cc_basename in
5618
# Green Hills C++ Compiler
5619
# _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"
5624
case $cc_basename in
5626
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5629
# Green Hills C++ Compiler
5630
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5636
freebsd* | dragonfly*)
5637
# FreeBSD uses GNU C++
5639
hpux9* | hpux10* | hpux11*)
5640
case $cc_basename in
5642
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5643
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5644
if test "$host_cpu" != ia64; then
5645
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5649
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5650
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5656
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5665
# This is c89, which is MS Visual C++ (no shared libs)
5666
# Anyone wants to do a port?
5668
irix5* | irix6* | nonstopux*)
5669
case $cc_basename in
5671
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5672
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5673
# CC pic flag -KPIC is the default.
5679
linux* | k*bsd*-gnu | kopensolaris*-gnu)
5680
case $cc_basename in
5683
_LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5684
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5687
# old Intel C++ for x86_64 which still supported -KPIC.
5688
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5689
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5690
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5693
# Intel C++, used to be incompatible with GCC.
5694
# ICC 10 doesn't accept -KPIC any more.
5695
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5696
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5697
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5700
# Portland Group C++ compiler
5701
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5702
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5703
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5707
# Make sure the PIC flag is empty. It appears that all Alpha
5708
# Linux and Compaq Tru64 Unix objects are PIC.
5709
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5710
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5714
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5715
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5716
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5719
case `$CC -V 2>&1 | sed 5q` in
5722
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5723
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5724
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5735
case $cc_basename in
5737
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5743
netbsd* | netbsdelf*-gnu)
5746
# QNX uses GNU C++, but need to define -shared option too, otherwise
5748
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5750
osf3* | osf4* | osf5*)
5751
case $cc_basename in
5753
_LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5756
# Rational C++ 2.4.1
5757
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5760
# Digital/Compaq C++
5761
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5762
# Make sure the PIC flag is empty. It appears that all Alpha
5763
# Linux and Compaq Tru64 Unix objects are PIC.
5764
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5765
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5774
case $cc_basename in
5776
# Sun C++ 4.2, 5.x and Centerline C++
5777
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5778
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5779
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5782
# Green Hills C++ Compiler
5783
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5790
case $cc_basename in
5793
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5794
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5798
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5804
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5805
case $cc_basename in
5807
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5808
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5809
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5814
case $cc_basename in
5816
# NonStop-UX NCC 3.20
5817
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5826
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5832
if test "$GCC" = yes; then
5833
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5834
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5838
# All AIX code is PIC.
5839
if test "$host_cpu" = ia64; then
5840
# AIX 5 now supports IA64 processor
5841
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5848
# see comment about AmigaOS4 .so support
5849
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5852
# FIXME: we need at least 68020 code to build shared libraries, but
5853
# adding the `-m68020' flag to GCC prevents building anything better,
5855
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5860
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5861
# PIC is the default for these OSes.
5864
mingw* | cygwin* | pw32* | os2* | cegcc*)
5865
# This hack is so that the source file can tell whether it is being
5866
# built for inclusion in a dll (and should export symbols for example).
5867
# Although the cygwin gcc ignores -fPIC, still need this for old-style
5868
# (--disable-auto-import) libraries
5869
m4_if([$1], [GCJ], [],
5870
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5873
darwin* | rhapsody*)
5874
# PIC is the default on this platform
5875
# Common symbols not allowed in MH_DYLIB files
5876
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5880
# PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5881
# PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
5882
# sets the default TLS model and affects inlining.
5888
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5894
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
5895
# Instead, we relocate shared libraries at runtime.
5899
# Just because we use GCC doesn't mean we suddenly get shared libraries
5900
# on systems that don't support them.
5901
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5906
# QNX uses GNU C++, but need to define -shared option too, otherwise
5908
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5912
if test -d /usr/nec; then
5913
_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5918
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5922
# PORTME Check for flag to pass linker flags through the system compiler.
5925
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5926
if test "$host_cpu" = ia64; then
5927
# AIX 5 now supports IA64 processor
5928
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5930
_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5934
mingw* | cygwin* | pw32* | os2* | cegcc*)
5935
# This hack is so that the source file can tell whether it is being
5936
# built for inclusion in a dll (and should export symbols for example).
5937
m4_if([$1], [GCJ], [],
5938
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5941
hpux9* | hpux10* | hpux11*)
5942
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5943
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5950
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5953
# Is there a better lt_prog_compiler_static that works with the bundled CC?
5954
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5957
irix5* | irix6* | nonstopux*)
5958
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5959
# PIC (with -KPIC) is the default.
5960
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5963
linux* | k*bsd*-gnu | kopensolaris*-gnu)
5964
case $cc_basename in
5965
# old Intel for x86_64 which still supported -KPIC.
5967
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5968
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5969
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5971
# icc used to be incompatible with GCC.
5972
# ICC 10 doesn't accept -KPIC any more.
5974
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5975
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5976
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5978
# Lahey Fortran 8.1.
5980
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5981
_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5982
_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5984
pgcc* | pgf77* | pgf90* | pgf95*)
5985
# Portland Group compilers (*not* the Pentium gcc compiler,
5986
# which looks to be a dead project)
5987
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5988
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5989
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5992
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5993
# All Alpha code is PIC.
5994
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5997
# IBM XL C 8.0/Fortran 10.1 on PPC
5998
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5999
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6000
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6003
case `$CC -V 2>&1 | sed 5q` in
6006
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6007
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6008
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6011
# Sun Fortran 8.3 passes all unrecognized flags to the linker
6012
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6013
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6014
_LT_TAGVAR(lt_prog_compiler_wl, $1)=''
6022
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6023
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6027
# QNX uses GNU C++, but need to define -shared option too, otherwise
6029
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6032
osf3* | osf4* | osf5*)
6033
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6034
# All OSF/1 code is PIC.
6035
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6039
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6043
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6044
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6045
case $cc_basename in
6047
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6049
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6054
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6055
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6056
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6059
sysv4 | sysv4.2uw2* | sysv4.3*)
6060
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6061
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6062
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6066
if test -d /usr/nec ;then
6067
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6068
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6072
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6073
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6074
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6075
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6079
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6080
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6084
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6085
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6089
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6095
# For platforms which do not support PIC, -DPIC is meaningless:
6097
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6100
_LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
6103
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
6104
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
6105
[How to pass a linker flag through the compiler])
6108
# Check to make sure the PIC flag actually works.
6110
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6111
_LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
6112
[_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
6113
[$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
6114
[case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
6116
*) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6118
[_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6119
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6121
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
6122
[Additional compiler flags for building library objects])
6125
# Check to make sure the static flag actually works.
6127
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
6128
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6129
_LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
6130
$lt_tmp_static_flag,
6132
[_LT_TAGVAR(lt_prog_compiler_static, $1)=])
6133
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
6134
[Compiler flag to prevent dynamic linking])
6135
])# _LT_COMPILER_PIC
6138
# _LT_LINKER_SHLIBS([TAGNAME])
6139
# ----------------------------
6140
# See if the linker supports building shared libraries.
6141
m4_defun([_LT_LINKER_SHLIBS],
6142
[AC_REQUIRE([LT_PATH_LD])dnl
6143
AC_REQUIRE([LT_PATH_NM])dnl
6144
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6145
m4_require([_LT_DECL_EGREP])dnl
6146
m4_require([_LT_DECL_SED])dnl
6147
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
6148
m4_require([_LT_TAG_COMPILER])dnl
6149
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6150
m4_if([$1], [CXX], [
6151
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6154
# If we're using GNU nm, then we don't want the "-C" option.
6155
# -C means demangle to AIX nm, but means don't demangle with GNU nm
6156
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6157
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6159
_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'
6163
_LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6165
cygwin* | mingw* | cegcc*)
6166
_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'
6168
linux* | k*bsd*-gnu)
6169
_LT_TAGVAR(link_all_deplibs, $1)=no
6172
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6175
_LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6178
_LT_TAGVAR(allow_undefined_flag, $1)=
6179
_LT_TAGVAR(always_export_symbols, $1)=no
6180
_LT_TAGVAR(archive_cmds, $1)=
6181
_LT_TAGVAR(archive_expsym_cmds, $1)=
6182
_LT_TAGVAR(compiler_needs_object, $1)=no
6183
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6184
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6185
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6186
_LT_TAGVAR(hardcode_automatic, $1)=no
6187
_LT_TAGVAR(hardcode_direct, $1)=no
6188
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6189
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6190
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6191
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6192
_LT_TAGVAR(hardcode_minus_L, $1)=no
6193
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6194
_LT_TAGVAR(inherit_rpath, $1)=no
6195
_LT_TAGVAR(link_all_deplibs, $1)=unknown
6196
_LT_TAGVAR(module_cmds, $1)=
6197
_LT_TAGVAR(module_expsym_cmds, $1)=
6198
_LT_TAGVAR(old_archive_from_new_cmds, $1)=
6199
_LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6200
_LT_TAGVAR(thread_safe_flag_spec, $1)=
6201
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6202
# include_expsyms should be a list of space-separated symbols to be *always*
6203
# included in the symbol list
6204
_LT_TAGVAR(include_expsyms, $1)=
6205
# exclude_expsyms can be an extended regexp of symbols to exclude
6206
# it will be wrapped by ` (' and `)$', so one must not match beginning or
6207
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6208
# as well as any symbol that contains `d'.
6209
_LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6210
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6211
# platforms (ab)use it in PIC code, but their linkers get confused if
6212
# the symbol is explicitly referenced. Since portable code cannot
6213
# rely on this symbol name, it's probably fine to never include it in
6214
# preloaded symbol tables.
6215
# Exclude shared library initialization/finalization symbols.
6216
dnl Note also adjust exclude_expsyms for C++ above.
6217
extract_expsyms_cmds=
6220
cygwin* | mingw* | pw32* | cegcc*)
6221
# FIXME: the MSVC++ port hasn't been tested in a loooong time
6222
# When not using gcc, we currently assume that we are using
6223
# Microsoft Visual C++.
6224
if test "$GCC" != yes; then
6229
# we just hope/assume this is gcc and not c89 (= MSVC++)
6235
linux* | k*bsd*-gnu)
6236
_LT_TAGVAR(link_all_deplibs, $1)=no
6240
_LT_TAGVAR(ld_shlibs, $1)=yes
6241
if test "$with_gnu_ld" = yes; then
6242
# If archive_cmds runs LD, not CC, wlarc should be empty
6245
# Set some defaults for GNU ld with shared library support. These
6246
# are reset later if shared libraries are not supported. Putting them
6247
# here allows them to be overridden if necessary.
6248
runpath_var=LD_RUN_PATH
6249
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6250
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6251
# ancient GNU ld didn't support --whole-archive et. al.
6252
if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6253
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6255
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6257
supports_anon_versioning=no
6258
case `$LD -v 2>&1` in
6259
*GNU\ gold*) supports_anon_versioning=yes ;;
6260
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6261
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6262
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6263
*\ 2.11.*) ;; # other 2.11 versions
6264
*) supports_anon_versioning=yes ;;
6267
# See if GNU ld supports shared libraries.
6270
# On AIX/PPC, the GNU linker is very broken
6271
if test "$host_cpu" != ia64; then
6272
_LT_TAGVAR(ld_shlibs, $1)=no
6275
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
6276
*** to be unable to reliably create shared libraries on AIX.
6277
*** Therefore, libtool is disabling shared libraries support. If you
6278
*** really care for shared libraries, you may want to modify your PATH
6279
*** so that a non-GNU linker is found, and then restart.
6288
# see comment about AmigaOS4 .so support
6289
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6290
_LT_TAGVAR(archive_expsym_cmds, $1)=''
6293
_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)'
6294
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6295
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6301
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6302
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6303
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6304
# support --undefined. This deserves some investigation. FIXME
6305
_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6307
_LT_TAGVAR(ld_shlibs, $1)=no
6311
cygwin* | mingw* | pw32* | cegcc*)
6312
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6313
# as there is no search path for DLLs.
6314
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6315
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6316
_LT_TAGVAR(always_export_symbols, $1)=no
6317
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6318
_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'
6320
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6321
_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'
6322
# If the export-symbols file already is a .def file (1st line
6323
# is EXPORTS), use it as is; otherwise, prepend...
6324
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6325
cp $export_symbols $output_objdir/$soname.def;
6327
echo EXPORTS > $output_objdir/$soname.def;
6328
cat $export_symbols >> $output_objdir/$soname.def;
6330
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6332
_LT_TAGVAR(ld_shlibs, $1)=no
6337
_LT_TAGVAR(hardcode_direct, $1)=no
6338
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6339
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6340
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6341
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6342
# Instead, shared libraries are loaded at an image base (0x10000000 by
6343
# default) and relocated if they conflict, which is a slow very memory
6344
# consuming and fragmenting process. To avoid this, we pick a random,
6345
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6346
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
6347
_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'
6348
_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'
6351
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
6353
if test "$host_os" = linux-dietlibc; then
6354
case $cc_basename in
6355
diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
6358
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6359
&& test "$tmp_diet" = no
6362
tmp_sharedflag='-shared'
6363
case $cc_basename,$host_cpu in
6364
pgcc*) # Portland Group C compiler
6365
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6366
tmp_addflag=' $pic_flag'
6368
pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
6369
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6370
tmp_addflag=' $pic_flag -Mnomain' ;;
6371
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
6372
tmp_addflag=' -i_dynamic' ;;
6373
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
6374
tmp_addflag=' -i_dynamic -nofor_main' ;;
6375
ifc* | ifort*) # Intel Fortran compiler
6376
tmp_addflag=' -nofor_main' ;;
6377
lf95*) # Lahey Fortran 8.1
6378
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6379
tmp_sharedflag='--shared' ;;
6380
xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
6381
tmp_sharedflag='-qmkshrobj'
6384
case `$CC -V 2>&1 | sed 5q` in
6385
*Sun\ C*) # Sun C 5.9
6386
_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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6387
_LT_TAGVAR(compiler_needs_object, $1)=yes
6388
tmp_sharedflag='-G' ;;
6389
*Sun\ F*) # Sun Fortran 8.3
6390
tmp_sharedflag='-G' ;;
6392
_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6394
if test "x$supports_anon_versioning" = xyes; then
6395
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6396
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6397
echo "local: *; };" >> $output_objdir/$libname.ver~
6398
$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6401
case $cc_basename in
6403
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6404
_LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6405
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6406
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6407
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
6408
if test "x$supports_anon_versioning" = xyes; then
6409
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6410
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6411
echo "local: *; };" >> $output_objdir/$libname.ver~
6412
$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6417
_LT_TAGVAR(ld_shlibs, $1)=no
6421
netbsd* | netbsdelf*-gnu)
6422
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6423
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6426
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6427
_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'
6432
if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6433
_LT_TAGVAR(ld_shlibs, $1)=no
6436
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6437
*** create shared libraries on Solaris systems. Therefore, libtool
6438
*** is disabling shared libraries support. We urge you to upgrade GNU
6439
*** binutils to release 2.9.1 or newer. Another option is to modify
6440
*** your PATH or compiler configuration so that the native linker is
6441
*** used, and then restart.
6444
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6445
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6446
_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'
6448
_LT_TAGVAR(ld_shlibs, $1)=no
6452
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6453
case `$LD -v 2>&1` in
6454
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6455
_LT_TAGVAR(ld_shlibs, $1)=no
6458
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6459
*** reliably create shared libraries on SCO systems. Therefore, libtool
6460
*** is disabling shared libraries support. We urge you to upgrade GNU
6461
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
6462
*** your PATH or compiler configuration so that the native linker is
6463
*** used, and then restart.
6468
# For security reasons, it is highly recommended that you always
6469
# use absolute paths for naming shared libraries, and exclude the
6470
# DT_RUNPATH tag from executables and libraries. But doing so
6471
# requires that you compile everything twice, which is a pain.
6472
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6473
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6474
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6475
_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'
6477
_LT_TAGVAR(ld_shlibs, $1)=no
6484
_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6486
_LT_TAGVAR(hardcode_direct, $1)=yes
6487
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6491
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6492
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6493
_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'
6495
_LT_TAGVAR(ld_shlibs, $1)=no
6500
if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6502
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6503
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6504
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6507
# PORTME fill in a description of your system's linker (not GNU ld)
6510
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6511
_LT_TAGVAR(always_export_symbols, $1)=yes
6512
_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'
6513
# Note: this linker hardcodes the directories in LIBPATH if there
6514
# are no directories specified by -L.
6515
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6516
if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6517
# Neither direct hardcoding nor static linking is supported with a
6519
_LT_TAGVAR(hardcode_direct, $1)=unsupported
6524
if test "$host_cpu" = ia64; then
6525
# On IA64, the linker does run time linking by default, so we don't
6526
# have to do anything special.
6527
aix_use_runtimelinking=no
6528
exp_sym_flag='-Bexport'
6531
# If we're using GNU nm, then we don't want the "-C" option.
6532
# -C means demangle to AIX nm, but means don't demangle with GNU nm
6533
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6534
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6536
_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'
6538
aix_use_runtimelinking=no
6540
# Test if we are trying to use run time linking or normal
6541
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6542
# need to do runtime linking.
6543
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6544
for ld_flag in $LDFLAGS; do
6545
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6546
aix_use_runtimelinking=yes
6553
exp_sym_flag='-bexport'
6554
no_entry_flag='-bnoentry'
6557
# When large executables or shared objects are built, AIX ld can
6558
# have problems creating the table of contents. If linking a library
6559
# or program results in "error TOC overflow" add -mminimal-toc to
6560
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6561
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6563
_LT_TAGVAR(archive_cmds, $1)=''
6564
_LT_TAGVAR(hardcode_direct, $1)=yes
6565
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6566
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6567
_LT_TAGVAR(link_all_deplibs, $1)=yes
6568
_LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6570
if test "$GCC" = yes; then
6571
case $host_os in aix4.[[012]]|aix4.[[012]].*)
6572
# We only want to do this on AIX 4.2 and lower, the check
6573
# below for broken collect2 doesn't work under 4.3+
6574
collect2name=`${CC} -print-prog-name=collect2`
6575
if test -f "$collect2name" &&
6576
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6578
# We have reworked collect2
6581
# We have old collect2
6582
_LT_TAGVAR(hardcode_direct, $1)=unsupported
6583
# It fails to find uninstalled libraries when the uninstalled
6584
# path is not listed in the libpath. Setting hardcode_minus_L
6585
# to unsupported forces relinking
6586
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6587
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6588
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6592
shared_flag='-shared'
6593
if test "$aix_use_runtimelinking" = yes; then
6594
shared_flag="$shared_flag "'${wl}-G'
6596
_LT_TAGVAR(link_all_deplibs, $1)=no
6599
if test "$host_cpu" = ia64; then
6600
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6601
# chokes on -Wl,-G. The following line is correct:
6604
if test "$aix_use_runtimelinking" = yes; then
6605
shared_flag='${wl}-G'
6607
shared_flag='${wl}-bM:SRE'
6612
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6613
# It seems that -bexpall does not export symbols beginning with
6614
# underscore (_), so it is better to generate a list of symbols to export.
6615
_LT_TAGVAR(always_export_symbols, $1)=yes
6616
if test "$aix_use_runtimelinking" = yes; then
6617
# Warning - without using the other runtime loading flags (-brtl),
6618
# -berok will link without error, but may produce a broken library.
6619
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6620
# Determine the default libpath from the value encoded in an
6622
_LT_SYS_MODULE_PATH_AIX
6623
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6624
_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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6626
if test "$host_cpu" = ia64; then
6627
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6628
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6629
_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"
6631
# Determine the default libpath from the value encoded in an
6633
_LT_SYS_MODULE_PATH_AIX
6634
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6635
# Warning - without using the other run time loading flags,
6636
# -berok will link without error, but may produce a broken library.
6637
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6638
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6639
# Exported symbols can be pulled into shared objects from archives
6640
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6641
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6642
# This is similar to how AIX traditionally builds its shared libraries.
6643
_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'
6651
# see comment about AmigaOS4 .so support
6652
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6653
_LT_TAGVAR(archive_expsym_cmds, $1)=''
6656
_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)'
6657
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6658
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6664
_LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6667
cygwin* | mingw* | pw32* | cegcc*)
6668
# When not using gcc, we currently assume that we are using
6669
# Microsoft Visual C++.
6670
# hardcode_libdir_flag_spec is actually meaningless, as there is
6671
# no search path for DLLs.
6672
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6673
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6674
# Tell ltmain to make .lib files, not .a files.
6676
# Tell ltmain to make .dll files, not .so files.
6678
# FIXME: Setting linknames here is a bad hack.
6679
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
6680
# The linker will automatically build a .lib file if we build a DLL.
6681
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6682
# FIXME: Should let the user specify the lib program.
6683
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6684
_LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6685
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6688
darwin* | rhapsody*)
6689
_LT_DARWIN_LINKER_FEATURES($1)
6693
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6694
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6695
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6699
_LT_TAGVAR(ld_shlibs, $1)=no
6702
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6703
# support. Future versions do this automatically, but an explicit c++rt0.o
6704
# does not break anything, and helps significantly (at the cost of a little
6707
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6708
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6709
_LT_TAGVAR(hardcode_direct, $1)=yes
6710
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6713
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
6715
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6716
_LT_TAGVAR(hardcode_direct, $1)=yes
6717
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6718
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6721
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6722
freebsd* | dragonfly*)
6723
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6724
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6725
_LT_TAGVAR(hardcode_direct, $1)=yes
6726
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6730
if test "$GCC" = yes; then
6731
_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'
6733
_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'
6735
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6736
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6737
_LT_TAGVAR(hardcode_direct, $1)=yes
6739
# hardcode_minus_L: Not really in the search PATH,
6740
# but as the default location of the library.
6741
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6742
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6746
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6747
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6749
_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6751
if test "$with_gnu_ld" = no; then
6752
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6753
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6754
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6755
_LT_TAGVAR(hardcode_direct, $1)=yes
6756
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6757
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6758
# hardcode_minus_L: Not really in the search PATH,
6759
# but as the default location of the library.
6760
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6765
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6768
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6771
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6774
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6780
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6783
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6786
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6790
if test "$with_gnu_ld" = no; then
6791
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6792
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6796
_LT_TAGVAR(hardcode_direct, $1)=no
6797
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6800
_LT_TAGVAR(hardcode_direct, $1)=yes
6801
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6802
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6804
# hardcode_minus_L: Not really in the search PATH,
6805
# but as the default location of the library.
6806
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6812
irix5* | irix6* | nonstopux*)
6813
if test "$GCC" = yes; then
6814
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6815
# Try to use the -exported_symbol ld option, if it does not
6816
# work, assume that -exports_file does not work either and
6817
# implicitly export all symbols.
6818
save_LDFLAGS="$LDFLAGS"
6819
LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6820
AC_LINK_IFELSE(int foo(void) {},
6821
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
6823
LDFLAGS="$save_LDFLAGS"
6825
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6826
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
6828
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6829
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6830
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6831
_LT_TAGVAR(inherit_rpath, $1)=yes
6832
_LT_TAGVAR(link_all_deplibs, $1)=yes
6835
netbsd* | netbsdelf*-gnu)
6836
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6837
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6839
_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6841
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6842
_LT_TAGVAR(hardcode_direct, $1)=yes
6843
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6847
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6848
_LT_TAGVAR(hardcode_direct, $1)=yes
6849
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6850
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6851
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6858
if test -f /usr/libexec/ld.so; then
6859
_LT_TAGVAR(hardcode_direct, $1)=yes
6860
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6861
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6862
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6863
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6864
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6865
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6866
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6869
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6870
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6871
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6874
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6875
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6880
_LT_TAGVAR(ld_shlibs, $1)=no
6885
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6886
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6887
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6888
_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'
6889
_LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6893
if test "$GCC" = yes; then
6894
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6895
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6897
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6898
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6900
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6901
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6902
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6905
osf4* | osf5*) # as osf3* with the addition of -msym flag
6906
if test "$GCC" = yes; then
6907
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6908
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6909
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6911
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6912
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6913
_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~
6914
$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
6916
# Both c and cxx compiler support -rpath directly
6917
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6919
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6920
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6924
_LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6925
if test "$GCC" = yes; then
6927
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6928
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6929
$CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6931
case `$CC -V 2>&1` in
6934
_LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6935
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6936
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6940
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6941
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6942
$CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6946
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6947
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6949
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6951
# The compiler driver will combine and reorder linker options,
6952
# but understands `-z linker_flag'. GCC discards it without `$wl',
6953
# but is careful enough not to reorder.
6954
# Supported since Solaris 2.6 (maybe 2.5.1?)
6955
if test "$GCC" = yes; then
6956
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6958
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6962
_LT_TAGVAR(link_all_deplibs, $1)=yes
6966
if test "x$host_vendor" = xsequent; then
6967
# Use $CC to link under sequent, because it throws in some extra .o
6968
# files that make .init and .fini sections work.
6969
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6971
_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6973
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6974
_LT_TAGVAR(hardcode_direct, $1)=yes
6975
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6976
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6980
case $host_vendor in
6982
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6983
_LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6986
## LD is ld it makes a PLAMLIB
6987
## CC just makes a GrossModule.
6988
_LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6989
_LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6990
_LT_TAGVAR(hardcode_direct, $1)=no
6993
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6994
_LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6997
runpath_var='LD_RUN_PATH'
6998
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7002
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7003
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7004
_LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7008
if test -d /usr/nec; then
7009
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7010
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7011
runpath_var=LD_RUN_PATH
7012
hardcode_runpath_var=yes
7013
_LT_TAGVAR(ld_shlibs, $1)=yes
7017
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7018
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7019
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7020
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7021
runpath_var='LD_RUN_PATH'
7023
if test "$GCC" = yes; then
7024
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7025
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7027
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7028
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7032
sysv5* | sco3.2v5* | sco5v6*)
7033
# Note: We can NOT use -z defs as we might desire, because we do not
7034
# link with -lc, and that would cause any symbols used from libc to
7035
# always be unresolved, which means just about no library would
7036
# ever link correctly. If we're not using GNU ld we use -z text
7037
# though, which does catch some bad symbols but isn't as heavy-handed
7039
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7040
_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7041
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7042
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7043
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7044
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7045
_LT_TAGVAR(link_all_deplibs, $1)=yes
7046
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7047
runpath_var='LD_RUN_PATH'
7049
if test "$GCC" = yes; then
7050
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7051
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7053
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7054
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7059
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7060
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7061
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7065
_LT_TAGVAR(ld_shlibs, $1)=no
7069
if test x$host_vendor = xsni; then
7071
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7072
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
7078
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7079
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7081
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
7083
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
7084
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
7085
_LT_DECL([], [extract_expsyms_cmds], [2],
7086
[The commands to extract the exported symbol list from a shared archive])
7089
# Do we need to explicitly link libc?
7091
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
7093
# Assume -lc should be added
7094
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7096
if test "$enable_shared" = yes && test "$GCC" = yes; then
7097
case $_LT_TAGVAR(archive_cmds, $1) in
7099
# FIXME: we may have to deal with multi-command sequences.
7102
# Test whether the compiler implicitly links with -lc since on some
7103
# systems, -lgcc has to come before -lc. If gcc already passes -lc
7104
# to ld, don't add -lc before -lgcc.
7105
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7107
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7109
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7112
libobjs=conftest.$ac_objext
7114
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
7115
pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
7121
lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
7122
_LT_TAGVAR(allow_undefined_flag, $1)=
7123
if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
7125
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7127
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7129
_LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7131
cat conftest.err 1>&5
7134
AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
7141
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
7142
[Whether or not to add -lc for building shared libraries])
7143
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
7144
[enable_shared_with_static_runtimes], [0],
7145
[Whether or not to disallow shared libs when runtime libs are static])
7146
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
7147
[Compiler flag to allow reflexive dlopens])
7148
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
7149
[Compiler flag to generate shared objects directly from archives])
7150
_LT_TAGDECL([], [compiler_needs_object], [1],
7151
[Whether the compiler copes with passing no objects directly])
7152
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
7153
[Create an old-style archive from a shared archive])
7154
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
7155
[Create a temporary old-style archive to link instead of a shared archive])
7156
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
7157
_LT_TAGDECL([], [archive_expsym_cmds], [2])
7158
_LT_TAGDECL([], [module_cmds], [2],
7159
[Commands used to build a loadable module if different from building
7161
_LT_TAGDECL([], [module_expsym_cmds], [2])
7162
_LT_TAGDECL([], [with_gnu_ld], [1],
7163
[Whether we are building with GNU ld or not])
7164
_LT_TAGDECL([], [allow_undefined_flag], [1],
7165
[Flag that allows shared libraries with undefined symbols to be built])
7166
_LT_TAGDECL([], [no_undefined_flag], [1],
7167
[Flag that enforces no undefined symbols])
7168
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
7169
[Flag to hardcode $libdir into a binary during linking.
7170
This must work even if $libdir does not exist])
7171
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
7172
[[If ld is used when linking, flag to hardcode $libdir into a binary
7173
during linking. This must work even if $libdir does not exist]])
7174
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
7175
[Whether we need a single "-rpath" flag with a separated argument])
7176
_LT_TAGDECL([], [hardcode_direct], [0],
7177
[Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7178
DIR into the resulting binary])
7179
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
7180
[Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7181
DIR into the resulting binary and the resulting library dependency is
7182
"absolute", i.e impossible to change by setting ${shlibpath_var} if the
7183
library is relocated])
7184
_LT_TAGDECL([], [hardcode_minus_L], [0],
7185
[Set to "yes" if using the -LDIR flag during linking hardcodes DIR
7186
into the resulting binary])
7187
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
7188
[Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
7189
into the resulting binary])
7190
_LT_TAGDECL([], [hardcode_automatic], [0],
7191
[Set to "yes" if building a shared library automatically hardcodes DIR
7192
into the library and all subsequent libraries and executables linked
7194
_LT_TAGDECL([], [inherit_rpath], [0],
7195
[Set to yes if linker adds runtime paths of dependent libraries
7196
to runtime path list])
7197
_LT_TAGDECL([], [link_all_deplibs], [0],
7198
[Whether libtool must link a program against all its dependency libraries])
7199
_LT_TAGDECL([], [fix_srcfile_path], [1],
7200
[Fix the shell variable $srcfile for the compiler])
7201
_LT_TAGDECL([], [always_export_symbols], [0],
7202
[Set to "yes" if exported symbols are required])
7203
_LT_TAGDECL([], [export_symbols_cmds], [2],
7204
[The commands to list exported symbols])
7205
_LT_TAGDECL([], [exclude_expsyms], [1],
7206
[Symbols that should not be listed in the preloaded symbols])
7207
_LT_TAGDECL([], [include_expsyms], [1],
7208
[Symbols that must always be exported])
7209
_LT_TAGDECL([], [prelink_cmds], [2],
7210
[Commands necessary for linking programs (against libraries) with templates])
7211
_LT_TAGDECL([], [file_list_spec], [1],
7212
[Specify filename containing input files])
7213
dnl FIXME: Not yet implemented
7214
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
7215
dnl [Compiler flag to generate thread safe objects])
7216
])# _LT_LINKER_SHLIBS
7219
# _LT_LANG_C_CONFIG([TAG])
7220
# ------------------------
7221
# Ensure that the configuration variables for a C compiler are suitably
7222
# defined. These variables are subsequently used by _LT_CONFIG to write
7223
# the compiler configuration to `libtool'.
7224
m4_defun([_LT_LANG_C_CONFIG],
7225
[m4_require([_LT_DECL_EGREP])dnl
7229
# Source file extension for C test sources.
7232
# Object file extension for compiled C test sources.
7234
_LT_TAGVAR(objext, $1)=$objext
7236
# Code to be used in simple compile tests
7237
lt_simple_compile_test_code="int some_variable = 0;"
7239
# Code to be used in simple link tests
7240
lt_simple_link_test_code='int main(){return(0);}'
7243
# Save the default compiler, since it gets overwritten when the other
7244
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7245
compiler_DEFAULT=$CC
7247
# save warnings/boilerplate of simple test code
7248
_LT_COMPILER_BOILERPLATE
7249
_LT_LINKER_BOILERPLATE
7251
if test -n "$compiler"; then
7252
_LT_COMPILER_NO_RTTI($1)
7253
_LT_COMPILER_PIC($1)
7254
_LT_COMPILER_C_O($1)
7255
_LT_COMPILER_FILE_LOCKS($1)
7256
_LT_LINKER_SHLIBS($1)
7257
_LT_SYS_DYNAMIC_LINKER($1)
7258
_LT_LINKER_HARDCODE_LIBPATH($1)
7262
# Report which library types will actually be built
7263
AC_MSG_CHECKING([if libtool supports shared libraries])
7264
AC_MSG_RESULT([$can_build_shared])
7266
AC_MSG_CHECKING([whether to build shared libraries])
7267
test "$can_build_shared" = "no" && enable_shared=no
7269
# On AIX, shared libraries and static libraries use the same namespace, and
7270
# are all built from PIC.
7273
test "$enable_shared" = yes && enable_static=no
7274
if test -n "$RANLIB"; then
7275
archive_cmds="$archive_cmds~\$RANLIB \$lib"
7276
postinstall_cmds='$RANLIB $lib'
7281
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7282
test "$enable_shared" = yes && enable_static=no
7286
AC_MSG_RESULT([$enable_shared])
7288
AC_MSG_CHECKING([whether to build static libraries])
7289
# Make sure either enable_shared or enable_static is yes.
7290
test "$enable_shared" = yes || enable_static=yes
7291
AC_MSG_RESULT([$enable_static])
7297
])# _LT_LANG_C_CONFIG
7302
# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
7303
# compiler, we have our own version here.
7304
m4_defun([_LT_PROG_CXX],
7306
pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
7308
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7309
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7310
(test "X$CXX" != "Xg++"))) ; then
7313
_lt_caught_CXX_error=yes
7315
popdef([AC_MSG_ERROR])
7318
dnl aclocal-1.4 backwards compatibility:
7319
dnl AC_DEFUN([_LT_PROG_CXX], [])
7322
# _LT_LANG_CXX_CONFIG([TAG])
7323
# --------------------------
7324
# Ensure that the configuration variables for a C++ compiler are suitably
7325
# defined. These variables are subsequently used by _LT_CONFIG to write
7326
# the compiler configuration to `libtool'.
7327
m4_defun([_LT_LANG_CXX_CONFIG],
7328
[AC_REQUIRE([_LT_PROG_CXX])dnl
7329
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7330
m4_require([_LT_DECL_EGREP])dnl
7333
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7334
_LT_TAGVAR(allow_undefined_flag, $1)=
7335
_LT_TAGVAR(always_export_symbols, $1)=no
7336
_LT_TAGVAR(archive_expsym_cmds, $1)=
7337
_LT_TAGVAR(compiler_needs_object, $1)=no
7338
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7339
_LT_TAGVAR(hardcode_direct, $1)=no
7340
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7341
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7342
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7343
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7344
_LT_TAGVAR(hardcode_minus_L, $1)=no
7345
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7346
_LT_TAGVAR(hardcode_automatic, $1)=no
7347
_LT_TAGVAR(inherit_rpath, $1)=no
7348
_LT_TAGVAR(module_cmds, $1)=
7349
_LT_TAGVAR(module_expsym_cmds, $1)=
7350
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7351
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7352
_LT_TAGVAR(no_undefined_flag, $1)=
7353
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7354
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7356
# Source file extension for C++ test sources.
7359
# Object file extension for compiled C++ test sources.
7361
_LT_TAGVAR(objext, $1)=$objext
7363
# No sense in running all these tests if we already determined that
7364
# the CXX compiler isn't working. Some variables (like enable_shared)
7365
# are currently assumed to apply to all compilers on this platform,
7366
# and will be corrupted by setting them based on a non-working compiler.
7367
if test "$_lt_caught_CXX_error" != yes; then
7368
# Code to be used in simple compile tests
7369
lt_simple_compile_test_code="int some_variable = 0;"
7371
# Code to be used in simple link tests
7372
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7374
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7377
# save warnings/boilerplate of simple test code
7378
_LT_COMPILER_BOILERPLATE
7379
_LT_LINKER_BOILERPLATE
7381
# Allow CC to be a program name with arguments.
7386
lt_save_with_gnu_ld=$with_gnu_ld
7387
lt_save_path_LD=$lt_cv_path_LD
7388
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7389
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7391
$as_unset lt_cv_prog_gnu_ld
7393
if test -n "${lt_cv_path_LDCXX+set}"; then
7394
lt_cv_path_LD=$lt_cv_path_LDCXX
7396
$as_unset lt_cv_path_LD
7398
test -z "${LDCXX+set}" || LD=$LDCXX
7401
_LT_TAGVAR(compiler, $1)=$CC
7402
_LT_CC_BASENAME([$compiler])
7404
if test -n "$compiler"; then
7405
# We don't want -fno-exception when compiling C++ code, so set the
7406
# no_builtin_flag separately
7407
if test "$GXX" = yes; then
7408
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7410
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7413
if test "$GXX" = yes; then
7414
# Set up default GNU C++ configuration
7418
# Check if GNU C++ uses GNU ld as the underlying linker, since the
7419
# archiving commands below assume that GNU ld is being used.
7420
if test "$with_gnu_ld" = yes; then
7421
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7422
_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'
7424
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7425
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7427
# If archive_cmds runs LD, not CC, wlarc should be empty
7428
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7429
# investigate it a little bit more. (MM)
7432
# ancient GNU ld didn't support --whole-archive et. al.
7433
if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7434
$GREP 'no-whole-archive' > /dev/null; then
7435
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7437
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7443
# A generic and very simple default shared library creation
7444
# command for GNU C++ for the case where it uses the native
7445
# linker, instead of GNU ld. If possible, this setting should
7446
# overridden to take advantage of the native linker features on
7447
# the platform it is being used on.
7448
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7451
# Commands to make compiler produce verbose output that lists
7452
# what "hidden" libraries, object files and flags are used when
7453
# linking a shared library.
7454
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7462
# PORTME: fill in a description of your system's C++ link characteristics
7463
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7464
_LT_TAGVAR(ld_shlibs, $1)=yes
7467
# FIXME: insert proper C++ library support
7468
_LT_TAGVAR(ld_shlibs, $1)=no
7471
if test "$host_cpu" = ia64; then
7472
# On IA64, the linker does run time linking by default, so we don't
7473
# have to do anything special.
7474
aix_use_runtimelinking=no
7475
exp_sym_flag='-Bexport'
7478
aix_use_runtimelinking=no
7480
# Test if we are trying to use run time linking or normal
7481
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
7482
# need to do runtime linking.
7483
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7484
for ld_flag in $LDFLAGS; do
7487
aix_use_runtimelinking=yes
7495
exp_sym_flag='-bexport'
7496
no_entry_flag='-bnoentry'
7499
# When large executables or shared objects are built, AIX ld can
7500
# have problems creating the table of contents. If linking a library
7501
# or program results in "error TOC overflow" add -mminimal-toc to
7502
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7503
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7505
_LT_TAGVAR(archive_cmds, $1)=''
7506
_LT_TAGVAR(hardcode_direct, $1)=yes
7507
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7508
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7509
_LT_TAGVAR(link_all_deplibs, $1)=yes
7510
_LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7512
if test "$GXX" = yes; then
7513
case $host_os in aix4.[[012]]|aix4.[[012]].*)
7514
# We only want to do this on AIX 4.2 and lower, the check
7515
# below for broken collect2 doesn't work under 4.3+
7516
collect2name=`${CC} -print-prog-name=collect2`
7517
if test -f "$collect2name" &&
7518
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7520
# We have reworked collect2
7523
# We have old collect2
7524
_LT_TAGVAR(hardcode_direct, $1)=unsupported
7525
# It fails to find uninstalled libraries when the uninstalled
7526
# path is not listed in the libpath. Setting hardcode_minus_L
7527
# to unsupported forces relinking
7528
_LT_TAGVAR(hardcode_minus_L, $1)=yes
7529
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7530
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7533
shared_flag='-shared'
7534
if test "$aix_use_runtimelinking" = yes; then
7535
shared_flag="$shared_flag "'${wl}-G'
7539
if test "$host_cpu" = ia64; then
7540
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7541
# chokes on -Wl,-G. The following line is correct:
7544
if test "$aix_use_runtimelinking" = yes; then
7545
shared_flag='${wl}-G'
7547
shared_flag='${wl}-bM:SRE'
7552
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7553
# It seems that -bexpall does not export symbols beginning with
7554
# underscore (_), so it is better to generate a list of symbols to
7556
_LT_TAGVAR(always_export_symbols, $1)=yes
7557
if test "$aix_use_runtimelinking" = yes; then
7558
# Warning - without using the other runtime loading flags (-brtl),
7559
# -berok will link without error, but may produce a broken library.
7560
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7561
# Determine the default libpath from the value encoded in an empty
7563
_LT_SYS_MODULE_PATH_AIX
7564
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7566
_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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7568
if test "$host_cpu" = ia64; then
7569
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7570
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7571
_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"
7573
# Determine the default libpath from the value encoded in an
7575
_LT_SYS_MODULE_PATH_AIX
7576
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7577
# Warning - without using the other run time loading flags,
7578
# -berok will link without error, but may produce a broken library.
7579
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7580
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7581
# Exported symbols can be pulled into shared objects from archives
7582
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7583
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7584
# This is similar to how AIX traditionally builds its shared
7586
_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'
7592
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7593
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7594
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7595
# support --undefined. This deserves some investigation. FIXME
7596
_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7598
_LT_TAGVAR(ld_shlibs, $1)=no
7603
case $cc_basename in
7605
# FIXME: insert proper C++ library support
7606
_LT_TAGVAR(ld_shlibs, $1)=no
7611
cygwin* | mingw* | pw32* | cegcc*)
7612
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7613
# as there is no search path for DLLs.
7614
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7615
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7616
_LT_TAGVAR(always_export_symbols, $1)=no
7617
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7619
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7620
_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'
7621
# If the export-symbols file already is a .def file (1st line
7622
# is EXPORTS), use it as is; otherwise, prepend...
7623
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7624
cp $export_symbols $output_objdir/$soname.def;
7626
echo EXPORTS > $output_objdir/$soname.def;
7627
cat $export_symbols >> $output_objdir/$soname.def;
7629
$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'
7631
_LT_TAGVAR(ld_shlibs, $1)=no
7634
darwin* | rhapsody*)
7635
_LT_DARWIN_LINKER_FEATURES($1)
7639
case $cc_basename in
7641
# FIXME: insert proper C++ library support
7642
_LT_TAGVAR(ld_shlibs, $1)=no
7645
# Green Hills C++ Compiler
7646
# FIXME: insert proper C++ library support
7647
_LT_TAGVAR(ld_shlibs, $1)=no
7650
# FIXME: insert proper C++ library support
7651
_LT_TAGVAR(ld_shlibs, $1)=no
7657
# C++ shared libraries reported to be fairly broken before
7659
_LT_TAGVAR(ld_shlibs, $1)=no
7663
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7666
freebsd* | dragonfly*)
7667
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7669
_LT_TAGVAR(ld_shlibs, $1)=yes
7676
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7677
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7678
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7679
_LT_TAGVAR(hardcode_direct, $1)=yes
7680
_LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7681
# but as the default
7682
# location of the library.
7684
case $cc_basename in
7686
# FIXME: insert proper C++ library support
7687
_LT_TAGVAR(ld_shlibs, $1)=no
7690
_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'
7691
# Commands to make compiler produce verbose output that lists
7692
# what "hidden" libraries, object files and flags are used when
7693
# linking a shared library.
7695
# There doesn't appear to be a way to prevent this compiler from
7696
# explicitly linking system object files so we need to strip them
7697
# from the output so that they don't get included in the library
7699
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; $ECHO "X$list" | $Xsed'
7702
if test "$GXX" = yes; then
7703
_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'
7705
# FIXME: insert proper C++ library support
7706
_LT_TAGVAR(ld_shlibs, $1)=no
7713
if test $with_gnu_ld = no; then
7714
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7715
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7721
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7727
_LT_TAGVAR(hardcode_direct, $1)=no
7728
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7731
_LT_TAGVAR(hardcode_direct, $1)=yes
7732
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7733
_LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7734
# but as the default
7735
# location of the library.
7739
case $cc_basename in
7741
# FIXME: insert proper C++ library support
7742
_LT_TAGVAR(ld_shlibs, $1)=no
7747
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7750
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7753
_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'
7756
# Commands to make compiler produce verbose output that lists
7757
# what "hidden" libraries, object files and flags are used when
7758
# linking a shared library.
7760
# There doesn't appear to be a way to prevent this compiler from
7761
# explicitly linking system object files so we need to strip them
7762
# from the output so that they don't get included in the library
7764
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; $ECHO "X$list" | $Xsed'
7767
if test "$GXX" = yes; then
7768
if test $with_gnu_ld = no; then
7771
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7774
_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'
7777
_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'
7782
# FIXME: insert proper C++ library support
7783
_LT_TAGVAR(ld_shlibs, $1)=no
7790
_LT_TAGVAR(hardcode_direct, $1)=no
7791
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7792
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7793
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7794
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7795
# Instead, shared libraries are loaded at an image base (0x10000000 by
7796
# default) and relocated if they conflict, which is a slow very memory
7797
# consuming and fragmenting process. To avoid this, we pick a random,
7798
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7799
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
7800
_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'
7801
_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'
7804
case $cc_basename in
7807
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7809
# Archives containing C++ object files must be created using
7810
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
7811
# necessary to make sure instantiated templates are included
7813
_LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7816
if test "$GXX" = yes; then
7817
if test "$with_gnu_ld" = no; then
7818
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7820
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
7823
_LT_TAGVAR(link_all_deplibs, $1)=yes
7826
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7827
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7828
_LT_TAGVAR(inherit_rpath, $1)=yes
7831
linux* | k*bsd*-gnu | kopensolaris*-gnu)
7832
case $cc_basename in
7834
# Kuck and Associates, Inc. (KAI) C++ Compiler
7836
# KCC will only create a shared library if the output file
7837
# ends with ".so" (or ".sl" for HP-UX), so rename the library
7838
# to its proper name (with version) after linking.
7839
_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'
7840
_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'
7841
# Commands to make compiler produce verbose output that lists
7842
# what "hidden" libraries, object files and flags are used when
7843
# linking a shared library.
7845
# There doesn't appear to be a way to prevent this compiler from
7846
# explicitly linking system object files so we need to strip them
7847
# from the output so that they don't get included in the library
7849
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; $ECHO "X$list" | $Xsed'
7851
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7852
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7854
# Archives containing C++ object files must be created using
7855
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
7856
_LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7861
# version 8.0 and above of icpc choke on multiply defined symbols
7862
# if we add $predep_objects and $postdep_objects, however 7.1 and
7863
# earlier do not add the objects themselves.
7864
case `$CC -V 2>&1` in
7866
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7867
_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'
7869
*) # Version 8.0 or newer
7872
ia64*) tmp_idyn=' -i_dynamic';;
7874
_LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7875
_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'
7878
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7879
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7880
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7881
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7884
# Portland Group C++ compiler
7886
*pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
7887
_LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7889
$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7890
compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
7891
_LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7893
$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7894
$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
7896
_LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7898
$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7899
$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7900
_LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7902
$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7903
$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7905
*) # Version 6 will use weak symbols
7906
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7907
_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'
7911
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7912
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7913
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
7917
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7918
_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'
7920
runpath_var=LD_RUN_PATH
7921
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7922
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7924
# Commands to make compiler produce verbose output that lists
7925
# what "hidden" libraries, object files and flags are used when
7926
# linking a shared library.
7928
# There doesn't appear to be a way to prevent this compiler from
7929
# explicitly linking system object files so we need to strip them
7930
# from the output so that they don't get included in the library
7932
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
7935
# IBM XL 8.0 on PPC, with GNU ld
7936
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7937
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7938
_LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7939
if test "x$supports_anon_versioning" = xyes; then
7940
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7941
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7942
echo "local: *; };" >> $output_objdir/$libname.ver~
7943
$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7947
case `$CC -V 2>&1 | sed 5q` in
7950
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7951
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7952
_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'
7953
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7954
_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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
7955
_LT_TAGVAR(compiler_needs_object, $1)=yes
7957
# Not sure whether something based on
7958
# $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7960
output_verbose_link_cmd='echo'
7962
# Archives containing C++ object files must be created using
7963
# "CC -xar", where "CC" is the Sun C++ compiler. This is
7964
# necessary to make sure instantiated templates are included
7966
_LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7974
# FIXME: insert proper C++ library support
7975
_LT_TAGVAR(ld_shlibs, $1)=no
7979
# FIXME: insert proper C++ library support
7980
_LT_TAGVAR(ld_shlibs, $1)=no
7984
case $cc_basename in
7986
# FIXME: insert proper C++ library support
7987
_LT_TAGVAR(ld_shlibs, $1)=no
7990
# FIXME: insert proper C++ library support
7991
_LT_TAGVAR(ld_shlibs, $1)=no
7997
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7998
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8000
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8001
_LT_TAGVAR(hardcode_direct, $1)=yes
8002
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8004
# Workaround some broken pre-1.5 toolchains
8005
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8009
_LT_TAGVAR(ld_shlibs, $1)=yes
8013
# C++ shared libraries are fairly broken
8014
_LT_TAGVAR(ld_shlibs, $1)=no
8018
if test -f /usr/libexec/ld.so; then
8019
_LT_TAGVAR(hardcode_direct, $1)=yes
8020
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8021
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8022
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8023
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8024
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8025
_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'
8026
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8027
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8029
output_verbose_link_cmd=echo
8031
_LT_TAGVAR(ld_shlibs, $1)=no
8035
osf3* | osf4* | osf5*)
8036
case $cc_basename in
8038
# Kuck and Associates, Inc. (KAI) C++ Compiler
8040
# KCC will only create a shared library if the output file
8041
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8042
# to its proper name (with version) after linking.
8043
_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'
8045
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8046
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
8048
# Archives containing C++ object files must be created using
8049
# the KAI C++ compiler.
8051
osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
8052
*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
8056
# Rational C++ 2.4.1
8057
# FIXME: insert proper C++ library support
8058
_LT_TAGVAR(ld_shlibs, $1)=no
8063
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8064
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
8065
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8068
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8069
_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
8070
_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8071
echo "-hidden">> $lib.exp~
8072
$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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
8074
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8078
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
8080
# Commands to make compiler produce verbose output that lists
8081
# what "hidden" libraries, object files and flags are used when
8082
# linking a shared library.
8084
# There doesn't appear to be a way to prevent this compiler from
8085
# explicitly linking system object files so we need to strip them
8086
# from the output so that they don't get included in the library
8088
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
8091
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8092
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8095
_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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8098
_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" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8102
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8103
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
8105
# Commands to make compiler produce verbose output that lists
8106
# what "hidden" libraries, object files and flags are used when
8107
# linking a shared library.
8108
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
8111
# FIXME: insert proper C++ library support
8112
_LT_TAGVAR(ld_shlibs, $1)=no
8119
# FIXME: insert proper C++ library support
8120
_LT_TAGVAR(ld_shlibs, $1)=no
8124
case $cc_basename in
8127
# FIXME: insert proper C++ library support
8128
_LT_TAGVAR(ld_shlibs, $1)=no
8132
# FIXME: insert proper C++ library support
8133
_LT_TAGVAR(ld_shlibs, $1)=no
8136
# FIXME: insert proper C++ library support
8137
_LT_TAGVAR(ld_shlibs, $1)=no
8143
case $cc_basename in
8145
# Sun C++ 4.2, 5.x and Centerline C++
8146
_LT_TAGVAR(archive_cmds_need_lc,$1)=yes
8147
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8148
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8149
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8150
$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'
8152
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8153
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8155
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8157
# The compiler driver will combine and reorder linker options,
8158
# but understands `-z linker_flag'.
8159
# Supported since Solaris 2.6 (maybe 2.5.1?)
8160
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8163
_LT_TAGVAR(link_all_deplibs, $1)=yes
8165
output_verbose_link_cmd='echo'
8167
# Archives containing C++ object files must be created using
8168
# "CC -xar", where "CC" is the Sun C++ compiler. This is
8169
# necessary to make sure instantiated templates are included
8171
_LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8174
# Green Hills C++ Compiler
8175
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8177
# The C++ compiler must be used to create the archive.
8178
_LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8181
# GNU C++ compiler with Solaris linker
8182
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8183
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8184
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
8185
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8186
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8187
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8189
# Commands to make compiler produce verbose output that lists
8190
# what "hidden" libraries, object files and flags are used when
8191
# linking a shared library.
8192
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
8194
# g++ 2.7 appears to require `-G' NOT `-shared' on this
8196
_LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8197
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8198
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8200
# Commands to make compiler produce verbose output that lists
8201
# what "hidden" libraries, object files and flags are used when
8202
# linking a shared library.
8203
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
8206
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8208
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8210
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8218
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8219
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8220
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8221
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8222
runpath_var='LD_RUN_PATH'
8224
case $cc_basename in
8226
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8227
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8230
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8231
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8236
sysv5* | sco3.2v5* | sco5v6*)
8237
# Note: We can NOT use -z defs as we might desire, because we do not
8238
# link with -lc, and that would cause any symbols used from libc to
8239
# always be unresolved, which means just about no library would
8240
# ever link correctly. If we're not using GNU ld we use -z text
8241
# though, which does catch some bad symbols but isn't as heavy-handed
8243
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8244
_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8245
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8246
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8247
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8248
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8249
_LT_TAGVAR(link_all_deplibs, $1)=yes
8250
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8251
runpath_var='LD_RUN_PATH'
8253
case $cc_basename in
8255
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8256
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8259
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8260
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8266
case $cc_basename in
8268
# NonStop-UX NCC 3.20
8269
# FIXME: insert proper C++ library support
8270
_LT_TAGVAR(ld_shlibs, $1)=no
8273
# FIXME: insert proper C++ library support
8274
_LT_TAGVAR(ld_shlibs, $1)=no
8280
# FIXME: insert proper C++ library support
8281
_LT_TAGVAR(ld_shlibs, $1)=no
8285
# FIXME: insert proper C++ library support
8286
_LT_TAGVAR(ld_shlibs, $1)=no
8290
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8291
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8293
_LT_TAGVAR(GCC, $1)="$GXX"
8294
_LT_TAGVAR(LD, $1)="$LD"
8297
## There is no encapsulation within the following macros, do not change
8298
## the running order or otherwise move them around unless you know exactly
8299
## what you are doing...
8300
_LT_SYS_HIDDEN_LIBDEPS($1)
8301
_LT_COMPILER_PIC($1)
8302
_LT_COMPILER_C_O($1)
8303
_LT_COMPILER_FILE_LOCKS($1)
8304
_LT_LINKER_SHLIBS($1)
8305
_LT_SYS_DYNAMIC_LINKER($1)
8306
_LT_LINKER_HARDCODE_LIBPATH($1)
8309
fi # test -n "$compiler"
8315
with_gnu_ld=$lt_save_with_gnu_ld
8316
lt_cv_path_LDCXX=$lt_cv_path_LD
8317
lt_cv_path_LD=$lt_save_path_LD
8318
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8319
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8320
fi # test "$_lt_caught_CXX_error" != yes
8323
])# _LT_LANG_CXX_CONFIG
8326
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8327
# ---------------------------------
8328
# Figure out "hidden" library dependencies from verbose
8329
# compiler output when linking a shared library.
8330
# Parse the compiler output and extract the necessary
8331
# objects, libraries and library flags.
8332
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8333
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8334
# Dependencies to place before and after the object being linked:
8335
_LT_TAGVAR(predep_objects, $1)=
8336
_LT_TAGVAR(postdep_objects, $1)=
8337
_LT_TAGVAR(predeps, $1)=
8338
_LT_TAGVAR(postdeps, $1)=
8339
_LT_TAGVAR(compiler_lib_search_path, $1)=
8341
dnl we can't use the lt_simple_compile_test_code here,
8342
dnl because it contains code intended for an executable,
8343
dnl not a library. It's possible we should let each
8344
dnl tag define a new lt_????_link_test_code variable,
8345
dnl but it's only used here...
8346
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8348
void foo (void) { a = 0; }
8350
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8354
Foo (void) { a = 0; }
8359
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8367
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8375
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8378
public void bar (void) {
8384
dnl Parse the compiler output and extract the necessary
8385
dnl objects, libraries and library flags.
8386
if AC_TRY_EVAL(ac_compile); then
8387
# Parse the compiler output and extract the necessary
8388
# objects, libraries and library flags.
8390
# Sentinel used to keep track of whether or not we are before
8391
# the conftest object file.
8392
pre_test_object_deps_done=no
8394
for p in `eval "$output_verbose_link_cmd"`; do
8398
# Some compilers place space between "-{L,R}" and the path.
8400
if test $p = "-L" ||
8401
test $p = "-R"; then
8408
if test "$pre_test_object_deps_done" = no; then
8411
# Internal compiler library paths should come after those
8412
# provided the user. The postdeps already come after the
8413
# user supplied libs so there is no need to process them.
8414
if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8415
_LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8417
_LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8420
# The "-l" case would never come before the object being
8421
# linked, so don't bother handling this case.
8424
if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8425
_LT_TAGVAR(postdeps, $1)="${prev}${p}"
8427
_LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8433
# This assumes that the test object file only shows up
8434
# once in the compiler output.
8435
if test "$p" = "conftest.$objext"; then
8436
pre_test_object_deps_done=yes
8440
if test "$pre_test_object_deps_done" = no; then
8441
if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8442
_LT_TAGVAR(predep_objects, $1)="$p"
8444
_LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8447
if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8448
_LT_TAGVAR(postdep_objects, $1)="$p"
8450
_LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8455
*) ;; # Ignore the rest.
8463
echo "libtool.m4: error: problem compiling $1 test program"
8466
$RM -f confest.$objext
8468
# PORTME: override above test on systems where it is broken
8472
# Interix 3.5 installs completely hosed .la files for C++, so rather than
8473
# hack all around it, let's just trust "g++" to DTRT.
8474
_LT_TAGVAR(predep_objects,$1)=
8475
_LT_TAGVAR(postdep_objects,$1)=
8476
_LT_TAGVAR(postdeps,$1)=
8480
case `$CC -V 2>&1 | sed 5q` in
8484
# The more standards-conforming stlport4 library is
8485
# incompatible with the Cstd library. Avoid specifying
8486
# it if it's in CXXFLAGS. Ignore libCrun as
8487
# -library=stlport4 depends on it.
8488
case " $CXX $CXXFLAGS " in
8489
*" -library=stlport4 "*)
8490
solaris_use_stlport4=yes
8494
if test "$solaris_use_stlport4" != yes; then
8495
_LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8502
case $cc_basename in
8504
# The more standards-conforming stlport4 library is
8505
# incompatible with the Cstd library. Avoid specifying
8506
# it if it's in CXXFLAGS. Ignore libCrun as
8507
# -library=stlport4 depends on it.
8508
case " $CXX $CXXFLAGS " in
8509
*" -library=stlport4 "*)
8510
solaris_use_stlport4=yes
8514
# Adding this requires a known-good setup of shared libraries for
8515
# Sun compiler versions before 5.6, else PIC objects from an old
8516
# archive will be linked into the output, leading to subtle bugs.
8517
if test "$solaris_use_stlport4" != yes; then
8518
_LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8526
case " $_LT_TAGVAR(postdeps, $1) " in
8527
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8529
_LT_TAGVAR(compiler_lib_search_dirs, $1)=
8530
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8531
_LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8533
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8534
[The directories searched by this compiler when creating a shared library])
8535
_LT_TAGDECL([], [predep_objects], [1],
8536
[Dependencies to place before and after the objects being linked to
8537
create a shared library])
8538
_LT_TAGDECL([], [postdep_objects], [1])
8539
_LT_TAGDECL([], [predeps], [1])
8540
_LT_TAGDECL([], [postdeps], [1])
8541
_LT_TAGDECL([], [compiler_lib_search_path], [1],
8542
[The library search path used internally by the compiler when linking
8544
])# _LT_SYS_HIDDEN_LIBDEPS
8549
# Since AC_PROG_F77 is broken, in that it returns the empty string
8550
# if there is no fortran compiler, we have our own version here.
8551
m4_defun([_LT_PROG_F77],
8553
pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
8555
if test -z "$F77" || test "X$F77" = "Xno"; then
8558
popdef([AC_MSG_ERROR])
8561
dnl aclocal-1.4 backwards compatibility:
8562
dnl AC_DEFUN([_LT_PROG_F77], [])
8565
# _LT_LANG_F77_CONFIG([TAG])
8566
# --------------------------
8567
# Ensure that the configuration variables for a Fortran 77 compiler are
8568
# suitably defined. These variables are subsequently used by _LT_CONFIG
8569
# to write the compiler configuration to `libtool'.
8570
m4_defun([_LT_LANG_F77_CONFIG],
8571
[AC_REQUIRE([_LT_PROG_F77])dnl
8572
AC_LANG_PUSH(Fortran 77)
8574
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8575
_LT_TAGVAR(allow_undefined_flag, $1)=
8576
_LT_TAGVAR(always_export_symbols, $1)=no
8577
_LT_TAGVAR(archive_expsym_cmds, $1)=
8578
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8579
_LT_TAGVAR(hardcode_direct, $1)=no
8580
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8581
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8582
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8583
_LT_TAGVAR(hardcode_libdir_separator, $1)=
8584
_LT_TAGVAR(hardcode_minus_L, $1)=no
8585
_LT_TAGVAR(hardcode_automatic, $1)=no
8586
_LT_TAGVAR(inherit_rpath, $1)=no
8587
_LT_TAGVAR(module_cmds, $1)=
8588
_LT_TAGVAR(module_expsym_cmds, $1)=
8589
_LT_TAGVAR(link_all_deplibs, $1)=unknown
8590
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8591
_LT_TAGVAR(no_undefined_flag, $1)=
8592
_LT_TAGVAR(whole_archive_flag_spec, $1)=
8593
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8595
# Source file extension for f77 test sources.
8598
# Object file extension for compiled f77 test sources.
8600
_LT_TAGVAR(objext, $1)=$objext
8602
# No sense in running all these tests if we already determined that
8603
# the F77 compiler isn't working. Some variables (like enable_shared)
8604
# are currently assumed to apply to all compilers on this platform,
8605
# and will be corrupted by setting them based on a non-working compiler.
8606
if test "$_lt_disable_F77" != yes; then
8607
# Code to be used in simple compile tests
8608
lt_simple_compile_test_code="\
8614
# Code to be used in simple link tests
8615
lt_simple_link_test_code="\
8620
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8623
# save warnings/boilerplate of simple test code
8624
_LT_COMPILER_BOILERPLATE
8625
_LT_LINKER_BOILERPLATE
8627
# Allow CC to be a program name with arguments.
8632
_LT_TAGVAR(compiler, $1)=$CC
8633
_LT_CC_BASENAME([$compiler])
8635
if test -n "$compiler"; then
8636
AC_MSG_CHECKING([if libtool supports shared libraries])
8637
AC_MSG_RESULT([$can_build_shared])
8639
AC_MSG_CHECKING([whether to build shared libraries])
8640
test "$can_build_shared" = "no" && enable_shared=no
8642
# On AIX, shared libraries and static libraries use the same namespace, and
8643
# are all built from PIC.
8646
test "$enable_shared" = yes && enable_static=no
8647
if test -n "$RANLIB"; then
8648
archive_cmds="$archive_cmds~\$RANLIB \$lib"
8649
postinstall_cmds='$RANLIB $lib'
8653
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8654
test "$enable_shared" = yes && enable_static=no
8658
AC_MSG_RESULT([$enable_shared])
8660
AC_MSG_CHECKING([whether to build static libraries])
8661
# Make sure either enable_shared or enable_static is yes.
8662
test "$enable_shared" = yes || enable_static=yes
8663
AC_MSG_RESULT([$enable_static])
8665
_LT_TAGVAR(GCC, $1)="$G77"
8666
_LT_TAGVAR(LD, $1)="$LD"
8669
## There is no encapsulation within the following macros, do not change
8670
## the running order or otherwise move them around unless you know exactly
8671
## what you are doing...
8672
_LT_COMPILER_PIC($1)
8673
_LT_COMPILER_C_O($1)
8674
_LT_COMPILER_FILE_LOCKS($1)
8675
_LT_LINKER_SHLIBS($1)
8676
_LT_SYS_DYNAMIC_LINKER($1)
8677
_LT_LINKER_HARDCODE_LIBPATH($1)
8680
fi # test -n "$compiler"
8684
fi # test "$_lt_disable_F77" != yes
8687
])# _LT_LANG_F77_CONFIG
8692
# Since AC_PROG_FC is broken, in that it returns the empty string
8693
# if there is no fortran compiler, we have our own version here.
8694
m4_defun([_LT_PROG_FC],
8696
pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
8698
if test -z "$FC" || test "X$FC" = "Xno"; then
8701
popdef([AC_MSG_ERROR])
8704
dnl aclocal-1.4 backwards compatibility:
8705
dnl AC_DEFUN([_LT_PROG_FC], [])
8708
# _LT_LANG_FC_CONFIG([TAG])
8709
# -------------------------
8710
# Ensure that the configuration variables for a Fortran compiler are
8711
# suitably defined. These variables are subsequently used by _LT_CONFIG
8712
# to write the compiler configuration to `libtool'.
8713
m4_defun([_LT_LANG_FC_CONFIG],
8714
[AC_REQUIRE([_LT_PROG_FC])dnl
8715
AC_LANG_PUSH(Fortran)
8717
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8718
_LT_TAGVAR(allow_undefined_flag, $1)=
8719
_LT_TAGVAR(always_export_symbols, $1)=no
8720
_LT_TAGVAR(archive_expsym_cmds, $1)=
8721
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8722
_LT_TAGVAR(hardcode_direct, $1)=no
8723
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8724
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8725
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8726
_LT_TAGVAR(hardcode_libdir_separator, $1)=
8727
_LT_TAGVAR(hardcode_minus_L, $1)=no
8728
_LT_TAGVAR(hardcode_automatic, $1)=no
8729
_LT_TAGVAR(inherit_rpath, $1)=no
8730
_LT_TAGVAR(module_cmds, $1)=
8731
_LT_TAGVAR(module_expsym_cmds, $1)=
8732
_LT_TAGVAR(link_all_deplibs, $1)=unknown
8733
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8734
_LT_TAGVAR(no_undefined_flag, $1)=
8735
_LT_TAGVAR(whole_archive_flag_spec, $1)=
8736
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8738
# Source file extension for fc test sources.
8739
ac_ext=${ac_fc_srcext-f}
8741
# Object file extension for compiled fc test sources.
8743
_LT_TAGVAR(objext, $1)=$objext
8745
# No sense in running all these tests if we already determined that
8746
# the FC compiler isn't working. Some variables (like enable_shared)
8747
# are currently assumed to apply to all compilers on this platform,
8748
# and will be corrupted by setting them based on a non-working compiler.
8749
if test "$_lt_disable_FC" != yes; then
8750
# Code to be used in simple compile tests
8751
lt_simple_compile_test_code="\
8757
# Code to be used in simple link tests
8758
lt_simple_link_test_code="\
8763
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8766
# save warnings/boilerplate of simple test code
8767
_LT_COMPILER_BOILERPLATE
8768
_LT_LINKER_BOILERPLATE
8770
# Allow CC to be a program name with arguments.
8775
GCC=$ac_cv_fc_compiler_gnu
8777
_LT_TAGVAR(compiler, $1)=$CC
8778
_LT_CC_BASENAME([$compiler])
8780
if test -n "$compiler"; then
8781
AC_MSG_CHECKING([if libtool supports shared libraries])
8782
AC_MSG_RESULT([$can_build_shared])
8784
AC_MSG_CHECKING([whether to build shared libraries])
8785
test "$can_build_shared" = "no" && enable_shared=no
8787
# On AIX, shared libraries and static libraries use the same namespace, and
8788
# are all built from PIC.
8791
test "$enable_shared" = yes && enable_static=no
8792
if test -n "$RANLIB"; then
8793
archive_cmds="$archive_cmds~\$RANLIB \$lib"
8794
postinstall_cmds='$RANLIB $lib'
8798
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8799
test "$enable_shared" = yes && enable_static=no
8803
AC_MSG_RESULT([$enable_shared])
8805
AC_MSG_CHECKING([whether to build static libraries])
8806
# Make sure either enable_shared or enable_static is yes.
8807
test "$enable_shared" = yes || enable_static=yes
8808
AC_MSG_RESULT([$enable_static])
8810
_LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8811
_LT_TAGVAR(LD, $1)="$LD"
8814
## There is no encapsulation within the following macros, do not change
8815
## the running order or otherwise move them around unless you know exactly
8816
## what you are doing...
8817
_LT_SYS_HIDDEN_LIBDEPS($1)
8818
_LT_COMPILER_PIC($1)
8819
_LT_COMPILER_C_O($1)
8820
_LT_COMPILER_FILE_LOCKS($1)
8821
_LT_LINKER_SHLIBS($1)
8822
_LT_SYS_DYNAMIC_LINKER($1)
8823
_LT_LINKER_HARDCODE_LIBPATH($1)
8826
fi # test -n "$compiler"
8830
fi # test "$_lt_disable_FC" != yes
8833
])# _LT_LANG_FC_CONFIG
8836
# _LT_LANG_GCJ_CONFIG([TAG])
8837
# --------------------------
8838
# Ensure that the configuration variables for the GNU Java Compiler compiler
8839
# are suitably defined. These variables are subsequently used by _LT_CONFIG
8840
# to write the compiler configuration to `libtool'.
8841
m4_defun([_LT_LANG_GCJ_CONFIG],
8842
[AC_REQUIRE([LT_PROG_GCJ])dnl
8845
# Source file extension for Java test sources.
8848
# Object file extension for compiled Java test sources.
8850
_LT_TAGVAR(objext, $1)=$objext
8852
# Code to be used in simple compile tests
8853
lt_simple_compile_test_code="class foo {}"
8855
# Code to be used in simple link tests
8856
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8858
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8861
# save warnings/boilerplate of simple test code
8862
_LT_COMPILER_BOILERPLATE
8863
_LT_LINKER_BOILERPLATE
8865
# Allow CC to be a program name with arguments.
8871
_LT_TAGVAR(compiler, $1)=$CC
8872
_LT_TAGVAR(LD, $1)="$LD"
8873
_LT_CC_BASENAME([$compiler])
8875
# GCJ did not exist at the time GCC didn't implicitly link libc in.
8876
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8878
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8880
if test -n "$compiler"; then
8881
_LT_COMPILER_NO_RTTI($1)
8882
_LT_COMPILER_PIC($1)
8883
_LT_COMPILER_C_O($1)
8884
_LT_COMPILER_FILE_LOCKS($1)
8885
_LT_LINKER_SHLIBS($1)
8886
_LT_LINKER_HARDCODE_LIBPATH($1)
8895
])# _LT_LANG_GCJ_CONFIG
8898
# _LT_LANG_RC_CONFIG([TAG])
8899
# -------------------------
8900
# Ensure that the configuration variables for the Windows resource compiler
8901
# are suitably defined. These variables are subsequently used by _LT_CONFIG
8902
# to write the compiler configuration to `libtool'.
8903
m4_defun([_LT_LANG_RC_CONFIG],
8904
[AC_REQUIRE([LT_PROG_RC])dnl
8907
# Source file extension for RC test sources.
8910
# Object file extension for compiled RC test sources.
8912
_LT_TAGVAR(objext, $1)=$objext
8914
# Code to be used in simple compile tests
8915
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8917
# Code to be used in simple link tests
8918
lt_simple_link_test_code="$lt_simple_compile_test_code"
8920
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8923
# save warnings/boilerplate of simple test code
8924
_LT_COMPILER_BOILERPLATE
8925
_LT_LINKER_BOILERPLATE
8927
# Allow CC to be a program name with arguments.
8933
_LT_TAGVAR(compiler, $1)=$CC
8934
_LT_CC_BASENAME([$compiler])
8935
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8937
if test -n "$compiler"; then
8945
])# _LT_LANG_RC_CONFIG
8950
AC_DEFUN([LT_PROG_GCJ],
8951
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8952
[m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8953
[AC_CHECK_TOOL(GCJ, gcj,)
8954
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8955
AC_SUBST(GCJFLAGS)])])[]dnl
8959
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8960
dnl aclocal-1.4 backwards compatibility:
8961
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8966
AC_DEFUN([LT_PROG_RC],
8967
[AC_CHECK_TOOL(RC, windres,)
8971
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8972
dnl aclocal-1.4 backwards compatibility:
8973
dnl AC_DEFUN([LT_AC_PROG_RC], [])
8978
# If we don't have a new enough Autoconf to choose the best grep
8979
# available, choose the one first in the user's PATH.
8980
m4_defun([_LT_DECL_EGREP],
8981
[AC_REQUIRE([AC_PROG_EGREP])dnl
8982
AC_REQUIRE([AC_PROG_FGREP])dnl
8983
test -z "$GREP" && GREP=grep
8984
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8985
_LT_DECL([], [EGREP], [1], [An ERE matcher])
8986
_LT_DECL([], [FGREP], [1], [A literal string matcher])
8987
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8994
# If we don't have a new enough Autoconf to choose the best objdump
8995
# available, choose the one first in the user's PATH.
8996
m4_defun([_LT_DECL_OBJDUMP],
8997
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8998
test -z "$OBJDUMP" && OBJDUMP=objdump
8999
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
9006
# Check for a fully-functional sed program, that truncates
9007
# as few characters as possible. Prefer GNU sed if found.
9008
m4_defun([_LT_DECL_SED],
9010
test -z "$SED" && SED=sed
9011
Xsed="$SED -e 1s/^X//"
9012
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
9013
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
9014
[Sed that helps us avoid accidentally triggering echo(1) options like -n])
9017
m4_ifndef([AC_PROG_SED], [
9018
# NOTE: This macro has been submitted for inclusion into #
9019
# GNU Autoconf as AC_PROG_SED. When it is available in #
9020
# a released version of Autoconf we should remove this #
9021
# macro and use it instead. #
9023
m4_defun([AC_PROG_SED],
9024
[AC_MSG_CHECKING([for a sed that does not truncate output])
9025
AC_CACHE_VAL(lt_cv_path_SED,
9026
[# Loop through the user's path and test for sed and gsed.
9027
# Then use that list of sed's as ones to test for truncation.
9028
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9032
test -z "$as_dir" && as_dir=.
9033
for lt_ac_prog in sed gsed; do
9034
for ac_exec_ext in '' $ac_executable_extensions; do
9035
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9036
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9044
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
9045
# along with /bin/sed that truncates output.
9046
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9047
test ! -f $lt_ac_sed && continue
9048
cat /dev/null > conftest.in
9050
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9051
# Check for GNU sed and select it if it is found.
9052
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9053
lt_cv_path_SED=$lt_ac_sed
9057
cat conftest.in conftest.in >conftest.tmp
9058
mv conftest.tmp conftest.in
9059
cp conftest.in conftest.nl
9061
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9062
cmp -s conftest.out conftest.nl || break
9063
# 10000 chars as input seems more than enough
9064
test $lt_ac_count -gt 10 && break
9065
lt_ac_count=`expr $lt_ac_count + 1`
9066
if test $lt_ac_count -gt $lt_ac_max; then
9067
lt_ac_max=$lt_ac_count
9068
lt_cv_path_SED=$lt_ac_sed
9075
AC_MSG_RESULT([$SED])
9080
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
9081
dnl aclocal-1.4 backwards compatibility:
9082
dnl AC_DEFUN([LT_AC_PROG_SED], [])
9085
# _LT_CHECK_SHELL_FEATURES
9086
# ------------------------
9087
# Find out whether the shell is Bourne or XSI compatible,
9088
# or has some other useful features.
9089
m4_defun([_LT_CHECK_SHELL_FEATURES],
9090
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
9091
# Try some XSI features
9094
test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
9096
&& eval 'test $(( 1 + 1 )) -eq 2 \
9097
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
9099
AC_MSG_RESULT([$xsi_shell])
9100
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
9102
AC_MSG_CHECKING([whether the shell understands "+="])
9104
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
9106
&& lt_shell_append=yes
9107
AC_MSG_RESULT([$lt_shell_append])
9108
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
9110
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9115
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9117
# test EBCDIC or ASCII
9118
case `echo X|tr X '\101'` in
9119
A) # ASCII based system
9120
# \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9121
lt_SP2NL='tr \040 \012'
9122
lt_NL2SP='tr \015\012 \040\040'
9124
*) # EBCDIC based system
9125
lt_SP2NL='tr \100 \n'
9126
lt_NL2SP='tr \r\n \100\100'
9129
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
9130
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9131
])# _LT_CHECK_SHELL_FEATURES
9134
# _LT_PROG_XSI_SHELLFNS
9135
# ---------------------
9136
# Bourne and XSI compatible variants of some useful shell functions.
9137
m4_defun([_LT_PROG_XSI_SHELLFNS],
9140
cat << \_LT_EOF >> "$cfgfile"
9142
# func_dirname file append nondir_replacement
9143
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
9144
# otherwise set result to NONDIR_REPLACEMENT.
9148
*/*) func_dirname_result="${1%/*}${2}" ;;
9149
* ) func_dirname_result="${3}" ;;
9153
# func_basename file
9156
func_basename_result="${1##*/}"
9159
# func_dirname_and_basename file append nondir_replacement
9160
# perform func_basename and func_dirname in a single function
9162
# dirname: Compute the dirname of FILE. If nonempty,
9163
# add APPEND to the result, otherwise set result
9164
# to NONDIR_REPLACEMENT.
9165
# value returned in "$func_dirname_result"
9166
# basename: Compute filename of FILE.
9167
# value retuned in "$func_basename_result"
9168
# Implementation must be kept synchronized with func_dirname
9169
# and func_basename. For efficiency, we do not delegate to
9170
# those functions but instead duplicate the functionality here.
9171
func_dirname_and_basename ()
9174
*/*) func_dirname_result="${1%/*}${2}" ;;
9175
* ) func_dirname_result="${3}" ;;
9177
func_basename_result="${1##*/}"
9180
# func_stripname prefix suffix name
9181
# strip PREFIX and SUFFIX off of NAME.
9182
# PREFIX and SUFFIX must not contain globbing or regex special
9183
# characters, hashes, percent signs, but SUFFIX may contain a leading
9184
# dot (in which case that matches only a dot).
9187
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
9188
# positional parameters, so assign one to ordinary parameter first.
9189
func_stripname_result=${3}
9190
func_stripname_result=${func_stripname_result#"${1}"}
9191
func_stripname_result=${func_stripname_result%"${2}"}
9197
func_opt_split_opt=${1%%=*}
9198
func_opt_split_arg=${1#*=}
9205
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
9206
*) func_lo2o_result=${1} ;;
9210
# func_xform libobj-or-source
9213
func_xform_result=${1%.*}.lo
9216
# func_arith arithmetic-term...
9219
func_arith_result=$(( $[*] ))
9223
# STRING may not start with a hyphen.
9226
func_len_result=${#1}
9231
*) # Bourne compatible functions.
9232
cat << \_LT_EOF >> "$cfgfile"
9234
# func_dirname file append nondir_replacement
9235
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
9236
# otherwise set result to NONDIR_REPLACEMENT.
9239
# Extract subdirectory from the argument.
9240
func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
9241
if test "X$func_dirname_result" = "X${1}"; then
9242
func_dirname_result="${3}"
9244
func_dirname_result="$func_dirname_result${2}"
9248
# func_basename file
9251
func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
9254
dnl func_dirname_and_basename
9255
dnl A portable version of this function is already defined in general.m4sh
9256
dnl so there is no need for it here.
9258
# func_stripname prefix suffix name
9259
# strip PREFIX and SUFFIX off of NAME.
9260
# PREFIX and SUFFIX must not contain globbing or regex special
9261
# characters, hashes, percent signs, but SUFFIX may contain a leading
9262
# dot (in which case that matches only a dot).
9263
# func_strip_suffix prefix name
9267
.*) func_stripname_result=`$ECHO "X${3}" \
9268
| $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
9269
*) func_stripname_result=`$ECHO "X${3}" \
9270
| $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
9275
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
9276
my_sed_long_arg='1s/^-[[^=]]*=//'
9281
func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
9282
func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
9288
func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
9291
# func_xform libobj-or-source
9294
func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
9297
# func_arith arithmetic-term...
9300
func_arith_result=`expr "$[@]"`
9304
# STRING may not start with a hyphen.
9307
func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
9313
case $lt_shell_append in
9315
cat << \_LT_EOF >> "$cfgfile"
9317
# func_append var value
9318
# Append VALUE to the end of shell variable VAR.
9326
cat << \_LT_EOF >> "$cfgfile"
9328
# func_append var value
9329
# Append VALUE to the end of shell variable VAR.
9332
eval "$[1]=\$$[1]\$[2]"
9340
# Helper functions for option handling. -*- Autoconf -*-
9342
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9343
# Written by Gary V. Vaughan, 2004
9345
# This file is free software; the Free Software Foundation gives
9346
# unlimited permission to copy and/or distribute it, with or without
9347
# modifications, as long as this notice is preserved.
9349
# serial 6 ltoptions.m4
9351
# This is to help aclocal find these macros, as it can't see m4_define.
9352
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9355
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9356
# ------------------------------------------
9357
m4_define([_LT_MANGLE_OPTION],
9358
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9361
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9362
# ---------------------------------------
9363
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9364
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
9366
m4_define([_LT_SET_OPTION],
9367
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9368
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9369
_LT_MANGLE_DEFUN([$1], [$2]),
9370
[m4_warning([Unknown $1 option `$2'])])[]dnl
9374
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9375
# ------------------------------------------------------------
9376
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9377
m4_define([_LT_IF_OPTION],
9378
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9381
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9382
# -------------------------------------------------------
9383
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9385
m4_define([_LT_UNLESS_OPTIONS],
9386
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9387
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9388
[m4_define([$0_found])])])[]dnl
9389
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9394
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9395
# ----------------------------------------
9396
# OPTION-LIST is a space-separated list of Libtool options associated
9397
# with MACRO-NAME. If any OPTION has a matching handler declared with
9398
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9399
# the unknown option and exit.
9400
m4_defun([_LT_SET_OPTIONS],
9402
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9403
[_LT_SET_OPTION([$1], _LT_Option)])
9405
m4_if([$1],[LT_INIT],[
9407
dnl Simply set some default values (i.e off) if boolean options were not
9409
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9411
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9414
dnl If no reference was made to various pairs of opposing options, then
9415
dnl we run the default mode handler for the pair. For example, if neither
9416
dnl `shared' nor `disable-shared' was passed, we enable building of shared
9417
dnl archives by default:
9418
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9419
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9420
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9421
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9422
[_LT_ENABLE_FAST_INSTALL])
9428
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9429
# -----------------------------------------
9430
m4_define([_LT_MANGLE_DEFUN],
9431
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9434
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9435
# -----------------------------------------------
9436
m4_define([LT_OPTION_DEFINE],
9437
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9438
])# LT_OPTION_DEFINE
9443
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9446
AU_DEFUN([AC_LIBTOOL_DLOPEN],
9447
[_LT_SET_OPTION([LT_INIT], [dlopen])
9448
AC_DIAGNOSE([obsolete],
9449
[$0: Remove this warning and the call to _LT_SET_OPTION when you
9450
put the `dlopen' option into LT_INIT's first parameter.])
9453
dnl aclocal-1.4 backwards compatibility:
9454
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9459
# Declare package support for building win32 dll's.
9460
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9461
[enable_win32_dll=yes
9464
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
9465
AC_CHECK_TOOL(AS, as, false)
9466
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9467
AC_CHECK_TOOL(OBJDUMP, objdump, false)
9471
test -z "$AS" && AS=as
9472
_LT_DECL([], [AS], [0], [Assembler program])dnl
9474
test -z "$DLLTOOL" && DLLTOOL=dlltool
9475
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
9477
test -z "$OBJDUMP" && OBJDUMP=objdump
9478
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
9481
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9482
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9483
_LT_SET_OPTION([LT_INIT], [win32-dll])
9484
AC_DIAGNOSE([obsolete],
9485
[$0: Remove this warning and the call to _LT_SET_OPTION when you
9486
put the `win32-dll' option into LT_INIT's first parameter.])
9489
dnl aclocal-1.4 backwards compatibility:
9490
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9493
# _LT_ENABLE_SHARED([DEFAULT])
9494
# ----------------------------
9495
# implement the --enable-shared flag, and supports the `shared' and
9496
# `disable-shared' LT_INIT options.
9497
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9498
m4_define([_LT_ENABLE_SHARED],
9499
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9500
AC_ARG_ENABLE([shared],
9501
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9502
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9503
[p=${PACKAGE-default}
9505
yes) enable_shared=yes ;;
9506
no) enable_shared=no ;;
9509
# Look at the argument we got. We use all the common list separators.
9510
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9511
for pkg in $enableval; do
9513
if test "X$pkg" = "X$p"; then
9520
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9522
_LT_DECL([build_libtool_libs], [enable_shared], [0],
9523
[Whether or not to build shared libraries])
9524
])# _LT_ENABLE_SHARED
9526
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9527
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9530
AC_DEFUN([AC_ENABLE_SHARED],
9531
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9534
AC_DEFUN([AC_DISABLE_SHARED],
9535
[_LT_SET_OPTION([LT_INIT], [disable-shared])
9538
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9539
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9541
dnl aclocal-1.4 backwards compatibility:
9542
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9543
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9547
# _LT_ENABLE_STATIC([DEFAULT])
9548
# ----------------------------
9549
# implement the --enable-static flag, and support the `static' and
9550
# `disable-static' LT_INIT options.
9551
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9552
m4_define([_LT_ENABLE_STATIC],
9553
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9554
AC_ARG_ENABLE([static],
9555
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9556
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9557
[p=${PACKAGE-default}
9559
yes) enable_static=yes ;;
9560
no) enable_static=no ;;
9563
# Look at the argument we got. We use all the common list separators.
9564
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9565
for pkg in $enableval; do
9567
if test "X$pkg" = "X$p"; then
9574
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9576
_LT_DECL([build_old_libs], [enable_static], [0],
9577
[Whether or not to build static libraries])
9578
])# _LT_ENABLE_STATIC
9580
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9581
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9584
AC_DEFUN([AC_ENABLE_STATIC],
9585
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9588
AC_DEFUN([AC_DISABLE_STATIC],
9589
[_LT_SET_OPTION([LT_INIT], [disable-static])
9592
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9593
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9595
dnl aclocal-1.4 backwards compatibility:
9596
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9597
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9601
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
9602
# ----------------------------------
9603
# implement the --enable-fast-install flag, and support the `fast-install'
9604
# and `disable-fast-install' LT_INIT options.
9605
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9606
m4_define([_LT_ENABLE_FAST_INSTALL],
9607
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9608
AC_ARG_ENABLE([fast-install],
9609
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9610
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9611
[p=${PACKAGE-default}
9613
yes) enable_fast_install=yes ;;
9614
no) enable_fast_install=no ;;
9616
enable_fast_install=no
9617
# Look at the argument we got. We use all the common list separators.
9618
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9619
for pkg in $enableval; do
9621
if test "X$pkg" = "X$p"; then
9622
enable_fast_install=yes
9628
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9630
_LT_DECL([fast_install], [enable_fast_install], [0],
9631
[Whether or not to optimize for fast installation])dnl
9632
])# _LT_ENABLE_FAST_INSTALL
9634
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9635
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9638
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9639
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9640
AC_DIAGNOSE([obsolete],
9641
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9642
the `fast-install' option into LT_INIT's first parameter.])
9645
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9646
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9647
AC_DIAGNOSE([obsolete],
9648
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9649
the `disable-fast-install' option into LT_INIT's first parameter.])
9652
dnl aclocal-1.4 backwards compatibility:
9653
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9654
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9657
# _LT_WITH_PIC([MODE])
9658
# --------------------
9659
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
9661
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
9662
m4_define([_LT_WITH_PIC],
9664
[AS_HELP_STRING([--with-pic],
9665
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9666
[pic_mode="$withval"],
9669
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9671
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9674
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9675
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9678
AU_DEFUN([AC_LIBTOOL_PICMODE],
9679
[_LT_SET_OPTION([LT_INIT], [pic-only])
9680
AC_DIAGNOSE([obsolete],
9681
[$0: Remove this warning and the call to _LT_SET_OPTION when you
9682
put the `pic-only' option into LT_INIT's first parameter.])
9685
dnl aclocal-1.4 backwards compatibility:
9686
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9689
m4_define([_LTDL_MODE], [])
9690
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9691
[m4_define([_LTDL_MODE], [nonrecursive])])
9692
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9693
[m4_define([_LTDL_MODE], [recursive])])
9694
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9695
[m4_define([_LTDL_MODE], [subproject])])
9697
m4_define([_LTDL_TYPE], [])
9698
LT_OPTION_DEFINE([LTDL_INIT], [installable],
9699
[m4_define([_LTDL_TYPE], [installable])])
9700
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9701
[m4_define([_LTDL_TYPE], [convenience])])
9703
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
9705
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9706
# Written by Gary V. Vaughan, 2004
9708
# This file is free software; the Free Software Foundation gives
9709
# unlimited permission to copy and/or distribute it, with or without
9710
# modifications, as long as this notice is preserved.
9712
# serial 6 ltsugar.m4
9714
# This is to help aclocal find these macros, as it can't see m4_define.
9715
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9718
# lt_join(SEP, ARG1, [ARG2...])
9719
# -----------------------------
9720
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9721
# associated separator.
9722
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9723
# versions in m4sugar had bugs.
9724
m4_define([lt_join],
9725
[m4_if([$#], [1], [],
9727
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9728
m4_define([_lt_join],
9729
[m4_if([$#$2], [2], [],
9730
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9736
# Manipulate m4 lists.
9737
# These macros are necessary as long as will still need to support
9738
# Autoconf-2.59 which quotes differently.
9739
m4_define([lt_car], [[$1]])
9741
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9743
[m4_dquote(m4_shift($@))])])
9744
m4_define([lt_unquote], $1)
9747
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9748
# ------------------------------------------
9749
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9750
# Note that neither SEPARATOR nor STRING are expanded; they are appended
9751
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9752
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9753
# than defined and empty).
9755
# This macro is needed until we can rely on Autoconf 2.62, since earlier
9756
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9757
m4_define([lt_append],
9759
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9763
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9764
# ----------------------------------------------------------
9765
# Produce a SEP delimited list of all paired combinations of elements of
9766
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
9767
# has the form PREFIXmINFIXSUFFIXn.
9768
# Needed until we can rely on m4_combine added in Autoconf 2.62.
9769
m4_define([lt_combine],
9770
[m4_if(m4_eval([$# > 3]), [1],
9771
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9772
[[m4_foreach([_Lt_prefix], [$2],
9773
[m4_foreach([_Lt_suffix],
9774
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9775
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9778
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9779
# -----------------------------------------------------------------------
9780
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9781
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9782
m4_define([lt_if_append_uniq],
9784
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9785
[lt_append([$1], [$2], [$3])$4],
9787
[lt_append([$1], [$2], [$3])$4])])
9790
# lt_dict_add(DICT, KEY, VALUE)
9791
# -----------------------------
9792
m4_define([lt_dict_add],
9793
[m4_define([$1($2)], [$3])])
9796
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9797
# --------------------------------------------
9798
m4_define([lt_dict_add_subkey],
9799
[m4_define([$1($2:$3)], [$4])])
9802
# lt_dict_fetch(DICT, KEY, [SUBKEY])
9803
# ----------------------------------
9804
m4_define([lt_dict_fetch],
9806
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9807
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9810
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9811
# -----------------------------------------------------------------
9812
m4_define([lt_if_dict_fetch],
9813
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9818
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9819
# --------------------------------------------------------------
9820
m4_define([lt_dict_filter],
9821
[m4_if([$5], [], [],
9822
[lt_join(m4_quote(m4_default([$4], [[, ]])),
9823
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9824
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9827
# ltversion.m4 -- version numbers -*- Autoconf -*-
9829
# Copyright (C) 2004 Free Software Foundation, Inc.
9830
# Written by Scott James Remnant, 2004
9832
# This file is free software; the Free Software Foundation gives
9833
# unlimited permission to copy and/or distribute it, with or without
9834
# modifications, as long as this notice is preserved.
9836
# Generated from ltversion.in.
9838
# serial 3017 ltversion.m4
9839
# This file is part of GNU Libtool
9841
m4_define([LT_PACKAGE_VERSION], [2.2.6b])
9842
m4_define([LT_PACKAGE_REVISION], [1.3017])
9844
AC_DEFUN([LTVERSION_VERSION],
9845
[macro_version='2.2.6b'
9846
macro_revision='1.3017'
9847
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9848
_LT_DECL(, macro_revision, 0)
9851
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
9853
# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
9854
# Written by Scott James Remnant, 2004.
9856
# This file is free software; the Free Software Foundation gives
9857
# unlimited permission to copy and/or distribute it, with or without
9858
# modifications, as long as this notice is preserved.
9860
# serial 4 lt~obsolete.m4
9862
# These exist entirely to fool aclocal when bootstrapping libtool.
9864
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9865
# which have later been changed to m4_define as they aren't part of the
9866
# exported API, or moved to Autoconf or Automake where they belong.
9868
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
9869
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9870
# using a macro with the same name in our local m4/libtool.m4 it'll
9871
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9872
# and doesn't know about Autoconf macros at all.)
9874
# So we provide this file, which has a silly filename so it's always
9875
# included after everything else. This provides aclocal with the
9876
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9877
# because those macros already exist, or will be overwritten later.
9878
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9880
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9881
# Yes, that means every name once taken will need to remain here until
9882
# we give up compatibility with versions before 1.7, at which point
9883
# we need to keep only those names which we still refer to.
9885
# This is to help aclocal find these macros, as it can't see m4_define.
9886
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9888
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9889
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
9890
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9891
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
9892
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9893
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
9894
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
9895
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9896
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
9897
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9898
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
9899
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9900
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9901
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9902
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9903
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9904
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
9905
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9906
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9907
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
9908
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
9909
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9910
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9911
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9912
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9913
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9914
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9915
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9916
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
9917
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
9918
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
9919
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9920
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9921
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
9922
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
9923
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9924
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9925
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
9926
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9927
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
9928
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
9929
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
9930
m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
9931
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9932
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9933
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9934
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9935
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9936
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9937
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9938
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9939
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9940
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9941
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9942
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9944
# nls.m4 serial 5 (gettext-0.18)
9945
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
9947
dnl This file is free software; the Free Software Foundation
9948
dnl gives unlimited permission to copy and/or distribute it,
9949
dnl with or without modifications, as long as this notice is preserved.
9951
dnl This file can can be used in projects which are not available under
9952
dnl the GNU General Public License or the GNU Library General Public
9953
dnl License but which still want to provide support for the GNU gettext
9955
dnl Please note that the actual code of the GNU gettext library is covered
9956
dnl by the GNU Library General Public License, and the rest of the GNU
9957
dnl gettext package package is covered by the GNU General Public License.
9958
dnl They are *not* in the public domain.
9961
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9962
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9968
AC_MSG_CHECKING([whether NLS is requested])
9969
dnl Default is enabled NLS
9970
AC_ARG_ENABLE([nls],
9971
[ --disable-nls do not use Native Language Support],
9972
USE_NLS=$enableval, USE_NLS=yes)
9973
AC_MSG_RESULT([$USE_NLS])
9977
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
9978
# serial 1 (pkg-config-0.24)
9980
# Copyright Ā© 2004 Scott James Remnant <scott@netsplit.com>.
9982
# This program is free software; you can redistribute it and/or modify
9983
# it under the terms of the GNU General Public License as published by
9984
# the Free Software Foundation; either version 2 of the License, or
9985
# (at your option) any later version.
9987
# This program is distributed in the hope that it will be useful, but
9988
# WITHOUT ANY WARRANTY; without even the implied warranty of
9989
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9990
# General Public License for more details.
9992
# You should have received a copy of the GNU General Public License
9993
# along with this program; if not, write to the Free Software
9994
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9996
# As a special exception to the GNU General Public License, if you
9997
# distribute this file as part of a program that contains a
9998
# configuration script generated by Autoconf, you may include it under
9999
# the same distribution terms that you use for the rest of that program.
10001
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
10002
# ----------------------------------
10003
AC_DEFUN([PKG_PROG_PKG_CONFIG],
10004
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
10005
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
10006
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
10007
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
10008
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
10010
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10011
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
10013
if test -n "$PKG_CONFIG"; then
10014
_pkg_min_version=m4_default([$1], [0.9.0])
10015
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
10016
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10017
AC_MSG_RESULT([yes])
10019
AC_MSG_RESULT([no])
10023
])# PKG_PROG_PKG_CONFIG
10025
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
10027
# Check to see whether a particular set of modules exists. Similar
10028
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
10030
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
10031
# only at the first occurence in configure.ac, so if the first place
10032
# it's called might be skipped (such as if it is within an "if", you
10033
# have to call PKG_CHECK_EXISTS manually
10034
# --------------------------------------------------------------
10035
AC_DEFUN([PKG_CHECK_EXISTS],
10036
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
10037
if test -n "$PKG_CONFIG" && \
10038
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
10039
m4_default([$2], [:])
10040
m4_ifvaln([$3], [else
10044
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
10045
# ---------------------------------------------
10046
m4_define([_PKG_CONFIG],
10047
[if test -n "$$1"; then
10049
elif test -n "$PKG_CONFIG"; then
10050
PKG_CHECK_EXISTS([$3],
10051
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
10058
# _PKG_SHORT_ERRORS_SUPPORTED
10059
# -----------------------------
10060
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
10061
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
10062
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
10063
_pkg_short_errors_supported=yes
10065
_pkg_short_errors_supported=no
10067
])# _PKG_SHORT_ERRORS_SUPPORTED
10070
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
10071
# [ACTION-IF-NOT-FOUND])
10074
# Note that if there is a possibility the first call to
10075
# PKG_CHECK_MODULES might not happen, you should be sure to include an
10076
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
10079
# --------------------------------------------------------------
10080
AC_DEFUN([PKG_CHECK_MODULES],
10081
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
10082
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
10083
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
10086
AC_MSG_CHECKING([for $1])
10088
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
10089
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
10091
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
10092
and $1[]_LIBS to avoid the need to call pkg-config.
10093
See the pkg-config man page for more details.])
10095
if test $pkg_failed = yes; then
10096
AC_MSG_RESULT([no])
10097
_PKG_SHORT_ERRORS_SUPPORTED
10098
if test $_pkg_short_errors_supported = yes; then
10099
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
10101
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
10103
# Put the nasty error message in config.log where it belongs
10104
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
10106
m4_default([$4], [AC_MSG_ERROR(
10107
[Package requirements ($2) were not met:
10111
Consider adjusting the PKG_CONFIG_PATH environment variable if you
10112
installed software in a non-standard prefix.
10116
elif test $pkg_failed = untried; then
10117
AC_MSG_RESULT([no])
10118
m4_default([$4], [AC_MSG_FAILURE(
10119
[The pkg-config script could not be found or is too old. Make sure it
10120
is in your PATH or set the PKG_CONFIG environment variable to the full
10121
path to pkg-config.
10125
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
10128
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
10129
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
10130
AC_MSG_RESULT([yes])
10133
])# PKG_CHECK_MODULES
10135
# po.m4 serial 17 (gettext-0.18)
10136
dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
10137
dnl This file is free software; the Free Software Foundation
10138
dnl gives unlimited permission to copy and/or distribute it,
10139
dnl with or without modifications, as long as this notice is preserved.
10141
dnl This file can can be used in projects which are not available under
10142
dnl the GNU General Public License or the GNU Library General Public
10143
dnl License but which still want to provide support for the GNU gettext
10145
dnl Please note that the actual code of the GNU gettext library is covered
10146
dnl by the GNU Library General Public License, and the rest of the GNU
10147
dnl gettext package package is covered by the GNU General Public License.
10148
dnl They are *not* in the public domain.
10151
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
10152
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
10156
dnl Checks for all prerequisites of the po subdirectory.
10157
AC_DEFUN([AM_PO_SUBDIRS],
10159
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10160
AC_REQUIRE([AC_PROG_INSTALL])dnl
10161
AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
10162
AC_REQUIRE([AM_NLS])dnl
10164
dnl Release version of the gettext macros. This is used to ensure that
10165
dnl the gettext macros and po/Makefile.in.in are in sync.
10166
AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
10168
dnl Perform the following tests also if --disable-nls has been given,
10169
dnl because they are needed for "make dist" to work.
10171
dnl Search for GNU msgfmt in the PATH.
10172
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
10173
dnl The second test excludes FreeBSD msgfmt.
10174
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
10175
[$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
10176
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
10178
AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
10180
dnl Test whether it is GNU msgfmt >= 0.15.
10182
case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
10183
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
10184
*) MSGFMT_015=$MSGFMT ;;
10186
changequote([,])dnl
10187
AC_SUBST([MSGFMT_015])
10189
case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
10190
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
10191
*) GMSGFMT_015=$GMSGFMT ;;
10193
changequote([,])dnl
10194
AC_SUBST([GMSGFMT_015])
10196
dnl Search for GNU xgettext 0.12 or newer in the PATH.
10197
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
10198
dnl The second test excludes FreeBSD xgettext.
10199
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
10200
[$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
10201
(if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
10203
dnl Remove leftover from FreeBSD xgettext call.
10206
dnl Test whether it is GNU xgettext >= 0.15.
10208
case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
10209
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
10210
*) XGETTEXT_015=$XGETTEXT ;;
10212
changequote([,])dnl
10213
AC_SUBST([XGETTEXT_015])
10215
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
10216
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
10217
[$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
10219
dnl Installation directories.
10220
dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
10221
dnl have to define it here, so that it can be used in po/Makefile.
10222
test -n "$localedir" || localedir='${datadir}/locale'
10223
AC_SUBST([localedir])
10225
dnl Support for AM_XGETTEXT_OPTION.
10226
test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
10227
AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
10229
AC_CONFIG_COMMANDS([po-directories], [[
10230
for ac_file in $CONFIG_FILES; do
10231
# Support "outfile[:infile[:infile...]]"
10233
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10235
# PO directories have a Makefile.in generated from Makefile.in.in.
10236
case "$ac_file" in */Makefile.in)
10237
# Adjust a relative srcdir.
10238
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
10239
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
10240
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
10241
# In autoconf-2.13 it is called $ac_given_srcdir.
10242
# In autoconf-2.50 it is called $srcdir.
10243
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
10244
case "$ac_given_srcdir" in
10245
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
10246
/*) top_srcdir="$ac_given_srcdir" ;;
10247
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
10249
# Treat a directory as a PO directory if and only if it has a
10250
# POTFILES.in file. This allows packages to have multiple PO
10251
# directories under different names or in different locations.
10252
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
10253
rm -f "$ac_dir/POTFILES"
10254
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
10255
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
10256
POMAKEFILEDEPS="POTFILES.in"
10257
# ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
10258
# on $ac_dir but don't depend on user-specified configuration
10260
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
10261
# The LINGUAS file contains the set of available languages.
10262
if test -n "$OBSOLETE_ALL_LINGUAS"; then
10263
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
10265
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
10266
# Hide the ALL_LINGUAS assigment from automake < 1.5.
10267
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
10268
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
10270
# The set of available languages was given in configure.in.
10271
# Hide the ALL_LINGUAS assigment from automake < 1.5.
10272
eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
10275
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
10276
# Compute UPDATEPOFILES
10277
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
10278
# Compute DUMMYPOFILES
10279
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
10281
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
10282
case "$ac_given_srcdir" in
10284
*) srcdirpre='$(srcdir)/' ;;
10290
for lang in $ALL_LINGUAS; do
10291
POFILES="$POFILES $srcdirpre$lang.po"
10292
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
10293
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
10294
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
10296
# CATALOGS depends on both $ac_dir and the user's LINGUAS
10297
# environment variable.
10299
if test -n "$ALL_LINGUAS"; then
10300
for presentlang in $ALL_LINGUAS; do
10302
if test "%UNSET%" != "$LINGUAS"; then
10303
desiredlanguages="$LINGUAS"
10305
desiredlanguages="$ALL_LINGUAS"
10307
for desiredlang in $desiredlanguages; do
10308
# Use the presentlang catalog if desiredlang is
10309
# a. equal to presentlang, or
10310
# b. a variant of presentlang (because in this case,
10311
# presentlang can be used as a fallback for messages
10312
# which are not translated in the desiredlang catalog).
10313
case "$desiredlang" in
10314
"$presentlang"*) useit=yes;;
10317
if test $useit = yes; then
10318
INST_LINGUAS="$INST_LINGUAS $presentlang"
10323
if test -n "$INST_LINGUAS"; then
10324
for lang in $INST_LINGUAS; do
10325
CATALOGS="$CATALOGS $lang.gmo"
10328
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
10329
sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
10330
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
10331
if test -f "$f"; then
10333
*.orig | *.bak | *~) ;;
10334
*) cat "$f" >> "$ac_dir/Makefile" ;;
10342
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute
10343
# POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
10344
# from automake < 1.5.
10345
eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
10346
# Capture the value of LINGUAS because we need it to compute CATALOGS.
10347
LINGUAS="${LINGUAS-%UNSET%}"
10351
dnl Postprocesses a Makefile in a directory containing PO files.
10352
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
10354
# When this code is run, in config.status, two variables have already been
10356
# - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
10357
# - LINGUAS is the value of the environment variable LINGUAS at configure
10361
# Adjust a relative srcdir.
10362
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
10363
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
10364
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
10365
# In autoconf-2.13 it is called $ac_given_srcdir.
10366
# In autoconf-2.50 it is called $srcdir.
10367
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
10368
case "$ac_given_srcdir" in
10369
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
10370
/*) top_srcdir="$ac_given_srcdir" ;;
10371
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
10374
# Find a way to echo strings without interpreting backslash.
10375
if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
10378
if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
10379
gt_echo='printf %s\n'
10386
gt_echo='echo_func'
10390
# A sed script that extracts the value of VARIABLE from a Makefile.
10392
# Test if the hold space is empty.
10397
# Yes it was empty. Look if we have the expected variable definition.
10398
/^[ ]*VARIABLE[ ]*=/{
10399
# Seen the first line of the variable definition.
10400
s/^[ ]*VARIABLE[ ]*=//
10405
# Here we are processing a line from the variable definition.
10406
# Remove comment, more precisely replace it with a space.
10408
# See if the line ends in a backslash.
10412
# Print the line, without the trailing backslash.
10415
# There was no trailing backslash. The end of the variable definition is
10416
# reached. Clear the hold space.
10421
# A trailing backslash means that the variable definition continues in the
10422
# next line. Put a nonempty string into the hold space to indicate this.
10427
changequote([,])dnl
10429
# Set POTFILES to the value of the Makefile variable POTFILES.
10430
sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
10431
POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
10432
# Compute POTFILES_DEPS as
10433
# $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
10435
for file in $POTFILES; do
10436
POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
10440
if test -n "$OBSOLETE_ALL_LINGUAS"; then
10441
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
10443
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
10444
# The LINGUAS file contains the set of available languages.
10445
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
10446
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
10448
# Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
10449
sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
10450
ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
10452
# Hide the ALL_LINGUAS assigment from automake < 1.5.
10453
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
10455
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
10456
# Compute UPDATEPOFILES
10457
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
10458
# Compute DUMMYPOFILES
10459
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
10461
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
10462
# Compute PROPERTIESFILES
10463
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
10464
# Compute CLASSFILES
10465
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
10467
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
10469
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
10470
# Compute RESOURCESDLLFILES
10471
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
10472
case "$ac_given_srcdir" in
10474
*) srcdirpre='$(srcdir)/' ;;
10485
for lang in $ALL_LINGUAS; do
10486
POFILES="$POFILES $srcdirpre$lang.po"
10487
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
10488
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
10489
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
10490
PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
10491
CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
10492
QMFILES="$QMFILES $srcdirpre$lang.qm"
10493
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
10494
MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
10495
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
10496
RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
10498
# CATALOGS depends on both $ac_dir and the user's LINGUAS
10499
# environment variable.
10501
if test -n "$ALL_LINGUAS"; then
10502
for presentlang in $ALL_LINGUAS; do
10504
if test "%UNSET%" != "$LINGUAS"; then
10505
desiredlanguages="$LINGUAS"
10507
desiredlanguages="$ALL_LINGUAS"
10509
for desiredlang in $desiredlanguages; do
10510
# Use the presentlang catalog if desiredlang is
10511
# a. equal to presentlang, or
10512
# b. a variant of presentlang (because in this case,
10513
# presentlang can be used as a fallback for messages
10514
# which are not translated in the desiredlang catalog).
10515
case "$desiredlang" in
10516
"$presentlang"*) useit=yes;;
10519
if test $useit = yes; then
10520
INST_LINGUAS="$INST_LINGUAS $presentlang"
10529
if test -n "$INST_LINGUAS"; then
10530
for lang in $INST_LINGUAS; do
10531
CATALOGS="$CATALOGS $lang.gmo"
10532
JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
10533
QTCATALOGS="$QTCATALOGS $lang.qm"
10534
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
10535
TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
10536
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
10537
CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
10541
sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
10542
if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
10543
# Add dependencies that cannot be formulated as a simple suffix rule.
10544
for lang in $ALL_LINGUAS; do
10545
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
10546
cat >> "$ac_file.tmp" <<EOF
10547
$frobbedlang.msg: $lang.po
10548
@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
10549
\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
10553
if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
10554
# Add dependencies that cannot be formulated as a simple suffix rule.
10555
for lang in $ALL_LINGUAS; do
10556
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
10557
cat >> "$ac_file.tmp" <<EOF
10558
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
10559
@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
10560
\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
10564
if test -n "$POMAKEFILEDEPS"; then
10565
cat >> "$ac_file.tmp" <<EOF
10566
Makefile: $POMAKEFILEDEPS
10569
mv "$ac_file.tmp" "$ac_file"
10572
dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
10573
AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
10575
XGETTEXT_EXTRA_OPTIONS=
10578
dnl Registers an option to be passed to xgettext in the po subdirectory.
10579
AC_DEFUN([AM_XGETTEXT_OPTION],
10581
AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
10582
XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
10585
# progtest.m4 serial 6 (gettext-0.18)
10586
dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc.
10587
dnl This file is free software; the Free Software Foundation
10588
dnl gives unlimited permission to copy and/or distribute it,
10589
dnl with or without modifications, as long as this notice is preserved.
10591
dnl This file can can be used in projects which are not available under
10592
dnl the GNU General Public License or the GNU Library General Public
10593
dnl License but which still want to provide support for the GNU gettext
10595
dnl Please note that the actual code of the GNU gettext library is covered
10596
dnl by the GNU Library General Public License, and the rest of the GNU
10597
dnl gettext package package is covered by the GNU General Public License.
10598
dnl They are *not* in the public domain.
10601
dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
10605
# Search path for a program which passes the given test.
10607
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
10608
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
10609
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
10611
# Prepare PATH_SEPARATOR.
10612
# The user is always right.
10613
if test "${PATH_SEPARATOR+set}" != set; then
10614
echo "#! /bin/sh" >conf$$.sh
10615
echo "exit 0" >>conf$$.sh
10617
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10625
# Find out how to test for executable files. Don't use a zero-byte file,
10626
# as systems may use methods other than mode bits to determine executability.
10627
cat >conf$$.file <<_ASEOF
10631
chmod +x conf$$.file
10632
if test -x conf$$.file >/dev/null 2>&1; then
10633
ac_executable_p="test -x"
10635
ac_executable_p="test -f"
10639
# Extract the first word of "$2", so it can be a program name with args.
10640
set dummy $2; ac_word=[$]2
10641
AC_MSG_CHECKING([for $ac_word])
10642
AC_CACHE_VAL([ac_cv_path_$1],
10644
[[\\/]]* | ?:[[\\/]]*)
10645
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
10648
ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
10649
for ac_dir in ifelse([$5], , $PATH, [$5]); do
10651
test -z "$ac_dir" && ac_dir=.
10652
for ac_exec_ext in '' $ac_executable_extensions; do
10653
if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
10654
echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
10656
ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
10663
dnl If no 4th arg is given, leave the cache variable unset,
10664
dnl so AC_PATH_PROGS will keep looking.
10665
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
10669
$1="$ac_cv_path_$1"
10670
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
10671
AC_MSG_RESULT([$][$1])
10673
AC_MSG_RESULT([no])
10678
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
10680
# This file is free software; the Free Software Foundation
10681
# gives unlimited permission to copy and/or distribute it,
10682
# with or without modifications, as long as this notice is preserved.
10684
# AM_AUTOMAKE_VERSION(VERSION)
10685
# ----------------------------
10686
# Automake X.Y traces this macro to ensure aclocal.m4 has been
10687
# generated from the m4 files accompanying Automake X.Y.
10688
# (This private macro should not be called outside this file.)
10689
AC_DEFUN([AM_AUTOMAKE_VERSION],
10690
[am__api_version='1.11'
10691
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
10692
dnl require some minimum version. Point them to the right macro.
10693
m4_if([$1], [1.11.1], [],
10694
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
10697
# _AM_AUTOCONF_VERSION(VERSION)
10698
# -----------------------------
10699
# aclocal traces this macro to find the Autoconf version.
10700
# This is a private macro too. Using m4_define simplifies
10701
# the logic in aclocal, which can simply ignore this definition.
10702
m4_define([_AM_AUTOCONF_VERSION], [])
10704
# AM_SET_CURRENT_AUTOMAKE_VERSION
10705
# -------------------------------
10706
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
10707
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
10708
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
10709
[AM_AUTOMAKE_VERSION([1.11.1])dnl
10710
m4_ifndef([AC_AUTOCONF_VERSION],
10711
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
10712
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
10714
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
10716
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
10718
# This file is free software; the Free Software Foundation
10719
# gives unlimited permission to copy and/or distribute it,
10720
# with or without modifications, as long as this notice is preserved.
10722
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
10723
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
10724
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
10726
# Of course, Automake must honor this variable whenever it calls a
10727
# tool from the auxiliary directory. The problem is that $srcdir (and
10728
# therefore $ac_aux_dir as well) can be either absolute or relative,
10729
# depending on how configure is run. This is pretty annoying, since
10730
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
10731
# source directory, any form will work fine, but in subdirectories a
10732
# relative path needs to be adjusted first.
10734
# $ac_aux_dir/missing
10735
# fails when called from a subdirectory if $ac_aux_dir is relative
10736
# $top_srcdir/$ac_aux_dir/missing
10737
# fails if $ac_aux_dir is absolute,
10738
# fails when called from a subdirectory in a VPATH build with
10739
# a relative $ac_aux_dir
10741
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
10742
# are both prefixed by $srcdir. In an in-source build this is usually
10743
# harmless because $srcdir is `.', but things will broke when you
10744
# start a VPATH build or use an absolute $srcdir.
10746
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
10747
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
10748
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
10749
# and then we would define $MISSING as
10750
# MISSING="\${SHELL} $am_aux_dir/missing"
10751
# This will work as long as MISSING is not called from configure, because
10752
# unfortunately $(top_srcdir) has no meaning in configure.
10753
# However there are other variables, like CC, which are often used in
10754
# configure, and could therefore not use this "fixed" $ac_aux_dir.
10756
# Another solution, used here, is to always expand $ac_aux_dir to an
10757
# absolute PATH. The drawback is that using absolute paths prevent a
10758
# configured tree to be moved without reconfiguration.
10760
AC_DEFUN([AM_AUX_DIR_EXPAND],
10761
[dnl Rely on autoconf to set up CDPATH properly.
10762
AC_PREREQ([2.50])dnl
10763
# expand $ac_aux_dir to an absolute path
10764
am_aux_dir=`cd $ac_aux_dir && pwd`
10767
# AM_CONDITIONAL -*- Autoconf -*-
10769
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
10770
# Free Software Foundation, Inc.
10772
# This file is free software; the Free Software Foundation
10773
# gives unlimited permission to copy and/or distribute it,
10774
# with or without modifications, as long as this notice is preserved.
10778
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
10779
# -------------------------------------
10780
# Define a conditional.
10781
AC_DEFUN([AM_CONDITIONAL],
10782
[AC_PREREQ(2.52)dnl
10783
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
10784
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
10785
AC_SUBST([$1_TRUE])dnl
10786
AC_SUBST([$1_FALSE])dnl
10787
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
10788
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
10789
m4_define([_AM_COND_VALUE_$1], [$2])dnl
10797
AC_CONFIG_COMMANDS_PRE(
10798
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
10799
AC_MSG_ERROR([[conditional "$1" was never defined.
10800
Usually this means the macro was only invoked conditionally.]])
10803
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
10804
# Free Software Foundation, Inc.
10806
# This file is free software; the Free Software Foundation
10807
# gives unlimited permission to copy and/or distribute it,
10808
# with or without modifications, as long as this notice is preserved.
10812
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
10813
# written in clear, in which case automake, when reading aclocal.m4,
10814
# will think it sees a *use*, and therefore will trigger all it's
10815
# C support machinery. Also note that it means that autoscan, seeing
10816
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
10819
# _AM_DEPENDENCIES(NAME)
10820
# ----------------------
10821
# See how the compiler implements dependency checking.
10822
# NAME is "CC", "CXX", "GCJ", or "OBJC".
10823
# We try a few techniques and use that to set a single cache variable.
10825
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
10826
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
10827
# dependency, and given that the user is not expected to run this macro,
10828
# just rely on AC_PROG_CC.
10829
AC_DEFUN([_AM_DEPENDENCIES],
10830
[AC_REQUIRE([AM_SET_DEPDIR])dnl
10831
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
10832
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
10833
AC_REQUIRE([AM_DEP_TRACK])dnl
10835
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
10836
[$1], CXX, [depcc="$CXX" am_compiler_list=],
10837
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
10838
[$1], UPC, [depcc="$UPC" am_compiler_list=],
10839
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
10840
[depcc="$$1" am_compiler_list=])
10842
AC_CACHE_CHECK([dependency style of $depcc],
10843
[am_cv_$1_dependencies_compiler_type],
10844
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
10845
# We make a subdir and do the tests there. Otherwise we can end up
10846
# making bogus files that we don't know about and never remove. For
10847
# instance it was reported that on HP-UX the gcc test will end up
10848
# making a dummy file named `D' -- because `-MD' means `put the output
10851
# Copy depcomp to subdir because otherwise we won't find it if we're
10852
# using a relative directory.
10853
cp "$am_depcomp" conftest.dir
10855
# We will build objects and dependencies in a subdirectory because
10856
# it helps to detect inapplicable dependency modes. For instance
10857
# both Tru64's cc and ICC support -MD to output dependencies as a
10858
# side effect of compilation, but ICC will put the dependencies in
10859
# the current directory while Tru64 will put them in the object
10863
am_cv_$1_dependencies_compiler_type=none
10864
if test "$am_compiler_list" = ""; then
10865
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
10867
am__universal=false
10868
m4_case([$1], [CC],
10869
[case " $depcc " in #(
10870
*\ -arch\ *\ -arch\ *) am__universal=true ;;
10873
[case " $depcc " in #(
10874
*\ -arch\ *\ -arch\ *) am__universal=true ;;
10877
for depmode in $am_compiler_list; do
10878
# Setup a source with many dependencies, because some compilers
10879
# like to wrap large dependency lists on column 80 (with \), and
10880
# we should not choose a depcomp mode which is confused by this.
10882
# We need to recreate these files for each test, as the compiler may
10883
# overwrite some of them when testing with obscure command lines.
10884
# This happens at least with the AIX C compiler.
10886
for i in 1 2 3 4 5 6; do
10887
echo '#include "conftst'$i'.h"' >> sub/conftest.c
10888
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
10889
# Solaris 8's {/usr,}/bin/sh.
10890
touch sub/conftst$i.h
10892
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
10894
# We check with `-c' and `-o' for the sake of the "dashmstdout"
10895
# mode. It turns out that the SunPro C++ compiler does not properly
10896
# handle `-M -o', and we need to detect this. Also, some Intel
10897
# versions had trouble with output in subdirs
10898
am__obj=sub/conftest.${OBJEXT-o}
10899
am__minus_obj="-o $am__obj"
10902
# This depmode causes a compiler race in universal mode.
10903
test "$am__universal" = false || continue
10906
# after this tag, mechanisms are not by side-effect, so they'll
10907
# only be used when explicitly requested
10908
if test "x$enable_dependency_tracking" = xyes; then
10914
msvisualcpp | msvcmsys)
10915
# This compiler won't grok `-c -o', but also, the minuso test has
10916
# not run yet. These depmodes are late enough in the game, and
10917
# so weak that their functioning should not be impacted.
10918
am__obj=conftest.${OBJEXT-o}
10923
if depmode=$depmode \
10924
source=sub/conftest.c object=$am__obj \
10925
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
10926
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
10927
>/dev/null 2>conftest.err &&
10928
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
10929
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
10930
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
10931
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
10932
# icc doesn't choke on unknown options, it will just issue warnings
10933
# or remarks (even with -Werror). So we grep stderr for any message
10934
# that says an option was ignored or not supported.
10935
# When given -MP, icc 7.0 and 7.1 complain thusly:
10936
# icc: Command line warning: ignoring option '-M'; no argument required
10937
# The diagnosis changed in icc 8.0:
10938
# icc: Command line remark: option '-MP' not supported
10939
if (grep 'ignoring option' conftest.err ||
10940
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
10941
am_cv_$1_dependencies_compiler_type=$depmode
10948
rm -rf conftest.dir
10950
am_cv_$1_dependencies_compiler_type=none
10953
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
10954
AM_CONDITIONAL([am__fastdep$1], [
10955
test "x$enable_dependency_tracking" != xno \
10956
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
10962
# Choose a directory name for dependency files.
10963
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
10964
AC_DEFUN([AM_SET_DEPDIR],
10965
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10966
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
10972
AC_DEFUN([AM_DEP_TRACK],
10973
[AC_ARG_ENABLE(dependency-tracking,
10974
[ --disable-dependency-tracking speeds up one-time build
10975
--enable-dependency-tracking do not reject slow dependency extractors])
10976
if test "x$enable_dependency_tracking" != xno; then
10977
am_depcomp="$ac_aux_dir/depcomp"
10980
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
10981
AC_SUBST([AMDEPBACKSLASH])dnl
10982
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
10985
# Generate code to set up dependency tracking. -*- Autoconf -*-
10987
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
10988
# Free Software Foundation, Inc.
10990
# This file is free software; the Free Software Foundation
10991
# gives unlimited permission to copy and/or distribute it,
10992
# with or without modifications, as long as this notice is preserved.
10996
# _AM_OUTPUT_DEPENDENCY_COMMANDS
10997
# ------------------------------
10998
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
11000
# Autoconf 2.62 quotes --file arguments for eval, but not when files
11001
# are listed without --file. Let's play safe and only enable the eval
11002
# if we detect the quoting.
11003
case $CONFIG_FILES in
11004
*\'*) eval set x "$CONFIG_FILES" ;;
11005
*) set x $CONFIG_FILES ;;
11010
# Strip MF so we end up with the name of the file.
11011
mf=`echo "$mf" | sed -e 's/:.*$//'`
11012
# Check whether this is an Automake generated Makefile or not.
11013
# We used to match only the files named `Makefile.in', but
11014
# some people rename them; so instead we look at the file content.
11015
# Grep'ing the first line is not enough: some people post-process
11016
# each Makefile.in and add a new line on top of each file to say so.
11017
# Grep'ing the whole file is not good either: AIX grep has a line
11018
# limit of 2048, but all sed's we know have understand at least 4000.
11019
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
11020
dirpart=`AS_DIRNAME("$mf")`
11024
# Extract the definition of DEPDIR, am__include, and am__quote
11025
# from the Makefile without running `make'.
11026
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
11027
test -z "$DEPDIR" && continue
11028
am__include=`sed -n 's/^am__include = //p' < "$mf"`
11029
test -z "am__include" && continue
11030
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
11031
# When using ansi2knr, U may be empty or an underscore; expand it
11032
U=`sed -n 's/^U = //p' < "$mf"`
11033
# Find all dependency output files, they are included files with
11034
# $(DEPDIR) in their names. We invoke sed twice because it is the
11035
# simplest approach to changing $(DEPDIR) to its actual value in the
11037
for file in `sed -n "
11038
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
11039
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
11040
# Make sure the directory exists.
11041
test -f "$dirpart/$file" && continue
11042
fdir=`AS_DIRNAME(["$file"])`
11043
AS_MKDIR_P([$dirpart/$fdir])
11044
# echo "creating $dirpart/$file"
11045
echo '# dummy' > "$dirpart/$file"
11049
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
11052
# AM_OUTPUT_DEPENDENCY_COMMANDS
11053
# -----------------------------
11054
# This macro should only be invoked once -- use via AC_REQUIRE.
11056
# This code is only required when automatic dependency tracking
11057
# is enabled. FIXME. This creates each `.P' file that we will
11058
# need in order to bootstrap the dependency handling code.
11059
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
11060
[AC_CONFIG_COMMANDS([depfiles],
11061
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
11062
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
11065
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
11066
# Free Software Foundation, Inc.
11068
# This file is free software; the Free Software Foundation
11069
# gives unlimited permission to copy and/or distribute it,
11070
# with or without modifications, as long as this notice is preserved.
11074
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
11075
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
11077
# Do all the work for Automake. -*- Autoconf -*-
11079
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
11080
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
11082
# This file is free software; the Free Software Foundation
11083
# gives unlimited permission to copy and/or distribute it,
11084
# with or without modifications, as long as this notice is preserved.
11088
# This macro actually does too much. Some checks are only needed if
11089
# your package does certain things. But this isn't really a big deal.
11091
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
11092
# AM_INIT_AUTOMAKE([OPTIONS])
11093
# -----------------------------------------------
11094
# The call with PACKAGE and VERSION arguments is the old style
11095
# call (pre autoconf-2.50), which is being phased out. PACKAGE
11096
# and VERSION should now be passed to AC_INIT and removed from
11097
# the call to AM_INIT_AUTOMAKE.
11098
# We support both call styles for the transition. After
11099
# the next Automake release, Autoconf can make the AC_INIT
11100
# arguments mandatory, and then we can depend on a new Autoconf
11101
# release and drop the old call support.
11102
AC_DEFUN([AM_INIT_AUTOMAKE],
11103
[AC_PREREQ([2.62])dnl
11104
dnl Autoconf wants to disallow AM_ names. We explicitly allow
11105
dnl the ones we care about.
11106
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
11107
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
11108
AC_REQUIRE([AC_PROG_INSTALL])dnl
11109
if test "`cd $srcdir && pwd`" != "`pwd`"; then
11110
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
11111
# is not polluted with repeated "-I."
11112
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
11113
# test to see if srcdir already configured
11114
if test -f $srcdir/config.status; then
11115
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
11119
# test whether we have cygpath
11120
if test -z "$CYGPATH_W"; then
11121
if (cygpath --version) >/dev/null 2>/dev/null; then
11122
CYGPATH_W='cygpath -w'
11127
AC_SUBST([CYGPATH_W])
11129
# Define the identity of the package.
11130
dnl Distinguish between old-style and new-style calls.
11132
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
11133
AC_SUBST([PACKAGE], [$1])dnl
11134
AC_SUBST([VERSION], [$2])],
11135
[_AM_SET_OPTIONS([$1])dnl
11136
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
11137
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
11138
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
11139
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
11140
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
11142
_AM_IF_OPTION([no-define],,
11143
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
11144
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
11146
# Some tools Automake needs.
11147
AC_REQUIRE([AM_SANITY_CHECK])dnl
11148
AC_REQUIRE([AC_ARG_PROGRAM])dnl
11149
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
11150
AM_MISSING_PROG(AUTOCONF, autoconf)
11151
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
11152
AM_MISSING_PROG(AUTOHEADER, autoheader)
11153
AM_MISSING_PROG(MAKEINFO, makeinfo)
11154
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
11155
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
11156
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
11157
# We need awk for the "check" target. The system "awk" is bad on
11159
AC_REQUIRE([AC_PROG_AWK])dnl
11160
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
11161
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
11162
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
11163
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
11164
[_AM_PROG_TAR([v7])])])
11165
_AM_IF_OPTION([no-dependencies],,
11166
[AC_PROVIDE_IFELSE([AC_PROG_CC],
11167
[_AM_DEPENDENCIES(CC)],
11168
[define([AC_PROG_CC],
11169
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
11170
AC_PROVIDE_IFELSE([AC_PROG_CXX],
11171
[_AM_DEPENDENCIES(CXX)],
11172
[define([AC_PROG_CXX],
11173
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
11174
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
11175
[_AM_DEPENDENCIES(OBJC)],
11176
[define([AC_PROG_OBJC],
11177
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
11179
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
11180
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
11181
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
11182
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
11183
AC_CONFIG_COMMANDS_PRE(dnl
11184
[m4_provide_if([_AM_COMPILER_EXEEXT],
11185
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
11188
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
11189
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
11190
dnl mangled by Autoconf and run in a shell conditional statement.
11191
m4_define([_AC_COMPILER_EXEEXT],
11192
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
11195
# When config.status generates a header, we must update the stamp-h file.
11196
# This file resides in the same directory as the config header
11197
# that is generated. The stamp files are numbered to have different names.
11199
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
11200
# loop where config.status creates the headers, so we can generate
11201
# our stamp files there.
11202
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
11203
[# Compute $1's index in $config_headers.
11206
for _am_header in $config_headers :; do
11207
case $_am_header in
11208
$_am_arg | $_am_arg:* )
11211
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
11214
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
11216
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
11218
# This file is free software; the Free Software Foundation
11219
# gives unlimited permission to copy and/or distribute it,
11220
# with or without modifications, as long as this notice is preserved.
11222
# AM_PROG_INSTALL_SH
11223
# ------------------
11224
# Define $install_sh.
11225
AC_DEFUN([AM_PROG_INSTALL_SH],
11226
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11227
if test x"${install_sh}" != xset; then
11228
case $am_aux_dir in
11230
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
11232
install_sh="\${SHELL} $am_aux_dir/install-sh"
11235
AC_SUBST(install_sh)])
11237
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
11239
# This file is free software; the Free Software Foundation
11240
# gives unlimited permission to copy and/or distribute it,
11241
# with or without modifications, as long as this notice is preserved.
11245
# Check whether the underlying file-system supports filenames
11246
# with a leading dot. For instance MS-DOS doesn't.
11247
AC_DEFUN([AM_SET_LEADING_DOT],
11248
[rm -rf .tst 2>/dev/null
11249
mkdir .tst 2>/dev/null
11250
if test -d .tst; then
11255
rmdir .tst 2>/dev/null
11256
AC_SUBST([am__leading_dot])])
11258
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
11259
# From Jim Meyering
11261
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
11262
# Free Software Foundation, Inc.
11264
# This file is free software; the Free Software Foundation
11265
# gives unlimited permission to copy and/or distribute it,
11266
# with or without modifications, as long as this notice is preserved.
11270
# AM_MAINTAINER_MODE([DEFAULT-MODE])
11271
# ----------------------------------
11272
# Control maintainer-specific portions of Makefiles.
11273
# Default is to disable them, unless `enable' is passed literally.
11274
# For symmetry, `disable' may be passed as well. Anyway, the user
11275
# can override the default with the --enable/--disable switch.
11276
AC_DEFUN([AM_MAINTAINER_MODE],
11277
[m4_case(m4_default([$1], [disable]),
11278
[enable], [m4_define([am_maintainer_other], [disable])],
11279
[disable], [m4_define([am_maintainer_other], [enable])],
11280
[m4_define([am_maintainer_other], [enable])
11281
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
11282
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
11283
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
11284
AC_ARG_ENABLE([maintainer-mode],
11285
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
11286
(and sometimes confusing) to the casual installer],
11287
[USE_MAINTAINER_MODE=$enableval],
11288
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
11289
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
11290
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
11291
MAINT=$MAINTAINER_MODE_TRUE
11292
AC_SUBST([MAINT])dnl
11296
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
11298
# Check to see how 'make' treats includes. -*- Autoconf -*-
11300
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
11302
# This file is free software; the Free Software Foundation
11303
# gives unlimited permission to copy and/or distribute it,
11304
# with or without modifications, as long as this notice is preserved.
11308
# AM_MAKE_INCLUDE()
11309
# -----------------
11310
# Check to see how make treats includes.
11311
AC_DEFUN([AM_MAKE_INCLUDE],
11312
[am_make=${MAKE-make}
11313
cat > confinc << 'END'
11315
@echo this is the am__doit target
11318
# If we don't find an include directive, just comment out the code.
11319
AC_MSG_CHECKING([for style of include used by $am_make])
11323
# First try GNU make style include.
11324
echo "include confinc" > confmf
11325
# Ignore all kinds of additional output from `make'.
11326
case `$am_make -s -f confmf 2> /dev/null` in #(
11327
*the\ am__doit\ target*)
11328
am__include=include
11333
# Now try BSD make style include.
11334
if test "$am__include" = "#"; then
11335
echo '.include "confinc"' > confmf
11336
case `$am_make -s -f confmf 2> /dev/null` in #(
11337
*the\ am__doit\ target*)
11338
am__include=.include
11344
AC_SUBST([am__include])
11345
AC_SUBST([am__quote])
11346
AC_MSG_RESULT([$_am_result])
11347
rm -f confinc confmf
11350
# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
11351
# Free Software Foundation, Inc.
11353
# This file is free software; the Free Software Foundation
11354
# gives unlimited permission to copy and/or distribute it,
11355
# with or without modifications, as long as this notice is preserved.
11361
# Like AC_PROG_CC_C_O, but changed for automake.
11362
AC_DEFUN([AM_PROG_CC_C_O],
11363
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
11364
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11365
AC_REQUIRE_AUX_FILE([compile])dnl
11366
# FIXME: we rely on the cache variable name because
11367
# there is no other way.
11369
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
11370
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
11371
if test "$am_t" != yes; then
11372
# Losing compiler, so override with the script.
11373
# FIXME: It is wrong to rewrite CC.
11374
# But if we don't then we get into trouble of one sort or another.
11375
# A longer-term fix would be to have automake use am__CC in this case,
11376
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
11377
CC="$am_aux_dir/compile $CC"
11379
dnl Make sure AC_PROG_CC is never called again, or it will override our
11381
m4_define([AC_PROG_CC],
11382
[m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
11385
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
11387
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
11388
# Free Software Foundation, Inc.
11390
# This file is free software; the Free Software Foundation
11391
# gives unlimited permission to copy and/or distribute it,
11392
# with or without modifications, as long as this notice is preserved.
11396
# AM_MISSING_PROG(NAME, PROGRAM)
11397
# ------------------------------
11398
AC_DEFUN([AM_MISSING_PROG],
11399
[AC_REQUIRE([AM_MISSING_HAS_RUN])
11400
$1=${$1-"${am_missing_run}$2"}
11404
# AM_MISSING_HAS_RUN
11405
# ------------------
11406
# Define MISSING if not defined so far and test if it supports --run.
11407
# If it does, set am_missing_run to use it, otherwise, to nothing.
11408
AC_DEFUN([AM_MISSING_HAS_RUN],
11409
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11410
AC_REQUIRE_AUX_FILE([missing])dnl
11411
if test x"${MISSING+set}" != xset; then
11412
case $am_aux_dir in
11414
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
11416
MISSING="\${SHELL} $am_aux_dir/missing" ;;
11419
# Use eval to expand $SHELL
11420
if eval "$MISSING --run true"; then
11421
am_missing_run="$MISSING --run "
11424
AC_MSG_WARN([`missing' script is too old or missing])
11428
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
11430
# This file is free software; the Free Software Foundation
11431
# gives unlimited permission to copy and/or distribute it,
11432
# with or without modifications, as long as this notice is preserved.
11436
# Check for `mkdir -p'.
11437
AC_DEFUN([AM_PROG_MKDIR_P],
11438
[AC_PREREQ([2.60])dnl
11439
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
11440
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
11441
dnl while keeping a definition of mkdir_p for backward compatibility.
11442
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
11443
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
11444
dnl Makefile.ins that do not define MKDIR_P, so we do our own
11445
dnl adjustment using top_builddir (which is defined more often than
11447
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
11449
[[\\/$]]* | ?:[[\\/]]*) ;;
11450
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
11454
# Helper functions for option handling. -*- Autoconf -*-
11456
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
11458
# This file is free software; the Free Software Foundation
11459
# gives unlimited permission to copy and/or distribute it,
11460
# with or without modifications, as long as this notice is preserved.
11464
# _AM_MANGLE_OPTION(NAME)
11465
# -----------------------
11466
AC_DEFUN([_AM_MANGLE_OPTION],
11467
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
11469
# _AM_SET_OPTION(NAME)
11470
# ------------------------------
11471
# Set option NAME. Presently that only means defining a flag for this option.
11472
AC_DEFUN([_AM_SET_OPTION],
11473
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
11475
# _AM_SET_OPTIONS(OPTIONS)
11476
# ----------------------------------
11477
# OPTIONS is a space-separated list of Automake options.
11478
AC_DEFUN([_AM_SET_OPTIONS],
11479
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
11481
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
11482
# -------------------------------------------
11483
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
11484
AC_DEFUN([_AM_IF_OPTION],
11485
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
11487
# Check to make sure that the build environment is sane. -*- Autoconf -*-
11489
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
11490
# Free Software Foundation, Inc.
11492
# This file is free software; the Free Software Foundation
11493
# gives unlimited permission to copy and/or distribute it,
11494
# with or without modifications, as long as this notice is preserved.
11500
AC_DEFUN([AM_SANITY_CHECK],
11501
[AC_MSG_CHECKING([whether build environment is sane])
11504
echo timestamp > conftest.file
11505
# Reject unsafe characters in $srcdir or the absolute working directory
11506
# name. Accept space and tab only in the latter.
11510
*[[\\\"\#\$\&\'\`$am_lf]]*)
11511
AC_MSG_ERROR([unsafe absolute working directory name]);;
11514
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
11515
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
11518
# Do `set' in a subshell so we don't clobber the current shell's
11519
# arguments. Must try -L first in case configure is actually a
11520
# symlink; some systems play weird games with the mod time of symlinks
11521
# (eg FreeBSD returns the mod time of the symlink's containing
11524
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
11525
if test "$[*]" = "X"; then
11527
set X `ls -t "$srcdir/configure" conftest.file`
11529
rm -f conftest.file
11530
if test "$[*]" != "X $srcdir/configure conftest.file" \
11531
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
11533
# If neither matched, then we have a broken ls. This can happen
11534
# if, for instance, CONFIG_SHELL is bash and it inherits a
11535
# broken ls alias from the environment. This has actually
11536
# happened. Such a system could not be considered "sane".
11537
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
11538
alias in your environment])
11541
test "$[2]" = conftest.file
11547
AC_MSG_ERROR([newly created file is older than distributed files!
11548
Check your system clock])
11550
AC_MSG_RESULT(yes)])
11552
# Copyright (C) 2009 Free Software Foundation, Inc.
11554
# This file is free software; the Free Software Foundation
11555
# gives unlimited permission to copy and/or distribute it,
11556
# with or without modifications, as long as this notice is preserved.
11560
# AM_SILENT_RULES([DEFAULT])
11561
# --------------------------
11562
# Enable less verbose build rules; with the default set to DEFAULT
11563
# (`yes' being less verbose, `no' or empty being verbose).
11564
AC_DEFUN([AM_SILENT_RULES],
11565
[AC_ARG_ENABLE([silent-rules],
11566
[ --enable-silent-rules less verbose build output (undo: `make V=1')
11567
--disable-silent-rules verbose build output (undo: `make V=0')])
11568
case $enable_silent_rules in
11569
yes) AM_DEFAULT_VERBOSITY=0;;
11570
no) AM_DEFAULT_VERBOSITY=1;;
11571
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
11573
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
11575
AC_SUBST([AM_BACKSLASH])dnl
11576
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
11579
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
11581
# This file is free software; the Free Software Foundation
11582
# gives unlimited permission to copy and/or distribute it,
11583
# with or without modifications, as long as this notice is preserved.
11585
# AM_PROG_INSTALL_STRIP
11586
# ---------------------
11587
# One issue with vendor `install' (even GNU) is that you can't
11588
# specify the program used to strip binaries. This is especially
11589
# annoying in cross-compiling environments, where the build's strip
11590
# is unlikely to handle the host's binaries.
11591
# Fortunately install-sh will honor a STRIPPROG variable, so we
11592
# always use install-sh in `make install-strip', and initialize
11593
# STRIPPROG with the value of the STRIP variable (set by the user).
11594
AC_DEFUN([AM_PROG_INSTALL_STRIP],
11595
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
11596
# Installed binaries are usually stripped using `strip' when the user
11597
# run `make install-strip'. However `strip' might not be the right
11598
# tool to use in cross-compilation environments, therefore Automake
11599
# will honor the `STRIP' environment variable to overrule this program.
11600
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
11601
if test "$cross_compiling" != no; then
11602
AC_CHECK_TOOL([STRIP], [strip], :)
11604
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
11605
AC_SUBST([INSTALL_STRIP_PROGRAM])])
11607
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
11609
# This file is free software; the Free Software Foundation
11610
# gives unlimited permission to copy and/or distribute it,
11611
# with or without modifications, as long as this notice is preserved.
11615
# _AM_SUBST_NOTMAKE(VARIABLE)
11616
# ---------------------------
11617
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
11618
# This macro is traced by Automake.
11619
AC_DEFUN([_AM_SUBST_NOTMAKE])
11621
# AM_SUBST_NOTMAKE(VARIABLE)
11622
# ---------------------------
11623
# Public sister of _AM_SUBST_NOTMAKE.
11624
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
11626
# Check how to create a tarball. -*- Autoconf -*-
11628
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
11630
# This file is free software; the Free Software Foundation
11631
# gives unlimited permission to copy and/or distribute it,
11632
# with or without modifications, as long as this notice is preserved.
11636
# _AM_PROG_TAR(FORMAT)
11637
# --------------------
11638
# Check how to create a tarball in format FORMAT.
11639
# FORMAT should be one of `v7', `ustar', or `pax'.
11641
# Substitute a variable $(am__tar) that is a command
11642
# writing to stdout a FORMAT-tarball containing the directory
11644
# tardir=directory && $(am__tar) > result.tar
11646
# Substitute a variable $(am__untar) that extract such
11647
# a tarball read from stdin.
11648
# $(am__untar) < result.tar
11649
AC_DEFUN([_AM_PROG_TAR],
11650
[# Always define AMTAR for backward compatibility.
11651
AM_MISSING_PROG([AMTAR], [tar])
11653
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
11654
[m4_case([$1], [ustar],, [pax],,
11655
[m4_fatal([Unknown tar format])])
11656
AC_MSG_CHECKING([how to create a $1 tar archive])
11657
# Loop over all known methods to create a tar archive until one works.
11658
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
11659
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
11660
# Do not fold the above two line into one, because Tru64 sh and
11661
# Solaris sh will not grok spaces in the rhs of `-'.
11662
for _am_tool in $_am_tools
11666
for _am_tar in tar gnutar gtar;
11668
AM_RUN_LOG([$_am_tar --version]) && break
11670
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
11671
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
11672
am__untar="$_am_tar -xf -"
11675
# Must skip GNU tar: if it does not support --format= it doesn't create
11676
# ustar tarball either.
11677
(tar --version) >/dev/null 2>&1 && continue
11678
am__tar='tar chf - "$$tardir"'
11679
am__tar_='tar chf - "$tardir"'
11680
am__untar='tar xf -'
11683
am__tar='pax -L -x $1 -w "$$tardir"'
11684
am__tar_='pax -L -x $1 -w "$tardir"'
11688
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
11689
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
11690
am__untar='cpio -i -H $1 -d'
11699
# If the value was cached, stop now. We just wanted to have am__tar
11700
# and am__untar set.
11701
test -n "${am_cv_prog_tar_$1}" && break
11703
# tar/untar a dummy directory, and stop if the command works
11704
rm -rf conftest.dir
11706
echo GrepMe > conftest.dir/file
11707
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
11708
rm -rf conftest.dir
11709
if test -s conftest.tar; then
11710
AM_RUN_LOG([$am__untar <conftest.tar])
11711
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
11714
rm -rf conftest.dir
11716
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
11717
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
11718
AC_SUBST([am__tar])
11719
AC_SUBST([am__untar])