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.63],,
17
[m4_warning([this file was generated for autoconf 2.63.
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
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
23
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
25
# This file is free software, distributed under the terms of the GNU
26
# General Public License. As a special exception to the GNU General
27
# Public License, this file may be distributed as part of a program
28
# that contains a configuration script generated by Autoconf, under
29
# the same distribution terms as the rest of that program.
31
# This file can be copied and used freely without restrictions. It can
32
# be used in projects which are not available under the GNU Public License
33
# but which still want to provide support for the GNU gettext functionality.
35
# Macro to add for using GNU gettext.
36
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
38
# Modified to never use included libintl.
39
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
41
# Major rework to remove unused code
42
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
44
# Added better handling of ALL_LINGUAS from GNU gettext version
45
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
47
# Modified to require ngettext
48
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
50
# We need this here as well, since someone might use autoconf-2.5x
51
# to configure GLib then an older version to configure a package
52
# using AM_GLIB_GNU_GETTEXT
56
dnl We go to great lengths to make sure that aclocal won't
57
dnl try to pull in the installed version of these macros
58
dnl when running aclocal in the glib directory.
60
m4_copy([AC_DEFUN],[glib_DEFUN])
61
m4_copy([AC_REQUIRE],[glib_REQUIRE])
63
dnl At the end, if we're not within glib, we'll define the public
64
dnl definitions in terms of our private definitions.
69
glib_DEFUN([GLIB_LC_MESSAGES],
70
[AC_CHECK_HEADERS([locale.h])
71
if test $ac_cv_header_locale_h = yes; then
72
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
73
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
74
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
75
if test $am_cv_val_LC_MESSAGES = yes; then
76
AC_DEFINE(HAVE_LC_MESSAGES, 1,
77
[Define if your <locale.h> file defines LC_MESSAGES.])
81
# GLIB_PATH_PROG_WITH_TEST
82
#----------------------------
83
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
84
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
85
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
86
[# Extract the first word of "$2", so it can be a program name with args.
87
set dummy $2; ac_word=[$]2
88
AC_MSG_CHECKING([for $ac_word])
89
AC_CACHE_VAL(ac_cv_path_$1,
92
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
95
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
96
for ac_dir in ifelse([$5], , $PATH, [$5]); do
97
test -z "$ac_dir" && ac_dir=.
98
if test -f $ac_dir/$ac_word; then
100
ac_cv_path_$1="$ac_dir/$ac_word"
106
dnl If no 4th arg is given, leave the cache variable unset,
107
dnl so AC_PATH_PROGS will keep looking.
108
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
113
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
123
glib_DEFUN([GLIB_WITH_NLS],
124
dnl NLS is obligatory
128
gt_cv_have_gettext=no
134
AC_CHECK_HEADER(libintl.h,
135
[gt_cv_func_dgettext_libintl="no"
136
libintl_extra_libs=""
139
# First check in libc
141
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
145
[return !ngettext ("","", 1)],
146
gt_cv_func_ngettext_libc=yes,
147
gt_cv_func_ngettext_libc=no)
150
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
151
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
155
[return !dgettext ("","")],
156
gt_cv_func_dgettext_libc=yes,
157
gt_cv_func_dgettext_libc=no)
161
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
162
AC_CHECK_FUNCS(bind_textdomain_codeset)
166
# If we don't have everything we want, check in libintl
168
if test "$gt_cv_func_dgettext_libc" != "yes" \
169
|| test "$gt_cv_func_ngettext_libc" != "yes" \
170
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
172
AC_CHECK_LIB(intl, bindtextdomain,
173
[AC_CHECK_LIB(intl, ngettext,
174
[AC_CHECK_LIB(intl, dgettext,
175
gt_cv_func_dgettext_libintl=yes)])])
177
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
178
AC_MSG_CHECKING([if -liconv is needed to use gettext])
180
AC_CHECK_LIB(intl, ngettext,
181
[AC_CHECK_LIB(intl, dcgettext,
182
[gt_cv_func_dgettext_libintl=yes
183
libintl_extra_libs=-liconv],
189
# If we found libintl, then check in it for bind_textdomain_codeset();
190
# we'll prefer libc if neither have bind_textdomain_codeset(),
191
# and both have dgettext and ngettext
193
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
194
glib_save_LIBS="$LIBS"
195
LIBS="$LIBS -lintl $libintl_extra_libs"
196
unset ac_cv_func_bind_textdomain_codeset
197
AC_CHECK_FUNCS(bind_textdomain_codeset)
198
LIBS="$glib_save_LIBS"
200
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
201
gt_cv_func_dgettext_libc=no
203
if test "$gt_cv_func_dgettext_libc" = "yes" \
204
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
205
gt_cv_func_dgettext_libintl=no
211
if test "$gt_cv_func_dgettext_libc" = "yes" \
212
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
213
gt_cv_have_gettext=yes
216
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
217
INTLLIBS="-lintl $libintl_extra_libs"
220
if test "$gt_cv_have_gettext" = "yes"; then
221
AC_DEFINE(HAVE_GETTEXT,1,
222
[Define if the GNU gettext() function is already present or preinstalled.])
223
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
224
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
225
if test "$MSGFMT" != "no"; then
226
glib_save_LIBS="$LIBS"
227
LIBS="$LIBS $INTLLIBS"
228
AC_CHECK_FUNCS(dcgettext)
230
AC_MSG_CHECKING([if msgfmt accepts -c])
231
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
234
"Content-Type: text/plain; charset=UTF-8\n"
235
"Project-Id-Version: test 1.0\n"
236
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
237
"Last-Translator: test <foo@bar.xx>\n"
238
"Language-Team: C <LL@li.org>\n"
239
"MIME-Version: 1.0\n"
240
"Content-Transfer-Encoding: 8bit\n"
241
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
242
AC_SUBST(MSGFMT_OPTS)
243
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
244
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
245
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
246
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
247
return _nl_msg_cat_cntr],
252
dnl On Solaris, if bind_textdomain_codeset is in libc,
253
dnl GNU format message catalog is always supported,
254
dnl since both are added to the libc all together.
255
dnl Hence, we'd like to go with DATADIRNAME=share and
256
dnl and CATOBJEXT=.gmo in this case.
257
AC_CHECK_FUNC(bind_textdomain_codeset,
268
LIBS="$glib_save_LIBS"
271
gt_cv_have_gettext=no
276
if test "$gt_cv_have_gettext" = "yes" ; then
277
AC_DEFINE(ENABLE_NLS, 1,
278
[always defined to indicate that i18n is enabled])
281
dnl Test whether we really found GNU xgettext.
282
if test "$XGETTEXT" != ":"; then
283
dnl If it is not GNU xgettext we define it as : so that the
284
dnl Makefiles still can work.
285
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
289
[found xgettext program is not GNU xgettext; ignore it])
294
# We need to process the po/ directory.
298
[case "$CONFIG_FILES" in *po/Makefile.in*)
299
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
302
dnl These rules are solely for the distribution goal. While doing this
303
dnl we only have to keep exactly one list of the available catalogs
305
for lang in $ALL_LINGUAS; do
306
GMOFILES="$GMOFILES $lang.gmo"
307
POFILES="$POFILES $lang.po"
310
dnl Make all variables we use known to autoconf.
313
AC_SUBST(DATADIRNAME)
317
AC_SUBST(PO_IN_DATADIR_TRUE)
318
AC_SUBST(PO_IN_DATADIR_FALSE)
323
# AM_GLIB_GNU_GETTEXT
324
# -------------------
325
# Do checks necessary for use of gettext. If a suitable implementation
326
# of gettext is found in either in libintl or in the C library,
327
# it will set INTLLIBS to the libraries needed for use of gettext
328
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
329
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
330
# on various variables needed by the Makefile.in.in installed by
333
glib_DEFUN([GLIB_GNU_GETTEXT],
334
[AC_REQUIRE([AC_PROG_CC])dnl
335
AC_REQUIRE([AC_HEADER_STDC])dnl
340
if test "$gt_cv_have_gettext" = "yes"; then
341
if test "x$ALL_LINGUAS" = "x"; then
344
AC_MSG_CHECKING(for catalogs to be installed)
346
for presentlang in $ALL_LINGUAS; do
348
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
349
desiredlanguages="$LINGUAS"
351
desiredlanguages="$ALL_LINGUAS"
353
for desiredlang in $desiredlanguages; do
354
# Use the presentlang catalog if desiredlang is
355
# a. equal to presentlang, or
356
# b. a variant of presentlang (because in this case,
357
# presentlang can be used as a fallback for messages
358
# which are not translated in the desiredlang catalog).
359
case "$desiredlang" in
360
"$presentlang"*) useit=yes;;
363
if test $useit = yes; then
364
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
368
AC_MSG_RESULT($LINGUAS)
371
dnl Construct list of names of catalog files to be constructed.
372
if test -n "$LINGUAS"; then
373
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
377
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
378
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
379
dnl Try to locate is.
381
if test -n "$ac_aux_dir"; then
382
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
384
if test -z "$MKINSTALLDIRS"; then
385
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
387
AC_SUBST(MKINSTALLDIRS)
389
dnl Generate list of files to be processed by xgettext which will
390
dnl be included in po/Makefile.
391
test -d po || mkdir po
392
if test "x$srcdir" != "x."; then
393
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
394
posrcprefix="$srcdir/"
396
posrcprefix="../$srcdir/"
402
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
403
< $srcdir/po/POTFILES.in > po/POTFILES
406
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
407
# -------------------------------
408
# Define VARIABLE to the location where catalog files will
409
# be installed by po/Makefile.
410
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
411
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
412
glib_save_prefix="$prefix"
413
glib_save_exec_prefix="$exec_prefix"
414
glib_save_datarootdir="$datarootdir"
415
test "x$prefix" = xNONE && prefix=$ac_default_prefix
416
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
417
datarootdir=`eval echo "${datarootdir}"`
418
if test "x$CATOBJEXT" = "x.mo" ; then
419
localedir=`eval echo "${libdir}/locale"`
421
localedir=`eval echo "${datadir}/locale"`
423
prefix="$glib_save_prefix"
424
exec_prefix="$glib_save_exec_prefix"
425
datarootdir="$glib_save_datarootdir"
426
AC_DEFINE_UNQUOTED($1, "$localedir",
427
[Define the location where the catalogs will be installed])
431
dnl Now the definitions that aclocal will find
433
ifdef(glib_configure_in,[],[
434
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
435
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
438
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
440
# Create a temporary file with TEST-FILE as its contents and pass the
441
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
442
# 0 and perform ACTION-IF-FAIL for any other exit status.
443
AC_DEFUN([GLIB_RUN_PROG],
444
[cat >conftest.foo <<_ACEOF
447
if AC_RUN_LOG([$1 conftest.foo]); then
448
m4_ifval([$3], [$3], [:])
449
m4_ifvaln([$4], [else $4])dnl
450
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
451
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
455
dnl GNOME_COMPILE_WARNINGS
456
dnl Turn on many useful compiler warnings
457
dnl For now, only works on GCC
458
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
459
dnl ******************************
460
dnl More compiler warnings
461
dnl ******************************
463
AC_ARG_ENABLE(compile-warnings,
464
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
465
[Turn on compiler warnings]),,
466
[enable_compile_warnings="m4_default([$1],[yes])"])
469
if test "x$GCC" != xyes; then
470
enable_compile_warnings=no
474
realsave_CFLAGS="$CFLAGS"
476
case "$enable_compile_warnings" in
481
warning_flags="-Wall"
484
warning_flags="-Wall -Wmissing-prototypes"
487
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
488
CFLAGS="$warning_flags $CFLAGS"
489
for option in -Wno-sign-compare; do
490
SAVE_CFLAGS="$CFLAGS"
491
CFLAGS="$CFLAGS $option"
492
AC_MSG_CHECKING([whether gcc understands $option])
493
AC_TRY_COMPILE([], [],
496
CFLAGS="$SAVE_CFLAGS"
497
AC_MSG_RESULT($has_option)
498
if test $has_option = yes; then
499
warning_flags="$warning_flags $option"
505
if test "$enable_compile_warnings" = "error" ; then
506
warning_flags="$warning_flags -Werror"
510
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
513
CFLAGS="$realsave_CFLAGS"
514
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
515
AC_MSG_RESULT($warning_flags)
518
AC_HELP_STRING([--enable-iso-c],
519
[Try to warn if code is not ISO C ]),,
522
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
524
if test "x$enable_iso_c" != "xno"; then
525
if test "x$GCC" = "xyes"; then
527
*[\ \ ]-ansi[\ \ ]*) ;;
528
*) complCFLAGS="$complCFLAGS -ansi" ;;
531
*[\ \ ]-pedantic[\ \ ]*) ;;
532
*) complCFLAGS="$complCFLAGS -pedantic" ;;
536
AC_MSG_RESULT($complCFLAGS)
538
WARN_CFLAGS="$warning_flags $complCFLAGS"
539
AC_SUBST(WARN_CFLAGS)
542
dnl For C++, do basically the same thing.
544
AC_DEFUN([GNOME_CXX_WARNINGS],[
545
AC_ARG_ENABLE(cxx-warnings,
546
AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
547
[Turn on compiler warnings.]),,
548
[enable_cxx_warnings="m4_default([$1],[minimum])"])
550
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
552
if test "x$GXX" != xyes; then
553
enable_cxx_warnings=no
555
if test "x$enable_cxx_warnings" != "xno"; then
556
if test "x$GXX" = "xyes"; then
557
case " $CXXFLAGS " in
558
*[\ \ ]-Wall[\ \ ]*) ;;
559
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
562
## -W is not all that useful. And it cannot be controlled
563
## with individual -Wno-xxx flags, unlike -Wall
564
if test "x$enable_cxx_warnings" = "xyes"; then
565
warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
569
AC_MSG_RESULT($warnCXXFLAGS)
571
AC_ARG_ENABLE(iso-cxx,
572
AC_HELP_STRING([--enable-iso-cxx],
573
[Try to warn if code is not ISO C++ ]),,
576
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
578
if test "x$enable_iso_cxx" != "xno"; then
579
if test "x$GXX" = "xyes"; then
580
case " $CXXFLAGS " in
581
*[\ \ ]-ansi[\ \ ]*) ;;
582
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
585
case " $CXXFLAGS " in
586
*[\ \ ]-pedantic[\ \ ]*) ;;
587
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
591
AC_MSG_RESULT($complCXXFLAGS)
593
WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
594
AC_SUBST(WARN_CXXFLAGS)
597
dnl Do not call GNOME_DOC_DEFINES directly. It is split out from
598
dnl GNOME_DOC_INIT to allow gnome-doc-utils to bootstrap off itself.
599
AC_DEFUN([GNOME_DOC_DEFINES],
601
AC_ARG_WITH([help-dir],
602
AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
603
[with_help_dir='${datadir}/gnome/help'])
604
HELP_DIR="$with_help_dir"
607
AC_ARG_WITH([omf-dir],
608
AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),,
609
[with_omf_dir='${datadir}/omf'])
610
OMF_DIR="$with_omf_dir"
613
AC_ARG_WITH([help-formats],
614
AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),,
615
[with_help_formats=''])
616
DOC_USER_FORMATS="$with_help_formats"
617
AC_SUBST(DOC_USER_FORMATS)
619
AC_ARG_ENABLE([scrollkeeper],
620
[AC_HELP_STRING([--disable-scrollkeeper],
621
[do not make updates to the scrollkeeper database])],,
622
enable_scrollkeeper=yes)
623
AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"])
625
dnl disable scrollkeeper automatically for distcheck
626
DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS"
627
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
629
AM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"])
632
# GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
634
AC_DEFUN([GNOME_DOC_INIT],
635
[AC_REQUIRE([AC_PROG_LN_S])dnl
637
ifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1])
639
AC_MSG_CHECKING([gnome-doc-utils >= $gdu_cv_version_required])
640
PKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required],
641
[gdu_cv_have_gdu=yes],[gdu_cv_have_gdu=no])
643
if test "$gdu_cv_have_gdu" = "yes"; then
645
ifelse([$2],,[:],[$2])
648
ifelse([$3],,[AC_MSG_ERROR([gnome-doc-utils >= $gdu_cv_version_required not found])],[$3])
655
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
656
# serial 40 IT_PROG_INTLTOOL
657
AC_DEFUN([IT_PROG_INTLTOOL], [
659
AC_REQUIRE([AM_NLS])dnl
661
case "$am__api_version" in
663
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
669
if test -n "$1"; then
670
AC_MSG_CHECKING([for intltool >= $1])
672
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
673
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
674
[INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
676
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
677
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
678
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
681
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
682
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
683
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
684
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
685
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
688
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 $< [$]@'
689
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 $< [$]@'
690
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 $< [$]@'
691
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 $< [$]@'
692
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
693
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 $< [$]@'
694
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 $< [$]@'
695
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 $< [$]@'
696
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 $< [$]@'
697
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 $< [$]@'
698
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 $< [$]@'
699
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
700
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 $< [$]@'
701
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 $< [$]@'
702
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 $< [$]@'
703
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 $< [$]@'
704
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 $< [$]@'
705
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 $< [$]@'
706
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 $< [$]@'
708
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
709
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
710
_IT_SUBST(INTLTOOL_KEYS_RULE)
711
_IT_SUBST(INTLTOOL_PROP_RULE)
712
_IT_SUBST(INTLTOOL_OAF_RULE)
713
_IT_SUBST(INTLTOOL_PONG_RULE)
714
_IT_SUBST(INTLTOOL_SERVER_RULE)
715
_IT_SUBST(INTLTOOL_SHEET_RULE)
716
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
717
_IT_SUBST(INTLTOOL_UI_RULE)
718
_IT_SUBST(INTLTOOL_XAM_RULE)
719
_IT_SUBST(INTLTOOL_KBD_RULE)
720
_IT_SUBST(INTLTOOL_XML_RULE)
721
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
722
_IT_SUBST(INTLTOOL_CAVES_RULE)
723
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
724
_IT_SUBST(INTLTOOL_THEME_RULE)
725
_IT_SUBST(INTLTOOL_SERVICE_RULE)
726
_IT_SUBST(INTLTOOL_POLICY_RULE)
728
# Check the gettext tools to make sure they are GNU
729
AC_PATH_PROG(XGETTEXT, xgettext)
730
AC_PATH_PROG(MSGMERGE, msgmerge)
731
AC_PATH_PROG(MSGFMT, msgfmt)
732
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
733
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
734
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
736
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
737
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
738
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
739
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
740
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
743
AC_PATH_PROG(INTLTOOL_PERL, perl)
744
if test -z "$INTLTOOL_PERL"; then
745
AC_MSG_ERROR([perl not found])
747
AC_MSG_CHECKING([for perl >= 5.8.1])
748
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
749
if test $? -ne 0; then
750
AC_MSG_ERROR([perl 5.8.1 is required for intltool])
752
IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
753
AC_MSG_RESULT([$IT_PERL_VERSION])
755
if test "x$2" != "xno-xml"; then
756
AC_MSG_CHECKING([for XML::Parser])
757
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
760
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
764
# Substitute ALL_LINGUAS so we can use it in po/Makefile
765
AC_SUBST(ALL_LINGUAS)
767
# Set DATADIRNAME correctly if it is not set yet
768
# (copied from glib-gettext.m4)
769
if test -z "$DATADIRNAME"; then
771
[AC_LANG_PROGRAM([[]],
772
[[extern int _nl_msg_cat_cntr;
773
return _nl_msg_cat_cntr]])],
777
dnl On Solaris, if bind_textdomain_codeset is in libc,
778
dnl GNU format message catalog is always supported,
779
dnl since both are added to the libc all together.
780
dnl Hence, we'd like to go with DATADIRNAME=share
782
AC_CHECK_FUNC(bind_textdomain_codeset,
783
[DATADIRNAME=share], [DATADIRNAME=lib])
790
AC_SUBST(DATADIRNAME)
797
# IT_PO_SUBDIR(DIRNAME)
798
# ---------------------
799
# All po subdirs have to be declared with this macro; the subdir "po" is
800
# declared by IT_PROG_INTLTOOL.
802
AC_DEFUN([IT_PO_SUBDIR],
803
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
805
dnl The following CONFIG_COMMANDS should be exetuted at the very end
806
dnl of config.status.
807
AC_CONFIG_COMMANDS_PRE([
808
AC_CONFIG_COMMANDS([$1/stamp-it], [
809
if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
810
AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
812
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
817
'"s|^| $ac_top_srcdir/|" \
818
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
820
[sed '/^POTFILES =/,/[^\\]$/ {
824
' "$1/Makefile.in" >"$1/Makefile"]
825
rm -f "$1/Makefile.tmp"
826
mv "$1/stamp-it.tmp" "$1/stamp-it"
831
# _IT_SUBST(VARIABLE)
832
# -------------------
833
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
835
AC_DEFUN([_IT_SUBST],
838
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
843
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
844
# A hint is needed for aclocal from Automake <= 1.9.4:
845
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
848
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
850
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
851
# 2006, 2007, 2008 Free Software Foundation, Inc.
852
# Written by Gordon Matzigkeit, 1996
854
# This file is free software; the Free Software Foundation gives
855
# unlimited permission to copy and/or distribute it, with or without
856
# modifications, as long as this notice is preserved.
858
m4_define([_LT_COPYING], [dnl
859
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
860
# 2006, 2007, 2008 Free Software Foundation, Inc.
861
# Written by Gordon Matzigkeit, 1996
863
# This file is part of GNU Libtool.
865
# GNU Libtool is free software; you can redistribute it and/or
866
# modify it under the terms of the GNU General Public License as
867
# published by the Free Software Foundation; either version 2 of
868
# the License, or (at your option) any later version.
870
# As a special exception to the GNU General Public License,
871
# if you distribute this file as part of a program or library that
872
# is built using GNU Libtool, you may include this file under the
873
# same distribution terms that you use for the rest of that program.
875
# GNU Libtool is distributed in the hope that it will be useful,
876
# but WITHOUT ANY WARRANTY; without even the implied warranty of
877
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
878
# GNU General Public License for more details.
880
# You should have received a copy of the GNU General Public License
881
# along with GNU Libtool; see the file COPYING. If not, a copy
882
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
883
# obtained by writing to the Free Software Foundation, Inc.,
884
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
892
# Complain and exit if this libtool version is less that VERSION.
893
m4_defun([LT_PREREQ],
894
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
896
[m4_fatal([Libtool version $1 or higher is required],
903
# Complain if the absolute build directory name contains unusual characters
904
m4_defun([_LT_CHECK_BUILDDIR],
907
AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
915
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
916
AC_BEFORE([$0], [LT_LANG])dnl
917
AC_BEFORE([$0], [LT_OUTPUT])dnl
918
AC_BEFORE([$0], [LTDL_INIT])dnl
919
m4_require([_LT_CHECK_BUILDDIR])dnl
921
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
922
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
923
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
924
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
925
dnl unless we require an AC_DEFUNed macro:
926
AC_REQUIRE([LTOPTIONS_VERSION])dnl
927
AC_REQUIRE([LTSUGAR_VERSION])dnl
928
AC_REQUIRE([LTVERSION_VERSION])dnl
929
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
930
m4_require([_LT_PROG_LTMAIN])dnl
933
_LT_SET_OPTIONS([$0], [$1])
935
# This can be used to rebuild libtool when needed
936
LIBTOOL_DEPS="$ltmain"
938
# Always use our own libtool.
939
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
949
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
950
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
951
dnl aclocal-1.4 backwards compatibility:
952
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
953
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
956
# _LT_CC_BASENAME(CC)
957
# -------------------
958
# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
959
m4_defun([_LT_CC_BASENAME],
960
[for cc_temp in $1""; do
962
compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
963
distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
968
cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
972
# _LT_FILEUTILS_DEFAULTS
973
# ----------------------
974
# It is okay to use these file commands and assume they have been set
975
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
976
m4_defun([_LT_FILEUTILS_DEFAULTS],
980
])# _LT_FILEUTILS_DEFAULTS
985
m4_defun([_LT_SETUP],
986
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
987
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
988
_LT_DECL([], [host_alias], [0], [The host system])dnl
989
_LT_DECL([], [host], [0])dnl
990
_LT_DECL([], [host_os], [0])dnl
992
_LT_DECL([], [build_alias], [0], [The build system])dnl
993
_LT_DECL([], [build], [0])dnl
994
_LT_DECL([], [build_os], [0])dnl
996
AC_REQUIRE([AC_PROG_CC])dnl
997
AC_REQUIRE([LT_PATH_LD])dnl
998
AC_REQUIRE([LT_PATH_NM])dnl
1000
AC_REQUIRE([AC_PROG_LN_S])dnl
1001
test -z "$LN_S" && LN_S="ln -s"
1002
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1004
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1005
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1006
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1008
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1009
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1010
m4_require([_LT_CMD_RELOAD])dnl
1011
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1012
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1013
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1015
_LT_CONFIG_LIBTOOL_INIT([
1016
# See if we are running on zsh, and set the options which allow our
1017
# commands through without removal of \ escapes INIT.
1018
if test -n "\${ZSH_VERSION+set}" ; then
1019
setopt NO_GLOB_SUBST
1022
if test -n "${ZSH_VERSION+set}" ; then
1023
setopt NO_GLOB_SUBST
1028
m4_require([_LT_TAG_COMPILER])dnl
1029
_LT_PROG_ECHO_BACKSLASH
1033
# AIX sometimes has problems with the GCC collect2 program. For some
1034
# reason, if we set the COLLECT_NAMES environment variable, the problems
1035
# vanish in a puff of smoke.
1036
if test "X${COLLECT_NAMES+set}" != Xset; then
1038
export COLLECT_NAMES
1043
# Sed substitution that helps us do robust quoting. It backslashifies
1044
# metacharacters that are still active within double-quoted strings.
1045
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1047
# Same as above, but do not quote variable references.
1048
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1050
# Sed substitution to delay expansion of an escaped shell variable in a
1051
# double_quote_subst'ed string.
1052
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1054
# Sed substitution to delay expansion of an escaped single quote.
1055
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1057
# Sed substitution to avoid accidental globbing in evaled expressions
1058
no_glob_subst='s/\*/\\\*/g'
1062
can_build_shared=yes
1064
# All known linkers require a `.a' archive for static linking (except MSVC,
1065
# which needs '.lib').
1068
with_gnu_ld="$lt_cv_prog_gnu_ld"
1071
old_CFLAGS="$CFLAGS"
1073
# Set sane defaults for various variables
1074
test -z "$CC" && CC=cc
1075
test -z "$LTCC" && LTCC=$CC
1076
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1077
test -z "$LD" && LD=ld
1078
test -z "$ac_objext" && ac_objext=o
1080
_LT_CC_BASENAME([$compiler])
1082
# Only perform the check for file, if the check method requires it
1083
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1084
case $deplibs_check_method in
1086
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1092
# Use C for the default configuration in the libtool script
1093
LT_SUPPORTED_TAG([CC])
1095
_LT_LANG_DEFAULT_CONFIG
1102
# Note that this code is called both from `configure', and `config.status'
1103
# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
1104
# `config.status' has no value for ac_aux_dir unless we are using Automake,
1105
# so we pass a copy along to make sure it has a sensible value anyway.
1106
m4_defun([_LT_PROG_LTMAIN],
1107
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1108
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1109
ltmain="$ac_aux_dir/ltmain.sh"
1114
# So that we can recreate a full libtool script including additional
1115
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1116
# in macros and then make a single call at the end using the `libtool'
1120
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1121
# ----------------------------------------
1122
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1123
m4_define([_LT_CONFIG_LIBTOOL_INIT],
1125
[m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1130
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1133
# _LT_CONFIG_LIBTOOL([COMMANDS])
1134
# ------------------------------
1135
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1136
m4_define([_LT_CONFIG_LIBTOOL],
1138
[m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1143
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1146
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1147
# -----------------------------------------------------
1148
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1149
[_LT_CONFIG_LIBTOOL([$1])
1150
_LT_CONFIG_LIBTOOL_INIT([$2])
1154
# _LT_FORMAT_COMMENT([COMMENT])
1155
# -----------------------------
1156
# Add leading comment marks to the start of each line, and a trailing
1157
# full-stop to the whole comment if one is not present already.
1158
m4_define([_LT_FORMAT_COMMENT],
1160
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1161
[['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1168
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1169
# -------------------------------------------------------------------
1170
# CONFIGNAME is the name given to the value in the libtool script.
1171
# VARNAME is the (base) name used in the configure script.
1172
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1173
# VARNAME. Any other value will be used directly.
1174
m4_define([_LT_DECL],
1175
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1176
[lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1177
[m4_ifval([$1], [$1], [$2])])
1178
lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1180
[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1181
lt_dict_add_subkey([lt_decl_dict], [$2],
1182
[tagged?], [m4_ifval([$5], [yes], [no])])])
1186
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1187
# --------------------------------------------------------
1188
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1191
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1192
# ------------------------------------------------
1193
m4_define([lt_decl_tag_varnames],
1194
[_lt_decl_filter([tagged?], [yes], $@)])
1197
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1198
# ---------------------------------------------------------
1199
m4_define([_lt_decl_filter],
1201
[0], [m4_fatal([$0: too few arguments: $#])],
1202
[1], [m4_fatal([$0: too few arguments: $#: $1])],
1203
[2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1204
[3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1205
[lt_dict_filter([lt_decl_dict], $@)])[]dnl
1209
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1210
# --------------------------------------------------
1211
m4_define([lt_decl_quote_varnames],
1212
[_lt_decl_filter([value], [1], $@)])
1215
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1216
# ---------------------------------------------------
1217
m4_define([lt_decl_dquote_varnames],
1218
[_lt_decl_filter([value], [2], $@)])
1221
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1222
# ---------------------------------------------------
1223
m4_define([lt_decl_varnames_tagged],
1224
[m4_assert([$# <= 2])dnl
1225
_$0(m4_quote(m4_default([$1], [[, ]])),
1226
m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1227
m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1228
m4_define([_lt_decl_varnames_tagged],
1229
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1232
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1233
# ------------------------------------------------
1234
m4_define([lt_decl_all_varnames],
1235
[_$0(m4_quote(m4_default([$1], [[, ]])),
1237
m4_quote(lt_decl_varnames),
1238
m4_quote(m4_shift($@))))[]dnl
1240
m4_define([_lt_decl_all_varnames],
1241
[lt_join($@, lt_decl_varnames_tagged([$1],
1242
lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1246
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1247
# ------------------------------------
1248
# Quote a variable value, and forward it to `config.status' so that its
1249
# declaration there will have the same value as in `configure'. VARNAME
1250
# must have a single quote delimited value for this to work.
1251
m4_define([_LT_CONFIG_STATUS_DECLARE],
1252
[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
1255
# _LT_CONFIG_STATUS_DECLARATIONS
1256
# ------------------------------
1257
# We delimit libtool config variables with single quotes, so when
1258
# we write them to config.status, we have to be sure to quote all
1259
# embedded single quotes properly. In configure, this macro expands
1260
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1262
# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
1263
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1264
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1265
[m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1270
# Output comment and list of tags supported by the script
1271
m4_defun([_LT_LIBTOOL_TAGS],
1272
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1273
available_tags="_LT_TAGS"dnl
1277
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1278
# -----------------------------------
1279
# Extract the dictionary values for VARNAME (optionally with TAG) and
1280
# expand to a commented shell variable setting:
1282
# # Some comment about what VAR is for.
1283
# visible_name=$lt_internal_name
1284
m4_define([_LT_LIBTOOL_DECLARE],
1285
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1286
[description])))[]dnl
1287
m4_pushdef([_libtool_name],
1288
m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1289
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1290
[0], [_libtool_name=[$]$1],
1291
[1], [_libtool_name=$lt_[]$1],
1292
[2], [_libtool_name=$lt_[]$1],
1293
[_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1294
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1298
# _LT_LIBTOOL_CONFIG_VARS
1299
# -----------------------
1300
# Produce commented declarations of non-tagged libtool config variables
1301
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1302
# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
1303
# section) are produced by _LT_LIBTOOL_TAG_VARS.
1304
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1305
[m4_foreach([_lt_var],
1306
m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1307
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1310
# _LT_LIBTOOL_TAG_VARS(TAG)
1311
# -------------------------
1312
m4_define([_LT_LIBTOOL_TAG_VARS],
1313
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1314
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1317
# _LT_TAGVAR(VARNAME, [TAGNAME])
1318
# ------------------------------
1319
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1322
# _LT_CONFIG_COMMANDS
1323
# -------------------
1324
# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
1325
# variables for single and double quote escaping we saved from calls
1326
# to _LT_DECL, we can put quote escaped variables declarations
1327
# into `config.status', and then the shell code to quote escape them in
1328
# for loops in `config.status'. Finally, any additional code accumulated
1329
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1330
m4_defun([_LT_CONFIG_COMMANDS],
1331
[AC_PROVIDE_IFELSE([LT_OUTPUT],
1332
dnl If the libtool generation code has been placed in $CONFIG_LT,
1333
dnl instead of duplicating it all over again into config.status,
1334
dnl then we will have config.status run $CONFIG_LT later, so it
1335
dnl needs to know what name is stored there:
1336
[AC_CONFIG_COMMANDS([libtool],
1337
[$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1338
dnl If the libtool generation code is destined for config.status,
1339
dnl expand the accumulated commands and init code now:
1340
[AC_CONFIG_COMMANDS([libtool],
1341
[_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1342
])#_LT_CONFIG_COMMANDS
1346
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1349
# The HP-UX ksh and POSIX shell print the target directory to stdout
1351
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1353
sed_quote_subst='$sed_quote_subst'
1354
double_quote_subst='$double_quote_subst'
1355
delay_variable_subst='$delay_variable_subst'
1356
_LT_CONFIG_STATUS_DECLARATIONS
1358
LTCFLAGS='$LTCFLAGS'
1359
compiler='$compiler_DEFAULT'
1361
# Quote evaled strings.
1362
for var in lt_decl_all_varnames([[ \
1363
]], lt_decl_quote_varnames); do
1364
case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1365
*[[\\\\\\\`\\"\\\$]]*)
1366
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1369
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1374
# Double-quote double-evaled strings.
1375
for var in lt_decl_all_varnames([[ \
1376
]], lt_decl_dquote_varnames); do
1377
case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1378
*[[\\\\\\\`\\"\\\$]]*)
1379
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1382
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1387
# Fix-up fallback echo if it was mangled by the above quoting rules.
1389
*'\\\[$]0 --fallback-echo"')dnl "
1390
lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
1394
_LT_OUTPUT_LIBTOOL_INIT
1400
# This macro allows early generation of the libtool script (before
1401
# AC_OUTPUT is called), incase it is used in configure for compilation
1403
AC_DEFUN([LT_OUTPUT],
1404
[: ${CONFIG_LT=./config.lt}
1405
AC_MSG_NOTICE([creating $CONFIG_LT])
1406
cat >"$CONFIG_LT" <<_LTEOF
1408
# Generated by $as_me.
1409
# Run this file to recreate a libtool stub with the current configuration.
1412
SHELL=\${CONFIG_SHELL-$SHELL}
1415
cat >>"$CONFIG_LT" <<\_LTEOF
1419
exec AS_MESSAGE_FD>&1
1420
exec AS_MESSAGE_LOG_FD>>config.log
1423
AS_BOX([Running $as_me.])
1424
} >&AS_MESSAGE_LOG_FD
1427
\`$as_me' creates a local libtool stub from the current configuration,
1428
for use in further configure time tests before the real libtool is
1431
Usage: $[0] [[OPTIONS]]
1433
-h, --help print this help, then exit
1434
-V, --version print version number, then exit
1435
-q, --quiet do not print progress messages
1436
-d, --debug don't remove temporary files
1438
Report bugs to <bug-libtool@gnu.org>."
1441
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1442
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1443
configured by $[0], generated by m4_PACKAGE_STRING.
1445
Copyright (C) 2008 Free Software Foundation, Inc.
1446
This config.lt script is free software; the Free Software Foundation
1447
gives unlimited permision to copy, distribute and modify it."
1449
while test $[#] != 0
1452
--version | --v* | -V )
1453
echo "$lt_cl_version"; exit 0 ;;
1454
--help | --h* | -h )
1455
echo "$lt_cl_help"; exit 0 ;;
1456
--debug | --d* | -d )
1458
--quiet | --q* | --silent | --s* | -q )
1461
-*) AC_MSG_ERROR([unrecognized option: $[1]
1462
Try \`$[0] --help' for more information.]) ;;
1464
*) AC_MSG_ERROR([unrecognized argument: $[1]
1465
Try \`$[0] --help' for more information.]) ;;
1470
if $lt_cl_silent; then
1471
exec AS_MESSAGE_FD>/dev/null
1475
cat >>"$CONFIG_LT" <<_LTEOF
1476
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1479
cat >>"$CONFIG_LT" <<\_LTEOF
1480
AC_MSG_NOTICE([creating $ofile])
1481
_LT_OUTPUT_LIBTOOL_COMMANDS
1484
chmod +x "$CONFIG_LT"
1486
# configure is writing to config.log, but config.lt does its own redirection,
1487
# appending to config.log, which fails on DOS, as config.log is still kept
1488
# open by configure. Here we exec the FD to /dev/null, effectively closing
1489
# config.log, so it can be properly (re)opened and appended to by config.lt.
1490
if test "$no_create" != yes; then
1492
test "$silent" = yes &&
1493
lt_config_lt_args="$lt_config_lt_args --quiet"
1494
exec AS_MESSAGE_LOG_FD>/dev/null
1495
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1496
exec AS_MESSAGE_LOG_FD>>config.log
1497
$lt_cl_success || AS_EXIT(1)
1504
# If TAG is the built-in tag, create an initial libtool script with a
1505
# default configuration from the untagged config vars. Otherwise add code
1506
# to config.status for appending the configuration named by TAG from the
1507
# matching tagged config vars.
1508
m4_defun([_LT_CONFIG],
1509
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1510
_LT_CONFIG_SAVE_COMMANDS([
1511
m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1512
m4_if(_LT_TAG, [C], [
1513
# See if we are running on zsh, and set the options which allow our
1514
# commands through without removal of \ escapes.
1515
if test -n "${ZSH_VERSION+set}" ; then
1516
setopt NO_GLOB_SUBST
1520
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1523
cat <<_LT_EOF >> "$cfgfile"
1526
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1527
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1528
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1529
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1534
# ### BEGIN LIBTOOL CONFIG
1535
_LT_LIBTOOL_CONFIG_VARS
1536
_LT_LIBTOOL_TAG_VARS
1537
# ### END LIBTOOL CONFIG
1543
cat <<\_LT_EOF >> "$cfgfile"
1544
# AIX sometimes has problems with the GCC collect2 program. For some
1545
# reason, if we set the COLLECT_NAMES environment variable, the problems
1546
# vanish in a puff of smoke.
1547
if test "X${COLLECT_NAMES+set}" != Xset; then
1549
export COLLECT_NAMES
1557
# We use sed instead of cat because bash on DJGPP gets confused if
1558
# if finds mixed CR/LF and LF-only lines. Since sed operates in
1559
# text mode, it properly converts lines to CR/LF. This bash problem
1560
# is reportedly fixed, but why not run on old versions too?
1561
sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
1562
|| (rm -f "$cfgfile"; exit 1)
1564
_LT_PROG_XSI_SHELLFNS
1566
sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
1567
|| (rm -f "$cfgfile"; exit 1)
1569
mv -f "$cfgfile" "$ofile" ||
1570
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1573
[cat <<_LT_EOF >> "$ofile"
1575
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1576
dnl in a comment (ie after a #).
1577
# ### BEGIN LIBTOOL TAG CONFIG: $1
1578
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1579
# ### END LIBTOOL TAG CONFIG: $1
1586
TIMESTAMP='$TIMESTAMP'
1588
ofile='$ofile'], [])
1589
])dnl /_LT_CONFIG_SAVE_COMMANDS
1593
# LT_SUPPORTED_TAG(TAG)
1594
# ---------------------
1595
# Trace this macro to discover what tags are supported by the libtool
1596
# --tag option, using:
1597
# autoconf --trace 'LT_SUPPORTED_TAG:$1'
1598
AC_DEFUN([LT_SUPPORTED_TAG], [])
1601
# C support is built-in for now
1602
m4_define([_LT_LANG_C_enabled], [])
1603
m4_define([_LT_TAGS], [])
1608
# Enable libtool support for the given language if not already enabled.
1610
[AC_BEFORE([$0], [LT_OUTPUT])dnl
1613
[C++], [_LT_LANG(CXX)],
1614
[Java], [_LT_LANG(GCJ)],
1615
[Fortran 77], [_LT_LANG(F77)],
1616
[Fortran], [_LT_LANG(FC)],
1617
[Windows Resource], [_LT_LANG(RC)],
1618
[m4_ifdef([_LT_LANG_]$1[_CONFIG],
1620
[m4_fatal([$0: unsupported language: "$1"])])])dnl
1624
# _LT_LANG(LANGNAME)
1625
# ------------------
1626
m4_defun([_LT_LANG],
1627
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1628
[LT_SUPPORTED_TAG([$1])dnl
1629
m4_append([_LT_TAGS], [$1 ])dnl
1630
m4_define([_LT_LANG_]$1[_enabled], [])dnl
1631
_LT_LANG_$1_CONFIG($1)])dnl
1635
# _LT_LANG_DEFAULT_CONFIG
1636
# -----------------------
1637
m4_defun([_LT_LANG_DEFAULT_CONFIG],
1638
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1640
[m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1642
AC_PROVIDE_IFELSE([AC_PROG_F77],
1644
[m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1646
AC_PROVIDE_IFELSE([AC_PROG_FC],
1648
[m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1650
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1651
dnl pulling things in needlessly.
1652
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1654
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1656
[AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1658
[m4_ifdef([AC_PROG_GCJ],
1659
[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1660
m4_ifdef([A][M_PROG_GCJ],
1661
[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1662
m4_ifdef([LT_PROG_GCJ],
1663
[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1665
AC_PROVIDE_IFELSE([LT_PROG_RC],
1667
[m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1668
])# _LT_LANG_DEFAULT_CONFIG
1671
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1672
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1673
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1674
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1675
dnl aclocal-1.4 backwards compatibility:
1676
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1677
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1678
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1679
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1684
m4_defun([_LT_TAG_COMPILER],
1685
[AC_REQUIRE([AC_PROG_CC])dnl
1687
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1688
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1689
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1690
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1692
# If no C compiler was specified, use CC.
1695
# If no C compiler flags were specified, use CFLAGS.
1696
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1698
# Allow CC to be a program name with arguments.
1700
])# _LT_TAG_COMPILER
1703
# _LT_COMPILER_BOILERPLATE
1704
# ------------------------
1705
# Check for compiler boilerplate output or warnings with
1706
# the simple compiler test code.
1707
m4_defun([_LT_COMPILER_BOILERPLATE],
1708
[m4_require([_LT_DECL_SED])dnl
1709
ac_outfile=conftest.$ac_objext
1710
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1711
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1712
_lt_compiler_boilerplate=`cat conftest.err`
1714
])# _LT_COMPILER_BOILERPLATE
1717
# _LT_LINKER_BOILERPLATE
1718
# ----------------------
1719
# Check for linker boilerplate output or warnings with
1720
# the simple link test code.
1721
m4_defun([_LT_LINKER_BOILERPLATE],
1722
[m4_require([_LT_DECL_SED])dnl
1723
ac_outfile=conftest.$ac_objext
1724
echo "$lt_simple_link_test_code" >conftest.$ac_ext
1725
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1726
_lt_linker_boilerplate=`cat conftest.err`
1728
])# _LT_LINKER_BOILERPLATE
1730
# _LT_REQUIRED_DARWIN_CHECKS
1731
# -------------------------
1732
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1734
rhapsody* | darwin*)
1735
AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1736
AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1737
AC_CHECK_TOOL([LIPO], [lipo], [:])
1738
AC_CHECK_TOOL([OTOOL], [otool], [:])
1739
AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1740
_LT_DECL([], [DSYMUTIL], [1],
1741
[Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1742
_LT_DECL([], [NMEDIT], [1],
1743
[Tool to change global to local symbols on Mac OS X])
1744
_LT_DECL([], [LIPO], [1],
1745
[Tool to manipulate fat objects and archives on Mac OS X])
1746
_LT_DECL([], [OTOOL], [1],
1747
[ldd/readelf like tool for Mach-O binaries on Mac OS X])
1748
_LT_DECL([], [OTOOL64], [1],
1749
[ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1751
AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1752
[lt_cv_apple_cc_single_mod=no
1753
if test -z "${LT_MULTI_MODULE}"; then
1754
# By default we will add the -single_module flag. You can override
1755
# by either setting the environment variable LT_MULTI_MODULE
1756
# non-empty at configure time, or by adding -multi_module to the
1758
rm -rf libconftest.dylib*
1759
echo "int foo(void){return 1;}" > conftest.c
1760
echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1761
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1762
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1763
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1765
if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1766
lt_cv_apple_cc_single_mod=yes
1768
cat conftest.err >&AS_MESSAGE_LOG_FD
1770
rm -rf libconftest.dylib*
1773
AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1774
[lt_cv_ld_exported_symbols_list],
1775
[lt_cv_ld_exported_symbols_list=no
1776
save_LDFLAGS=$LDFLAGS
1777
echo "_main" > conftest.sym
1778
LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1779
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1780
[lt_cv_ld_exported_symbols_list=yes],
1781
[lt_cv_ld_exported_symbols_list=no])
1782
LDFLAGS="$save_LDFLAGS"
1785
rhapsody* | darwin1.[[012]])
1786
_lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1788
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1789
darwin*) # darwin 5.x on
1790
# if running on 10.5 or later, the deployment target defaults
1791
# to the OS version, if on x86, and 10.4, the deployment
1792
# target defaults to 10.4. Don't you love it?
1793
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1794
10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1795
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1797
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1799
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1803
if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1804
_lt_dar_single_mod='$single_module'
1806
if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1807
_lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1809
_lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1811
if test "$DSYMUTIL" != ":"; then
1812
_lt_dsymutil='~$DSYMUTIL $lib || :'
1821
# _LT_DARWIN_LINKER_FEATURES
1822
# --------------------------
1823
# Checks for linker and compiler features on darwin
1824
m4_defun([_LT_DARWIN_LINKER_FEATURES],
1826
m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1827
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
1828
_LT_TAGVAR(hardcode_direct, $1)=no
1829
_LT_TAGVAR(hardcode_automatic, $1)=yes
1830
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1831
_LT_TAGVAR(whole_archive_flag_spec, $1)=''
1832
_LT_TAGVAR(link_all_deplibs, $1)=yes
1833
_LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1834
case $cc_basename in
1835
ifort*) _lt_dar_can_shared=yes ;;
1836
*) _lt_dar_can_shared=$GCC ;;
1838
if test "$_lt_dar_can_shared" = "yes"; then
1839
output_verbose_link_cmd=echo
1840
_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}"
1841
_LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1842
_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}"
1843
_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}"
1845
[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1846
_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}"
1847
_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}"
1851
_LT_TAGVAR(ld_shlibs, $1)=no
1855
# _LT_SYS_MODULE_PATH_AIX
1856
# -----------------------
1857
# Links a minimal program and checks the executable
1858
# for the system default hardcoded library path. In most cases,
1859
# this is /usr/lib:/lib, but when the MPI compilers are used
1860
# the location of the communication and MPI libs are included too.
1861
# If we don't find anything, use the default library path according
1862
# to the aix ld manual.
1863
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1864
[m4_require([_LT_DECL_SED])dnl
1865
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1866
lt_aix_libpath_sed='
1867
/Import File Strings/,/^$/ {
1873
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1874
# Check for a 64-bit object if we didn't find anything.
1875
if test -z "$aix_libpath"; then
1876
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1878
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1879
])# _LT_SYS_MODULE_PATH_AIX
1882
# _LT_SHELL_INIT(ARG)
1883
# -------------------
1884
m4_define([_LT_SHELL_INIT],
1885
[ifdef([AC_DIVERSION_NOTICE],
1886
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1887
[AC_DIVERT_PUSH(NOTICE)])
1893
# _LT_PROG_ECHO_BACKSLASH
1894
# -----------------------
1895
# Add some code to the start of the generated configure script which
1896
# will find an echo command which doesn't interpret backslashes.
1897
m4_defun([_LT_PROG_ECHO_BACKSLASH],
1899
# Check that we are running under the correct shell.
1900
SHELL=${CONFIG_SHELL-/bin/sh}
1904
# Remove one level of quotation (which was required for Make).
1905
ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1909
ECHO=${lt_ECHO-echo}
1910
if test "X[$]1" = X--no-reexec; then
1911
# Discard the --no-reexec flag, and continue.
1913
elif test "X[$]1" = X--fallback-echo; then
1914
# Avoid inline document here, it may be left over
1916
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1917
# Yippee, $ECHO works!
1920
# Restart under the correct shell.
1921
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1924
if test "X[$]1" = X--fallback-echo; then
1925
# used as fallback echo
1933
# The HP-UX ksh and POSIX shell print the target directory to stdout
1935
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1937
if test -z "$lt_ECHO"; then
1938
if test "X${echo_test_string+set}" != Xset; then
1939
# find a string as large as possible, as long as the shell can cope with it
1940
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1941
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1942
if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1943
{ test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1950
if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1951
echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1952
test "X$echo_testing_string" = "X$echo_test_string"; then
1955
# The Solaris, AIX, and Digital Unix default echo programs unquote
1956
# backslashes. This makes it impossible to quote backslashes using
1957
# echo "$something" | sed 's/\\/\\\\/g'
1959
# So, first we look for a working echo in the user's PATH.
1961
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1962
for dir in $PATH /usr/ucb; do
1964
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1965
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1966
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1967
test "X$echo_testing_string" = "X$echo_test_string"; then
1974
if test "X$ECHO" = Xecho; then
1975
# We didn't find a better echo, so look for alternatives.
1976
if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1977
echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1978
test "X$echo_testing_string" = "X$echo_test_string"; then
1979
# This shell has a builtin print -r that does the trick.
1981
elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1982
test "X$CONFIG_SHELL" != X/bin/ksh; then
1983
# If we have ksh, try running configure again with it.
1984
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1985
export ORIGINAL_CONFIG_SHELL
1986
CONFIG_SHELL=/bin/ksh
1988
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1992
if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1993
echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1994
test "X$echo_testing_string" = "X$echo_test_string"; then
1995
# Cool, printf works
1997
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1998
test "X$echo_testing_string" = 'X\t' &&
1999
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2000
test "X$echo_testing_string" = "X$echo_test_string"; then
2001
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
2003
SHELL="$CONFIG_SHELL"
2005
ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2006
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2007
test "X$echo_testing_string" = 'X\t' &&
2008
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2009
test "X$echo_testing_string" = "X$echo_test_string"; then
2010
ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2012
# maybe with a smaller string...
2015
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
2016
if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
2023
if test "$prev" != 'sed 50q "[$]0"'; then
2024
echo_test_string=`eval $prev`
2025
export echo_test_string
2026
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
2028
# Oops. We lost completely, so just stick with echo.
2037
# Copy echo and quote the copy suitably for passing to libtool from
2038
# the Makefile, instead of quoting the original, which is used later.
2040
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
2041
lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
2046
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2047
_LT_DECL([], [ECHO], [1],
2048
[An echo program that does not interpret backslashes])
2049
])# _LT_PROG_ECHO_BACKSLASH
2054
m4_defun([_LT_ENABLE_LOCK],
2055
[AC_ARG_ENABLE([libtool-lock],
2056
[AS_HELP_STRING([--disable-libtool-lock],
2057
[avoid locking (might break parallel builds)])])
2058
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2060
# Some flags need to be propagated to the compiler or linker for good
2064
# Find out which ABI we are using.
2065
echo 'int i;' > conftest.$ac_ext
2066
if AC_TRY_EVAL(ac_compile); then
2067
case `/usr/bin/file conftest.$ac_objext` in
2079
# Find out which ABI we are using.
2080
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2081
if AC_TRY_EVAL(ac_compile); then
2082
if test "$lt_cv_prog_gnu_ld" = yes; then
2083
case `/usr/bin/file conftest.$ac_objext` in
2085
LD="${LD-ld} -melf32bsmip"
2088
LD="${LD-ld} -melf32bmipn32"
2091
LD="${LD-ld} -melf64bmip"
2095
case `/usr/bin/file conftest.$ac_objext` in
2111
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2112
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2113
# Find out which ABI we are using.
2114
echo 'int i;' > conftest.$ac_ext
2115
if AC_TRY_EVAL(ac_compile); then
2116
case `/usr/bin/file conftest.o` in
2119
x86_64-*kfreebsd*-gnu)
2120
LD="${LD-ld} -m elf_i386_fbsd"
2123
LD="${LD-ld} -m elf_i386"
2125
ppc64-*linux*|powerpc64-*linux*)
2126
LD="${LD-ld} -m elf32ppclinux"
2129
LD="${LD-ld} -m elf_s390"
2132
LD="${LD-ld} -m elf32_sparc"
2138
x86_64-*kfreebsd*-gnu)
2139
LD="${LD-ld} -m elf_x86_64_fbsd"
2142
LD="${LD-ld} -m elf_x86_64"
2144
ppc*-*linux*|powerpc*-*linux*)
2145
LD="${LD-ld} -m elf64ppc"
2147
s390*-*linux*|s390*-*tpf*)
2148
LD="${LD-ld} -m elf64_s390"
2151
LD="${LD-ld} -m elf64_sparc"
2161
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
2162
SAVE_CFLAGS="$CFLAGS"
2163
CFLAGS="$CFLAGS -belf"
2164
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2166
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2168
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2169
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2170
CFLAGS="$SAVE_CFLAGS"
2174
# Find out which ABI we are using.
2175
echo 'int i;' > conftest.$ac_ext
2176
if AC_TRY_EVAL(ac_compile); then
2177
case `/usr/bin/file conftest.o` in
2179
case $lt_cv_prog_gnu_ld in
2180
yes*) LD="${LD-ld} -m elf64_sparc" ;;
2182
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2194
need_locks="$enable_libtool_lock"
2198
# _LT_CMD_OLD_ARCHIVE
2199
# -------------------
2200
m4_defun([_LT_CMD_OLD_ARCHIVE],
2201
[AC_CHECK_TOOL(AR, ar, false)
2202
test -z "$AR" && AR=ar
2203
test -z "$AR_FLAGS" && AR_FLAGS=cru
2204
_LT_DECL([], [AR], [1], [The archiver])
2205
_LT_DECL([], [AR_FLAGS], [1])
2207
AC_CHECK_TOOL(STRIP, strip, :)
2208
test -z "$STRIP" && STRIP=:
2209
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2211
AC_CHECK_TOOL(RANLIB, ranlib, :)
2212
test -z "$RANLIB" && RANLIB=:
2213
_LT_DECL([], [RANLIB], [1],
2214
[Commands used to install an old-style archive])
2216
# Determine commands to create old-style static archives.
2217
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2218
old_postinstall_cmds='chmod 644 $oldlib'
2219
old_postuninstall_cmds=
2221
if test -n "$RANLIB"; then
2224
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2227
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2230
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2232
_LT_DECL([], [old_postinstall_cmds], [2])
2233
_LT_DECL([], [old_postuninstall_cmds], [2])
2234
_LT_TAGDECL([], [old_archive_cmds], [2],
2235
[Commands used to build an old-style archive])
2236
])# _LT_CMD_OLD_ARCHIVE
2239
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2240
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2241
# ----------------------------------------------------------------
2242
# Check whether the given compiler option works
2243
AC_DEFUN([_LT_COMPILER_OPTION],
2244
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2245
m4_require([_LT_DECL_SED])dnl
2246
AC_CACHE_CHECK([$1], [$2],
2248
m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2249
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2250
lt_compiler_flag="$3"
2251
# Insert the option either (1) after the last *FLAGS variable, or
2252
# (2) before a word containing "conftest.", or (3) at the end.
2253
# Note that $ac_compile itself does not contain backslashes and begins
2254
# with a dollar sign (not a hyphen), so the echo should work correctly.
2255
# The option is referenced via a variable to avoid confusing sed.
2256
lt_compile=`echo "$ac_compile" | $SED \
2257
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2258
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2259
-e 's:$: $lt_compiler_flag:'`
2260
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2261
(eval "$lt_compile" 2>conftest.err)
2263
cat conftest.err >&AS_MESSAGE_LOG_FD
2264
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2265
if (exit $ac_status) && test -s "$ac_outfile"; then
2266
# The compiler can only warn and ignore the option if not recognized
2267
# So say no if there are warnings other than the usual output.
2268
$ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2269
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2270
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2277
if test x"[$]$2" = xyes; then
2278
m4_if([$5], , :, [$5])
2280
m4_if([$6], , :, [$6])
2282
])# _LT_COMPILER_OPTION
2285
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2286
dnl aclocal-1.4 backwards compatibility:
2287
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2290
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2291
# [ACTION-SUCCESS], [ACTION-FAILURE])
2292
# ----------------------------------------------------
2293
# Check whether the given linker option works
2294
AC_DEFUN([_LT_LINKER_OPTION],
2295
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2296
m4_require([_LT_DECL_SED])dnl
2297
AC_CACHE_CHECK([$1], [$2],
2299
save_LDFLAGS="$LDFLAGS"
2300
LDFLAGS="$LDFLAGS $3"
2301
echo "$lt_simple_link_test_code" > conftest.$ac_ext
2302
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2303
# The linker can only warn and ignore the option if not recognized
2304
# So say no if there are warnings
2305
if test -s conftest.err; then
2306
# Append any errors to the config.log.
2307
cat conftest.err 1>&AS_MESSAGE_LOG_FD
2308
$ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2309
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2310
if diff conftest.exp conftest.er2 >/dev/null; then
2318
LDFLAGS="$save_LDFLAGS"
2321
if test x"[$]$2" = xyes; then
2322
m4_if([$4], , :, [$4])
2324
m4_if([$5], , :, [$5])
2326
])# _LT_LINKER_OPTION
2329
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2330
dnl aclocal-1.4 backwards compatibility:
2331
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2336
AC_DEFUN([LT_CMD_MAX_LEN],
2337
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2338
# find the maximum length of command line arguments
2339
AC_MSG_CHECKING([the maximum length of command line arguments])
2340
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2346
# On DJGPP, this test can blow up pretty badly due to problems in libc
2347
# (any single argument exceeding 2000 bytes causes a buffer overrun
2348
# during glob expansion). Even if it were fixed, the result of this
2349
# check would be larger than it should be.
2350
lt_cv_sys_max_cmd_len=12288; # 12K is about right
2354
# Under GNU Hurd, this test is not required because there is
2355
# no limit to the length of command line arguments.
2356
# Libtool will interpret -1 as no limit whatsoever
2357
lt_cv_sys_max_cmd_len=-1;
2360
cygwin* | mingw* | cegcc*)
2361
# On Win9x/ME, this test blows up -- it succeeds, but takes
2362
# about 5 minutes as the teststring grows exponentially.
2363
# Worse, since 9x/ME are not pre-emptively multitasking,
2364
# you end up with a "frozen" computer, even though with patience
2365
# the test eventually succeeds (with a max line length of 256k).
2366
# Instead, let's just punt: use the minimum linelength reported by
2367
# all of the supported platforms: 8192 (on NT/2K/XP).
2368
lt_cv_sys_max_cmd_len=8192;
2372
# On AmigaOS with pdksh, this test takes hours, literally.
2373
# So we just punt and use a minimum line length of 8192.
2374
lt_cv_sys_max_cmd_len=8192;
2377
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2378
# This has been around since 386BSD, at least. Likely further.
2379
if test -x /sbin/sysctl; then
2380
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2381
elif test -x /usr/sbin/sysctl; then
2382
lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2384
lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
2386
# And add a safety zone
2387
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2388
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2392
# We know the value 262144 and hardcode it with a safety zone (like BSD)
2393
lt_cv_sys_max_cmd_len=196608
2397
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2398
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2399
# nice to cause kernel panics so lets avoid the loop below.
2400
# First set a reasonable default.
2401
lt_cv_sys_max_cmd_len=16384
2403
if test -x /sbin/sysconfig; then
2404
case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2405
*1*) lt_cv_sys_max_cmd_len=-1 ;;
2410
lt_cv_sys_max_cmd_len=102400
2412
sysv5* | sco5v6* | sysv4.2uw2*)
2413
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2414
if test -n "$kargmax"; then
2415
lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
2417
lt_cv_sys_max_cmd_len=32768
2421
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2422
if test -n "$lt_cv_sys_max_cmd_len"; then
2423
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2424
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2426
# Make teststring a little bigger before we do anything with it.
2427
# a 1K string should be a reasonable start.
2428
for i in 1 2 3 4 5 6 7 8 ; do
2429
teststring=$teststring$teststring
2431
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2432
# If test is not a shell built-in, we'll probably end up computing a
2433
# maximum length that is only half of the actual maximum length, but
2435
while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
2436
= "XX$teststring$teststring"; } >/dev/null 2>&1 &&
2437
test $i != 17 # 1/2 MB should be enough
2440
teststring=$teststring$teststring
2442
# Only check the string length outside the loop.
2443
lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2445
# Add a significant safety factor because C++ compilers can tack on
2446
# massive amounts of additional arguments before passing them to the
2447
# linker. It appears as though 1/2 is a usable value.
2448
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2453
if test -n $lt_cv_sys_max_cmd_len ; then
2454
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2458
max_cmd_len=$lt_cv_sys_max_cmd_len
2459
_LT_DECL([], [max_cmd_len], [0],
2460
[What is the maximum length of a command?])
2464
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2465
dnl aclocal-1.4 backwards compatibility:
2466
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2471
m4_defun([_LT_HEADER_DLFCN],
2472
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2473
])# _LT_HEADER_DLFCN
2476
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2477
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2478
# ----------------------------------------------------------------
2479
m4_defun([_LT_TRY_DLOPEN_SELF],
2480
[m4_require([_LT_HEADER_DLFCN])dnl
2481
if test "$cross_compiling" = yes; then :
2484
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2485
lt_status=$lt_dlunknown
2486
cat > conftest.$ac_ext <<_LT_EOF
2487
[#line __oline__ "configure"
2488
#include "confdefs.h"
2497
# define LT_DLGLOBAL RTLD_GLOBAL
2500
# define LT_DLGLOBAL DL_GLOBAL
2502
# define LT_DLGLOBAL 0
2506
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2507
find out it does not work in some platform. */
2508
#ifndef LT_DLLAZY_OR_NOW
2510
# define LT_DLLAZY_OR_NOW RTLD_LAZY
2513
# define LT_DLLAZY_OR_NOW DL_LAZY
2516
# define LT_DLLAZY_OR_NOW RTLD_NOW
2519
# define LT_DLLAZY_OR_NOW DL_NOW
2521
# define LT_DLLAZY_OR_NOW 0
2528
void fnord() { int i=42;}
2531
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2532
int status = $lt_dlunknown;
2536
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
2537
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2538
/* dlclose (self); */
2546
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2547
(./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2550
x$lt_dlno_uscore) $1 ;;
2551
x$lt_dlneed_uscore) $2 ;;
2552
x$lt_dlunknown|x*) $3 ;;
2555
# compilation failed
2560
])# _LT_TRY_DLOPEN_SELF
2563
# LT_SYS_DLOPEN_SELF
2564
# ------------------
2565
AC_DEFUN([LT_SYS_DLOPEN_SELF],
2566
[m4_require([_LT_HEADER_DLFCN])dnl
2567
if test "x$enable_dlopen" != xyes; then
2568
enable_dlopen=unknown
2569
enable_dlopen_self=unknown
2570
enable_dlopen_self_static=unknown
2577
lt_cv_dlopen="load_add_on"
2579
lt_cv_dlopen_self=yes
2582
mingw* | pw32* | cegcc*)
2583
lt_cv_dlopen="LoadLibrary"
2588
lt_cv_dlopen="dlopen"
2593
# if libdl is installed we need to link against it
2594
AC_CHECK_LIB([dl], [dlopen],
2595
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2598
lt_cv_dlopen_self=yes
2603
AC_CHECK_FUNC([shl_load],
2604
[lt_cv_dlopen="shl_load"],
2605
[AC_CHECK_LIB([dld], [shl_load],
2606
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2607
[AC_CHECK_FUNC([dlopen],
2608
[lt_cv_dlopen="dlopen"],
2609
[AC_CHECK_LIB([dl], [dlopen],
2610
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2611
[AC_CHECK_LIB([svld], [dlopen],
2612
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2613
[AC_CHECK_LIB([dld], [dld_link],
2614
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2623
if test "x$lt_cv_dlopen" != xno; then
2629
case $lt_cv_dlopen in
2631
save_CPPFLAGS="$CPPFLAGS"
2632
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2634
save_LDFLAGS="$LDFLAGS"
2635
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2638
LIBS="$lt_cv_dlopen_libs $LIBS"
2640
AC_CACHE_CHECK([whether a program can dlopen itself],
2641
lt_cv_dlopen_self, [dnl
2642
_LT_TRY_DLOPEN_SELF(
2643
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2644
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2647
if test "x$lt_cv_dlopen_self" = xyes; then
2648
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2649
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2650
lt_cv_dlopen_self_static, [dnl
2651
_LT_TRY_DLOPEN_SELF(
2652
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2653
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2657
CPPFLAGS="$save_CPPFLAGS"
2658
LDFLAGS="$save_LDFLAGS"
2663
case $lt_cv_dlopen_self in
2664
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2665
*) enable_dlopen_self=unknown ;;
2668
case $lt_cv_dlopen_self_static in
2669
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2670
*) enable_dlopen_self_static=unknown ;;
2673
_LT_DECL([dlopen_support], [enable_dlopen], [0],
2674
[Whether dlopen is supported])
2675
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2676
[Whether dlopen of programs is supported])
2677
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2678
[Whether dlopen of statically linked programs is supported])
2679
])# LT_SYS_DLOPEN_SELF
2682
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2683
dnl aclocal-1.4 backwards compatibility:
2684
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2687
# _LT_COMPILER_C_O([TAGNAME])
2688
# ---------------------------
2689
# Check to see if options -c and -o are simultaneously supported by compiler.
2690
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2691
m4_defun([_LT_COMPILER_C_O],
2692
[m4_require([_LT_DECL_SED])dnl
2693
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2694
m4_require([_LT_TAG_COMPILER])dnl
2695
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2696
[_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2697
[_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2698
$RM -r conftest 2>/dev/null
2702
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2704
lt_compiler_flag="-o out/conftest2.$ac_objext"
2705
# Insert the option either (1) after the last *FLAGS variable, or
2706
# (2) before a word containing "conftest.", or (3) at the end.
2707
# Note that $ac_compile itself does not contain backslashes and begins
2708
# with a dollar sign (not a hyphen), so the echo should work correctly.
2709
lt_compile=`echo "$ac_compile" | $SED \
2710
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2711
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2712
-e 's:$: $lt_compiler_flag:'`
2713
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2714
(eval "$lt_compile" 2>out/conftest.err)
2716
cat out/conftest.err >&AS_MESSAGE_LOG_FD
2717
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2718
if (exit $ac_status) && test -s out/conftest2.$ac_objext
2720
# The compiler can only warn and ignore the option if not recognized
2721
# So say no if there are warnings
2722
$ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2723
$SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2724
if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2725
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2728
chmod u+w . 2>&AS_MESSAGE_LOG_FD
2730
# SGI C++ compiler will create directory out/ii_files/ for
2731
# template instantiation
2732
test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2733
$RM out/* && rmdir out
2738
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2739
[Does compiler simultaneously support -c and -o options?])
2740
])# _LT_COMPILER_C_O
2743
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2744
# ----------------------------------
2745
# Check to see if we can do hard links to lock some files if needed
2746
m4_defun([_LT_COMPILER_FILE_LOCKS],
2747
[m4_require([_LT_ENABLE_LOCK])dnl
2748
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2749
_LT_COMPILER_C_O([$1])
2751
hard_links="nottested"
2752
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2753
# do not overwrite the value of need_locks provided by the user
2754
AC_MSG_CHECKING([if we can lock with hard links])
2757
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2759
ln conftest.a conftest.b 2>&5 || hard_links=no
2760
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2761
AC_MSG_RESULT([$hard_links])
2762
if test "$hard_links" = no; then
2763
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2769
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2770
])# _LT_COMPILER_FILE_LOCKS
2775
m4_defun([_LT_CHECK_OBJDIR],
2776
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2777
[rm -f .libs 2>/dev/null
2778
mkdir .libs 2>/dev/null
2779
if test -d .libs; then
2782
# MS-DOS does not allow filenames that begin with a dot.
2785
rmdir .libs 2>/dev/null])
2786
objdir=$lt_cv_objdir
2787
_LT_DECL([], [objdir], [0],
2788
[The name of the directory that contains temporary libtool files])dnl
2789
m4_pattern_allow([LT_OBJDIR])dnl
2790
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2791
[Define to the sub-directory in which libtool stores uninstalled libraries.])
2792
])# _LT_CHECK_OBJDIR
2795
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2796
# --------------------------------------
2797
# Check hardcoding attributes.
2798
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2799
[AC_MSG_CHECKING([how to hardcode library paths into programs])
2800
_LT_TAGVAR(hardcode_action, $1)=
2801
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2802
test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2803
test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2805
# We can hardcode non-existent directories.
2806
if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2807
# If the only mechanism to avoid hardcoding is shlibpath_var, we
2808
# have to relink, otherwise we might link with an installed library
2809
# when we should be linking with a yet-to-be-installed one
2810
## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2811
test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2812
# Linking always hardcodes the temporary library directory.
2813
_LT_TAGVAR(hardcode_action, $1)=relink
2815
# We can link without hardcoding, and we can hardcode nonexisting dirs.
2816
_LT_TAGVAR(hardcode_action, $1)=immediate
2819
# We cannot hardcode anything, or else we can only hardcode existing
2821
_LT_TAGVAR(hardcode_action, $1)=unsupported
2823
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2825
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2826
test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2827
# Fast installation is not supported
2828
enable_fast_install=no
2829
elif test "$shlibpath_overrides_runpath" = yes ||
2830
test "$enable_shared" = no; then
2831
# Fast installation is not necessary
2832
enable_fast_install=needless
2834
_LT_TAGDECL([], [hardcode_action], [0],
2835
[How to hardcode a shared library path into an executable])
2836
])# _LT_LINKER_HARDCODE_LIBPATH
2841
m4_defun([_LT_CMD_STRIPLIB],
2842
[m4_require([_LT_DECL_EGREP])
2845
AC_MSG_CHECKING([whether stripping libraries is possible])
2846
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2847
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2848
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2849
AC_MSG_RESULT([yes])
2851
# FIXME - insert some real tests, host_os isn't really good enough
2854
if test -n "$STRIP" ; then
2855
striplib="$STRIP -x"
2856
old_striplib="$STRIP -S"
2857
AC_MSG_RESULT([yes])
2867
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2868
_LT_DECL([], [striplib], [1])
2869
])# _LT_CMD_STRIPLIB
2872
# _LT_SYS_DYNAMIC_LINKER([TAG])
2873
# -----------------------------
2874
# PORTME Fill in your ld.so characteristics
2875
m4_defun([_LT_SYS_DYNAMIC_LINKER],
2876
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2877
m4_require([_LT_DECL_EGREP])dnl
2878
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2879
m4_require([_LT_DECL_OBJDUMP])dnl
2880
m4_require([_LT_DECL_SED])dnl
2881
AC_MSG_CHECKING([dynamic linker characteristics])
2884
if test "$GCC" = yes; then
2886
darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2887
*) lt_awk_arg="/^libraries:/" ;;
2889
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2890
if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2891
# if the path contains ";" then we assume it to be the separator
2892
# otherwise default to the standard path separator (i.e. ":") - it is
2893
# assumed that no part of a normal pathname contains ";" but that should
2894
# okay in the real world where ";" in dirpaths is itself problematic.
2895
lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2897
lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2899
# Ok, now we have the path, separated by spaces, we can step through it
2900
# and add multilib dir if necessary.
2901
lt_tmp_lt_search_path_spec=
2902
lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2903
for lt_sys_path in $lt_search_path_spec; do
2904
if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2905
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2907
test -d "$lt_sys_path" && \
2908
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2911
lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2912
BEGIN {RS=" "; FS="/|\n";} {
2915
for (lt_i = NF; lt_i > 0; lt_i--) {
2916
if ($lt_i != "" && $lt_i != ".") {
2917
if ($lt_i == "..") {
2920
if (lt_count == 0) {
2921
lt_foo="/" $lt_i lt_foo;
2928
if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2929
if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2931
sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2933
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2936
libname_spec='lib$name'
2944
shlibpath_overrides_runpath=unknown
2946
dynamic_linker="$host_os ld.so"
2947
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2948
need_lib_prefix=unknown
2949
hardcode_into_libs=no
2951
# when you set need_version to no, make sure it does not cause -set_version
2952
# flags to be left without arguments
2953
need_version=unknown
2958
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2959
shlibpath_var=LIBPATH
2961
# AIX 3 has no versioning support, so we append a major version to the name.
2962
soname_spec='${libname}${release}${shared_ext}$major'
2969
hardcode_into_libs=yes
2970
if test "$host_cpu" = ia64; then
2971
# AIX 5 supports IA64
2972
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2973
shlibpath_var=LD_LIBRARY_PATH
2975
# With GCC up to 2.95.x, collect2 would create an import file
2976
# for dependence libraries. The import file would start with
2977
# the line `#! .'. This would cause the generated library to
2978
# depend on `.', always an invalid library. This was fixed in
2979
# development snapshots of GCC prior to 3.0.
2981
aix4 | aix4.[[01]] | aix4.[[01]].*)
2982
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2984
echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2991
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2992
# soname into executable. Probably we can add versioning support to
2993
# collect2, so additional links can be useful in future.
2994
if test "$aix_use_runtimelinking" = yes; then
2995
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
2996
# instead of lib<name>.a to let people know that these are not
2997
# typical AIX shared libraries.
2998
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3000
# We preserve .a as extension for shared libraries through AIX4.2
3001
# and later when we are not doing run time linking.
3002
library_names_spec='${libname}${release}.a $libname.a'
3003
soname_spec='${libname}${release}${shared_ext}$major'
3005
shlibpath_var=LIBPATH
3012
# Since July 2007 AmigaOS4 officially supports .so libraries.
3013
# When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3014
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3017
library_names_spec='$libname.ixlibrary $libname.a'
3018
# Create ${libname}_ixlibrary.a entries in /sys/libs.
3019
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'
3025
library_names_spec='${libname}${shared_ext}'
3026
dynamic_linker="$host_os ld.so"
3027
shlibpath_var=LIBRARY_PATH
3033
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3034
soname_spec='${libname}${release}${shared_ext}$major'
3035
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3036
shlibpath_var=LD_LIBRARY_PATH
3037
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3038
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3039
# the default ld.so.conf also contains /usr/contrib/lib and
3040
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3041
# libtool to hard-code these into programs
3044
cygwin* | mingw* | pw32* | cegcc*)
3045
version_type=windows
3050
case $GCC,$host_os in
3051
yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
3052
library_names_spec='$libname.dll.a'
3053
# DLL is installed to $(libdir)/../bin by postinstall_cmds
3054
postinstall_cmds='base_file=`basename \${file}`~
3055
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3056
dldir=$destdir/`dirname \$dlpath`~
3057
test -d \$dldir || mkdir -p \$dldir~
3058
$install_prog $dir/$dlname \$dldir/$dlname~
3059
chmod a+x \$dldir/$dlname~
3060
if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3061
eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3063
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3064
dlpath=$dir/\$dldll~
3066
shlibpath_overrides_runpath=yes
3070
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
3071
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3072
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
3075
# MinGW DLLs use traditional 'lib' prefix
3076
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3077
sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3078
if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3079
# It is most probably a Windows format PATH printed by
3080
# mingw gcc, but we are running on Cygwin. Gcc prints its search
3081
# path with ; separators, and with drive letters. We can handle the
3082
# drive letters (cygwin fileutils understands them), so leave them,
3083
# especially as we might pass files found there to a mingw objdump,
3084
# which wouldn't understand a cygwinified path. Ahh.
3085
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3087
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3091
# pw32 DLLs use 'pw' prefix rather than 'lib'
3092
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3098
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3101
dynamic_linker='Win32 ld.exe'
3102
# FIXME: first we should search . and the directory the executable is in
3106
darwin* | rhapsody*)
3107
dynamic_linker="$host_os dyld"
3111
library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3112
soname_spec='${libname}${release}${major}$shared_ext'
3113
shlibpath_overrides_runpath=yes
3114
shlibpath_var=DYLD_LIBRARY_PATH
3115
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3117
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3118
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3125
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3126
soname_spec='${libname}${release}${shared_ext}$major'
3127
shlibpath_var=LD_LIBRARY_PATH
3134
freebsd* | dragonfly*)
3135
# DragonFly does not have aout. When/if they implement a new
3136
# versioning mechanism, adjust this.
3137
if test -x /usr/bin/objformat; then
3138
objformat=`/usr/bin/objformat`
3141
freebsd[[123]]*) objformat=aout ;;
3145
version_type=freebsd-$objformat
3146
case $version_type in
3148
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3153
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3157
shlibpath_var=LD_LIBRARY_PATH
3160
shlibpath_overrides_runpath=yes
3162
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3163
shlibpath_overrides_runpath=yes
3164
hardcode_into_libs=yes
3166
freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3167
freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3168
shlibpath_overrides_runpath=no
3169
hardcode_into_libs=yes
3171
*) # from 4.6 on, and DragonFly
3172
shlibpath_overrides_runpath=yes
3173
hardcode_into_libs=yes
3182
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3183
soname_spec='${libname}${release}${shared_ext}$major'
3184
shlibpath_var=LD_LIBRARY_PATH
3185
hardcode_into_libs=yes
3188
hpux9* | hpux10* | hpux11*)
3189
# Give a soname corresponding to the major version so that dld.sl refuses to
3190
# link against other versions.
3197
hardcode_into_libs=yes
3198
dynamic_linker="$host_os dld.so"
3199
shlibpath_var=LD_LIBRARY_PATH
3200
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3201
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3202
soname_spec='${libname}${release}${shared_ext}$major'
3203
if test "X$HPUX_IA64_MODE" = X32; then
3204
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3206
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3208
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3212
hardcode_into_libs=yes
3213
dynamic_linker="$host_os dld.sl"
3214
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3215
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3216
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3217
soname_spec='${libname}${release}${shared_ext}$major'
3218
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3219
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3223
dynamic_linker="$host_os dld.sl"
3224
shlibpath_var=SHLIB_PATH
3225
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3226
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3227
soname_spec='${libname}${release}${shared_ext}$major'
3230
# HP-UX runs *really* slowly unless shared libraries are mode 555.
3231
postinstall_cmds='chmod 555 $lib'
3238
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3239
soname_spec='${libname}${release}${shared_ext}$major'
3240
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3241
shlibpath_var=LD_LIBRARY_PATH
3242
shlibpath_overrides_runpath=no
3243
hardcode_into_libs=yes
3246
irix5* | irix6* | nonstopux*)
3248
nonstopux*) version_type=nonstopux ;;
3250
if test "$lt_cv_prog_gnu_ld" = yes; then
3258
soname_spec='${libname}${release}${shared_ext}$major'
3259
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3261
irix5* | nonstopux*)
3265
case $LD in # libtool.m4 will add one of these switches to LD
3266
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3267
libsuff= shlibsuff= libmagic=32-bit;;
3268
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3269
libsuff=32 shlibsuff=N32 libmagic=N32;;
3270
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3271
libsuff=64 shlibsuff=64 libmagic=64-bit;;
3272
*) libsuff= shlibsuff= libmagic=never-match;;
3276
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3277
shlibpath_overrides_runpath=no
3278
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3279
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3280
hardcode_into_libs=yes
3283
# No shared lib support for Linux oldld, aout, or coff.
3284
linux*oldld* | linux*aout* | linux*coff*)
3288
# This must be Linux ELF.
3289
linux* | k*bsd*-gnu)
3293
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3294
soname_spec='${libname}${release}${shared_ext}$major'
3295
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3296
shlibpath_var=LD_LIBRARY_PATH
3297
shlibpath_overrides_runpath=no
3298
# Some binutils ld are patched to set DT_RUNPATH
3299
save_LDFLAGS=$LDFLAGS
3301
eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3302
LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3303
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3304
[AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3305
[shlibpath_overrides_runpath=yes])])
3306
LDFLAGS=$save_LDFLAGS
3309
# This implies no fast_install, which is unacceptable.
3310
# Some rework will be needed to allow for fast_install
3311
# before this can be enabled.
3312
hardcode_into_libs=yes
3314
# Add ABI-specific directories to the system library path.
3315
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
3317
# Append ld.so.conf contents to the search path
3318
if test -f /etc/ld.so.conf; then
3319
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' ' '`
3320
sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
3323
# We used to test for /lib/ld.so.1 and disable shared libraries on
3324
# powerpc, because MkLinux only supported shared libraries with the
3325
# GNU dynamic linker. Since this was broken with cross compilers,
3326
# most powerpc-linux boxes support dynamic linking these days and
3327
# people can always --disable-shared, the test was removed, and we
3328
# assume the GNU/Linux dynamic linker is in use.
3329
dynamic_linker='GNU/Linux ld.so'
3336
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3337
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3338
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3339
dynamic_linker='NetBSD (a.out) ld.so'
3341
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3342
soname_spec='${libname}${release}${shared_ext}$major'
3343
dynamic_linker='NetBSD ld.elf_so'
3345
shlibpath_var=LD_LIBRARY_PATH
3346
shlibpath_overrides_runpath=yes
3347
hardcode_into_libs=yes
3352
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3353
shlibpath_var=LD_LIBRARY_PATH
3354
shlibpath_overrides_runpath=yes
3361
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3362
soname_spec='${libname}${release}${shared_ext}$major'
3363
shlibpath_var=LD_LIBRARY_PATH
3364
shlibpath_overrides_runpath=no
3365
hardcode_into_libs=yes
3366
dynamic_linker='ldqnx.so'
3371
sys_lib_dlsearch_path_spec="/usr/lib"
3373
# Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3375
openbsd3.3 | openbsd3.3.*) need_version=yes ;;
3376
*) need_version=no ;;
3378
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3379
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3380
shlibpath_var=LD_LIBRARY_PATH
3381
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3383
openbsd2.[[89]] | openbsd2.[[89]].*)
3384
shlibpath_overrides_runpath=no
3387
shlibpath_overrides_runpath=yes
3391
shlibpath_overrides_runpath=yes
3396
libname_spec='$name'
3399
library_names_spec='$libname${shared_ext} $libname.a'
3400
dynamic_linker='OS/2 ld.exe'
3401
shlibpath_var=LIBPATH
3404
osf3* | osf4* | osf5*)
3408
soname_spec='${libname}${release}${shared_ext}$major'
3409
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3410
shlibpath_var=LD_LIBRARY_PATH
3411
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3412
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3423
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3424
soname_spec='${libname}${release}${shared_ext}$major'
3425
shlibpath_var=LD_LIBRARY_PATH
3426
shlibpath_overrides_runpath=yes
3427
hardcode_into_libs=yes
3428
# ldd complains unless libraries are executable
3429
postinstall_cmds='chmod +x $lib'
3434
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3435
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3436
shlibpath_var=LD_LIBRARY_PATH
3437
shlibpath_overrides_runpath=yes
3438
if test "$with_gnu_ld" = yes; then
3446
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3447
soname_spec='${libname}${release}${shared_ext}$major'
3448
shlibpath_var=LD_LIBRARY_PATH
3449
case $host_vendor in
3451
shlibpath_overrides_runpath=no
3453
runpath_var=LD_RUN_PATH
3461
shlibpath_overrides_runpath=no
3462
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3468
if test -d /usr/nec ;then
3470
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3471
soname_spec='$libname${shared_ext}.$major'
3472
shlibpath_var=LD_LIBRARY_PATH
3476
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3477
version_type=freebsd-elf
3480
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3481
soname_spec='${libname}${release}${shared_ext}$major'
3482
shlibpath_var=LD_LIBRARY_PATH
3483
shlibpath_overrides_runpath=yes
3484
hardcode_into_libs=yes
3485
if test "$with_gnu_ld" = yes; then
3486
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3488
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3491
sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3495
sys_lib_dlsearch_path_spec='/usr/lib'
3499
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3503
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3504
shlibpath_var=LD_LIBRARY_PATH
3505
shlibpath_overrides_runpath=no
3506
hardcode_into_libs=yes
3511
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3512
soname_spec='${libname}${release}${shared_ext}$major'
3513
shlibpath_var=LD_LIBRARY_PATH
3520
AC_MSG_RESULT([$dynamic_linker])
3521
test "$dynamic_linker" = no && can_build_shared=no
3523
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3524
if test "$GCC" = yes; then
3525
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3528
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3529
sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3531
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3532
sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3535
_LT_DECL([], [variables_saved_for_relink], [1],
3536
[Variables whose values should be saved in libtool wrapper scripts and
3537
restored at link time])
3538
_LT_DECL([], [need_lib_prefix], [0],
3539
[Do we need the "lib" prefix for modules?])
3540
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3541
_LT_DECL([], [version_type], [0], [Library versioning type])
3542
_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3543
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3544
_LT_DECL([], [shlibpath_overrides_runpath], [0],
3545
[Is shlibpath searched before the hard-coded library search path?])
3546
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3547
_LT_DECL([], [library_names_spec], [1],
3548
[[List of archive names. First name is the real one, the rest are links.
3549
The last name is the one that the linker finds with -lNAME]])
3550
_LT_DECL([], [soname_spec], [1],
3551
[[The coded name of the library, if different from the real name]])
3552
_LT_DECL([], [postinstall_cmds], [2],
3553
[Command to use after installation of a shared archive])
3554
_LT_DECL([], [postuninstall_cmds], [2],
3555
[Command to use after uninstallation of a shared archive])
3556
_LT_DECL([], [finish_cmds], [2],
3557
[Commands used to finish a libtool library installation in a directory])
3558
_LT_DECL([], [finish_eval], [1],
3559
[[As "finish_cmds", except a single script fragment to be evaled but
3561
_LT_DECL([], [hardcode_into_libs], [0],
3562
[Whether we should hardcode library paths into libraries])
3563
_LT_DECL([], [sys_lib_search_path_spec], [2],
3564
[Compile-time system search path for libraries])
3565
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3566
[Run-time system search path for libraries])
3567
])# _LT_SYS_DYNAMIC_LINKER
3570
# _LT_PATH_TOOL_PREFIX(TOOL)
3571
# --------------------------
3572
# find a file program which can recognize shared library
3573
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3574
[m4_require([_LT_DECL_EGREP])dnl
3575
AC_MSG_CHECKING([for $1])
3576
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3578
[[\\/*] | ?:[\\/]*])
3579
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3582
lt_save_MAGIC_CMD="$MAGIC_CMD"
3583
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3584
dnl $ac_dummy forces splitting on constant user-supplied paths.
3585
dnl POSIX.2 word splitting is done only on the output of word expansions,
3586
dnl not every word. This closes a longstanding sh security hole.
3587
ac_dummy="m4_if([$2], , $PATH, [$2])"
3588
for ac_dir in $ac_dummy; do
3590
test -z "$ac_dir" && ac_dir=.
3591
if test -f $ac_dir/$1; then
3592
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3593
if test -n "$file_magic_test_file"; then
3594
case $deplibs_check_method in
3596
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3597
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3598
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3599
$EGREP "$file_magic_regex" > /dev/null; then
3604
*** Warning: the command libtool uses to detect shared libraries,
3605
*** $file_magic_cmd, produces output that libtool cannot recognize.
3606
*** The result is that libtool may fail to recognize shared libraries
3607
*** as such. This will affect the creation of libtool libraries that
3608
*** depend on shared libraries, but programs linked with such libtool
3609
*** libraries will work regardless of this problem. Nevertheless, you
3610
*** may want to report the problem to your system manager and/or to
3611
*** bug-libtool@gnu.org
3621
MAGIC_CMD="$lt_save_MAGIC_CMD"
3624
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3625
if test -n "$MAGIC_CMD"; then
3626
AC_MSG_RESULT($MAGIC_CMD)
3630
_LT_DECL([], [MAGIC_CMD], [0],
3631
[Used to examine libraries when file_magic_cmd begins with "file"])dnl
3632
])# _LT_PATH_TOOL_PREFIX
3635
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3636
dnl aclocal-1.4 backwards compatibility:
3637
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3642
# find a file program which can recognize a shared library
3643
m4_defun([_LT_PATH_MAGIC],
3644
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3645
if test -z "$lt_cv_path_MAGIC_CMD"; then
3646
if test -n "$ac_tool_prefix"; then
3647
_LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3657
# find the pathname to the GNU or non-GNU linker
3658
AC_DEFUN([LT_PATH_LD],
3659
[AC_REQUIRE([AC_PROG_CC])dnl
3660
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3661
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3662
m4_require([_LT_DECL_SED])dnl
3663
m4_require([_LT_DECL_EGREP])dnl
3665
AC_ARG_WITH([gnu-ld],
3666
[AS_HELP_STRING([--with-gnu-ld],
3667
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3668
[test "$withval" = no || with_gnu_ld=yes],
3669
[with_gnu_ld=no])dnl
3672
if test "$GCC" = yes; then
3673
# Check if gcc -print-prog-name=ld gives a path.
3674
AC_MSG_CHECKING([for ld used by $CC])
3677
# gcc leaves a trailing carriage return which upsets mingw
3678
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3680
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3683
# Accept absolute paths.
3684
[[\\/]]* | ?:[[\\/]]*)
3685
re_direlt='/[[^/]][[^/]]*/\.\./'
3686
# Canonicalize the pathname of ld
3687
ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3688
while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3689
ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3691
test -z "$LD" && LD="$ac_prog"
3694
# If it fails, then pretend we aren't using GCC.
3698
# If it is relative, then search for the first ld in PATH.
3702
elif test "$with_gnu_ld" = yes; then
3703
AC_MSG_CHECKING([for GNU ld])
3705
AC_MSG_CHECKING([for non-GNU ld])
3707
AC_CACHE_VAL(lt_cv_path_LD,
3708
[if test -z "$LD"; then
3709
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3710
for ac_dir in $PATH; do
3712
test -z "$ac_dir" && ac_dir=.
3713
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3714
lt_cv_path_LD="$ac_dir/$ac_prog"
3715
# Check to see if the program is GNU ld. I'd rather use --version,
3716
# but apparently some variants of GNU ld only accept -v.
3717
# Break only if it was the GNU/non-GNU ld that we prefer.
3718
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3719
*GNU* | *'with BFD'*)
3720
test "$with_gnu_ld" != no && break
3723
test "$with_gnu_ld" != yes && break
3730
lt_cv_path_LD="$LD" # Let the user override the test with a path.
3733
if test -n "$LD"; then
3738
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3742
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3746
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3747
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3748
dnl aclocal-1.4 backwards compatibility:
3749
dnl AC_DEFUN([AM_PROG_LD], [])
3750
dnl AC_DEFUN([AC_PROG_LD], [])
3755
m4_defun([_LT_PATH_LD_GNU],
3756
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3757
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3758
case `$LD -v 2>&1 </dev/null` in
3759
*GNU* | *'with BFD'*)
3760
lt_cv_prog_gnu_ld=yes
3763
lt_cv_prog_gnu_ld=no
3766
with_gnu_ld=$lt_cv_prog_gnu_ld
3772
# find reload flag for linker
3773
# -- PORTME Some linkers may need a different reload flag.
3774
m4_defun([_LT_CMD_RELOAD],
3775
[AC_CACHE_CHECK([for $LD option to reload object files],
3776
lt_cv_ld_reload_flag,
3777
[lt_cv_ld_reload_flag='-r'])
3778
reload_flag=$lt_cv_ld_reload_flag
3779
case $reload_flag in
3781
*) reload_flag=" $reload_flag" ;;
3783
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3786
if test "$GCC" = yes; then
3787
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3789
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3793
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3794
_LT_DECL([], [reload_cmds], [2])dnl
3798
# _LT_CHECK_MAGIC_METHOD
3799
# ----------------------
3800
# how to check for library dependencies
3801
# -- PORTME fill in with the dynamic library characteristics
3802
m4_defun([_LT_CHECK_MAGIC_METHOD],
3803
[m4_require([_LT_DECL_EGREP])
3804
m4_require([_LT_DECL_OBJDUMP])
3805
AC_CACHE_CHECK([how to recognize dependent libraries],
3806
lt_cv_deplibs_check_method,
3807
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3808
lt_cv_file_magic_test_file=
3809
lt_cv_deplibs_check_method='unknown'
3810
# Need to set the preceding variable on all platforms that support
3811
# interlibrary dependencies.
3812
# 'none' -- dependencies not supported.
3813
# `unknown' -- same as none, but documents that we really don't know.
3814
# 'pass_all' -- all dependencies passed with no checks.
3815
# 'test_compile' -- check by making test program.
3816
# 'file_magic [[regex]]' -- check by looking for files in library path
3817
# which responds to the $file_magic_cmd with a given extended regex.
3818
# If you have `file' or equivalent on your system and you're not sure
3819
# whether `pass_all' will *always* work, you probably want this one.
3823
lt_cv_deplibs_check_method=pass_all
3827
lt_cv_deplibs_check_method=pass_all
3831
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3832
lt_cv_file_magic_cmd='/usr/bin/file -L'
3833
lt_cv_file_magic_test_file=/shlib/libc.so
3837
# func_win32_libid is a shell function defined in ltmain.sh
3838
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3839
lt_cv_file_magic_cmd='func_win32_libid'
3843
# Base MSYS/MinGW do not provide the 'file' command needed by
3844
# func_win32_libid shell function, so use a weaker test based on 'objdump',
3845
# unless we find 'file', for example because we are cross-compiling.
3846
if ( file / ) >/dev/null 2>&1; then
3847
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3848
lt_cv_file_magic_cmd='func_win32_libid'
3850
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3851
lt_cv_file_magic_cmd='$OBJDUMP -f'
3856
# use the weaker test based on 'objdump'. See mingw*.
3857
lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3858
lt_cv_file_magic_cmd='$OBJDUMP -f'
3861
darwin* | rhapsody*)
3862
lt_cv_deplibs_check_method=pass_all
3865
freebsd* | dragonfly*)
3866
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3869
# Not sure whether the presence of OpenBSD here was a mistake.
3870
# Let's accept both of them until this is cleared up.
3871
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3872
lt_cv_file_magic_cmd=/usr/bin/file
3873
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3877
lt_cv_deplibs_check_method=pass_all
3882
lt_cv_deplibs_check_method=pass_all
3885
hpux10.20* | hpux11*)
3886
lt_cv_file_magic_cmd=/usr/bin/file
3889
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3890
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3893
[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]']
3894
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3897
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3898
lt_cv_file_magic_test_file=/usr/lib/libc.sl
3904
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3905
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3908
irix5* | irix6* | nonstopux*)
3910
*-32|*"-32 ") libmagic=32-bit;;
3911
*-n32|*"-n32 ") libmagic=N32;;
3912
*-64|*"-64 ") libmagic=64-bit;;
3913
*) libmagic=never-match;;
3915
lt_cv_deplibs_check_method=pass_all
3918
# This must be Linux ELF.
3919
linux* | k*bsd*-gnu)
3920
lt_cv_deplibs_check_method=pass_all
3924
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3925
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3927
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3932
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3933
lt_cv_file_magic_cmd=/usr/bin/file
3934
lt_cv_file_magic_test_file=/usr/lib/libnls.so
3938
lt_cv_deplibs_check_method=pass_all
3942
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3943
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3945
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3949
osf3* | osf4* | osf5*)
3950
lt_cv_deplibs_check_method=pass_all
3954
lt_cv_deplibs_check_method=pass_all
3958
lt_cv_deplibs_check_method=pass_all
3961
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3962
lt_cv_deplibs_check_method=pass_all
3966
case $host_vendor in
3968
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]]'
3969
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3972
lt_cv_deplibs_check_method=pass_all
3975
lt_cv_file_magic_cmd='/bin/file'
3976
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3979
lt_cv_file_magic_cmd='/bin/file'
3980
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3981
lt_cv_file_magic_test_file=/lib/libc.so
3984
lt_cv_deplibs_check_method=pass_all
3987
lt_cv_deplibs_check_method=pass_all
3993
lt_cv_deplibs_check_method=pass_all
3997
file_magic_cmd=$lt_cv_file_magic_cmd
3998
deplibs_check_method=$lt_cv_deplibs_check_method
3999
test -z "$deplibs_check_method" && deplibs_check_method=unknown
4001
_LT_DECL([], [deplibs_check_method], [1],
4002
[Method to check whether dependent libraries are shared objects])
4003
_LT_DECL([], [file_magic_cmd], [1],
4004
[Command to use when deplibs_check_method == "file_magic"])
4005
])# _LT_CHECK_MAGIC_METHOD
4010
# find the pathname to a BSD- or MS-compatible name lister
4011
AC_DEFUN([LT_PATH_NM],
4012
[AC_REQUIRE([AC_PROG_CC])dnl
4013
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4014
[if test -n "$NM"; then
4015
# Let the user override the test.
4018
lt_nm_to_check="${ac_tool_prefix}nm"
4019
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4020
lt_nm_to_check="$lt_nm_to_check nm"
4022
for lt_tmp_nm in $lt_nm_to_check; do
4023
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4024
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4026
test -z "$ac_dir" && ac_dir=.
4027
tmp_nm="$ac_dir/$lt_tmp_nm"
4028
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4029
# Check to see if the nm accepts a BSD-compat flag.
4030
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4031
# nm: unknown option "B" ignored
4032
# Tru64's nm complains that /dev/null is an invalid object file
4033
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4034
*/dev/null* | *'Invalid file or object type'*)
4035
lt_cv_path_NM="$tmp_nm -B"
4039
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4041
lt_cv_path_NM="$tmp_nm -p"
4045
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4046
continue # so that we can try to find one that supports BSD flags
4055
: ${lt_cv_path_NM=no}
4057
if test "$lt_cv_path_NM" != "no"; then
4060
# Didn't find any BSD compatible name lister, look for dumpbin.
4061
AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
4063
if test "$DUMPBIN" != ":"; then
4067
test -z "$NM" && NM=nm
4069
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4071
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4072
[lt_cv_nm_interface="BSD nm"
4073
echo "int some_variable = 0;" > conftest.$ac_ext
4074
(eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4075
(eval "$ac_compile" 2>conftest.err)
4076
cat conftest.err >&AS_MESSAGE_LOG_FD
4077
(eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4078
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4079
cat conftest.err >&AS_MESSAGE_LOG_FD
4080
(eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
4081
cat conftest.out >&AS_MESSAGE_LOG_FD
4082
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4083
lt_cv_nm_interface="MS dumpbin"
4089
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4090
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4091
dnl aclocal-1.4 backwards compatibility:
4092
dnl AC_DEFUN([AM_PROG_NM], [])
4093
dnl AC_DEFUN([AC_PROG_NM], [])
4098
# check for math library
4099
AC_DEFUN([LT_LIB_M],
4100
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4103
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4104
# These system don't have libm, or don't need it
4107
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4108
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4111
AC_CHECK_LIB(m, cos, LIBM="-lm")
4118
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4119
dnl aclocal-1.4 backwards compatibility:
4120
dnl AC_DEFUN([AC_CHECK_LIBM], [])
4123
# _LT_COMPILER_NO_RTTI([TAGNAME])
4124
# -------------------------------
4125
m4_defun([_LT_COMPILER_NO_RTTI],
4126
[m4_require([_LT_TAG_COMPILER])dnl
4128
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4130
if test "$GCC" = yes; then
4131
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4133
_LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4134
lt_cv_prog_compiler_rtti_exceptions,
4135
[-fno-rtti -fno-exceptions], [],
4136
[_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4138
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4139
[Compiler flag to turn off builtin functions])
4140
])# _LT_COMPILER_NO_RTTI
4143
# _LT_CMD_GLOBAL_SYMBOLS
4144
# ----------------------
4145
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4146
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4147
AC_REQUIRE([AC_PROG_CC])dnl
4148
AC_REQUIRE([LT_PATH_NM])dnl
4149
AC_REQUIRE([LT_PATH_LD])dnl
4150
m4_require([_LT_DECL_SED])dnl
4151
m4_require([_LT_DECL_EGREP])dnl
4152
m4_require([_LT_TAG_COMPILER])dnl
4154
# Check for command to grab the raw symbol name followed by C symbol from nm.
4155
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4156
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4158
# These are sane defaults that work on at least a few old systems.
4159
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
4161
# Character class describing NM global symbol codes.
4162
symcode='[[BCDEGRST]]'
4164
# Regexp to match symbols that can be accessed directly from C.
4165
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4167
# Define system-specific variables.
4172
cygwin* | mingw* | pw32* | cegcc*)
4173
symcode='[[ABCDGISTW]]'
4176
if test "$host_cpu" = ia64; then
4177
symcode='[[ABCDEGRST]]'
4181
symcode='[[BCDEGRST]]'
4184
symcode='[[BCDEGQRST]]'
4195
sysv5* | sco5v6* | unixware* | OpenUNIX*)
4199
symcode='[[DFNSTU]]'
4203
# If we're using GNU nm, then use its standard symbol codes.
4204
case `$NM -V 2>&1` in
4205
*GNU* | *'with BFD'*)
4206
symcode='[[ABCDGIRSTW]]' ;;
4209
# Transform an extracted symbol line into a proper C declaration.
4210
# Some systems (esp. on ia64) link data and code symbols differently,
4211
# so use this general approach.
4212
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4214
# Transform an extracted symbol line into symbol name and symbol address
4215
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
4216
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'"
4218
# Handle CRLF in mingw tool chain
4222
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4226
# Try without a prefix underscore, then with it.
4227
for ac_symprfx in "" "_"; do
4229
# Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4230
symxfrm="\\1 $ac_symprfx\\2 \\2"
4232
# Write the raw and C identifiers.
4233
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4234
# Fake it for dumpbin and say T for any non-static function
4235
# and D for any global variable.
4236
# Also find C++ and __fastcall symbols from MSVC++,
4237
# which start with @ or ?.
4238
lt_cv_sys_global_symbol_pipe="$AWK ['"\
4239
" {last_section=section; section=\$ 3};"\
4240
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4241
" \$ 0!~/External *\|/{next};"\
4242
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4243
" {if(hide[section]) next};"\
4244
" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4245
" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4246
" s[1]~/^[@?]/{print s[1], s[1]; next};"\
4247
" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4248
" ' prfx=^$ac_symprfx]"
4250
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4253
# Check to see that the pipe works correctly.
4257
cat > conftest.$ac_ext <<_LT_EOF
4262
void nm_test_func(void);
4263
void nm_test_func(void){}
4267
int main(){nm_test_var='a';nm_test_func();return(0);}
4270
if AC_TRY_EVAL(ac_compile); then
4271
# Now try to grab the symbols.
4273
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4274
# Try sorting and uniquifying the output.
4275
if sort "$nlist" | uniq > "$nlist"T; then
4276
mv -f "$nlist"T "$nlist"
4281
# Make sure that we snagged all the symbols we need.
4282
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4283
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4284
cat <<_LT_EOF > conftest.$ac_ext
4290
# Now generate the symbol file.
4291
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4293
cat <<_LT_EOF >> conftest.$ac_ext
4295
/* The mapping between symbol names and symbols. */
4300
lt__PROGRAM__LTX_preloaded_symbols[[]] =
4302
{ "@PROGRAM@", (void *) 0 },
4304
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4305
cat <<\_LT_EOF >> conftest.$ac_ext
4309
/* This works around a problem in FreeBSD linker */
4310
#ifdef FREEBSD_WORKAROUND
4311
static const void *lt_preloaded_setup() {
4312
return lt__PROGRAM__LTX_preloaded_symbols;
4320
# Now try linking the two files.
4321
mv conftest.$ac_objext conftstm.$ac_objext
4322
lt_save_LIBS="$LIBS"
4323
lt_save_CFLAGS="$CFLAGS"
4324
LIBS="conftstm.$ac_objext"
4325
CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4326
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4329
LIBS="$lt_save_LIBS"
4330
CFLAGS="$lt_save_CFLAGS"
4332
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4335
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4338
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4341
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4342
cat conftest.$ac_ext >&5
4344
rm -rf conftest* conftst*
4346
# Do not use the global_symbol_pipe unless it works.
4347
if test "$pipe_works" = yes; then
4350
lt_cv_sys_global_symbol_pipe=
4354
if test -z "$lt_cv_sys_global_symbol_pipe"; then
4355
lt_cv_sys_global_symbol_to_cdecl=
4357
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4358
AC_MSG_RESULT(failed)
4363
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4364
[Take the output of nm and produce a listing of raw symbols and C names])
4365
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4366
[Transform the output of nm in a proper C declaration])
4367
_LT_DECL([global_symbol_to_c_name_address],
4368
[lt_cv_sys_global_symbol_to_c_name_address], [1],
4369
[Transform the output of nm in a C name address pair])
4370
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4371
[lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4372
[Transform the output of nm in a C name address pair when lib prefix is needed])
4373
]) # _LT_CMD_GLOBAL_SYMBOLS
4376
# _LT_COMPILER_PIC([TAGNAME])
4377
# ---------------------------
4378
m4_defun([_LT_COMPILER_PIC],
4379
[m4_require([_LT_TAG_COMPILER])dnl
4380
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4381
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4382
_LT_TAGVAR(lt_prog_compiler_static, $1)=
4384
AC_MSG_CHECKING([for $compiler option to produce PIC])
4385
m4_if([$1], [CXX], [
4386
# C++ specific cases for pic, static, wl, etc.
4387
if test "$GXX" = yes; then
4388
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4389
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4393
# All AIX code is PIC.
4394
if test "$host_cpu" = ia64; then
4395
# AIX 5 now supports IA64 processor
4396
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4403
# see comment about AmigaOS4 .so support
4404
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4407
# FIXME: we need at least 68020 code to build shared libraries, but
4408
# adding the `-m68020' flag to GCC prevents building anything better,
4410
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4415
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4416
# PIC is the default for these OSes.
4418
mingw* | cygwin* | os2* | pw32* | cegcc*)
4419
# This hack is so that the source file can tell whether it is being
4420
# built for inclusion in a dll (and should export symbols for example).
4421
# Although the cygwin gcc ignores -fPIC, still need this for old-style
4422
# (--disable-auto-import) libraries
4423
m4_if([$1], [GCJ], [],
4424
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4426
darwin* | rhapsody*)
4427
# PIC is the default on this platform
4428
# Common symbols not allowed in MH_DYLIB files
4429
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4432
# DJGPP does not support shared libraries at all
4433
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4436
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
4437
# Instead, we relocate shared libraries at runtime.
4440
if test -d /usr/nec; then
4441
_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4445
# PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4446
# PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4447
# sets the default TLS model and affects inlining.
4452
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4457
# QNX uses GNU C++, but need to define -shared option too, otherwise
4459
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4462
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4468
# All AIX code is PIC.
4469
if test "$host_cpu" = ia64; then
4470
# AIX 5 now supports IA64 processor
4471
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4473
_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4477
case $cc_basename in
4479
# Green Hills C++ Compiler
4480
# _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"
4485
case $cc_basename in
4487
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4490
# Green Hills C++ Compiler
4491
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4497
freebsd* | dragonfly*)
4498
# FreeBSD uses GNU C++
4500
hpux9* | hpux10* | hpux11*)
4501
case $cc_basename in
4503
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4504
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4505
if test "$host_cpu" != ia64; then
4506
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4510
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4511
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4517
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4526
# This is c89, which is MS Visual C++ (no shared libs)
4527
# Anyone wants to do a port?
4529
irix5* | irix6* | nonstopux*)
4530
case $cc_basename in
4532
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4533
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4534
# CC pic flag -KPIC is the default.
4540
linux* | k*bsd*-gnu)
4541
case $cc_basename in
4544
_LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4545
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4548
# old Intel C++ for x86_64 which still supported -KPIC.
4549
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4550
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4551
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4554
# Intel C++, used to be incompatible with GCC.
4555
# ICC 10 doesn't accept -KPIC any more.
4556
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4557
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4558
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4561
# Portland Group C++ compiler
4562
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4563
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4564
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4568
# Make sure the PIC flag is empty. It appears that all Alpha
4569
# Linux and Compaq Tru64 Unix objects are PIC.
4570
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4571
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4575
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4576
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4577
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4580
case `$CC -V 2>&1 | sed 5q` in
4583
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4584
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4585
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4596
case $cc_basename in
4598
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4607
# QNX uses GNU C++, but need to define -shared option too, otherwise
4609
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4611
osf3* | osf4* | osf5*)
4612
case $cc_basename in
4614
_LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4617
# Rational C++ 2.4.1
4618
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4621
# Digital/Compaq C++
4622
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4623
# Make sure the PIC flag is empty. It appears that all Alpha
4624
# Linux and Compaq Tru64 Unix objects are PIC.
4625
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4626
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4635
case $cc_basename in
4637
# Sun C++ 4.2, 5.x and Centerline C++
4638
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4639
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4640
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4643
# Green Hills C++ Compiler
4644
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4651
case $cc_basename in
4654
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4655
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4659
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4665
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4666
case $cc_basename in
4668
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4669
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4670
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4675
case $cc_basename in
4677
# NonStop-UX NCC 3.20
4678
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4687
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4693
if test "$GCC" = yes; then
4694
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4695
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4699
# All AIX code is PIC.
4700
if test "$host_cpu" = ia64; then
4701
# AIX 5 now supports IA64 processor
4702
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4709
# see comment about AmigaOS4 .so support
4710
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4713
# FIXME: we need at least 68020 code to build shared libraries, but
4714
# adding the `-m68020' flag to GCC prevents building anything better,
4716
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4721
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4722
# PIC is the default for these OSes.
4725
mingw* | cygwin* | pw32* | os2* | cegcc*)
4726
# This hack is so that the source file can tell whether it is being
4727
# built for inclusion in a dll (and should export symbols for example).
4728
# Although the cygwin gcc ignores -fPIC, still need this for old-style
4729
# (--disable-auto-import) libraries
4730
m4_if([$1], [GCJ], [],
4731
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4734
darwin* | rhapsody*)
4735
# PIC is the default on this platform
4736
# Common symbols not allowed in MH_DYLIB files
4737
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4741
# PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4742
# PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4743
# sets the default TLS model and affects inlining.
4749
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4755
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
4756
# Instead, we relocate shared libraries at runtime.
4760
# Just because we use GCC doesn't mean we suddenly get shared libraries
4761
# on systems that don't support them.
4762
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4767
# QNX uses GNU C++, but need to define -shared option too, otherwise
4769
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4773
if test -d /usr/nec; then
4774
_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4779
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4783
# PORTME Check for flag to pass linker flags through the system compiler.
4786
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4787
if test "$host_cpu" = ia64; then
4788
# AIX 5 now supports IA64 processor
4789
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4791
_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4795
mingw* | cygwin* | pw32* | os2* | cegcc*)
4796
# This hack is so that the source file can tell whether it is being
4797
# built for inclusion in a dll (and should export symbols for example).
4798
m4_if([$1], [GCJ], [],
4799
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4802
hpux9* | hpux10* | hpux11*)
4803
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4804
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4811
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4814
# Is there a better lt_prog_compiler_static that works with the bundled CC?
4815
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4818
irix5* | irix6* | nonstopux*)
4819
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4820
# PIC (with -KPIC) is the default.
4821
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4824
linux* | k*bsd*-gnu)
4825
case $cc_basename in
4826
# old Intel for x86_64 which still supported -KPIC.
4828
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4829
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4830
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4832
# icc used to be incompatible with GCC.
4833
# ICC 10 doesn't accept -KPIC any more.
4835
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4836
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4837
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4839
# Lahey Fortran 8.1.
4841
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4842
_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4843
_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4845
pgcc* | pgf77* | pgf90* | pgf95*)
4846
# Portland Group compilers (*not* the Pentium gcc compiler,
4847
# which looks to be a dead project)
4848
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4849
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4850
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4853
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4854
# All Alpha code is PIC.
4855
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4858
# IBM XL C 8.0/Fortran 10.1 on PPC
4859
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4860
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4861
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4864
case `$CC -V 2>&1 | sed 5q` in
4867
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4868
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4869
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4872
# Sun Fortran 8.3 passes all unrecognized flags to the linker
4873
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4874
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4875
_LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4883
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4884
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4888
# QNX uses GNU C++, but need to define -shared option too, otherwise
4890
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4893
osf3* | osf4* | osf5*)
4894
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4895
# All OSF/1 code is PIC.
4896
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4900
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4904
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4905
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4906
case $cc_basename in
4908
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4910
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4915
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4916
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4917
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4920
sysv4 | sysv4.2uw2* | sysv4.3*)
4921
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4922
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4923
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4927
if test -d /usr/nec ;then
4928
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4929
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4933
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4934
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4935
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4936
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4940
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4941
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4945
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4946
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4950
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4956
# For platforms which do not support PIC, -DPIC is meaningless:
4958
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4961
_LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4964
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4965
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4966
[How to pass a linker flag through the compiler])
4969
# Check to make sure the PIC flag actually works.
4971
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4972
_LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4973
[_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4974
[$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4975
[case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4977
*) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4979
[_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4980
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4982
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4983
[Additional compiler flags for building library objects])
4986
# Check to make sure the static flag actually works.
4988
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4989
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4990
_LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4991
$lt_tmp_static_flag,
4993
[_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4994
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4995
[Compiler flag to prevent dynamic linking])
4996
])# _LT_COMPILER_PIC
4999
# _LT_LINKER_SHLIBS([TAGNAME])
5000
# ----------------------------
5001
# See if the linker supports building shared libraries.
5002
m4_defun([_LT_LINKER_SHLIBS],
5003
[AC_REQUIRE([LT_PATH_LD])dnl
5004
AC_REQUIRE([LT_PATH_NM])dnl
5005
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5006
m4_require([_LT_DECL_EGREP])dnl
5007
m4_require([_LT_DECL_SED])dnl
5008
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5009
m4_require([_LT_TAG_COMPILER])dnl
5010
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5011
m4_if([$1], [CXX], [
5012
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5015
# If we're using GNU nm, then we don't want the "-C" option.
5016
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5017
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5018
_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'
5020
_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'
5024
_LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5026
cygwin* | mingw* | cegcc*)
5027
_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'
5030
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5033
_LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5036
_LT_TAGVAR(allow_undefined_flag, $1)=
5037
_LT_TAGVAR(always_export_symbols, $1)=no
5038
_LT_TAGVAR(archive_cmds, $1)=
5039
_LT_TAGVAR(archive_expsym_cmds, $1)=
5040
_LT_TAGVAR(compiler_needs_object, $1)=no
5041
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5042
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5043
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5044
_LT_TAGVAR(hardcode_automatic, $1)=no
5045
_LT_TAGVAR(hardcode_direct, $1)=no
5046
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5047
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5048
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5049
_LT_TAGVAR(hardcode_libdir_separator, $1)=
5050
_LT_TAGVAR(hardcode_minus_L, $1)=no
5051
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5052
_LT_TAGVAR(inherit_rpath, $1)=no
5053
_LT_TAGVAR(link_all_deplibs, $1)=unknown
5054
_LT_TAGVAR(module_cmds, $1)=
5055
_LT_TAGVAR(module_expsym_cmds, $1)=
5056
_LT_TAGVAR(old_archive_from_new_cmds, $1)=
5057
_LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5058
_LT_TAGVAR(thread_safe_flag_spec, $1)=
5059
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5060
# include_expsyms should be a list of space-separated symbols to be *always*
5061
# included in the symbol list
5062
_LT_TAGVAR(include_expsyms, $1)=
5063
# exclude_expsyms can be an extended regexp of symbols to exclude
5064
# it will be wrapped by ` (' and `)$', so one must not match beginning or
5065
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5066
# as well as any symbol that contains `d'.
5067
_LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5068
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5069
# platforms (ab)use it in PIC code, but their linkers get confused if
5070
# the symbol is explicitly referenced. Since portable code cannot
5071
# rely on this symbol name, it's probably fine to never include it in
5072
# preloaded symbol tables.
5073
# Exclude shared library initialization/finalization symbols.
5074
dnl Note also adjust exclude_expsyms for C++ above.
5075
extract_expsyms_cmds=
5078
cygwin* | mingw* | pw32* | cegcc*)
5079
# FIXME: the MSVC++ port hasn't been tested in a loooong time
5080
# When not using gcc, we currently assume that we are using
5081
# Microsoft Visual C++.
5082
if test "$GCC" != yes; then
5087
# we just hope/assume this is gcc and not c89 (= MSVC++)
5095
_LT_TAGVAR(ld_shlibs, $1)=yes
5096
if test "$with_gnu_ld" = yes; then
5097
# If archive_cmds runs LD, not CC, wlarc should be empty
5100
# Set some defaults for GNU ld with shared library support. These
5101
# are reset later if shared libraries are not supported. Putting them
5102
# here allows them to be overridden if necessary.
5103
runpath_var=LD_RUN_PATH
5104
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5105
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5106
# ancient GNU ld didn't support --whole-archive et. al.
5107
if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5108
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5110
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5112
supports_anon_versioning=no
5113
case `$LD -v 2>&1` in
5114
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5115
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5116
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5117
*\ 2.11.*) ;; # other 2.11 versions
5118
*) supports_anon_versioning=yes ;;
5121
# See if GNU ld supports shared libraries.
5124
# On AIX/PPC, the GNU linker is very broken
5125
if test "$host_cpu" != ia64; then
5126
_LT_TAGVAR(ld_shlibs, $1)=no
5129
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5130
*** to be unable to reliably create shared libraries on AIX.
5131
*** Therefore, libtool is disabling shared libraries support. If you
5132
*** really care for shared libraries, you may want to modify your PATH
5133
*** so that a non-GNU linker is found, and then restart.
5142
# see comment about AmigaOS4 .so support
5143
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5144
_LT_TAGVAR(archive_expsym_cmds, $1)=''
5147
_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)'
5148
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5149
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5155
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5156
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5157
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5158
# support --undefined. This deserves some investigation. FIXME
5159
_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5161
_LT_TAGVAR(ld_shlibs, $1)=no
5165
cygwin* | mingw* | pw32* | cegcc*)
5166
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5167
# as there is no search path for DLLs.
5168
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5169
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5170
_LT_TAGVAR(always_export_symbols, $1)=no
5171
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5172
_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'
5174
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5175
_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'
5176
# If the export-symbols file already is a .def file (1st line
5177
# is EXPORTS), use it as is; otherwise, prepend...
5178
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5179
cp $export_symbols $output_objdir/$soname.def;
5181
echo EXPORTS > $output_objdir/$soname.def;
5182
cat $export_symbols >> $output_objdir/$soname.def;
5184
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5186
_LT_TAGVAR(ld_shlibs, $1)=no
5191
_LT_TAGVAR(hardcode_direct, $1)=no
5192
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5193
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5194
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5195
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5196
# Instead, shared libraries are loaded at an image base (0x10000000 by
5197
# default) and relocated if they conflict, which is a slow very memory
5198
# consuming and fragmenting process. To avoid this, we pick a random,
5199
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5200
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
5201
_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'
5202
_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'
5205
gnu* | linux* | tpf* | k*bsd*-gnu)
5207
if test "$host_os" = linux-dietlibc; then
5208
case $cc_basename in
5209
diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5212
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5213
&& test "$tmp_diet" = no
5216
tmp_sharedflag='-shared'
5217
case $cc_basename,$host_cpu in
5218
pgcc*) # Portland Group C compiler
5219
_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'
5220
tmp_addflag=' $pic_flag'
5222
pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
5223
_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'
5224
tmp_addflag=' $pic_flag -Mnomain' ;;
5225
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5226
tmp_addflag=' -i_dynamic' ;;
5227
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5228
tmp_addflag=' -i_dynamic -nofor_main' ;;
5229
ifc* | ifort*) # Intel Fortran compiler
5230
tmp_addflag=' -nofor_main' ;;
5231
lf95*) # Lahey Fortran 8.1
5232
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5233
tmp_sharedflag='--shared' ;;
5234
xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5235
tmp_sharedflag='-qmkshrobj'
5238
case `$CC -V 2>&1 | sed 5q` in
5239
*Sun\ C*) # Sun C 5.9
5240
_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'
5241
_LT_TAGVAR(compiler_needs_object, $1)=yes
5242
tmp_sharedflag='-G' ;;
5243
*Sun\ F*) # Sun Fortran 8.3
5244
tmp_sharedflag='-G' ;;
5246
_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5248
if test "x$supports_anon_versioning" = xyes; then
5249
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5250
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5251
echo "local: *; };" >> $output_objdir/$libname.ver~
5252
$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5255
case $cc_basename in
5257
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5258
_LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5259
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5260
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5261
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
5262
if test "x$supports_anon_versioning" = xyes; then
5263
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5264
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5265
echo "local: *; };" >> $output_objdir/$libname.ver~
5266
$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5271
_LT_TAGVAR(ld_shlibs, $1)=no
5276
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5277
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5280
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5281
_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'
5286
if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5287
_LT_TAGVAR(ld_shlibs, $1)=no
5290
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5291
*** create shared libraries on Solaris systems. Therefore, libtool
5292
*** is disabling shared libraries support. We urge you to upgrade GNU
5293
*** binutils to release 2.9.1 or newer. Another option is to modify
5294
*** your PATH or compiler configuration so that the native linker is
5295
*** used, and then restart.
5298
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5299
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5300
_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'
5302
_LT_TAGVAR(ld_shlibs, $1)=no
5306
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5307
case `$LD -v 2>&1` in
5308
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5309
_LT_TAGVAR(ld_shlibs, $1)=no
5312
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5313
*** reliably create shared libraries on SCO systems. Therefore, libtool
5314
*** is disabling shared libraries support. We urge you to upgrade GNU
5315
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5316
*** your PATH or compiler configuration so that the native linker is
5317
*** used, and then restart.
5322
# For security reasons, it is highly recommended that you always
5323
# use absolute paths for naming shared libraries, and exclude the
5324
# DT_RUNPATH tag from executables and libraries. But doing so
5325
# requires that you compile everything twice, which is a pain.
5326
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5327
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5328
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5329
_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'
5331
_LT_TAGVAR(ld_shlibs, $1)=no
5338
_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5340
_LT_TAGVAR(hardcode_direct, $1)=yes
5341
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5345
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5346
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5347
_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'
5349
_LT_TAGVAR(ld_shlibs, $1)=no
5354
if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5356
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5357
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5358
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5361
# PORTME fill in a description of your system's linker (not GNU ld)
5364
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5365
_LT_TAGVAR(always_export_symbols, $1)=yes
5366
_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'
5367
# Note: this linker hardcodes the directories in LIBPATH if there
5368
# are no directories specified by -L.
5369
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5370
if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5371
# Neither direct hardcoding nor static linking is supported with a
5373
_LT_TAGVAR(hardcode_direct, $1)=unsupported
5378
if test "$host_cpu" = ia64; then
5379
# On IA64, the linker does run time linking by default, so we don't
5380
# have to do anything special.
5381
aix_use_runtimelinking=no
5382
exp_sym_flag='-Bexport'
5385
# If we're using GNU nm, then we don't want the "-C" option.
5386
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5387
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5388
_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'
5390
_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'
5392
aix_use_runtimelinking=no
5394
# Test if we are trying to use run time linking or normal
5395
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5396
# need to do runtime linking.
5397
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5398
for ld_flag in $LDFLAGS; do
5399
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5400
aix_use_runtimelinking=yes
5407
exp_sym_flag='-bexport'
5408
no_entry_flag='-bnoentry'
5411
# When large executables or shared objects are built, AIX ld can
5412
# have problems creating the table of contents. If linking a library
5413
# or program results in "error TOC overflow" add -mminimal-toc to
5414
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5415
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5417
_LT_TAGVAR(archive_cmds, $1)=''
5418
_LT_TAGVAR(hardcode_direct, $1)=yes
5419
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5420
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5421
_LT_TAGVAR(link_all_deplibs, $1)=yes
5422
_LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5424
if test "$GCC" = yes; then
5425
case $host_os in aix4.[[012]]|aix4.[[012]].*)
5426
# We only want to do this on AIX 4.2 and lower, the check
5427
# below for broken collect2 doesn't work under 4.3+
5428
collect2name=`${CC} -print-prog-name=collect2`
5429
if test -f "$collect2name" &&
5430
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5432
# We have reworked collect2
5435
# We have old collect2
5436
_LT_TAGVAR(hardcode_direct, $1)=unsupported
5437
# It fails to find uninstalled libraries when the uninstalled
5438
# path is not listed in the libpath. Setting hardcode_minus_L
5439
# to unsupported forces relinking
5440
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5441
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5442
_LT_TAGVAR(hardcode_libdir_separator, $1)=
5446
shared_flag='-shared'
5447
if test "$aix_use_runtimelinking" = yes; then
5448
shared_flag="$shared_flag "'${wl}-G'
5452
if test "$host_cpu" = ia64; then
5453
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5454
# chokes on -Wl,-G. The following line is correct:
5457
if test "$aix_use_runtimelinking" = yes; then
5458
shared_flag='${wl}-G'
5460
shared_flag='${wl}-bM:SRE'
5465
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5466
# It seems that -bexpall does not export symbols beginning with
5467
# underscore (_), so it is better to generate a list of symbols to export.
5468
_LT_TAGVAR(always_export_symbols, $1)=yes
5469
if test "$aix_use_runtimelinking" = yes; then
5470
# Warning - without using the other runtime loading flags (-brtl),
5471
# -berok will link without error, but may produce a broken library.
5472
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5473
# Determine the default libpath from the value encoded in an
5475
_LT_SYS_MODULE_PATH_AIX
5476
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5477
_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"
5479
if test "$host_cpu" = ia64; then
5480
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5481
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5482
_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"
5484
# Determine the default libpath from the value encoded in an
5486
_LT_SYS_MODULE_PATH_AIX
5487
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5488
# Warning - without using the other run time loading flags,
5489
# -berok will link without error, but may produce a broken library.
5490
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5491
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5492
# Exported symbols can be pulled into shared objects from archives
5493
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5494
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5495
# This is similar to how AIX traditionally builds its shared libraries.
5496
_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'
5504
# see comment about AmigaOS4 .so support
5505
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5506
_LT_TAGVAR(archive_expsym_cmds, $1)=''
5509
_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)'
5510
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5511
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5517
_LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5520
cygwin* | mingw* | pw32* | cegcc*)
5521
# When not using gcc, we currently assume that we are using
5522
# Microsoft Visual C++.
5523
# hardcode_libdir_flag_spec is actually meaningless, as there is
5524
# no search path for DLLs.
5525
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5526
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5527
# Tell ltmain to make .lib files, not .a files.
5529
# Tell ltmain to make .dll files, not .so files.
5531
# FIXME: Setting linknames here is a bad hack.
5532
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5533
# The linker will automatically build a .lib file if we build a DLL.
5534
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5535
# FIXME: Should let the user specify the lib program.
5536
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5537
_LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5538
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5541
darwin* | rhapsody*)
5542
_LT_DARWIN_LINKER_FEATURES($1)
5546
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5547
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5548
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5552
_LT_TAGVAR(ld_shlibs, $1)=no
5555
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5556
# support. Future versions do this automatically, but an explicit c++rt0.o
5557
# does not break anything, and helps significantly (at the cost of a little
5560
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5561
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5562
_LT_TAGVAR(hardcode_direct, $1)=yes
5563
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5566
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
5568
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5569
_LT_TAGVAR(hardcode_direct, $1)=yes
5570
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5571
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5574
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5575
freebsd* | dragonfly*)
5576
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5577
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5578
_LT_TAGVAR(hardcode_direct, $1)=yes
5579
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5583
if test "$GCC" = yes; then
5584
_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'
5586
_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'
5588
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5589
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5590
_LT_TAGVAR(hardcode_direct, $1)=yes
5592
# hardcode_minus_L: Not really in the search PATH,
5593
# but as the default location of the library.
5594
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5595
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5599
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5600
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5602
_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5604
if test "$with_gnu_ld" = no; then
5605
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5606
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5607
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5608
_LT_TAGVAR(hardcode_direct, $1)=yes
5609
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5610
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5611
# hardcode_minus_L: Not really in the search PATH,
5612
# but as the default location of the library.
5613
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5618
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5621
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5624
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5627
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5633
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5636
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5639
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5643
if test "$with_gnu_ld" = no; then
5644
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5645
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5649
_LT_TAGVAR(hardcode_direct, $1)=no
5650
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5653
_LT_TAGVAR(hardcode_direct, $1)=yes
5654
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5655
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5657
# hardcode_minus_L: Not really in the search PATH,
5658
# but as the default location of the library.
5659
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5665
irix5* | irix6* | nonstopux*)
5666
if test "$GCC" = yes; then
5667
_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'
5668
# Try to use the -exported_symbol ld option, if it does not
5669
# work, assume that -exports_file does not work either and
5670
# implicitly export all symbols.
5671
save_LDFLAGS="$LDFLAGS"
5672
LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5673
AC_LINK_IFELSE(int foo(void) {},
5674
_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'
5676
LDFLAGS="$save_LDFLAGS"
5678
_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'
5679
_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'
5681
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5682
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5683
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5684
_LT_TAGVAR(inherit_rpath, $1)=yes
5685
_LT_TAGVAR(link_all_deplibs, $1)=yes
5689
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5690
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5692
_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5694
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5695
_LT_TAGVAR(hardcode_direct, $1)=yes
5696
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5700
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5701
_LT_TAGVAR(hardcode_direct, $1)=yes
5702
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5703
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5704
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5711
if test -f /usr/libexec/ld.so; then
5712
_LT_TAGVAR(hardcode_direct, $1)=yes
5713
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5714
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5715
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5716
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5717
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5718
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5719
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5722
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5723
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5724
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5727
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5728
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5733
_LT_TAGVAR(ld_shlibs, $1)=no
5738
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5739
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5740
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5741
_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'
5742
_LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5746
if test "$GCC" = yes; then
5747
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5748
_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'
5750
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5751
_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'
5753
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5754
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5755
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5758
osf4* | osf5*) # as osf3* with the addition of -msym flag
5759
if test "$GCC" = yes; then
5760
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5761
_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'
5762
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5764
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5765
_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'
5766
_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~
5767
$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'
5769
# Both c and cxx compiler support -rpath directly
5770
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5772
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5773
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5777
_LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5778
if test "$GCC" = yes; then
5780
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5781
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5782
$CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5784
case `$CC -V 2>&1` in
5787
_LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5788
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5789
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5793
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5794
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5795
$CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5799
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5800
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5802
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5804
# The compiler driver will combine and reorder linker options,
5805
# but understands `-z linker_flag'. GCC discards it without `$wl',
5806
# but is careful enough not to reorder.
5807
# Supported since Solaris 2.6 (maybe 2.5.1?)
5808
if test "$GCC" = yes; then
5809
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5811
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5815
_LT_TAGVAR(link_all_deplibs, $1)=yes
5819
if test "x$host_vendor" = xsequent; then
5820
# Use $CC to link under sequent, because it throws in some extra .o
5821
# files that make .init and .fini sections work.
5822
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5824
_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5826
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5827
_LT_TAGVAR(hardcode_direct, $1)=yes
5828
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5829
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5833
case $host_vendor in
5835
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5836
_LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5839
## LD is ld it makes a PLAMLIB
5840
## CC just makes a GrossModule.
5841
_LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5842
_LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5843
_LT_TAGVAR(hardcode_direct, $1)=no
5846
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5847
_LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5850
runpath_var='LD_RUN_PATH'
5851
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5855
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5856
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5857
_LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5861
if test -d /usr/nec; then
5862
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5863
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5864
runpath_var=LD_RUN_PATH
5865
hardcode_runpath_var=yes
5866
_LT_TAGVAR(ld_shlibs, $1)=yes
5870
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5871
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5872
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5873
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5874
runpath_var='LD_RUN_PATH'
5876
if test "$GCC" = yes; then
5877
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5878
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5880
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5881
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5885
sysv5* | sco3.2v5* | sco5v6*)
5886
# Note: We can NOT use -z defs as we might desire, because we do not
5887
# link with -lc, and that would cause any symbols used from libc to
5888
# always be unresolved, which means just about no library would
5889
# ever link correctly. If we're not using GNU ld we use -z text
5890
# though, which does catch some bad symbols but isn't as heavy-handed
5892
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5893
_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5894
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5895
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5896
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5897
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5898
_LT_TAGVAR(link_all_deplibs, $1)=yes
5899
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5900
runpath_var='LD_RUN_PATH'
5902
if test "$GCC" = yes; then
5903
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5904
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5906
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5907
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5912
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5913
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5914
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5918
_LT_TAGVAR(ld_shlibs, $1)=no
5922
if test x$host_vendor = xsni; then
5924
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5925
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5931
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5932
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5934
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5936
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5937
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5938
_LT_DECL([], [extract_expsyms_cmds], [2],
5939
[The commands to extract the exported symbol list from a shared archive])
5942
# Do we need to explicitly link libc?
5944
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5946
# Assume -lc should be added
5947
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5949
if test "$enable_shared" = yes && test "$GCC" = yes; then
5950
case $_LT_TAGVAR(archive_cmds, $1) in
5952
# FIXME: we may have to deal with multi-command sequences.
5955
# Test whether the compiler implicitly links with -lc since on some
5956
# systems, -lgcc has to come before -lc. If gcc already passes -lc
5957
# to ld, don't add -lc before -lgcc.
5958
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5960
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5962
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5965
libobjs=conftest.$ac_objext
5967
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5968
pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5974
lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5975
_LT_TAGVAR(allow_undefined_flag, $1)=
5976
if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5978
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5980
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5982
_LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5984
cat conftest.err 1>&5
5987
AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5994
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5995
[Whether or not to add -lc for building shared libraries])
5996
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5997
[enable_shared_with_static_runtimes], [0],
5998
[Whether or not to disallow shared libs when runtime libs are static])
5999
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6000
[Compiler flag to allow reflexive dlopens])
6001
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6002
[Compiler flag to generate shared objects directly from archives])
6003
_LT_TAGDECL([], [compiler_needs_object], [1],
6004
[Whether the compiler copes with passing no objects directly])
6005
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6006
[Create an old-style archive from a shared archive])
6007
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6008
[Create a temporary old-style archive to link instead of a shared archive])
6009
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6010
_LT_TAGDECL([], [archive_expsym_cmds], [2])
6011
_LT_TAGDECL([], [module_cmds], [2],
6012
[Commands used to build a loadable module if different from building
6014
_LT_TAGDECL([], [module_expsym_cmds], [2])
6015
_LT_TAGDECL([], [with_gnu_ld], [1],
6016
[Whether we are building with GNU ld or not])
6017
_LT_TAGDECL([], [allow_undefined_flag], [1],
6018
[Flag that allows shared libraries with undefined symbols to be built])
6019
_LT_TAGDECL([], [no_undefined_flag], [1],
6020
[Flag that enforces no undefined symbols])
6021
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6022
[Flag to hardcode $libdir into a binary during linking.
6023
This must work even if $libdir does not exist])
6024
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6025
[[If ld is used when linking, flag to hardcode $libdir into a binary
6026
during linking. This must work even if $libdir does not exist]])
6027
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6028
[Whether we need a single "-rpath" flag with a separated argument])
6029
_LT_TAGDECL([], [hardcode_direct], [0],
6030
[Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6031
DIR into the resulting binary])
6032
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6033
[Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6034
DIR into the resulting binary and the resulting library dependency is
6035
"absolute", i.e impossible to change by setting ${shlibpath_var} if the
6036
library is relocated])
6037
_LT_TAGDECL([], [hardcode_minus_L], [0],
6038
[Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6039
into the resulting binary])
6040
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6041
[Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6042
into the resulting binary])
6043
_LT_TAGDECL([], [hardcode_automatic], [0],
6044
[Set to "yes" if building a shared library automatically hardcodes DIR
6045
into the library and all subsequent libraries and executables linked
6047
_LT_TAGDECL([], [inherit_rpath], [0],
6048
[Set to yes if linker adds runtime paths of dependent libraries
6049
to runtime path list])
6050
_LT_TAGDECL([], [link_all_deplibs], [0],
6051
[Whether libtool must link a program against all its dependency libraries])
6052
_LT_TAGDECL([], [fix_srcfile_path], [1],
6053
[Fix the shell variable $srcfile for the compiler])
6054
_LT_TAGDECL([], [always_export_symbols], [0],
6055
[Set to "yes" if exported symbols are required])
6056
_LT_TAGDECL([], [export_symbols_cmds], [2],
6057
[The commands to list exported symbols])
6058
_LT_TAGDECL([], [exclude_expsyms], [1],
6059
[Symbols that should not be listed in the preloaded symbols])
6060
_LT_TAGDECL([], [include_expsyms], [1],
6061
[Symbols that must always be exported])
6062
_LT_TAGDECL([], [prelink_cmds], [2],
6063
[Commands necessary for linking programs (against libraries) with templates])
6064
_LT_TAGDECL([], [file_list_spec], [1],
6065
[Specify filename containing input files])
6066
dnl FIXME: Not yet implemented
6067
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6068
dnl [Compiler flag to generate thread safe objects])
6069
])# _LT_LINKER_SHLIBS
6072
# _LT_LANG_C_CONFIG([TAG])
6073
# ------------------------
6074
# Ensure that the configuration variables for a C compiler are suitably
6075
# defined. These variables are subsequently used by _LT_CONFIG to write
6076
# the compiler configuration to `libtool'.
6077
m4_defun([_LT_LANG_C_CONFIG],
6078
[m4_require([_LT_DECL_EGREP])dnl
6082
# Source file extension for C test sources.
6085
# Object file extension for compiled C test sources.
6087
_LT_TAGVAR(objext, $1)=$objext
6089
# Code to be used in simple compile tests
6090
lt_simple_compile_test_code="int some_variable = 0;"
6092
# Code to be used in simple link tests
6093
lt_simple_link_test_code='int main(){return(0);}'
6096
# Save the default compiler, since it gets overwritten when the other
6097
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6098
compiler_DEFAULT=$CC
6100
# save warnings/boilerplate of simple test code
6101
_LT_COMPILER_BOILERPLATE
6102
_LT_LINKER_BOILERPLATE
6104
if test -n "$compiler"; then
6105
_LT_COMPILER_NO_RTTI($1)
6106
_LT_COMPILER_PIC($1)
6107
_LT_COMPILER_C_O($1)
6108
_LT_COMPILER_FILE_LOCKS($1)
6109
_LT_LINKER_SHLIBS($1)
6110
_LT_SYS_DYNAMIC_LINKER($1)
6111
_LT_LINKER_HARDCODE_LIBPATH($1)
6115
# Report which library types will actually be built
6116
AC_MSG_CHECKING([if libtool supports shared libraries])
6117
AC_MSG_RESULT([$can_build_shared])
6119
AC_MSG_CHECKING([whether to build shared libraries])
6120
test "$can_build_shared" = "no" && enable_shared=no
6122
# On AIX, shared libraries and static libraries use the same namespace, and
6123
# are all built from PIC.
6126
test "$enable_shared" = yes && enable_static=no
6127
if test -n "$RANLIB"; then
6128
archive_cmds="$archive_cmds~\$RANLIB \$lib"
6129
postinstall_cmds='$RANLIB $lib'
6134
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6135
test "$enable_shared" = yes && enable_static=no
6139
AC_MSG_RESULT([$enable_shared])
6141
AC_MSG_CHECKING([whether to build static libraries])
6142
# Make sure either enable_shared or enable_static is yes.
6143
test "$enable_shared" = yes || enable_static=yes
6144
AC_MSG_RESULT([$enable_static])
6150
])# _LT_LANG_C_CONFIG
6155
# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
6156
# compiler, we have our own version here.
6157
m4_defun([_LT_PROG_CXX],
6159
pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
6161
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6162
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6163
(test "X$CXX" != "Xg++"))) ; then
6166
_lt_caught_CXX_error=yes
6168
popdef([AC_MSG_ERROR])
6171
dnl aclocal-1.4 backwards compatibility:
6172
dnl AC_DEFUN([_LT_PROG_CXX], [])
6175
# _LT_LANG_CXX_CONFIG([TAG])
6176
# --------------------------
6177
# Ensure that the configuration variables for a C++ compiler are suitably
6178
# defined. These variables are subsequently used by _LT_CONFIG to write
6179
# the compiler configuration to `libtool'.
6180
m4_defun([_LT_LANG_CXX_CONFIG],
6181
[AC_REQUIRE([_LT_PROG_CXX])dnl
6182
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6183
m4_require([_LT_DECL_EGREP])dnl
6186
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6187
_LT_TAGVAR(allow_undefined_flag, $1)=
6188
_LT_TAGVAR(always_export_symbols, $1)=no
6189
_LT_TAGVAR(archive_expsym_cmds, $1)=
6190
_LT_TAGVAR(compiler_needs_object, $1)=no
6191
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6192
_LT_TAGVAR(hardcode_direct, $1)=no
6193
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6194
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6195
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6196
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6197
_LT_TAGVAR(hardcode_minus_L, $1)=no
6198
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6199
_LT_TAGVAR(hardcode_automatic, $1)=no
6200
_LT_TAGVAR(inherit_rpath, $1)=no
6201
_LT_TAGVAR(module_cmds, $1)=
6202
_LT_TAGVAR(module_expsym_cmds, $1)=
6203
_LT_TAGVAR(link_all_deplibs, $1)=unknown
6204
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6205
_LT_TAGVAR(no_undefined_flag, $1)=
6206
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6207
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6209
# Source file extension for C++ test sources.
6212
# Object file extension for compiled C++ test sources.
6214
_LT_TAGVAR(objext, $1)=$objext
6216
# No sense in running all these tests if we already determined that
6217
# the CXX compiler isn't working. Some variables (like enable_shared)
6218
# are currently assumed to apply to all compilers on this platform,
6219
# and will be corrupted by setting them based on a non-working compiler.
6220
if test "$_lt_caught_CXX_error" != yes; then
6221
# Code to be used in simple compile tests
6222
lt_simple_compile_test_code="int some_variable = 0;"
6224
# Code to be used in simple link tests
6225
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6227
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6230
# save warnings/boilerplate of simple test code
6231
_LT_COMPILER_BOILERPLATE
6232
_LT_LINKER_BOILERPLATE
6234
# Allow CC to be a program name with arguments.
6239
lt_save_with_gnu_ld=$with_gnu_ld
6240
lt_save_path_LD=$lt_cv_path_LD
6241
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6242
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6244
$as_unset lt_cv_prog_gnu_ld
6246
if test -n "${lt_cv_path_LDCXX+set}"; then
6247
lt_cv_path_LD=$lt_cv_path_LDCXX
6249
$as_unset lt_cv_path_LD
6251
test -z "${LDCXX+set}" || LD=$LDCXX
6254
_LT_TAGVAR(compiler, $1)=$CC
6255
_LT_CC_BASENAME([$compiler])
6257
if test -n "$compiler"; then
6258
# We don't want -fno-exception when compiling C++ code, so set the
6259
# no_builtin_flag separately
6260
if test "$GXX" = yes; then
6261
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6263
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6266
if test "$GXX" = yes; then
6267
# Set up default GNU C++ configuration
6271
# Check if GNU C++ uses GNU ld as the underlying linker, since the
6272
# archiving commands below assume that GNU ld is being used.
6273
if test "$with_gnu_ld" = yes; then
6274
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6275
_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'
6277
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6278
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6280
# If archive_cmds runs LD, not CC, wlarc should be empty
6281
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6282
# investigate it a little bit more. (MM)
6285
# ancient GNU ld didn't support --whole-archive et. al.
6286
if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6287
$GREP 'no-whole-archive' > /dev/null; then
6288
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6290
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6296
# A generic and very simple default shared library creation
6297
# command for GNU C++ for the case where it uses the native
6298
# linker, instead of GNU ld. If possible, this setting should
6299
# overridden to take advantage of the native linker features on
6300
# the platform it is being used on.
6301
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6304
# Commands to make compiler produce verbose output that lists
6305
# what "hidden" libraries, object files and flags are used when
6306
# linking a shared library.
6307
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6315
# PORTME: fill in a description of your system's C++ link characteristics
6316
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6317
_LT_TAGVAR(ld_shlibs, $1)=yes
6320
# FIXME: insert proper C++ library support
6321
_LT_TAGVAR(ld_shlibs, $1)=no
6324
if test "$host_cpu" = ia64; then
6325
# On IA64, the linker does run time linking by default, so we don't
6326
# have to do anything special.
6327
aix_use_runtimelinking=no
6328
exp_sym_flag='-Bexport'
6331
aix_use_runtimelinking=no
6333
# Test if we are trying to use run time linking or normal
6334
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6335
# need to do runtime linking.
6336
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6337
for ld_flag in $LDFLAGS; do
6340
aix_use_runtimelinking=yes
6348
exp_sym_flag='-bexport'
6349
no_entry_flag='-bnoentry'
6352
# When large executables or shared objects are built, AIX ld can
6353
# have problems creating the table of contents. If linking a library
6354
# or program results in "error TOC overflow" add -mminimal-toc to
6355
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6356
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6358
_LT_TAGVAR(archive_cmds, $1)=''
6359
_LT_TAGVAR(hardcode_direct, $1)=yes
6360
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6361
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6362
_LT_TAGVAR(link_all_deplibs, $1)=yes
6363
_LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6365
if test "$GXX" = yes; then
6366
case $host_os in aix4.[[012]]|aix4.[[012]].*)
6367
# We only want to do this on AIX 4.2 and lower, the check
6368
# below for broken collect2 doesn't work under 4.3+
6369
collect2name=`${CC} -print-prog-name=collect2`
6370
if test -f "$collect2name" &&
6371
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6373
# We have reworked collect2
6376
# We have old collect2
6377
_LT_TAGVAR(hardcode_direct, $1)=unsupported
6378
# It fails to find uninstalled libraries when the uninstalled
6379
# path is not listed in the libpath. Setting hardcode_minus_L
6380
# to unsupported forces relinking
6381
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6382
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6383
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6386
shared_flag='-shared'
6387
if test "$aix_use_runtimelinking" = yes; then
6388
shared_flag="$shared_flag "'${wl}-G'
6392
if test "$host_cpu" = ia64; then
6393
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6394
# chokes on -Wl,-G. The following line is correct:
6397
if test "$aix_use_runtimelinking" = yes; then
6398
shared_flag='${wl}-G'
6400
shared_flag='${wl}-bM:SRE'
6405
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6406
# It seems that -bexpall does not export symbols beginning with
6407
# underscore (_), so it is better to generate a list of symbols to
6409
_LT_TAGVAR(always_export_symbols, $1)=yes
6410
if test "$aix_use_runtimelinking" = yes; then
6411
# Warning - without using the other runtime loading flags (-brtl),
6412
# -berok will link without error, but may produce a broken library.
6413
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6414
# Determine the default libpath from the value encoded in an empty
6416
_LT_SYS_MODULE_PATH_AIX
6417
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6419
_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"
6421
if test "$host_cpu" = ia64; then
6422
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6423
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6424
_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"
6426
# Determine the default libpath from the value encoded in an
6428
_LT_SYS_MODULE_PATH_AIX
6429
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6430
# Warning - without using the other run time loading flags,
6431
# -berok will link without error, but may produce a broken library.
6432
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6433
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6434
# Exported symbols can be pulled into shared objects from archives
6435
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6436
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6437
# This is similar to how AIX traditionally builds its shared
6439
_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'
6445
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6446
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6447
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6448
# support --undefined. This deserves some investigation. FIXME
6449
_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6451
_LT_TAGVAR(ld_shlibs, $1)=no
6456
case $cc_basename in
6458
# FIXME: insert proper C++ library support
6459
_LT_TAGVAR(ld_shlibs, $1)=no
6464
cygwin* | mingw* | pw32* | cegcc*)
6465
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6466
# as there is no search path for DLLs.
6467
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6468
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6469
_LT_TAGVAR(always_export_symbols, $1)=no
6470
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6472
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6473
_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'
6474
# If the export-symbols file already is a .def file (1st line
6475
# is EXPORTS), use it as is; otherwise, prepend...
6476
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6477
cp $export_symbols $output_objdir/$soname.def;
6479
echo EXPORTS > $output_objdir/$soname.def;
6480
cat $export_symbols >> $output_objdir/$soname.def;
6482
$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'
6484
_LT_TAGVAR(ld_shlibs, $1)=no
6487
darwin* | rhapsody*)
6488
_LT_DARWIN_LINKER_FEATURES($1)
6492
case $cc_basename in
6494
# FIXME: insert proper C++ library support
6495
_LT_TAGVAR(ld_shlibs, $1)=no
6498
# Green Hills C++ Compiler
6499
# FIXME: insert proper C++ library support
6500
_LT_TAGVAR(ld_shlibs, $1)=no
6503
# FIXME: insert proper C++ library support
6504
_LT_TAGVAR(ld_shlibs, $1)=no
6510
# C++ shared libraries reported to be fairly broken before
6512
_LT_TAGVAR(ld_shlibs, $1)=no
6516
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6519
freebsd* | dragonfly*)
6520
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6522
_LT_TAGVAR(ld_shlibs, $1)=yes
6529
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6530
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6531
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6532
_LT_TAGVAR(hardcode_direct, $1)=yes
6533
_LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6534
# but as the default
6535
# location of the library.
6537
case $cc_basename in
6539
# FIXME: insert proper C++ library support
6540
_LT_TAGVAR(ld_shlibs, $1)=no
6543
_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'
6544
# Commands to make compiler produce verbose output that lists
6545
# what "hidden" libraries, object files and flags are used when
6546
# linking a shared library.
6548
# There doesn't appear to be a way to prevent this compiler from
6549
# explicitly linking system object files so we need to strip them
6550
# from the output so that they don't get included in the library
6552
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'
6555
if test "$GXX" = yes; then
6556
_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'
6558
# FIXME: insert proper C++ library support
6559
_LT_TAGVAR(ld_shlibs, $1)=no
6566
if test $with_gnu_ld = no; then
6567
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6568
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6574
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6580
_LT_TAGVAR(hardcode_direct, $1)=no
6581
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6584
_LT_TAGVAR(hardcode_direct, $1)=yes
6585
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6586
_LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6587
# but as the default
6588
# location of the library.
6592
case $cc_basename in
6594
# FIXME: insert proper C++ library support
6595
_LT_TAGVAR(ld_shlibs, $1)=no
6600
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6603
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6606
_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'
6609
# Commands to make compiler produce verbose output that lists
6610
# what "hidden" libraries, object files and flags are used when
6611
# linking a shared library.
6613
# There doesn't appear to be a way to prevent this compiler from
6614
# explicitly linking system object files so we need to strip them
6615
# from the output so that they don't get included in the library
6617
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'
6620
if test "$GXX" = yes; then
6621
if test $with_gnu_ld = no; then
6624
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6627
_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'
6630
_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'
6635
# FIXME: insert proper C++ library support
6636
_LT_TAGVAR(ld_shlibs, $1)=no
6643
_LT_TAGVAR(hardcode_direct, $1)=no
6644
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6645
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6646
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6647
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6648
# Instead, shared libraries are loaded at an image base (0x10000000 by
6649
# default) and relocated if they conflict, which is a slow very memory
6650
# consuming and fragmenting process. To avoid this, we pick a random,
6651
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6652
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
6653
_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'
6654
_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'
6657
case $cc_basename in
6660
_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'
6662
# Archives containing C++ object files must be created using
6663
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
6664
# necessary to make sure instantiated templates are included
6666
_LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6669
if test "$GXX" = yes; then
6670
if test "$with_gnu_ld" = no; then
6671
_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'
6673
_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'
6676
_LT_TAGVAR(link_all_deplibs, $1)=yes
6679
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6680
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6681
_LT_TAGVAR(inherit_rpath, $1)=yes
6684
linux* | k*bsd*-gnu)
6685
case $cc_basename in
6687
# Kuck and Associates, Inc. (KAI) C++ Compiler
6689
# KCC will only create a shared library if the output file
6690
# ends with ".so" (or ".sl" for HP-UX), so rename the library
6691
# to its proper name (with version) after linking.
6692
_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'
6693
_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'
6694
# Commands to make compiler produce verbose output that lists
6695
# what "hidden" libraries, object files and flags are used when
6696
# linking a shared library.
6698
# There doesn't appear to be a way to prevent this compiler from
6699
# explicitly linking system object files so we need to strip them
6700
# from the output so that they don't get included in the library
6702
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'
6704
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6705
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6707
# Archives containing C++ object files must be created using
6708
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
6709
_LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6714
# version 8.0 and above of icpc choke on multiply defined symbols
6715
# if we add $predep_objects and $postdep_objects, however 7.1 and
6716
# earlier do not add the objects themselves.
6717
case `$CC -V 2>&1` in
6719
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6720
_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'
6722
*) # Version 8.0 or newer
6725
ia64*) tmp_idyn=' -i_dynamic';;
6727
_LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6728
_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'
6731
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6732
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6733
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6734
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6737
# Portland Group C++ compiler
6739
*pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
6740
_LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6742
$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6743
compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
6744
_LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6746
$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6747
$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
6749
_LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6751
$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6752
$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6753
_LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6755
$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6756
$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'
6758
*) # Version 6 will use weak symbols
6759
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6760
_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'
6764
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6765
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6766
_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'
6770
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6771
_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'
6773
runpath_var=LD_RUN_PATH
6774
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6775
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6777
# Commands to make compiler produce verbose output that lists
6778
# what "hidden" libraries, object files and flags are used when
6779
# linking a shared library.
6781
# There doesn't appear to be a way to prevent this compiler from
6782
# explicitly linking system object files so we need to strip them
6783
# from the output so that they don't get included in the library
6785
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'
6788
# IBM XL 8.0 on PPC, with GNU ld
6789
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6790
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6791
_LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6792
if test "x$supports_anon_versioning" = xyes; then
6793
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6794
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6795
echo "local: *; };" >> $output_objdir/$libname.ver~
6796
$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6800
case `$CC -V 2>&1 | sed 5q` in
6803
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6804
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6805
_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'
6806
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6807
_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'
6808
_LT_TAGVAR(compiler_needs_object, $1)=yes
6810
# Not sure whether something based on
6811
# $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6813
output_verbose_link_cmd='echo'
6815
# Archives containing C++ object files must be created using
6816
# "CC -xar", where "CC" is the Sun C++ compiler. This is
6817
# necessary to make sure instantiated templates are included
6819
_LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6827
# FIXME: insert proper C++ library support
6828
_LT_TAGVAR(ld_shlibs, $1)=no
6832
# FIXME: insert proper C++ library support
6833
_LT_TAGVAR(ld_shlibs, $1)=no
6837
case $cc_basename in
6839
# FIXME: insert proper C++ library support
6840
_LT_TAGVAR(ld_shlibs, $1)=no
6843
# FIXME: insert proper C++ library support
6844
_LT_TAGVAR(ld_shlibs, $1)=no
6850
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6851
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6853
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6854
_LT_TAGVAR(hardcode_direct, $1)=yes
6855
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6857
# Workaround some broken pre-1.5 toolchains
6858
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6862
_LT_TAGVAR(ld_shlibs, $1)=yes
6866
# C++ shared libraries are fairly broken
6867
_LT_TAGVAR(ld_shlibs, $1)=no
6871
if test -f /usr/libexec/ld.so; then
6872
_LT_TAGVAR(hardcode_direct, $1)=yes
6873
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6874
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6875
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6876
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6877
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6878
_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'
6879
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6880
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6882
output_verbose_link_cmd=echo
6884
_LT_TAGVAR(ld_shlibs, $1)=no
6888
osf3* | osf4* | osf5*)
6889
case $cc_basename in
6891
# Kuck and Associates, Inc. (KAI) C++ Compiler
6893
# KCC will only create a shared library if the output file
6894
# ends with ".so" (or ".sl" for HP-UX), so rename the library
6895
# to its proper name (with version) after linking.
6896
_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'
6898
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6899
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6901
# Archives containing C++ object files must be created using
6902
# the KAI C++ compiler.
6904
osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6905
*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6909
# Rational C++ 2.4.1
6910
# FIXME: insert proper C++ library support
6911
_LT_TAGVAR(ld_shlibs, $1)=no
6916
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6917
_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'
6918
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6921
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6922
_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'
6923
_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6924
echo "-hidden">> $lib.exp~
6925
$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~
6927
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6931
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6933
# Commands to make compiler produce verbose output that lists
6934
# what "hidden" libraries, object files and flags are used when
6935
# linking a shared library.
6937
# There doesn't appear to be a way to prevent this compiler from
6938
# explicitly linking system object files so we need to strip them
6939
# from the output so that they don't get included in the library
6941
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'
6944
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6945
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6948
_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'
6951
_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'
6955
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6956
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6958
# Commands to make compiler produce verbose output that lists
6959
# what "hidden" libraries, object files and flags are used when
6960
# linking a shared library.
6961
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6964
# FIXME: insert proper C++ library support
6965
_LT_TAGVAR(ld_shlibs, $1)=no
6972
# FIXME: insert proper C++ library support
6973
_LT_TAGVAR(ld_shlibs, $1)=no
6977
case $cc_basename in
6980
# FIXME: insert proper C++ library support
6981
_LT_TAGVAR(ld_shlibs, $1)=no
6985
# FIXME: insert proper C++ library support
6986
_LT_TAGVAR(ld_shlibs, $1)=no
6989
# FIXME: insert proper C++ library support
6990
_LT_TAGVAR(ld_shlibs, $1)=no
6996
case $cc_basename in
6998
# Sun C++ 4.2, 5.x and Centerline C++
6999
_LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7000
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7001
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7002
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7003
$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'
7005
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7006
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7008
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7010
# The compiler driver will combine and reorder linker options,
7011
# but understands `-z linker_flag'.
7012
# Supported since Solaris 2.6 (maybe 2.5.1?)
7013
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7016
_LT_TAGVAR(link_all_deplibs, $1)=yes
7018
output_verbose_link_cmd='echo'
7020
# Archives containing C++ object files must be created using
7021
# "CC -xar", where "CC" is the Sun C++ compiler. This is
7022
# necessary to make sure instantiated templates are included
7024
_LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7027
# Green Hills C++ Compiler
7028
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7030
# The C++ compiler must be used to create the archive.
7031
_LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7034
# GNU C++ compiler with Solaris linker
7035
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7036
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7037
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7038
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7039
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7040
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7042
# Commands to make compiler produce verbose output that lists
7043
# what "hidden" libraries, object files and flags are used when
7044
# linking a shared library.
7045
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7047
# g++ 2.7 appears to require `-G' NOT `-shared' on this
7049
_LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7050
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7051
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7053
# Commands to make compiler produce verbose output that lists
7054
# what "hidden" libraries, object files and flags are used when
7055
# linking a shared library.
7056
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7059
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7061
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7063
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7071
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7072
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7073
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7074
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7075
runpath_var='LD_RUN_PATH'
7077
case $cc_basename in
7079
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7080
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7083
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7084
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7089
sysv5* | sco3.2v5* | sco5v6*)
7090
# Note: We can NOT use -z defs as we might desire, because we do not
7091
# link with -lc, and that would cause any symbols used from libc to
7092
# always be unresolved, which means just about no library would
7093
# ever link correctly. If we're not using GNU ld we use -z text
7094
# though, which does catch some bad symbols but isn't as heavy-handed
7096
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7097
_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7098
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7099
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7100
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7101
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7102
_LT_TAGVAR(link_all_deplibs, $1)=yes
7103
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7104
runpath_var='LD_RUN_PATH'
7106
case $cc_basename in
7108
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7109
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7112
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7113
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7119
case $cc_basename in
7121
# NonStop-UX NCC 3.20
7122
# FIXME: insert proper C++ library support
7123
_LT_TAGVAR(ld_shlibs, $1)=no
7126
# FIXME: insert proper C++ library support
7127
_LT_TAGVAR(ld_shlibs, $1)=no
7133
# FIXME: insert proper C++ library support
7134
_LT_TAGVAR(ld_shlibs, $1)=no
7138
# FIXME: insert proper C++ library support
7139
_LT_TAGVAR(ld_shlibs, $1)=no
7143
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7144
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7146
_LT_TAGVAR(GCC, $1)="$GXX"
7147
_LT_TAGVAR(LD, $1)="$LD"
7150
## There is no encapsulation within the following macros, do not change
7151
## the running order or otherwise move them around unless you know exactly
7152
## what you are doing...
7153
_LT_SYS_HIDDEN_LIBDEPS($1)
7154
_LT_COMPILER_PIC($1)
7155
_LT_COMPILER_C_O($1)
7156
_LT_COMPILER_FILE_LOCKS($1)
7157
_LT_LINKER_SHLIBS($1)
7158
_LT_SYS_DYNAMIC_LINKER($1)
7159
_LT_LINKER_HARDCODE_LIBPATH($1)
7162
fi # test -n "$compiler"
7168
with_gnu_ld=$lt_save_with_gnu_ld
7169
lt_cv_path_LDCXX=$lt_cv_path_LD
7170
lt_cv_path_LD=$lt_save_path_LD
7171
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7172
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7173
fi # test "$_lt_caught_CXX_error" != yes
7176
])# _LT_LANG_CXX_CONFIG
7179
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7180
# ---------------------------------
7181
# Figure out "hidden" library dependencies from verbose
7182
# compiler output when linking a shared library.
7183
# Parse the compiler output and extract the necessary
7184
# objects, libraries and library flags.
7185
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7186
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7187
# Dependencies to place before and after the object being linked:
7188
_LT_TAGVAR(predep_objects, $1)=
7189
_LT_TAGVAR(postdep_objects, $1)=
7190
_LT_TAGVAR(predeps, $1)=
7191
_LT_TAGVAR(postdeps, $1)=
7192
_LT_TAGVAR(compiler_lib_search_path, $1)=
7194
dnl we can't use the lt_simple_compile_test_code here,
7195
dnl because it contains code intended for an executable,
7196
dnl not a library. It's possible we should let each
7197
dnl tag define a new lt_????_link_test_code variable,
7198
dnl but it's only used here...
7199
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7201
void foo (void) { a = 0; }
7203
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7207
Foo (void) { a = 0; }
7212
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7220
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7228
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7231
public void bar (void) {
7237
dnl Parse the compiler output and extract the necessary
7238
dnl objects, libraries and library flags.
7239
if AC_TRY_EVAL(ac_compile); then
7240
# Parse the compiler output and extract the necessary
7241
# objects, libraries and library flags.
7243
# Sentinel used to keep track of whether or not we are before
7244
# the conftest object file.
7245
pre_test_object_deps_done=no
7247
for p in `eval "$output_verbose_link_cmd"`; do
7251
# Some compilers place space between "-{L,R}" and the path.
7253
if test $p = "-L" ||
7254
test $p = "-R"; then
7261
if test "$pre_test_object_deps_done" = no; then
7264
# Internal compiler library paths should come after those
7265
# provided the user. The postdeps already come after the
7266
# user supplied libs so there is no need to process them.
7267
if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7268
_LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7270
_LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7273
# The "-l" case would never come before the object being
7274
# linked, so don't bother handling this case.
7277
if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7278
_LT_TAGVAR(postdeps, $1)="${prev}${p}"
7280
_LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7286
# This assumes that the test object file only shows up
7287
# once in the compiler output.
7288
if test "$p" = "conftest.$objext"; then
7289
pre_test_object_deps_done=yes
7293
if test "$pre_test_object_deps_done" = no; then
7294
if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7295
_LT_TAGVAR(predep_objects, $1)="$p"
7297
_LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7300
if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7301
_LT_TAGVAR(postdep_objects, $1)="$p"
7303
_LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7308
*) ;; # Ignore the rest.
7316
echo "libtool.m4: error: problem compiling $1 test program"
7319
$RM -f confest.$objext
7321
# PORTME: override above test on systems where it is broken
7325
# Interix 3.5 installs completely hosed .la files for C++, so rather than
7326
# hack all around it, let's just trust "g++" to DTRT.
7327
_LT_TAGVAR(predep_objects,$1)=
7328
_LT_TAGVAR(postdep_objects,$1)=
7329
_LT_TAGVAR(postdeps,$1)=
7333
case `$CC -V 2>&1 | sed 5q` in
7337
# The more standards-conforming stlport4 library is
7338
# incompatible with the Cstd library. Avoid specifying
7339
# it if it's in CXXFLAGS. Ignore libCrun as
7340
# -library=stlport4 depends on it.
7341
case " $CXX $CXXFLAGS " in
7342
*" -library=stlport4 "*)
7343
solaris_use_stlport4=yes
7347
if test "$solaris_use_stlport4" != yes; then
7348
_LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7355
case $cc_basename in
7357
# The more standards-conforming stlport4 library is
7358
# incompatible with the Cstd library. Avoid specifying
7359
# it if it's in CXXFLAGS. Ignore libCrun as
7360
# -library=stlport4 depends on it.
7361
case " $CXX $CXXFLAGS " in
7362
*" -library=stlport4 "*)
7363
solaris_use_stlport4=yes
7367
# Adding this requires a known-good setup of shared libraries for
7368
# Sun compiler versions before 5.6, else PIC objects from an old
7369
# archive will be linked into the output, leading to subtle bugs.
7370
if test "$solaris_use_stlport4" != yes; then
7371
_LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7379
case " $_LT_TAGVAR(postdeps, $1) " in
7380
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7382
_LT_TAGVAR(compiler_lib_search_dirs, $1)=
7383
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7384
_LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7386
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7387
[The directories searched by this compiler when creating a shared library])
7388
_LT_TAGDECL([], [predep_objects], [1],
7389
[Dependencies to place before and after the objects being linked to
7390
create a shared library])
7391
_LT_TAGDECL([], [postdep_objects], [1])
7392
_LT_TAGDECL([], [predeps], [1])
7393
_LT_TAGDECL([], [postdeps], [1])
7394
_LT_TAGDECL([], [compiler_lib_search_path], [1],
7395
[The library search path used internally by the compiler when linking
7397
])# _LT_SYS_HIDDEN_LIBDEPS
7402
# Since AC_PROG_F77 is broken, in that it returns the empty string
7403
# if there is no fortran compiler, we have our own version here.
7404
m4_defun([_LT_PROG_F77],
7406
pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
7408
if test -z "$F77" || test "X$F77" = "Xno"; then
7411
popdef([AC_MSG_ERROR])
7414
dnl aclocal-1.4 backwards compatibility:
7415
dnl AC_DEFUN([_LT_PROG_F77], [])
7418
# _LT_LANG_F77_CONFIG([TAG])
7419
# --------------------------
7420
# Ensure that the configuration variables for a Fortran 77 compiler are
7421
# suitably defined. These variables are subsequently used by _LT_CONFIG
7422
# to write the compiler configuration to `libtool'.
7423
m4_defun([_LT_LANG_F77_CONFIG],
7424
[AC_REQUIRE([_LT_PROG_F77])dnl
7425
AC_LANG_PUSH(Fortran 77)
7427
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7428
_LT_TAGVAR(allow_undefined_flag, $1)=
7429
_LT_TAGVAR(always_export_symbols, $1)=no
7430
_LT_TAGVAR(archive_expsym_cmds, $1)=
7431
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7432
_LT_TAGVAR(hardcode_direct, $1)=no
7433
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7434
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7435
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7436
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7437
_LT_TAGVAR(hardcode_minus_L, $1)=no
7438
_LT_TAGVAR(hardcode_automatic, $1)=no
7439
_LT_TAGVAR(inherit_rpath, $1)=no
7440
_LT_TAGVAR(module_cmds, $1)=
7441
_LT_TAGVAR(module_expsym_cmds, $1)=
7442
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7443
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7444
_LT_TAGVAR(no_undefined_flag, $1)=
7445
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7446
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7448
# Source file extension for f77 test sources.
7451
# Object file extension for compiled f77 test sources.
7453
_LT_TAGVAR(objext, $1)=$objext
7455
# No sense in running all these tests if we already determined that
7456
# the F77 compiler isn't working. Some variables (like enable_shared)
7457
# are currently assumed to apply to all compilers on this platform,
7458
# and will be corrupted by setting them based on a non-working compiler.
7459
if test "$_lt_disable_F77" != yes; then
7460
# Code to be used in simple compile tests
7461
lt_simple_compile_test_code="\
7467
# Code to be used in simple link tests
7468
lt_simple_link_test_code="\
7473
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7476
# save warnings/boilerplate of simple test code
7477
_LT_COMPILER_BOILERPLATE
7478
_LT_LINKER_BOILERPLATE
7480
# Allow CC to be a program name with arguments.
7485
_LT_TAGVAR(compiler, $1)=$CC
7486
_LT_CC_BASENAME([$compiler])
7488
if test -n "$compiler"; then
7489
AC_MSG_CHECKING([if libtool supports shared libraries])
7490
AC_MSG_RESULT([$can_build_shared])
7492
AC_MSG_CHECKING([whether to build shared libraries])
7493
test "$can_build_shared" = "no" && enable_shared=no
7495
# On AIX, shared libraries and static libraries use the same namespace, and
7496
# are all built from PIC.
7499
test "$enable_shared" = yes && enable_static=no
7500
if test -n "$RANLIB"; then
7501
archive_cmds="$archive_cmds~\$RANLIB \$lib"
7502
postinstall_cmds='$RANLIB $lib'
7506
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7507
test "$enable_shared" = yes && enable_static=no
7511
AC_MSG_RESULT([$enable_shared])
7513
AC_MSG_CHECKING([whether to build static libraries])
7514
# Make sure either enable_shared or enable_static is yes.
7515
test "$enable_shared" = yes || enable_static=yes
7516
AC_MSG_RESULT([$enable_static])
7518
_LT_TAGVAR(GCC, $1)="$G77"
7519
_LT_TAGVAR(LD, $1)="$LD"
7522
## There is no encapsulation within the following macros, do not change
7523
## the running order or otherwise move them around unless you know exactly
7524
## what you are doing...
7525
_LT_COMPILER_PIC($1)
7526
_LT_COMPILER_C_O($1)
7527
_LT_COMPILER_FILE_LOCKS($1)
7528
_LT_LINKER_SHLIBS($1)
7529
_LT_SYS_DYNAMIC_LINKER($1)
7530
_LT_LINKER_HARDCODE_LIBPATH($1)
7533
fi # test -n "$compiler"
7537
fi # test "$_lt_disable_F77" != yes
7540
])# _LT_LANG_F77_CONFIG
7545
# Since AC_PROG_FC is broken, in that it returns the empty string
7546
# if there is no fortran compiler, we have our own version here.
7547
m4_defun([_LT_PROG_FC],
7549
pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
7551
if test -z "$FC" || test "X$FC" = "Xno"; then
7554
popdef([AC_MSG_ERROR])
7557
dnl aclocal-1.4 backwards compatibility:
7558
dnl AC_DEFUN([_LT_PROG_FC], [])
7561
# _LT_LANG_FC_CONFIG([TAG])
7562
# -------------------------
7563
# Ensure that the configuration variables for a Fortran compiler are
7564
# suitably defined. These variables are subsequently used by _LT_CONFIG
7565
# to write the compiler configuration to `libtool'.
7566
m4_defun([_LT_LANG_FC_CONFIG],
7567
[AC_REQUIRE([_LT_PROG_FC])dnl
7568
AC_LANG_PUSH(Fortran)
7570
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7571
_LT_TAGVAR(allow_undefined_flag, $1)=
7572
_LT_TAGVAR(always_export_symbols, $1)=no
7573
_LT_TAGVAR(archive_expsym_cmds, $1)=
7574
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7575
_LT_TAGVAR(hardcode_direct, $1)=no
7576
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7577
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7578
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7579
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7580
_LT_TAGVAR(hardcode_minus_L, $1)=no
7581
_LT_TAGVAR(hardcode_automatic, $1)=no
7582
_LT_TAGVAR(inherit_rpath, $1)=no
7583
_LT_TAGVAR(module_cmds, $1)=
7584
_LT_TAGVAR(module_expsym_cmds, $1)=
7585
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7586
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7587
_LT_TAGVAR(no_undefined_flag, $1)=
7588
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7589
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7591
# Source file extension for fc test sources.
7592
ac_ext=${ac_fc_srcext-f}
7594
# Object file extension for compiled fc test sources.
7596
_LT_TAGVAR(objext, $1)=$objext
7598
# No sense in running all these tests if we already determined that
7599
# the FC compiler isn't working. Some variables (like enable_shared)
7600
# are currently assumed to apply to all compilers on this platform,
7601
# and will be corrupted by setting them based on a non-working compiler.
7602
if test "$_lt_disable_FC" != yes; then
7603
# Code to be used in simple compile tests
7604
lt_simple_compile_test_code="\
7610
# Code to be used in simple link tests
7611
lt_simple_link_test_code="\
7616
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7619
# save warnings/boilerplate of simple test code
7620
_LT_COMPILER_BOILERPLATE
7621
_LT_LINKER_BOILERPLATE
7623
# Allow CC to be a program name with arguments.
7628
GCC=$ac_cv_fc_compiler_gnu
7630
_LT_TAGVAR(compiler, $1)=$CC
7631
_LT_CC_BASENAME([$compiler])
7633
if test -n "$compiler"; then
7634
AC_MSG_CHECKING([if libtool supports shared libraries])
7635
AC_MSG_RESULT([$can_build_shared])
7637
AC_MSG_CHECKING([whether to build shared libraries])
7638
test "$can_build_shared" = "no" && enable_shared=no
7640
# On AIX, shared libraries and static libraries use the same namespace, and
7641
# are all built from PIC.
7644
test "$enable_shared" = yes && enable_static=no
7645
if test -n "$RANLIB"; then
7646
archive_cmds="$archive_cmds~\$RANLIB \$lib"
7647
postinstall_cmds='$RANLIB $lib'
7651
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7652
test "$enable_shared" = yes && enable_static=no
7656
AC_MSG_RESULT([$enable_shared])
7658
AC_MSG_CHECKING([whether to build static libraries])
7659
# Make sure either enable_shared or enable_static is yes.
7660
test "$enable_shared" = yes || enable_static=yes
7661
AC_MSG_RESULT([$enable_static])
7663
_LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7664
_LT_TAGVAR(LD, $1)="$LD"
7667
## There is no encapsulation within the following macros, do not change
7668
## the running order or otherwise move them around unless you know exactly
7669
## what you are doing...
7670
_LT_SYS_HIDDEN_LIBDEPS($1)
7671
_LT_COMPILER_PIC($1)
7672
_LT_COMPILER_C_O($1)
7673
_LT_COMPILER_FILE_LOCKS($1)
7674
_LT_LINKER_SHLIBS($1)
7675
_LT_SYS_DYNAMIC_LINKER($1)
7676
_LT_LINKER_HARDCODE_LIBPATH($1)
7679
fi # test -n "$compiler"
7683
fi # test "$_lt_disable_FC" != yes
7686
])# _LT_LANG_FC_CONFIG
7689
# _LT_LANG_GCJ_CONFIG([TAG])
7690
# --------------------------
7691
# Ensure that the configuration variables for the GNU Java Compiler compiler
7692
# are suitably defined. These variables are subsequently used by _LT_CONFIG
7693
# to write the compiler configuration to `libtool'.
7694
m4_defun([_LT_LANG_GCJ_CONFIG],
7695
[AC_REQUIRE([LT_PROG_GCJ])dnl
7698
# Source file extension for Java test sources.
7701
# Object file extension for compiled Java test sources.
7703
_LT_TAGVAR(objext, $1)=$objext
7705
# Code to be used in simple compile tests
7706
lt_simple_compile_test_code="class foo {}"
7708
# Code to be used in simple link tests
7709
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7711
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7714
# save warnings/boilerplate of simple test code
7715
_LT_COMPILER_BOILERPLATE
7716
_LT_LINKER_BOILERPLATE
7718
# Allow CC to be a program name with arguments.
7724
_LT_TAGVAR(compiler, $1)=$CC
7725
_LT_TAGVAR(LD, $1)="$LD"
7726
_LT_CC_BASENAME([$compiler])
7728
# GCJ did not exist at the time GCC didn't implicitly link libc in.
7729
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7731
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7733
if test -n "$compiler"; then
7734
_LT_COMPILER_NO_RTTI($1)
7735
_LT_COMPILER_PIC($1)
7736
_LT_COMPILER_C_O($1)
7737
_LT_COMPILER_FILE_LOCKS($1)
7738
_LT_LINKER_SHLIBS($1)
7739
_LT_LINKER_HARDCODE_LIBPATH($1)
7748
])# _LT_LANG_GCJ_CONFIG
7751
# _LT_LANG_RC_CONFIG([TAG])
7752
# -------------------------
7753
# Ensure that the configuration variables for the Windows resource compiler
7754
# are suitably defined. These variables are subsequently used by _LT_CONFIG
7755
# to write the compiler configuration to `libtool'.
7756
m4_defun([_LT_LANG_RC_CONFIG],
7757
[AC_REQUIRE([LT_PROG_RC])dnl
7760
# Source file extension for RC test sources.
7763
# Object file extension for compiled RC test sources.
7765
_LT_TAGVAR(objext, $1)=$objext
7767
# Code to be used in simple compile tests
7768
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7770
# Code to be used in simple link tests
7771
lt_simple_link_test_code="$lt_simple_compile_test_code"
7773
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7776
# save warnings/boilerplate of simple test code
7777
_LT_COMPILER_BOILERPLATE
7778
_LT_LINKER_BOILERPLATE
7780
# Allow CC to be a program name with arguments.
7786
_LT_TAGVAR(compiler, $1)=$CC
7787
_LT_CC_BASENAME([$compiler])
7788
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7790
if test -n "$compiler"; then
7798
])# _LT_LANG_RC_CONFIG
7803
AC_DEFUN([LT_PROG_GCJ],
7804
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7805
[m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7806
[AC_CHECK_TOOL(GCJ, gcj,)
7807
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7808
AC_SUBST(GCJFLAGS)])])[]dnl
7812
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7813
dnl aclocal-1.4 backwards compatibility:
7814
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7819
AC_DEFUN([LT_PROG_RC],
7820
[AC_CHECK_TOOL(RC, windres,)
7824
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7825
dnl aclocal-1.4 backwards compatibility:
7826
dnl AC_DEFUN([LT_AC_PROG_RC], [])
7831
# If we don't have a new enough Autoconf to choose the best grep
7832
# available, choose the one first in the user's PATH.
7833
m4_defun([_LT_DECL_EGREP],
7834
[AC_REQUIRE([AC_PROG_EGREP])dnl
7835
AC_REQUIRE([AC_PROG_FGREP])dnl
7836
test -z "$GREP" && GREP=grep
7837
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7838
_LT_DECL([], [EGREP], [1], [An ERE matcher])
7839
_LT_DECL([], [FGREP], [1], [A literal string matcher])
7840
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7847
# If we don't have a new enough Autoconf to choose the best objdump
7848
# available, choose the one first in the user's PATH.
7849
m4_defun([_LT_DECL_OBJDUMP],
7850
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7851
test -z "$OBJDUMP" && OBJDUMP=objdump
7852
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7859
# Check for a fully-functional sed program, that truncates
7860
# as few characters as possible. Prefer GNU sed if found.
7861
m4_defun([_LT_DECL_SED],
7863
test -z "$SED" && SED=sed
7864
Xsed="$SED -e 1s/^X//"
7865
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7866
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7867
[Sed that helps us avoid accidentally triggering echo(1) options like -n])
7870
m4_ifndef([AC_PROG_SED], [
7871
# NOTE: This macro has been submitted for inclusion into #
7872
# GNU Autoconf as AC_PROG_SED. When it is available in #
7873
# a released version of Autoconf we should remove this #
7874
# macro and use it instead. #
7876
m4_defun([AC_PROG_SED],
7877
[AC_MSG_CHECKING([for a sed that does not truncate output])
7878
AC_CACHE_VAL(lt_cv_path_SED,
7879
[# Loop through the user's path and test for sed and gsed.
7880
# Then use that list of sed's as ones to test for truncation.
7881
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7885
test -z "$as_dir" && as_dir=.
7886
for lt_ac_prog in sed gsed; do
7887
for ac_exec_ext in '' $ac_executable_extensions; do
7888
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7889
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7897
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7898
# along with /bin/sed that truncates output.
7899
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7900
test ! -f $lt_ac_sed && continue
7901
cat /dev/null > conftest.in
7903
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7904
# Check for GNU sed and select it if it is found.
7905
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7906
lt_cv_path_SED=$lt_ac_sed
7910
cat conftest.in conftest.in >conftest.tmp
7911
mv conftest.tmp conftest.in
7912
cp conftest.in conftest.nl
7914
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7915
cmp -s conftest.out conftest.nl || break
7916
# 10000 chars as input seems more than enough
7917
test $lt_ac_count -gt 10 && break
7918
lt_ac_count=`expr $lt_ac_count + 1`
7919
if test $lt_ac_count -gt $lt_ac_max; then
7920
lt_ac_max=$lt_ac_count
7921
lt_cv_path_SED=$lt_ac_sed
7928
AC_MSG_RESULT([$SED])
7933
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7934
dnl aclocal-1.4 backwards compatibility:
7935
dnl AC_DEFUN([LT_AC_PROG_SED], [])
7938
# _LT_CHECK_SHELL_FEATURES
7939
# ------------------------
7940
# Find out whether the shell is Bourne or XSI compatible,
7941
# or has some other useful features.
7942
m4_defun([_LT_CHECK_SHELL_FEATURES],
7943
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7944
# Try some XSI features
7947
test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7949
&& eval 'test $(( 1 + 1 )) -eq 2 \
7950
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7952
AC_MSG_RESULT([$xsi_shell])
7953
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7955
AC_MSG_CHECKING([whether the shell understands "+="])
7957
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7959
&& lt_shell_append=yes
7960
AC_MSG_RESULT([$lt_shell_append])
7961
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7963
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7968
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7970
# test EBCDIC or ASCII
7971
case `echo X|tr X '\101'` in
7972
A) # ASCII based system
7973
# \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7974
lt_SP2NL='tr \040 \012'
7975
lt_NL2SP='tr \015\012 \040\040'
7977
*) # EBCDIC based system
7978
lt_SP2NL='tr \100 \n'
7979
lt_NL2SP='tr \r\n \100\100'
7982
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7983
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7984
])# _LT_CHECK_SHELL_FEATURES
7987
# _LT_PROG_XSI_SHELLFNS
7988
# ---------------------
7989
# Bourne and XSI compatible variants of some useful shell functions.
7990
m4_defun([_LT_PROG_XSI_SHELLFNS],
7993
cat << \_LT_EOF >> "$cfgfile"
7995
# func_dirname file append nondir_replacement
7996
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7997
# otherwise set result to NONDIR_REPLACEMENT.
8001
*/*) func_dirname_result="${1%/*}${2}" ;;
8002
* ) func_dirname_result="${3}" ;;
8006
# func_basename file
8009
func_basename_result="${1##*/}"
8012
# func_dirname_and_basename file append nondir_replacement
8013
# perform func_basename and func_dirname in a single function
8015
# dirname: Compute the dirname of FILE. If nonempty,
8016
# add APPEND to the result, otherwise set result
8017
# to NONDIR_REPLACEMENT.
8018
# value returned in "$func_dirname_result"
8019
# basename: Compute filename of FILE.
8020
# value retuned in "$func_basename_result"
8021
# Implementation must be kept synchronized with func_dirname
8022
# and func_basename. For efficiency, we do not delegate to
8023
# those functions but instead duplicate the functionality here.
8024
func_dirname_and_basename ()
8027
*/*) func_dirname_result="${1%/*}${2}" ;;
8028
* ) func_dirname_result="${3}" ;;
8030
func_basename_result="${1##*/}"
8033
# func_stripname prefix suffix name
8034
# strip PREFIX and SUFFIX off of NAME.
8035
# PREFIX and SUFFIX must not contain globbing or regex special
8036
# characters, hashes, percent signs, but SUFFIX may contain a leading
8037
# dot (in which case that matches only a dot).
8040
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8041
# positional parameters, so assign one to ordinary parameter first.
8042
func_stripname_result=${3}
8043
func_stripname_result=${func_stripname_result#"${1}"}
8044
func_stripname_result=${func_stripname_result%"${2}"}
8050
func_opt_split_opt=${1%%=*}
8051
func_opt_split_arg=${1#*=}
8058
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8059
*) func_lo2o_result=${1} ;;
8063
# func_xform libobj-or-source
8066
func_xform_result=${1%.*}.lo
8069
# func_arith arithmetic-term...
8072
func_arith_result=$(( $[*] ))
8076
# STRING may not start with a hyphen.
8079
func_len_result=${#1}
8084
*) # Bourne compatible functions.
8085
cat << \_LT_EOF >> "$cfgfile"
8087
# func_dirname file append nondir_replacement
8088
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
8089
# otherwise set result to NONDIR_REPLACEMENT.
8092
# Extract subdirectory from the argument.
8093
func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
8094
if test "X$func_dirname_result" = "X${1}"; then
8095
func_dirname_result="${3}"
8097
func_dirname_result="$func_dirname_result${2}"
8101
# func_basename file
8104
func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
8107
dnl func_dirname_and_basename
8108
dnl A portable version of this function is already defined in general.m4sh
8109
dnl so there is no need for it here.
8111
# func_stripname prefix suffix name
8112
# strip PREFIX and SUFFIX off of NAME.
8113
# PREFIX and SUFFIX must not contain globbing or regex special
8114
# characters, hashes, percent signs, but SUFFIX may contain a leading
8115
# dot (in which case that matches only a dot).
8116
# func_strip_suffix prefix name
8120
.*) func_stripname_result=`$ECHO "X${3}" \
8121
| $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
8122
*) func_stripname_result=`$ECHO "X${3}" \
8123
| $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
8128
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8129
my_sed_long_arg='1s/^-[[^=]]*=//'
8134
func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
8135
func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
8141
func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
8144
# func_xform libobj-or-source
8147
func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
8150
# func_arith arithmetic-term...
8153
func_arith_result=`expr "$[@]"`
8157
# STRING may not start with a hyphen.
8160
func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8166
case $lt_shell_append in
8168
cat << \_LT_EOF >> "$cfgfile"
8170
# func_append var value
8171
# Append VALUE to the end of shell variable VAR.
8179
cat << \_LT_EOF >> "$cfgfile"
8181
# func_append var value
8182
# Append VALUE to the end of shell variable VAR.
8185
eval "$[1]=\$$[1]\$[2]"
8193
# Helper functions for option handling. -*- Autoconf -*-
8195
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8196
# Written by Gary V. Vaughan, 2004
8198
# This file is free software; the Free Software Foundation gives
8199
# unlimited permission to copy and/or distribute it, with or without
8200
# modifications, as long as this notice is preserved.
8202
# serial 6 ltoptions.m4
8204
# This is to help aclocal find these macros, as it can't see m4_define.
8205
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8208
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8209
# ------------------------------------------
8210
m4_define([_LT_MANGLE_OPTION],
8211
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8214
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8215
# ---------------------------------------
8216
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8217
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
8219
m4_define([_LT_SET_OPTION],
8220
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8221
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8222
_LT_MANGLE_DEFUN([$1], [$2]),
8223
[m4_warning([Unknown $1 option `$2'])])[]dnl
8227
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8228
# ------------------------------------------------------------
8229
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8230
m4_define([_LT_IF_OPTION],
8231
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8234
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8235
# -------------------------------------------------------
8236
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8238
m4_define([_LT_UNLESS_OPTIONS],
8239
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8240
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8241
[m4_define([$0_found])])])[]dnl
8242
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8247
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8248
# ----------------------------------------
8249
# OPTION-LIST is a space-separated list of Libtool options associated
8250
# with MACRO-NAME. If any OPTION has a matching handler declared with
8251
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8252
# the unknown option and exit.
8253
m4_defun([_LT_SET_OPTIONS],
8255
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8256
[_LT_SET_OPTION([$1], _LT_Option)])
8258
m4_if([$1],[LT_INIT],[
8260
dnl Simply set some default values (i.e off) if boolean options were not
8262
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8264
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8267
dnl If no reference was made to various pairs of opposing options, then
8268
dnl we run the default mode handler for the pair. For example, if neither
8269
dnl `shared' nor `disable-shared' was passed, we enable building of shared
8270
dnl archives by default:
8271
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8272
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8273
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8274
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8275
[_LT_ENABLE_FAST_INSTALL])
8281
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8282
# -----------------------------------------
8283
m4_define([_LT_MANGLE_DEFUN],
8284
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8287
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8288
# -----------------------------------------------
8289
m4_define([LT_OPTION_DEFINE],
8290
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8291
])# LT_OPTION_DEFINE
8296
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8299
AU_DEFUN([AC_LIBTOOL_DLOPEN],
8300
[_LT_SET_OPTION([LT_INIT], [dlopen])
8301
AC_DIAGNOSE([obsolete],
8302
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8303
put the `dlopen' option into LT_INIT's first parameter.])
8306
dnl aclocal-1.4 backwards compatibility:
8307
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8312
# Declare package support for building win32 dll's.
8313
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8314
[enable_win32_dll=yes
8317
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
8318
AC_CHECK_TOOL(AS, as, false)
8319
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8320
AC_CHECK_TOOL(OBJDUMP, objdump, false)
8324
test -z "$AS" && AS=as
8325
_LT_DECL([], [AS], [0], [Assembler program])dnl
8327
test -z "$DLLTOOL" && DLLTOOL=dlltool
8328
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
8330
test -z "$OBJDUMP" && OBJDUMP=objdump
8331
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
8334
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8335
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8336
_LT_SET_OPTION([LT_INIT], [win32-dll])
8337
AC_DIAGNOSE([obsolete],
8338
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8339
put the `win32-dll' option into LT_INIT's first parameter.])
8342
dnl aclocal-1.4 backwards compatibility:
8343
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8346
# _LT_ENABLE_SHARED([DEFAULT])
8347
# ----------------------------
8348
# implement the --enable-shared flag, and supports the `shared' and
8349
# `disable-shared' LT_INIT options.
8350
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8351
m4_define([_LT_ENABLE_SHARED],
8352
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8353
AC_ARG_ENABLE([shared],
8354
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8355
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8356
[p=${PACKAGE-default}
8358
yes) enable_shared=yes ;;
8359
no) enable_shared=no ;;
8362
# Look at the argument we got. We use all the common list separators.
8363
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8364
for pkg in $enableval; do
8366
if test "X$pkg" = "X$p"; then
8373
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8375
_LT_DECL([build_libtool_libs], [enable_shared], [0],
8376
[Whether or not to build shared libraries])
8377
])# _LT_ENABLE_SHARED
8379
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8380
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8383
AC_DEFUN([AC_ENABLE_SHARED],
8384
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8387
AC_DEFUN([AC_DISABLE_SHARED],
8388
[_LT_SET_OPTION([LT_INIT], [disable-shared])
8391
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8392
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8394
dnl aclocal-1.4 backwards compatibility:
8395
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8396
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8400
# _LT_ENABLE_STATIC([DEFAULT])
8401
# ----------------------------
8402
# implement the --enable-static flag, and support the `static' and
8403
# `disable-static' LT_INIT options.
8404
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8405
m4_define([_LT_ENABLE_STATIC],
8406
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8407
AC_ARG_ENABLE([static],
8408
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8409
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8410
[p=${PACKAGE-default}
8412
yes) enable_static=yes ;;
8413
no) enable_static=no ;;
8416
# Look at the argument we got. We use all the common list separators.
8417
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8418
for pkg in $enableval; do
8420
if test "X$pkg" = "X$p"; then
8427
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8429
_LT_DECL([build_old_libs], [enable_static], [0],
8430
[Whether or not to build static libraries])
8431
])# _LT_ENABLE_STATIC
8433
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8434
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8437
AC_DEFUN([AC_ENABLE_STATIC],
8438
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8441
AC_DEFUN([AC_DISABLE_STATIC],
8442
[_LT_SET_OPTION([LT_INIT], [disable-static])
8445
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8446
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8448
dnl aclocal-1.4 backwards compatibility:
8449
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8450
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8454
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
8455
# ----------------------------------
8456
# implement the --enable-fast-install flag, and support the `fast-install'
8457
# and `disable-fast-install' LT_INIT options.
8458
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8459
m4_define([_LT_ENABLE_FAST_INSTALL],
8460
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8461
AC_ARG_ENABLE([fast-install],
8462
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8463
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8464
[p=${PACKAGE-default}
8466
yes) enable_fast_install=yes ;;
8467
no) enable_fast_install=no ;;
8469
enable_fast_install=no
8470
# Look at the argument we got. We use all the common list separators.
8471
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8472
for pkg in $enableval; do
8474
if test "X$pkg" = "X$p"; then
8475
enable_fast_install=yes
8481
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8483
_LT_DECL([fast_install], [enable_fast_install], [0],
8484
[Whether or not to optimize for fast installation])dnl
8485
])# _LT_ENABLE_FAST_INSTALL
8487
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8488
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8491
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8492
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8493
AC_DIAGNOSE([obsolete],
8494
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8495
the `fast-install' option into LT_INIT's first parameter.])
8498
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8499
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8500
AC_DIAGNOSE([obsolete],
8501
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8502
the `disable-fast-install' option into LT_INIT's first parameter.])
8505
dnl aclocal-1.4 backwards compatibility:
8506
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8507
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8510
# _LT_WITH_PIC([MODE])
8511
# --------------------
8512
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
8514
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
8515
m4_define([_LT_WITH_PIC],
8517
[AS_HELP_STRING([--with-pic],
8518
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8519
[pic_mode="$withval"],
8522
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
8524
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8527
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8528
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8531
AU_DEFUN([AC_LIBTOOL_PICMODE],
8532
[_LT_SET_OPTION([LT_INIT], [pic-only])
8533
AC_DIAGNOSE([obsolete],
8534
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8535
put the `pic-only' option into LT_INIT's first parameter.])
8538
dnl aclocal-1.4 backwards compatibility:
8539
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8542
m4_define([_LTDL_MODE], [])
8543
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8544
[m4_define([_LTDL_MODE], [nonrecursive])])
8545
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8546
[m4_define([_LTDL_MODE], [recursive])])
8547
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8548
[m4_define([_LTDL_MODE], [subproject])])
8550
m4_define([_LTDL_TYPE], [])
8551
LT_OPTION_DEFINE([LTDL_INIT], [installable],
8552
[m4_define([_LTDL_TYPE], [installable])])
8553
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8554
[m4_define([_LTDL_TYPE], [convenience])])
8556
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
8558
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8559
# Written by Gary V. Vaughan, 2004
8561
# This file is free software; the Free Software Foundation gives
8562
# unlimited permission to copy and/or distribute it, with or without
8563
# modifications, as long as this notice is preserved.
8565
# serial 6 ltsugar.m4
8567
# This is to help aclocal find these macros, as it can't see m4_define.
8568
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8571
# lt_join(SEP, ARG1, [ARG2...])
8572
# -----------------------------
8573
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8574
# associated separator.
8575
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8576
# versions in m4sugar had bugs.
8577
m4_define([lt_join],
8578
[m4_if([$#], [1], [],
8580
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8581
m4_define([_lt_join],
8582
[m4_if([$#$2], [2], [],
8583
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8589
# Manipulate m4 lists.
8590
# These macros are necessary as long as will still need to support
8591
# Autoconf-2.59 which quotes differently.
8592
m4_define([lt_car], [[$1]])
8594
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8596
[m4_dquote(m4_shift($@))])])
8597
m4_define([lt_unquote], $1)
8600
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
8601
# ------------------------------------------
8602
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
8603
# Note that neither SEPARATOR nor STRING are expanded; they are appended
8604
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8605
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
8606
# than defined and empty).
8608
# This macro is needed until we can rely on Autoconf 2.62, since earlier
8609
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8610
m4_define([lt_append],
8612
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8616
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8617
# ----------------------------------------------------------
8618
# Produce a SEP delimited list of all paired combinations of elements of
8619
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
8620
# has the form PREFIXmINFIXSUFFIXn.
8621
# Needed until we can rely on m4_combine added in Autoconf 2.62.
8622
m4_define([lt_combine],
8623
[m4_if(m4_eval([$# > 3]), [1],
8624
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8625
[[m4_foreach([_Lt_prefix], [$2],
8626
[m4_foreach([_Lt_suffix],
8627
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8628
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8631
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8632
# -----------------------------------------------------------------------
8633
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8634
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8635
m4_define([lt_if_append_uniq],
8637
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8638
[lt_append([$1], [$2], [$3])$4],
8640
[lt_append([$1], [$2], [$3])$4])])
8643
# lt_dict_add(DICT, KEY, VALUE)
8644
# -----------------------------
8645
m4_define([lt_dict_add],
8646
[m4_define([$1($2)], [$3])])
8649
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8650
# --------------------------------------------
8651
m4_define([lt_dict_add_subkey],
8652
[m4_define([$1($2:$3)], [$4])])
8655
# lt_dict_fetch(DICT, KEY, [SUBKEY])
8656
# ----------------------------------
8657
m4_define([lt_dict_fetch],
8659
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8660
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8663
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8664
# -----------------------------------------------------------------
8665
m4_define([lt_if_dict_fetch],
8666
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8671
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8672
# --------------------------------------------------------------
8673
m4_define([lt_dict_filter],
8674
[m4_if([$5], [], [],
8675
[lt_join(m4_quote(m4_default([$4], [[, ]])),
8676
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8677
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8680
# ltversion.m4 -- version numbers -*- Autoconf -*-
8682
# Copyright (C) 2004 Free Software Foundation, Inc.
8683
# Written by Scott James Remnant, 2004
8685
# This file is free software; the Free Software Foundation gives
8686
# unlimited permission to copy and/or distribute it, with or without
8687
# modifications, as long as this notice is preserved.
8689
# Generated from ltversion.in.
8691
# serial 3017 ltversion.m4
8692
# This file is part of GNU Libtool
8694
m4_define([LT_PACKAGE_VERSION], [2.2.6b])
8695
m4_define([LT_PACKAGE_REVISION], [1.3017])
8697
AC_DEFUN([LTVERSION_VERSION],
8698
[macro_version='2.2.6b'
8699
macro_revision='1.3017'
8700
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8701
_LT_DECL(, macro_revision, 0)
8704
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
8706
# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
8707
# Written by Scott James Remnant, 2004.
8709
# This file is free software; the Free Software Foundation gives
8710
# unlimited permission to copy and/or distribute it, with or without
8711
# modifications, as long as this notice is preserved.
8713
# serial 4 lt~obsolete.m4
8715
# These exist entirely to fool aclocal when bootstrapping libtool.
8717
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
8718
# which have later been changed to m4_define as they aren't part of the
8719
# exported API, or moved to Autoconf or Automake where they belong.
8721
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
8722
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8723
# using a macro with the same name in our local m4/libtool.m4 it'll
8724
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8725
# and doesn't know about Autoconf macros at all.)
8727
# So we provide this file, which has a silly filename so it's always
8728
# included after everything else. This provides aclocal with the
8729
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8730
# because those macros already exist, or will be overwritten later.
8731
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
8733
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8734
# Yes, that means every name once taken will need to remain here until
8735
# we give up compatibility with versions before 1.7, at which point
8736
# we need to keep only those names which we still refer to.
8738
# This is to help aclocal find these macros, as it can't see m4_define.
8739
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
8741
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
8742
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
8743
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
8744
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
8745
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
8746
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
8747
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
8748
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
8749
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
8750
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
8751
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
8752
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
8753
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
8754
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
8755
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
8756
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
8757
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
8758
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
8759
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
8760
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
8761
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
8762
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
8763
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
8764
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
8765
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
8766
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
8767
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
8768
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
8769
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
8770
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
8771
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
8772
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
8773
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
8774
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
8775
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
8776
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
8777
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
8778
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
8779
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
8780
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
8781
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
8782
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
8783
m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
8784
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
8785
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
8786
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
8787
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
8788
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
8789
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
8790
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
8791
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
8792
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
8793
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
8794
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
8795
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
8797
# nls.m4 serial 3 (gettext-0.15)
8798
dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
8799
dnl This file is free software; the Free Software Foundation
8800
dnl gives unlimited permission to copy and/or distribute it,
8801
dnl with or without modifications, as long as this notice is preserved.
8803
dnl This file can can be used in projects which are not available under
8804
dnl the GNU General Public License or the GNU Library General Public
8805
dnl License but which still want to provide support for the GNU gettext
8807
dnl Please note that the actual code of the GNU gettext library is covered
8808
dnl by the GNU Library General Public License, and the rest of the GNU
8809
dnl gettext package package is covered by the GNU General Public License.
8810
dnl They are *not* in the public domain.
8813
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
8814
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
8820
AC_MSG_CHECKING([whether NLS is requested])
8821
dnl Default is enabled NLS
8823
[ --disable-nls do not use Native Language Support],
8824
USE_NLS=$enableval, USE_NLS=yes)
8825
AC_MSG_RESULT($USE_NLS)
8829
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
8831
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
8833
# This program is free software; you can redistribute it and/or modify
8834
# it under the terms of the GNU General Public License as published by
8835
# the Free Software Foundation; either version 2 of the License, or
8836
# (at your option) any later version.
8838
# This program is distributed in the hope that it will be useful, but
8839
# WITHOUT ANY WARRANTY; without even the implied warranty of
8840
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8841
# General Public License for more details.
8843
# You should have received a copy of the GNU General Public License
8844
# along with this program; if not, write to the Free Software
8845
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8847
# As a special exception to the GNU General Public License, if you
8848
# distribute this file as part of a program that contains a
8849
# configuration script generated by Autoconf, you may include it under
8850
# the same distribution terms that you use for the rest of that program.
8852
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
8853
# ----------------------------------
8854
AC_DEFUN([PKG_PROG_PKG_CONFIG],
8855
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8856
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8857
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8858
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8859
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8861
if test -n "$PKG_CONFIG"; then
8862
_pkg_min_version=m4_default([$1], [0.9.0])
8863
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8864
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8865
AC_MSG_RESULT([yes])
8872
])# PKG_PROG_PKG_CONFIG
8874
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8876
# Check to see whether a particular set of modules exists. Similar
8877
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8880
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8881
# this or PKG_CHECK_MODULES is called, or make sure to call
8882
# PKG_CHECK_EXISTS manually
8883
# --------------------------------------------------------------
8884
AC_DEFUN([PKG_CHECK_EXISTS],
8885
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8886
if test -n "$PKG_CONFIG" && \
8887
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8888
m4_ifval([$2], [$2], [:])
8889
m4_ifvaln([$3], [else
8894
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8895
# ---------------------------------------------
8896
m4_define([_PKG_CONFIG],
8897
[if test -n "$$1"; then
8899
elif test -n "$PKG_CONFIG"; then
8900
PKG_CHECK_EXISTS([$3],
8901
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8908
# _PKG_SHORT_ERRORS_SUPPORTED
8909
# -----------------------------
8910
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8911
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8912
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8913
_pkg_short_errors_supported=yes
8915
_pkg_short_errors_supported=no
8917
])# _PKG_SHORT_ERRORS_SUPPORTED
8920
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8921
# [ACTION-IF-NOT-FOUND])
8924
# Note that if there is a possibility the first call to
8925
# PKG_CHECK_MODULES might not happen, you should be sure to include an
8926
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8929
# --------------------------------------------------------------
8930
AC_DEFUN([PKG_CHECK_MODULES],
8931
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8932
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8933
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8936
AC_MSG_CHECKING([for $1])
8938
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8939
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8941
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8942
and $1[]_LIBS to avoid the need to call pkg-config.
8943
See the pkg-config man page for more details.])
8945
if test $pkg_failed = yes; then
8946
_PKG_SHORT_ERRORS_SUPPORTED
8947
if test $_pkg_short_errors_supported = yes; then
8948
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
8950
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
8952
# Put the nasty error message in config.log where it belongs
8953
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8955
ifelse([$4], , [AC_MSG_ERROR(dnl
8956
[Package requirements ($2) were not met:
8960
Consider adjusting the PKG_CONFIG_PATH environment variable if you
8961
installed software in a non-standard prefix.
8965
[AC_MSG_RESULT([no])
8967
elif test $pkg_failed = untried; then
8968
ifelse([$4], , [AC_MSG_FAILURE(dnl
8969
[The pkg-config script could not be found or is too old. Make sure it
8970
is in your PATH or set the PKG_CONFIG environment variable to the full
8975
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8978
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8979
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8980
AC_MSG_RESULT([yes])
8981
ifelse([$3], , :, [$3])
8983
])# PKG_CHECK_MODULES
8985
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
8987
# This file is free software; the Free Software Foundation
8988
# gives unlimited permission to copy and/or distribute it,
8989
# with or without modifications, as long as this notice is preserved.
8991
# AM_AUTOMAKE_VERSION(VERSION)
8992
# ----------------------------
8993
# Automake X.Y traces this macro to ensure aclocal.m4 has been
8994
# generated from the m4 files accompanying Automake X.Y.
8995
# (This private macro should not be called outside this file.)
8996
AC_DEFUN([AM_AUTOMAKE_VERSION],
8997
[am__api_version='1.11'
8998
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8999
dnl require some minimum version. Point them to the right macro.
9000
m4_if([$1], [1.11.1], [],
9001
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9004
# _AM_AUTOCONF_VERSION(VERSION)
9005
# -----------------------------
9006
# aclocal traces this macro to find the Autoconf version.
9007
# This is a private macro too. Using m4_define simplifies
9008
# the logic in aclocal, which can simply ignore this definition.
9009
m4_define([_AM_AUTOCONF_VERSION], [])
9011
# AM_SET_CURRENT_AUTOMAKE_VERSION
9012
# -------------------------------
9013
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9014
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9015
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9016
[AM_AUTOMAKE_VERSION([1.11.1])dnl
9017
m4_ifndef([AC_AUTOCONF_VERSION],
9018
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9019
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9021
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
9023
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
9025
# This file is free software; the Free Software Foundation
9026
# gives unlimited permission to copy and/or distribute it,
9027
# with or without modifications, as long as this notice is preserved.
9029
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9030
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
9031
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
9033
# Of course, Automake must honor this variable whenever it calls a
9034
# tool from the auxiliary directory. The problem is that $srcdir (and
9035
# therefore $ac_aux_dir as well) can be either absolute or relative,
9036
# depending on how configure is run. This is pretty annoying, since
9037
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
9038
# source directory, any form will work fine, but in subdirectories a
9039
# relative path needs to be adjusted first.
9041
# $ac_aux_dir/missing
9042
# fails when called from a subdirectory if $ac_aux_dir is relative
9043
# $top_srcdir/$ac_aux_dir/missing
9044
# fails if $ac_aux_dir is absolute,
9045
# fails when called from a subdirectory in a VPATH build with
9046
# a relative $ac_aux_dir
9048
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9049
# are both prefixed by $srcdir. In an in-source build this is usually
9050
# harmless because $srcdir is `.', but things will broke when you
9051
# start a VPATH build or use an absolute $srcdir.
9053
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9054
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
9055
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9056
# and then we would define $MISSING as
9057
# MISSING="\${SHELL} $am_aux_dir/missing"
9058
# This will work as long as MISSING is not called from configure, because
9059
# unfortunately $(top_srcdir) has no meaning in configure.
9060
# However there are other variables, like CC, which are often used in
9061
# configure, and could therefore not use this "fixed" $ac_aux_dir.
9063
# Another solution, used here, is to always expand $ac_aux_dir to an
9064
# absolute PATH. The drawback is that using absolute paths prevent a
9065
# configured tree to be moved without reconfiguration.
9067
AC_DEFUN([AM_AUX_DIR_EXPAND],
9068
[dnl Rely on autoconf to set up CDPATH properly.
9069
AC_PREREQ([2.50])dnl
9070
# expand $ac_aux_dir to an absolute path
9071
am_aux_dir=`cd $ac_aux_dir && pwd`
9074
# AM_CONDITIONAL -*- Autoconf -*-
9076
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
9077
# Free Software Foundation, Inc.
9079
# This file is free software; the Free Software Foundation
9080
# gives unlimited permission to copy and/or distribute it,
9081
# with or without modifications, as long as this notice is preserved.
9085
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
9086
# -------------------------------------
9087
# Define a conditional.
9088
AC_DEFUN([AM_CONDITIONAL],
9090
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
9091
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9092
AC_SUBST([$1_TRUE])dnl
9093
AC_SUBST([$1_FALSE])dnl
9094
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
9095
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
9096
m4_define([_AM_COND_VALUE_$1], [$2])dnl
9104
AC_CONFIG_COMMANDS_PRE(
9105
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9106
AC_MSG_ERROR([[conditional "$1" was never defined.
9107
Usually this means the macro was only invoked conditionally.]])
9110
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
9111
# Free Software Foundation, Inc.
9113
# This file is free software; the Free Software Foundation
9114
# gives unlimited permission to copy and/or distribute it,
9115
# with or without modifications, as long as this notice is preserved.
9119
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9120
# written in clear, in which case automake, when reading aclocal.m4,
9121
# will think it sees a *use*, and therefore will trigger all it's
9122
# C support machinery. Also note that it means that autoscan, seeing
9123
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9126
# _AM_DEPENDENCIES(NAME)
9127
# ----------------------
9128
# See how the compiler implements dependency checking.
9129
# NAME is "CC", "CXX", "GCJ", or "OBJC".
9130
# We try a few techniques and use that to set a single cache variable.
9132
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9133
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9134
# dependency, and given that the user is not expected to run this macro,
9135
# just rely on AC_PROG_CC.
9136
AC_DEFUN([_AM_DEPENDENCIES],
9137
[AC_REQUIRE([AM_SET_DEPDIR])dnl
9138
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9139
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9140
AC_REQUIRE([AM_DEP_TRACK])dnl
9142
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
9143
[$1], CXX, [depcc="$CXX" am_compiler_list=],
9144
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9145
[$1], UPC, [depcc="$UPC" am_compiler_list=],
9146
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
9147
[depcc="$$1" am_compiler_list=])
9149
AC_CACHE_CHECK([dependency style of $depcc],
9150
[am_cv_$1_dependencies_compiler_type],
9151
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9152
# We make a subdir and do the tests there. Otherwise we can end up
9153
# making bogus files that we don't know about and never remove. For
9154
# instance it was reported that on HP-UX the gcc test will end up
9155
# making a dummy file named `D' -- because `-MD' means `put the output
9158
# Copy depcomp to subdir because otherwise we won't find it if we're
9159
# using a relative directory.
9160
cp "$am_depcomp" conftest.dir
9162
# We will build objects and dependencies in a subdirectory because
9163
# it helps to detect inapplicable dependency modes. For instance
9164
# both Tru64's cc and ICC support -MD to output dependencies as a
9165
# side effect of compilation, but ICC will put the dependencies in
9166
# the current directory while Tru64 will put them in the object
9170
am_cv_$1_dependencies_compiler_type=none
9171
if test "$am_compiler_list" = ""; then
9172
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9176
[case " $depcc " in #(
9177
*\ -arch\ *\ -arch\ *) am__universal=true ;;
9180
[case " $depcc " in #(
9181
*\ -arch\ *\ -arch\ *) am__universal=true ;;
9184
for depmode in $am_compiler_list; do
9185
# Setup a source with many dependencies, because some compilers
9186
# like to wrap large dependency lists on column 80 (with \), and
9187
# we should not choose a depcomp mode which is confused by this.
9189
# We need to recreate these files for each test, as the compiler may
9190
# overwrite some of them when testing with obscure command lines.
9191
# This happens at least with the AIX C compiler.
9193
for i in 1 2 3 4 5 6; do
9194
echo '#include "conftst'$i'.h"' >> sub/conftest.c
9195
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9196
# Solaris 8's {/usr,}/bin/sh.
9197
touch sub/conftst$i.h
9199
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9201
# We check with `-c' and `-o' for the sake of the "dashmstdout"
9202
# mode. It turns out that the SunPro C++ compiler does not properly
9203
# handle `-M -o', and we need to detect this. Also, some Intel
9204
# versions had trouble with output in subdirs
9205
am__obj=sub/conftest.${OBJEXT-o}
9206
am__minus_obj="-o $am__obj"
9209
# This depmode causes a compiler race in universal mode.
9210
test "$am__universal" = false || continue
9213
# after this tag, mechanisms are not by side-effect, so they'll
9214
# only be used when explicitly requested
9215
if test "x$enable_dependency_tracking" = xyes; then
9221
msvisualcpp | msvcmsys)
9222
# This compiler won't grok `-c -o', but also, the minuso test has
9223
# not run yet. These depmodes are late enough in the game, and
9224
# so weak that their functioning should not be impacted.
9225
am__obj=conftest.${OBJEXT-o}
9230
if depmode=$depmode \
9231
source=sub/conftest.c object=$am__obj \
9232
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9233
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9234
>/dev/null 2>conftest.err &&
9235
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9236
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9237
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9238
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9239
# icc doesn't choke on unknown options, it will just issue warnings
9240
# or remarks (even with -Werror). So we grep stderr for any message
9241
# that says an option was ignored or not supported.
9242
# When given -MP, icc 7.0 and 7.1 complain thusly:
9243
# icc: Command line warning: ignoring option '-M'; no argument required
9244
# The diagnosis changed in icc 8.0:
9245
# icc: Command line remark: option '-MP' not supported
9246
if (grep 'ignoring option' conftest.err ||
9247
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9248
am_cv_$1_dependencies_compiler_type=$depmode
9257
am_cv_$1_dependencies_compiler_type=none
9260
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9261
AM_CONDITIONAL([am__fastdep$1], [
9262
test "x$enable_dependency_tracking" != xno \
9263
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9269
# Choose a directory name for dependency files.
9270
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
9271
AC_DEFUN([AM_SET_DEPDIR],
9272
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9273
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9279
AC_DEFUN([AM_DEP_TRACK],
9280
[AC_ARG_ENABLE(dependency-tracking,
9281
[ --disable-dependency-tracking speeds up one-time build
9282
--enable-dependency-tracking do not reject slow dependency extractors])
9283
if test "x$enable_dependency_tracking" != xno; then
9284
am_depcomp="$ac_aux_dir/depcomp"
9287
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9288
AC_SUBST([AMDEPBACKSLASH])dnl
9289
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9292
# Generate code to set up dependency tracking. -*- Autoconf -*-
9294
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9295
# Free Software Foundation, Inc.
9297
# This file is free software; the Free Software Foundation
9298
# gives unlimited permission to copy and/or distribute it,
9299
# with or without modifications, as long as this notice is preserved.
9303
# _AM_OUTPUT_DEPENDENCY_COMMANDS
9304
# ------------------------------
9305
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9307
# Autoconf 2.62 quotes --file arguments for eval, but not when files
9308
# are listed without --file. Let's play safe and only enable the eval
9309
# if we detect the quoting.
9310
case $CONFIG_FILES in
9311
*\'*) eval set x "$CONFIG_FILES" ;;
9312
*) set x $CONFIG_FILES ;;
9317
# Strip MF so we end up with the name of the file.
9318
mf=`echo "$mf" | sed -e 's/:.*$//'`
9319
# Check whether this is an Automake generated Makefile or not.
9320
# We used to match only the files named `Makefile.in', but
9321
# some people rename them; so instead we look at the file content.
9322
# Grep'ing the first line is not enough: some people post-process
9323
# each Makefile.in and add a new line on top of each file to say so.
9324
# Grep'ing the whole file is not good either: AIX grep has a line
9325
# limit of 2048, but all sed's we know have understand at least 4000.
9326
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9327
dirpart=`AS_DIRNAME("$mf")`
9331
# Extract the definition of DEPDIR, am__include, and am__quote
9332
# from the Makefile without running `make'.
9333
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9334
test -z "$DEPDIR" && continue
9335
am__include=`sed -n 's/^am__include = //p' < "$mf"`
9336
test -z "am__include" && continue
9337
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9338
# When using ansi2knr, U may be empty or an underscore; expand it
9339
U=`sed -n 's/^U = //p' < "$mf"`
9340
# Find all dependency output files, they are included files with
9341
# $(DEPDIR) in their names. We invoke sed twice because it is the
9342
# simplest approach to changing $(DEPDIR) to its actual value in the
9344
for file in `sed -n "
9345
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9346
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9347
# Make sure the directory exists.
9348
test -f "$dirpart/$file" && continue
9349
fdir=`AS_DIRNAME(["$file"])`
9350
AS_MKDIR_P([$dirpart/$fdir])
9351
# echo "creating $dirpart/$file"
9352
echo '# dummy' > "$dirpart/$file"
9356
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9359
# AM_OUTPUT_DEPENDENCY_COMMANDS
9360
# -----------------------------
9361
# This macro should only be invoked once -- use via AC_REQUIRE.
9363
# This code is only required when automatic dependency tracking
9364
# is enabled. FIXME. This creates each `.P' file that we will
9365
# need in order to bootstrap the dependency handling code.
9366
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9367
[AC_CONFIG_COMMANDS([depfiles],
9368
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9369
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9372
# Do all the work for Automake. -*- Autoconf -*-
9374
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9375
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
9377
# This file is free software; the Free Software Foundation
9378
# gives unlimited permission to copy and/or distribute it,
9379
# with or without modifications, as long as this notice is preserved.
9383
# This macro actually does too much. Some checks are only needed if
9384
# your package does certain things. But this isn't really a big deal.
9386
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9387
# AM_INIT_AUTOMAKE([OPTIONS])
9388
# -----------------------------------------------
9389
# The call with PACKAGE and VERSION arguments is the old style
9390
# call (pre autoconf-2.50), which is being phased out. PACKAGE
9391
# and VERSION should now be passed to AC_INIT and removed from
9392
# the call to AM_INIT_AUTOMAKE.
9393
# We support both call styles for the transition. After
9394
# the next Automake release, Autoconf can make the AC_INIT
9395
# arguments mandatory, and then we can depend on a new Autoconf
9396
# release and drop the old call support.
9397
AC_DEFUN([AM_INIT_AUTOMAKE],
9398
[AC_PREREQ([2.62])dnl
9399
dnl Autoconf wants to disallow AM_ names. We explicitly allow
9400
dnl the ones we care about.
9401
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9402
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9403
AC_REQUIRE([AC_PROG_INSTALL])dnl
9404
if test "`cd $srcdir && pwd`" != "`pwd`"; then
9405
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9406
# is not polluted with repeated "-I."
9407
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9408
# test to see if srcdir already configured
9409
if test -f $srcdir/config.status; then
9410
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9414
# test whether we have cygpath
9415
if test -z "$CYGPATH_W"; then
9416
if (cygpath --version) >/dev/null 2>/dev/null; then
9417
CYGPATH_W='cygpath -w'
9422
AC_SUBST([CYGPATH_W])
9424
# Define the identity of the package.
9425
dnl Distinguish between old-style and new-style calls.
9427
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9428
AC_SUBST([PACKAGE], [$1])dnl
9429
AC_SUBST([VERSION], [$2])],
9430
[_AM_SET_OPTIONS([$1])dnl
9431
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9432
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9433
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9434
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9435
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9437
_AM_IF_OPTION([no-define],,
9438
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9439
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9441
# Some tools Automake needs.
9442
AC_REQUIRE([AM_SANITY_CHECK])dnl
9443
AC_REQUIRE([AC_ARG_PROGRAM])dnl
9444
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9445
AM_MISSING_PROG(AUTOCONF, autoconf)
9446
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9447
AM_MISSING_PROG(AUTOHEADER, autoheader)
9448
AM_MISSING_PROG(MAKEINFO, makeinfo)
9449
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9450
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9451
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9452
# We need awk for the "check" target. The system "awk" is bad on
9454
AC_REQUIRE([AC_PROG_AWK])dnl
9455
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9456
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9457
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9458
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9459
[_AM_PROG_TAR([v7])])])
9460
_AM_IF_OPTION([no-dependencies],,
9461
[AC_PROVIDE_IFELSE([AC_PROG_CC],
9462
[_AM_DEPENDENCIES(CC)],
9463
[define([AC_PROG_CC],
9464
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9465
AC_PROVIDE_IFELSE([AC_PROG_CXX],
9466
[_AM_DEPENDENCIES(CXX)],
9467
[define([AC_PROG_CXX],
9468
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9469
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9470
[_AM_DEPENDENCIES(OBJC)],
9471
[define([AC_PROG_OBJC],
9472
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9474
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
9475
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
9476
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
9477
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
9478
AC_CONFIG_COMMANDS_PRE(dnl
9479
[m4_provide_if([_AM_COMPILER_EXEEXT],
9480
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9483
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
9484
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
9485
dnl mangled by Autoconf and run in a shell conditional statement.
9486
m4_define([_AC_COMPILER_EXEEXT],
9487
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
9490
# When config.status generates a header, we must update the stamp-h file.
9491
# This file resides in the same directory as the config header
9492
# that is generated. The stamp files are numbered to have different names.
9494
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9495
# loop where config.status creates the headers, so we can generate
9496
# our stamp files there.
9497
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9498
[# Compute $1's index in $config_headers.
9501
for _am_header in $config_headers :; do
9503
$_am_arg | $_am_arg:* )
9506
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
9509
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9511
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
9513
# This file is free software; the Free Software Foundation
9514
# gives unlimited permission to copy and/or distribute it,
9515
# with or without modifications, as long as this notice is preserved.
9517
# AM_PROG_INSTALL_SH
9518
# ------------------
9519
# Define $install_sh.
9520
AC_DEFUN([AM_PROG_INSTALL_SH],
9521
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9522
if test x"${install_sh}" != xset; then
9525
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
9527
install_sh="\${SHELL} $am_aux_dir/install-sh"
9530
AC_SUBST(install_sh)])
9532
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
9534
# This file is free software; the Free Software Foundation
9535
# gives unlimited permission to copy and/or distribute it,
9536
# with or without modifications, as long as this notice is preserved.
9540
# Check whether the underlying file-system supports filenames
9541
# with a leading dot. For instance MS-DOS doesn't.
9542
AC_DEFUN([AM_SET_LEADING_DOT],
9543
[rm -rf .tst 2>/dev/null
9544
mkdir .tst 2>/dev/null
9545
if test -d .tst; then
9550
rmdir .tst 2>/dev/null
9551
AC_SUBST([am__leading_dot])])
9553
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
9556
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9557
# Free Software Foundation, Inc.
9559
# This file is free software; the Free Software Foundation
9560
# gives unlimited permission to copy and/or distribute it,
9561
# with or without modifications, as long as this notice is preserved.
9565
# AM_MAINTAINER_MODE([DEFAULT-MODE])
9566
# ----------------------------------
9567
# Control maintainer-specific portions of Makefiles.
9568
# Default is to disable them, unless `enable' is passed literally.
9569
# For symmetry, `disable' may be passed as well. Anyway, the user
9570
# can override the default with the --enable/--disable switch.
9571
AC_DEFUN([AM_MAINTAINER_MODE],
9572
[m4_case(m4_default([$1], [disable]),
9573
[enable], [m4_define([am_maintainer_other], [disable])],
9574
[disable], [m4_define([am_maintainer_other], [enable])],
9575
[m4_define([am_maintainer_other], [enable])
9576
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
9577
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
9578
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
9579
AC_ARG_ENABLE([maintainer-mode],
9580
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
9581
(and sometimes confusing) to the casual installer],
9582
[USE_MAINTAINER_MODE=$enableval],
9583
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
9584
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
9585
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
9586
MAINT=$MAINTAINER_MODE_TRUE
9587
AC_SUBST([MAINT])dnl
9591
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
9593
# Check to see how 'make' treats includes. -*- Autoconf -*-
9595
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
9597
# This file is free software; the Free Software Foundation
9598
# gives unlimited permission to copy and/or distribute it,
9599
# with or without modifications, as long as this notice is preserved.
9605
# Check to see how make treats includes.
9606
AC_DEFUN([AM_MAKE_INCLUDE],
9607
[am_make=${MAKE-make}
9608
cat > confinc << 'END'
9610
@echo this is the am__doit target
9613
# If we don't find an include directive, just comment out the code.
9614
AC_MSG_CHECKING([for style of include used by $am_make])
9618
# First try GNU make style include.
9619
echo "include confinc" > confmf
9620
# Ignore all kinds of additional output from `make'.
9621
case `$am_make -s -f confmf 2> /dev/null` in #(
9622
*the\ am__doit\ target*)
9628
# Now try BSD make style include.
9629
if test "$am__include" = "#"; then
9630
echo '.include "confinc"' > confmf
9631
case `$am_make -s -f confmf 2> /dev/null` in #(
9632
*the\ am__doit\ target*)
9633
am__include=.include
9639
AC_SUBST([am__include])
9640
AC_SUBST([am__quote])
9641
AC_MSG_RESULT([$_am_result])
9642
rm -f confinc confmf
9645
# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
9646
# Free Software Foundation, Inc.
9648
# This file is free software; the Free Software Foundation
9649
# gives unlimited permission to copy and/or distribute it,
9650
# with or without modifications, as long as this notice is preserved.
9656
# Like AC_PROG_CC_C_O, but changed for automake.
9657
AC_DEFUN([AM_PROG_CC_C_O],
9658
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
9659
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9660
AC_REQUIRE_AUX_FILE([compile])dnl
9661
# FIXME: we rely on the cache variable name because
9662
# there is no other way.
9664
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
9665
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
9666
if test "$am_t" != yes; then
9667
# Losing compiler, so override with the script.
9668
# FIXME: It is wrong to rewrite CC.
9669
# But if we don't then we get into trouble of one sort or another.
9670
# A longer-term fix would be to have automake use am__CC in this case,
9671
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
9672
CC="$am_aux_dir/compile $CC"
9674
dnl Make sure AC_PROG_CC is never called again, or it will override our
9676
m4_define([AC_PROG_CC],
9677
[m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
9680
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
9682
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
9683
# Free Software Foundation, Inc.
9685
# This file is free software; the Free Software Foundation
9686
# gives unlimited permission to copy and/or distribute it,
9687
# with or without modifications, as long as this notice is preserved.
9691
# AM_MISSING_PROG(NAME, PROGRAM)
9692
# ------------------------------
9693
AC_DEFUN([AM_MISSING_PROG],
9694
[AC_REQUIRE([AM_MISSING_HAS_RUN])
9695
$1=${$1-"${am_missing_run}$2"}
9699
# AM_MISSING_HAS_RUN
9700
# ------------------
9701
# Define MISSING if not defined so far and test if it supports --run.
9702
# If it does, set am_missing_run to use it, otherwise, to nothing.
9703
AC_DEFUN([AM_MISSING_HAS_RUN],
9704
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9705
AC_REQUIRE_AUX_FILE([missing])dnl
9706
if test x"${MISSING+set}" != xset; then
9709
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
9711
MISSING="\${SHELL} $am_aux_dir/missing" ;;
9714
# Use eval to expand $SHELL
9715
if eval "$MISSING --run true"; then
9716
am_missing_run="$MISSING --run "
9719
AC_MSG_WARN([`missing' script is too old or missing])
9723
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
9725
# This file is free software; the Free Software Foundation
9726
# gives unlimited permission to copy and/or distribute it,
9727
# with or without modifications, as long as this notice is preserved.
9731
# Check for `mkdir -p'.
9732
AC_DEFUN([AM_PROG_MKDIR_P],
9733
[AC_PREREQ([2.60])dnl
9734
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
9735
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
9736
dnl while keeping a definition of mkdir_p for backward compatibility.
9737
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
9738
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
9739
dnl Makefile.ins that do not define MKDIR_P, so we do our own
9740
dnl adjustment using top_builddir (which is defined more often than
9742
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
9744
[[\\/$]]* | ?:[[\\/]]*) ;;
9745
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
9749
# Helper functions for option handling. -*- Autoconf -*-
9751
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
9753
# This file is free software; the Free Software Foundation
9754
# gives unlimited permission to copy and/or distribute it,
9755
# with or without modifications, as long as this notice is preserved.
9759
# _AM_MANGLE_OPTION(NAME)
9760
# -----------------------
9761
AC_DEFUN([_AM_MANGLE_OPTION],
9762
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9764
# _AM_SET_OPTION(NAME)
9765
# ------------------------------
9766
# Set option NAME. Presently that only means defining a flag for this option.
9767
AC_DEFUN([_AM_SET_OPTION],
9768
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
9770
# _AM_SET_OPTIONS(OPTIONS)
9771
# ----------------------------------
9772
# OPTIONS is a space-separated list of Automake options.
9773
AC_DEFUN([_AM_SET_OPTIONS],
9774
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
9776
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
9777
# -------------------------------------------
9778
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9779
AC_DEFUN([_AM_IF_OPTION],
9780
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9782
# Check to make sure that the build environment is sane. -*- Autoconf -*-
9784
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
9785
# Free Software Foundation, Inc.
9787
# This file is free software; the Free Software Foundation
9788
# gives unlimited permission to copy and/or distribute it,
9789
# with or without modifications, as long as this notice is preserved.
9795
AC_DEFUN([AM_SANITY_CHECK],
9796
[AC_MSG_CHECKING([whether build environment is sane])
9799
echo timestamp > conftest.file
9800
# Reject unsafe characters in $srcdir or the absolute working directory
9801
# name. Accept space and tab only in the latter.
9805
*[[\\\"\#\$\&\'\`$am_lf]]*)
9806
AC_MSG_ERROR([unsafe absolute working directory name]);;
9809
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
9810
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
9813
# Do `set' in a subshell so we don't clobber the current shell's
9814
# arguments. Must try -L first in case configure is actually a
9815
# symlink; some systems play weird games with the mod time of symlinks
9816
# (eg FreeBSD returns the mod time of the symlink's containing
9819
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
9820
if test "$[*]" = "X"; then
9822
set X `ls -t "$srcdir/configure" conftest.file`
9825
if test "$[*]" != "X $srcdir/configure conftest.file" \
9826
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
9828
# If neither matched, then we have a broken ls. This can happen
9829
# if, for instance, CONFIG_SHELL is bash and it inherits a
9830
# broken ls alias from the environment. This has actually
9831
# happened. Such a system could not be considered "sane".
9832
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
9833
alias in your environment])
9836
test "$[2]" = conftest.file
9842
AC_MSG_ERROR([newly created file is older than distributed files!
9843
Check your system clock])
9845
AC_MSG_RESULT(yes)])
9847
# Copyright (C) 2009 Free Software Foundation, Inc.
9849
# This file is free software; the Free Software Foundation
9850
# gives unlimited permission to copy and/or distribute it,
9851
# with or without modifications, as long as this notice is preserved.
9855
# AM_SILENT_RULES([DEFAULT])
9856
# --------------------------
9857
# Enable less verbose build rules; with the default set to DEFAULT
9858
# (`yes' being less verbose, `no' or empty being verbose).
9859
AC_DEFUN([AM_SILENT_RULES],
9860
[AC_ARG_ENABLE([silent-rules],
9861
[ --enable-silent-rules less verbose build output (undo: `make V=1')
9862
--disable-silent-rules verbose build output (undo: `make V=0')])
9863
case $enable_silent_rules in
9864
yes) AM_DEFAULT_VERBOSITY=0;;
9865
no) AM_DEFAULT_VERBOSITY=1;;
9866
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
9868
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
9870
AC_SUBST([AM_BACKSLASH])dnl
9871
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
9874
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
9876
# This file is free software; the Free Software Foundation
9877
# gives unlimited permission to copy and/or distribute it,
9878
# with or without modifications, as long as this notice is preserved.
9880
# AM_PROG_INSTALL_STRIP
9881
# ---------------------
9882
# One issue with vendor `install' (even GNU) is that you can't
9883
# specify the program used to strip binaries. This is especially
9884
# annoying in cross-compiling environments, where the build's strip
9885
# is unlikely to handle the host's binaries.
9886
# Fortunately install-sh will honor a STRIPPROG variable, so we
9887
# always use install-sh in `make install-strip', and initialize
9888
# STRIPPROG with the value of the STRIP variable (set by the user).
9889
AC_DEFUN([AM_PROG_INSTALL_STRIP],
9890
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9891
# Installed binaries are usually stripped using `strip' when the user
9892
# run `make install-strip'. However `strip' might not be the right
9893
# tool to use in cross-compilation environments, therefore Automake
9894
# will honor the `STRIP' environment variable to overrule this program.
9895
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9896
if test "$cross_compiling" != no; then
9897
AC_CHECK_TOOL([STRIP], [strip], :)
9899
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9900
AC_SUBST([INSTALL_STRIP_PROGRAM])])
9902
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
9904
# This file is free software; the Free Software Foundation
9905
# gives unlimited permission to copy and/or distribute it,
9906
# with or without modifications, as long as this notice is preserved.
9910
# _AM_SUBST_NOTMAKE(VARIABLE)
9911
# ---------------------------
9912
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9913
# This macro is traced by Automake.
9914
AC_DEFUN([_AM_SUBST_NOTMAKE])
9916
# AM_SUBST_NOTMAKE(VARIABLE)
9917
# ---------------------------
9918
# Public sister of _AM_SUBST_NOTMAKE.
9919
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9921
# Check how to create a tarball. -*- Autoconf -*-
9923
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
9925
# This file is free software; the Free Software Foundation
9926
# gives unlimited permission to copy and/or distribute it,
9927
# with or without modifications, as long as this notice is preserved.
9931
# _AM_PROG_TAR(FORMAT)
9932
# --------------------
9933
# Check how to create a tarball in format FORMAT.
9934
# FORMAT should be one of `v7', `ustar', or `pax'.
9936
# Substitute a variable $(am__tar) that is a command
9937
# writing to stdout a FORMAT-tarball containing the directory
9939
# tardir=directory && $(am__tar) > result.tar
9941
# Substitute a variable $(am__untar) that extract such
9942
# a tarball read from stdin.
9943
# $(am__untar) < result.tar
9944
AC_DEFUN([_AM_PROG_TAR],
9945
[# Always define AMTAR for backward compatibility.
9946
AM_MISSING_PROG([AMTAR], [tar])
9948
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9949
[m4_case([$1], [ustar],, [pax],,
9950
[m4_fatal([Unknown tar format])])
9951
AC_MSG_CHECKING([how to create a $1 tar archive])
9952
# Loop over all known methods to create a tar archive until one works.
9953
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9954
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9955
# Do not fold the above two line into one, because Tru64 sh and
9956
# Solaris sh will not grok spaces in the rhs of `-'.
9957
for _am_tool in $_am_tools
9961
for _am_tar in tar gnutar gtar;
9963
AM_RUN_LOG([$_am_tar --version]) && break
9965
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9966
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9967
am__untar="$_am_tar -xf -"
9970
# Must skip GNU tar: if it does not support --format= it doesn't create
9971
# ustar tarball either.
9972
(tar --version) >/dev/null 2>&1 && continue
9973
am__tar='tar chf - "$$tardir"'
9974
am__tar_='tar chf - "$tardir"'
9975
am__untar='tar xf -'
9978
am__tar='pax -L -x $1 -w "$$tardir"'
9979
am__tar_='pax -L -x $1 -w "$tardir"'
9983
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9984
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9985
am__untar='cpio -i -H $1 -d'
9994
# If the value was cached, stop now. We just wanted to have am__tar
9995
# and am__untar set.
9996
test -n "${am_cv_prog_tar_$1}" && break
9998
# tar/untar a dummy directory, and stop if the command works
10001
echo GrepMe > conftest.dir/file
10002
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10003
rm -rf conftest.dir
10004
if test -s conftest.tar; then
10005
AM_RUN_LOG([$am__untar <conftest.tar])
10006
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10009
rm -rf conftest.dir
10011
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10012
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10013
AC_SUBST([am__tar])
10014
AC_SUBST([am__untar])