Merge lp:~indicator-applet-developers/indicator-applet/ubuntu into lp:~ubuntu-desktop/indicator-applet/ubuntu

Proposed by Ted Gould
Status: Merged
Merged at revision: 274
Proposed branch: lp:~indicator-applet-developers/indicator-applet/ubuntu
Merge into: lp:~ubuntu-desktop/indicator-applet/ubuntu
Diff against target: 9842 lines (+8460/-258)
8 files modified
Makefile.in (+2/-0)
aclocal.m4 (+8200/-45)
configure (+243/-212)
configure.ac (+1/-1)
data/Makefile.in (+2/-0)
debian/changelog (+7/-0)
src/Makefile.in (+2/-0)
src/applet-main.c (+3/-0)
To merge this branch: bzr merge lp:~indicator-applet-developers/indicator-applet/ubuntu
Reviewer Review Type Date Requested Status
Ken VanDine Pending
Review via email: mp+33827@code.launchpad.net

Description of the change

0.4.4

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile.in'
--- Makefile.in 2010-05-27 18:40:48 +0000
+++ Makefile.in 2010-08-26 19:41:15 +0000
@@ -194,6 +194,8 @@
194PACKAGE_VERSION = @PACKAGE_VERSION@194PACKAGE_VERSION = @PACKAGE_VERSION@
195PATH_SEPARATOR = @PATH_SEPARATOR@195PATH_SEPARATOR = @PATH_SEPARATOR@
196PKG_CONFIG = @PKG_CONFIG@196PKG_CONFIG = @PKG_CONFIG@
197PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
198PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
197POFILES = @POFILES@199POFILES = @POFILES@
198POSUB = @POSUB@200POSUB = @POSUB@
199PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@201PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
200202
=== modified file 'aclocal.m4'
--- aclocal.m4 2010-05-27 18:40:48 +0000
+++ aclocal.m4 2010-08-26 19:41:15 +0000
@@ -13,8 +13,8 @@
1313
14m4_ifndef([AC_AUTOCONF_VERSION],14m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
17[m4_warning([this file was generated for autoconf 2.65.17[m4_warning([this file was generated for autoconf 2.67.
18You have another version of autoconf. It may work, but is not guaranteed to.18You have another version of autoconf. It may work, but is not guaranteed to.
19If you have problems, you may need to regenerate the build system entirely.19If you have problems, you may need to regenerate the build system entirely.
20To do so, use the procedure documented by the package, typically `autoreconf'.])])20To do so, use the procedure documented by the package, typically `autoreconf'.])])
@@ -346,7 +346,7 @@
346346
347 dnl These rules are solely for the distribution goal. While doing this347 dnl These rules are solely for the distribution goal. While doing this
348 dnl we only have to keep exactly one list of the available catalogs348 dnl we only have to keep exactly one list of the available catalogs
349 dnl in configure.in.349 dnl in configure.ac.
350 for lang in $ALL_LINGUAS; do350 for lang in $ALL_LINGUAS; do
351 GMOFILES="$GMOFILES $lang.gmo"351 GMOFILES="$GMOFILES $lang.gmo"
352 POFILES="$POFILES $lang.po"352 POFILES="$POFILES $lang.po"
@@ -475,7 +475,7 @@
475dnl475dnl
476dnl Now the definitions that aclocal will find476dnl Now the definitions that aclocal will find
477dnl477dnl
478ifdef(glib_configure_in,[],[478ifdef(glib_configure_ac,[],[
479AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])479AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
480AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])480AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
481])dnl481])dnl
@@ -497,8 +497,8169 @@
497fi])497fi])
498498
499499
500# nls.m4 serial 3 (gettext-0.15)500
501dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.501dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
502# serial 40 IT_PROG_INTLTOOL
503AC_DEFUN([IT_PROG_INTLTOOL], [
504AC_PREREQ([2.50])dnl
505AC_REQUIRE([AM_NLS])dnl
506
507case "$am__api_version" in
508 1.[01234])
509 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
510 ;;
511 *)
512 ;;
513esac
514
515if test -n "$1"; then
516 AC_MSG_CHECKING([for intltool >= $1])
517
518 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
519 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
520 [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
521 ]
522 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
523 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
524 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
525fi
526
527AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
528AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
529AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
530if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
531 AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
532fi
533
534 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 $< [$]@'
535INTLTOOL_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 $< [$]@'
536 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 $< [$]@'
537 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 $< [$]@'
538 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
539 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 $< [$]@'
540 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 $< [$]@'
541 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 $< [$]@'
542INTLTOOL_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 $< [$]@'
543 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 $< [$]@'
544 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 $< [$]@'
545 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
546 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 $< [$]@'
547 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 $< [$]@'
548 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 $< [$]@'
549 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 $< [$]@'
550 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 $< [$]@'
551 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 $< [$]@'
552 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
554_IT_SUBST(INTLTOOL_DESKTOP_RULE)
555_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
556_IT_SUBST(INTLTOOL_KEYS_RULE)
557_IT_SUBST(INTLTOOL_PROP_RULE)
558_IT_SUBST(INTLTOOL_OAF_RULE)
559_IT_SUBST(INTLTOOL_PONG_RULE)
560_IT_SUBST(INTLTOOL_SERVER_RULE)
561_IT_SUBST(INTLTOOL_SHEET_RULE)
562_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
563_IT_SUBST(INTLTOOL_UI_RULE)
564_IT_SUBST(INTLTOOL_XAM_RULE)
565_IT_SUBST(INTLTOOL_KBD_RULE)
566_IT_SUBST(INTLTOOL_XML_RULE)
567_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
568_IT_SUBST(INTLTOOL_CAVES_RULE)
569_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
570_IT_SUBST(INTLTOOL_THEME_RULE)
571_IT_SUBST(INTLTOOL_SERVICE_RULE)
572_IT_SUBST(INTLTOOL_POLICY_RULE)
573
574# Check the gettext tools to make sure they are GNU
575AC_PATH_PROG(XGETTEXT, xgettext)
576AC_PATH_PROG(MSGMERGE, msgmerge)
577AC_PATH_PROG(MSGFMT, msgfmt)
578AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
579if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
580 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
581fi
582xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
583mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
584mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
585if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
586 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
587fi
588
589AC_PATH_PROG(INTLTOOL_PERL, perl)
590if test -z "$INTLTOOL_PERL"; then
591 AC_MSG_ERROR([perl not found])
592fi
593AC_MSG_CHECKING([for perl >= 5.8.1])
594$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
595if test $? -ne 0; then
596 AC_MSG_ERROR([perl 5.8.1 is required for intltool])
597else
598 IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
599 AC_MSG_RESULT([$IT_PERL_VERSION])
600fi
601if test "x$2" != "xno-xml"; then
602 AC_MSG_CHECKING([for XML::Parser])
603 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
604 AC_MSG_RESULT([ok])
605 else
606 AC_MSG_ERROR([XML::Parser perl module is required for intltool])
607 fi
608fi
609
610# Substitute ALL_LINGUAS so we can use it in po/Makefile
611AC_SUBST(ALL_LINGUAS)
612
613# Set DATADIRNAME correctly if it is not set yet
614# (copied from glib-gettext.m4)
615if test -z "$DATADIRNAME"; then
616 AC_LINK_IFELSE(
617 [AC_LANG_PROGRAM([[]],
618 [[extern int _nl_msg_cat_cntr;
619 return _nl_msg_cat_cntr]])],
620 [DATADIRNAME=share],
621 [case $host in
622 *-*-solaris*)
623 dnl On Solaris, if bind_textdomain_codeset is in libc,
624 dnl GNU format message catalog is always supported,
625 dnl since both are added to the libc all together.
626 dnl Hence, we'd like to go with DATADIRNAME=share
627 dnl in this case.
628 AC_CHECK_FUNC(bind_textdomain_codeset,
629 [DATADIRNAME=share], [DATADIRNAME=lib])
630 ;;
631 *)
632 [DATADIRNAME=lib]
633 ;;
634 esac])
635fi
636AC_SUBST(DATADIRNAME)
637
638IT_PO_SUBDIR([po])
639
640])
641
642
643# IT_PO_SUBDIR(DIRNAME)
644# ---------------------
645# All po subdirs have to be declared with this macro; the subdir "po" is
646# declared by IT_PROG_INTLTOOL.
647#
648AC_DEFUN([IT_PO_SUBDIR],
649[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
650dnl
651dnl The following CONFIG_COMMANDS should be executed at the very end
652dnl of config.status.
653AC_CONFIG_COMMANDS_PRE([
654 AC_CONFIG_COMMANDS([$1/stamp-it], [
655 if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
656 AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
657 fi
658 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
659 >"$1/stamp-it.tmp"
660 [sed '/^#/d
661 s/^[[].*] *//
662 /^[ ]*$/d
663 '"s|^| $ac_top_srcdir/|" \
664 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
665 ]
666 [sed '/^POTFILES =/,/[^\\]$/ {
667 /^POTFILES =/!d
668 r $1/POTFILES
669 }
670 ' "$1/Makefile.in" >"$1/Makefile"]
671 rm -f "$1/Makefile.tmp"
672 mv "$1/stamp-it.tmp" "$1/stamp-it"
673 ])
674])dnl
675])
676
677# _IT_SUBST(VARIABLE)
678# -------------------
679# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
680#
681AC_DEFUN([_IT_SUBST],
682[
683AC_SUBST([$1])
684m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
685]
686)
687
688# deprecated macros
689AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
690# A hint is needed for aclocal from Automake <= 1.9.4:
691# AC_DEFUN([AC_PROG_INTLTOOL], ...)
692
693
694# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
695#
696# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
697# 2006, 2007, 2008 Free Software Foundation, Inc.
698# Written by Gordon Matzigkeit, 1996
699#
700# This file is free software; the Free Software Foundation gives
701# unlimited permission to copy and/or distribute it, with or without
702# modifications, as long as this notice is preserved.
703
704m4_define([_LT_COPYING], [dnl
705# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
706# 2006, 2007, 2008 Free Software Foundation, Inc.
707# Written by Gordon Matzigkeit, 1996
708#
709# This file is part of GNU Libtool.
710#
711# GNU Libtool is free software; you can redistribute it and/or
712# modify it under the terms of the GNU General Public License as
713# published by the Free Software Foundation; either version 2 of
714# the License, or (at your option) any later version.
715#
716# As a special exception to the GNU General Public License,
717# if you distribute this file as part of a program or library that
718# is built using GNU Libtool, you may include this file under the
719# same distribution terms that you use for the rest of that program.
720#
721# GNU Libtool is distributed in the hope that it will be useful,
722# but WITHOUT ANY WARRANTY; without even the implied warranty of
723# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
724# GNU General Public License for more details.
725#
726# You should have received a copy of the GNU General Public License
727# along with GNU Libtool; see the file COPYING. If not, a copy
728# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
729# obtained by writing to the Free Software Foundation, Inc.,
730# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
731])
732
733# serial 56 LT_INIT
734
735
736# LT_PREREQ(VERSION)
737# ------------------
738# Complain and exit if this libtool version is less that VERSION.
739m4_defun([LT_PREREQ],
740[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
741 [m4_default([$3],
742 [m4_fatal([Libtool version $1 or higher is required],
743 63)])],
744 [$2])])
745
746
747# _LT_CHECK_BUILDDIR
748# ------------------
749# Complain if the absolute build directory name contains unusual characters
750m4_defun([_LT_CHECK_BUILDDIR],
751[case `pwd` in
752 *\ * | *\ *)
753 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
754esac
755])
756
757
758# LT_INIT([OPTIONS])
759# ------------------
760AC_DEFUN([LT_INIT],
761[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
762AC_BEFORE([$0], [LT_LANG])dnl
763AC_BEFORE([$0], [LT_OUTPUT])dnl
764AC_BEFORE([$0], [LTDL_INIT])dnl
765m4_require([_LT_CHECK_BUILDDIR])dnl
766
767dnl Autoconf doesn't catch unexpanded LT_ macros by default:
768m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
769m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
770dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
771dnl unless we require an AC_DEFUNed macro:
772AC_REQUIRE([LTOPTIONS_VERSION])dnl
773AC_REQUIRE([LTSUGAR_VERSION])dnl
774AC_REQUIRE([LTVERSION_VERSION])dnl
775AC_REQUIRE([LTOBSOLETE_VERSION])dnl
776m4_require([_LT_PROG_LTMAIN])dnl
777
778dnl Parse OPTIONS
779_LT_SET_OPTIONS([$0], [$1])
780
781# This can be used to rebuild libtool when needed
782LIBTOOL_DEPS="$ltmain"
783
784# Always use our own libtool.
785LIBTOOL='$(SHELL) $(top_builddir)/libtool'
786AC_SUBST(LIBTOOL)dnl
787
788_LT_SETUP
789
790# Only expand once:
791m4_define([LT_INIT])
792])# LT_INIT
793
794# Old names:
795AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
796AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
797dnl aclocal-1.4 backwards compatibility:
798dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
799dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
800
801
802# _LT_CC_BASENAME(CC)
803# -------------------
804# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
805m4_defun([_LT_CC_BASENAME],
806[for cc_temp in $1""; do
807 case $cc_temp in
808 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
809 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
810 \-*) ;;
811 *) break;;
812 esac
813done
814cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
815])
816
817
818# _LT_FILEUTILS_DEFAULTS
819# ----------------------
820# It is okay to use these file commands and assume they have been set
821# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
822m4_defun([_LT_FILEUTILS_DEFAULTS],
823[: ${CP="cp -f"}
824: ${MV="mv -f"}
825: ${RM="rm -f"}
826])# _LT_FILEUTILS_DEFAULTS
827
828
829# _LT_SETUP
830# ---------
831m4_defun([_LT_SETUP],
832[AC_REQUIRE([AC_CANONICAL_HOST])dnl
833AC_REQUIRE([AC_CANONICAL_BUILD])dnl
834_LT_DECL([], [host_alias], [0], [The host system])dnl
835_LT_DECL([], [host], [0])dnl
836_LT_DECL([], [host_os], [0])dnl
837dnl
838_LT_DECL([], [build_alias], [0], [The build system])dnl
839_LT_DECL([], [build], [0])dnl
840_LT_DECL([], [build_os], [0])dnl
841dnl
842AC_REQUIRE([AC_PROG_CC])dnl
843AC_REQUIRE([LT_PATH_LD])dnl
844AC_REQUIRE([LT_PATH_NM])dnl
845dnl
846AC_REQUIRE([AC_PROG_LN_S])dnl
847test -z "$LN_S" && LN_S="ln -s"
848_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
849dnl
850AC_REQUIRE([LT_CMD_MAX_LEN])dnl
851_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
852_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
853dnl
854m4_require([_LT_FILEUTILS_DEFAULTS])dnl
855m4_require([_LT_CHECK_SHELL_FEATURES])dnl
856m4_require([_LT_CMD_RELOAD])dnl
857m4_require([_LT_CHECK_MAGIC_METHOD])dnl
858m4_require([_LT_CMD_OLD_ARCHIVE])dnl
859m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
860
861_LT_CONFIG_LIBTOOL_INIT([
862# See if we are running on zsh, and set the options which allow our
863# commands through without removal of \ escapes INIT.
864if test -n "\${ZSH_VERSION+set}" ; then
865 setopt NO_GLOB_SUBST
866fi
867])
868if test -n "${ZSH_VERSION+set}" ; then
869 setopt NO_GLOB_SUBST
870fi
871
872_LT_CHECK_OBJDIR
873
874m4_require([_LT_TAG_COMPILER])dnl
875_LT_PROG_ECHO_BACKSLASH
876
877case $host_os in
878aix3*)
879 # AIX sometimes has problems with the GCC collect2 program. For some
880 # reason, if we set the COLLECT_NAMES environment variable, the problems
881 # vanish in a puff of smoke.
882 if test "X${COLLECT_NAMES+set}" != Xset; then
883 COLLECT_NAMES=
884 export COLLECT_NAMES
885 fi
886 ;;
887esac
888
889# Sed substitution that helps us do robust quoting. It backslashifies
890# metacharacters that are still active within double-quoted strings.
891sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
892
893# Same as above, but do not quote variable references.
894double_quote_subst='s/\([["`\\]]\)/\\\1/g'
895
896# Sed substitution to delay expansion of an escaped shell variable in a
897# double_quote_subst'ed string.
898delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
899
900# Sed substitution to delay expansion of an escaped single quote.
901delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
902
903# Sed substitution to avoid accidental globbing in evaled expressions
904no_glob_subst='s/\*/\\\*/g'
905
906# Global variables:
907ofile=libtool
908can_build_shared=yes
909
910# All known linkers require a `.a' archive for static linking (except MSVC,
911# which needs '.lib').
912libext=a
913
914with_gnu_ld="$lt_cv_prog_gnu_ld"
915
916old_CC="$CC"
917old_CFLAGS="$CFLAGS"
918
919# Set sane defaults for various variables
920test -z "$CC" && CC=cc
921test -z "$LTCC" && LTCC=$CC
922test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
923test -z "$LD" && LD=ld
924test -z "$ac_objext" && ac_objext=o
925
926_LT_CC_BASENAME([$compiler])
927
928# Only perform the check for file, if the check method requires it
929test -z "$MAGIC_CMD" && MAGIC_CMD=file
930case $deplibs_check_method in
931file_magic*)
932 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
933 _LT_PATH_MAGIC
934 fi
935 ;;
936esac
937
938# Use C for the default configuration in the libtool script
939LT_SUPPORTED_TAG([CC])
940_LT_LANG_C_CONFIG
941_LT_LANG_DEFAULT_CONFIG
942_LT_CONFIG_COMMANDS
943])# _LT_SETUP
944
945
946# _LT_PROG_LTMAIN
947# ---------------
948# Note that this code is called both from `configure', and `config.status'
949# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
950# `config.status' has no value for ac_aux_dir unless we are using Automake,
951# so we pass a copy along to make sure it has a sensible value anyway.
952m4_defun([_LT_PROG_LTMAIN],
953[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
954_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
955ltmain="$ac_aux_dir/ltmain.sh"
956])# _LT_PROG_LTMAIN
957
958
959
960# So that we can recreate a full libtool script including additional
961# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
962# in macros and then make a single call at the end using the `libtool'
963# label.
964
965
966# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
967# ----------------------------------------
968# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
969m4_define([_LT_CONFIG_LIBTOOL_INIT],
970[m4_ifval([$1],
971 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
972 [$1
973])])])
974
975# Initialize.
976m4_define([_LT_OUTPUT_LIBTOOL_INIT])
977
978
979# _LT_CONFIG_LIBTOOL([COMMANDS])
980# ------------------------------
981# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
982m4_define([_LT_CONFIG_LIBTOOL],
983[m4_ifval([$1],
984 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
985 [$1
986])])])
987
988# Initialize.
989m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
990
991
992# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
993# -----------------------------------------------------
994m4_defun([_LT_CONFIG_SAVE_COMMANDS],
995[_LT_CONFIG_LIBTOOL([$1])
996_LT_CONFIG_LIBTOOL_INIT([$2])
997])
998
999
1000# _LT_FORMAT_COMMENT([COMMENT])
1001# -----------------------------
1002# Add leading comment marks to the start of each line, and a trailing
1003# full-stop to the whole comment if one is not present already.
1004m4_define([_LT_FORMAT_COMMENT],
1005[m4_ifval([$1], [
1006m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1007 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1008)])
1009
1010
1011
1012
1013
1014# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1015# -------------------------------------------------------------------
1016# CONFIGNAME is the name given to the value in the libtool script.
1017# VARNAME is the (base) name used in the configure script.
1018# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1019# VARNAME. Any other value will be used directly.
1020m4_define([_LT_DECL],
1021[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1022 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1023 [m4_ifval([$1], [$1], [$2])])
1024 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1025 m4_ifval([$4],
1026 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1027 lt_dict_add_subkey([lt_decl_dict], [$2],
1028 [tagged?], [m4_ifval([$5], [yes], [no])])])
1029])
1030
1031
1032# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1033# --------------------------------------------------------
1034m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1035
1036
1037# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1038# ------------------------------------------------
1039m4_define([lt_decl_tag_varnames],
1040[_lt_decl_filter([tagged?], [yes], $@)])
1041
1042
1043# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1044# ---------------------------------------------------------
1045m4_define([_lt_decl_filter],
1046[m4_case([$#],
1047 [0], [m4_fatal([$0: too few arguments: $#])],
1048 [1], [m4_fatal([$0: too few arguments: $#: $1])],
1049 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1050 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1051 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1052])
1053
1054
1055# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1056# --------------------------------------------------
1057m4_define([lt_decl_quote_varnames],
1058[_lt_decl_filter([value], [1], $@)])
1059
1060
1061# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1062# ---------------------------------------------------
1063m4_define([lt_decl_dquote_varnames],
1064[_lt_decl_filter([value], [2], $@)])
1065
1066
1067# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1068# ---------------------------------------------------
1069m4_define([lt_decl_varnames_tagged],
1070[m4_assert([$# <= 2])dnl
1071_$0(m4_quote(m4_default([$1], [[, ]])),
1072 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1073 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1074m4_define([_lt_decl_varnames_tagged],
1075[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1076
1077
1078# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1079# ------------------------------------------------
1080m4_define([lt_decl_all_varnames],
1081[_$0(m4_quote(m4_default([$1], [[, ]])),
1082 m4_if([$2], [],
1083 m4_quote(lt_decl_varnames),
1084 m4_quote(m4_shift($@))))[]dnl
1085])
1086m4_define([_lt_decl_all_varnames],
1087[lt_join($@, lt_decl_varnames_tagged([$1],
1088 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1089])
1090
1091
1092# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1093# ------------------------------------
1094# Quote a variable value, and forward it to `config.status' so that its
1095# declaration there will have the same value as in `configure'. VARNAME
1096# must have a single quote delimited value for this to work.
1097m4_define([_LT_CONFIG_STATUS_DECLARE],
1098[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
1099
1100
1101# _LT_CONFIG_STATUS_DECLARATIONS
1102# ------------------------------
1103# We delimit libtool config variables with single quotes, so when
1104# we write them to config.status, we have to be sure to quote all
1105# embedded single quotes properly. In configure, this macro expands
1106# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1107#
1108# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
1109m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1110[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1111 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1112
1113
1114# _LT_LIBTOOL_TAGS
1115# ----------------
1116# Output comment and list of tags supported by the script
1117m4_defun([_LT_LIBTOOL_TAGS],
1118[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1119available_tags="_LT_TAGS"dnl
1120])
1121
1122
1123# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1124# -----------------------------------
1125# Extract the dictionary values for VARNAME (optionally with TAG) and
1126# expand to a commented shell variable setting:
1127#
1128# # Some comment about what VAR is for.
1129# visible_name=$lt_internal_name
1130m4_define([_LT_LIBTOOL_DECLARE],
1131[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1132 [description])))[]dnl
1133m4_pushdef([_libtool_name],
1134 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1135m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1136 [0], [_libtool_name=[$]$1],
1137 [1], [_libtool_name=$lt_[]$1],
1138 [2], [_libtool_name=$lt_[]$1],
1139 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1140m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1141])
1142
1143
1144# _LT_LIBTOOL_CONFIG_VARS
1145# -----------------------
1146# Produce commented declarations of non-tagged libtool config variables
1147# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1148# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
1149# section) are produced by _LT_LIBTOOL_TAG_VARS.
1150m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1151[m4_foreach([_lt_var],
1152 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1153 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1154
1155
1156# _LT_LIBTOOL_TAG_VARS(TAG)
1157# -------------------------
1158m4_define([_LT_LIBTOOL_TAG_VARS],
1159[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1160 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1161
1162
1163# _LT_TAGVAR(VARNAME, [TAGNAME])
1164# ------------------------------
1165m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1166
1167
1168# _LT_CONFIG_COMMANDS
1169# -------------------
1170# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
1171# variables for single and double quote escaping we saved from calls
1172# to _LT_DECL, we can put quote escaped variables declarations
1173# into `config.status', and then the shell code to quote escape them in
1174# for loops in `config.status'. Finally, any additional code accumulated
1175# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1176m4_defun([_LT_CONFIG_COMMANDS],
1177[AC_PROVIDE_IFELSE([LT_OUTPUT],
1178 dnl If the libtool generation code has been placed in $CONFIG_LT,
1179 dnl instead of duplicating it all over again into config.status,
1180 dnl then we will have config.status run $CONFIG_LT later, so it
1181 dnl needs to know what name is stored there:
1182 [AC_CONFIG_COMMANDS([libtool],
1183 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1184 dnl If the libtool generation code is destined for config.status,
1185 dnl expand the accumulated commands and init code now:
1186 [AC_CONFIG_COMMANDS([libtool],
1187 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1188])#_LT_CONFIG_COMMANDS
1189
1190
1191# Initialize.
1192m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1193[
1194
1195# The HP-UX ksh and POSIX shell print the target directory to stdout
1196# if CDPATH is set.
1197(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1198
1199sed_quote_subst='$sed_quote_subst'
1200double_quote_subst='$double_quote_subst'
1201delay_variable_subst='$delay_variable_subst'
1202_LT_CONFIG_STATUS_DECLARATIONS
1203LTCC='$LTCC'
1204LTCFLAGS='$LTCFLAGS'
1205compiler='$compiler_DEFAULT'
1206
1207# Quote evaled strings.
1208for var in lt_decl_all_varnames([[ \
1209]], lt_decl_quote_varnames); do
1210 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1211 *[[\\\\\\\`\\"\\\$]]*)
1212 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1213 ;;
1214 *)
1215 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1216 ;;
1217 esac
1218done
1219
1220# Double-quote double-evaled strings.
1221for var in lt_decl_all_varnames([[ \
1222]], lt_decl_dquote_varnames); do
1223 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1224 *[[\\\\\\\`\\"\\\$]]*)
1225 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1226 ;;
1227 *)
1228 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1229 ;;
1230 esac
1231done
1232
1233# Fix-up fallback echo if it was mangled by the above quoting rules.
1234case \$lt_ECHO in
1235*'\\\[$]0 --fallback-echo"')dnl "
1236 lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
1237 ;;
1238esac
1239
1240_LT_OUTPUT_LIBTOOL_INIT
1241])
1242
1243
1244# LT_OUTPUT
1245# ---------
1246# This macro allows early generation of the libtool script (before
1247# AC_OUTPUT is called), incase it is used in configure for compilation
1248# tests.
1249AC_DEFUN([LT_OUTPUT],
1250[: ${CONFIG_LT=./config.lt}
1251AC_MSG_NOTICE([creating $CONFIG_LT])
1252cat >"$CONFIG_LT" <<_LTEOF
1253#! $SHELL
1254# Generated by $as_me.
1255# Run this file to recreate a libtool stub with the current configuration.
1256
1257lt_cl_silent=false
1258SHELL=\${CONFIG_SHELL-$SHELL}
1259_LTEOF
1260
1261cat >>"$CONFIG_LT" <<\_LTEOF
1262AS_SHELL_SANITIZE
1263_AS_PREPARE
1264
1265exec AS_MESSAGE_FD>&1
1266exec AS_MESSAGE_LOG_FD>>config.log
1267{
1268 echo
1269 AS_BOX([Running $as_me.])
1270} >&AS_MESSAGE_LOG_FD
1271
1272lt_cl_help="\
1273\`$as_me' creates a local libtool stub from the current configuration,
1274for use in further configure time tests before the real libtool is
1275generated.
1276
1277Usage: $[0] [[OPTIONS]]
1278
1279 -h, --help print this help, then exit
1280 -V, --version print version number, then exit
1281 -q, --quiet do not print progress messages
1282 -d, --debug don't remove temporary files
1283
1284Report bugs to <bug-libtool@gnu.org>."
1285
1286lt_cl_version="\
1287m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1288m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1289configured by $[0], generated by m4_PACKAGE_STRING.
1290
1291Copyright (C) 2008 Free Software Foundation, Inc.
1292This config.lt script is free software; the Free Software Foundation
1293gives unlimited permision to copy, distribute and modify it."
1294
1295while test $[#] != 0
1296do
1297 case $[1] in
1298 --version | --v* | -V )
1299 echo "$lt_cl_version"; exit 0 ;;
1300 --help | --h* | -h )
1301 echo "$lt_cl_help"; exit 0 ;;
1302 --debug | --d* | -d )
1303 debug=: ;;
1304 --quiet | --q* | --silent | --s* | -q )
1305 lt_cl_silent=: ;;
1306
1307 -*) AC_MSG_ERROR([unrecognized option: $[1]
1308Try \`$[0] --help' for more information.]) ;;
1309
1310 *) AC_MSG_ERROR([unrecognized argument: $[1]
1311Try \`$[0] --help' for more information.]) ;;
1312 esac
1313 shift
1314done
1315
1316if $lt_cl_silent; then
1317 exec AS_MESSAGE_FD>/dev/null
1318fi
1319_LTEOF
1320
1321cat >>"$CONFIG_LT" <<_LTEOF
1322_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1323_LTEOF
1324
1325cat >>"$CONFIG_LT" <<\_LTEOF
1326AC_MSG_NOTICE([creating $ofile])
1327_LT_OUTPUT_LIBTOOL_COMMANDS
1328AS_EXIT(0)
1329_LTEOF
1330chmod +x "$CONFIG_LT"
1331
1332# configure is writing to config.log, but config.lt does its own redirection,
1333# appending to config.log, which fails on DOS, as config.log is still kept
1334# open by configure. Here we exec the FD to /dev/null, effectively closing
1335# config.log, so it can be properly (re)opened and appended to by config.lt.
1336if test "$no_create" != yes; then
1337 lt_cl_success=:
1338 test "$silent" = yes &&
1339 lt_config_lt_args="$lt_config_lt_args --quiet"
1340 exec AS_MESSAGE_LOG_FD>/dev/null
1341 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1342 exec AS_MESSAGE_LOG_FD>>config.log
1343 $lt_cl_success || AS_EXIT(1)
1344fi
1345])# LT_OUTPUT
1346
1347
1348# _LT_CONFIG(TAG)
1349# ---------------
1350# If TAG is the built-in tag, create an initial libtool script with a
1351# default configuration from the untagged config vars. Otherwise add code
1352# to config.status for appending the configuration named by TAG from the
1353# matching tagged config vars.
1354m4_defun([_LT_CONFIG],
1355[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1356_LT_CONFIG_SAVE_COMMANDS([
1357 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1358 m4_if(_LT_TAG, [C], [
1359 # See if we are running on zsh, and set the options which allow our
1360 # commands through without removal of \ escapes.
1361 if test -n "${ZSH_VERSION+set}" ; then
1362 setopt NO_GLOB_SUBST
1363 fi
1364
1365 cfgfile="${ofile}T"
1366 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1367 $RM "$cfgfile"
1368
1369 cat <<_LT_EOF >> "$cfgfile"
1370#! $SHELL
1371
1372# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1373# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1374# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1375# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1376#
1377_LT_COPYING
1378_LT_LIBTOOL_TAGS
1379
1380# ### BEGIN LIBTOOL CONFIG
1381_LT_LIBTOOL_CONFIG_VARS
1382_LT_LIBTOOL_TAG_VARS
1383# ### END LIBTOOL CONFIG
1384
1385_LT_EOF
1386
1387 case $host_os in
1388 aix3*)
1389 cat <<\_LT_EOF >> "$cfgfile"
1390# AIX sometimes has problems with the GCC collect2 program. For some
1391# reason, if we set the COLLECT_NAMES environment variable, the problems
1392# vanish in a puff of smoke.
1393if test "X${COLLECT_NAMES+set}" != Xset; then
1394 COLLECT_NAMES=
1395 export COLLECT_NAMES
1396fi
1397_LT_EOF
1398 ;;
1399 esac
1400
1401 _LT_PROG_LTMAIN
1402
1403 # We use sed instead of cat because bash on DJGPP gets confused if
1404 # if finds mixed CR/LF and LF-only lines. Since sed operates in
1405 # text mode, it properly converts lines to CR/LF. This bash problem
1406 # is reportedly fixed, but why not run on old versions too?
1407 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
1408 || (rm -f "$cfgfile"; exit 1)
1409
1410 _LT_PROG_XSI_SHELLFNS
1411
1412 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
1413 || (rm -f "$cfgfile"; exit 1)
1414
1415 mv -f "$cfgfile" "$ofile" ||
1416 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1417 chmod +x "$ofile"
1418],
1419[cat <<_LT_EOF >> "$ofile"
1420
1421dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1422dnl in a comment (ie after a #).
1423# ### BEGIN LIBTOOL TAG CONFIG: $1
1424_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1425# ### END LIBTOOL TAG CONFIG: $1
1426_LT_EOF
1427])dnl /m4_if
1428],
1429[m4_if([$1], [], [
1430 PACKAGE='$PACKAGE'
1431 VERSION='$VERSION'
1432 TIMESTAMP='$TIMESTAMP'
1433 RM='$RM'
1434 ofile='$ofile'], [])
1435])dnl /_LT_CONFIG_SAVE_COMMANDS
1436])# _LT_CONFIG
1437
1438
1439# LT_SUPPORTED_TAG(TAG)
1440# ---------------------
1441# Trace this macro to discover what tags are supported by the libtool
1442# --tag option, using:
1443# autoconf --trace 'LT_SUPPORTED_TAG:$1'
1444AC_DEFUN([LT_SUPPORTED_TAG], [])
1445
1446
1447# C support is built-in for now
1448m4_define([_LT_LANG_C_enabled], [])
1449m4_define([_LT_TAGS], [])
1450
1451
1452# LT_LANG(LANG)
1453# -------------
1454# Enable libtool support for the given language if not already enabled.
1455AC_DEFUN([LT_LANG],
1456[AC_BEFORE([$0], [LT_OUTPUT])dnl
1457m4_case([$1],
1458 [C], [_LT_LANG(C)],
1459 [C++], [_LT_LANG(CXX)],
1460 [Java], [_LT_LANG(GCJ)],
1461 [Fortran 77], [_LT_LANG(F77)],
1462 [Fortran], [_LT_LANG(FC)],
1463 [Windows Resource], [_LT_LANG(RC)],
1464 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1465 [_LT_LANG($1)],
1466 [m4_fatal([$0: unsupported language: "$1"])])])dnl
1467])# LT_LANG
1468
1469
1470# _LT_LANG(LANGNAME)
1471# ------------------
1472m4_defun([_LT_LANG],
1473[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1474 [LT_SUPPORTED_TAG([$1])dnl
1475 m4_append([_LT_TAGS], [$1 ])dnl
1476 m4_define([_LT_LANG_]$1[_enabled], [])dnl
1477 _LT_LANG_$1_CONFIG($1)])dnl
1478])# _LT_LANG
1479
1480
1481# _LT_LANG_DEFAULT_CONFIG
1482# -----------------------
1483m4_defun([_LT_LANG_DEFAULT_CONFIG],
1484[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1485 [LT_LANG(CXX)],
1486 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1487
1488AC_PROVIDE_IFELSE([AC_PROG_F77],
1489 [LT_LANG(F77)],
1490 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1491
1492AC_PROVIDE_IFELSE([AC_PROG_FC],
1493 [LT_LANG(FC)],
1494 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1495
1496dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1497dnl pulling things in needlessly.
1498AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1499 [LT_LANG(GCJ)],
1500 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1501 [LT_LANG(GCJ)],
1502 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1503 [LT_LANG(GCJ)],
1504 [m4_ifdef([AC_PROG_GCJ],
1505 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1506 m4_ifdef([A][M_PROG_GCJ],
1507 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1508 m4_ifdef([LT_PROG_GCJ],
1509 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1510
1511AC_PROVIDE_IFELSE([LT_PROG_RC],
1512 [LT_LANG(RC)],
1513 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1514])# _LT_LANG_DEFAULT_CONFIG
1515
1516# Obsolete macros:
1517AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1518AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1519AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1520AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1521dnl aclocal-1.4 backwards compatibility:
1522dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1523dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1524dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1525dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1526
1527
1528# _LT_TAG_COMPILER
1529# ----------------
1530m4_defun([_LT_TAG_COMPILER],
1531[AC_REQUIRE([AC_PROG_CC])dnl
1532
1533_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1534_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1535_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1536_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1537
1538# If no C compiler was specified, use CC.
1539LTCC=${LTCC-"$CC"}
1540
1541# If no C compiler flags were specified, use CFLAGS.
1542LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1543
1544# Allow CC to be a program name with arguments.
1545compiler=$CC
1546])# _LT_TAG_COMPILER
1547
1548
1549# _LT_COMPILER_BOILERPLATE
1550# ------------------------
1551# Check for compiler boilerplate output or warnings with
1552# the simple compiler test code.
1553m4_defun([_LT_COMPILER_BOILERPLATE],
1554[m4_require([_LT_DECL_SED])dnl
1555ac_outfile=conftest.$ac_objext
1556echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1557eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1558_lt_compiler_boilerplate=`cat conftest.err`
1559$RM conftest*
1560])# _LT_COMPILER_BOILERPLATE
1561
1562
1563# _LT_LINKER_BOILERPLATE
1564# ----------------------
1565# Check for linker boilerplate output or warnings with
1566# the simple link test code.
1567m4_defun([_LT_LINKER_BOILERPLATE],
1568[m4_require([_LT_DECL_SED])dnl
1569ac_outfile=conftest.$ac_objext
1570echo "$lt_simple_link_test_code" >conftest.$ac_ext
1571eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1572_lt_linker_boilerplate=`cat conftest.err`
1573$RM -r conftest*
1574])# _LT_LINKER_BOILERPLATE
1575
1576# _LT_REQUIRED_DARWIN_CHECKS
1577# -------------------------
1578m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1579 case $host_os in
1580 rhapsody* | darwin*)
1581 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1582 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1583 AC_CHECK_TOOL([LIPO], [lipo], [:])
1584 AC_CHECK_TOOL([OTOOL], [otool], [:])
1585 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1586 _LT_DECL([], [DSYMUTIL], [1],
1587 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1588 _LT_DECL([], [NMEDIT], [1],
1589 [Tool to change global to local symbols on Mac OS X])
1590 _LT_DECL([], [LIPO], [1],
1591 [Tool to manipulate fat objects and archives on Mac OS X])
1592 _LT_DECL([], [OTOOL], [1],
1593 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1594 _LT_DECL([], [OTOOL64], [1],
1595 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1596
1597 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1598 [lt_cv_apple_cc_single_mod=no
1599 if test -z "${LT_MULTI_MODULE}"; then
1600 # By default we will add the -single_module flag. You can override
1601 # by either setting the environment variable LT_MULTI_MODULE
1602 # non-empty at configure time, or by adding -multi_module to the
1603 # link flags.
1604 rm -rf libconftest.dylib*
1605 echo "int foo(void){return 1;}" > conftest.c
1606 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1607-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1608 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1609 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1610 _lt_result=$?
1611 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1612 lt_cv_apple_cc_single_mod=yes
1613 else
1614 cat conftest.err >&AS_MESSAGE_LOG_FD
1615 fi
1616 rm -rf libconftest.dylib*
1617 rm -f conftest.*
1618 fi])
1619 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1620 [lt_cv_ld_exported_symbols_list],
1621 [lt_cv_ld_exported_symbols_list=no
1622 save_LDFLAGS=$LDFLAGS
1623 echo "_main" > conftest.sym
1624 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1625 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1626 [lt_cv_ld_exported_symbols_list=yes],
1627 [lt_cv_ld_exported_symbols_list=no])
1628 LDFLAGS="$save_LDFLAGS"
1629 ])
1630 case $host_os in
1631 rhapsody* | darwin1.[[012]])
1632 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1633 darwin1.*)
1634 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1635 darwin*) # darwin 5.x on
1636 # if running on 10.5 or later, the deployment target defaults
1637 # to the OS version, if on x86, and 10.4, the deployment
1638 # target defaults to 10.4. Don't you love it?
1639 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1640 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1641 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1642 10.[[012]]*)
1643 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1644 10.*)
1645 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1646 esac
1647 ;;
1648 esac
1649 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1650 _lt_dar_single_mod='$single_module'
1651 fi
1652 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1653 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1654 else
1655 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1656 fi
1657 if test "$DSYMUTIL" != ":"; then
1658 _lt_dsymutil='~$DSYMUTIL $lib || :'
1659 else
1660 _lt_dsymutil=
1661 fi
1662 ;;
1663 esac
1664])
1665
1666
1667# _LT_DARWIN_LINKER_FEATURES
1668# --------------------------
1669# Checks for linker and compiler features on darwin
1670m4_defun([_LT_DARWIN_LINKER_FEATURES],
1671[
1672 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1673 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1674 _LT_TAGVAR(hardcode_direct, $1)=no
1675 _LT_TAGVAR(hardcode_automatic, $1)=yes
1676 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1677 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1678 _LT_TAGVAR(link_all_deplibs, $1)=yes
1679 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1680 case $cc_basename in
1681 ifort*) _lt_dar_can_shared=yes ;;
1682 *) _lt_dar_can_shared=$GCC ;;
1683 esac
1684 if test "$_lt_dar_can_shared" = "yes"; then
1685 output_verbose_link_cmd=echo
1686 _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}"
1687 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1688 _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}"
1689 _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}"
1690 m4_if([$1], [CXX],
1691[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1692 _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}"
1693 _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}"
1694 fi
1695],[])
1696 else
1697 _LT_TAGVAR(ld_shlibs, $1)=no
1698 fi
1699])
1700
1701# _LT_SYS_MODULE_PATH_AIX
1702# -----------------------
1703# Links a minimal program and checks the executable
1704# for the system default hardcoded library path. In most cases,
1705# this is /usr/lib:/lib, but when the MPI compilers are used
1706# the location of the communication and MPI libs are included too.
1707# If we don't find anything, use the default library path according
1708# to the aix ld manual.
1709m4_defun([_LT_SYS_MODULE_PATH_AIX],
1710[m4_require([_LT_DECL_SED])dnl
1711AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1712lt_aix_libpath_sed='
1713 /Import File Strings/,/^$/ {
1714 /^0/ {
1715 s/^0 *\(.*\)$/\1/
1716 p
1717 }
1718 }'
1719aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1720# Check for a 64-bit object if we didn't find anything.
1721if test -z "$aix_libpath"; then
1722 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1723fi],[])
1724if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1725])# _LT_SYS_MODULE_PATH_AIX
1726
1727
1728# _LT_SHELL_INIT(ARG)
1729# -------------------
1730m4_define([_LT_SHELL_INIT],
1731[ifdef([AC_DIVERSION_NOTICE],
1732 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1733 [AC_DIVERT_PUSH(NOTICE)])
1734$1
1735AC_DIVERT_POP
1736])# _LT_SHELL_INIT
1737
1738
1739# _LT_PROG_ECHO_BACKSLASH
1740# -----------------------
1741# Add some code to the start of the generated configure script which
1742# will find an echo command which doesn't interpret backslashes.
1743m4_defun([_LT_PROG_ECHO_BACKSLASH],
1744[_LT_SHELL_INIT([
1745# Check that we are running under the correct shell.
1746SHELL=${CONFIG_SHELL-/bin/sh}
1747
1748case X$lt_ECHO in
1749X*--fallback-echo)
1750 # Remove one level of quotation (which was required for Make).
1751 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1752 ;;
1753esac
1754
1755ECHO=${lt_ECHO-echo}
1756if test "X[$]1" = X--no-reexec; then
1757 # Discard the --no-reexec flag, and continue.
1758 shift
1759elif test "X[$]1" = X--fallback-echo; then
1760 # Avoid inline document here, it may be left over
1761 :
1762elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1763 # Yippee, $ECHO works!
1764 :
1765else
1766 # Restart under the correct shell.
1767 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1768fi
1769
1770if test "X[$]1" = X--fallback-echo; then
1771 # used as fallback echo
1772 shift
1773 cat <<_LT_EOF
1774[$]*
1775_LT_EOF
1776 exit 0
1777fi
1778
1779# The HP-UX ksh and POSIX shell print the target directory to stdout
1780# if CDPATH is set.
1781(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1782
1783if test -z "$lt_ECHO"; then
1784 if test "X${echo_test_string+set}" != Xset; then
1785 # find a string as large as possible, as long as the shell can cope with it
1786 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1787 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1788 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1789 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1790 then
1791 break
1792 fi
1793 done
1794 fi
1795
1796 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1797 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1798 test "X$echo_testing_string" = "X$echo_test_string"; then
1799 :
1800 else
1801 # The Solaris, AIX, and Digital Unix default echo programs unquote
1802 # backslashes. This makes it impossible to quote backslashes using
1803 # echo "$something" | sed 's/\\/\\\\/g'
1804 #
1805 # So, first we look for a working echo in the user's PATH.
1806
1807 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1808 for dir in $PATH /usr/ucb; do
1809 IFS="$lt_save_ifs"
1810 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1811 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1812 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1813 test "X$echo_testing_string" = "X$echo_test_string"; then
1814 ECHO="$dir/echo"
1815 break
1816 fi
1817 done
1818 IFS="$lt_save_ifs"
1819
1820 if test "X$ECHO" = Xecho; then
1821 # We didn't find a better echo, so look for alternatives.
1822 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1823 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1824 test "X$echo_testing_string" = "X$echo_test_string"; then
1825 # This shell has a builtin print -r that does the trick.
1826 ECHO='print -r'
1827 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1828 test "X$CONFIG_SHELL" != X/bin/ksh; then
1829 # If we have ksh, try running configure again with it.
1830 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1831 export ORIGINAL_CONFIG_SHELL
1832 CONFIG_SHELL=/bin/ksh
1833 export CONFIG_SHELL
1834 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1835 else
1836 # Try using printf.
1837 ECHO='printf %s\n'
1838 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1839 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1840 test "X$echo_testing_string" = "X$echo_test_string"; then
1841 # Cool, printf works
1842 :
1843 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1844 test "X$echo_testing_string" = 'X\t' &&
1845 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1846 test "X$echo_testing_string" = "X$echo_test_string"; then
1847 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1848 export CONFIG_SHELL
1849 SHELL="$CONFIG_SHELL"
1850 export SHELL
1851 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1852 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1853 test "X$echo_testing_string" = 'X\t' &&
1854 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1855 test "X$echo_testing_string" = "X$echo_test_string"; then
1856 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1857 else
1858 # maybe with a smaller string...
1859 prev=:
1860
1861 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1862 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1863 then
1864 break
1865 fi
1866 prev="$cmd"
1867 done
1868
1869 if test "$prev" != 'sed 50q "[$]0"'; then
1870 echo_test_string=`eval $prev`
1871 export echo_test_string
1872 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1873 else
1874 # Oops. We lost completely, so just stick with echo.
1875 ECHO=echo
1876 fi
1877 fi
1878 fi
1879 fi
1880 fi
1881fi
1882
1883# Copy echo and quote the copy suitably for passing to libtool from
1884# the Makefile, instead of quoting the original, which is used later.
1885lt_ECHO=$ECHO
1886if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1887 lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1888fi
1889
1890AC_SUBST(lt_ECHO)
1891])
1892_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1893_LT_DECL([], [ECHO], [1],
1894 [An echo program that does not interpret backslashes])
1895])# _LT_PROG_ECHO_BACKSLASH
1896
1897
1898# _LT_ENABLE_LOCK
1899# ---------------
1900m4_defun([_LT_ENABLE_LOCK],
1901[AC_ARG_ENABLE([libtool-lock],
1902 [AS_HELP_STRING([--disable-libtool-lock],
1903 [avoid locking (might break parallel builds)])])
1904test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1905
1906# Some flags need to be propagated to the compiler or linker for good
1907# libtool support.
1908case $host in
1909ia64-*-hpux*)
1910 # Find out which ABI we are using.
1911 echo 'int i;' > conftest.$ac_ext
1912 if AC_TRY_EVAL(ac_compile); then
1913 case `/usr/bin/file conftest.$ac_objext` in
1914 *ELF-32*)
1915 HPUX_IA64_MODE="32"
1916 ;;
1917 *ELF-64*)
1918 HPUX_IA64_MODE="64"
1919 ;;
1920 esac
1921 fi
1922 rm -rf conftest*
1923 ;;
1924*-*-irix6*)
1925 # Find out which ABI we are using.
1926 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1927 if AC_TRY_EVAL(ac_compile); then
1928 if test "$lt_cv_prog_gnu_ld" = yes; then
1929 case `/usr/bin/file conftest.$ac_objext` in
1930 *32-bit*)
1931 LD="${LD-ld} -melf32bsmip"
1932 ;;
1933 *N32*)
1934 LD="${LD-ld} -melf32bmipn32"
1935 ;;
1936 *64-bit*)
1937 LD="${LD-ld} -melf64bmip"
1938 ;;
1939 esac
1940 else
1941 case `/usr/bin/file conftest.$ac_objext` in
1942 *32-bit*)
1943 LD="${LD-ld} -32"
1944 ;;
1945 *N32*)
1946 LD="${LD-ld} -n32"
1947 ;;
1948 *64-bit*)
1949 LD="${LD-ld} -64"
1950 ;;
1951 esac
1952 fi
1953 fi
1954 rm -rf conftest*
1955 ;;
1956
1957x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1958s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1959 # Find out which ABI we are using.
1960 echo 'int i;' > conftest.$ac_ext
1961 if AC_TRY_EVAL(ac_compile); then
1962 case `/usr/bin/file conftest.o` in
1963 *32-bit*)
1964 case $host in
1965 x86_64-*kfreebsd*-gnu)
1966 LD="${LD-ld} -m elf_i386_fbsd"
1967 ;;
1968 x86_64-*linux*)
1969 LD="${LD-ld} -m elf_i386"
1970 ;;
1971 ppc64-*linux*|powerpc64-*linux*)
1972 LD="${LD-ld} -m elf32ppclinux"
1973 ;;
1974 s390x-*linux*)
1975 LD="${LD-ld} -m elf_s390"
1976 ;;
1977 sparc64-*linux*)
1978 LD="${LD-ld} -m elf32_sparc"
1979 ;;
1980 esac
1981 ;;
1982 *64-bit*)
1983 case $host in
1984 x86_64-*kfreebsd*-gnu)
1985 LD="${LD-ld} -m elf_x86_64_fbsd"
1986 ;;
1987 x86_64-*linux*)
1988 LD="${LD-ld} -m elf_x86_64"
1989 ;;
1990 ppc*-*linux*|powerpc*-*linux*)
1991 LD="${LD-ld} -m elf64ppc"
1992 ;;
1993 s390*-*linux*|s390*-*tpf*)
1994 LD="${LD-ld} -m elf64_s390"
1995 ;;
1996 sparc*-*linux*)
1997 LD="${LD-ld} -m elf64_sparc"
1998 ;;
1999 esac
2000 ;;
2001 esac
2002 fi
2003 rm -rf conftest*
2004 ;;
2005
2006*-*-sco3.2v5*)
2007 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2008 SAVE_CFLAGS="$CFLAGS"
2009 CFLAGS="$CFLAGS -belf"
2010 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2011 [AC_LANG_PUSH(C)
2012 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2013 AC_LANG_POP])
2014 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2015 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2016 CFLAGS="$SAVE_CFLAGS"
2017 fi
2018 ;;
2019sparc*-*solaris*)
2020 # Find out which ABI we are using.
2021 echo 'int i;' > conftest.$ac_ext
2022 if AC_TRY_EVAL(ac_compile); then
2023 case `/usr/bin/file conftest.o` in
2024 *64-bit*)
2025 case $lt_cv_prog_gnu_ld in
2026 yes*) LD="${LD-ld} -m elf64_sparc" ;;
2027 *)
2028 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2029 LD="${LD-ld} -64"
2030 fi
2031 ;;
2032 esac
2033 ;;
2034 esac
2035 fi
2036 rm -rf conftest*
2037 ;;
2038esac
2039
2040need_locks="$enable_libtool_lock"
2041])# _LT_ENABLE_LOCK
2042
2043
2044# _LT_CMD_OLD_ARCHIVE
2045# -------------------
2046m4_defun([_LT_CMD_OLD_ARCHIVE],
2047[AC_CHECK_TOOL(AR, ar, false)
2048test -z "$AR" && AR=ar
2049test -z "$AR_FLAGS" && AR_FLAGS=cru
2050_LT_DECL([], [AR], [1], [The archiver])
2051_LT_DECL([], [AR_FLAGS], [1])
2052
2053AC_CHECK_TOOL(STRIP, strip, :)
2054test -z "$STRIP" && STRIP=:
2055_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2056
2057AC_CHECK_TOOL(RANLIB, ranlib, :)
2058test -z "$RANLIB" && RANLIB=:
2059_LT_DECL([], [RANLIB], [1],
2060 [Commands used to install an old-style archive])
2061
2062# Determine commands to create old-style static archives.
2063old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2064old_postinstall_cmds='chmod 644 $oldlib'
2065old_postuninstall_cmds=
2066
2067if test -n "$RANLIB"; then
2068 case $host_os in
2069 openbsd*)
2070 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2071 ;;
2072 *)
2073 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2074 ;;
2075 esac
2076 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2077fi
2078_LT_DECL([], [old_postinstall_cmds], [2])
2079_LT_DECL([], [old_postuninstall_cmds], [2])
2080_LT_TAGDECL([], [old_archive_cmds], [2],
2081 [Commands used to build an old-style archive])
2082])# _LT_CMD_OLD_ARCHIVE
2083
2084
2085# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2086# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2087# ----------------------------------------------------------------
2088# Check whether the given compiler option works
2089AC_DEFUN([_LT_COMPILER_OPTION],
2090[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2091m4_require([_LT_DECL_SED])dnl
2092AC_CACHE_CHECK([$1], [$2],
2093 [$2=no
2094 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2095 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2096 lt_compiler_flag="$3"
2097 # Insert the option either (1) after the last *FLAGS variable, or
2098 # (2) before a word containing "conftest.", or (3) at the end.
2099 # Note that $ac_compile itself does not contain backslashes and begins
2100 # with a dollar sign (not a hyphen), so the echo should work correctly.
2101 # The option is referenced via a variable to avoid confusing sed.
2102 lt_compile=`echo "$ac_compile" | $SED \
2103 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2104 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2105 -e 's:$: $lt_compiler_flag:'`
2106 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2107 (eval "$lt_compile" 2>conftest.err)
2108 ac_status=$?
2109 cat conftest.err >&AS_MESSAGE_LOG_FD
2110 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2111 if (exit $ac_status) && test -s "$ac_outfile"; then
2112 # The compiler can only warn and ignore the option if not recognized
2113 # So say no if there are warnings other than the usual output.
2114 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2115 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2116 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2117 $2=yes
2118 fi
2119 fi
2120 $RM conftest*
2121])
2122
2123if test x"[$]$2" = xyes; then
2124 m4_if([$5], , :, [$5])
2125else
2126 m4_if([$6], , :, [$6])
2127fi
2128])# _LT_COMPILER_OPTION
2129
2130# Old name:
2131AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2132dnl aclocal-1.4 backwards compatibility:
2133dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2134
2135
2136# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2137# [ACTION-SUCCESS], [ACTION-FAILURE])
2138# ----------------------------------------------------
2139# Check whether the given linker option works
2140AC_DEFUN([_LT_LINKER_OPTION],
2141[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2142m4_require([_LT_DECL_SED])dnl
2143AC_CACHE_CHECK([$1], [$2],
2144 [$2=no
2145 save_LDFLAGS="$LDFLAGS"
2146 LDFLAGS="$LDFLAGS $3"
2147 echo "$lt_simple_link_test_code" > conftest.$ac_ext
2148 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2149 # The linker can only warn and ignore the option if not recognized
2150 # So say no if there are warnings
2151 if test -s conftest.err; then
2152 # Append any errors to the config.log.
2153 cat conftest.err 1>&AS_MESSAGE_LOG_FD
2154 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2155 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2156 if diff conftest.exp conftest.er2 >/dev/null; then
2157 $2=yes
2158 fi
2159 else
2160 $2=yes
2161 fi
2162 fi
2163 $RM -r conftest*
2164 LDFLAGS="$save_LDFLAGS"
2165])
2166
2167if test x"[$]$2" = xyes; then
2168 m4_if([$4], , :, [$4])
2169else
2170 m4_if([$5], , :, [$5])
2171fi
2172])# _LT_LINKER_OPTION
2173
2174# Old name:
2175AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2176dnl aclocal-1.4 backwards compatibility:
2177dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2178
2179
2180# LT_CMD_MAX_LEN
2181#---------------
2182AC_DEFUN([LT_CMD_MAX_LEN],
2183[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2184# find the maximum length of command line arguments
2185AC_MSG_CHECKING([the maximum length of command line arguments])
2186AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2187 i=0
2188 teststring="ABCD"
2189
2190 case $build_os in
2191 msdosdjgpp*)
2192 # On DJGPP, this test can blow up pretty badly due to problems in libc
2193 # (any single argument exceeding 2000 bytes causes a buffer overrun
2194 # during glob expansion). Even if it were fixed, the result of this
2195 # check would be larger than it should be.
2196 lt_cv_sys_max_cmd_len=12288; # 12K is about right
2197 ;;
2198
2199 gnu*)
2200 # Under GNU Hurd, this test is not required because there is
2201 # no limit to the length of command line arguments.
2202 # Libtool will interpret -1 as no limit whatsoever
2203 lt_cv_sys_max_cmd_len=-1;
2204 ;;
2205
2206 cygwin* | mingw* | cegcc*)
2207 # On Win9x/ME, this test blows up -- it succeeds, but takes
2208 # about 5 minutes as the teststring grows exponentially.
2209 # Worse, since 9x/ME are not pre-emptively multitasking,
2210 # you end up with a "frozen" computer, even though with patience
2211 # the test eventually succeeds (with a max line length of 256k).
2212 # Instead, let's just punt: use the minimum linelength reported by
2213 # all of the supported platforms: 8192 (on NT/2K/XP).
2214 lt_cv_sys_max_cmd_len=8192;
2215 ;;
2216
2217 amigaos*)
2218 # On AmigaOS with pdksh, this test takes hours, literally.
2219 # So we just punt and use a minimum line length of 8192.
2220 lt_cv_sys_max_cmd_len=8192;
2221 ;;
2222
2223 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2224 # This has been around since 386BSD, at least. Likely further.
2225 if test -x /sbin/sysctl; then
2226 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2227 elif test -x /usr/sbin/sysctl; then
2228 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2229 else
2230 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
2231 fi
2232 # And add a safety zone
2233 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2234 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2235 ;;
2236
2237 interix*)
2238 # We know the value 262144 and hardcode it with a safety zone (like BSD)
2239 lt_cv_sys_max_cmd_len=196608
2240 ;;
2241
2242 osf*)
2243 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2244 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2245 # nice to cause kernel panics so lets avoid the loop below.
2246 # First set a reasonable default.
2247 lt_cv_sys_max_cmd_len=16384
2248 #
2249 if test -x /sbin/sysconfig; then
2250 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2251 *1*) lt_cv_sys_max_cmd_len=-1 ;;
2252 esac
2253 fi
2254 ;;
2255 sco3.2v5*)
2256 lt_cv_sys_max_cmd_len=102400
2257 ;;
2258 sysv5* | sco5v6* | sysv4.2uw2*)
2259 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2260 if test -n "$kargmax"; then
2261 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
2262 else
2263 lt_cv_sys_max_cmd_len=32768
2264 fi
2265 ;;
2266 *)
2267 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2268 if test -n "$lt_cv_sys_max_cmd_len"; then
2269 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2270 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2271 else
2272 # Make teststring a little bigger before we do anything with it.
2273 # a 1K string should be a reasonable start.
2274 for i in 1 2 3 4 5 6 7 8 ; do
2275 teststring=$teststring$teststring
2276 done
2277 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2278 # If test is not a shell built-in, we'll probably end up computing a
2279 # maximum length that is only half of the actual maximum length, but
2280 # we can't tell.
2281 while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
2282 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
2283 test $i != 17 # 1/2 MB should be enough
2284 do
2285 i=`expr $i + 1`
2286 teststring=$teststring$teststring
2287 done
2288 # Only check the string length outside the loop.
2289 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2290 teststring=
2291 # Add a significant safety factor because C++ compilers can tack on
2292 # massive amounts of additional arguments before passing them to the
2293 # linker. It appears as though 1/2 is a usable value.
2294 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2295 fi
2296 ;;
2297 esac
2298])
2299if test -n $lt_cv_sys_max_cmd_len ; then
2300 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2301else
2302 AC_MSG_RESULT(none)
2303fi
2304max_cmd_len=$lt_cv_sys_max_cmd_len
2305_LT_DECL([], [max_cmd_len], [0],
2306 [What is the maximum length of a command?])
2307])# LT_CMD_MAX_LEN
2308
2309# Old name:
2310AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2311dnl aclocal-1.4 backwards compatibility:
2312dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2313
2314
2315# _LT_HEADER_DLFCN
2316# ----------------
2317m4_defun([_LT_HEADER_DLFCN],
2318[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2319])# _LT_HEADER_DLFCN
2320
2321
2322# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2323# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2324# ----------------------------------------------------------------
2325m4_defun([_LT_TRY_DLOPEN_SELF],
2326[m4_require([_LT_HEADER_DLFCN])dnl
2327if test "$cross_compiling" = yes; then :
2328 [$4]
2329else
2330 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2331 lt_status=$lt_dlunknown
2332 cat > conftest.$ac_ext <<_LT_EOF
2333[#line __oline__ "configure"
2334#include "confdefs.h"
2335
2336#if HAVE_DLFCN_H
2337#include <dlfcn.h>
2338#endif
2339
2340#include <stdio.h>
2341
2342#ifdef RTLD_GLOBAL
2343# define LT_DLGLOBAL RTLD_GLOBAL
2344#else
2345# ifdef DL_GLOBAL
2346# define LT_DLGLOBAL DL_GLOBAL
2347# else
2348# define LT_DLGLOBAL 0
2349# endif
2350#endif
2351
2352/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2353 find out it does not work in some platform. */
2354#ifndef LT_DLLAZY_OR_NOW
2355# ifdef RTLD_LAZY
2356# define LT_DLLAZY_OR_NOW RTLD_LAZY
2357# else
2358# ifdef DL_LAZY
2359# define LT_DLLAZY_OR_NOW DL_LAZY
2360# else
2361# ifdef RTLD_NOW
2362# define LT_DLLAZY_OR_NOW RTLD_NOW
2363# else
2364# ifdef DL_NOW
2365# define LT_DLLAZY_OR_NOW DL_NOW
2366# else
2367# define LT_DLLAZY_OR_NOW 0
2368# endif
2369# endif
2370# endif
2371# endif
2372#endif
2373
2374void fnord() { int i=42;}
2375int main ()
2376{
2377 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2378 int status = $lt_dlunknown;
2379
2380 if (self)
2381 {
2382 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
2383 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2384 /* dlclose (self); */
2385 }
2386 else
2387 puts (dlerror ());
2388
2389 return status;
2390}]
2391_LT_EOF
2392 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2393 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2394 lt_status=$?
2395 case x$lt_status in
2396 x$lt_dlno_uscore) $1 ;;
2397 x$lt_dlneed_uscore) $2 ;;
2398 x$lt_dlunknown|x*) $3 ;;
2399 esac
2400 else :
2401 # compilation failed
2402 $3
2403 fi
2404fi
2405rm -fr conftest*
2406])# _LT_TRY_DLOPEN_SELF
2407
2408
2409# LT_SYS_DLOPEN_SELF
2410# ------------------
2411AC_DEFUN([LT_SYS_DLOPEN_SELF],
2412[m4_require([_LT_HEADER_DLFCN])dnl
2413if test "x$enable_dlopen" != xyes; then
2414 enable_dlopen=unknown
2415 enable_dlopen_self=unknown
2416 enable_dlopen_self_static=unknown
2417else
2418 lt_cv_dlopen=no
2419 lt_cv_dlopen_libs=
2420
2421 case $host_os in
2422 beos*)
2423 lt_cv_dlopen="load_add_on"
2424 lt_cv_dlopen_libs=
2425 lt_cv_dlopen_self=yes
2426 ;;
2427
2428 mingw* | pw32* | cegcc*)
2429 lt_cv_dlopen="LoadLibrary"
2430 lt_cv_dlopen_libs=
2431 ;;
2432
2433 cygwin*)
2434 lt_cv_dlopen="dlopen"
2435 lt_cv_dlopen_libs=
2436 ;;
2437
2438 darwin*)
2439 # if libdl is installed we need to link against it
2440 AC_CHECK_LIB([dl], [dlopen],
2441 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2442 lt_cv_dlopen="dyld"
2443 lt_cv_dlopen_libs=
2444 lt_cv_dlopen_self=yes
2445 ])
2446 ;;
2447
2448 *)
2449 AC_CHECK_FUNC([shl_load],
2450 [lt_cv_dlopen="shl_load"],
2451 [AC_CHECK_LIB([dld], [shl_load],
2452 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2453 [AC_CHECK_FUNC([dlopen],
2454 [lt_cv_dlopen="dlopen"],
2455 [AC_CHECK_LIB([dl], [dlopen],
2456 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2457 [AC_CHECK_LIB([svld], [dlopen],
2458 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2459 [AC_CHECK_LIB([dld], [dld_link],
2460 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2461 ])
2462 ])
2463 ])
2464 ])
2465 ])
2466 ;;
2467 esac
2468
2469 if test "x$lt_cv_dlopen" != xno; then
2470 enable_dlopen=yes
2471 else
2472 enable_dlopen=no
2473 fi
2474
2475 case $lt_cv_dlopen in
2476 dlopen)
2477 save_CPPFLAGS="$CPPFLAGS"
2478 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2479
2480 save_LDFLAGS="$LDFLAGS"
2481 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2482
2483 save_LIBS="$LIBS"
2484 LIBS="$lt_cv_dlopen_libs $LIBS"
2485
2486 AC_CACHE_CHECK([whether a program can dlopen itself],
2487 lt_cv_dlopen_self, [dnl
2488 _LT_TRY_DLOPEN_SELF(
2489 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2490 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2491 ])
2492
2493 if test "x$lt_cv_dlopen_self" = xyes; then
2494 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2495 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2496 lt_cv_dlopen_self_static, [dnl
2497 _LT_TRY_DLOPEN_SELF(
2498 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2499 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2500 ])
2501 fi
2502
2503 CPPFLAGS="$save_CPPFLAGS"
2504 LDFLAGS="$save_LDFLAGS"
2505 LIBS="$save_LIBS"
2506 ;;
2507 esac
2508
2509 case $lt_cv_dlopen_self in
2510 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2511 *) enable_dlopen_self=unknown ;;
2512 esac
2513
2514 case $lt_cv_dlopen_self_static in
2515 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2516 *) enable_dlopen_self_static=unknown ;;
2517 esac
2518fi
2519_LT_DECL([dlopen_support], [enable_dlopen], [0],
2520 [Whether dlopen is supported])
2521_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2522 [Whether dlopen of programs is supported])
2523_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2524 [Whether dlopen of statically linked programs is supported])
2525])# LT_SYS_DLOPEN_SELF
2526
2527# Old name:
2528AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2529dnl aclocal-1.4 backwards compatibility:
2530dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2531
2532
2533# _LT_COMPILER_C_O([TAGNAME])
2534# ---------------------------
2535# Check to see if options -c and -o are simultaneously supported by compiler.
2536# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2537m4_defun([_LT_COMPILER_C_O],
2538[m4_require([_LT_DECL_SED])dnl
2539m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2540m4_require([_LT_TAG_COMPILER])dnl
2541AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2542 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2543 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2544 $RM -r conftest 2>/dev/null
2545 mkdir conftest
2546 cd conftest
2547 mkdir out
2548 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2549
2550 lt_compiler_flag="-o out/conftest2.$ac_objext"
2551 # Insert the option either (1) after the last *FLAGS variable, or
2552 # (2) before a word containing "conftest.", or (3) at the end.
2553 # Note that $ac_compile itself does not contain backslashes and begins
2554 # with a dollar sign (not a hyphen), so the echo should work correctly.
2555 lt_compile=`echo "$ac_compile" | $SED \
2556 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2557 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2558 -e 's:$: $lt_compiler_flag:'`
2559 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2560 (eval "$lt_compile" 2>out/conftest.err)
2561 ac_status=$?
2562 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2563 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2564 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2565 then
2566 # The compiler can only warn and ignore the option if not recognized
2567 # So say no if there are warnings
2568 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2569 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2570 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2571 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2572 fi
2573 fi
2574 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2575 $RM conftest*
2576 # SGI C++ compiler will create directory out/ii_files/ for
2577 # template instantiation
2578 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2579 $RM out/* && rmdir out
2580 cd ..
2581 $RM -r conftest
2582 $RM conftest*
2583])
2584_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2585 [Does compiler simultaneously support -c and -o options?])
2586])# _LT_COMPILER_C_O
2587
2588
2589# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2590# ----------------------------------
2591# Check to see if we can do hard links to lock some files if needed
2592m4_defun([_LT_COMPILER_FILE_LOCKS],
2593[m4_require([_LT_ENABLE_LOCK])dnl
2594m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2595_LT_COMPILER_C_O([$1])
2596
2597hard_links="nottested"
2598if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2599 # do not overwrite the value of need_locks provided by the user
2600 AC_MSG_CHECKING([if we can lock with hard links])
2601 hard_links=yes
2602 $RM conftest*
2603 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2604 touch conftest.a
2605 ln conftest.a conftest.b 2>&5 || hard_links=no
2606 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2607 AC_MSG_RESULT([$hard_links])
2608 if test "$hard_links" = no; then
2609 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2610 need_locks=warn
2611 fi
2612else
2613 need_locks=no
2614fi
2615_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2616])# _LT_COMPILER_FILE_LOCKS
2617
2618
2619# _LT_CHECK_OBJDIR
2620# ----------------
2621m4_defun([_LT_CHECK_OBJDIR],
2622[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2623[rm -f .libs 2>/dev/null
2624mkdir .libs 2>/dev/null
2625if test -d .libs; then
2626 lt_cv_objdir=.libs
2627else
2628 # MS-DOS does not allow filenames that begin with a dot.
2629 lt_cv_objdir=_libs
2630fi
2631rmdir .libs 2>/dev/null])
2632objdir=$lt_cv_objdir
2633_LT_DECL([], [objdir], [0],
2634 [The name of the directory that contains temporary libtool files])dnl
2635m4_pattern_allow([LT_OBJDIR])dnl
2636AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2637 [Define to the sub-directory in which libtool stores uninstalled libraries.])
2638])# _LT_CHECK_OBJDIR
2639
2640
2641# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2642# --------------------------------------
2643# Check hardcoding attributes.
2644m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2645[AC_MSG_CHECKING([how to hardcode library paths into programs])
2646_LT_TAGVAR(hardcode_action, $1)=
2647if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2648 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2649 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2650
2651 # We can hardcode non-existent directories.
2652 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2653 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2654 # have to relink, otherwise we might link with an installed library
2655 # when we should be linking with a yet-to-be-installed one
2656 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2657 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2658 # Linking always hardcodes the temporary library directory.
2659 _LT_TAGVAR(hardcode_action, $1)=relink
2660 else
2661 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2662 _LT_TAGVAR(hardcode_action, $1)=immediate
2663 fi
2664else
2665 # We cannot hardcode anything, or else we can only hardcode existing
2666 # directories.
2667 _LT_TAGVAR(hardcode_action, $1)=unsupported
2668fi
2669AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2670
2671if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2672 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2673 # Fast installation is not supported
2674 enable_fast_install=no
2675elif test "$shlibpath_overrides_runpath" = yes ||
2676 test "$enable_shared" = no; then
2677 # Fast installation is not necessary
2678 enable_fast_install=needless
2679fi
2680_LT_TAGDECL([], [hardcode_action], [0],
2681 [How to hardcode a shared library path into an executable])
2682])# _LT_LINKER_HARDCODE_LIBPATH
2683
2684
2685# _LT_CMD_STRIPLIB
2686# ----------------
2687m4_defun([_LT_CMD_STRIPLIB],
2688[m4_require([_LT_DECL_EGREP])
2689striplib=
2690old_striplib=
2691AC_MSG_CHECKING([whether stripping libraries is possible])
2692if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2693 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2694 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2695 AC_MSG_RESULT([yes])
2696else
2697# FIXME - insert some real tests, host_os isn't really good enough
2698 case $host_os in
2699 darwin*)
2700 if test -n "$STRIP" ; then
2701 striplib="$STRIP -x"
2702 old_striplib="$STRIP -S"
2703 AC_MSG_RESULT([yes])
2704 else
2705 AC_MSG_RESULT([no])
2706 fi
2707 ;;
2708 *)
2709 AC_MSG_RESULT([no])
2710 ;;
2711 esac
2712fi
2713_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2714_LT_DECL([], [striplib], [1])
2715])# _LT_CMD_STRIPLIB
2716
2717
2718# _LT_SYS_DYNAMIC_LINKER([TAG])
2719# -----------------------------
2720# PORTME Fill in your ld.so characteristics
2721m4_defun([_LT_SYS_DYNAMIC_LINKER],
2722[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2723m4_require([_LT_DECL_EGREP])dnl
2724m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2725m4_require([_LT_DECL_OBJDUMP])dnl
2726m4_require([_LT_DECL_SED])dnl
2727AC_MSG_CHECKING([dynamic linker characteristics])
2728m4_if([$1],
2729 [], [
2730if test "$GCC" = yes; then
2731 case $host_os in
2732 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2733 *) lt_awk_arg="/^libraries:/" ;;
2734 esac
2735 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2736 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2737 # if the path contains ";" then we assume it to be the separator
2738 # otherwise default to the standard path separator (i.e. ":") - it is
2739 # assumed that no part of a normal pathname contains ";" but that should
2740 # okay in the real world where ";" in dirpaths is itself problematic.
2741 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2742 else
2743 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2744 fi
2745 # Ok, now we have the path, separated by spaces, we can step through it
2746 # and add multilib dir if necessary.
2747 lt_tmp_lt_search_path_spec=
2748 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2749 for lt_sys_path in $lt_search_path_spec; do
2750 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2751 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2752 else
2753 test -d "$lt_sys_path" && \
2754 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2755 fi
2756 done
2757 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2758BEGIN {RS=" "; FS="/|\n";} {
2759 lt_foo="";
2760 lt_count=0;
2761 for (lt_i = NF; lt_i > 0; lt_i--) {
2762 if ($lt_i != "" && $lt_i != ".") {
2763 if ($lt_i == "..") {
2764 lt_count++;
2765 } else {
2766 if (lt_count == 0) {
2767 lt_foo="/" $lt_i lt_foo;
2768 } else {
2769 lt_count--;
2770 }
2771 }
2772 }
2773 }
2774 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2775 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2776}'`
2777 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2778else
2779 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2780fi])
2781library_names_spec=
2782libname_spec='lib$name'
2783soname_spec=
2784shrext_cmds=".so"
2785postinstall_cmds=
2786postuninstall_cmds=
2787finish_cmds=
2788finish_eval=
2789shlibpath_var=
2790shlibpath_overrides_runpath=unknown
2791version_type=none
2792dynamic_linker="$host_os ld.so"
2793sys_lib_dlsearch_path_spec="/lib /usr/lib"
2794need_lib_prefix=unknown
2795hardcode_into_libs=no
2796
2797# when you set need_version to no, make sure it does not cause -set_version
2798# flags to be left without arguments
2799need_version=unknown
2800
2801case $host_os in
2802aix3*)
2803 version_type=linux
2804 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2805 shlibpath_var=LIBPATH
2806
2807 # AIX 3 has no versioning support, so we append a major version to the name.
2808 soname_spec='${libname}${release}${shared_ext}$major'
2809 ;;
2810
2811aix[[4-9]]*)
2812 version_type=linux
2813 need_lib_prefix=no
2814 need_version=no
2815 hardcode_into_libs=yes
2816 if test "$host_cpu" = ia64; then
2817 # AIX 5 supports IA64
2818 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2819 shlibpath_var=LD_LIBRARY_PATH
2820 else
2821 # With GCC up to 2.95.x, collect2 would create an import file
2822 # for dependence libraries. The import file would start with
2823 # the line `#! .'. This would cause the generated library to
2824 # depend on `.', always an invalid library. This was fixed in
2825 # development snapshots of GCC prior to 3.0.
2826 case $host_os in
2827 aix4 | aix4.[[01]] | aix4.[[01]].*)
2828 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2829 echo ' yes '
2830 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2831 :
2832 else
2833 can_build_shared=no
2834 fi
2835 ;;
2836 esac
2837 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2838 # soname into executable. Probably we can add versioning support to
2839 # collect2, so additional links can be useful in future.
2840 if test "$aix_use_runtimelinking" = yes; then
2841 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2842 # instead of lib<name>.a to let people know that these are not
2843 # typical AIX shared libraries.
2844 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2845 else
2846 # We preserve .a as extension for shared libraries through AIX4.2
2847 # and later when we are not doing run time linking.
2848 library_names_spec='${libname}${release}.a $libname.a'
2849 soname_spec='${libname}${release}${shared_ext}$major'
2850 fi
2851 shlibpath_var=LIBPATH
2852 fi
2853 ;;
2854
2855amigaos*)
2856 case $host_cpu in
2857 powerpc)
2858 # Since July 2007 AmigaOS4 officially supports .so libraries.
2859 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2860 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2861 ;;
2862 m68k)
2863 library_names_spec='$libname.ixlibrary $libname.a'
2864 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2865 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'
2866 ;;
2867 esac
2868 ;;
2869
2870beos*)
2871 library_names_spec='${libname}${shared_ext}'
2872 dynamic_linker="$host_os ld.so"
2873 shlibpath_var=LIBRARY_PATH
2874 ;;
2875
2876bsdi[[45]]*)
2877 version_type=linux
2878 need_version=no
2879 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2880 soname_spec='${libname}${release}${shared_ext}$major'
2881 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2882 shlibpath_var=LD_LIBRARY_PATH
2883 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2884 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2885 # the default ld.so.conf also contains /usr/contrib/lib and
2886 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2887 # libtool to hard-code these into programs
2888 ;;
2889
2890cygwin* | mingw* | pw32* | cegcc*)
2891 version_type=windows
2892 shrext_cmds=".dll"
2893 need_version=no
2894 need_lib_prefix=no
2895
2896 case $GCC,$host_os in
2897 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2898 library_names_spec='$libname.dll.a'
2899 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2900 postinstall_cmds='base_file=`basename \${file}`~
2901 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2902 dldir=$destdir/`dirname \$dlpath`~
2903 test -d \$dldir || mkdir -p \$dldir~
2904 $install_prog $dir/$dlname \$dldir/$dlname~
2905 chmod a+x \$dldir/$dlname~
2906 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2907 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2908 fi'
2909 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2910 dlpath=$dir/\$dldll~
2911 $RM \$dlpath'
2912 shlibpath_overrides_runpath=yes
2913
2914 case $host_os in
2915 cygwin*)
2916 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2917 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2918 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2919 ;;
2920 mingw* | cegcc*)
2921 # MinGW DLLs use traditional 'lib' prefix
2922 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2923 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2924 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2925 # It is most probably a Windows format PATH printed by
2926 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2927 # path with ; separators, and with drive letters. We can handle the
2928 # drive letters (cygwin fileutils understands them), so leave them,
2929 # especially as we might pass files found there to a mingw objdump,
2930 # which wouldn't understand a cygwinified path. Ahh.
2931 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2932 else
2933 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2934 fi
2935 ;;
2936 pw32*)
2937 # pw32 DLLs use 'pw' prefix rather than 'lib'
2938 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2939 ;;
2940 esac
2941 ;;
2942
2943 *)
2944 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2945 ;;
2946 esac
2947 dynamic_linker='Win32 ld.exe'
2948 # FIXME: first we should search . and the directory the executable is in
2949 shlibpath_var=PATH
2950 ;;
2951
2952darwin* | rhapsody*)
2953 dynamic_linker="$host_os dyld"
2954 version_type=darwin
2955 need_lib_prefix=no
2956 need_version=no
2957 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2958 soname_spec='${libname}${release}${major}$shared_ext'
2959 shlibpath_overrides_runpath=yes
2960 shlibpath_var=DYLD_LIBRARY_PATH
2961 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2962m4_if([$1], [],[
2963 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2964 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2965 ;;
2966
2967dgux*)
2968 version_type=linux
2969 need_lib_prefix=no
2970 need_version=no
2971 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2972 soname_spec='${libname}${release}${shared_ext}$major'
2973 shlibpath_var=LD_LIBRARY_PATH
2974 ;;
2975
2976freebsd1*)
2977 dynamic_linker=no
2978 ;;
2979
2980freebsd* | dragonfly*)
2981 # DragonFly does not have aout. When/if they implement a new
2982 # versioning mechanism, adjust this.
2983 if test -x /usr/bin/objformat; then
2984 objformat=`/usr/bin/objformat`
2985 else
2986 case $host_os in
2987 freebsd[[123]]*) objformat=aout ;;
2988 *) objformat=elf ;;
2989 esac
2990 fi
2991 version_type=freebsd-$objformat
2992 case $version_type in
2993 freebsd-elf*)
2994 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2995 need_version=no
2996 need_lib_prefix=no
2997 ;;
2998 freebsd-*)
2999 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3000 need_version=yes
3001 ;;
3002 esac
3003 shlibpath_var=LD_LIBRARY_PATH
3004 case $host_os in
3005 freebsd2*)
3006 shlibpath_overrides_runpath=yes
3007 ;;
3008 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3009 shlibpath_overrides_runpath=yes
3010 hardcode_into_libs=yes
3011 ;;
3012 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3013 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3014 shlibpath_overrides_runpath=no
3015 hardcode_into_libs=yes
3016 ;;
3017 *) # from 4.6 on, and DragonFly
3018 shlibpath_overrides_runpath=yes
3019 hardcode_into_libs=yes
3020 ;;
3021 esac
3022 ;;
3023
3024gnu*)
3025 version_type=linux
3026 need_lib_prefix=no
3027 need_version=no
3028 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3029 soname_spec='${libname}${release}${shared_ext}$major'
3030 shlibpath_var=LD_LIBRARY_PATH
3031 hardcode_into_libs=yes
3032 ;;
3033
3034hpux9* | hpux10* | hpux11*)
3035 # Give a soname corresponding to the major version so that dld.sl refuses to
3036 # link against other versions.
3037 version_type=sunos
3038 need_lib_prefix=no
3039 need_version=no
3040 case $host_cpu in
3041 ia64*)
3042 shrext_cmds='.so'
3043 hardcode_into_libs=yes
3044 dynamic_linker="$host_os dld.so"
3045 shlibpath_var=LD_LIBRARY_PATH
3046 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3047 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3048 soname_spec='${libname}${release}${shared_ext}$major'
3049 if test "X$HPUX_IA64_MODE" = X32; then
3050 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3051 else
3052 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3053 fi
3054 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3055 ;;
3056 hppa*64*)
3057 shrext_cmds='.sl'
3058 hardcode_into_libs=yes
3059 dynamic_linker="$host_os dld.sl"
3060 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3061 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3062 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3063 soname_spec='${libname}${release}${shared_ext}$major'
3064 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3065 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3066 ;;
3067 *)
3068 shrext_cmds='.sl'
3069 dynamic_linker="$host_os dld.sl"
3070 shlibpath_var=SHLIB_PATH
3071 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3072 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3073 soname_spec='${libname}${release}${shared_ext}$major'
3074 ;;
3075 esac
3076 # HP-UX runs *really* slowly unless shared libraries are mode 555.
3077 postinstall_cmds='chmod 555 $lib'
3078 ;;
3079
3080interix[[3-9]]*)
3081 version_type=linux
3082 need_lib_prefix=no
3083 need_version=no
3084 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3085 soname_spec='${libname}${release}${shared_ext}$major'
3086 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3087 shlibpath_var=LD_LIBRARY_PATH
3088 shlibpath_overrides_runpath=no
3089 hardcode_into_libs=yes
3090 ;;
3091
3092irix5* | irix6* | nonstopux*)
3093 case $host_os in
3094 nonstopux*) version_type=nonstopux ;;
3095 *)
3096 if test "$lt_cv_prog_gnu_ld" = yes; then
3097 version_type=linux
3098 else
3099 version_type=irix
3100 fi ;;
3101 esac
3102 need_lib_prefix=no
3103 need_version=no
3104 soname_spec='${libname}${release}${shared_ext}$major'
3105 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3106 case $host_os in
3107 irix5* | nonstopux*)
3108 libsuff= shlibsuff=
3109 ;;
3110 *)
3111 case $LD in # libtool.m4 will add one of these switches to LD
3112 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3113 libsuff= shlibsuff= libmagic=32-bit;;
3114 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3115 libsuff=32 shlibsuff=N32 libmagic=N32;;
3116 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3117 libsuff=64 shlibsuff=64 libmagic=64-bit;;
3118 *) libsuff= shlibsuff= libmagic=never-match;;
3119 esac
3120 ;;
3121 esac
3122 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3123 shlibpath_overrides_runpath=no
3124 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3125 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3126 hardcode_into_libs=yes
3127 ;;
3128
3129# No shared lib support for Linux oldld, aout, or coff.
3130linux*oldld* | linux*aout* | linux*coff*)
3131 dynamic_linker=no
3132 ;;
3133
3134# This must be Linux ELF.
3135linux* | k*bsd*-gnu | kopensolaris*-gnu)
3136 version_type=linux
3137 need_lib_prefix=no
3138 need_version=no
3139 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3140 soname_spec='${libname}${release}${shared_ext}$major'
3141 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3142 shlibpath_var=LD_LIBRARY_PATH
3143 shlibpath_overrides_runpath=no
3144 # Some binutils ld are patched to set DT_RUNPATH
3145 save_LDFLAGS=$LDFLAGS
3146 save_libdir=$libdir
3147 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3148 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3149 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3150 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3151 [shlibpath_overrides_runpath=yes])])
3152 LDFLAGS=$save_LDFLAGS
3153 libdir=$save_libdir
3154
3155 # This implies no fast_install, which is unacceptable.
3156 # Some rework will be needed to allow for fast_install
3157 # before this can be enabled.
3158 hardcode_into_libs=yes
3159
3160 # Append ld.so.conf contents to the search path
3161 if test -f /etc/ld.so.conf; then
3162 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' ' '`
3163 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3164 fi
3165
3166 # We used to test for /lib/ld.so.1 and disable shared libraries on
3167 # powerpc, because MkLinux only supported shared libraries with the
3168 # GNU dynamic linker. Since this was broken with cross compilers,
3169 # most powerpc-linux boxes support dynamic linking these days and
3170 # people can always --disable-shared, the test was removed, and we
3171 # assume the GNU/Linux dynamic linker is in use.
3172 dynamic_linker='GNU/Linux ld.so'
3173 ;;
3174
3175netbsdelf*-gnu)
3176 version_type=linux
3177 need_lib_prefix=no
3178 need_version=no
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 shlibpath_var=LD_LIBRARY_PATH
3182 shlibpath_overrides_runpath=no
3183 hardcode_into_libs=yes
3184 dynamic_linker='NetBSD ld.elf_so'
3185 ;;
3186
3187netbsd*)
3188 version_type=sunos
3189 need_lib_prefix=no
3190 need_version=no
3191 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3192 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3193 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3194 dynamic_linker='NetBSD (a.out) ld.so'
3195 else
3196 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3197 soname_spec='${libname}${release}${shared_ext}$major'
3198 dynamic_linker='NetBSD ld.elf_so'
3199 fi
3200 shlibpath_var=LD_LIBRARY_PATH
3201 shlibpath_overrides_runpath=yes
3202 hardcode_into_libs=yes
3203 ;;
3204
3205newsos6)
3206 version_type=linux
3207 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3208 shlibpath_var=LD_LIBRARY_PATH
3209 shlibpath_overrides_runpath=yes
3210 ;;
3211
3212*nto* | *qnx*)
3213 version_type=qnx
3214 need_lib_prefix=no
3215 need_version=no
3216 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3217 soname_spec='${libname}${release}${shared_ext}$major'
3218 shlibpath_var=LD_LIBRARY_PATH
3219 shlibpath_overrides_runpath=no
3220 hardcode_into_libs=yes
3221 dynamic_linker='ldqnx.so'
3222 ;;
3223
3224openbsd*)
3225 version_type=sunos
3226 sys_lib_dlsearch_path_spec="/usr/lib"
3227 need_lib_prefix=no
3228 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3229 case $host_os in
3230 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
3231 *) need_version=no ;;
3232 esac
3233 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3234 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3235 shlibpath_var=LD_LIBRARY_PATH
3236 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3237 case $host_os in
3238 openbsd2.[[89]] | openbsd2.[[89]].*)
3239 shlibpath_overrides_runpath=no
3240 ;;
3241 *)
3242 shlibpath_overrides_runpath=yes
3243 ;;
3244 esac
3245 else
3246 shlibpath_overrides_runpath=yes
3247 fi
3248 ;;
3249
3250os2*)
3251 libname_spec='$name'
3252 shrext_cmds=".dll"
3253 need_lib_prefix=no
3254 library_names_spec='$libname${shared_ext} $libname.a'
3255 dynamic_linker='OS/2 ld.exe'
3256 shlibpath_var=LIBPATH
3257 ;;
3258
3259osf3* | osf4* | osf5*)
3260 version_type=osf
3261 need_lib_prefix=no
3262 need_version=no
3263 soname_spec='${libname}${release}${shared_ext}$major'
3264 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3265 shlibpath_var=LD_LIBRARY_PATH
3266 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3267 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3268 ;;
3269
3270rdos*)
3271 dynamic_linker=no
3272 ;;
3273
3274solaris*)
3275 version_type=linux
3276 need_lib_prefix=no
3277 need_version=no
3278 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3279 soname_spec='${libname}${release}${shared_ext}$major'
3280 shlibpath_var=LD_LIBRARY_PATH
3281 shlibpath_overrides_runpath=yes
3282 hardcode_into_libs=yes
3283 # ldd complains unless libraries are executable
3284 postinstall_cmds='chmod +x $lib'
3285 ;;
3286
3287sunos4*)
3288 version_type=sunos
3289 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3290 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3291 shlibpath_var=LD_LIBRARY_PATH
3292 shlibpath_overrides_runpath=yes
3293 if test "$with_gnu_ld" = yes; then
3294 need_lib_prefix=no
3295 fi
3296 need_version=yes
3297 ;;
3298
3299sysv4 | sysv4.3*)
3300 version_type=linux
3301 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3302 soname_spec='${libname}${release}${shared_ext}$major'
3303 shlibpath_var=LD_LIBRARY_PATH
3304 case $host_vendor in
3305 sni)
3306 shlibpath_overrides_runpath=no
3307 need_lib_prefix=no
3308 runpath_var=LD_RUN_PATH
3309 ;;
3310 siemens)
3311 need_lib_prefix=no
3312 ;;
3313 motorola)
3314 need_lib_prefix=no
3315 need_version=no
3316 shlibpath_overrides_runpath=no
3317 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3318 ;;
3319 esac
3320 ;;
3321
3322sysv4*MP*)
3323 if test -d /usr/nec ;then
3324 version_type=linux
3325 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3326 soname_spec='$libname${shared_ext}.$major'
3327 shlibpath_var=LD_LIBRARY_PATH
3328 fi
3329 ;;
3330
3331sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3332 version_type=freebsd-elf
3333 need_lib_prefix=no
3334 need_version=no
3335 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3336 soname_spec='${libname}${release}${shared_ext}$major'
3337 shlibpath_var=LD_LIBRARY_PATH
3338 shlibpath_overrides_runpath=yes
3339 hardcode_into_libs=yes
3340 if test "$with_gnu_ld" = yes; then
3341 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3342 else
3343 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3344 case $host_os in
3345 sco3.2v5*)
3346 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3347 ;;
3348 esac
3349 fi
3350 sys_lib_dlsearch_path_spec='/usr/lib'
3351 ;;
3352
3353tpf*)
3354 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3355 version_type=linux
3356 need_lib_prefix=no
3357 need_version=no
3358 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3359 shlibpath_var=LD_LIBRARY_PATH
3360 shlibpath_overrides_runpath=no
3361 hardcode_into_libs=yes
3362 ;;
3363
3364uts4*)
3365 version_type=linux
3366 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3367 soname_spec='${libname}${release}${shared_ext}$major'
3368 shlibpath_var=LD_LIBRARY_PATH
3369 ;;
3370
3371*)
3372 dynamic_linker=no
3373 ;;
3374esac
3375AC_MSG_RESULT([$dynamic_linker])
3376test "$dynamic_linker" = no && can_build_shared=no
3377
3378variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3379if test "$GCC" = yes; then
3380 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3381fi
3382
3383if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3384 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3385fi
3386if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3387 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3388fi
3389
3390_LT_DECL([], [variables_saved_for_relink], [1],
3391 [Variables whose values should be saved in libtool wrapper scripts and
3392 restored at link time])
3393_LT_DECL([], [need_lib_prefix], [0],
3394 [Do we need the "lib" prefix for modules?])
3395_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3396_LT_DECL([], [version_type], [0], [Library versioning type])
3397_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3398_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3399_LT_DECL([], [shlibpath_overrides_runpath], [0],
3400 [Is shlibpath searched before the hard-coded library search path?])
3401_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3402_LT_DECL([], [library_names_spec], [1],
3403 [[List of archive names. First name is the real one, the rest are links.
3404 The last name is the one that the linker finds with -lNAME]])
3405_LT_DECL([], [soname_spec], [1],
3406 [[The coded name of the library, if different from the real name]])
3407_LT_DECL([], [postinstall_cmds], [2],
3408 [Command to use after installation of a shared archive])
3409_LT_DECL([], [postuninstall_cmds], [2],
3410 [Command to use after uninstallation of a shared archive])
3411_LT_DECL([], [finish_cmds], [2],
3412 [Commands used to finish a libtool library installation in a directory])
3413_LT_DECL([], [finish_eval], [1],
3414 [[As "finish_cmds", except a single script fragment to be evaled but
3415 not shown]])
3416_LT_DECL([], [hardcode_into_libs], [0],
3417 [Whether we should hardcode library paths into libraries])
3418_LT_DECL([], [sys_lib_search_path_spec], [2],
3419 [Compile-time system search path for libraries])
3420_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3421 [Run-time system search path for libraries])
3422])# _LT_SYS_DYNAMIC_LINKER
3423
3424
3425# _LT_PATH_TOOL_PREFIX(TOOL)
3426# --------------------------
3427# find a file program which can recognize shared library
3428AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3429[m4_require([_LT_DECL_EGREP])dnl
3430AC_MSG_CHECKING([for $1])
3431AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3432[case $MAGIC_CMD in
3433[[\\/*] | ?:[\\/]*])
3434 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3435 ;;
3436*)
3437 lt_save_MAGIC_CMD="$MAGIC_CMD"
3438 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3439dnl $ac_dummy forces splitting on constant user-supplied paths.
3440dnl POSIX.2 word splitting is done only on the output of word expansions,
3441dnl not every word. This closes a longstanding sh security hole.
3442 ac_dummy="m4_if([$2], , $PATH, [$2])"
3443 for ac_dir in $ac_dummy; do
3444 IFS="$lt_save_ifs"
3445 test -z "$ac_dir" && ac_dir=.
3446 if test -f $ac_dir/$1; then
3447 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3448 if test -n "$file_magic_test_file"; then
3449 case $deplibs_check_method in
3450 "file_magic "*)
3451 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3452 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3453 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3454 $EGREP "$file_magic_regex" > /dev/null; then
3455 :
3456 else
3457 cat <<_LT_EOF 1>&2
3458
3459*** Warning: the command libtool uses to detect shared libraries,
3460*** $file_magic_cmd, produces output that libtool cannot recognize.
3461*** The result is that libtool may fail to recognize shared libraries
3462*** as such. This will affect the creation of libtool libraries that
3463*** depend on shared libraries, but programs linked with such libtool
3464*** libraries will work regardless of this problem. Nevertheless, you
3465*** may want to report the problem to your system manager and/or to
3466*** bug-libtool@gnu.org
3467
3468_LT_EOF
3469 fi ;;
3470 esac
3471 fi
3472 break
3473 fi
3474 done
3475 IFS="$lt_save_ifs"
3476 MAGIC_CMD="$lt_save_MAGIC_CMD"
3477 ;;
3478esac])
3479MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3480if test -n "$MAGIC_CMD"; then
3481 AC_MSG_RESULT($MAGIC_CMD)
3482else
3483 AC_MSG_RESULT(no)
3484fi
3485_LT_DECL([], [MAGIC_CMD], [0],
3486 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3487])# _LT_PATH_TOOL_PREFIX
3488
3489# Old name:
3490AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3491dnl aclocal-1.4 backwards compatibility:
3492dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3493
3494
3495# _LT_PATH_MAGIC
3496# --------------
3497# find a file program which can recognize a shared library
3498m4_defun([_LT_PATH_MAGIC],
3499[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3500if test -z "$lt_cv_path_MAGIC_CMD"; then
3501 if test -n "$ac_tool_prefix"; then
3502 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3503 else
3504 MAGIC_CMD=:
3505 fi
3506fi
3507])# _LT_PATH_MAGIC
3508
3509
3510# LT_PATH_LD
3511# ----------
3512# find the pathname to the GNU or non-GNU linker
3513AC_DEFUN([LT_PATH_LD],
3514[AC_REQUIRE([AC_PROG_CC])dnl
3515AC_REQUIRE([AC_CANONICAL_HOST])dnl
3516AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3517m4_require([_LT_DECL_SED])dnl
3518m4_require([_LT_DECL_EGREP])dnl
3519
3520AC_ARG_WITH([gnu-ld],
3521 [AS_HELP_STRING([--with-gnu-ld],
3522 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3523 [test "$withval" = no || with_gnu_ld=yes],
3524 [with_gnu_ld=no])dnl
3525
3526ac_prog=ld
3527if test "$GCC" = yes; then
3528 # Check if gcc -print-prog-name=ld gives a path.
3529 AC_MSG_CHECKING([for ld used by $CC])
3530 case $host in
3531 *-*-mingw*)
3532 # gcc leaves a trailing carriage return which upsets mingw
3533 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3534 *)
3535 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3536 esac
3537 case $ac_prog in
3538 # Accept absolute paths.
3539 [[\\/]]* | ?:[[\\/]]*)
3540 re_direlt='/[[^/]][[^/]]*/\.\./'
3541 # Canonicalize the pathname of ld
3542 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3543 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3544 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3545 done
3546 test -z "$LD" && LD="$ac_prog"
3547 ;;
3548 "")
3549 # If it fails, then pretend we aren't using GCC.
3550 ac_prog=ld
3551 ;;
3552 *)
3553 # If it is relative, then search for the first ld in PATH.
3554 with_gnu_ld=unknown
3555 ;;
3556 esac
3557elif test "$with_gnu_ld" = yes; then
3558 AC_MSG_CHECKING([for GNU ld])
3559else
3560 AC_MSG_CHECKING([for non-GNU ld])
3561fi
3562AC_CACHE_VAL(lt_cv_path_LD,
3563[if test -z "$LD"; then
3564 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3565 for ac_dir in $PATH; do
3566 IFS="$lt_save_ifs"
3567 test -z "$ac_dir" && ac_dir=.
3568 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3569 lt_cv_path_LD="$ac_dir/$ac_prog"
3570 # Check to see if the program is GNU ld. I'd rather use --version,
3571 # but apparently some variants of GNU ld only accept -v.
3572 # Break only if it was the GNU/non-GNU ld that we prefer.
3573 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3574 *GNU* | *'with BFD'*)
3575 test "$with_gnu_ld" != no && break
3576 ;;
3577 *)
3578 test "$with_gnu_ld" != yes && break
3579 ;;
3580 esac
3581 fi
3582 done
3583 IFS="$lt_save_ifs"
3584else
3585 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3586fi])
3587LD="$lt_cv_path_LD"
3588if test -n "$LD"; then
3589 AC_MSG_RESULT($LD)
3590else
3591 AC_MSG_RESULT(no)
3592fi
3593test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3594_LT_PATH_LD_GNU
3595AC_SUBST([LD])
3596
3597_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3598])# LT_PATH_LD
3599
3600# Old names:
3601AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3602AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3603dnl aclocal-1.4 backwards compatibility:
3604dnl AC_DEFUN([AM_PROG_LD], [])
3605dnl AC_DEFUN([AC_PROG_LD], [])
3606
3607
3608# _LT_PATH_LD_GNU
3609#- --------------
3610m4_defun([_LT_PATH_LD_GNU],
3611[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3612[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3613case `$LD -v 2>&1 </dev/null` in
3614*GNU* | *'with BFD'*)
3615 lt_cv_prog_gnu_ld=yes
3616 ;;
3617*)
3618 lt_cv_prog_gnu_ld=no
3619 ;;
3620esac])
3621with_gnu_ld=$lt_cv_prog_gnu_ld
3622])# _LT_PATH_LD_GNU
3623
3624
3625# _LT_CMD_RELOAD
3626# --------------
3627# find reload flag for linker
3628# -- PORTME Some linkers may need a different reload flag.
3629m4_defun([_LT_CMD_RELOAD],
3630[AC_CACHE_CHECK([for $LD option to reload object files],
3631 lt_cv_ld_reload_flag,
3632 [lt_cv_ld_reload_flag='-r'])
3633reload_flag=$lt_cv_ld_reload_flag
3634case $reload_flag in
3635"" | " "*) ;;
3636*) reload_flag=" $reload_flag" ;;
3637esac
3638reload_cmds='$LD$reload_flag -o $output$reload_objs'
3639case $host_os in
3640 darwin*)
3641 if test "$GCC" = yes; then
3642 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3643 else
3644 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3645 fi
3646 ;;
3647esac
3648_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3649_LT_DECL([], [reload_cmds], [2])dnl
3650])# _LT_CMD_RELOAD
3651
3652
3653# _LT_CHECK_MAGIC_METHOD
3654# ----------------------
3655# how to check for library dependencies
3656# -- PORTME fill in with the dynamic library characteristics
3657m4_defun([_LT_CHECK_MAGIC_METHOD],
3658[m4_require([_LT_DECL_EGREP])
3659m4_require([_LT_DECL_OBJDUMP])
3660AC_CACHE_CHECK([how to recognize dependent libraries],
3661lt_cv_deplibs_check_method,
3662[lt_cv_file_magic_cmd='$MAGIC_CMD'
3663lt_cv_file_magic_test_file=
3664lt_cv_deplibs_check_method='unknown'
3665# Need to set the preceding variable on all platforms that support
3666# interlibrary dependencies.
3667# 'none' -- dependencies not supported.
3668# `unknown' -- same as none, but documents that we really don't know.
3669# 'pass_all' -- all dependencies passed with no checks.
3670# 'test_compile' -- check by making test program.
3671# 'file_magic [[regex]]' -- check by looking for files in library path
3672# which responds to the $file_magic_cmd with a given extended regex.
3673# If you have `file' or equivalent on your system and you're not sure
3674# whether `pass_all' will *always* work, you probably want this one.
3675
3676case $host_os in
3677aix[[4-9]]*)
3678 lt_cv_deplibs_check_method=pass_all
3679 ;;
3680
3681beos*)
3682 lt_cv_deplibs_check_method=pass_all
3683 ;;
3684
3685bsdi[[45]]*)
3686 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3687 lt_cv_file_magic_cmd='/usr/bin/file -L'
3688 lt_cv_file_magic_test_file=/shlib/libc.so
3689 ;;
3690
3691cygwin*)
3692 # func_win32_libid is a shell function defined in ltmain.sh
3693 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3694 lt_cv_file_magic_cmd='func_win32_libid'
3695 ;;
3696
3697mingw* | pw32*)
3698 # Base MSYS/MinGW do not provide the 'file' command needed by
3699 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3700 # unless we find 'file', for example because we are cross-compiling.
3701 if ( file / ) >/dev/null 2>&1; then
3702 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3703 lt_cv_file_magic_cmd='func_win32_libid'
3704 else
3705 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3706 lt_cv_file_magic_cmd='$OBJDUMP -f'
3707 fi
3708 ;;
3709
3710cegcc)
3711 # use the weaker test based on 'objdump'. See mingw*.
3712 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3713 lt_cv_file_magic_cmd='$OBJDUMP -f'
3714 ;;
3715
3716darwin* | rhapsody*)
3717 lt_cv_deplibs_check_method=pass_all
3718 ;;
3719
3720freebsd* | dragonfly*)
3721 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3722 case $host_cpu in
3723 i*86 )
3724 # Not sure whether the presence of OpenBSD here was a mistake.
3725 # Let's accept both of them until this is cleared up.
3726 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3727 lt_cv_file_magic_cmd=/usr/bin/file
3728 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3729 ;;
3730 esac
3731 else
3732 lt_cv_deplibs_check_method=pass_all
3733 fi
3734 ;;
3735
3736gnu*)
3737 lt_cv_deplibs_check_method=pass_all
3738 ;;
3739
3740hpux10.20* | hpux11*)
3741 lt_cv_file_magic_cmd=/usr/bin/file
3742 case $host_cpu in
3743 ia64*)
3744 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3745 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3746 ;;
3747 hppa*64*)
3748 [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]']
3749 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3750 ;;
3751 *)
3752 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3753 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3754 ;;
3755 esac
3756 ;;
3757
3758interix[[3-9]]*)
3759 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3760 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3761 ;;
3762
3763irix5* | irix6* | nonstopux*)
3764 case $LD in
3765 *-32|*"-32 ") libmagic=32-bit;;
3766 *-n32|*"-n32 ") libmagic=N32;;
3767 *-64|*"-64 ") libmagic=64-bit;;
3768 *) libmagic=never-match;;
3769 esac
3770 lt_cv_deplibs_check_method=pass_all
3771 ;;
3772
3773# This must be Linux ELF.
3774linux* | k*bsd*-gnu | kopensolaris*-gnu)
3775 lt_cv_deplibs_check_method=pass_all
3776 ;;
3777
3778netbsd* | netbsdelf*-gnu)
3779 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3780 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3781 else
3782 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3783 fi
3784 ;;
3785
3786newos6*)
3787 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3788 lt_cv_file_magic_cmd=/usr/bin/file
3789 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3790 ;;
3791
3792*nto* | *qnx*)
3793 lt_cv_deplibs_check_method=pass_all
3794 ;;
3795
3796openbsd*)
3797 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3798 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3799 else
3800 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3801 fi
3802 ;;
3803
3804osf3* | osf4* | osf5*)
3805 lt_cv_deplibs_check_method=pass_all
3806 ;;
3807
3808rdos*)
3809 lt_cv_deplibs_check_method=pass_all
3810 ;;
3811
3812solaris*)
3813 lt_cv_deplibs_check_method=pass_all
3814 ;;
3815
3816sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3817 lt_cv_deplibs_check_method=pass_all
3818 ;;
3819
3820sysv4 | sysv4.3*)
3821 case $host_vendor in
3822 motorola)
3823 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]]'
3824 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3825 ;;
3826 ncr)
3827 lt_cv_deplibs_check_method=pass_all
3828 ;;
3829 sequent)
3830 lt_cv_file_magic_cmd='/bin/file'
3831 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3832 ;;
3833 sni)
3834 lt_cv_file_magic_cmd='/bin/file'
3835 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3836 lt_cv_file_magic_test_file=/lib/libc.so
3837 ;;
3838 siemens)
3839 lt_cv_deplibs_check_method=pass_all
3840 ;;
3841 pc)
3842 lt_cv_deplibs_check_method=pass_all
3843 ;;
3844 esac
3845 ;;
3846
3847tpf*)
3848 lt_cv_deplibs_check_method=pass_all
3849 ;;
3850esac
3851])
3852file_magic_cmd=$lt_cv_file_magic_cmd
3853deplibs_check_method=$lt_cv_deplibs_check_method
3854test -z "$deplibs_check_method" && deplibs_check_method=unknown
3855
3856_LT_DECL([], [deplibs_check_method], [1],
3857 [Method to check whether dependent libraries are shared objects])
3858_LT_DECL([], [file_magic_cmd], [1],
3859 [Command to use when deplibs_check_method == "file_magic"])
3860])# _LT_CHECK_MAGIC_METHOD
3861
3862
3863# LT_PATH_NM
3864# ----------
3865# find the pathname to a BSD- or MS-compatible name lister
3866AC_DEFUN([LT_PATH_NM],
3867[AC_REQUIRE([AC_PROG_CC])dnl
3868AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3869[if test -n "$NM"; then
3870 # Let the user override the test.
3871 lt_cv_path_NM="$NM"
3872else
3873 lt_nm_to_check="${ac_tool_prefix}nm"
3874 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3875 lt_nm_to_check="$lt_nm_to_check nm"
3876 fi
3877 for lt_tmp_nm in $lt_nm_to_check; do
3878 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3879 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3880 IFS="$lt_save_ifs"
3881 test -z "$ac_dir" && ac_dir=.
3882 tmp_nm="$ac_dir/$lt_tmp_nm"
3883 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3884 # Check to see if the nm accepts a BSD-compat flag.
3885 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3886 # nm: unknown option "B" ignored
3887 # Tru64's nm complains that /dev/null is an invalid object file
3888 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3889 */dev/null* | *'Invalid file or object type'*)
3890 lt_cv_path_NM="$tmp_nm -B"
3891 break
3892 ;;
3893 *)
3894 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3895 */dev/null*)
3896 lt_cv_path_NM="$tmp_nm -p"
3897 break
3898 ;;
3899 *)
3900 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3901 continue # so that we can try to find one that supports BSD flags
3902 ;;
3903 esac
3904 ;;
3905 esac
3906 fi
3907 done
3908 IFS="$lt_save_ifs"
3909 done
3910 : ${lt_cv_path_NM=no}
3911fi])
3912if test "$lt_cv_path_NM" != "no"; then
3913 NM="$lt_cv_path_NM"
3914else
3915 # Didn't find any BSD compatible name lister, look for dumpbin.
3916 AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3917 AC_SUBST([DUMPBIN])
3918 if test "$DUMPBIN" != ":"; then
3919 NM="$DUMPBIN"
3920 fi
3921fi
3922test -z "$NM" && NM=nm
3923AC_SUBST([NM])
3924_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3925
3926AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3927 [lt_cv_nm_interface="BSD nm"
3928 echo "int some_variable = 0;" > conftest.$ac_ext
3929 (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3930 (eval "$ac_compile" 2>conftest.err)
3931 cat conftest.err >&AS_MESSAGE_LOG_FD
3932 (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3933 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3934 cat conftest.err >&AS_MESSAGE_LOG_FD
3935 (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3936 cat conftest.out >&AS_MESSAGE_LOG_FD
3937 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3938 lt_cv_nm_interface="MS dumpbin"
3939 fi
3940 rm -f conftest*])
3941])# LT_PATH_NM
3942
3943# Old names:
3944AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3945AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3946dnl aclocal-1.4 backwards compatibility:
3947dnl AC_DEFUN([AM_PROG_NM], [])
3948dnl AC_DEFUN([AC_PROG_NM], [])
3949
3950
3951# LT_LIB_M
3952# --------
3953# check for math library
3954AC_DEFUN([LT_LIB_M],
3955[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3956LIBM=
3957case $host in
3958*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3959 # These system don't have libm, or don't need it
3960 ;;
3961*-ncr-sysv4.3*)
3962 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3963 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3964 ;;
3965*)
3966 AC_CHECK_LIB(m, cos, LIBM="-lm")
3967 ;;
3968esac
3969AC_SUBST([LIBM])
3970])# LT_LIB_M
3971
3972# Old name:
3973AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3974dnl aclocal-1.4 backwards compatibility:
3975dnl AC_DEFUN([AC_CHECK_LIBM], [])
3976
3977
3978# _LT_COMPILER_NO_RTTI([TAGNAME])
3979# -------------------------------
3980m4_defun([_LT_COMPILER_NO_RTTI],
3981[m4_require([_LT_TAG_COMPILER])dnl
3982
3983_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3984
3985if test "$GCC" = yes; then
3986 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3987
3988 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3989 lt_cv_prog_compiler_rtti_exceptions,
3990 [-fno-rtti -fno-exceptions], [],
3991 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3992fi
3993_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3994 [Compiler flag to turn off builtin functions])
3995])# _LT_COMPILER_NO_RTTI
3996
3997
3998# _LT_CMD_GLOBAL_SYMBOLS
3999# ----------------------
4000m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4001[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4002AC_REQUIRE([AC_PROG_CC])dnl
4003AC_REQUIRE([LT_PATH_NM])dnl
4004AC_REQUIRE([LT_PATH_LD])dnl
4005m4_require([_LT_DECL_SED])dnl
4006m4_require([_LT_DECL_EGREP])dnl
4007m4_require([_LT_TAG_COMPILER])dnl
4008
4009# Check for command to grab the raw symbol name followed by C symbol from nm.
4010AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4011AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4012[
4013# These are sane defaults that work on at least a few old systems.
4014# [They come from Ultrix. What could be older than Ultrix?!! ;)]
4015
4016# Character class describing NM global symbol codes.
4017symcode='[[BCDEGRST]]'
4018
4019# Regexp to match symbols that can be accessed directly from C.
4020sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4021
4022# Define system-specific variables.
4023case $host_os in
4024aix*)
4025 symcode='[[BCDT]]'
4026 ;;
4027cygwin* | mingw* | pw32* | cegcc*)
4028 symcode='[[ABCDGISTW]]'
4029 ;;
4030hpux*)
4031 if test "$host_cpu" = ia64; then
4032 symcode='[[ABCDEGRST]]'
4033 fi
4034 ;;
4035irix* | nonstopux*)
4036 symcode='[[BCDEGRST]]'
4037 ;;
4038osf*)
4039 symcode='[[BCDEGQRST]]'
4040 ;;
4041solaris*)
4042 symcode='[[BDRT]]'
4043 ;;
4044sco3.2v5*)
4045 symcode='[[DT]]'
4046 ;;
4047sysv4.2uw2*)
4048 symcode='[[DT]]'
4049 ;;
4050sysv5* | sco5v6* | unixware* | OpenUNIX*)
4051 symcode='[[ABDT]]'
4052 ;;
4053sysv4)
4054 symcode='[[DFNSTU]]'
4055 ;;
4056esac
4057
4058# If we're using GNU nm, then use its standard symbol codes.
4059case `$NM -V 2>&1` in
4060*GNU* | *'with BFD'*)
4061 symcode='[[ABCDGIRSTW]]' ;;
4062esac
4063
4064# Transform an extracted symbol line into a proper C declaration.
4065# Some systems (esp. on ia64) link data and code symbols differently,
4066# so use this general approach.
4067lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4068
4069# Transform an extracted symbol line into symbol name and symbol address
4070lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
4071lt_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'"
4072
4073# Handle CRLF in mingw tool chain
4074opt_cr=
4075case $build_os in
4076mingw*)
4077 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4078 ;;
4079esac
4080
4081# Try without a prefix underscore, then with it.
4082for ac_symprfx in "" "_"; do
4083
4084 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4085 symxfrm="\\1 $ac_symprfx\\2 \\2"
4086
4087 # Write the raw and C identifiers.
4088 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4089 # Fake it for dumpbin and say T for any non-static function
4090 # and D for any global variable.
4091 # Also find C++ and __fastcall symbols from MSVC++,
4092 # which start with @ or ?.
4093 lt_cv_sys_global_symbol_pipe="$AWK ['"\
4094" {last_section=section; section=\$ 3};"\
4095" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4096" \$ 0!~/External *\|/{next};"\
4097" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4098" {if(hide[section]) next};"\
4099" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4100" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4101" s[1]~/^[@?]/{print s[1], s[1]; next};"\
4102" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4103" ' prfx=^$ac_symprfx]"
4104 else
4105 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4106 fi
4107
4108 # Check to see that the pipe works correctly.
4109 pipe_works=no
4110
4111 rm -f conftest*
4112 cat > conftest.$ac_ext <<_LT_EOF
4113#ifdef __cplusplus
4114extern "C" {
4115#endif
4116char nm_test_var;
4117void nm_test_func(void);
4118void nm_test_func(void){}
4119#ifdef __cplusplus
4120}
4121#endif
4122int main(){nm_test_var='a';nm_test_func();return(0);}
4123_LT_EOF
4124
4125 if AC_TRY_EVAL(ac_compile); then
4126 # Now try to grab the symbols.
4127 nlist=conftest.nm
4128 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4129 # Try sorting and uniquifying the output.
4130 if sort "$nlist" | uniq > "$nlist"T; then
4131 mv -f "$nlist"T "$nlist"
4132 else
4133 rm -f "$nlist"T
4134 fi
4135
4136 # Make sure that we snagged all the symbols we need.
4137 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4138 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4139 cat <<_LT_EOF > conftest.$ac_ext
4140#ifdef __cplusplus
4141extern "C" {
4142#endif
4143
4144_LT_EOF
4145 # Now generate the symbol file.
4146 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4147
4148 cat <<_LT_EOF >> conftest.$ac_ext
4149
4150/* The mapping between symbol names and symbols. */
4151const struct {
4152 const char *name;
4153 void *address;
4154}
4155lt__PROGRAM__LTX_preloaded_symbols[[]] =
4156{
4157 { "@PROGRAM@", (void *) 0 },
4158_LT_EOF
4159 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4160 cat <<\_LT_EOF >> conftest.$ac_ext
4161 {0, (void *) 0}
4162};
4163
4164/* This works around a problem in FreeBSD linker */
4165#ifdef FREEBSD_WORKAROUND
4166static const void *lt_preloaded_setup() {
4167 return lt__PROGRAM__LTX_preloaded_symbols;
4168}
4169#endif
4170
4171#ifdef __cplusplus
4172}
4173#endif
4174_LT_EOF
4175 # Now try linking the two files.
4176 mv conftest.$ac_objext conftstm.$ac_objext
4177 lt_save_LIBS="$LIBS"
4178 lt_save_CFLAGS="$CFLAGS"
4179 LIBS="conftstm.$ac_objext"
4180 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4181 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4182 pipe_works=yes
4183 fi
4184 LIBS="$lt_save_LIBS"
4185 CFLAGS="$lt_save_CFLAGS"
4186 else
4187 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4188 fi
4189 else
4190 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4191 fi
4192 else
4193 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4194 fi
4195 else
4196 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4197 cat conftest.$ac_ext >&5
4198 fi
4199 rm -rf conftest* conftst*
4200
4201 # Do not use the global_symbol_pipe unless it works.
4202 if test "$pipe_works" = yes; then
4203 break
4204 else
4205 lt_cv_sys_global_symbol_pipe=
4206 fi
4207done
4208])
4209if test -z "$lt_cv_sys_global_symbol_pipe"; then
4210 lt_cv_sys_global_symbol_to_cdecl=
4211fi
4212if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4213 AC_MSG_RESULT(failed)
4214else
4215 AC_MSG_RESULT(ok)
4216fi
4217
4218_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4219 [Take the output of nm and produce a listing of raw symbols and C names])
4220_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4221 [Transform the output of nm in a proper C declaration])
4222_LT_DECL([global_symbol_to_c_name_address],
4223 [lt_cv_sys_global_symbol_to_c_name_address], [1],
4224 [Transform the output of nm in a C name address pair])
4225_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4226 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4227 [Transform the output of nm in a C name address pair when lib prefix is needed])
4228]) # _LT_CMD_GLOBAL_SYMBOLS
4229
4230
4231# _LT_COMPILER_PIC([TAGNAME])
4232# ---------------------------
4233m4_defun([_LT_COMPILER_PIC],
4234[m4_require([_LT_TAG_COMPILER])dnl
4235_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4236_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4237_LT_TAGVAR(lt_prog_compiler_static, $1)=
4238
4239AC_MSG_CHECKING([for $compiler option to produce PIC])
4240m4_if([$1], [CXX], [
4241 # C++ specific cases for pic, static, wl, etc.
4242 if test "$GXX" = yes; then
4243 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4244 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4245
4246 case $host_os in
4247 aix*)
4248 # All AIX code is PIC.
4249 if test "$host_cpu" = ia64; then
4250 # AIX 5 now supports IA64 processor
4251 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4252 fi
4253 ;;
4254
4255 amigaos*)
4256 case $host_cpu in
4257 powerpc)
4258 # see comment about AmigaOS4 .so support
4259 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4260 ;;
4261 m68k)
4262 # FIXME: we need at least 68020 code to build shared libraries, but
4263 # adding the `-m68020' flag to GCC prevents building anything better,
4264 # like `-m68040'.
4265 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4266 ;;
4267 esac
4268 ;;
4269
4270 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4271 # PIC is the default for these OSes.
4272 ;;
4273 mingw* | cygwin* | os2* | pw32* | cegcc*)
4274 # This hack is so that the source file can tell whether it is being
4275 # built for inclusion in a dll (and should export symbols for example).
4276 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4277 # (--disable-auto-import) libraries
4278 m4_if([$1], [GCJ], [],
4279 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4280 ;;
4281 darwin* | rhapsody*)
4282 # PIC is the default on this platform
4283 # Common symbols not allowed in MH_DYLIB files
4284 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4285 ;;
4286 *djgpp*)
4287 # DJGPP does not support shared libraries at all
4288 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4289 ;;
4290 interix[[3-9]]*)
4291 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4292 # Instead, we relocate shared libraries at runtime.
4293 ;;
4294 sysv4*MP*)
4295 if test -d /usr/nec; then
4296 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4297 fi
4298 ;;
4299 hpux*)
4300 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4301 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4302 # sets the default TLS model and affects inlining.
4303 case $host_cpu in
4304 hppa*64*)
4305 ;;
4306 *)
4307 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4308 ;;
4309 esac
4310 ;;
4311 *qnx* | *nto*)
4312 # QNX uses GNU C++, but need to define -shared option too, otherwise
4313 # it will coredump.
4314 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4315 ;;
4316 *)
4317 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4318 ;;
4319 esac
4320 else
4321 case $host_os in
4322 aix[[4-9]]*)
4323 # All AIX code is PIC.
4324 if test "$host_cpu" = ia64; then
4325 # AIX 5 now supports IA64 processor
4326 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4327 else
4328 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4329 fi
4330 ;;
4331 chorus*)
4332 case $cc_basename in
4333 cxch68*)
4334 # Green Hills C++ Compiler
4335 # _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"
4336 ;;
4337 esac
4338 ;;
4339 dgux*)
4340 case $cc_basename in
4341 ec++*)
4342 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4343 ;;
4344 ghcx*)
4345 # Green Hills C++ Compiler
4346 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4347 ;;
4348 *)
4349 ;;
4350 esac
4351 ;;
4352 freebsd* | dragonfly*)
4353 # FreeBSD uses GNU C++
4354 ;;
4355 hpux9* | hpux10* | hpux11*)
4356 case $cc_basename in
4357 CC*)
4358 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4359 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4360 if test "$host_cpu" != ia64; then
4361 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4362 fi
4363 ;;
4364 aCC*)
4365 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4366 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4367 case $host_cpu in
4368 hppa*64*|ia64*)
4369 # +Z the default
4370 ;;
4371 *)
4372 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4373 ;;
4374 esac
4375 ;;
4376 *)
4377 ;;
4378 esac
4379 ;;
4380 interix*)
4381 # This is c89, which is MS Visual C++ (no shared libs)
4382 # Anyone wants to do a port?
4383 ;;
4384 irix5* | irix6* | nonstopux*)
4385 case $cc_basename in
4386 CC*)
4387 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4388 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4389 # CC pic flag -KPIC is the default.
4390 ;;
4391 *)
4392 ;;
4393 esac
4394 ;;
4395 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4396 case $cc_basename in
4397 KCC*)
4398 # KAI C++ Compiler
4399 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4400 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4401 ;;
4402 ecpc* )
4403 # old Intel C++ for x86_64 which still supported -KPIC.
4404 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4405 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4406 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4407 ;;
4408 icpc* )
4409 # Intel C++, used to be incompatible with GCC.
4410 # ICC 10 doesn't accept -KPIC any more.
4411 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4412 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4413 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4414 ;;
4415 pgCC* | pgcpp*)
4416 # Portland Group C++ compiler
4417 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4418 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4419 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4420 ;;
4421 cxx*)
4422 # Compaq C++
4423 # Make sure the PIC flag is empty. It appears that all Alpha
4424 # Linux and Compaq Tru64 Unix objects are PIC.
4425 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4426 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4427 ;;
4428 xlc* | xlC*)
4429 # IBM XL 8.0 on PPC
4430 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4431 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4432 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4433 ;;
4434 *)
4435 case `$CC -V 2>&1 | sed 5q` in
4436 *Sun\ C*)
4437 # Sun C++ 5.9
4438 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4439 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4440 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4441 ;;
4442 esac
4443 ;;
4444 esac
4445 ;;
4446 lynxos*)
4447 ;;
4448 m88k*)
4449 ;;
4450 mvs*)
4451 case $cc_basename in
4452 cxx*)
4453 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4454 ;;
4455 *)
4456 ;;
4457 esac
4458 ;;
4459 netbsd* | netbsdelf*-gnu)
4460 ;;
4461 *qnx* | *nto*)
4462 # QNX uses GNU C++, but need to define -shared option too, otherwise
4463 # it will coredump.
4464 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4465 ;;
4466 osf3* | osf4* | osf5*)
4467 case $cc_basename in
4468 KCC*)
4469 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4470 ;;
4471 RCC*)
4472 # Rational C++ 2.4.1
4473 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4474 ;;
4475 cxx*)
4476 # Digital/Compaq C++
4477 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4478 # Make sure the PIC flag is empty. It appears that all Alpha
4479 # Linux and Compaq Tru64 Unix objects are PIC.
4480 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4481 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4482 ;;
4483 *)
4484 ;;
4485 esac
4486 ;;
4487 psos*)
4488 ;;
4489 solaris*)
4490 case $cc_basename in
4491 CC*)
4492 # Sun C++ 4.2, 5.x and Centerline C++
4493 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4494 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4495 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4496 ;;
4497 gcx*)
4498 # Green Hills C++ Compiler
4499 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4500 ;;
4501 *)
4502 ;;
4503 esac
4504 ;;
4505 sunos4*)
4506 case $cc_basename in
4507 CC*)
4508 # Sun C++ 4.x
4509 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4510 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4511 ;;
4512 lcc*)
4513 # Lucid
4514 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4515 ;;
4516 *)
4517 ;;
4518 esac
4519 ;;
4520 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4521 case $cc_basename in
4522 CC*)
4523 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4524 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4525 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4526 ;;
4527 esac
4528 ;;
4529 tandem*)
4530 case $cc_basename in
4531 NCC*)
4532 # NonStop-UX NCC 3.20
4533 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4534 ;;
4535 *)
4536 ;;
4537 esac
4538 ;;
4539 vxworks*)
4540 ;;
4541 *)
4542 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4543 ;;
4544 esac
4545 fi
4546],
4547[
4548 if test "$GCC" = yes; then
4549 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4550 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4551
4552 case $host_os in
4553 aix*)
4554 # All AIX code is PIC.
4555 if test "$host_cpu" = ia64; then
4556 # AIX 5 now supports IA64 processor
4557 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4558 fi
4559 ;;
4560
4561 amigaos*)
4562 case $host_cpu in
4563 powerpc)
4564 # see comment about AmigaOS4 .so support
4565 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4566 ;;
4567 m68k)
4568 # FIXME: we need at least 68020 code to build shared libraries, but
4569 # adding the `-m68020' flag to GCC prevents building anything better,
4570 # like `-m68040'.
4571 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4572 ;;
4573 esac
4574 ;;
4575
4576 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4577 # PIC is the default for these OSes.
4578 ;;
4579
4580 mingw* | cygwin* | pw32* | os2* | cegcc*)
4581 # This hack is so that the source file can tell whether it is being
4582 # built for inclusion in a dll (and should export symbols for example).
4583 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4584 # (--disable-auto-import) libraries
4585 m4_if([$1], [GCJ], [],
4586 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4587 ;;
4588
4589 darwin* | rhapsody*)
4590 # PIC is the default on this platform
4591 # Common symbols not allowed in MH_DYLIB files
4592 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4593 ;;
4594
4595 hpux*)
4596 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4597 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4598 # sets the default TLS model and affects inlining.
4599 case $host_cpu in
4600 hppa*64*)
4601 # +Z the default
4602 ;;
4603 *)
4604 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4605 ;;
4606 esac
4607 ;;
4608
4609 interix[[3-9]]*)
4610 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4611 # Instead, we relocate shared libraries at runtime.
4612 ;;
4613
4614 msdosdjgpp*)
4615 # Just because we use GCC doesn't mean we suddenly get shared libraries
4616 # on systems that don't support them.
4617 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4618 enable_shared=no
4619 ;;
4620
4621 *nto* | *qnx*)
4622 # QNX uses GNU C++, but need to define -shared option too, otherwise
4623 # it will coredump.
4624 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4625 ;;
4626
4627 sysv4*MP*)
4628 if test -d /usr/nec; then
4629 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4630 fi
4631 ;;
4632
4633 *)
4634 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4635 ;;
4636 esac
4637 else
4638 # PORTME Check for flag to pass linker flags through the system compiler.
4639 case $host_os in
4640 aix*)
4641 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4642 if test "$host_cpu" = ia64; then
4643 # AIX 5 now supports IA64 processor
4644 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4645 else
4646 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4647 fi
4648 ;;
4649
4650 mingw* | cygwin* | pw32* | os2* | cegcc*)
4651 # This hack is so that the source file can tell whether it is being
4652 # built for inclusion in a dll (and should export symbols for example).
4653 m4_if([$1], [GCJ], [],
4654 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4655 ;;
4656
4657 hpux9* | hpux10* | hpux11*)
4658 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4659 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4660 # not for PA HP-UX.
4661 case $host_cpu in
4662 hppa*64*|ia64*)
4663 # +Z the default
4664 ;;
4665 *)
4666 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4667 ;;
4668 esac
4669 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4670 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4671 ;;
4672
4673 irix5* | irix6* | nonstopux*)
4674 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4675 # PIC (with -KPIC) is the default.
4676 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4677 ;;
4678
4679 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4680 case $cc_basename in
4681 # old Intel for x86_64 which still supported -KPIC.
4682 ecc*)
4683 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4684 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4685 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4686 ;;
4687 # icc used to be incompatible with GCC.
4688 # ICC 10 doesn't accept -KPIC any more.
4689 icc* | ifort*)
4690 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4691 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4692 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4693 ;;
4694 # Lahey Fortran 8.1.
4695 lf95*)
4696 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4697 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4698 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4699 ;;
4700 pgcc* | pgf77* | pgf90* | pgf95*)
4701 # Portland Group compilers (*not* the Pentium gcc compiler,
4702 # which looks to be a dead project)
4703 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4704 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4705 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4706 ;;
4707 ccc*)
4708 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4709 # All Alpha code is PIC.
4710 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4711 ;;
4712 xl*)
4713 # IBM XL C 8.0/Fortran 10.1 on PPC
4714 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4715 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4716 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4717 ;;
4718 *)
4719 case `$CC -V 2>&1 | sed 5q` in
4720 *Sun\ C*)
4721 # Sun C 5.9
4722 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4723 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4724 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4725 ;;
4726 *Sun\ F*)
4727 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4728 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4729 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4730 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4731 ;;
4732 esac
4733 ;;
4734 esac
4735 ;;
4736
4737 newsos6)
4738 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4739 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4740 ;;
4741
4742 *nto* | *qnx*)
4743 # QNX uses GNU C++, but need to define -shared option too, otherwise
4744 # it will coredump.
4745 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4746 ;;
4747
4748 osf3* | osf4* | osf5*)
4749 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4750 # All OSF/1 code is PIC.
4751 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4752 ;;
4753
4754 rdos*)
4755 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4756 ;;
4757
4758 solaris*)
4759 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4760 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4761 case $cc_basename in
4762 f77* | f90* | f95*)
4763 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4764 *)
4765 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4766 esac
4767 ;;
4768
4769 sunos4*)
4770 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4771 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4772 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4773 ;;
4774
4775 sysv4 | sysv4.2uw2* | sysv4.3*)
4776 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4777 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4778 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4779 ;;
4780
4781 sysv4*MP*)
4782 if test -d /usr/nec ;then
4783 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4784 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4785 fi
4786 ;;
4787
4788 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4789 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4790 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4791 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4792 ;;
4793
4794 unicos*)
4795 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4796 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4797 ;;
4798
4799 uts4*)
4800 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4801 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4802 ;;
4803
4804 *)
4805 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4806 ;;
4807 esac
4808 fi
4809])
4810case $host_os in
4811 # For platforms which do not support PIC, -DPIC is meaningless:
4812 *djgpp*)
4813 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4814 ;;
4815 *)
4816 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4817 ;;
4818esac
4819AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4820_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4821 [How to pass a linker flag through the compiler])
4822
4823#
4824# Check to make sure the PIC flag actually works.
4825#
4826if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4827 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4828 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4829 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4830 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4831 "" | " "*) ;;
4832 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4833 esac],
4834 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4835 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4836fi
4837_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4838 [Additional compiler flags for building library objects])
4839
4840#
4841# Check to make sure the static flag actually works.
4842#
4843wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4844_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4845 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4846 $lt_tmp_static_flag,
4847 [],
4848 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4849_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4850 [Compiler flag to prevent dynamic linking])
4851])# _LT_COMPILER_PIC
4852
4853
4854# _LT_LINKER_SHLIBS([TAGNAME])
4855# ----------------------------
4856# See if the linker supports building shared libraries.
4857m4_defun([_LT_LINKER_SHLIBS],
4858[AC_REQUIRE([LT_PATH_LD])dnl
4859AC_REQUIRE([LT_PATH_NM])dnl
4860m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4861m4_require([_LT_DECL_EGREP])dnl
4862m4_require([_LT_DECL_SED])dnl
4863m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4864m4_require([_LT_TAG_COMPILER])dnl
4865AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4866m4_if([$1], [CXX], [
4867 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4868 case $host_os in
4869 aix[[4-9]]*)
4870 # If we're using GNU nm, then we don't want the "-C" option.
4871 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4872 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4873 _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'
4874 else
4875 _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'
4876 fi
4877 ;;
4878 pw32*)
4879 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4880 ;;
4881 cygwin* | mingw* | cegcc*)
4882 _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'
4883 ;;
4884 linux* | k*bsd*-gnu)
4885 _LT_TAGVAR(link_all_deplibs, $1)=no
4886 ;;
4887 *)
4888 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4889 ;;
4890 esac
4891 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4892], [
4893 runpath_var=
4894 _LT_TAGVAR(allow_undefined_flag, $1)=
4895 _LT_TAGVAR(always_export_symbols, $1)=no
4896 _LT_TAGVAR(archive_cmds, $1)=
4897 _LT_TAGVAR(archive_expsym_cmds, $1)=
4898 _LT_TAGVAR(compiler_needs_object, $1)=no
4899 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4900 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4901 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4902 _LT_TAGVAR(hardcode_automatic, $1)=no
4903 _LT_TAGVAR(hardcode_direct, $1)=no
4904 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4905 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4906 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4907 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4908 _LT_TAGVAR(hardcode_minus_L, $1)=no
4909 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4910 _LT_TAGVAR(inherit_rpath, $1)=no
4911 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4912 _LT_TAGVAR(module_cmds, $1)=
4913 _LT_TAGVAR(module_expsym_cmds, $1)=
4914 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4915 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4916 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4917 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4918 # include_expsyms should be a list of space-separated symbols to be *always*
4919 # included in the symbol list
4920 _LT_TAGVAR(include_expsyms, $1)=
4921 # exclude_expsyms can be an extended regexp of symbols to exclude
4922 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4923 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4924 # as well as any symbol that contains `d'.
4925 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4926 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4927 # platforms (ab)use it in PIC code, but their linkers get confused if
4928 # the symbol is explicitly referenced. Since portable code cannot
4929 # rely on this symbol name, it's probably fine to never include it in
4930 # preloaded symbol tables.
4931 # Exclude shared library initialization/finalization symbols.
4932dnl Note also adjust exclude_expsyms for C++ above.
4933 extract_expsyms_cmds=
4934
4935 case $host_os in
4936 cygwin* | mingw* | pw32* | cegcc*)
4937 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4938 # When not using gcc, we currently assume that we are using
4939 # Microsoft Visual C++.
4940 if test "$GCC" != yes; then
4941 with_gnu_ld=no
4942 fi
4943 ;;
4944 interix*)
4945 # we just hope/assume this is gcc and not c89 (= MSVC++)
4946 with_gnu_ld=yes
4947 ;;
4948 openbsd*)
4949 with_gnu_ld=no
4950 ;;
4951 linux* | k*bsd*-gnu)
4952 _LT_TAGVAR(link_all_deplibs, $1)=no
4953 ;;
4954 esac
4955
4956 _LT_TAGVAR(ld_shlibs, $1)=yes
4957 if test "$with_gnu_ld" = yes; then
4958 # If archive_cmds runs LD, not CC, wlarc should be empty
4959 wlarc='${wl}'
4960
4961 # Set some defaults for GNU ld with shared library support. These
4962 # are reset later if shared libraries are not supported. Putting them
4963 # here allows them to be overridden if necessary.
4964 runpath_var=LD_RUN_PATH
4965 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4966 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4967 # ancient GNU ld didn't support --whole-archive et. al.
4968 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4969 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4970 else
4971 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4972 fi
4973 supports_anon_versioning=no
4974 case `$LD -v 2>&1` in
4975 *GNU\ gold*) supports_anon_versioning=yes ;;
4976 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4977 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4978 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4979 *\ 2.11.*) ;; # other 2.11 versions
4980 *) supports_anon_versioning=yes ;;
4981 esac
4982
4983 # See if GNU ld supports shared libraries.
4984 case $host_os in
4985 aix[[3-9]]*)
4986 # On AIX/PPC, the GNU linker is very broken
4987 if test "$host_cpu" != ia64; then
4988 _LT_TAGVAR(ld_shlibs, $1)=no
4989 cat <<_LT_EOF 1>&2
4990
4991*** Warning: the GNU linker, at least up to release 2.9.1, is reported
4992*** to be unable to reliably create shared libraries on AIX.
4993*** Therefore, libtool is disabling shared libraries support. If you
4994*** really care for shared libraries, you may want to modify your PATH
4995*** so that a non-GNU linker is found, and then restart.
4996
4997_LT_EOF
4998 fi
4999 ;;
5000
5001 amigaos*)
5002 case $host_cpu in
5003 powerpc)
5004 # see comment about AmigaOS4 .so support
5005 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5006 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5007 ;;
5008 m68k)
5009 _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)'
5010 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5011 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5012 ;;
5013 esac
5014 ;;
5015
5016 beos*)
5017 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5018 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5019 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5020 # support --undefined. This deserves some investigation. FIXME
5021 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5022 else
5023 _LT_TAGVAR(ld_shlibs, $1)=no
5024 fi
5025 ;;
5026
5027 cygwin* | mingw* | pw32* | cegcc*)
5028 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5029 # as there is no search path for DLLs.
5030 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5031 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5032 _LT_TAGVAR(always_export_symbols, $1)=no
5033 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5034 _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'
5035
5036 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5037 _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'
5038 # If the export-symbols file already is a .def file (1st line
5039 # is EXPORTS), use it as is; otherwise, prepend...
5040 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5041 cp $export_symbols $output_objdir/$soname.def;
5042 else
5043 echo EXPORTS > $output_objdir/$soname.def;
5044 cat $export_symbols >> $output_objdir/$soname.def;
5045 fi~
5046 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5047 else
5048 _LT_TAGVAR(ld_shlibs, $1)=no
5049 fi
5050 ;;
5051
5052 interix[[3-9]]*)
5053 _LT_TAGVAR(hardcode_direct, $1)=no
5054 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5055 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5056 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5057 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5058 # Instead, shared libraries are loaded at an image base (0x10000000 by
5059 # default) and relocated if they conflict, which is a slow very memory
5060 # consuming and fragmenting process. To avoid this, we pick a random,
5061 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5062 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5063 _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'
5064 _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'
5065 ;;
5066
5067 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5068 tmp_diet=no
5069 if test "$host_os" = linux-dietlibc; then
5070 case $cc_basename in
5071 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5072 esac
5073 fi
5074 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5075 && test "$tmp_diet" = no
5076 then
5077 tmp_addflag=
5078 tmp_sharedflag='-shared'
5079 case $cc_basename,$host_cpu in
5080 pgcc*) # Portland Group C compiler
5081 _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'
5082 tmp_addflag=' $pic_flag'
5083 ;;
5084 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
5085 _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'
5086 tmp_addflag=' $pic_flag -Mnomain' ;;
5087 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5088 tmp_addflag=' -i_dynamic' ;;
5089 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5090 tmp_addflag=' -i_dynamic -nofor_main' ;;
5091 ifc* | ifort*) # Intel Fortran compiler
5092 tmp_addflag=' -nofor_main' ;;
5093 lf95*) # Lahey Fortran 8.1
5094 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5095 tmp_sharedflag='--shared' ;;
5096 xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5097 tmp_sharedflag='-qmkshrobj'
5098 tmp_addflag= ;;
5099 esac
5100 case `$CC -V 2>&1 | sed 5q` in
5101 *Sun\ C*) # Sun C 5.9
5102 _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'
5103 _LT_TAGVAR(compiler_needs_object, $1)=yes
5104 tmp_sharedflag='-G' ;;
5105 *Sun\ F*) # Sun Fortran 8.3
5106 tmp_sharedflag='-G' ;;
5107 esac
5108 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5109
5110 if test "x$supports_anon_versioning" = xyes; then
5111 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5112 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5113 echo "local: *; };" >> $output_objdir/$libname.ver~
5114 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5115 fi
5116
5117 case $cc_basename in
5118 xlf*)
5119 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5120 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5121 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5122 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5123 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
5124 if test "x$supports_anon_versioning" = xyes; then
5125 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5126 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5127 echo "local: *; };" >> $output_objdir/$libname.ver~
5128 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5129 fi
5130 ;;
5131 esac
5132 else
5133 _LT_TAGVAR(ld_shlibs, $1)=no
5134 fi
5135 ;;
5136
5137 netbsd* | netbsdelf*-gnu)
5138 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5139 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5140 wlarc=
5141 else
5142 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5143 _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'
5144 fi
5145 ;;
5146
5147 solaris*)
5148 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5149 _LT_TAGVAR(ld_shlibs, $1)=no
5150 cat <<_LT_EOF 1>&2
5151
5152*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5153*** create shared libraries on Solaris systems. Therefore, libtool
5154*** is disabling shared libraries support. We urge you to upgrade GNU
5155*** binutils to release 2.9.1 or newer. Another option is to modify
5156*** your PATH or compiler configuration so that the native linker is
5157*** used, and then restart.
5158
5159_LT_EOF
5160 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5161 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5162 _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'
5163 else
5164 _LT_TAGVAR(ld_shlibs, $1)=no
5165 fi
5166 ;;
5167
5168 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5169 case `$LD -v 2>&1` in
5170 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5171 _LT_TAGVAR(ld_shlibs, $1)=no
5172 cat <<_LT_EOF 1>&2
5173
5174*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5175*** reliably create shared libraries on SCO systems. Therefore, libtool
5176*** is disabling shared libraries support. We urge you to upgrade GNU
5177*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5178*** your PATH or compiler configuration so that the native linker is
5179*** used, and then restart.
5180
5181_LT_EOF
5182 ;;
5183 *)
5184 # For security reasons, it is highly recommended that you always
5185 # use absolute paths for naming shared libraries, and exclude the
5186 # DT_RUNPATH tag from executables and libraries. But doing so
5187 # requires that you compile everything twice, which is a pain.
5188 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5189 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5190 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5191 _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'
5192 else
5193 _LT_TAGVAR(ld_shlibs, $1)=no
5194 fi
5195 ;;
5196 esac
5197 ;;
5198
5199 sunos4*)
5200 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5201 wlarc=
5202 _LT_TAGVAR(hardcode_direct, $1)=yes
5203 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5204 ;;
5205
5206 *)
5207 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5208 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5209 _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'
5210 else
5211 _LT_TAGVAR(ld_shlibs, $1)=no
5212 fi
5213 ;;
5214 esac
5215
5216 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5217 runpath_var=
5218 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5219 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5220 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5221 fi
5222 else
5223 # PORTME fill in a description of your system's linker (not GNU ld)
5224 case $host_os in
5225 aix3*)
5226 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5227 _LT_TAGVAR(always_export_symbols, $1)=yes
5228 _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'
5229 # Note: this linker hardcodes the directories in LIBPATH if there
5230 # are no directories specified by -L.
5231 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5232 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5233 # Neither direct hardcoding nor static linking is supported with a
5234 # broken collect2.
5235 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5236 fi
5237 ;;
5238
5239 aix[[4-9]]*)
5240 if test "$host_cpu" = ia64; then
5241 # On IA64, the linker does run time linking by default, so we don't
5242 # have to do anything special.
5243 aix_use_runtimelinking=no
5244 exp_sym_flag='-Bexport'
5245 no_entry_flag=""
5246 else
5247 # If we're using GNU nm, then we don't want the "-C" option.
5248 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5249 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5250 _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'
5251 else
5252 _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'
5253 fi
5254 aix_use_runtimelinking=no
5255
5256 # Test if we are trying to use run time linking or normal
5257 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5258 # need to do runtime linking.
5259 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5260 for ld_flag in $LDFLAGS; do
5261 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5262 aix_use_runtimelinking=yes
5263 break
5264 fi
5265 done
5266 ;;
5267 esac
5268
5269 exp_sym_flag='-bexport'
5270 no_entry_flag='-bnoentry'
5271 fi
5272
5273 # When large executables or shared objects are built, AIX ld can
5274 # have problems creating the table of contents. If linking a library
5275 # or program results in "error TOC overflow" add -mminimal-toc to
5276 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5277 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5278
5279 _LT_TAGVAR(archive_cmds, $1)=''
5280 _LT_TAGVAR(hardcode_direct, $1)=yes
5281 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5282 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5283 _LT_TAGVAR(link_all_deplibs, $1)=yes
5284 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5285
5286 if test "$GCC" = yes; then
5287 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5288 # We only want to do this on AIX 4.2 and lower, the check
5289 # below for broken collect2 doesn't work under 4.3+
5290 collect2name=`${CC} -print-prog-name=collect2`
5291 if test -f "$collect2name" &&
5292 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5293 then
5294 # We have reworked collect2
5295 :
5296 else
5297 # We have old collect2
5298 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5299 # It fails to find uninstalled libraries when the uninstalled
5300 # path is not listed in the libpath. Setting hardcode_minus_L
5301 # to unsupported forces relinking
5302 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5303 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5304 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5305 fi
5306 ;;
5307 esac
5308 shared_flag='-shared'
5309 if test "$aix_use_runtimelinking" = yes; then
5310 shared_flag="$shared_flag "'${wl}-G'
5311 fi
5312 _LT_TAGVAR(link_all_deplibs, $1)=no
5313 else
5314 # not using gcc
5315 if test "$host_cpu" = ia64; then
5316 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5317 # chokes on -Wl,-G. The following line is correct:
5318 shared_flag='-G'
5319 else
5320 if test "$aix_use_runtimelinking" = yes; then
5321 shared_flag='${wl}-G'
5322 else
5323 shared_flag='${wl}-bM:SRE'
5324 fi
5325 fi
5326 fi
5327
5328 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5329 # It seems that -bexpall does not export symbols beginning with
5330 # underscore (_), so it is better to generate a list of symbols to export.
5331 _LT_TAGVAR(always_export_symbols, $1)=yes
5332 if test "$aix_use_runtimelinking" = yes; then
5333 # Warning - without using the other runtime loading flags (-brtl),
5334 # -berok will link without error, but may produce a broken library.
5335 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5336 # Determine the default libpath from the value encoded in an
5337 # empty executable.
5338 _LT_SYS_MODULE_PATH_AIX
5339 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5340 _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"
5341 else
5342 if test "$host_cpu" = ia64; then
5343 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5344 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5345 _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"
5346 else
5347 # Determine the default libpath from the value encoded in an
5348 # empty executable.
5349 _LT_SYS_MODULE_PATH_AIX
5350 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5351 # Warning - without using the other run time loading flags,
5352 # -berok will link without error, but may produce a broken library.
5353 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5354 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5355 # Exported symbols can be pulled into shared objects from archives
5356 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5357 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5358 # This is similar to how AIX traditionally builds its shared libraries.
5359 _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'
5360 fi
5361 fi
5362 ;;
5363
5364 amigaos*)
5365 case $host_cpu in
5366 powerpc)
5367 # see comment about AmigaOS4 .so support
5368 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5369 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5370 ;;
5371 m68k)
5372 _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)'
5373 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5374 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5375 ;;
5376 esac
5377 ;;
5378
5379 bsdi[[45]]*)
5380 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5381 ;;
5382
5383 cygwin* | mingw* | pw32* | cegcc*)
5384 # When not using gcc, we currently assume that we are using
5385 # Microsoft Visual C++.
5386 # hardcode_libdir_flag_spec is actually meaningless, as there is
5387 # no search path for DLLs.
5388 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5389 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5390 # Tell ltmain to make .lib files, not .a files.
5391 libext=lib
5392 # Tell ltmain to make .dll files, not .so files.
5393 shrext_cmds=".dll"
5394 # FIXME: Setting linknames here is a bad hack.
5395 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5396 # The linker will automatically build a .lib file if we build a DLL.
5397 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5398 # FIXME: Should let the user specify the lib program.
5399 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5400 _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5401 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5402 ;;
5403
5404 darwin* | rhapsody*)
5405 _LT_DARWIN_LINKER_FEATURES($1)
5406 ;;
5407
5408 dgux*)
5409 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5410 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5411 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5412 ;;
5413
5414 freebsd1*)
5415 _LT_TAGVAR(ld_shlibs, $1)=no
5416 ;;
5417
5418 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5419 # support. Future versions do this automatically, but an explicit c++rt0.o
5420 # does not break anything, and helps significantly (at the cost of a little
5421 # extra space).
5422 freebsd2.2*)
5423 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5424 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5425 _LT_TAGVAR(hardcode_direct, $1)=yes
5426 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5427 ;;
5428
5429 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5430 freebsd2*)
5431 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5432 _LT_TAGVAR(hardcode_direct, $1)=yes
5433 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5434 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5435 ;;
5436
5437 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5438 freebsd* | dragonfly*)
5439 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5440 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5441 _LT_TAGVAR(hardcode_direct, $1)=yes
5442 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5443 ;;
5444
5445 hpux9*)
5446 if test "$GCC" = yes; then
5447 _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'
5448 else
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches