500
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
501
# serial 40 IT_PROG_INTLTOOL
502
AC_DEFUN([IT_PROG_INTLTOOL], [
504
AC_REQUIRE([AM_NLS])dnl
506
case "$am__api_version" in
508
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
514
if test -n "$1"; then
515
AC_MSG_CHECKING([for intltool >= $1])
517
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
518
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
519
[INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
521
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
522
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
523
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
526
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
527
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
528
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
529
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
530
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
533
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 $< [$]@'
534
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 $< [$]@'
535
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 $< [$]@'
536
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 $< [$]@'
537
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
538
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 $< [$]@'
539
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 $< [$]@'
540
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 $< [$]@'
541
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 $< [$]@'
542
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 $< [$]@'
543
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 $< [$]@'
544
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
545
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 $< [$]@'
546
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 $< [$]@'
547
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 $< [$]@'
548
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 $< [$]@'
549
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 $< [$]@'
550
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 $< [$]@'
551
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 $< [$]@'
553
AC_SUBST(INTLTOOL_DESKTOP_RULE)
554
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
555
AC_SUBST(INTLTOOL_KEYS_RULE)
556
AC_SUBST(INTLTOOL_PROP_RULE)
557
AC_SUBST(INTLTOOL_OAF_RULE)
558
AC_SUBST(INTLTOOL_PONG_RULE)
559
AC_SUBST(INTLTOOL_SERVER_RULE)
560
AC_SUBST(INTLTOOL_SHEET_RULE)
561
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
562
AC_SUBST(INTLTOOL_UI_RULE)
563
AC_SUBST(INTLTOOL_XAM_RULE)
564
AC_SUBST(INTLTOOL_KBD_RULE)
565
AC_SUBST(INTLTOOL_XML_RULE)
566
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
567
AC_SUBST(INTLTOOL_CAVES_RULE)
568
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
569
AC_SUBST(INTLTOOL_THEME_RULE)
570
AC_SUBST(INTLTOOL_SERVICE_RULE)
571
AC_SUBST(INTLTOOL_POLICY_RULE)
573
# Check the gettext tools to make sure they are GNU
574
AC_PATH_PROG(XGETTEXT, xgettext)
575
AC_PATH_PROG(MSGMERGE, msgmerge)
576
AC_PATH_PROG(MSGFMT, msgfmt)
577
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
578
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
579
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
581
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
582
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
583
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
584
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
585
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
588
AC_PATH_PROG(INTLTOOL_PERL, [perl])
589
if test -z "$INTLTOOL_PERL"; then
590
AC_MSG_ERROR([perl not found; required for intltool])
592
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
593
AC_MSG_ERROR([perl 5.x required for intltool])
595
if test "x$2" != "xno-xml"; then
596
AC_MSG_CHECKING([for XML::Parser])
597
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
600
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
604
# Substitute ALL_LINGUAS so we can use it in po/Makefile
605
AC_SUBST(ALL_LINGUAS)
607
# Set DATADIRNAME correctly if it is not set yet
608
# (copied from glib-gettext.m4)
609
if test -z "$DATADIRNAME"; then
611
[AC_LANG_PROGRAM([[]],
612
[[extern int _nl_msg_cat_cntr;
613
return _nl_msg_cat_cntr]])],
617
dnl On Solaris, if bind_textdomain_codeset is in libc,
618
dnl GNU format message catalog is always supported,
619
dnl since both are added to the libc all together.
620
dnl Hence, we'd like to go with DATADIRNAME=share
622
AC_CHECK_FUNC(bind_textdomain_codeset,
623
[DATADIRNAME=share], [DATADIRNAME=lib])
630
AC_SUBST(DATADIRNAME)
637
# IT_PO_SUBDIR(DIRNAME)
638
# ---------------------
639
# All po subdirs have to be declared with this macro; the subdir "po" is
640
# declared by IT_PROG_INTLTOOL.
642
AC_DEFUN([IT_PO_SUBDIR],
643
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
645
dnl The following CONFIG_COMMANDS should be exetuted at the very end
646
dnl of config.status.
647
AC_CONFIG_COMMANDS_PRE([
648
AC_CONFIG_COMMANDS([$1/stamp-it], [
649
if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" ]; then
650
AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
652
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
657
'"s|^| $ac_top_srcdir/|" \
658
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
660
[sed '/^POTFILES =/,/[^\\]$/ {
664
' "$1/Makefile.in" >"$1/Makefile"]
665
rm -f "$1/Makefile.tmp"
666
mv "$1/stamp-it.tmp" "$1/stamp-it"
672
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
673
# A hint is needed for aclocal from Automake <= 1.9.4:
674
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
677
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
679
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
680
# 2006, 2007, 2008 Free Software Foundation, Inc.
681
# Written by Gordon Matzigkeit, 1996
683
# This file is free software; the Free Software Foundation gives
684
# unlimited permission to copy and/or distribute it, with or without
685
# modifications, as long as this notice is preserved.
687
m4_define([_LT_COPYING], [dnl
688
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
689
# 2006, 2007, 2008 Free Software Foundation, Inc.
690
# Written by Gordon Matzigkeit, 1996
692
# This file is part of GNU Libtool.
694
# GNU Libtool is free software; you can redistribute it and/or
695
# modify it under the terms of the GNU General Public License as
696
# published by the Free Software Foundation; either version 2 of
697
# the License, or (at your option) any later version.
699
# As a special exception to the GNU General Public License,
700
# if you distribute this file as part of a program or library that
701
# is built using GNU Libtool, you may include this file under the
702
# same distribution terms that you use for the rest of that program.
704
# GNU Libtool is distributed in the hope that it will be useful,
705
# but WITHOUT ANY WARRANTY; without even the implied warranty of
706
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
707
# GNU General Public License for more details.
709
# You should have received a copy of the GNU General Public License
710
# along with GNU Libtool; see the file COPYING. If not, a copy
711
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
712
# obtained by writing to the Free Software Foundation, Inc.,
713
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
721
# Complain and exit if this libtool version is less that VERSION.
722
m4_defun([LT_PREREQ],
723
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
725
[m4_fatal([Libtool version $1 or higher is required],
732
# Complain if the absolute build directory name contains unusual characters
733
m4_defun([_LT_CHECK_BUILDDIR],
736
AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
744
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
745
AC_BEFORE([$0], [LT_LANG])dnl
746
AC_BEFORE([$0], [LT_OUTPUT])dnl
747
AC_BEFORE([$0], [LTDL_INIT])dnl
748
m4_require([_LT_CHECK_BUILDDIR])dnl
750
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
751
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
752
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
753
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
754
dnl unless we require an AC_DEFUNed macro:
755
AC_REQUIRE([LTOPTIONS_VERSION])dnl
756
AC_REQUIRE([LTSUGAR_VERSION])dnl
757
AC_REQUIRE([LTVERSION_VERSION])dnl
758
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
759
m4_require([_LT_PROG_LTMAIN])dnl
762
_LT_SET_OPTIONS([$0], [$1])
764
# This can be used to rebuild libtool when needed
765
LIBTOOL_DEPS="$ltmain"
767
# Always use our own libtool.
768
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
778
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
779
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
780
dnl aclocal-1.4 backwards compatibility:
781
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
782
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
785
# _LT_CC_BASENAME(CC)
786
# -------------------
787
# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
788
m4_defun([_LT_CC_BASENAME],
789
[for cc_temp in $1""; do
791
compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
792
distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
797
cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
801
# _LT_FILEUTILS_DEFAULTS
802
# ----------------------
803
# It is okay to use these file commands and assume they have been set
804
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
805
m4_defun([_LT_FILEUTILS_DEFAULTS],
809
])# _LT_FILEUTILS_DEFAULTS
814
m4_defun([_LT_SETUP],
815
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
816
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
817
_LT_DECL([], [host_alias], [0], [The host system])dnl
818
_LT_DECL([], [host], [0])dnl
819
_LT_DECL([], [host_os], [0])dnl
821
_LT_DECL([], [build_alias], [0], [The build system])dnl
822
_LT_DECL([], [build], [0])dnl
823
_LT_DECL([], [build_os], [0])dnl
825
AC_REQUIRE([AC_PROG_CC])dnl
826
AC_REQUIRE([LT_PATH_LD])dnl
827
AC_REQUIRE([LT_PATH_NM])dnl
829
AC_REQUIRE([AC_PROG_LN_S])dnl
830
test -z "$LN_S" && LN_S="ln -s"
831
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
833
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
834
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
835
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
837
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
838
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
839
m4_require([_LT_CMD_RELOAD])dnl
840
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
841
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
842
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
844
_LT_CONFIG_LIBTOOL_INIT([
845
# See if we are running on zsh, and set the options which allow our
846
# commands through without removal of \ escapes INIT.
847
if test -n "\${ZSH_VERSION+set}" ; then
851
if test -n "${ZSH_VERSION+set}" ; then
857
m4_require([_LT_TAG_COMPILER])dnl
858
_LT_PROG_ECHO_BACKSLASH
862
# AIX sometimes has problems with the GCC collect2 program. For some
863
# reason, if we set the COLLECT_NAMES environment variable, the problems
864
# vanish in a puff of smoke.
865
if test "X${COLLECT_NAMES+set}" != Xset; then
872
# Sed substitution that helps us do robust quoting. It backslashifies
873
# metacharacters that are still active within double-quoted strings.
874
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
876
# Same as above, but do not quote variable references.
877
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
879
# Sed substitution to delay expansion of an escaped shell variable in a
880
# double_quote_subst'ed string.
881
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
883
# Sed substitution to delay expansion of an escaped single quote.
884
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
886
# Sed substitution to avoid accidental globbing in evaled expressions
887
no_glob_subst='s/\*/\\\*/g'
893
# All known linkers require a `.a' archive for static linking (except MSVC,
894
# which needs '.lib').
897
with_gnu_ld="$lt_cv_prog_gnu_ld"
902
# Set sane defaults for various variables
903
test -z "$CC" && CC=cc
904
test -z "$LTCC" && LTCC=$CC
905
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
906
test -z "$LD" && LD=ld
907
test -z "$ac_objext" && ac_objext=o
909
_LT_CC_BASENAME([$compiler])
911
# Only perform the check for file, if the check method requires it
912
test -z "$MAGIC_CMD" && MAGIC_CMD=file
913
case $deplibs_check_method in
915
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
921
# Use C for the default configuration in the libtool script
922
LT_SUPPORTED_TAG([CC])
924
_LT_LANG_DEFAULT_CONFIG
931
# Note that this code is called both from `configure', and `config.status'
932
# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
933
# `config.status' has no value for ac_aux_dir unless we are using Automake,
934
# so we pass a copy along to make sure it has a sensible value anyway.
935
m4_defun([_LT_PROG_LTMAIN],
936
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
937
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
938
ltmain="$ac_aux_dir/ltmain.sh"
943
# So that we can recreate a full libtool script including additional
944
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
945
# in macros and then make a single call at the end using the `libtool'
949
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
950
# ----------------------------------------
951
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
952
m4_define([_LT_CONFIG_LIBTOOL_INIT],
954
[m4_append([_LT_OUTPUT_LIBTOOL_INIT],
959
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
962
# _LT_CONFIG_LIBTOOL([COMMANDS])
963
# ------------------------------
964
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
965
m4_define([_LT_CONFIG_LIBTOOL],
967
[m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
972
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
975
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
976
# -----------------------------------------------------
977
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
978
[_LT_CONFIG_LIBTOOL([$1])
979
_LT_CONFIG_LIBTOOL_INIT([$2])
983
# _LT_FORMAT_COMMENT([COMMENT])
984
# -----------------------------
985
# Add leading comment marks to the start of each line, and a trailing
986
# full-stop to the whole comment if one is not present already.
987
m4_define([_LT_FORMAT_COMMENT],
989
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
990
[['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
997
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
998
# -------------------------------------------------------------------
999
# CONFIGNAME is the name given to the value in the libtool script.
1000
# VARNAME is the (base) name used in the configure script.
1001
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1002
# VARNAME. Any other value will be used directly.
1003
m4_define([_LT_DECL],
1004
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1005
[lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1006
[m4_ifval([$1], [$1], [$2])])
1007
lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1009
[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1010
lt_dict_add_subkey([lt_decl_dict], [$2],
1011
[tagged?], [m4_ifval([$5], [yes], [no])])])
1015
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1016
# --------------------------------------------------------
1017
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1020
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1021
# ------------------------------------------------
1022
m4_define([lt_decl_tag_varnames],
1023
[_lt_decl_filter([tagged?], [yes], $@)])
1026
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1027
# ---------------------------------------------------------
1028
m4_define([_lt_decl_filter],
1030
[0], [m4_fatal([$0: too few arguments: $#])],
1031
[1], [m4_fatal([$0: too few arguments: $#: $1])],
1032
[2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1033
[3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1034
[lt_dict_filter([lt_decl_dict], $@)])[]dnl
1038
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1039
# --------------------------------------------------
1040
m4_define([lt_decl_quote_varnames],
1041
[_lt_decl_filter([value], [1], $@)])
1044
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1045
# ---------------------------------------------------
1046
m4_define([lt_decl_dquote_varnames],
1047
[_lt_decl_filter([value], [2], $@)])
1050
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1051
# ---------------------------------------------------
1052
m4_define([lt_decl_varnames_tagged],
1053
[m4_assert([$# <= 2])dnl
1054
_$0(m4_quote(m4_default([$1], [[, ]])),
1055
m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1056
m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1057
m4_define([_lt_decl_varnames_tagged],
1058
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1061
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1062
# ------------------------------------------------
1063
m4_define([lt_decl_all_varnames],
1064
[_$0(m4_quote(m4_default([$1], [[, ]])),
1066
m4_quote(lt_decl_varnames),
1067
m4_quote(m4_shift($@))))[]dnl
1069
m4_define([_lt_decl_all_varnames],
1070
[lt_join($@, lt_decl_varnames_tagged([$1],
1071
lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1075
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1076
# ------------------------------------
1077
# Quote a variable value, and forward it to `config.status' so that its
1078
# declaration there will have the same value as in `configure'. VARNAME
1079
# must have a single quote delimited value for this to work.
1080
m4_define([_LT_CONFIG_STATUS_DECLARE],
1081
[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
1084
# _LT_CONFIG_STATUS_DECLARATIONS
1085
# ------------------------------
1086
# We delimit libtool config variables with single quotes, so when
1087
# we write them to config.status, we have to be sure to quote all
1088
# embedded single quotes properly. In configure, this macro expands
1089
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1091
# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
1092
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1093
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1094
[m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1099
# Output comment and list of tags supported by the script
1100
m4_defun([_LT_LIBTOOL_TAGS],
1101
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1102
available_tags="_LT_TAGS"dnl
1106
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1107
# -----------------------------------
1108
# Extract the dictionary values for VARNAME (optionally with TAG) and
1109
# expand to a commented shell variable setting:
1111
# # Some comment about what VAR is for.
1112
# visible_name=$lt_internal_name
1113
m4_define([_LT_LIBTOOL_DECLARE],
1114
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1115
[description])))[]dnl
1116
m4_pushdef([_libtool_name],
1117
m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1118
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1119
[0], [_libtool_name=[$]$1],
1120
[1], [_libtool_name=$lt_[]$1],
1121
[2], [_libtool_name=$lt_[]$1],
1122
[_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1123
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1127
# _LT_LIBTOOL_CONFIG_VARS
1128
# -----------------------
1129
# Produce commented declarations of non-tagged libtool config variables
1130
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1131
# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
1132
# section) are produced by _LT_LIBTOOL_TAG_VARS.
1133
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1134
[m4_foreach([_lt_var],
1135
m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1136
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1139
# _LT_LIBTOOL_TAG_VARS(TAG)
1140
# -------------------------
1141
m4_define([_LT_LIBTOOL_TAG_VARS],
1142
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1143
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1146
# _LT_TAGVAR(VARNAME, [TAGNAME])
1147
# ------------------------------
1148
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1151
# _LT_CONFIG_COMMANDS
1152
# -------------------
1153
# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
1154
# variables for single and double quote escaping we saved from calls
1155
# to _LT_DECL, we can put quote escaped variables declarations
1156
# into `config.status', and then the shell code to quote escape them in
1157
# for loops in `config.status'. Finally, any additional code accumulated
1158
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1159
m4_defun([_LT_CONFIG_COMMANDS],
1160
[AC_PROVIDE_IFELSE([LT_OUTPUT],
1161
dnl If the libtool generation code has been placed in $CONFIG_LT,
1162
dnl instead of duplicating it all over again into config.status,
1163
dnl then we will have config.status run $CONFIG_LT later, so it
1164
dnl needs to know what name is stored there:
1165
[AC_CONFIG_COMMANDS([libtool],
1166
[$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1167
dnl If the libtool generation code is destined for config.status,
1168
dnl expand the accumulated commands and init code now:
1169
[AC_CONFIG_COMMANDS([libtool],
1170
[_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1171
])#_LT_CONFIG_COMMANDS
1175
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1178
# The HP-UX ksh and POSIX shell print the target directory to stdout
1180
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1182
sed_quote_subst='$sed_quote_subst'
1183
double_quote_subst='$double_quote_subst'
1184
delay_variable_subst='$delay_variable_subst'
1185
_LT_CONFIG_STATUS_DECLARATIONS
1187
LTCFLAGS='$LTCFLAGS'
1188
compiler='$compiler_DEFAULT'
1190
# Quote evaled strings.
1191
for var in lt_decl_all_varnames([[ \
1192
]], lt_decl_quote_varnames); do
1193
case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1194
*[[\\\\\\\`\\"\\\$]]*)
1195
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1198
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1203
# Double-quote double-evaled strings.
1204
for var in lt_decl_all_varnames([[ \
1205
]], lt_decl_dquote_varnames); do
1206
case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1207
*[[\\\\\\\`\\"\\\$]]*)
1208
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1211
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1216
# Fix-up fallback echo if it was mangled by the above quoting rules.
1218
*'\\\[$]0 --fallback-echo"')dnl "
1219
lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
1223
_LT_OUTPUT_LIBTOOL_INIT
1229
# This macro allows early generation of the libtool script (before
1230
# AC_OUTPUT is called), incase it is used in configure for compilation
1232
AC_DEFUN([LT_OUTPUT],
1233
[: ${CONFIG_LT=./config.lt}
1234
AC_MSG_NOTICE([creating $CONFIG_LT])
1235
cat >"$CONFIG_LT" <<_LTEOF
1237
# Generated by $as_me.
1238
# Run this file to recreate a libtool stub with the current configuration.
1241
SHELL=\${CONFIG_SHELL-$SHELL}
1244
cat >>"$CONFIG_LT" <<\_LTEOF
1248
exec AS_MESSAGE_FD>&1
1249
exec AS_MESSAGE_LOG_FD>>config.log
1252
AS_BOX([Running $as_me.])
1253
} >&AS_MESSAGE_LOG_FD
1256
\`$as_me' creates a local libtool stub from the current configuration,
1257
for use in further configure time tests before the real libtool is
1260
Usage: $[0] [[OPTIONS]]
1262
-h, --help print this help, then exit
1263
-V, --version print version number, then exit
1264
-q, --quiet do not print progress messages
1265
-d, --debug don't remove temporary files
1267
Report bugs to <bug-libtool@gnu.org>."
1270
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1271
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1272
configured by $[0], generated by m4_PACKAGE_STRING.
1274
Copyright (C) 2008 Free Software Foundation, Inc.
1275
This config.lt script is free software; the Free Software Foundation
1276
gives unlimited permision to copy, distribute and modify it."
1278
while test $[#] != 0
1281
--version | --v* | -V )
1282
echo "$lt_cl_version"; exit 0 ;;
1283
--help | --h* | -h )
1284
echo "$lt_cl_help"; exit 0 ;;
1285
--debug | --d* | -d )
1287
--quiet | --q* | --silent | --s* | -q )
1290
-*) AC_MSG_ERROR([unrecognized option: $[1]
1291
Try \`$[0] --help' for more information.]) ;;
1293
*) AC_MSG_ERROR([unrecognized argument: $[1]
1294
Try \`$[0] --help' for more information.]) ;;
1299
if $lt_cl_silent; then
1300
exec AS_MESSAGE_FD>/dev/null
1304
cat >>"$CONFIG_LT" <<_LTEOF
1305
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1308
cat >>"$CONFIG_LT" <<\_LTEOF
1309
AC_MSG_NOTICE([creating $ofile])
1310
_LT_OUTPUT_LIBTOOL_COMMANDS
1313
chmod +x "$CONFIG_LT"
1315
# configure is writing to config.log, but config.lt does its own redirection,
1316
# appending to config.log, which fails on DOS, as config.log is still kept
1317
# open by configure. Here we exec the FD to /dev/null, effectively closing
1318
# config.log, so it can be properly (re)opened and appended to by config.lt.
1319
if test "$no_create" != yes; then
1321
test "$silent" = yes &&
1322
lt_config_lt_args="$lt_config_lt_args --quiet"
1323
exec AS_MESSAGE_LOG_FD>/dev/null
1324
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1325
exec AS_MESSAGE_LOG_FD>>config.log
1326
$lt_cl_success || AS_EXIT(1)
1333
# If TAG is the built-in tag, create an initial libtool script with a
1334
# default configuration from the untagged config vars. Otherwise add code
1335
# to config.status for appending the configuration named by TAG from the
1336
# matching tagged config vars.
1337
m4_defun([_LT_CONFIG],
1338
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1339
_LT_CONFIG_SAVE_COMMANDS([
1340
m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1341
m4_if(_LT_TAG, [C], [
1342
# See if we are running on zsh, and set the options which allow our
1343
# commands through without removal of \ escapes.
1344
if test -n "${ZSH_VERSION+set}" ; then
1345
setopt NO_GLOB_SUBST
1349
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1352
cat <<_LT_EOF >> "$cfgfile"
1355
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1356
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1357
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1358
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1363
# ### BEGIN LIBTOOL CONFIG
1364
_LT_LIBTOOL_CONFIG_VARS
1365
_LT_LIBTOOL_TAG_VARS
1366
# ### END LIBTOOL CONFIG
1372
cat <<\_LT_EOF >> "$cfgfile"
1373
# AIX sometimes has problems with the GCC collect2 program. For some
1374
# reason, if we set the COLLECT_NAMES environment variable, the problems
1375
# vanish in a puff of smoke.
1376
if test "X${COLLECT_NAMES+set}" != Xset; then
1378
export COLLECT_NAMES
1386
# We use sed instead of cat because bash on DJGPP gets confused if
1387
# if finds mixed CR/LF and LF-only lines. Since sed operates in
1388
# text mode, it properly converts lines to CR/LF. This bash problem
1389
# is reportedly fixed, but why not run on old versions too?
1390
sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
1391
|| (rm -f "$cfgfile"; exit 1)
1393
_LT_PROG_XSI_SHELLFNS
1395
sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
1396
|| (rm -f "$cfgfile"; exit 1)
1398
mv -f "$cfgfile" "$ofile" ||
1399
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1402
[cat <<_LT_EOF >> "$ofile"
1404
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1405
dnl in a comment (ie after a #).
1406
# ### BEGIN LIBTOOL TAG CONFIG: $1
1407
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1408
# ### END LIBTOOL TAG CONFIG: $1
1415
TIMESTAMP='$TIMESTAMP'
1417
ofile='$ofile'], [])
1418
])dnl /_LT_CONFIG_SAVE_COMMANDS
1422
# LT_SUPPORTED_TAG(TAG)
1423
# ---------------------
1424
# Trace this macro to discover what tags are supported by the libtool
1425
# --tag option, using:
1426
# autoconf --trace 'LT_SUPPORTED_TAG:$1'
1427
AC_DEFUN([LT_SUPPORTED_TAG], [])
1430
# C support is built-in for now
1431
m4_define([_LT_LANG_C_enabled], [])
1432
m4_define([_LT_TAGS], [])
1437
# Enable libtool support for the given language if not already enabled.
1439
[AC_BEFORE([$0], [LT_OUTPUT])dnl
1442
[C++], [_LT_LANG(CXX)],
1443
[Java], [_LT_LANG(GCJ)],
1444
[Fortran 77], [_LT_LANG(F77)],
1445
[Fortran], [_LT_LANG(FC)],
1446
[Windows Resource], [_LT_LANG(RC)],
1447
[m4_ifdef([_LT_LANG_]$1[_CONFIG],
1449
[m4_fatal([$0: unsupported language: "$1"])])])dnl
1453
# _LT_LANG(LANGNAME)
1454
# ------------------
1455
m4_defun([_LT_LANG],
1456
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1457
[LT_SUPPORTED_TAG([$1])dnl
1458
m4_append([_LT_TAGS], [$1 ])dnl
1459
m4_define([_LT_LANG_]$1[_enabled], [])dnl
1460
_LT_LANG_$1_CONFIG($1)])dnl
1464
# _LT_LANG_DEFAULT_CONFIG
1465
# -----------------------
1466
m4_defun([_LT_LANG_DEFAULT_CONFIG],
1467
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1469
[m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1471
AC_PROVIDE_IFELSE([AC_PROG_F77],
1473
[m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1475
AC_PROVIDE_IFELSE([AC_PROG_FC],
1477
[m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1479
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1480
dnl pulling things in needlessly.
1481
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1483
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1485
[AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1487
[m4_ifdef([AC_PROG_GCJ],
1488
[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1489
m4_ifdef([A][M_PROG_GCJ],
1490
[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1491
m4_ifdef([LT_PROG_GCJ],
1492
[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1494
AC_PROVIDE_IFELSE([LT_PROG_RC],
1496
[m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1497
])# _LT_LANG_DEFAULT_CONFIG
1500
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1501
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1502
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1503
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1504
dnl aclocal-1.4 backwards compatibility:
1505
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1506
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1507
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1508
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1513
m4_defun([_LT_TAG_COMPILER],
1514
[AC_REQUIRE([AC_PROG_CC])dnl
1516
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1517
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1518
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1519
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1521
# If no C compiler was specified, use CC.
1524
# If no C compiler flags were specified, use CFLAGS.
1525
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1527
# Allow CC to be a program name with arguments.
1529
])# _LT_TAG_COMPILER
1532
# _LT_COMPILER_BOILERPLATE
1533
# ------------------------
1534
# Check for compiler boilerplate output or warnings with
1535
# the simple compiler test code.
1536
m4_defun([_LT_COMPILER_BOILERPLATE],
1537
[m4_require([_LT_DECL_SED])dnl
1538
ac_outfile=conftest.$ac_objext
1539
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1540
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1541
_lt_compiler_boilerplate=`cat conftest.err`
1543
])# _LT_COMPILER_BOILERPLATE
1546
# _LT_LINKER_BOILERPLATE
1547
# ----------------------
1548
# Check for linker boilerplate output or warnings with
1549
# the simple link test code.
1550
m4_defun([_LT_LINKER_BOILERPLATE],
1551
[m4_require([_LT_DECL_SED])dnl
1552
ac_outfile=conftest.$ac_objext
1553
echo "$lt_simple_link_test_code" >conftest.$ac_ext
1554
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1555
_lt_linker_boilerplate=`cat conftest.err`
1557
])# _LT_LINKER_BOILERPLATE
1559
# _LT_REQUIRED_DARWIN_CHECKS
1560
# -------------------------
1561
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1563
rhapsody* | darwin*)
1564
AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1565
AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1566
AC_CHECK_TOOL([LIPO], [lipo], [:])
1567
AC_CHECK_TOOL([OTOOL], [otool], [:])
1568
AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1569
_LT_DECL([], [DSYMUTIL], [1],
1570
[Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1571
_LT_DECL([], [NMEDIT], [1],
1572
[Tool to change global to local symbols on Mac OS X])
1573
_LT_DECL([], [LIPO], [1],
1574
[Tool to manipulate fat objects and archives on Mac OS X])
1575
_LT_DECL([], [OTOOL], [1],
1576
[ldd/readelf like tool for Mach-O binaries on Mac OS X])
1577
_LT_DECL([], [OTOOL64], [1],
1578
[ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1580
AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1581
[lt_cv_apple_cc_single_mod=no
1582
if test -z "${LT_MULTI_MODULE}"; then
1583
# By default we will add the -single_module flag. You can override
1584
# by either setting the environment variable LT_MULTI_MODULE
1585
# non-empty at configure time, or by adding -multi_module to the
1587
rm -rf libconftest.dylib*
1588
echo "int foo(void){return 1;}" > conftest.c
1589
echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1590
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1591
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1592
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1594
if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1595
lt_cv_apple_cc_single_mod=yes
1597
cat conftest.err >&AS_MESSAGE_LOG_FD
1599
rm -rf libconftest.dylib*
1602
AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1603
[lt_cv_ld_exported_symbols_list],
1604
[lt_cv_ld_exported_symbols_list=no
1605
save_LDFLAGS=$LDFLAGS
1606
echo "_main" > conftest.sym
1607
LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1608
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1609
[lt_cv_ld_exported_symbols_list=yes],
1610
[lt_cv_ld_exported_symbols_list=no])
1611
LDFLAGS="$save_LDFLAGS"
1614
rhapsody* | darwin1.[[012]])
1615
_lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1617
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1618
darwin*) # darwin 5.x on
1619
# if running on 10.5 or later, the deployment target defaults
1620
# to the OS version, if on x86, and 10.4, the deployment
1621
# target defaults to 10.4. Don't you love it?
1622
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1623
10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1624
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1626
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1628
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1632
if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1633
_lt_dar_single_mod='$single_module'
1635
if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1636
_lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1638
_lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1640
if test "$DSYMUTIL" != ":"; then
1641
_lt_dsymutil='~$DSYMUTIL $lib || :'
1650
# _LT_DARWIN_LINKER_FEATURES
1651
# --------------------------
1652
# Checks for linker and compiler features on darwin
1653
m4_defun([_LT_DARWIN_LINKER_FEATURES],
1655
m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1656
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
1657
_LT_TAGVAR(hardcode_direct, $1)=no
1658
_LT_TAGVAR(hardcode_automatic, $1)=yes
1659
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1660
_LT_TAGVAR(whole_archive_flag_spec, $1)=''
1661
_LT_TAGVAR(link_all_deplibs, $1)=yes
1662
_LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1663
case $cc_basename in
1664
ifort*) _lt_dar_can_shared=yes ;;
1665
*) _lt_dar_can_shared=$GCC ;;
1667
if test "$_lt_dar_can_shared" = "yes"; then
1668
output_verbose_link_cmd=echo
1669
_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}"
1670
_LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1671
_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}"
1672
_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}"
1674
[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1675
_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}"
1676
_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}"
1680
_LT_TAGVAR(ld_shlibs, $1)=no
1684
# _LT_SYS_MODULE_PATH_AIX
1685
# -----------------------
1686
# Links a minimal program and checks the executable
1687
# for the system default hardcoded library path. In most cases,
1688
# this is /usr/lib:/lib, but when the MPI compilers are used
1689
# the location of the communication and MPI libs are included too.
1690
# If we don't find anything, use the default library path according
1691
# to the aix ld manual.
1692
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1693
[m4_require([_LT_DECL_SED])dnl
1694
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1695
lt_aix_libpath_sed='
1696
/Import File Strings/,/^$/ {
1702
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1703
# Check for a 64-bit object if we didn't find anything.
1704
if test -z "$aix_libpath"; then
1705
aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1707
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1708
])# _LT_SYS_MODULE_PATH_AIX
1711
# _LT_SHELL_INIT(ARG)
1712
# -------------------
1713
m4_define([_LT_SHELL_INIT],
1714
[ifdef([AC_DIVERSION_NOTICE],
1715
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1716
[AC_DIVERT_PUSH(NOTICE)])
1722
# _LT_PROG_ECHO_BACKSLASH
1723
# -----------------------
1724
# Add some code to the start of the generated configure script which
1725
# will find an echo command which doesn't interpret backslashes.
1726
m4_defun([_LT_PROG_ECHO_BACKSLASH],
1728
# Check that we are running under the correct shell.
1729
SHELL=${CONFIG_SHELL-/bin/sh}
1733
# Remove one level of quotation (which was required for Make).
1734
ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1738
ECHO=${lt_ECHO-echo}
1739
if test "X[$]1" = X--no-reexec; then
1740
# Discard the --no-reexec flag, and continue.
1742
elif test "X[$]1" = X--fallback-echo; then
1743
# Avoid inline document here, it may be left over
1745
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1746
# Yippee, $ECHO works!
1749
# Restart under the correct shell.
1750
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1753
if test "X[$]1" = X--fallback-echo; then
1754
# used as fallback echo
1762
# The HP-UX ksh and POSIX shell print the target directory to stdout
1764
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1766
if test -z "$lt_ECHO"; then
1767
if test "X${echo_test_string+set}" != Xset; then
1768
# find a string as large as possible, as long as the shell can cope with it
1769
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1770
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1771
if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1772
{ test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1779
if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1780
echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1781
test "X$echo_testing_string" = "X$echo_test_string"; then
1784
# The Solaris, AIX, and Digital Unix default echo programs unquote
1785
# backslashes. This makes it impossible to quote backslashes using
1786
# echo "$something" | sed 's/\\/\\\\/g'
1788
# So, first we look for a working echo in the user's PATH.
1790
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1791
for dir in $PATH /usr/ucb; do
1793
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1794
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1795
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1796
test "X$echo_testing_string" = "X$echo_test_string"; then
1803
if test "X$ECHO" = Xecho; then
1804
# We didn't find a better echo, so look for alternatives.
1805
if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1806
echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1807
test "X$echo_testing_string" = "X$echo_test_string"; then
1808
# This shell has a builtin print -r that does the trick.
1810
elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1811
test "X$CONFIG_SHELL" != X/bin/ksh; then
1812
# If we have ksh, try running configure again with it.
1813
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1814
export ORIGINAL_CONFIG_SHELL
1815
CONFIG_SHELL=/bin/ksh
1817
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1821
if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1822
echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1823
test "X$echo_testing_string" = "X$echo_test_string"; then
1824
# Cool, printf works
1826
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1827
test "X$echo_testing_string" = 'X\t' &&
1828
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1829
test "X$echo_testing_string" = "X$echo_test_string"; then
1830
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1832
SHELL="$CONFIG_SHELL"
1834
ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1835
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1836
test "X$echo_testing_string" = 'X\t' &&
1837
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1838
test "X$echo_testing_string" = "X$echo_test_string"; then
1839
ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1841
# maybe with a smaller string...
1844
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1845
if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1852
if test "$prev" != 'sed 50q "[$]0"'; then
1853
echo_test_string=`eval $prev`
1854
export echo_test_string
1855
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1857
# Oops. We lost completely, so just stick with echo.
1866
# Copy echo and quote the copy suitably for passing to libtool from
1867
# the Makefile, instead of quoting the original, which is used later.
1869
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1870
lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1875
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1876
_LT_DECL([], [ECHO], [1],
1877
[An echo program that does not interpret backslashes])
1878
])# _LT_PROG_ECHO_BACKSLASH
1883
m4_defun([_LT_ENABLE_LOCK],
1884
[AC_ARG_ENABLE([libtool-lock],
1885
[AS_HELP_STRING([--disable-libtool-lock],
1886
[avoid locking (might break parallel builds)])])
1887
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1889
# Some flags need to be propagated to the compiler or linker for good
1893
# Find out which ABI we are using.
1894
echo 'int i;' > conftest.$ac_ext
1895
if AC_TRY_EVAL(ac_compile); then
1896
case `/usr/bin/file conftest.$ac_objext` in
1908
# Find out which ABI we are using.
1909
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1910
if AC_TRY_EVAL(ac_compile); then
1911
if test "$lt_cv_prog_gnu_ld" = yes; then
1912
case `/usr/bin/file conftest.$ac_objext` in
1914
LD="${LD-ld} -melf32bsmip"
1917
LD="${LD-ld} -melf32bmipn32"
1920
LD="${LD-ld} -melf64bmip"
1924
case `/usr/bin/file conftest.$ac_objext` in
1940
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1941
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1942
# Find out which ABI we are using.
1943
echo 'int i;' > conftest.$ac_ext
1944
if AC_TRY_EVAL(ac_compile); then
1945
case `/usr/bin/file conftest.o` in
1948
x86_64-*kfreebsd*-gnu)
1949
LD="${LD-ld} -m elf_i386_fbsd"
1952
LD="${LD-ld} -m elf_i386"
1954
ppc64-*linux*|powerpc64-*linux*)
1955
LD="${LD-ld} -m elf32ppclinux"
1958
LD="${LD-ld} -m elf_s390"
1961
LD="${LD-ld} -m elf32_sparc"
1967
x86_64-*kfreebsd*-gnu)
1968
LD="${LD-ld} -m elf_x86_64_fbsd"
1971
LD="${LD-ld} -m elf_x86_64"
1973
ppc*-*linux*|powerpc*-*linux*)
1974
LD="${LD-ld} -m elf64ppc"
1976
s390*-*linux*|s390*-*tpf*)
1977
LD="${LD-ld} -m elf64_s390"
1980
LD="${LD-ld} -m elf64_sparc"
1990
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
1991
SAVE_CFLAGS="$CFLAGS"
1992
CFLAGS="$CFLAGS -belf"
1993
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1995
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1997
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1998
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1999
CFLAGS="$SAVE_CFLAGS"
2003
# Find out which ABI we are using.
2004
echo 'int i;' > conftest.$ac_ext
2005
if AC_TRY_EVAL(ac_compile); then
2006
case `/usr/bin/file conftest.o` in
2008
case $lt_cv_prog_gnu_ld in
2009
yes*) LD="${LD-ld} -m elf64_sparc" ;;
2011
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2023
need_locks="$enable_libtool_lock"
2027
# _LT_CMD_OLD_ARCHIVE
2028
# -------------------
2029
m4_defun([_LT_CMD_OLD_ARCHIVE],
2030
[AC_CHECK_TOOL(AR, ar, false)
2031
test -z "$AR" && AR=ar
2032
test -z "$AR_FLAGS" && AR_FLAGS=cru
2033
_LT_DECL([], [AR], [1], [The archiver])
2034
_LT_DECL([], [AR_FLAGS], [1])
2036
AC_CHECK_TOOL(STRIP, strip, :)
2037
test -z "$STRIP" && STRIP=:
2038
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2040
AC_CHECK_TOOL(RANLIB, ranlib, :)
2041
test -z "$RANLIB" && RANLIB=:
2042
_LT_DECL([], [RANLIB], [1],
2043
[Commands used to install an old-style archive])
2045
# Determine commands to create old-style static archives.
2046
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2047
old_postinstall_cmds='chmod 644 $oldlib'
2048
old_postuninstall_cmds=
2050
if test -n "$RANLIB"; then
2053
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2056
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2059
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2061
_LT_DECL([], [old_postinstall_cmds], [2])
2062
_LT_DECL([], [old_postuninstall_cmds], [2])
2063
_LT_TAGDECL([], [old_archive_cmds], [2],
2064
[Commands used to build an old-style archive])
2065
])# _LT_CMD_OLD_ARCHIVE
2068
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2069
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2070
# ----------------------------------------------------------------
2071
# Check whether the given compiler option works
2072
AC_DEFUN([_LT_COMPILER_OPTION],
2073
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2074
m4_require([_LT_DECL_SED])dnl
2075
AC_CACHE_CHECK([$1], [$2],
2077
m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2078
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2079
lt_compiler_flag="$3"
2080
# Insert the option either (1) after the last *FLAGS variable, or
2081
# (2) before a word containing "conftest.", or (3) at the end.
2082
# Note that $ac_compile itself does not contain backslashes and begins
2083
# with a dollar sign (not a hyphen), so the echo should work correctly.
2084
# The option is referenced via a variable to avoid confusing sed.
2085
lt_compile=`echo "$ac_compile" | $SED \
2086
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2087
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2088
-e 's:$: $lt_compiler_flag:'`
2089
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2090
(eval "$lt_compile" 2>conftest.err)
2092
cat conftest.err >&AS_MESSAGE_LOG_FD
2093
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2094
if (exit $ac_status) && test -s "$ac_outfile"; then
2095
# The compiler can only warn and ignore the option if not recognized
2096
# So say no if there are warnings other than the usual output.
2097
$ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2098
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2099
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2106
if test x"[$]$2" = xyes; then
2107
m4_if([$5], , :, [$5])
2109
m4_if([$6], , :, [$6])
2111
])# _LT_COMPILER_OPTION
2114
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2115
dnl aclocal-1.4 backwards compatibility:
2116
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2119
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2120
# [ACTION-SUCCESS], [ACTION-FAILURE])
2121
# ----------------------------------------------------
2122
# Check whether the given linker option works
2123
AC_DEFUN([_LT_LINKER_OPTION],
2124
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2125
m4_require([_LT_DECL_SED])dnl
2126
AC_CACHE_CHECK([$1], [$2],
2128
save_LDFLAGS="$LDFLAGS"
2129
LDFLAGS="$LDFLAGS $3"
2130
echo "$lt_simple_link_test_code" > conftest.$ac_ext
2131
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2132
# The linker can only warn and ignore the option if not recognized
2133
# So say no if there are warnings
2134
if test -s conftest.err; then
2135
# Append any errors to the config.log.
2136
cat conftest.err 1>&AS_MESSAGE_LOG_FD
2137
$ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2138
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2139
if diff conftest.exp conftest.er2 >/dev/null; then
2147
LDFLAGS="$save_LDFLAGS"
2150
if test x"[$]$2" = xyes; then
2151
m4_if([$4], , :, [$4])
2153
m4_if([$5], , :, [$5])
2155
])# _LT_LINKER_OPTION
2158
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2159
dnl aclocal-1.4 backwards compatibility:
2160
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2165
AC_DEFUN([LT_CMD_MAX_LEN],
2166
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2167
# find the maximum length of command line arguments
2168
AC_MSG_CHECKING([the maximum length of command line arguments])
2169
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2175
# On DJGPP, this test can blow up pretty badly due to problems in libc
2176
# (any single argument exceeding 2000 bytes causes a buffer overrun
2177
# during glob expansion). Even if it were fixed, the result of this
2178
# check would be larger than it should be.
2179
lt_cv_sys_max_cmd_len=12288; # 12K is about right
2183
# Under GNU Hurd, this test is not required because there is
2184
# no limit to the length of command line arguments.
2185
# Libtool will interpret -1 as no limit whatsoever
2186
lt_cv_sys_max_cmd_len=-1;
2189
cygwin* | mingw* | cegcc*)
2190
# On Win9x/ME, this test blows up -- it succeeds, but takes
2191
# about 5 minutes as the teststring grows exponentially.
2192
# Worse, since 9x/ME are not pre-emptively multitasking,
2193
# you end up with a "frozen" computer, even though with patience
2194
# the test eventually succeeds (with a max line length of 256k).
2195
# Instead, let's just punt: use the minimum linelength reported by
2196
# all of the supported platforms: 8192 (on NT/2K/XP).
2197
lt_cv_sys_max_cmd_len=8192;
2201
# On AmigaOS with pdksh, this test takes hours, literally.
2202
# So we just punt and use a minimum line length of 8192.
2203
lt_cv_sys_max_cmd_len=8192;
2206
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2207
# This has been around since 386BSD, at least. Likely further.
2208
if test -x /sbin/sysctl; then
2209
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2210
elif test -x /usr/sbin/sysctl; then
2211
lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2213
lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
2215
# And add a safety zone
2216
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2217
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2221
# We know the value 262144 and hardcode it with a safety zone (like BSD)
2222
lt_cv_sys_max_cmd_len=196608
2226
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2227
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2228
# nice to cause kernel panics so lets avoid the loop below.
2229
# First set a reasonable default.
2230
lt_cv_sys_max_cmd_len=16384
2232
if test -x /sbin/sysconfig; then
2233
case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2234
*1*) lt_cv_sys_max_cmd_len=-1 ;;
2239
lt_cv_sys_max_cmd_len=102400
2241
sysv5* | sco5v6* | sysv4.2uw2*)
2242
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2243
if test -n "$kargmax"; then
2244
lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
2246
lt_cv_sys_max_cmd_len=32768
2250
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2251
if test -n "$lt_cv_sys_max_cmd_len"; then
2252
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2253
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2255
# Make teststring a little bigger before we do anything with it.
2256
# a 1K string should be a reasonable start.
2257
for i in 1 2 3 4 5 6 7 8 ; do
2258
teststring=$teststring$teststring
2260
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2261
# If test is not a shell built-in, we'll probably end up computing a
2262
# maximum length that is only half of the actual maximum length, but
2264
while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
2265
= "XX$teststring$teststring"; } >/dev/null 2>&1 &&
2266
test $i != 17 # 1/2 MB should be enough
2269
teststring=$teststring$teststring
2271
# Only check the string length outside the loop.
2272
lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2274
# Add a significant safety factor because C++ compilers can tack on
2275
# massive amounts of additional arguments before passing them to the
2276
# linker. It appears as though 1/2 is a usable value.
2277
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2282
if test -n $lt_cv_sys_max_cmd_len ; then
2283
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2287
max_cmd_len=$lt_cv_sys_max_cmd_len
2288
_LT_DECL([], [max_cmd_len], [0],
2289
[What is the maximum length of a command?])
2293
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2294
dnl aclocal-1.4 backwards compatibility:
2295
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2300
m4_defun([_LT_HEADER_DLFCN],
2301
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2302
])# _LT_HEADER_DLFCN
2305
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2306
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2307
# ----------------------------------------------------------------
2308
m4_defun([_LT_TRY_DLOPEN_SELF],
2309
[m4_require([_LT_HEADER_DLFCN])dnl
2310
if test "$cross_compiling" = yes; then :
2313
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2314
lt_status=$lt_dlunknown
2315
cat > conftest.$ac_ext <<_LT_EOF
2316
[#line __oline__ "configure"
2317
#include "confdefs.h"
2326
# define LT_DLGLOBAL RTLD_GLOBAL
2329
# define LT_DLGLOBAL DL_GLOBAL
2331
# define LT_DLGLOBAL 0
2335
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2336
find out it does not work in some platform. */
2337
#ifndef LT_DLLAZY_OR_NOW
2339
# define LT_DLLAZY_OR_NOW RTLD_LAZY
2342
# define LT_DLLAZY_OR_NOW DL_LAZY
2345
# define LT_DLLAZY_OR_NOW RTLD_NOW
2348
# define LT_DLLAZY_OR_NOW DL_NOW
2350
# define LT_DLLAZY_OR_NOW 0
2357
void fnord() { int i=42;}
2360
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2361
int status = $lt_dlunknown;
2365
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
2366
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2367
/* dlclose (self); */
2375
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2376
(./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2379
x$lt_dlno_uscore) $1 ;;
2380
x$lt_dlneed_uscore) $2 ;;
2381
x$lt_dlunknown|x*) $3 ;;
2384
# compilation failed
2389
])# _LT_TRY_DLOPEN_SELF
2392
# LT_SYS_DLOPEN_SELF
2393
# ------------------
2394
AC_DEFUN([LT_SYS_DLOPEN_SELF],
2395
[m4_require([_LT_HEADER_DLFCN])dnl
2396
if test "x$enable_dlopen" != xyes; then
2397
enable_dlopen=unknown
2398
enable_dlopen_self=unknown
2399
enable_dlopen_self_static=unknown
2406
lt_cv_dlopen="load_add_on"
2408
lt_cv_dlopen_self=yes
2411
mingw* | pw32* | cegcc*)
2412
lt_cv_dlopen="LoadLibrary"
2417
lt_cv_dlopen="dlopen"
2422
# if libdl is installed we need to link against it
2423
AC_CHECK_LIB([dl], [dlopen],
2424
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2427
lt_cv_dlopen_self=yes
2432
AC_CHECK_FUNC([shl_load],
2433
[lt_cv_dlopen="shl_load"],
2434
[AC_CHECK_LIB([dld], [shl_load],
2435
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2436
[AC_CHECK_FUNC([dlopen],
2437
[lt_cv_dlopen="dlopen"],
2438
[AC_CHECK_LIB([dl], [dlopen],
2439
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2440
[AC_CHECK_LIB([svld], [dlopen],
2441
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2442
[AC_CHECK_LIB([dld], [dld_link],
2443
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2452
if test "x$lt_cv_dlopen" != xno; then
2458
case $lt_cv_dlopen in
2460
save_CPPFLAGS="$CPPFLAGS"
2461
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2463
save_LDFLAGS="$LDFLAGS"
2464
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2467
LIBS="$lt_cv_dlopen_libs $LIBS"
2469
AC_CACHE_CHECK([whether a program can dlopen itself],
2470
lt_cv_dlopen_self, [dnl
2471
_LT_TRY_DLOPEN_SELF(
2472
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2473
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2476
if test "x$lt_cv_dlopen_self" = xyes; then
2477
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2478
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2479
lt_cv_dlopen_self_static, [dnl
2480
_LT_TRY_DLOPEN_SELF(
2481
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2482
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2486
CPPFLAGS="$save_CPPFLAGS"
2487
LDFLAGS="$save_LDFLAGS"
2492
case $lt_cv_dlopen_self in
2493
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2494
*) enable_dlopen_self=unknown ;;
2497
case $lt_cv_dlopen_self_static in
2498
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2499
*) enable_dlopen_self_static=unknown ;;
2502
_LT_DECL([dlopen_support], [enable_dlopen], [0],
2503
[Whether dlopen is supported])
2504
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2505
[Whether dlopen of programs is supported])
2506
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2507
[Whether dlopen of statically linked programs is supported])
2508
])# LT_SYS_DLOPEN_SELF
2511
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2512
dnl aclocal-1.4 backwards compatibility:
2513
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2516
# _LT_COMPILER_C_O([TAGNAME])
2517
# ---------------------------
2518
# Check to see if options -c and -o are simultaneously supported by compiler.
2519
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2520
m4_defun([_LT_COMPILER_C_O],
2521
[m4_require([_LT_DECL_SED])dnl
2522
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2523
m4_require([_LT_TAG_COMPILER])dnl
2524
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2525
[_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2526
[_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2527
$RM -r conftest 2>/dev/null
2531
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2533
lt_compiler_flag="-o out/conftest2.$ac_objext"
2534
# Insert the option either (1) after the last *FLAGS variable, or
2535
# (2) before a word containing "conftest.", or (3) at the end.
2536
# Note that $ac_compile itself does not contain backslashes and begins
2537
# with a dollar sign (not a hyphen), so the echo should work correctly.
2538
lt_compile=`echo "$ac_compile" | $SED \
2539
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2540
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2541
-e 's:$: $lt_compiler_flag:'`
2542
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2543
(eval "$lt_compile" 2>out/conftest.err)
2545
cat out/conftest.err >&AS_MESSAGE_LOG_FD
2546
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2547
if (exit $ac_status) && test -s out/conftest2.$ac_objext
2549
# The compiler can only warn and ignore the option if not recognized
2550
# So say no if there are warnings
2551
$ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2552
$SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2553
if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2554
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2557
chmod u+w . 2>&AS_MESSAGE_LOG_FD
2559
# SGI C++ compiler will create directory out/ii_files/ for
2560
# template instantiation
2561
test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2562
$RM out/* && rmdir out
2567
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2568
[Does compiler simultaneously support -c and -o options?])
2569
])# _LT_COMPILER_C_O
2572
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2573
# ----------------------------------
2574
# Check to see if we can do hard links to lock some files if needed
2575
m4_defun([_LT_COMPILER_FILE_LOCKS],
2576
[m4_require([_LT_ENABLE_LOCK])dnl
2577
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2578
_LT_COMPILER_C_O([$1])
2580
hard_links="nottested"
2581
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2582
# do not overwrite the value of need_locks provided by the user
2583
AC_MSG_CHECKING([if we can lock with hard links])
2586
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2588
ln conftest.a conftest.b 2>&5 || hard_links=no
2589
ln conftest.a conftest.b 2>/dev/null && hard_links=no
2590
AC_MSG_RESULT([$hard_links])
2591
if test "$hard_links" = no; then
2592
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2598
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2599
])# _LT_COMPILER_FILE_LOCKS
2604
m4_defun([_LT_CHECK_OBJDIR],
2605
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2606
[rm -f .libs 2>/dev/null
2607
mkdir .libs 2>/dev/null
2608
if test -d .libs; then
2611
# MS-DOS does not allow filenames that begin with a dot.
2614
rmdir .libs 2>/dev/null])
2615
objdir=$lt_cv_objdir
2616
_LT_DECL([], [objdir], [0],
2617
[The name of the directory that contains temporary libtool files])dnl
2618
m4_pattern_allow([LT_OBJDIR])dnl
2619
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2620
[Define to the sub-directory in which libtool stores uninstalled libraries.])
2621
])# _LT_CHECK_OBJDIR
2624
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2625
# --------------------------------------
2626
# Check hardcoding attributes.
2627
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2628
[AC_MSG_CHECKING([how to hardcode library paths into programs])
2629
_LT_TAGVAR(hardcode_action, $1)=
2630
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2631
test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2632
test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2634
# We can hardcode non-existent directories.
2635
if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2636
# If the only mechanism to avoid hardcoding is shlibpath_var, we
2637
# have to relink, otherwise we might link with an installed library
2638
# when we should be linking with a yet-to-be-installed one
2639
## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2640
test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2641
# Linking always hardcodes the temporary library directory.
2642
_LT_TAGVAR(hardcode_action, $1)=relink
2644
# We can link without hardcoding, and we can hardcode nonexisting dirs.
2645
_LT_TAGVAR(hardcode_action, $1)=immediate
2648
# We cannot hardcode anything, or else we can only hardcode existing
2650
_LT_TAGVAR(hardcode_action, $1)=unsupported
2652
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2654
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2655
test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2656
# Fast installation is not supported
2657
enable_fast_install=no
2658
elif test "$shlibpath_overrides_runpath" = yes ||
2659
test "$enable_shared" = no; then
2660
# Fast installation is not necessary
2661
enable_fast_install=needless
2663
_LT_TAGDECL([], [hardcode_action], [0],
2664
[How to hardcode a shared library path into an executable])
2665
])# _LT_LINKER_HARDCODE_LIBPATH
2670
m4_defun([_LT_CMD_STRIPLIB],
2671
[m4_require([_LT_DECL_EGREP])
2674
AC_MSG_CHECKING([whether stripping libraries is possible])
2675
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2676
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2677
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2678
AC_MSG_RESULT([yes])
2680
# FIXME - insert some real tests, host_os isn't really good enough
2683
if test -n "$STRIP" ; then
2684
striplib="$STRIP -x"
2685
old_striplib="$STRIP -S"
2686
AC_MSG_RESULT([yes])
2696
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2697
_LT_DECL([], [striplib], [1])
2698
])# _LT_CMD_STRIPLIB
2701
# _LT_SYS_DYNAMIC_LINKER([TAG])
2702
# -----------------------------
2703
# PORTME Fill in your ld.so characteristics
2704
m4_defun([_LT_SYS_DYNAMIC_LINKER],
2705
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2706
m4_require([_LT_DECL_EGREP])dnl
2707
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2708
m4_require([_LT_DECL_OBJDUMP])dnl
2709
m4_require([_LT_DECL_SED])dnl
2710
AC_MSG_CHECKING([dynamic linker characteristics])
2713
if test "$GCC" = yes; then
2715
darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2716
*) lt_awk_arg="/^libraries:/" ;;
2718
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2719
if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2720
# if the path contains ";" then we assume it to be the separator
2721
# otherwise default to the standard path separator (i.e. ":") - it is
2722
# assumed that no part of a normal pathname contains ";" but that should
2723
# okay in the real world where ";" in dirpaths is itself problematic.
2724
lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2726
lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2728
# Ok, now we have the path, separated by spaces, we can step through it
2729
# and add multilib dir if necessary.
2730
lt_tmp_lt_search_path_spec=
2731
lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2732
for lt_sys_path in $lt_search_path_spec; do
2733
if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2734
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2736
test -d "$lt_sys_path" && \
2737
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2740
lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2741
BEGIN {RS=" "; FS="/|\n";} {
2744
for (lt_i = NF; lt_i > 0; lt_i--) {
2745
if ($lt_i != "" && $lt_i != ".") {
2746
if ($lt_i == "..") {
2749
if (lt_count == 0) {
2750
lt_foo="/" $lt_i lt_foo;
2757
if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2758
if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2760
sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2762
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2765
libname_spec='lib$name'
2773
shlibpath_overrides_runpath=unknown
2775
dynamic_linker="$host_os ld.so"
2776
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2777
need_lib_prefix=unknown
2778
hardcode_into_libs=no
2780
# when you set need_version to no, make sure it does not cause -set_version
2781
# flags to be left without arguments
2782
need_version=unknown
2787
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2788
shlibpath_var=LIBPATH
2790
# AIX 3 has no versioning support, so we append a major version to the name.
2791
soname_spec='${libname}${release}${shared_ext}$major'
2798
hardcode_into_libs=yes
2799
if test "$host_cpu" = ia64; then
2800
# AIX 5 supports IA64
2801
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2802
shlibpath_var=LD_LIBRARY_PATH
2804
# With GCC up to 2.95.x, collect2 would create an import file
2805
# for dependence libraries. The import file would start with
2806
# the line `#! .'. This would cause the generated library to
2807
# depend on `.', always an invalid library. This was fixed in
2808
# development snapshots of GCC prior to 3.0.
2810
aix4 | aix4.[[01]] | aix4.[[01]].*)
2811
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2813
echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2820
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2821
# soname into executable. Probably we can add versioning support to
2822
# collect2, so additional links can be useful in future.
2823
if test "$aix_use_runtimelinking" = yes; then
2824
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
2825
# instead of lib<name>.a to let people know that these are not
2826
# typical AIX shared libraries.
2827
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2829
# We preserve .a as extension for shared libraries through AIX4.2
2830
# and later when we are not doing run time linking.
2831
library_names_spec='${libname}${release}.a $libname.a'
2832
soname_spec='${libname}${release}${shared_ext}$major'
2834
shlibpath_var=LIBPATH
2841
# Since July 2007 AmigaOS4 officially supports .so libraries.
2842
# When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2843
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2846
library_names_spec='$libname.ixlibrary $libname.a'
2847
# Create ${libname}_ixlibrary.a entries in /sys/libs.
2848
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'
2854
library_names_spec='${libname}${shared_ext}'
2855
dynamic_linker="$host_os ld.so"
2856
shlibpath_var=LIBRARY_PATH
2862
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2863
soname_spec='${libname}${release}${shared_ext}$major'
2864
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2865
shlibpath_var=LD_LIBRARY_PATH
2866
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2867
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2868
# the default ld.so.conf also contains /usr/contrib/lib and
2869
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2870
# libtool to hard-code these into programs
2873
cygwin* | mingw* | pw32* | cegcc*)
2874
version_type=windows
2879
case $GCC,$host_os in
2880
yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2881
library_names_spec='$libname.dll.a'
2882
# DLL is installed to $(libdir)/../bin by postinstall_cmds
2883
postinstall_cmds='base_file=`basename \${file}`~
2884
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2885
dldir=$destdir/`dirname \$dlpath`~
2886
test -d \$dldir || mkdir -p \$dldir~
2887
$install_prog $dir/$dlname \$dldir/$dlname~
2888
chmod a+x \$dldir/$dlname~
2889
if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2890
eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2892
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2893
dlpath=$dir/\$dldll~
2895
shlibpath_overrides_runpath=yes
2899
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
2900
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2901
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2904
# MinGW DLLs use traditional 'lib' prefix
2905
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2906
sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2907
if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2908
# It is most probably a Windows format PATH printed by
2909
# mingw gcc, but we are running on Cygwin. Gcc prints its search
2910
# path with ; separators, and with drive letters. We can handle the
2911
# drive letters (cygwin fileutils understands them), so leave them,
2912
# especially as we might pass files found there to a mingw objdump,
2913
# which wouldn't understand a cygwinified path. Ahh.
2914
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2916
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2920
# pw32 DLLs use 'pw' prefix rather than 'lib'
2921
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2927
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2930
dynamic_linker='Win32 ld.exe'
2931
# FIXME: first we should search . and the directory the executable is in
2935
darwin* | rhapsody*)
2936
dynamic_linker="$host_os dyld"
2940
library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2941
soname_spec='${libname}${release}${major}$shared_ext'
2942
shlibpath_overrides_runpath=yes
2943
shlibpath_var=DYLD_LIBRARY_PATH
2944
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2946
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2947
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2954
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2955
soname_spec='${libname}${release}${shared_ext}$major'
2956
shlibpath_var=LD_LIBRARY_PATH
2963
freebsd* | dragonfly*)
2964
# DragonFly does not have aout. When/if they implement a new
2965
# versioning mechanism, adjust this.
2966
if test -x /usr/bin/objformat; then
2967
objformat=`/usr/bin/objformat`
2970
freebsd[[123]]*) objformat=aout ;;
2974
version_type=freebsd-$objformat
2975
case $version_type in
2977
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2982
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2986
shlibpath_var=LD_LIBRARY_PATH
2989
shlibpath_overrides_runpath=yes
2991
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2992
shlibpath_overrides_runpath=yes
2993
hardcode_into_libs=yes
2995
freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2996
freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2997
shlibpath_overrides_runpath=no
2998
hardcode_into_libs=yes
3000
*) # from 4.6 on, and DragonFly
3001
shlibpath_overrides_runpath=yes
3002
hardcode_into_libs=yes
3011
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3012
soname_spec='${libname}${release}${shared_ext}$major'
3013
shlibpath_var=LD_LIBRARY_PATH
3014
hardcode_into_libs=yes
3017
hpux9* | hpux10* | hpux11*)
3018
# Give a soname corresponding to the major version so that dld.sl refuses to
3019
# link against other versions.
3026
hardcode_into_libs=yes
3027
dynamic_linker="$host_os dld.so"
3028
shlibpath_var=LD_LIBRARY_PATH
3029
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3030
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3031
soname_spec='${libname}${release}${shared_ext}$major'
3032
if test "X$HPUX_IA64_MODE" = X32; then
3033
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3035
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3037
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3041
hardcode_into_libs=yes
3042
dynamic_linker="$host_os dld.sl"
3043
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3044
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3045
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3046
soname_spec='${libname}${release}${shared_ext}$major'
3047
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3048
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3052
dynamic_linker="$host_os dld.sl"
3053
shlibpath_var=SHLIB_PATH
3054
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3055
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3056
soname_spec='${libname}${release}${shared_ext}$major'
3059
# HP-UX runs *really* slowly unless shared libraries are mode 555.
3060
postinstall_cmds='chmod 555 $lib'
3067
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3068
soname_spec='${libname}${release}${shared_ext}$major'
3069
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3070
shlibpath_var=LD_LIBRARY_PATH
3071
shlibpath_overrides_runpath=no
3072
hardcode_into_libs=yes
3075
irix5* | irix6* | nonstopux*)
3077
nonstopux*) version_type=nonstopux ;;
3079
if test "$lt_cv_prog_gnu_ld" = yes; then
3087
soname_spec='${libname}${release}${shared_ext}$major'
3088
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3090
irix5* | nonstopux*)
3094
case $LD in # libtool.m4 will add one of these switches to LD
3095
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3096
libsuff= shlibsuff= libmagic=32-bit;;
3097
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3098
libsuff=32 shlibsuff=N32 libmagic=N32;;
3099
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3100
libsuff=64 shlibsuff=64 libmagic=64-bit;;
3101
*) libsuff= shlibsuff= libmagic=never-match;;
3105
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3106
shlibpath_overrides_runpath=no
3107
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3108
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3109
hardcode_into_libs=yes
3112
# No shared lib support for Linux oldld, aout, or coff.
3113
linux*oldld* | linux*aout* | linux*coff*)
3117
# This must be Linux ELF.
3118
linux* | k*bsd*-gnu)
3122
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3123
soname_spec='${libname}${release}${shared_ext}$major'
3124
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3125
shlibpath_var=LD_LIBRARY_PATH
3126
shlibpath_overrides_runpath=no
3127
# Some binutils ld are patched to set DT_RUNPATH
3128
save_LDFLAGS=$LDFLAGS
3130
eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3131
LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3132
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3133
[AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3134
[shlibpath_overrides_runpath=yes])])
3135
LDFLAGS=$save_LDFLAGS
3138
# This implies no fast_install, which is unacceptable.
3139
# Some rework will be needed to allow for fast_install
3140
# before this can be enabled.
3141
hardcode_into_libs=yes
3143
# Append ld.so.conf contents to the search path
3144
if test -f /etc/ld.so.conf; then
3145
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' ' '`
3146
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3149
# We used to test for /lib/ld.so.1 and disable shared libraries on
3150
# powerpc, because MkLinux only supported shared libraries with the
3151
# GNU dynamic linker. Since this was broken with cross compilers,
3152
# most powerpc-linux boxes support dynamic linking these days and
3153
# people can always --disable-shared, the test was removed, and we
3154
# assume the GNU/Linux dynamic linker is in use.
3155
dynamic_linker='GNU/Linux ld.so'
3162
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3163
soname_spec='${libname}${release}${shared_ext}$major'
3164
shlibpath_var=LD_LIBRARY_PATH
3165
shlibpath_overrides_runpath=no
3166
hardcode_into_libs=yes
3167
dynamic_linker='NetBSD ld.elf_so'
3174
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3175
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3176
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3177
dynamic_linker='NetBSD (a.out) ld.so'
3179
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3180
soname_spec='${libname}${release}${shared_ext}$major'
3181
dynamic_linker='NetBSD ld.elf_so'
3183
shlibpath_var=LD_LIBRARY_PATH
3184
shlibpath_overrides_runpath=yes
3185
hardcode_into_libs=yes
3190
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3191
shlibpath_var=LD_LIBRARY_PATH
3192
shlibpath_overrides_runpath=yes
3199
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3200
soname_spec='${libname}${release}${shared_ext}$major'
3201
shlibpath_var=LD_LIBRARY_PATH
3202
shlibpath_overrides_runpath=no
3203
hardcode_into_libs=yes
3204
dynamic_linker='ldqnx.so'
3209
sys_lib_dlsearch_path_spec="/usr/lib"
3211
# Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3213
openbsd3.3 | openbsd3.3.*) need_version=yes ;;
3214
*) need_version=no ;;
3216
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3217
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3218
shlibpath_var=LD_LIBRARY_PATH
3219
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3221
openbsd2.[[89]] | openbsd2.[[89]].*)
3222
shlibpath_overrides_runpath=no
3225
shlibpath_overrides_runpath=yes
3229
shlibpath_overrides_runpath=yes
3234
libname_spec='$name'
3237
library_names_spec='$libname${shared_ext} $libname.a'
3238
dynamic_linker='OS/2 ld.exe'
3239
shlibpath_var=LIBPATH
3242
osf3* | osf4* | osf5*)
3246
soname_spec='${libname}${release}${shared_ext}$major'
3247
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3248
shlibpath_var=LD_LIBRARY_PATH
3249
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3250
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3261
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3262
soname_spec='${libname}${release}${shared_ext}$major'
3263
shlibpath_var=LD_LIBRARY_PATH
3264
shlibpath_overrides_runpath=yes
3265
hardcode_into_libs=yes
3266
# ldd complains unless libraries are executable
3267
postinstall_cmds='chmod +x $lib'
3272
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3273
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3274
shlibpath_var=LD_LIBRARY_PATH
3275
shlibpath_overrides_runpath=yes
3276
if test "$with_gnu_ld" = yes; then
3284
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3285
soname_spec='${libname}${release}${shared_ext}$major'
3286
shlibpath_var=LD_LIBRARY_PATH
3287
case $host_vendor in
3289
shlibpath_overrides_runpath=no
3291
runpath_var=LD_RUN_PATH
3299
shlibpath_overrides_runpath=no
3300
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3306
if test -d /usr/nec ;then
3308
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3309
soname_spec='$libname${shared_ext}.$major'
3310
shlibpath_var=LD_LIBRARY_PATH
3314
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3315
version_type=freebsd-elf
3318
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3319
soname_spec='${libname}${release}${shared_ext}$major'
3320
shlibpath_var=LD_LIBRARY_PATH
3321
shlibpath_overrides_runpath=yes
3322
hardcode_into_libs=yes
3323
if test "$with_gnu_ld" = yes; then
3324
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3326
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3329
sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3333
sys_lib_dlsearch_path_spec='/usr/lib'
3337
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3341
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3342
shlibpath_var=LD_LIBRARY_PATH
3343
shlibpath_overrides_runpath=no
3344
hardcode_into_libs=yes
3349
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3350
soname_spec='${libname}${release}${shared_ext}$major'
3351
shlibpath_var=LD_LIBRARY_PATH
3358
AC_MSG_RESULT([$dynamic_linker])
3359
test "$dynamic_linker" = no && can_build_shared=no
3361
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3362
if test "$GCC" = yes; then
3363
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3366
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3367
sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3369
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3370
sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3373
_LT_DECL([], [variables_saved_for_relink], [1],
3374
[Variables whose values should be saved in libtool wrapper scripts and
3375
restored at link time])
3376
_LT_DECL([], [need_lib_prefix], [0],
3377
[Do we need the "lib" prefix for modules?])
3378
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3379
_LT_DECL([], [version_type], [0], [Library versioning type])
3380
_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3381
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3382
_LT_DECL([], [shlibpath_overrides_runpath], [0],
3383
[Is shlibpath searched before the hard-coded library search path?])
3384
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3385
_LT_DECL([], [library_names_spec], [1],
3386
[[List of archive names. First name is the real one, the rest are links.
3387
The last name is the one that the linker finds with -lNAME]])
3388
_LT_DECL([], [soname_spec], [1],
3389
[[The coded name of the library, if different from the real name]])
3390
_LT_DECL([], [postinstall_cmds], [2],
3391
[Command to use after installation of a shared archive])
3392
_LT_DECL([], [postuninstall_cmds], [2],
3393
[Command to use after uninstallation of a shared archive])
3394
_LT_DECL([], [finish_cmds], [2],
3395
[Commands used to finish a libtool library installation in a directory])
3396
_LT_DECL([], [finish_eval], [1],
3397
[[As "finish_cmds", except a single script fragment to be evaled but
3399
_LT_DECL([], [hardcode_into_libs], [0],
3400
[Whether we should hardcode library paths into libraries])
3401
_LT_DECL([], [sys_lib_search_path_spec], [2],
3402
[Compile-time system search path for libraries])
3403
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3404
[Run-time system search path for libraries])
3405
])# _LT_SYS_DYNAMIC_LINKER
3408
# _LT_PATH_TOOL_PREFIX(TOOL)
3409
# --------------------------
3410
# find a file program which can recognize shared library
3411
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3412
[m4_require([_LT_DECL_EGREP])dnl
3413
AC_MSG_CHECKING([for $1])
3414
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3416
[[\\/*] | ?:[\\/]*])
3417
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3420
lt_save_MAGIC_CMD="$MAGIC_CMD"
3421
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3422
dnl $ac_dummy forces splitting on constant user-supplied paths.
3423
dnl POSIX.2 word splitting is done only on the output of word expansions,
3424
dnl not every word. This closes a longstanding sh security hole.
3425
ac_dummy="m4_if([$2], , $PATH, [$2])"
3426
for ac_dir in $ac_dummy; do
3428
test -z "$ac_dir" && ac_dir=.
3429
if test -f $ac_dir/$1; then
3430
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3431
if test -n "$file_magic_test_file"; then
3432
case $deplibs_check_method in
3434
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3435
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3436
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3437
$EGREP "$file_magic_regex" > /dev/null; then
3442
*** Warning: the command libtool uses to detect shared libraries,
3443
*** $file_magic_cmd, produces output that libtool cannot recognize.
3444
*** The result is that libtool may fail to recognize shared libraries
3445
*** as such. This will affect the creation of libtool libraries that
3446
*** depend on shared libraries, but programs linked with such libtool
3447
*** libraries will work regardless of this problem. Nevertheless, you
3448
*** may want to report the problem to your system manager and/or to
3449
*** bug-libtool@gnu.org
3459
MAGIC_CMD="$lt_save_MAGIC_CMD"
3462
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3463
if test -n "$MAGIC_CMD"; then
3464
AC_MSG_RESULT($MAGIC_CMD)
3468
_LT_DECL([], [MAGIC_CMD], [0],
3469
[Used to examine libraries when file_magic_cmd begins with "file"])dnl
3470
])# _LT_PATH_TOOL_PREFIX
3473
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3474
dnl aclocal-1.4 backwards compatibility:
3475
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3480
# find a file program which can recognize a shared library
3481
m4_defun([_LT_PATH_MAGIC],
3482
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3483
if test -z "$lt_cv_path_MAGIC_CMD"; then
3484
if test -n "$ac_tool_prefix"; then
3485
_LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3495
# find the pathname to the GNU or non-GNU linker
3496
AC_DEFUN([LT_PATH_LD],
3497
[AC_REQUIRE([AC_PROG_CC])dnl
3498
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3499
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3500
m4_require([_LT_DECL_SED])dnl
3501
m4_require([_LT_DECL_EGREP])dnl
3503
AC_ARG_WITH([gnu-ld],
3504
[AS_HELP_STRING([--with-gnu-ld],
3505
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3506
[test "$withval" = no || with_gnu_ld=yes],
3507
[with_gnu_ld=no])dnl
3510
if test "$GCC" = yes; then
3511
# Check if gcc -print-prog-name=ld gives a path.
3512
AC_MSG_CHECKING([for ld used by $CC])
3515
# gcc leaves a trailing carriage return which upsets mingw
3516
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3518
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3521
# Accept absolute paths.
3522
[[\\/]]* | ?:[[\\/]]*)
3523
re_direlt='/[[^/]][[^/]]*/\.\./'
3524
# Canonicalize the pathname of ld
3525
ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3526
while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3527
ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3529
test -z "$LD" && LD="$ac_prog"
3532
# If it fails, then pretend we aren't using GCC.
3536
# If it is relative, then search for the first ld in PATH.
3540
elif test "$with_gnu_ld" = yes; then
3541
AC_MSG_CHECKING([for GNU ld])
3543
AC_MSG_CHECKING([for non-GNU ld])
3545
AC_CACHE_VAL(lt_cv_path_LD,
3546
[if test -z "$LD"; then
3547
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3548
for ac_dir in $PATH; do
3550
test -z "$ac_dir" && ac_dir=.
3551
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3552
lt_cv_path_LD="$ac_dir/$ac_prog"
3553
# Check to see if the program is GNU ld. I'd rather use --version,
3554
# but apparently some variants of GNU ld only accept -v.
3555
# Break only if it was the GNU/non-GNU ld that we prefer.
3556
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3557
*GNU* | *'with BFD'*)
3558
test "$with_gnu_ld" != no && break
3561
test "$with_gnu_ld" != yes && break
3568
lt_cv_path_LD="$LD" # Let the user override the test with a path.
3571
if test -n "$LD"; then
3576
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3580
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3584
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3585
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3586
dnl aclocal-1.4 backwards compatibility:
3587
dnl AC_DEFUN([AM_PROG_LD], [])
3588
dnl AC_DEFUN([AC_PROG_LD], [])
3593
m4_defun([_LT_PATH_LD_GNU],
3594
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3595
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3596
case `$LD -v 2>&1 </dev/null` in
3597
*GNU* | *'with BFD'*)
3598
lt_cv_prog_gnu_ld=yes
3601
lt_cv_prog_gnu_ld=no
3604
with_gnu_ld=$lt_cv_prog_gnu_ld
3610
# find reload flag for linker
3611
# -- PORTME Some linkers may need a different reload flag.
3612
m4_defun([_LT_CMD_RELOAD],
3613
[AC_CACHE_CHECK([for $LD option to reload object files],
3614
lt_cv_ld_reload_flag,
3615
[lt_cv_ld_reload_flag='-r'])
3616
reload_flag=$lt_cv_ld_reload_flag
3617
case $reload_flag in
3619
*) reload_flag=" $reload_flag" ;;
3621
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3624
if test "$GCC" = yes; then
3625
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3627
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3631
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3632
_LT_DECL([], [reload_cmds], [2])dnl
3636
# _LT_CHECK_MAGIC_METHOD
3637
# ----------------------
3638
# how to check for library dependencies
3639
# -- PORTME fill in with the dynamic library characteristics
3640
m4_defun([_LT_CHECK_MAGIC_METHOD],
3641
[m4_require([_LT_DECL_EGREP])
3642
m4_require([_LT_DECL_OBJDUMP])
3643
AC_CACHE_CHECK([how to recognize dependent libraries],
3644
lt_cv_deplibs_check_method,
3645
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3646
lt_cv_file_magic_test_file=
3647
lt_cv_deplibs_check_method='unknown'
3648
# Need to set the preceding variable on all platforms that support
3649
# interlibrary dependencies.
3650
# 'none' -- dependencies not supported.
3651
# `unknown' -- same as none, but documents that we really don't know.
3652
# 'pass_all' -- all dependencies passed with no checks.
3653
# 'test_compile' -- check by making test program.
3654
# 'file_magic [[regex]]' -- check by looking for files in library path
3655
# which responds to the $file_magic_cmd with a given extended regex.
3656
# If you have `file' or equivalent on your system and you're not sure
3657
# whether `pass_all' will *always* work, you probably want this one.
3661
lt_cv_deplibs_check_method=pass_all
3665
lt_cv_deplibs_check_method=pass_all
3669
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3670
lt_cv_file_magic_cmd='/usr/bin/file -L'
3671
lt_cv_file_magic_test_file=/shlib/libc.so
3675
# func_win32_libid is a shell function defined in ltmain.sh
3676
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3677
lt_cv_file_magic_cmd='func_win32_libid'
3681
# Base MSYS/MinGW do not provide the 'file' command needed by
3682
# func_win32_libid shell function, so use a weaker test based on 'objdump',
3683
# unless we find 'file', for example because we are cross-compiling.
3684
if ( file / ) >/dev/null 2>&1; then
3685
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3686
lt_cv_file_magic_cmd='func_win32_libid'
3688
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3689
lt_cv_file_magic_cmd='$OBJDUMP -f'
3694
# use the weaker test based on 'objdump'. See mingw*.
3695
lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3696
lt_cv_file_magic_cmd='$OBJDUMP -f'
3699
darwin* | rhapsody*)
3700
lt_cv_deplibs_check_method=pass_all
3703
freebsd* | dragonfly*)
3704
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3707
# Not sure whether the presence of OpenBSD here was a mistake.
3708
# Let's accept both of them until this is cleared up.
3709
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3710
lt_cv_file_magic_cmd=/usr/bin/file
3711
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3715
lt_cv_deplibs_check_method=pass_all
3720
lt_cv_deplibs_check_method=pass_all
3723
hpux10.20* | hpux11*)
3724
lt_cv_file_magic_cmd=/usr/bin/file
3727
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3728
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3731
[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]']
3732
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3735
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3736
lt_cv_file_magic_test_file=/usr/lib/libc.sl
3742
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3743
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3746
irix5* | irix6* | nonstopux*)
3748
*-32|*"-32 ") libmagic=32-bit;;
3749
*-n32|*"-n32 ") libmagic=N32;;
3750
*-64|*"-64 ") libmagic=64-bit;;
3751
*) libmagic=never-match;;
3753
lt_cv_deplibs_check_method=pass_all
3756
# This must be Linux ELF.
3757
linux* | k*bsd*-gnu)
3758
lt_cv_deplibs_check_method=pass_all
3761
netbsd* | netbsdelf*-gnu)
3762
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3763
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3765
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3770
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3771
lt_cv_file_magic_cmd=/usr/bin/file
3772
lt_cv_file_magic_test_file=/usr/lib/libnls.so
3776
lt_cv_deplibs_check_method=pass_all
3780
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3781
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3783
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3787
osf3* | osf4* | osf5*)
3788
lt_cv_deplibs_check_method=pass_all
3792
lt_cv_deplibs_check_method=pass_all
3796
lt_cv_deplibs_check_method=pass_all
3799
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3800
lt_cv_deplibs_check_method=pass_all
3804
case $host_vendor in
3806
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]]'
3807
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3810
lt_cv_deplibs_check_method=pass_all
3813
lt_cv_file_magic_cmd='/bin/file'
3814
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3817
lt_cv_file_magic_cmd='/bin/file'
3818
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3819
lt_cv_file_magic_test_file=/lib/libc.so
3822
lt_cv_deplibs_check_method=pass_all
3825
lt_cv_deplibs_check_method=pass_all
3831
lt_cv_deplibs_check_method=pass_all
3835
file_magic_cmd=$lt_cv_file_magic_cmd
3836
deplibs_check_method=$lt_cv_deplibs_check_method
3837
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3839
_LT_DECL([], [deplibs_check_method], [1],
3840
[Method to check whether dependent libraries are shared objects])
3841
_LT_DECL([], [file_magic_cmd], [1],
3842
[Command to use when deplibs_check_method == "file_magic"])
3843
])# _LT_CHECK_MAGIC_METHOD
3848
# find the pathname to a BSD- or MS-compatible name lister
3849
AC_DEFUN([LT_PATH_NM],
3850
[AC_REQUIRE([AC_PROG_CC])dnl
3851
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3852
[if test -n "$NM"; then
3853
# Let the user override the test.
3856
lt_nm_to_check="${ac_tool_prefix}nm"
3857
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3858
lt_nm_to_check="$lt_nm_to_check nm"
3860
for lt_tmp_nm in $lt_nm_to_check; do
3861
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3862
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3864
test -z "$ac_dir" && ac_dir=.
3865
tmp_nm="$ac_dir/$lt_tmp_nm"
3866
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3867
# Check to see if the nm accepts a BSD-compat flag.
3868
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3869
# nm: unknown option "B" ignored
3870
# Tru64's nm complains that /dev/null is an invalid object file
3871
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3872
*/dev/null* | *'Invalid file or object type'*)
3873
lt_cv_path_NM="$tmp_nm -B"
3877
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3879
lt_cv_path_NM="$tmp_nm -p"
3883
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3884
continue # so that we can try to find one that supports BSD flags
3893
: ${lt_cv_path_NM=no}
3895
if test "$lt_cv_path_NM" != "no"; then
3898
# Didn't find any BSD compatible name lister, look for dumpbin.
3899
AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3901
if test "$DUMPBIN" != ":"; then
3905
test -z "$NM" && NM=nm
3907
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3909
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3910
[lt_cv_nm_interface="BSD nm"
3911
echo "int some_variable = 0;" > conftest.$ac_ext
3912
(eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3913
(eval "$ac_compile" 2>conftest.err)
3914
cat conftest.err >&AS_MESSAGE_LOG_FD
3915
(eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3916
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3917
cat conftest.err >&AS_MESSAGE_LOG_FD
3918
(eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3919
cat conftest.out >&AS_MESSAGE_LOG_FD
3920
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3921
lt_cv_nm_interface="MS dumpbin"
3927
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3928
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3929
dnl aclocal-1.4 backwards compatibility:
3930
dnl AC_DEFUN([AM_PROG_NM], [])
3931
dnl AC_DEFUN([AC_PROG_NM], [])
3936
# check for math library
3937
AC_DEFUN([LT_LIB_M],
3938
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3941
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3942
# These system don't have libm, or don't need it
3945
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3946
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3949
AC_CHECK_LIB(m, cos, LIBM="-lm")
3956
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3957
dnl aclocal-1.4 backwards compatibility:
3958
dnl AC_DEFUN([AC_CHECK_LIBM], [])
3961
# _LT_COMPILER_NO_RTTI([TAGNAME])
3962
# -------------------------------
3963
m4_defun([_LT_COMPILER_NO_RTTI],
3964
[m4_require([_LT_TAG_COMPILER])dnl
3966
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3968
if test "$GCC" = yes; then
3969
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3971
_LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3972
lt_cv_prog_compiler_rtti_exceptions,
3973
[-fno-rtti -fno-exceptions], [],
3974
[_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3976
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3977
[Compiler flag to turn off builtin functions])
3978
])# _LT_COMPILER_NO_RTTI
3981
# _LT_CMD_GLOBAL_SYMBOLS
3982
# ----------------------
3983
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3984
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3985
AC_REQUIRE([AC_PROG_CC])dnl
3986
AC_REQUIRE([LT_PATH_NM])dnl
3987
AC_REQUIRE([LT_PATH_LD])dnl
3988
m4_require([_LT_DECL_SED])dnl
3989
m4_require([_LT_DECL_EGREP])dnl
3990
m4_require([_LT_TAG_COMPILER])dnl
3992
# Check for command to grab the raw symbol name followed by C symbol from nm.
3993
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3994
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3996
# These are sane defaults that work on at least a few old systems.
3997
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
3999
# Character class describing NM global symbol codes.
4000
symcode='[[BCDEGRST]]'
4002
# Regexp to match symbols that can be accessed directly from C.
4003
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4005
# Define system-specific variables.
4010
cygwin* | mingw* | pw32* | cegcc*)
4011
symcode='[[ABCDGISTW]]'
4014
if test "$host_cpu" = ia64; then
4015
symcode='[[ABCDEGRST]]'
4019
symcode='[[BCDEGRST]]'
4022
symcode='[[BCDEGQRST]]'
4033
sysv5* | sco5v6* | unixware* | OpenUNIX*)
4037
symcode='[[DFNSTU]]'
4041
# If we're using GNU nm, then use its standard symbol codes.
4042
case `$NM -V 2>&1` in
4043
*GNU* | *'with BFD'*)
4044
symcode='[[ABCDGIRSTW]]' ;;
4047
# Transform an extracted symbol line into a proper C declaration.
4048
# Some systems (esp. on ia64) link data and code symbols differently,
4049
# so use this general approach.
4050
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4052
# Transform an extracted symbol line into symbol name and symbol address
4053
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
4054
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'"
4056
# Handle CRLF in mingw tool chain
4060
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4064
# Try without a prefix underscore, then with it.
4065
for ac_symprfx in "" "_"; do
4067
# Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4068
symxfrm="\\1 $ac_symprfx\\2 \\2"
4070
# Write the raw and C identifiers.
4071
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4072
# Fake it for dumpbin and say T for any non-static function
4073
# and D for any global variable.
4074
# Also find C++ and __fastcall symbols from MSVC++,
4075
# which start with @ or ?.
4076
lt_cv_sys_global_symbol_pipe="$AWK ['"\
4077
" {last_section=section; section=\$ 3};"\
4078
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4079
" \$ 0!~/External *\|/{next};"\
4080
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4081
" {if(hide[section]) next};"\
4082
" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4083
" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4084
" s[1]~/^[@?]/{print s[1], s[1]; next};"\
4085
" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4086
" ' prfx=^$ac_symprfx]"
4088
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4091
# Check to see that the pipe works correctly.
4095
cat > conftest.$ac_ext <<_LT_EOF
4100
void nm_test_func(void);
4101
void nm_test_func(void){}
4105
int main(){nm_test_var='a';nm_test_func();return(0);}
4108
if AC_TRY_EVAL(ac_compile); then
4109
# Now try to grab the symbols.
4111
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4112
# Try sorting and uniquifying the output.
4113
if sort "$nlist" | uniq > "$nlist"T; then
4114
mv -f "$nlist"T "$nlist"
4119
# Make sure that we snagged all the symbols we need.
4120
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4121
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4122
cat <<_LT_EOF > conftest.$ac_ext
4128
# Now generate the symbol file.
4129
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4131
cat <<_LT_EOF >> conftest.$ac_ext
4133
/* The mapping between symbol names and symbols. */
4138
lt__PROGRAM__LTX_preloaded_symbols[[]] =
4140
{ "@PROGRAM@", (void *) 0 },
4142
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4143
cat <<\_LT_EOF >> conftest.$ac_ext
4147
/* This works around a problem in FreeBSD linker */
4148
#ifdef FREEBSD_WORKAROUND
4149
static const void *lt_preloaded_setup() {
4150
return lt__PROGRAM__LTX_preloaded_symbols;
4158
# Now try linking the two files.
4159
mv conftest.$ac_objext conftstm.$ac_objext
4160
lt_save_LIBS="$LIBS"
4161
lt_save_CFLAGS="$CFLAGS"
4162
LIBS="conftstm.$ac_objext"
4163
CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4164
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4167
LIBS="$lt_save_LIBS"
4168
CFLAGS="$lt_save_CFLAGS"
4170
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4173
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4176
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4179
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4180
cat conftest.$ac_ext >&5
4182
rm -rf conftest* conftst*
4184
# Do not use the global_symbol_pipe unless it works.
4185
if test "$pipe_works" = yes; then
4188
lt_cv_sys_global_symbol_pipe=
4192
if test -z "$lt_cv_sys_global_symbol_pipe"; then
4193
lt_cv_sys_global_symbol_to_cdecl=
4195
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4196
AC_MSG_RESULT(failed)
4201
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4202
[Take the output of nm and produce a listing of raw symbols and C names])
4203
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4204
[Transform the output of nm in a proper C declaration])
4205
_LT_DECL([global_symbol_to_c_name_address],
4206
[lt_cv_sys_global_symbol_to_c_name_address], [1],
4207
[Transform the output of nm in a C name address pair])
4208
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4209
[lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4210
[Transform the output of nm in a C name address pair when lib prefix is needed])
4211
]) # _LT_CMD_GLOBAL_SYMBOLS
4214
# _LT_COMPILER_PIC([TAGNAME])
4215
# ---------------------------
4216
m4_defun([_LT_COMPILER_PIC],
4217
[m4_require([_LT_TAG_COMPILER])dnl
4218
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4219
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4220
_LT_TAGVAR(lt_prog_compiler_static, $1)=
4222
AC_MSG_CHECKING([for $compiler option to produce PIC])
4223
m4_if([$1], [CXX], [
4224
# C++ specific cases for pic, static, wl, etc.
4225
if test "$GXX" = yes; then
4226
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4227
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4231
# All AIX code is PIC.
4232
if test "$host_cpu" = ia64; then
4233
# AIX 5 now supports IA64 processor
4234
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4241
# see comment about AmigaOS4 .so support
4242
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4245
# FIXME: we need at least 68020 code to build shared libraries, but
4246
# adding the `-m68020' flag to GCC prevents building anything better,
4248
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4253
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4254
# PIC is the default for these OSes.
4256
mingw* | cygwin* | os2* | pw32* | cegcc*)
4257
# This hack is so that the source file can tell whether it is being
4258
# built for inclusion in a dll (and should export symbols for example).
4259
# Although the cygwin gcc ignores -fPIC, still need this for old-style
4260
# (--disable-auto-import) libraries
4261
m4_if([$1], [GCJ], [],
4262
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4264
darwin* | rhapsody*)
4265
# PIC is the default on this platform
4266
# Common symbols not allowed in MH_DYLIB files
4267
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4270
# DJGPP does not support shared libraries at all
4271
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4274
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
4275
# Instead, we relocate shared libraries at runtime.
4278
if test -d /usr/nec; then
4279
_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4283
# PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4284
# PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4285
# sets the default TLS model and affects inlining.
4290
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4295
# QNX uses GNU C++, but need to define -shared option too, otherwise
4297
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4300
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4306
# All AIX code is PIC.
4307
if test "$host_cpu" = ia64; then
4308
# AIX 5 now supports IA64 processor
4309
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4311
_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4315
case $cc_basename in
4317
# Green Hills C++ Compiler
4318
# _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"
4323
case $cc_basename in
4325
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4328
# Green Hills C++ Compiler
4329
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4335
freebsd* | dragonfly*)
4336
# FreeBSD uses GNU C++
4338
hpux9* | hpux10* | hpux11*)
4339
case $cc_basename in
4341
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4342
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4343
if test "$host_cpu" != ia64; then
4344
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4348
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4349
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4355
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4364
# This is c89, which is MS Visual C++ (no shared libs)
4365
# Anyone wants to do a port?
4367
irix5* | irix6* | nonstopux*)
4368
case $cc_basename in
4370
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4371
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4372
# CC pic flag -KPIC is the default.
4378
linux* | k*bsd*-gnu)
4379
case $cc_basename in
4382
_LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4383
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4386
# old Intel C++ for x86_64 which still supported -KPIC.
4387
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4388
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4389
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4392
# Intel C++, used to be incompatible with GCC.
4393
# ICC 10 doesn't accept -KPIC any more.
4394
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4395
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4396
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4399
# Portland Group C++ compiler
4400
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4401
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4402
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4406
# Make sure the PIC flag is empty. It appears that all Alpha
4407
# Linux and Compaq Tru64 Unix objects are PIC.
4408
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4409
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4413
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4414
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4415
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4418
case `$CC -V 2>&1 | sed 5q` in
4421
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4422
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4423
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4434
case $cc_basename in
4436
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4442
netbsd* | netbsdelf*-gnu)
4445
# QNX uses GNU C++, but need to define -shared option too, otherwise
4447
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4449
osf3* | osf4* | osf5*)
4450
case $cc_basename in
4452
_LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4455
# Rational C++ 2.4.1
4456
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4459
# Digital/Compaq C++
4460
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4461
# Make sure the PIC flag is empty. It appears that all Alpha
4462
# Linux and Compaq Tru64 Unix objects are PIC.
4463
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4464
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4473
case $cc_basename in
4475
# Sun C++ 4.2, 5.x and Centerline C++
4476
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4477
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4478
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4481
# Green Hills C++ Compiler
4482
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4489
case $cc_basename in
4492
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4493
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4497
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4503
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4504
case $cc_basename in
4506
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4507
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4508
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4513
case $cc_basename in
4515
# NonStop-UX NCC 3.20
4516
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4525
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4531
if test "$GCC" = yes; then
4532
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4533
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4537
# All AIX code is PIC.
4538
if test "$host_cpu" = ia64; then
4539
# AIX 5 now supports IA64 processor
4540
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4547
# see comment about AmigaOS4 .so support
4548
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4551
# FIXME: we need at least 68020 code to build shared libraries, but
4552
# adding the `-m68020' flag to GCC prevents building anything better,
4554
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4559
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4560
# PIC is the default for these OSes.
4563
mingw* | cygwin* | pw32* | os2* | cegcc*)
4564
# This hack is so that the source file can tell whether it is being
4565
# built for inclusion in a dll (and should export symbols for example).
4566
# Although the cygwin gcc ignores -fPIC, still need this for old-style
4567
# (--disable-auto-import) libraries
4568
m4_if([$1], [GCJ], [],
4569
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4572
darwin* | rhapsody*)
4573
# PIC is the default on this platform
4574
# Common symbols not allowed in MH_DYLIB files
4575
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4579
# PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4580
# PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4581
# sets the default TLS model and affects inlining.
4587
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4593
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
4594
# Instead, we relocate shared libraries at runtime.
4598
# Just because we use GCC doesn't mean we suddenly get shared libraries
4599
# on systems that don't support them.
4600
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4605
# QNX uses GNU C++, but need to define -shared option too, otherwise
4607
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4611
if test -d /usr/nec; then
4612
_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4617
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4621
# PORTME Check for flag to pass linker flags through the system compiler.
4624
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4625
if test "$host_cpu" = ia64; then
4626
# AIX 5 now supports IA64 processor
4627
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4629
_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4633
mingw* | cygwin* | pw32* | os2* | cegcc*)
4634
# This hack is so that the source file can tell whether it is being
4635
# built for inclusion in a dll (and should export symbols for example).
4636
m4_if([$1], [GCJ], [],
4637
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4640
hpux9* | hpux10* | hpux11*)
4641
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4642
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4649
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4652
# Is there a better lt_prog_compiler_static that works with the bundled CC?
4653
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4656
irix5* | irix6* | nonstopux*)
4657
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4658
# PIC (with -KPIC) is the default.
4659
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4662
linux* | k*bsd*-gnu)
4663
case $cc_basename in
4664
# old Intel for x86_64 which still supported -KPIC.
4666
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4667
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4668
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4670
# icc used to be incompatible with GCC.
4671
# ICC 10 doesn't accept -KPIC any more.
4673
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4674
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4675
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4677
# Lahey Fortran 8.1.
4679
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4680
_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4681
_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4683
pgcc* | pgf77* | pgf90* | pgf95*)
4684
# Portland Group compilers (*not* the Pentium gcc compiler,
4685
# which looks to be a dead project)
4686
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4687
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4688
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4691
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4692
# All Alpha code is PIC.
4693
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4696
# IBM XL C 8.0/Fortran 10.1 on PPC
4697
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4698
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4699
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4702
case `$CC -V 2>&1 | sed 5q` in
4705
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4706
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4707
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4710
# Sun Fortran 8.3 passes all unrecognized flags to the linker
4711
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4712
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4713
_LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4721
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4722
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4726
# QNX uses GNU C++, but need to define -shared option too, otherwise
4728
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4731
osf3* | osf4* | osf5*)
4732
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4733
# All OSF/1 code is PIC.
4734
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4738
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4742
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4743
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4744
case $cc_basename in
4746
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4748
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4753
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4754
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4755
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4758
sysv4 | sysv4.2uw2* | sysv4.3*)
4759
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4760
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4761
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4765
if test -d /usr/nec ;then
4766
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4767
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4771
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4772
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4773
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4774
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4778
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4779
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4783
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4784
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4788
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4794
# For platforms which do not support PIC, -DPIC is meaningless:
4796
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4799
_LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4802
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4803
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4804
[How to pass a linker flag through the compiler])
4807
# Check to make sure the PIC flag actually works.
4809
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4810
_LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4811
[_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4812
[$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4813
[case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4815
*) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4817
[_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4818
_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4820
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4821
[Additional compiler flags for building library objects])
4824
# Check to make sure the static flag actually works.
4826
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4827
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4828
_LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4829
$lt_tmp_static_flag,
4831
[_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4832
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4833
[Compiler flag to prevent dynamic linking])
4834
])# _LT_COMPILER_PIC
4837
# _LT_LINKER_SHLIBS([TAGNAME])
4838
# ----------------------------
4839
# See if the linker supports building shared libraries.
4840
m4_defun([_LT_LINKER_SHLIBS],
4841
[AC_REQUIRE([LT_PATH_LD])dnl
4842
AC_REQUIRE([LT_PATH_NM])dnl
4843
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4844
m4_require([_LT_DECL_EGREP])dnl
4845
m4_require([_LT_DECL_SED])dnl
4846
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4847
m4_require([_LT_TAG_COMPILER])dnl
4848
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4849
m4_if([$1], [CXX], [
4850
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4853
# If we're using GNU nm, then we don't want the "-C" option.
4854
# -C means demangle to AIX nm, but means don't demangle with GNU nm
4855
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4856
_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'
4858
_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'
4862
_LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4864
cygwin* | mingw* | cegcc*)
4865
_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'
4867
linux* | k*bsd*-gnu)
4868
_LT_TAGVAR(link_all_deplibs, $1)=no
4871
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4874
_LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4877
_LT_TAGVAR(allow_undefined_flag, $1)=
4878
_LT_TAGVAR(always_export_symbols, $1)=no
4879
_LT_TAGVAR(archive_cmds, $1)=
4880
_LT_TAGVAR(archive_expsym_cmds, $1)=
4881
_LT_TAGVAR(compiler_needs_object, $1)=no
4882
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4883
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
4884
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4885
_LT_TAGVAR(hardcode_automatic, $1)=no
4886
_LT_TAGVAR(hardcode_direct, $1)=no
4887
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
4888
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4889
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4890
_LT_TAGVAR(hardcode_libdir_separator, $1)=
4891
_LT_TAGVAR(hardcode_minus_L, $1)=no
4892
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4893
_LT_TAGVAR(inherit_rpath, $1)=no
4894
_LT_TAGVAR(link_all_deplibs, $1)=unknown
4895
_LT_TAGVAR(module_cmds, $1)=
4896
_LT_TAGVAR(module_expsym_cmds, $1)=
4897
_LT_TAGVAR(old_archive_from_new_cmds, $1)=
4898
_LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4899
_LT_TAGVAR(thread_safe_flag_spec, $1)=
4900
_LT_TAGVAR(whole_archive_flag_spec, $1)=
4901
# include_expsyms should be a list of space-separated symbols to be *always*
4902
# included in the symbol list
4903
_LT_TAGVAR(include_expsyms, $1)=
4904
# exclude_expsyms can be an extended regexp of symbols to exclude
4905
# it will be wrapped by ` (' and `)$', so one must not match beginning or
4906
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4907
# as well as any symbol that contains `d'.
4908
_LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4909
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4910
# platforms (ab)use it in PIC code, but their linkers get confused if
4911
# the symbol is explicitly referenced. Since portable code cannot
4912
# rely on this symbol name, it's probably fine to never include it in
4913
# preloaded symbol tables.
4914
# Exclude shared library initialization/finalization symbols.
4915
dnl Note also adjust exclude_expsyms for C++ above.
4916
extract_expsyms_cmds=
4919
cygwin* | mingw* | pw32* | cegcc*)
4920
# FIXME: the MSVC++ port hasn't been tested in a loooong time
4921
# When not using gcc, we currently assume that we are using
4922
# Microsoft Visual C++.
4923
if test "$GCC" != yes; then
4928
# we just hope/assume this is gcc and not c89 (= MSVC++)
4936
_LT_TAGVAR(ld_shlibs, $1)=yes
4937
if test "$with_gnu_ld" = yes; then
4938
# If archive_cmds runs LD, not CC, wlarc should be empty
4941
# Set some defaults for GNU ld with shared library support. These
4942
# are reset later if shared libraries are not supported. Putting them
4943
# here allows them to be overridden if necessary.
4944
runpath_var=LD_RUN_PATH
4945
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4946
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4947
# ancient GNU ld didn't support --whole-archive et. al.
4948
if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4949
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4951
_LT_TAGVAR(whole_archive_flag_spec, $1)=
4953
supports_anon_versioning=no
4954
case `$LD -v 2>&1` in
4955
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4956
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4957
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4958
*\ 2.11.*) ;; # other 2.11 versions
4959
*) supports_anon_versioning=yes ;;
4962
# See if GNU ld supports shared libraries.
4965
# On AIX/PPC, the GNU linker is very broken
4966
if test "$host_cpu" != ia64; then
4967
_LT_TAGVAR(ld_shlibs, $1)=no
4970
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
4971
*** to be unable to reliably create shared libraries on AIX.
4972
*** Therefore, libtool is disabling shared libraries support. If you
4973
*** really care for shared libraries, you may want to modify your PATH
4974
*** so that a non-GNU linker is found, and then restart.
4983
# see comment about AmigaOS4 .so support
4984
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4985
_LT_TAGVAR(archive_expsym_cmds, $1)=''
4988
_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)'
4989
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4990
_LT_TAGVAR(hardcode_minus_L, $1)=yes
4996
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4997
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4998
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4999
# support --undefined. This deserves some investigation. FIXME
5000
_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5002
_LT_TAGVAR(ld_shlibs, $1)=no
5006
cygwin* | mingw* | pw32* | cegcc*)
5007
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5008
# as there is no search path for DLLs.
5009
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5010
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5011
_LT_TAGVAR(always_export_symbols, $1)=no
5012
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5013
_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'
5015
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5016
_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'
5017
# If the export-symbols file already is a .def file (1st line
5018
# is EXPORTS), use it as is; otherwise, prepend...
5019
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5020
cp $export_symbols $output_objdir/$soname.def;
5022
echo EXPORTS > $output_objdir/$soname.def;
5023
cat $export_symbols >> $output_objdir/$soname.def;
5025
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5027
_LT_TAGVAR(ld_shlibs, $1)=no
5032
_LT_TAGVAR(hardcode_direct, $1)=no
5033
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5034
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5035
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5036
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5037
# Instead, shared libraries are loaded at an image base (0x10000000 by
5038
# default) and relocated if they conflict, which is a slow very memory
5039
# consuming and fragmenting process. To avoid this, we pick a random,
5040
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5041
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
5042
_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'
5043
_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'
5046
gnu* | linux* | tpf* | k*bsd*-gnu)
5048
if test "$host_os" = linux-dietlibc; then
5049
case $cc_basename in
5050
diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5053
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5054
&& test "$tmp_diet" = no
5057
tmp_sharedflag='-shared'
5058
case $cc_basename,$host_cpu in
5059
pgcc*) # Portland Group C compiler
5060
_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'
5061
tmp_addflag=' $pic_flag'
5063
pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
5064
_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'
5065
tmp_addflag=' $pic_flag -Mnomain' ;;
5066
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5067
tmp_addflag=' -i_dynamic' ;;
5068
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5069
tmp_addflag=' -i_dynamic -nofor_main' ;;
5070
ifc* | ifort*) # Intel Fortran compiler
5071
tmp_addflag=' -nofor_main' ;;
5072
lf95*) # Lahey Fortran 8.1
5073
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5074
tmp_sharedflag='--shared' ;;
5075
xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5076
tmp_sharedflag='-qmkshrobj'
5079
case `$CC -V 2>&1 | sed 5q` in
5080
*Sun\ C*) # Sun C 5.9
5081
_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'
5082
_LT_TAGVAR(compiler_needs_object, $1)=yes
5083
tmp_sharedflag='-G' ;;
5084
*Sun\ F*) # Sun Fortran 8.3
5085
tmp_sharedflag='-G' ;;
5087
_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5089
if test "x$supports_anon_versioning" = xyes; then
5090
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5091
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5092
echo "local: *; };" >> $output_objdir/$libname.ver~
5093
$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5096
case $cc_basename in
5098
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5099
_LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5100
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5101
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5102
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
5103
if test "x$supports_anon_versioning" = xyes; then
5104
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5105
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5106
echo "local: *; };" >> $output_objdir/$libname.ver~
5107
$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5112
_LT_TAGVAR(ld_shlibs, $1)=no
5116
netbsd* | netbsdelf*-gnu)
5117
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5118
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5121
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5122
_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'
5127
if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5128
_LT_TAGVAR(ld_shlibs, $1)=no
5131
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5132
*** create shared libraries on Solaris systems. Therefore, libtool
5133
*** is disabling shared libraries support. We urge you to upgrade GNU
5134
*** binutils to release 2.9.1 or newer. Another option is to modify
5135
*** your PATH or compiler configuration so that the native linker is
5136
*** used, and then restart.
5139
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5140
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5141
_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'
5143
_LT_TAGVAR(ld_shlibs, $1)=no
5147
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5148
case `$LD -v 2>&1` in
5149
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5150
_LT_TAGVAR(ld_shlibs, $1)=no
5153
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5154
*** reliably create shared libraries on SCO systems. Therefore, libtool
5155
*** is disabling shared libraries support. We urge you to upgrade GNU
5156
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5157
*** your PATH or compiler configuration so that the native linker is
5158
*** used, and then restart.
5163
# For security reasons, it is highly recommended that you always
5164
# use absolute paths for naming shared libraries, and exclude the
5165
# DT_RUNPATH tag from executables and libraries. But doing so
5166
# requires that you compile everything twice, which is a pain.
5167
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5168
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5169
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5170
_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'
5172
_LT_TAGVAR(ld_shlibs, $1)=no
5179
_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5181
_LT_TAGVAR(hardcode_direct, $1)=yes
5182
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5186
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5187
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5188
_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'
5190
_LT_TAGVAR(ld_shlibs, $1)=no
5195
if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5197
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5198
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5199
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5202
# PORTME fill in a description of your system's linker (not GNU ld)
5205
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5206
_LT_TAGVAR(always_export_symbols, $1)=yes
5207
_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'
5208
# Note: this linker hardcodes the directories in LIBPATH if there
5209
# are no directories specified by -L.
5210
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5211
if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5212
# Neither direct hardcoding nor static linking is supported with a
5214
_LT_TAGVAR(hardcode_direct, $1)=unsupported
5219
if test "$host_cpu" = ia64; then
5220
# On IA64, the linker does run time linking by default, so we don't
5221
# have to do anything special.
5222
aix_use_runtimelinking=no
5223
exp_sym_flag='-Bexport'
5226
# If we're using GNU nm, then we don't want the "-C" option.
5227
# -C means demangle to AIX nm, but means don't demangle with GNU nm
5228
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5229
_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'
5231
_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'
5233
aix_use_runtimelinking=no
5235
# Test if we are trying to use run time linking or normal
5236
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5237
# need to do runtime linking.
5238
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5239
for ld_flag in $LDFLAGS; do
5240
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5241
aix_use_runtimelinking=yes
5248
exp_sym_flag='-bexport'
5249
no_entry_flag='-bnoentry'
5252
# When large executables or shared objects are built, AIX ld can
5253
# have problems creating the table of contents. If linking a library
5254
# or program results in "error TOC overflow" add -mminimal-toc to
5255
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5256
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5258
_LT_TAGVAR(archive_cmds, $1)=''
5259
_LT_TAGVAR(hardcode_direct, $1)=yes
5260
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5261
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5262
_LT_TAGVAR(link_all_deplibs, $1)=yes
5263
_LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5265
if test "$GCC" = yes; then
5266
case $host_os in aix4.[[012]]|aix4.[[012]].*)
5267
# We only want to do this on AIX 4.2 and lower, the check
5268
# below for broken collect2 doesn't work under 4.3+
5269
collect2name=`${CC} -print-prog-name=collect2`
5270
if test -f "$collect2name" &&
5271
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5273
# We have reworked collect2
5276
# We have old collect2
5277
_LT_TAGVAR(hardcode_direct, $1)=unsupported
5278
# It fails to find uninstalled libraries when the uninstalled
5279
# path is not listed in the libpath. Setting hardcode_minus_L
5280
# to unsupported forces relinking
5281
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5282
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5283
_LT_TAGVAR(hardcode_libdir_separator, $1)=
5287
shared_flag='-shared'
5288
if test "$aix_use_runtimelinking" = yes; then
5289
shared_flag="$shared_flag "'${wl}-G'
5291
_LT_TAGVAR(link_all_deplibs, $1)=no
5294
if test "$host_cpu" = ia64; then
5295
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5296
# chokes on -Wl,-G. The following line is correct:
5299
if test "$aix_use_runtimelinking" = yes; then
5300
shared_flag='${wl}-G'
5302
shared_flag='${wl}-bM:SRE'
5307
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5308
# It seems that -bexpall does not export symbols beginning with
5309
# underscore (_), so it is better to generate a list of symbols to export.
5310
_LT_TAGVAR(always_export_symbols, $1)=yes
5311
if test "$aix_use_runtimelinking" = yes; then
5312
# Warning - without using the other runtime loading flags (-brtl),
5313
# -berok will link without error, but may produce a broken library.
5314
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5315
# Determine the default libpath from the value encoded in an
5317
_LT_SYS_MODULE_PATH_AIX
5318
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5319
_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"
5321
if test "$host_cpu" = ia64; then
5322
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5323
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5324
_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"
5326
# Determine the default libpath from the value encoded in an
5328
_LT_SYS_MODULE_PATH_AIX
5329
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5330
# Warning - without using the other run time loading flags,
5331
# -berok will link without error, but may produce a broken library.
5332
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5333
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5334
# Exported symbols can be pulled into shared objects from archives
5335
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5336
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5337
# This is similar to how AIX traditionally builds its shared libraries.
5338
_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'
5346
# see comment about AmigaOS4 .so support
5347
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5348
_LT_TAGVAR(archive_expsym_cmds, $1)=''
5351
_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)'
5352
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5353
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5359
_LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5362
cygwin* | mingw* | pw32* | cegcc*)
5363
# When not using gcc, we currently assume that we are using
5364
# Microsoft Visual C++.
5365
# hardcode_libdir_flag_spec is actually meaningless, as there is
5366
# no search path for DLLs.
5367
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5368
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5369
# Tell ltmain to make .lib files, not .a files.
5371
# Tell ltmain to make .dll files, not .so files.
5373
# FIXME: Setting linknames here is a bad hack.
5374
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5375
# The linker will automatically build a .lib file if we build a DLL.
5376
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5377
# FIXME: Should let the user specify the lib program.
5378
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5379
_LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5380
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5383
darwin* | rhapsody*)
5384
_LT_DARWIN_LINKER_FEATURES($1)
5388
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5389
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5390
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5394
_LT_TAGVAR(ld_shlibs, $1)=no
5397
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5398
# support. Future versions do this automatically, but an explicit c++rt0.o
5399
# does not break anything, and helps significantly (at the cost of a little
5402
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5403
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5404
_LT_TAGVAR(hardcode_direct, $1)=yes
5405
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5408
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
5410
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5411
_LT_TAGVAR(hardcode_direct, $1)=yes
5412
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5413
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5416
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5417
freebsd* | dragonfly*)
5418
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5419
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5420
_LT_TAGVAR(hardcode_direct, $1)=yes
5421
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5425
if test "$GCC" = yes; then
5426
_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'
5428
_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'
5430
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5431
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5432
_LT_TAGVAR(hardcode_direct, $1)=yes
5434
# hardcode_minus_L: Not really in the search PATH,
5435
# but as the default location of the library.
5436
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5437
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5441
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5442
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5444
_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5446
if test "$with_gnu_ld" = no; then
5447
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5448
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5449
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5450
_LT_TAGVAR(hardcode_direct, $1)=yes
5451
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5452
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5453
# hardcode_minus_L: Not really in the search PATH,
5454
# but as the default location of the library.
5455
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5460
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5463
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5466
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5469
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5475
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5478
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5481
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5485
if test "$with_gnu_ld" = no; then
5486
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5487
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5491
_LT_TAGVAR(hardcode_direct, $1)=no
5492
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5495
_LT_TAGVAR(hardcode_direct, $1)=yes
5496
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5497
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5499
# hardcode_minus_L: Not really in the search PATH,
5500
# but as the default location of the library.
5501
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5507
irix5* | irix6* | nonstopux*)
5508
if test "$GCC" = yes; then
5509
_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'
5510
# Try to use the -exported_symbol ld option, if it does not
5511
# work, assume that -exports_file does not work either and
5512
# implicitly export all symbols.
5513
save_LDFLAGS="$LDFLAGS"
5514
LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5515
AC_LINK_IFELSE(int foo(void) {},
5516
_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'
5518
LDFLAGS="$save_LDFLAGS"
5520
_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'
5521
_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'
5523
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5524
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5525
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5526
_LT_TAGVAR(inherit_rpath, $1)=yes
5527
_LT_TAGVAR(link_all_deplibs, $1)=yes
5530
netbsd* | netbsdelf*-gnu)
5531
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5532
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5534
_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5536
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5537
_LT_TAGVAR(hardcode_direct, $1)=yes
5538
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5542
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5543
_LT_TAGVAR(hardcode_direct, $1)=yes
5544
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5545
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5546
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5553
if test -f /usr/libexec/ld.so; then
5554
_LT_TAGVAR(hardcode_direct, $1)=yes
5555
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5556
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5557
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5558
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5559
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5560
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5561
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5564
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5565
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5566
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5569
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5570
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5575
_LT_TAGVAR(ld_shlibs, $1)=no
5580
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5581
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5582
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5583
_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'
5584
_LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5588
if test "$GCC" = yes; then
5589
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5590
_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'
5592
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5593
_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'
5595
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5596
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5597
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5600
osf4* | osf5*) # as osf3* with the addition of -msym flag
5601
if test "$GCC" = yes; then
5602
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5603
_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'
5604
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5606
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5607
_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'
5608
_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~
5609
$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'
5611
# Both c and cxx compiler support -rpath directly
5612
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5614
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5615
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5619
_LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5620
if test "$GCC" = yes; then
5622
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5623
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5624
$CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5626
case `$CC -V 2>&1` in
5629
_LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5630
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5631
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5635
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5636
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5637
$CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5641
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5642
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5644
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5646
# The compiler driver will combine and reorder linker options,
5647
# but understands `-z linker_flag'. GCC discards it without `$wl',
5648
# but is careful enough not to reorder.
5649
# Supported since Solaris 2.6 (maybe 2.5.1?)
5650
if test "$GCC" = yes; then
5651
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5653
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5657
_LT_TAGVAR(link_all_deplibs, $1)=yes
5661
if test "x$host_vendor" = xsequent; then
5662
# Use $CC to link under sequent, because it throws in some extra .o
5663
# files that make .init and .fini sections work.
5664
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5666
_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5668
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5669
_LT_TAGVAR(hardcode_direct, $1)=yes
5670
_LT_TAGVAR(hardcode_minus_L, $1)=yes
5671
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5675
case $host_vendor in
5677
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5678
_LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5681
## LD is ld it makes a PLAMLIB
5682
## CC just makes a GrossModule.
5683
_LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5684
_LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5685
_LT_TAGVAR(hardcode_direct, $1)=no
5688
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5689
_LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5692
runpath_var='LD_RUN_PATH'
5693
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5697
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5698
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5699
_LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5703
if test -d /usr/nec; then
5704
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5705
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5706
runpath_var=LD_RUN_PATH
5707
hardcode_runpath_var=yes
5708
_LT_TAGVAR(ld_shlibs, $1)=yes
5712
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5713
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5714
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5715
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5716
runpath_var='LD_RUN_PATH'
5718
if test "$GCC" = yes; then
5719
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5720
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5722
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5723
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5727
sysv5* | sco3.2v5* | sco5v6*)
5728
# Note: We can NOT use -z defs as we might desire, because we do not
5729
# link with -lc, and that would cause any symbols used from libc to
5730
# always be unresolved, which means just about no library would
5731
# ever link correctly. If we're not using GNU ld we use -z text
5732
# though, which does catch some bad symbols but isn't as heavy-handed
5734
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5735
_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5736
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5737
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5738
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5739
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5740
_LT_TAGVAR(link_all_deplibs, $1)=yes
5741
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5742
runpath_var='LD_RUN_PATH'
5744
if test "$GCC" = yes; then
5745
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5746
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5748
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5749
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5754
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5755
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5756
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5760
_LT_TAGVAR(ld_shlibs, $1)=no
5764
if test x$host_vendor = xsni; then
5766
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5767
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5773
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5774
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5776
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5778
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5779
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5780
_LT_DECL([], [extract_expsyms_cmds], [2],
5781
[The commands to extract the exported symbol list from a shared archive])
5784
# Do we need to explicitly link libc?
5786
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5788
# Assume -lc should be added
5789
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5791
if test "$enable_shared" = yes && test "$GCC" = yes; then
5792
case $_LT_TAGVAR(archive_cmds, $1) in
5794
# FIXME: we may have to deal with multi-command sequences.
5797
# Test whether the compiler implicitly links with -lc since on some
5798
# systems, -lgcc has to come before -lc. If gcc already passes -lc
5799
# to ld, don't add -lc before -lgcc.
5800
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5802
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5804
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5807
libobjs=conftest.$ac_objext
5809
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5810
pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5816
lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5817
_LT_TAGVAR(allow_undefined_flag, $1)=
5818
if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5820
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5822
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5824
_LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5826
cat conftest.err 1>&5
5829
AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5836
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5837
[Whether or not to add -lc for building shared libraries])
5838
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5839
[enable_shared_with_static_runtimes], [0],
5840
[Whether or not to disallow shared libs when runtime libs are static])
5841
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5842
[Compiler flag to allow reflexive dlopens])
5843
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5844
[Compiler flag to generate shared objects directly from archives])
5845
_LT_TAGDECL([], [compiler_needs_object], [1],
5846
[Whether the compiler copes with passing no objects directly])
5847
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5848
[Create an old-style archive from a shared archive])
5849
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5850
[Create a temporary old-style archive to link instead of a shared archive])
5851
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5852
_LT_TAGDECL([], [archive_expsym_cmds], [2])
5853
_LT_TAGDECL([], [module_cmds], [2],
5854
[Commands used to build a loadable module if different from building
5856
_LT_TAGDECL([], [module_expsym_cmds], [2])
5857
_LT_TAGDECL([], [with_gnu_ld], [1],
5858
[Whether we are building with GNU ld or not])
5859
_LT_TAGDECL([], [allow_undefined_flag], [1],
5860
[Flag that allows shared libraries with undefined symbols to be built])
5861
_LT_TAGDECL([], [no_undefined_flag], [1],
5862
[Flag that enforces no undefined symbols])
5863
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5864
[Flag to hardcode $libdir into a binary during linking.
5865
This must work even if $libdir does not exist])
5866
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5867
[[If ld is used when linking, flag to hardcode $libdir into a binary
5868
during linking. This must work even if $libdir does not exist]])
5869
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5870
[Whether we need a single "-rpath" flag with a separated argument])
5871
_LT_TAGDECL([], [hardcode_direct], [0],
5872
[Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5873
DIR into the resulting binary])
5874
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5875
[Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5876
DIR into the resulting binary and the resulting library dependency is
5877
"absolute", i.e impossible to change by setting ${shlibpath_var} if the
5878
library is relocated])
5879
_LT_TAGDECL([], [hardcode_minus_L], [0],
5880
[Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5881
into the resulting binary])
5882
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5883
[Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5884
into the resulting binary])
5885
_LT_TAGDECL([], [hardcode_automatic], [0],
5886
[Set to "yes" if building a shared library automatically hardcodes DIR
5887
into the library and all subsequent libraries and executables linked
5889
_LT_TAGDECL([], [inherit_rpath], [0],
5890
[Set to yes if linker adds runtime paths of dependent libraries
5891
to runtime path list])
5892
_LT_TAGDECL([], [link_all_deplibs], [0],
5893
[Whether libtool must link a program against all its dependency libraries])
5894
_LT_TAGDECL([], [fix_srcfile_path], [1],
5895
[Fix the shell variable $srcfile for the compiler])
5896
_LT_TAGDECL([], [always_export_symbols], [0],
5897
[Set to "yes" if exported symbols are required])
5898
_LT_TAGDECL([], [export_symbols_cmds], [2],
5899
[The commands to list exported symbols])
5900
_LT_TAGDECL([], [exclude_expsyms], [1],
5901
[Symbols that should not be listed in the preloaded symbols])
5902
_LT_TAGDECL([], [include_expsyms], [1],
5903
[Symbols that must always be exported])
5904
_LT_TAGDECL([], [prelink_cmds], [2],
5905
[Commands necessary for linking programs (against libraries) with templates])
5906
_LT_TAGDECL([], [file_list_spec], [1],
5907
[Specify filename containing input files])
5908
dnl FIXME: Not yet implemented
5909
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5910
dnl [Compiler flag to generate thread safe objects])
5911
])# _LT_LINKER_SHLIBS
5914
# _LT_LANG_C_CONFIG([TAG])
5915
# ------------------------
5916
# Ensure that the configuration variables for a C compiler are suitably
5917
# defined. These variables are subsequently used by _LT_CONFIG to write
5918
# the compiler configuration to `libtool'.
5919
m4_defun([_LT_LANG_C_CONFIG],
5920
[m4_require([_LT_DECL_EGREP])dnl
5924
# Source file extension for C test sources.
5927
# Object file extension for compiled C test sources.
5929
_LT_TAGVAR(objext, $1)=$objext
5931
# Code to be used in simple compile tests
5932
lt_simple_compile_test_code="int some_variable = 0;"
5934
# Code to be used in simple link tests
5935
lt_simple_link_test_code='int main(){return(0);}'
5938
# Save the default compiler, since it gets overwritten when the other
5939
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5940
compiler_DEFAULT=$CC
5942
# save warnings/boilerplate of simple test code
5943
_LT_COMPILER_BOILERPLATE
5944
_LT_LINKER_BOILERPLATE
5946
if test -n "$compiler"; then
5947
_LT_COMPILER_NO_RTTI($1)
5948
_LT_COMPILER_PIC($1)
5949
_LT_COMPILER_C_O($1)
5950
_LT_COMPILER_FILE_LOCKS($1)
5951
_LT_LINKER_SHLIBS($1)
5952
_LT_SYS_DYNAMIC_LINKER($1)
5953
_LT_LINKER_HARDCODE_LIBPATH($1)
5957
# Report which library types will actually be built
5958
AC_MSG_CHECKING([if libtool supports shared libraries])
5959
AC_MSG_RESULT([$can_build_shared])
5961
AC_MSG_CHECKING([whether to build shared libraries])
5962
test "$can_build_shared" = "no" && enable_shared=no
5964
# On AIX, shared libraries and static libraries use the same namespace, and
5965
# are all built from PIC.
5968
test "$enable_shared" = yes && enable_static=no
5969
if test -n "$RANLIB"; then
5970
archive_cmds="$archive_cmds~\$RANLIB \$lib"
5971
postinstall_cmds='$RANLIB $lib'
5976
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5977
test "$enable_shared" = yes && enable_static=no
5981
AC_MSG_RESULT([$enable_shared])
5983
AC_MSG_CHECKING([whether to build static libraries])
5984
# Make sure either enable_shared or enable_static is yes.
5985
test "$enable_shared" = yes || enable_static=yes
5986
AC_MSG_RESULT([$enable_static])
5992
])# _LT_LANG_C_CONFIG
5997
# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5998
# compiler, we have our own version here.
5999
m4_defun([_LT_PROG_CXX],
6001
pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
6003
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6004
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6005
(test "X$CXX" != "Xg++"))) ; then
6008
_lt_caught_CXX_error=yes
6010
popdef([AC_MSG_ERROR])
6013
dnl aclocal-1.4 backwards compatibility:
6014
dnl AC_DEFUN([_LT_PROG_CXX], [])
6017
# _LT_LANG_CXX_CONFIG([TAG])
6018
# --------------------------
6019
# Ensure that the configuration variables for a C++ compiler are suitably
6020
# defined. These variables are subsequently used by _LT_CONFIG to write
6021
# the compiler configuration to `libtool'.
6022
m4_defun([_LT_LANG_CXX_CONFIG],
6023
[AC_REQUIRE([_LT_PROG_CXX])dnl
6024
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6025
m4_require([_LT_DECL_EGREP])dnl
6028
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6029
_LT_TAGVAR(allow_undefined_flag, $1)=
6030
_LT_TAGVAR(always_export_symbols, $1)=no
6031
_LT_TAGVAR(archive_expsym_cmds, $1)=
6032
_LT_TAGVAR(compiler_needs_object, $1)=no
6033
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6034
_LT_TAGVAR(hardcode_direct, $1)=no
6035
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6036
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6037
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6038
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6039
_LT_TAGVAR(hardcode_minus_L, $1)=no
6040
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6041
_LT_TAGVAR(hardcode_automatic, $1)=no
6042
_LT_TAGVAR(inherit_rpath, $1)=no
6043
_LT_TAGVAR(module_cmds, $1)=
6044
_LT_TAGVAR(module_expsym_cmds, $1)=
6045
_LT_TAGVAR(link_all_deplibs, $1)=unknown
6046
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6047
_LT_TAGVAR(no_undefined_flag, $1)=
6048
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6049
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6051
# Source file extension for C++ test sources.
6054
# Object file extension for compiled C++ test sources.
6056
_LT_TAGVAR(objext, $1)=$objext
6058
# No sense in running all these tests if we already determined that
6059
# the CXX compiler isn't working. Some variables (like enable_shared)
6060
# are currently assumed to apply to all compilers on this platform,
6061
# and will be corrupted by setting them based on a non-working compiler.
6062
if test "$_lt_caught_CXX_error" != yes; then
6063
# Code to be used in simple compile tests
6064
lt_simple_compile_test_code="int some_variable = 0;"
6066
# Code to be used in simple link tests
6067
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6069
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6072
# save warnings/boilerplate of simple test code
6073
_LT_COMPILER_BOILERPLATE
6074
_LT_LINKER_BOILERPLATE
6076
# Allow CC to be a program name with arguments.
6081
lt_save_with_gnu_ld=$with_gnu_ld
6082
lt_save_path_LD=$lt_cv_path_LD
6083
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6084
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6086
$as_unset lt_cv_prog_gnu_ld
6088
if test -n "${lt_cv_path_LDCXX+set}"; then
6089
lt_cv_path_LD=$lt_cv_path_LDCXX
6091
$as_unset lt_cv_path_LD
6093
test -z "${LDCXX+set}" || LD=$LDCXX
6096
_LT_TAGVAR(compiler, $1)=$CC
6097
_LT_CC_BASENAME([$compiler])
6099
if test -n "$compiler"; then
6100
# We don't want -fno-exception when compiling C++ code, so set the
6101
# no_builtin_flag separately
6102
if test "$GXX" = yes; then
6103
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6105
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6108
if test "$GXX" = yes; then
6109
# Set up default GNU C++ configuration
6113
# Check if GNU C++ uses GNU ld as the underlying linker, since the
6114
# archiving commands below assume that GNU ld is being used.
6115
if test "$with_gnu_ld" = yes; then
6116
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6117
_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'
6119
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6120
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6122
# If archive_cmds runs LD, not CC, wlarc should be empty
6123
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6124
# investigate it a little bit more. (MM)
6127
# ancient GNU ld didn't support --whole-archive et. al.
6128
if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6129
$GREP 'no-whole-archive' > /dev/null; then
6130
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6132
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6138
# A generic and very simple default shared library creation
6139
# command for GNU C++ for the case where it uses the native
6140
# linker, instead of GNU ld. If possible, this setting should
6141
# overridden to take advantage of the native linker features on
6142
# the platform it is being used on.
6143
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6146
# Commands to make compiler produce verbose output that lists
6147
# what "hidden" libraries, object files and flags are used when
6148
# linking a shared library.
6149
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6157
# PORTME: fill in a description of your system's C++ link characteristics
6158
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6159
_LT_TAGVAR(ld_shlibs, $1)=yes
6162
# FIXME: insert proper C++ library support
6163
_LT_TAGVAR(ld_shlibs, $1)=no
6166
if test "$host_cpu" = ia64; then
6167
# On IA64, the linker does run time linking by default, so we don't
6168
# have to do anything special.
6169
aix_use_runtimelinking=no
6170
exp_sym_flag='-Bexport'
6173
aix_use_runtimelinking=no
6175
# Test if we are trying to use run time linking or normal
6176
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6177
# need to do runtime linking.
6178
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6179
for ld_flag in $LDFLAGS; do
6182
aix_use_runtimelinking=yes
6190
exp_sym_flag='-bexport'
6191
no_entry_flag='-bnoentry'
6194
# When large executables or shared objects are built, AIX ld can
6195
# have problems creating the table of contents. If linking a library
6196
# or program results in "error TOC overflow" add -mminimal-toc to
6197
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6198
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6200
_LT_TAGVAR(archive_cmds, $1)=''
6201
_LT_TAGVAR(hardcode_direct, $1)=yes
6202
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6203
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6204
_LT_TAGVAR(link_all_deplibs, $1)=yes
6205
_LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6207
if test "$GXX" = yes; then
6208
case $host_os in aix4.[[012]]|aix4.[[012]].*)
6209
# We only want to do this on AIX 4.2 and lower, the check
6210
# below for broken collect2 doesn't work under 4.3+
6211
collect2name=`${CC} -print-prog-name=collect2`
6212
if test -f "$collect2name" &&
6213
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6215
# We have reworked collect2
6218
# We have old collect2
6219
_LT_TAGVAR(hardcode_direct, $1)=unsupported
6220
# It fails to find uninstalled libraries when the uninstalled
6221
# path is not listed in the libpath. Setting hardcode_minus_L
6222
# to unsupported forces relinking
6223
_LT_TAGVAR(hardcode_minus_L, $1)=yes
6224
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6225
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6228
shared_flag='-shared'
6229
if test "$aix_use_runtimelinking" = yes; then
6230
shared_flag="$shared_flag "'${wl}-G'
6234
if test "$host_cpu" = ia64; then
6235
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6236
# chokes on -Wl,-G. The following line is correct:
6239
if test "$aix_use_runtimelinking" = yes; then
6240
shared_flag='${wl}-G'
6242
shared_flag='${wl}-bM:SRE'
6247
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6248
# It seems that -bexpall does not export symbols beginning with
6249
# underscore (_), so it is better to generate a list of symbols to
6251
_LT_TAGVAR(always_export_symbols, $1)=yes
6252
if test "$aix_use_runtimelinking" = yes; then
6253
# Warning - without using the other runtime loading flags (-brtl),
6254
# -berok will link without error, but may produce a broken library.
6255
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6256
# Determine the default libpath from the value encoded in an empty
6258
_LT_SYS_MODULE_PATH_AIX
6259
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6261
_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"
6263
if test "$host_cpu" = ia64; then
6264
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6265
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6266
_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"
6268
# Determine the default libpath from the value encoded in an
6270
_LT_SYS_MODULE_PATH_AIX
6271
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6272
# Warning - without using the other run time loading flags,
6273
# -berok will link without error, but may produce a broken library.
6274
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6275
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6276
# Exported symbols can be pulled into shared objects from archives
6277
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6278
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6279
# This is similar to how AIX traditionally builds its shared
6281
_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'
6287
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6288
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6289
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6290
# support --undefined. This deserves some investigation. FIXME
6291
_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6293
_LT_TAGVAR(ld_shlibs, $1)=no
6298
case $cc_basename in
6300
# FIXME: insert proper C++ library support
6301
_LT_TAGVAR(ld_shlibs, $1)=no
6306
cygwin* | mingw* | pw32* | cegcc*)
6307
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6308
# as there is no search path for DLLs.
6309
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6310
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6311
_LT_TAGVAR(always_export_symbols, $1)=no
6312
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6314
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6315
_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'
6316
# If the export-symbols file already is a .def file (1st line
6317
# is EXPORTS), use it as is; otherwise, prepend...
6318
_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6319
cp $export_symbols $output_objdir/$soname.def;
6321
echo EXPORTS > $output_objdir/$soname.def;
6322
cat $export_symbols >> $output_objdir/$soname.def;
6324
$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'
6326
_LT_TAGVAR(ld_shlibs, $1)=no
6329
darwin* | rhapsody*)
6330
_LT_DARWIN_LINKER_FEATURES($1)
6334
case $cc_basename in
6336
# FIXME: insert proper C++ library support
6337
_LT_TAGVAR(ld_shlibs, $1)=no
6340
# Green Hills C++ Compiler
6341
# FIXME: insert proper C++ library support
6342
_LT_TAGVAR(ld_shlibs, $1)=no
6345
# FIXME: insert proper C++ library support
6346
_LT_TAGVAR(ld_shlibs, $1)=no
6352
# C++ shared libraries reported to be fairly broken before
6354
_LT_TAGVAR(ld_shlibs, $1)=no
6358
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6361
freebsd* | dragonfly*)
6362
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6364
_LT_TAGVAR(ld_shlibs, $1)=yes
6371
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6372
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6373
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6374
_LT_TAGVAR(hardcode_direct, $1)=yes
6375
_LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6376
# but as the default
6377
# location of the library.
6379
case $cc_basename in
6381
# FIXME: insert proper C++ library support
6382
_LT_TAGVAR(ld_shlibs, $1)=no
6385
_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'
6386
# Commands to make compiler produce verbose output that lists
6387
# what "hidden" libraries, object files and flags are used when
6388
# linking a shared library.
6390
# There doesn't appear to be a way to prevent this compiler from
6391
# explicitly linking system object files so we need to strip them
6392
# from the output so that they don't get included in the library
6394
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'
6397
if test "$GXX" = yes; then
6398
_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'
6400
# FIXME: insert proper C++ library support
6401
_LT_TAGVAR(ld_shlibs, $1)=no
6408
if test $with_gnu_ld = no; then
6409
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6410
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6416
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6422
_LT_TAGVAR(hardcode_direct, $1)=no
6423
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6426
_LT_TAGVAR(hardcode_direct, $1)=yes
6427
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6428
_LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6429
# but as the default
6430
# location of the library.
6434
case $cc_basename in
6436
# FIXME: insert proper C++ library support
6437
_LT_TAGVAR(ld_shlibs, $1)=no
6442
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6445
_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6448
_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'
6451
# Commands to make compiler produce verbose output that lists
6452
# what "hidden" libraries, object files and flags are used when
6453
# linking a shared library.
6455
# There doesn't appear to be a way to prevent this compiler from
6456
# explicitly linking system object files so we need to strip them
6457
# from the output so that they don't get included in the library
6459
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'
6462
if test "$GXX" = yes; then
6463
if test $with_gnu_ld = no; then
6466
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6469
_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'
6472
_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'
6477
# FIXME: insert proper C++ library support
6478
_LT_TAGVAR(ld_shlibs, $1)=no
6485
_LT_TAGVAR(hardcode_direct, $1)=no
6486
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6487
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6488
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6489
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6490
# Instead, shared libraries are loaded at an image base (0x10000000 by
6491
# default) and relocated if they conflict, which is a slow very memory
6492
# consuming and fragmenting process. To avoid this, we pick a random,
6493
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6494
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
6495
_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'
6496
_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'
6499
case $cc_basename in
6502
_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'
6504
# Archives containing C++ object files must be created using
6505
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
6506
# necessary to make sure instantiated templates are included
6508
_LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6511
if test "$GXX" = yes; then
6512
if test "$with_gnu_ld" = no; then
6513
_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'
6515
_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'
6518
_LT_TAGVAR(link_all_deplibs, $1)=yes
6521
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6522
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6523
_LT_TAGVAR(inherit_rpath, $1)=yes
6526
linux* | k*bsd*-gnu)
6527
case $cc_basename in
6529
# Kuck and Associates, Inc. (KAI) C++ Compiler
6531
# KCC will only create a shared library if the output file
6532
# ends with ".so" (or ".sl" for HP-UX), so rename the library
6533
# to its proper name (with version) after linking.
6534
_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'
6535
_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'
6536
# Commands to make compiler produce verbose output that lists
6537
# what "hidden" libraries, object files and flags are used when
6538
# linking a shared library.
6540
# There doesn't appear to be a way to prevent this compiler from
6541
# explicitly linking system object files so we need to strip them
6542
# from the output so that they don't get included in the library
6544
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'
6546
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6547
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6549
# Archives containing C++ object files must be created using
6550
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
6551
_LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6556
# version 8.0 and above of icpc choke on multiply defined symbols
6557
# if we add $predep_objects and $postdep_objects, however 7.1 and
6558
# earlier do not add the objects themselves.
6559
case `$CC -V 2>&1` in
6561
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6562
_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'
6564
*) # Version 8.0 or newer
6567
ia64*) tmp_idyn=' -i_dynamic';;
6569
_LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6570
_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'
6573
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6574
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6575
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6576
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6579
# Portland Group C++ compiler
6581
*pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
6582
_LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6584
$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6585
compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
6586
_LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6588
$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6589
$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
6591
_LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6593
$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6594
$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6595
_LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6597
$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6598
$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'
6600
*) # Version 6 will use weak symbols
6601
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6602
_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'
6606
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6607
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6608
_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'
6612
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6613
_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'
6615
runpath_var=LD_RUN_PATH
6616
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6617
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6619
# Commands to make compiler produce verbose output that lists
6620
# what "hidden" libraries, object files and flags are used when
6621
# linking a shared library.
6623
# There doesn't appear to be a way to prevent this compiler from
6624
# explicitly linking system object files so we need to strip them
6625
# from the output so that they don't get included in the library
6627
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'
6630
# IBM XL 8.0 on PPC, with GNU ld
6631
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6632
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6633
_LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6634
if test "x$supports_anon_versioning" = xyes; then
6635
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6636
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6637
echo "local: *; };" >> $output_objdir/$libname.ver~
6638
$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6642
case `$CC -V 2>&1 | sed 5q` in
6645
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6646
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6647
_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'
6648
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6649
_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'
6650
_LT_TAGVAR(compiler_needs_object, $1)=yes
6652
# Not sure whether something based on
6653
# $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6655
output_verbose_link_cmd='echo'
6657
# Archives containing C++ object files must be created using
6658
# "CC -xar", where "CC" is the Sun C++ compiler. This is
6659
# necessary to make sure instantiated templates are included
6661
_LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6669
# FIXME: insert proper C++ library support
6670
_LT_TAGVAR(ld_shlibs, $1)=no
6674
# FIXME: insert proper C++ library support
6675
_LT_TAGVAR(ld_shlibs, $1)=no
6679
case $cc_basename in
6681
# FIXME: insert proper C++ library support
6682
_LT_TAGVAR(ld_shlibs, $1)=no
6685
# FIXME: insert proper C++ library support
6686
_LT_TAGVAR(ld_shlibs, $1)=no
6692
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6693
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6695
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6696
_LT_TAGVAR(hardcode_direct, $1)=yes
6697
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6699
# Workaround some broken pre-1.5 toolchains
6700
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6704
_LT_TAGVAR(ld_shlibs, $1)=yes
6708
# C++ shared libraries are fairly broken
6709
_LT_TAGVAR(ld_shlibs, $1)=no
6713
if test -f /usr/libexec/ld.so; then
6714
_LT_TAGVAR(hardcode_direct, $1)=yes
6715
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6716
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6717
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6718
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6719
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6720
_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'
6721
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6722
_LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6724
output_verbose_link_cmd=echo
6726
_LT_TAGVAR(ld_shlibs, $1)=no
6730
osf3* | osf4* | osf5*)
6731
case $cc_basename in
6733
# Kuck and Associates, Inc. (KAI) C++ Compiler
6735
# KCC will only create a shared library if the output file
6736
# ends with ".so" (or ".sl" for HP-UX), so rename the library
6737
# to its proper name (with version) after linking.
6738
_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'
6740
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6741
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6743
# Archives containing C++ object files must be created using
6744
# the KAI C++ compiler.
6746
osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6747
*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6751
# Rational C++ 2.4.1
6752
# FIXME: insert proper C++ library support
6753
_LT_TAGVAR(ld_shlibs, $1)=no
6758
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6759
_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'
6760
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6763
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6764
_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'
6765
_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6766
echo "-hidden">> $lib.exp~
6767
$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~
6769
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6773
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6775
# Commands to make compiler produce verbose output that lists
6776
# what "hidden" libraries, object files and flags are used when
6777
# linking a shared library.
6779
# There doesn't appear to be a way to prevent this compiler from
6780
# explicitly linking system object files so we need to strip them
6781
# from the output so that they don't get included in the library
6783
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'
6786
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6787
_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6790
_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'
6793
_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'
6797
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6798
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6800
# Commands to make compiler produce verbose output that lists
6801
# what "hidden" libraries, object files and flags are used when
6802
# linking a shared library.
6803
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6806
# FIXME: insert proper C++ library support
6807
_LT_TAGVAR(ld_shlibs, $1)=no
6814
# FIXME: insert proper C++ library support
6815
_LT_TAGVAR(ld_shlibs, $1)=no
6819
case $cc_basename in
6822
# FIXME: insert proper C++ library support
6823
_LT_TAGVAR(ld_shlibs, $1)=no
6827
# FIXME: insert proper C++ library support
6828
_LT_TAGVAR(ld_shlibs, $1)=no
6831
# FIXME: insert proper C++ library support
6832
_LT_TAGVAR(ld_shlibs, $1)=no
6838
case $cc_basename in
6840
# Sun C++ 4.2, 5.x and Centerline C++
6841
_LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6842
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6843
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6844
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6845
$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'
6847
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6848
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6850
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6852
# The compiler driver will combine and reorder linker options,
6853
# but understands `-z linker_flag'.
6854
# Supported since Solaris 2.6 (maybe 2.5.1?)
6855
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6858
_LT_TAGVAR(link_all_deplibs, $1)=yes
6860
output_verbose_link_cmd='echo'
6862
# Archives containing C++ object files must be created using
6863
# "CC -xar", where "CC" is the Sun C++ compiler. This is
6864
# necessary to make sure instantiated templates are included
6866
_LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6869
# Green Hills C++ Compiler
6870
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6872
# The C++ compiler must be used to create the archive.
6873
_LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6876
# GNU C++ compiler with Solaris linker
6877
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6878
_LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6879
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6880
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6881
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6882
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6884
# Commands to make compiler produce verbose output that lists
6885
# what "hidden" libraries, object files and flags are used when
6886
# linking a shared library.
6887
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6889
# g++ 2.7 appears to require `-G' NOT `-shared' on this
6891
_LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6892
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6893
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6895
# Commands to make compiler produce verbose output that lists
6896
# what "hidden" libraries, object files and flags are used when
6897
# linking a shared library.
6898
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6901
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6903
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6905
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6913
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6914
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6915
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6916
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6917
runpath_var='LD_RUN_PATH'
6919
case $cc_basename in
6921
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6922
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6925
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6926
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6931
sysv5* | sco3.2v5* | sco5v6*)
6932
# Note: We can NOT use -z defs as we might desire, because we do not
6933
# link with -lc, and that would cause any symbols used from libc to
6934
# always be unresolved, which means just about no library would
6935
# ever link correctly. If we're not using GNU ld we use -z text
6936
# though, which does catch some bad symbols but isn't as heavy-handed
6938
_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6939
_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6940
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6941
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6942
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6943
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6944
_LT_TAGVAR(link_all_deplibs, $1)=yes
6945
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6946
runpath_var='LD_RUN_PATH'
6948
case $cc_basename in
6950
_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6951
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6954
_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6955
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6961
case $cc_basename in
6963
# NonStop-UX NCC 3.20
6964
# FIXME: insert proper C++ library support
6965
_LT_TAGVAR(ld_shlibs, $1)=no
6968
# FIXME: insert proper C++ library support
6969
_LT_TAGVAR(ld_shlibs, $1)=no
6975
# FIXME: insert proper C++ library support
6976
_LT_TAGVAR(ld_shlibs, $1)=no
6980
# FIXME: insert proper C++ library support
6981
_LT_TAGVAR(ld_shlibs, $1)=no
6985
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6986
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6988
_LT_TAGVAR(GCC, $1)="$GXX"
6989
_LT_TAGVAR(LD, $1)="$LD"
6992
## There is no encapsulation within the following macros, do not change
6993
## the running order or otherwise move them around unless you know exactly
6994
## what you are doing...
6995
_LT_SYS_HIDDEN_LIBDEPS($1)
6996
_LT_COMPILER_PIC($1)
6997
_LT_COMPILER_C_O($1)
6998
_LT_COMPILER_FILE_LOCKS($1)
6999
_LT_LINKER_SHLIBS($1)
7000
_LT_SYS_DYNAMIC_LINKER($1)
7001
_LT_LINKER_HARDCODE_LIBPATH($1)
7004
fi # test -n "$compiler"
7010
with_gnu_ld=$lt_save_with_gnu_ld
7011
lt_cv_path_LDCXX=$lt_cv_path_LD
7012
lt_cv_path_LD=$lt_save_path_LD
7013
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7014
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7015
fi # test "$_lt_caught_CXX_error" != yes
7018
])# _LT_LANG_CXX_CONFIG
7021
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7022
# ---------------------------------
7023
# Figure out "hidden" library dependencies from verbose
7024
# compiler output when linking a shared library.
7025
# Parse the compiler output and extract the necessary
7026
# objects, libraries and library flags.
7027
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7028
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7029
# Dependencies to place before and after the object being linked:
7030
_LT_TAGVAR(predep_objects, $1)=
7031
_LT_TAGVAR(postdep_objects, $1)=
7032
_LT_TAGVAR(predeps, $1)=
7033
_LT_TAGVAR(postdeps, $1)=
7034
_LT_TAGVAR(compiler_lib_search_path, $1)=
7036
dnl we can't use the lt_simple_compile_test_code here,
7037
dnl because it contains code intended for an executable,
7038
dnl not a library. It's possible we should let each
7039
dnl tag define a new lt_????_link_test_code variable,
7040
dnl but it's only used here...
7041
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7043
void foo (void) { a = 0; }
7045
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7049
Foo (void) { a = 0; }
7054
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7062
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7070
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7073
public void bar (void) {
7079
dnl Parse the compiler output and extract the necessary
7080
dnl objects, libraries and library flags.
7081
if AC_TRY_EVAL(ac_compile); then
7082
# Parse the compiler output and extract the necessary
7083
# objects, libraries and library flags.
7085
# Sentinel used to keep track of whether or not we are before
7086
# the conftest object file.
7087
pre_test_object_deps_done=no
7089
for p in `eval "$output_verbose_link_cmd"`; do
7093
# Some compilers place space between "-{L,R}" and the path.
7095
if test $p = "-L" ||
7096
test $p = "-R"; then
7103
if test "$pre_test_object_deps_done" = no; then
7106
# Internal compiler library paths should come after those
7107
# provided the user. The postdeps already come after the
7108
# user supplied libs so there is no need to process them.
7109
if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7110
_LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7112
_LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7115
# The "-l" case would never come before the object being
7116
# linked, so don't bother handling this case.
7119
if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7120
_LT_TAGVAR(postdeps, $1)="${prev}${p}"
7122
_LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7128
# This assumes that the test object file only shows up
7129
# once in the compiler output.
7130
if test "$p" = "conftest.$objext"; then
7131
pre_test_object_deps_done=yes
7135
if test "$pre_test_object_deps_done" = no; then
7136
if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7137
_LT_TAGVAR(predep_objects, $1)="$p"
7139
_LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7142
if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7143
_LT_TAGVAR(postdep_objects, $1)="$p"
7145
_LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7150
*) ;; # Ignore the rest.
7158
echo "libtool.m4: error: problem compiling $1 test program"
7161
$RM -f confest.$objext
7163
# PORTME: override above test on systems where it is broken
7167
# Interix 3.5 installs completely hosed .la files for C++, so rather than
7168
# hack all around it, let's just trust "g++" to DTRT.
7169
_LT_TAGVAR(predep_objects,$1)=
7170
_LT_TAGVAR(postdep_objects,$1)=
7171
_LT_TAGVAR(postdeps,$1)=
7175
case `$CC -V 2>&1 | sed 5q` in
7179
# The more standards-conforming stlport4 library is
7180
# incompatible with the Cstd library. Avoid specifying
7181
# it if it's in CXXFLAGS. Ignore libCrun as
7182
# -library=stlport4 depends on it.
7183
case " $CXX $CXXFLAGS " in
7184
*" -library=stlport4 "*)
7185
solaris_use_stlport4=yes
7189
if test "$solaris_use_stlport4" != yes; then
7190
_LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7197
case $cc_basename in
7199
# The more standards-conforming stlport4 library is
7200
# incompatible with the Cstd library. Avoid specifying
7201
# it if it's in CXXFLAGS. Ignore libCrun as
7202
# -library=stlport4 depends on it.
7203
case " $CXX $CXXFLAGS " in
7204
*" -library=stlport4 "*)
7205
solaris_use_stlport4=yes
7209
# Adding this requires a known-good setup of shared libraries for
7210
# Sun compiler versions before 5.6, else PIC objects from an old
7211
# archive will be linked into the output, leading to subtle bugs.
7212
if test "$solaris_use_stlport4" != yes; then
7213
_LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7221
case " $_LT_TAGVAR(postdeps, $1) " in
7222
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7224
_LT_TAGVAR(compiler_lib_search_dirs, $1)=
7225
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7226
_LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7228
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7229
[The directories searched by this compiler when creating a shared library])
7230
_LT_TAGDECL([], [predep_objects], [1],
7231
[Dependencies to place before and after the objects being linked to
7232
create a shared library])
7233
_LT_TAGDECL([], [postdep_objects], [1])
7234
_LT_TAGDECL([], [predeps], [1])
7235
_LT_TAGDECL([], [postdeps], [1])
7236
_LT_TAGDECL([], [compiler_lib_search_path], [1],
7237
[The library search path used internally by the compiler when linking
7239
])# _LT_SYS_HIDDEN_LIBDEPS
7244
# Since AC_PROG_F77 is broken, in that it returns the empty string
7245
# if there is no fortran compiler, we have our own version here.
7246
m4_defun([_LT_PROG_F77],
7248
pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
7250
if test -z "$F77" || test "X$F77" = "Xno"; then
7253
popdef([AC_MSG_ERROR])
7256
dnl aclocal-1.4 backwards compatibility:
7257
dnl AC_DEFUN([_LT_PROG_F77], [])
7260
# _LT_LANG_F77_CONFIG([TAG])
7261
# --------------------------
7262
# Ensure that the configuration variables for a Fortran 77 compiler are
7263
# suitably defined. These variables are subsequently used by _LT_CONFIG
7264
# to write the compiler configuration to `libtool'.
7265
m4_defun([_LT_LANG_F77_CONFIG],
7266
[AC_REQUIRE([_LT_PROG_F77])dnl
7267
AC_LANG_PUSH(Fortran 77)
7269
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7270
_LT_TAGVAR(allow_undefined_flag, $1)=
7271
_LT_TAGVAR(always_export_symbols, $1)=no
7272
_LT_TAGVAR(archive_expsym_cmds, $1)=
7273
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7274
_LT_TAGVAR(hardcode_direct, $1)=no
7275
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7276
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7277
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7278
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7279
_LT_TAGVAR(hardcode_minus_L, $1)=no
7280
_LT_TAGVAR(hardcode_automatic, $1)=no
7281
_LT_TAGVAR(inherit_rpath, $1)=no
7282
_LT_TAGVAR(module_cmds, $1)=
7283
_LT_TAGVAR(module_expsym_cmds, $1)=
7284
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7285
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7286
_LT_TAGVAR(no_undefined_flag, $1)=
7287
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7288
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7290
# Source file extension for f77 test sources.
7293
# Object file extension for compiled f77 test sources.
7295
_LT_TAGVAR(objext, $1)=$objext
7297
# No sense in running all these tests if we already determined that
7298
# the F77 compiler isn't working. Some variables (like enable_shared)
7299
# are currently assumed to apply to all compilers on this platform,
7300
# and will be corrupted by setting them based on a non-working compiler.
7301
if test "$_lt_disable_F77" != yes; then
7302
# Code to be used in simple compile tests
7303
lt_simple_compile_test_code="\
7309
# Code to be used in simple link tests
7310
lt_simple_link_test_code="\
7315
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7318
# save warnings/boilerplate of simple test code
7319
_LT_COMPILER_BOILERPLATE
7320
_LT_LINKER_BOILERPLATE
7322
# Allow CC to be a program name with arguments.
7327
_LT_TAGVAR(compiler, $1)=$CC
7328
_LT_CC_BASENAME([$compiler])
7330
if test -n "$compiler"; then
7331
AC_MSG_CHECKING([if libtool supports shared libraries])
7332
AC_MSG_RESULT([$can_build_shared])
7334
AC_MSG_CHECKING([whether to build shared libraries])
7335
test "$can_build_shared" = "no" && enable_shared=no
7337
# On AIX, shared libraries and static libraries use the same namespace, and
7338
# are all built from PIC.
7341
test "$enable_shared" = yes && enable_static=no
7342
if test -n "$RANLIB"; then
7343
archive_cmds="$archive_cmds~\$RANLIB \$lib"
7344
postinstall_cmds='$RANLIB $lib'
7348
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7349
test "$enable_shared" = yes && enable_static=no
7353
AC_MSG_RESULT([$enable_shared])
7355
AC_MSG_CHECKING([whether to build static libraries])
7356
# Make sure either enable_shared or enable_static is yes.
7357
test "$enable_shared" = yes || enable_static=yes
7358
AC_MSG_RESULT([$enable_static])
7360
_LT_TAGVAR(GCC, $1)="$G77"
7361
_LT_TAGVAR(LD, $1)="$LD"
7364
## There is no encapsulation within the following macros, do not change
7365
## the running order or otherwise move them around unless you know exactly
7366
## what you are doing...
7367
_LT_COMPILER_PIC($1)
7368
_LT_COMPILER_C_O($1)
7369
_LT_COMPILER_FILE_LOCKS($1)
7370
_LT_LINKER_SHLIBS($1)
7371
_LT_SYS_DYNAMIC_LINKER($1)
7372
_LT_LINKER_HARDCODE_LIBPATH($1)
7375
fi # test -n "$compiler"
7379
fi # test "$_lt_disable_F77" != yes
7382
])# _LT_LANG_F77_CONFIG
7387
# Since AC_PROG_FC is broken, in that it returns the empty string
7388
# if there is no fortran compiler, we have our own version here.
7389
m4_defun([_LT_PROG_FC],
7391
pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
7393
if test -z "$FC" || test "X$FC" = "Xno"; then
7396
popdef([AC_MSG_ERROR])
7399
dnl aclocal-1.4 backwards compatibility:
7400
dnl AC_DEFUN([_LT_PROG_FC], [])
7403
# _LT_LANG_FC_CONFIG([TAG])
7404
# -------------------------
7405
# Ensure that the configuration variables for a Fortran compiler are
7406
# suitably defined. These variables are subsequently used by _LT_CONFIG
7407
# to write the compiler configuration to `libtool'.
7408
m4_defun([_LT_LANG_FC_CONFIG],
7409
[AC_REQUIRE([_LT_PROG_FC])dnl
7410
AC_LANG_PUSH(Fortran)
7412
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7413
_LT_TAGVAR(allow_undefined_flag, $1)=
7414
_LT_TAGVAR(always_export_symbols, $1)=no
7415
_LT_TAGVAR(archive_expsym_cmds, $1)=
7416
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7417
_LT_TAGVAR(hardcode_direct, $1)=no
7418
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7419
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7420
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7421
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7422
_LT_TAGVAR(hardcode_minus_L, $1)=no
7423
_LT_TAGVAR(hardcode_automatic, $1)=no
7424
_LT_TAGVAR(inherit_rpath, $1)=no
7425
_LT_TAGVAR(module_cmds, $1)=
7426
_LT_TAGVAR(module_expsym_cmds, $1)=
7427
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7428
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7429
_LT_TAGVAR(no_undefined_flag, $1)=
7430
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7431
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7433
# Source file extension for fc test sources.
7434
ac_ext=${ac_fc_srcext-f}
7436
# Object file extension for compiled fc test sources.
7438
_LT_TAGVAR(objext, $1)=$objext
7440
# No sense in running all these tests if we already determined that
7441
# the FC compiler isn't working. Some variables (like enable_shared)
7442
# are currently assumed to apply to all compilers on this platform,
7443
# and will be corrupted by setting them based on a non-working compiler.
7444
if test "$_lt_disable_FC" != yes; then
7445
# Code to be used in simple compile tests
7446
lt_simple_compile_test_code="\
7452
# Code to be used in simple link tests
7453
lt_simple_link_test_code="\
7458
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7461
# save warnings/boilerplate of simple test code
7462
_LT_COMPILER_BOILERPLATE
7463
_LT_LINKER_BOILERPLATE
7465
# Allow CC to be a program name with arguments.
7470
GCC=$ac_cv_fc_compiler_gnu
7472
_LT_TAGVAR(compiler, $1)=$CC
7473
_LT_CC_BASENAME([$compiler])
7475
if test -n "$compiler"; then
7476
AC_MSG_CHECKING([if libtool supports shared libraries])
7477
AC_MSG_RESULT([$can_build_shared])
7479
AC_MSG_CHECKING([whether to build shared libraries])
7480
test "$can_build_shared" = "no" && enable_shared=no
7482
# On AIX, shared libraries and static libraries use the same namespace, and
7483
# are all built from PIC.
7486
test "$enable_shared" = yes && enable_static=no
7487
if test -n "$RANLIB"; then
7488
archive_cmds="$archive_cmds~\$RANLIB \$lib"
7489
postinstall_cmds='$RANLIB $lib'
7493
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7494
test "$enable_shared" = yes && enable_static=no
7498
AC_MSG_RESULT([$enable_shared])
7500
AC_MSG_CHECKING([whether to build static libraries])
7501
# Make sure either enable_shared or enable_static is yes.
7502
test "$enable_shared" = yes || enable_static=yes
7503
AC_MSG_RESULT([$enable_static])
7505
_LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7506
_LT_TAGVAR(LD, $1)="$LD"
7509
## There is no encapsulation within the following macros, do not change
7510
## the running order or otherwise move them around unless you know exactly
7511
## what you are doing...
7512
_LT_SYS_HIDDEN_LIBDEPS($1)
7513
_LT_COMPILER_PIC($1)
7514
_LT_COMPILER_C_O($1)
7515
_LT_COMPILER_FILE_LOCKS($1)
7516
_LT_LINKER_SHLIBS($1)
7517
_LT_SYS_DYNAMIC_LINKER($1)
7518
_LT_LINKER_HARDCODE_LIBPATH($1)
7521
fi # test -n "$compiler"
7525
fi # test "$_lt_disable_FC" != yes
7528
])# _LT_LANG_FC_CONFIG
7531
# _LT_LANG_GCJ_CONFIG([TAG])
7532
# --------------------------
7533
# Ensure that the configuration variables for the GNU Java Compiler compiler
7534
# are suitably defined. These variables are subsequently used by _LT_CONFIG
7535
# to write the compiler configuration to `libtool'.
7536
m4_defun([_LT_LANG_GCJ_CONFIG],
7537
[AC_REQUIRE([LT_PROG_GCJ])dnl
7540
# Source file extension for Java test sources.
7543
# Object file extension for compiled Java test sources.
7545
_LT_TAGVAR(objext, $1)=$objext
7547
# Code to be used in simple compile tests
7548
lt_simple_compile_test_code="class foo {}"
7550
# Code to be used in simple link tests
7551
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7553
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7556
# save warnings/boilerplate of simple test code
7557
_LT_COMPILER_BOILERPLATE
7558
_LT_LINKER_BOILERPLATE
7560
# Allow CC to be a program name with arguments.
7566
_LT_TAGVAR(compiler, $1)=$CC
7567
_LT_TAGVAR(LD, $1)="$LD"
7568
_LT_CC_BASENAME([$compiler])
7570
# GCJ did not exist at the time GCC didn't implicitly link libc in.
7571
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7573
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7575
if test -n "$compiler"; then
7576
_LT_COMPILER_NO_RTTI($1)
7577
_LT_COMPILER_PIC($1)
7578
_LT_COMPILER_C_O($1)
7579
_LT_COMPILER_FILE_LOCKS($1)
7580
_LT_LINKER_SHLIBS($1)
7581
_LT_LINKER_HARDCODE_LIBPATH($1)
7590
])# _LT_LANG_GCJ_CONFIG
7593
# _LT_LANG_RC_CONFIG([TAG])
7594
# -------------------------
7595
# Ensure that the configuration variables for the Windows resource compiler
7596
# are suitably defined. These variables are subsequently used by _LT_CONFIG
7597
# to write the compiler configuration to `libtool'.
7598
m4_defun([_LT_LANG_RC_CONFIG],
7599
[AC_REQUIRE([LT_PROG_RC])dnl
7602
# Source file extension for RC test sources.
7605
# Object file extension for compiled RC test sources.
7607
_LT_TAGVAR(objext, $1)=$objext
7609
# Code to be used in simple compile tests
7610
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7612
# Code to be used in simple link tests
7613
lt_simple_link_test_code="$lt_simple_compile_test_code"
7615
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7618
# save warnings/boilerplate of simple test code
7619
_LT_COMPILER_BOILERPLATE
7620
_LT_LINKER_BOILERPLATE
7622
# Allow CC to be a program name with arguments.
7628
_LT_TAGVAR(compiler, $1)=$CC
7629
_LT_CC_BASENAME([$compiler])
7630
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7632
if test -n "$compiler"; then
7640
])# _LT_LANG_RC_CONFIG
7645
AC_DEFUN([LT_PROG_GCJ],
7646
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7647
[m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7648
[AC_CHECK_TOOL(GCJ, gcj,)
7649
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7650
AC_SUBST(GCJFLAGS)])])[]dnl
7654
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7655
dnl aclocal-1.4 backwards compatibility:
7656
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7661
AC_DEFUN([LT_PROG_RC],
7662
[AC_CHECK_TOOL(RC, windres,)
7666
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7667
dnl aclocal-1.4 backwards compatibility:
7668
dnl AC_DEFUN([LT_AC_PROG_RC], [])
7673
# If we don't have a new enough Autoconf to choose the best grep
7674
# available, choose the one first in the user's PATH.
7675
m4_defun([_LT_DECL_EGREP],
7676
[AC_REQUIRE([AC_PROG_EGREP])dnl
7677
AC_REQUIRE([AC_PROG_FGREP])dnl
7678
test -z "$GREP" && GREP=grep
7679
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7680
_LT_DECL([], [EGREP], [1], [An ERE matcher])
7681
_LT_DECL([], [FGREP], [1], [A literal string matcher])
7682
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7689
# If we don't have a new enough Autoconf to choose the best objdump
7690
# available, choose the one first in the user's PATH.
7691
m4_defun([_LT_DECL_OBJDUMP],
7692
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7693
test -z "$OBJDUMP" && OBJDUMP=objdump
7694
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7701
# Check for a fully-functional sed program, that truncates
7702
# as few characters as possible. Prefer GNU sed if found.
7703
m4_defun([_LT_DECL_SED],
7705
test -z "$SED" && SED=sed
7706
Xsed="$SED -e 1s/^X//"
7707
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7708
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7709
[Sed that helps us avoid accidentally triggering echo(1) options like -n])
7712
m4_ifndef([AC_PROG_SED], [
7713
# NOTE: This macro has been submitted for inclusion into #
7714
# GNU Autoconf as AC_PROG_SED. When it is available in #
7715
# a released version of Autoconf we should remove this #
7716
# macro and use it instead. #
7718
m4_defun([AC_PROG_SED],
7719
[AC_MSG_CHECKING([for a sed that does not truncate output])
7720
AC_CACHE_VAL(lt_cv_path_SED,
7721
[# Loop through the user's path and test for sed and gsed.
7722
# Then use that list of sed's as ones to test for truncation.
7723
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7727
test -z "$as_dir" && as_dir=.
7728
for lt_ac_prog in sed gsed; do
7729
for ac_exec_ext in '' $ac_executable_extensions; do
7730
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7731
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7739
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7740
# along with /bin/sed that truncates output.
7741
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7742
test ! -f $lt_ac_sed && continue
7743
cat /dev/null > conftest.in
7745
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7746
# Check for GNU sed and select it if it is found.
7747
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7748
lt_cv_path_SED=$lt_ac_sed
7752
cat conftest.in conftest.in >conftest.tmp
7753
mv conftest.tmp conftest.in
7754
cp conftest.in conftest.nl
7756
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7757
cmp -s conftest.out conftest.nl || break
7758
# 10000 chars as input seems more than enough
7759
test $lt_ac_count -gt 10 && break
7760
lt_ac_count=`expr $lt_ac_count + 1`
7761
if test $lt_ac_count -gt $lt_ac_max; then
7762
lt_ac_max=$lt_ac_count
7763
lt_cv_path_SED=$lt_ac_sed
7770
AC_MSG_RESULT([$SED])
7775
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7776
dnl aclocal-1.4 backwards compatibility:
7777
dnl AC_DEFUN([LT_AC_PROG_SED], [])
7780
# _LT_CHECK_SHELL_FEATURES
7781
# ------------------------
7782
# Find out whether the shell is Bourne or XSI compatible,
7783
# or has some other useful features.
7784
m4_defun([_LT_CHECK_SHELL_FEATURES],
7785
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7786
# Try some XSI features
7789
test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7791
&& eval 'test $(( 1 + 1 )) -eq 2 \
7792
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7794
AC_MSG_RESULT([$xsi_shell])
7795
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7797
AC_MSG_CHECKING([whether the shell understands "+="])
7799
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7801
&& lt_shell_append=yes
7802
AC_MSG_RESULT([$lt_shell_append])
7803
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7805
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7810
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7812
# test EBCDIC or ASCII
7813
case `echo X|tr X '\101'` in
7814
A) # ASCII based system
7815
# \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7816
lt_SP2NL='tr \040 \012'
7817
lt_NL2SP='tr \015\012 \040\040'
7819
*) # EBCDIC based system
7820
lt_SP2NL='tr \100 \n'
7821
lt_NL2SP='tr \r\n \100\100'
7824
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7825
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7826
])# _LT_CHECK_SHELL_FEATURES
7829
# _LT_PROG_XSI_SHELLFNS
7830
# ---------------------
7831
# Bourne and XSI compatible variants of some useful shell functions.
7832
m4_defun([_LT_PROG_XSI_SHELLFNS],
7835
cat << \_LT_EOF >> "$cfgfile"
7837
# func_dirname file append nondir_replacement
7838
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7839
# otherwise set result to NONDIR_REPLACEMENT.
7843
*/*) func_dirname_result="${1%/*}${2}" ;;
7844
* ) func_dirname_result="${3}" ;;
7848
# func_basename file
7851
func_basename_result="${1##*/}"
7854
# func_dirname_and_basename file append nondir_replacement
7855
# perform func_basename and func_dirname in a single function
7857
# dirname: Compute the dirname of FILE. If nonempty,
7858
# add APPEND to the result, otherwise set result
7859
# to NONDIR_REPLACEMENT.
7860
# value returned in "$func_dirname_result"
7861
# basename: Compute filename of FILE.
7862
# value retuned in "$func_basename_result"
7863
# Implementation must be kept synchronized with func_dirname
7864
# and func_basename. For efficiency, we do not delegate to
7865
# those functions but instead duplicate the functionality here.
7866
func_dirname_and_basename ()
7869
*/*) func_dirname_result="${1%/*}${2}" ;;
7870
* ) func_dirname_result="${3}" ;;
7872
func_basename_result="${1##*/}"
7875
# func_stripname prefix suffix name
7876
# strip PREFIX and SUFFIX off of NAME.
7877
# PREFIX and SUFFIX must not contain globbing or regex special
7878
# characters, hashes, percent signs, but SUFFIX may contain a leading
7879
# dot (in which case that matches only a dot).
7882
# pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7883
# positional parameters, so assign one to ordinary parameter first.
7884
func_stripname_result=${3}
7885
func_stripname_result=${func_stripname_result#"${1}"}
7886
func_stripname_result=${func_stripname_result%"${2}"}
7892
func_opt_split_opt=${1%%=*}
7893
func_opt_split_arg=${1#*=}
7900
*.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7901
*) func_lo2o_result=${1} ;;
7905
# func_xform libobj-or-source
7908
func_xform_result=${1%.*}.lo
7911
# func_arith arithmetic-term...
7914
func_arith_result=$(( $[*] ))
7918
# STRING may not start with a hyphen.
7921
func_len_result=${#1}
7926
*) # Bourne compatible functions.
7927
cat << \_LT_EOF >> "$cfgfile"
7929
# func_dirname file append nondir_replacement
7930
# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7931
# otherwise set result to NONDIR_REPLACEMENT.
7934
# Extract subdirectory from the argument.
7935
func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7936
if test "X$func_dirname_result" = "X${1}"; then
7937
func_dirname_result="${3}"
7939
func_dirname_result="$func_dirname_result${2}"
7943
# func_basename file
7946
func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7949
dnl func_dirname_and_basename
7950
dnl A portable version of this function is already defined in general.m4sh
7951
dnl so there is no need for it here.
7953
# func_stripname prefix suffix name
7954
# strip PREFIX and SUFFIX off of NAME.
7955
# PREFIX and SUFFIX must not contain globbing or regex special
7956
# characters, hashes, percent signs, but SUFFIX may contain a leading
7957
# dot (in which case that matches only a dot).
7958
# func_strip_suffix prefix name
7962
.*) func_stripname_result=`$ECHO "X${3}" \
7963
| $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7964
*) func_stripname_result=`$ECHO "X${3}" \
7965
| $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7970
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7971
my_sed_long_arg='1s/^-[[^=]]*=//'
7976
func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7977
func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7983
func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7986
# func_xform libobj-or-source
7989
func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7992
# func_arith arithmetic-term...
7995
func_arith_result=`expr "$[@]"`
7999
# STRING may not start with a hyphen.
8002
func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8008
case $lt_shell_append in
8010
cat << \_LT_EOF >> "$cfgfile"
8012
# func_append var value
8013
# Append VALUE to the end of shell variable VAR.
8021
cat << \_LT_EOF >> "$cfgfile"
8023
# func_append var value
8024
# Append VALUE to the end of shell variable VAR.
8027
eval "$[1]=\$$[1]\$[2]"
8035
# Helper functions for option handling. -*- Autoconf -*-
8037
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8038
# Written by Gary V. Vaughan, 2004
8040
# This file is free software; the Free Software Foundation gives
8041
# unlimited permission to copy and/or distribute it, with or without
8042
# modifications, as long as this notice is preserved.
8044
# serial 6 ltoptions.m4
8046
# This is to help aclocal find these macros, as it can't see m4_define.
8047
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8050
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8051
# ------------------------------------------
8052
m4_define([_LT_MANGLE_OPTION],
8053
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8056
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8057
# ---------------------------------------
8058
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8059
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
8061
m4_define([_LT_SET_OPTION],
8062
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8063
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8064
_LT_MANGLE_DEFUN([$1], [$2]),
8065
[m4_warning([Unknown $1 option `$2'])])[]dnl
8069
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8070
# ------------------------------------------------------------
8071
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8072
m4_define([_LT_IF_OPTION],
8073
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8076
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8077
# -------------------------------------------------------
8078
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8080
m4_define([_LT_UNLESS_OPTIONS],
8081
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8082
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8083
[m4_define([$0_found])])])[]dnl
8084
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8089
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8090
# ----------------------------------------
8091
# OPTION-LIST is a space-separated list of Libtool options associated
8092
# with MACRO-NAME. If any OPTION has a matching handler declared with
8093
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8094
# the unknown option and exit.
8095
m4_defun([_LT_SET_OPTIONS],
8097
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8098
[_LT_SET_OPTION([$1], _LT_Option)])
8100
m4_if([$1],[LT_INIT],[
8102
dnl Simply set some default values (i.e off) if boolean options were not
8104
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8106
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8109
dnl If no reference was made to various pairs of opposing options, then
8110
dnl we run the default mode handler for the pair. For example, if neither
8111
dnl `shared' nor `disable-shared' was passed, we enable building of shared
8112
dnl archives by default:
8113
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8114
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8115
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8116
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8117
[_LT_ENABLE_FAST_INSTALL])
8123
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8124
# -----------------------------------------
8125
m4_define([_LT_MANGLE_DEFUN],
8126
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8129
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8130
# -----------------------------------------------
8131
m4_define([LT_OPTION_DEFINE],
8132
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8133
])# LT_OPTION_DEFINE
8138
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8141
AU_DEFUN([AC_LIBTOOL_DLOPEN],
8142
[_LT_SET_OPTION([LT_INIT], [dlopen])
8143
AC_DIAGNOSE([obsolete],
8144
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8145
put the `dlopen' option into LT_INIT's first parameter.])
8148
dnl aclocal-1.4 backwards compatibility:
8149
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8154
# Declare package support for building win32 dll's.
8155
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8156
[enable_win32_dll=yes
8159
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
8160
AC_CHECK_TOOL(AS, as, false)
8161
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8162
AC_CHECK_TOOL(OBJDUMP, objdump, false)
8166
test -z "$AS" && AS=as
8167
_LT_DECL([], [AS], [0], [Assembler program])dnl
8169
test -z "$DLLTOOL" && DLLTOOL=dlltool
8170
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
8172
test -z "$OBJDUMP" && OBJDUMP=objdump
8173
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
8176
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8177
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8178
_LT_SET_OPTION([LT_INIT], [win32-dll])
8179
AC_DIAGNOSE([obsolete],
8180
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8181
put the `win32-dll' option into LT_INIT's first parameter.])
8184
dnl aclocal-1.4 backwards compatibility:
8185
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8188
# _LT_ENABLE_SHARED([DEFAULT])
8189
# ----------------------------
8190
# implement the --enable-shared flag, and supports the `shared' and
8191
# `disable-shared' LT_INIT options.
8192
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8193
m4_define([_LT_ENABLE_SHARED],
8194
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8195
AC_ARG_ENABLE([shared],
8196
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8197
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8198
[p=${PACKAGE-default}
8200
yes) enable_shared=yes ;;
8201
no) enable_shared=no ;;
8204
# Look at the argument we got. We use all the common list separators.
8205
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8206
for pkg in $enableval; do
8208
if test "X$pkg" = "X$p"; then
8215
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8217
_LT_DECL([build_libtool_libs], [enable_shared], [0],
8218
[Whether or not to build shared libraries])
8219
])# _LT_ENABLE_SHARED
8221
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8222
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8225
AC_DEFUN([AC_ENABLE_SHARED],
8226
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8229
AC_DEFUN([AC_DISABLE_SHARED],
8230
[_LT_SET_OPTION([LT_INIT], [disable-shared])
8233
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8234
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8236
dnl aclocal-1.4 backwards compatibility:
8237
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8238
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8242
# _LT_ENABLE_STATIC([DEFAULT])
8243
# ----------------------------
8244
# implement the --enable-static flag, and support the `static' and
8245
# `disable-static' LT_INIT options.
8246
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8247
m4_define([_LT_ENABLE_STATIC],
8248
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8249
AC_ARG_ENABLE([static],
8250
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8251
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8252
[p=${PACKAGE-default}
8254
yes) enable_static=yes ;;
8255
no) enable_static=no ;;
8258
# Look at the argument we got. We use all the common list separators.
8259
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8260
for pkg in $enableval; do
8262
if test "X$pkg" = "X$p"; then
8269
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8271
_LT_DECL([build_old_libs], [enable_static], [0],
8272
[Whether or not to build static libraries])
8273
])# _LT_ENABLE_STATIC
8275
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8276
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8279
AC_DEFUN([AC_ENABLE_STATIC],
8280
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8283
AC_DEFUN([AC_DISABLE_STATIC],
8284
[_LT_SET_OPTION([LT_INIT], [disable-static])
8287
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8288
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8290
dnl aclocal-1.4 backwards compatibility:
8291
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8292
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8296
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
8297
# ----------------------------------
8298
# implement the --enable-fast-install flag, and support the `fast-install'
8299
# and `disable-fast-install' LT_INIT options.
8300
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8301
m4_define([_LT_ENABLE_FAST_INSTALL],
8302
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8303
AC_ARG_ENABLE([fast-install],
8304
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8305
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8306
[p=${PACKAGE-default}
8308
yes) enable_fast_install=yes ;;
8309
no) enable_fast_install=no ;;
8311
enable_fast_install=no
8312
# Look at the argument we got. We use all the common list separators.
8313
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8314
for pkg in $enableval; do
8316
if test "X$pkg" = "X$p"; then
8317
enable_fast_install=yes
8323
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8325
_LT_DECL([fast_install], [enable_fast_install], [0],
8326
[Whether or not to optimize for fast installation])dnl
8327
])# _LT_ENABLE_FAST_INSTALL
8329
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8330
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8333
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8334
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8335
AC_DIAGNOSE([obsolete],
8336
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8337
the `fast-install' option into LT_INIT's first parameter.])
8340
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8341
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8342
AC_DIAGNOSE([obsolete],
8343
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8344
the `disable-fast-install' option into LT_INIT's first parameter.])
8347
dnl aclocal-1.4 backwards compatibility:
8348
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8349
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8352
# _LT_WITH_PIC([MODE])
8353
# --------------------
8354
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
8356
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
8357
m4_define([_LT_WITH_PIC],
8359
[AS_HELP_STRING([--with-pic],
8360
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8361
[pic_mode="$withval"],
8364
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
8366
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8369
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8370
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8373
AU_DEFUN([AC_LIBTOOL_PICMODE],
8374
[_LT_SET_OPTION([LT_INIT], [pic-only])
8375
AC_DIAGNOSE([obsolete],
8376
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8377
put the `pic-only' option into LT_INIT's first parameter.])
8380
dnl aclocal-1.4 backwards compatibility:
8381
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8384
m4_define([_LTDL_MODE], [])
8385
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8386
[m4_define([_LTDL_MODE], [nonrecursive])])
8387
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8388
[m4_define([_LTDL_MODE], [recursive])])
8389
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8390
[m4_define([_LTDL_MODE], [subproject])])
8392
m4_define([_LTDL_TYPE], [])
8393
LT_OPTION_DEFINE([LTDL_INIT], [installable],
8394
[m4_define([_LTDL_TYPE], [installable])])
8395
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8396
[m4_define([_LTDL_TYPE], [convenience])])
8398
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
8400
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8401
# Written by Gary V. Vaughan, 2004
8403
# This file is free software; the Free Software Foundation gives
8404
# unlimited permission to copy and/or distribute it, with or without
8405
# modifications, as long as this notice is preserved.
8407
# serial 6 ltsugar.m4
8409
# This is to help aclocal find these macros, as it can't see m4_define.
8410
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8413
# lt_join(SEP, ARG1, [ARG2...])
8414
# -----------------------------
8415
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8416
# associated separator.
8417
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8418
# versions in m4sugar had bugs.
8419
m4_define([lt_join],
8420
[m4_if([$#], [1], [],
8422
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8423
m4_define([_lt_join],
8424
[m4_if([$#$2], [2], [],
8425
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8431
# Manipulate m4 lists.
8432
# These macros are necessary as long as will still need to support
8433
# Autoconf-2.59 which quotes differently.
8434
m4_define([lt_car], [[$1]])
8436
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8438
[m4_dquote(m4_shift($@))])])
8439
m4_define([lt_unquote], $1)
8442
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
8443
# ------------------------------------------
8444
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
8445
# Note that neither SEPARATOR nor STRING are expanded; they are appended
8446
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8447
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
8448
# than defined and empty).
8450
# This macro is needed until we can rely on Autoconf 2.62, since earlier
8451
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8452
m4_define([lt_append],
8454
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8458
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8459
# ----------------------------------------------------------
8460
# Produce a SEP delimited list of all paired combinations of elements of
8461
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
8462
# has the form PREFIXmINFIXSUFFIXn.
8463
# Needed until we can rely on m4_combine added in Autoconf 2.62.
8464
m4_define([lt_combine],
8465
[m4_if(m4_eval([$# > 3]), [1],
8466
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8467
[[m4_foreach([_Lt_prefix], [$2],
8468
[m4_foreach([_Lt_suffix],
8469
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8470
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8473
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8474
# -----------------------------------------------------------------------
8475
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8476
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8477
m4_define([lt_if_append_uniq],
8479
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8480
[lt_append([$1], [$2], [$3])$4],
8482
[lt_append([$1], [$2], [$3])$4])])
8485
# lt_dict_add(DICT, KEY, VALUE)
8486
# -----------------------------
8487
m4_define([lt_dict_add],
8488
[m4_define([$1($2)], [$3])])
8491
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8492
# --------------------------------------------
8493
m4_define([lt_dict_add_subkey],
8494
[m4_define([$1($2:$3)], [$4])])
8497
# lt_dict_fetch(DICT, KEY, [SUBKEY])
8498
# ----------------------------------
8499
m4_define([lt_dict_fetch],
8501
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8502
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8505
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8506
# -----------------------------------------------------------------
8507
m4_define([lt_if_dict_fetch],
8508
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8513
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8514
# --------------------------------------------------------------
8515
m4_define([lt_dict_filter],
8516
[m4_if([$5], [], [],
8517
[lt_join(m4_quote(m4_default([$4], [[, ]])),
8518
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8519
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8522
# ltversion.m4 -- version numbers -*- Autoconf -*-
8524
# Copyright (C) 2004 Free Software Foundation, Inc.
8525
# Written by Scott James Remnant, 2004
8527
# This file is free software; the Free Software Foundation gives
8528
# unlimited permission to copy and/or distribute it, with or without
8529
# modifications, as long as this notice is preserved.
8531
# Generated from ltversion.in.
8533
# serial 3012 ltversion.m4
8534
# This file is part of GNU Libtool
8536
m4_define([LT_PACKAGE_VERSION], [2.2.6])
8537
m4_define([LT_PACKAGE_REVISION], [1.3012])
8539
AC_DEFUN([LTVERSION_VERSION],
8540
[macro_version='2.2.6'
8541
macro_revision='1.3012'
8542
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8543
_LT_DECL(, macro_revision, 0)
8546
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
8548
# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
8549
# Written by Scott James Remnant, 2004.
8551
# This file is free software; the Free Software Foundation gives
8552
# unlimited permission to copy and/or distribute it, with or without
8553
# modifications, as long as this notice is preserved.
8555
# serial 4 lt~obsolete.m4
8557
# These exist entirely to fool aclocal when bootstrapping libtool.
8559
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
8560
# which have later been changed to m4_define as they aren't part of the
8561
# exported API, or moved to Autoconf or Automake where they belong.
8563
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
8564
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8565
# using a macro with the same name in our local m4/libtool.m4 it'll
8566
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8567
# and doesn't know about Autoconf macros at all.)
8569
# So we provide this file, which has a silly filename so it's always
8570
# included after everything else. This provides aclocal with the
8571
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8572
# because those macros already exist, or will be overwritten later.
8573
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
8575
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8576
# Yes, that means every name once taken will need to remain here until
8577
# we give up compatibility with versions before 1.7, at which point
8578
# we need to keep only those names which we still refer to.
8580
# This is to help aclocal find these macros, as it can't see m4_define.
8581
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
8583
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
8584
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
8585
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
8586
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
8587
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
8588
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
8589
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
8590
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
8591
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
8592
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
8593
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
8594
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
8595
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
8596
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
8597
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
8598
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
8599
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
8600
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
8601
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
8602
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
8603
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
8604
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
8605
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
8606
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
8607
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
8608
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
8609
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
8610
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
8611
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
8612
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
8613
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
8614
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
8615
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
8616
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
8617
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
8618
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
8619
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
8620
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
8621
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
8622
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
8623
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
8624
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
8625
m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
8626
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
8627
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
8628
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
8629
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
8630
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
8631
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
8632
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
8633
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
8634
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
8635
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
8636
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
8637
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
8639
499
# nls.m4 serial 3 (gettext-0.15)
8640
500
dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
8641
501
dnl This file is free software; the Free Software Foundation