19682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall##############################################################################
29682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Based on libtool-2.2.6a
39682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
49682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#
59682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
69682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#                 2006, 2007, 2008 Free Software Foundation, Inc.
79682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#   Written by Gordon Matzigkeit, 1996
89682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#
99682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# This file is free software; the Free Software Foundation gives
109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# unlimited permission to copy and/or distribute it, with or without
119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# modifications, as long as this notice is preserved.
129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_COPYING], [dnl
149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#                 2006, 2007, 2008 Free Software Foundation, Inc.
169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#   Written by Gordon Matzigkeit, 1996
179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#
189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#   This file is part of GNU Libtool.
199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#
209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# GNU Libtool is free software; you can redistribute it and/or
219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# modify it under the terms of the GNU General Public License as
229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# published by the Free Software Foundation; either version 2 of
239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# the License, or (at your option) any later version.
249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#
259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# As a special exception to the GNU General Public License,
269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# if you distribute this file as part of a program or library that
279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# is built using GNU Libtool, you may include this file under the
289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# same distribution terms that you use for the rest of that program.
299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#
309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# GNU Libtool is distributed in the hope that it will be useful,
319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# but WITHOUT ANY WARRANTY; without even the implied warranty of
329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# GNU General Public License for more details.
349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#
359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# You should have received a copy of the GNU General Public License
369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# along with GNU Libtool; see the file COPYING.  If not, a copy
379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# obtained by writing to the Free Software Foundation, Inc.,
399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# serial 56 LT_INIT
439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_PREREQ(VERSION)
469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------
479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Complain and exit if this libtool version is less that VERSION.
489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([LT_PREREQ],
499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       [m4_default([$3],
519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		   [m4_fatal([Libtool version $1 or higher is required],
529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		             63)])],
539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       [$2])])
549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_CHECK_BUILDDIR
579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------
589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Complain if the absolute build directory name contains unusual characters
599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_CHECK_BUILDDIR],
609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[case `pwd` in
619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *\ * | *\	*)
629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_INIT([OPTIONS])
689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------
699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LT_INIT],
709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_BEFORE([$0], [LT_LANG])dnl
729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_BEFORE([$0], [LT_OUTPUT])dnl
739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_BEFORE([$0], [LTDL_INIT])dnl
749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_CHECK_BUILDDIR])dnl
759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl Autoconf doesn't catch unexpanded LT_ macros by default:
779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl unless we require an AC_DEFUNed macro:
819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([LTOPTIONS_VERSION])dnl
829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([LTSUGAR_VERSION])dnl
839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([LTVERSION_VERSION])dnl
849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([LTOBSOLETE_VERSION])dnl
859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_PROG_LTMAIN])dnl
869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl Parse OPTIONS
889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_SET_OPTIONS([$0], [$1])
899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# This can be used to rebuild libtool when needed
919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLIBTOOL_DEPS="$ltmain"
929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Always use our own libtool.
949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLIBTOOL='$(SHELL) $(top_builddir)/libtool'
959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST(LIBTOOL)dnl
969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_SETUP
989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Only expand once:
1009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([LT_INIT])
1019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LT_INIT
1029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old names:
1049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
1079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_CC_BASENAME(CC)
1129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -------------------
1139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_CC_BASENAME],
1159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[for cc_temp in $1""; do
1169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $cc_temp in
1179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    \-*) ;;
1209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *) break;;
1219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
1229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldone
1239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
1259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_FILEUTILS_DEFAULTS
1289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------------
1299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# It is okay to use these file commands and assume they have been set
1309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_FILEUTILS_DEFAULTS],
1329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[: ${CP="cp -f"}
1339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall: ${MV="mv -f"}
1349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall: ${RM="rm -f"}
1359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_FILEUTILS_DEFAULTS
1369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_SETUP
1399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ---------
1409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_SETUP],
1419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([AC_CANONICAL_BUILD])dnl
1439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [host_alias], [0], [The host system])dnl
1449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [host], [0])dnl
1459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [host_os], [0])dnl
1469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl
1479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [build_alias], [0], [The build system])dnl
1489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [build], [0])dnl
1499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [build_os], [0])dnl
1509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl
1519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([AC_PROG_CC])dnl
1529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([LT_PATH_LD])dnl
1539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([LT_PATH_NM])dnl
1549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl
1559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([AC_PROG_LN_S])dnl
1569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$LN_S" && LN_S="ln -s"
1579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl
1599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([LT_CMD_MAX_LEN])dnl
1609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl
1639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_CHECK_SHELL_FEATURES])dnl
1659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_CMD_RELOAD])dnl
1669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_CHECK_MAGIC_METHOD])dnl
1679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_CMD_OLD_ARCHIVE])dnl
1689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_CONFIG_LIBTOOL_INIT([
1719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# See if we are running on zsh, and set the options which allow our
1729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# commands through without removal of \ escapes INIT.
1739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n "\${ZSH_VERSION+set}" ; then
1749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   setopt NO_GLOB_SUBST
1759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
1769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
1779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n "${ZSH_VERSION+set}" ; then
1789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   setopt NO_GLOB_SUBST
1799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
1809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_CHECK_OBJDIR
1829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_TAG_COMPILER])dnl
1849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_PROG_ECHO_BACKSLASH
1859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase $host_os in
1879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallaix3*)
1889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # AIX sometimes has problems with the GCC collect2 program.  For some
1899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # reason, if we set the COLLECT_NAMES environment variable, the problems
1909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # vanish in a puff of smoke.
1919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "X${COLLECT_NAMES+set}" != Xset; then
1929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    COLLECT_NAMES=
1939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    export COLLECT_NAMES
1949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
1959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
1969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
1979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Sed substitution that helps us do robust quoting.  It backslashifies
1999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# metacharacters that are still active within double-quoted strings.
2009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Same as above, but do not quote variable references.
2039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
2049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Sed substitution to delay expansion of an escaped shell variable in a
2069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# double_quote_subst'ed string.
2079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Sed substitution to delay expansion of an escaped single quote.
2109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Sed substitution to avoid accidental globbing in evaled expressions
2139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallno_glob_subst='s/\*/\\\*/g'
2149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Global variables:
2169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallofile=libtool
2179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcan_build_shared=yes
2189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# All known linkers require a `.a' archive for static linking (except MSVC,
2209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# which needs '.lib').
2219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllibext=a
2229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallwith_gnu_ld="$lt_cv_prog_gnu_ld"
2249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallold_CC="$CC"
2269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallold_CFLAGS="$CFLAGS"
2279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Set sane defaults for various variables
2299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$CC" && CC=cc
2309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$LTCC" && LTCC=$CC
2319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$LD" && LD=ld
2339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$ac_objext" && ac_objext=o
2349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_CC_BASENAME([$compiler])
2369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Only perform the check for file, if the check method requires it
2389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$MAGIC_CMD" && MAGIC_CMD=file
2399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase $deplibs_check_method in
2409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfile_magic*)
2419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_PATH_MAGIC
2439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
2449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
2459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
2469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Use C for the default configuration in the libtool script
2489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLT_SUPPORTED_TAG([CC])
2499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_LANG_C_CONFIG
2509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_LANG_DEFAULT_CONFIG
2519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_CONFIG_COMMANDS
2529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_SETUP
2539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_PROG_LTMAIN
2569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ---------------
2579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Note that this code is called both from `configure', and `config.status'
2589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# `config.status' has no value for ac_aux_dir unless we are using Automake,
2609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# so we pass a copy along to make sure it has a sensible value anyway.
2619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_PROG_LTMAIN],
2629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallltmain="$ac_aux_dir/ltmain.sh"
2659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_PROG_LTMAIN
2669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## ------------------------------------- ##
2699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## Accumulate code for creating libtool. ##
2709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## ------------------------------------- ##
2719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# So that we can recreate a full libtool script including additional
2739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# in macros and then make a single call at the end using the `libtool'
2759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# label.
2769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------------------------------
2809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_CONFIG_LIBTOOL_INIT],
2829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_ifval([$1],
2839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
2849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                     [$1
2859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])])])
2869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Initialize.
2889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_OUTPUT_LIBTOOL_INIT])
2899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_CONFIG_LIBTOOL([COMMANDS])
2929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------------------
2939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_CONFIG_LIBTOOL],
2959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_ifval([$1],
2969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
2979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                     [$1
2989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])])])
2999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Initialize.
3019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
3029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
3059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -----------------------------------------------------
3069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_CONFIG_SAVE_COMMANDS],
3079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[_LT_CONFIG_LIBTOOL([$1])
3089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_CONFIG_LIBTOOL_INIT([$2])
3099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
3109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_FORMAT_COMMENT([COMMENT])
3139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -----------------------------
3149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Add leading comment marks to the start of each line, and a trailing
3159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# full-stop to the whole comment if one is not present already.
3169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_FORMAT_COMMENT],
3179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_ifval([$1], [
3189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
3199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
3209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall)])
3219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## ------------------------ ##
3259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## FIXME: Eliminate VARNAME ##
3269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## ------------------------ ##
3279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
3309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -------------------------------------------------------------------
3319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# CONFIGNAME is the name given to the value in the libtool script.
3329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# VARNAME is the (base) name used in the configure script.
3339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
3349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# VARNAME.  Any other value will be used directly.
3359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_DECL],
3369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
3379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
3389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[m4_ifval([$1], [$1], [$2])])
3399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
3409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    m4_ifval([$4],
3419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
3429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_dict_add_subkey([lt_decl_dict], [$2],
3439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[tagged?], [m4_ifval([$5], [yes], [no])])])
3449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
3459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
3489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# --------------------------------------------------------
3499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
3509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
3539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------------------------------------
3549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([lt_decl_tag_varnames],
3559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[_lt_decl_filter([tagged?], [yes], $@)])
3569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
3599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ---------------------------------------------------------
3609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_lt_decl_filter],
3619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_case([$#],
3629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [0], [m4_fatal([$0: too few arguments: $#])],
3639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [1], [m4_fatal([$0: too few arguments: $#: $1])],
3649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
3659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
3669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
3679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
3689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
3719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# --------------------------------------------------
3729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([lt_decl_quote_varnames],
3739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[_lt_decl_filter([value], [1], $@)])
3749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
3779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ---------------------------------------------------
3789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([lt_decl_dquote_varnames],
3799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[_lt_decl_filter([value], [2], $@)])
3809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
3839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ---------------------------------------------------
3849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([lt_decl_varnames_tagged],
3859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_assert([$# <= 2])dnl
3869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_$0(m4_quote(m4_default([$1], [[, ]])),
3879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
3889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
3899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_lt_decl_varnames_tagged],
3909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
3919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
3939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
3949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------------------------------------
3959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([lt_decl_all_varnames],
3969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[_$0(m4_quote(m4_default([$1], [[, ]])),
3979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     m4_if([$2], [],
3989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   m4_quote(lt_decl_varnames),
3999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	m4_quote(m4_shift($@))))[]dnl
4009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
4019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_lt_decl_all_varnames],
4029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[lt_join($@, lt_decl_varnames_tagged([$1],
4039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
4049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
4059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
4069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
4079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_CONFIG_STATUS_DECLARE([VARNAME])
4089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------------------------
4099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Quote a variable value, and forward it to `config.status' so that its
4109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# declaration there will have the same value as in `configure'.  VARNAME
4119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# must have a single quote delimited value for this to work.
4129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_CONFIG_STATUS_DECLARE],
4139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
4149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
4159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
4169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_CONFIG_STATUS_DECLARATIONS
4179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------------------
4189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# We delimit libtool config variables with single quotes, so when
4199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# we write them to config.status, we have to be sure to quote all
4209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# embedded single quotes properly.  In configure, this macro expands
4219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
4229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#
4239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
4249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
4259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
4269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
4279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
4289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
4299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_LIBTOOL_TAGS
4309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------
4319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Output comment and list of tags supported by the script
4329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_LIBTOOL_TAGS],
4339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
4349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallavailable_tags="_LT_TAGS"dnl
4359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
4369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
4379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
4389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
4399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -----------------------------------
4409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Extract the dictionary values for VARNAME (optionally with TAG) and
4419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# expand to a commented shell variable setting:
4429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#
4439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#    # Some comment about what VAR is for.
4449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#    visible_name=$lt_internal_name
4459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_LIBTOOL_DECLARE],
4469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
4479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall					   [description])))[]dnl
4489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_pushdef([_libtool_name],
4499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
4509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
4519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [0], [_libtool_name=[$]$1],
4529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [1], [_libtool_name=$lt_[]$1],
4539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [2], [_libtool_name=$lt_[]$1],
4549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
4559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
4569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
4579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
4589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
4599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_LIBTOOL_CONFIG_VARS
4609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -----------------------
4619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Produce commented declarations of non-tagged libtool config variables
4629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
4639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
4649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# section) are produced by _LT_LIBTOOL_TAG_VARS.
4659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_LIBTOOL_CONFIG_VARS],
4669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_foreach([_lt_var],
4679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
4689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
4699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
4709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
4719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_LIBTOOL_TAG_VARS(TAG)
4729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -------------------------
4739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_LIBTOOL_TAG_VARS],
4749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
4759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
4769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
4779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
4789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_TAGVAR(VARNAME, [TAGNAME])
4799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------------------
4809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
4819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
4829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
4839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_CONFIG_COMMANDS
4849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -------------------
4859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
4869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# variables for single and double quote escaping we saved from calls
4879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# to _LT_DECL, we can put quote escaped variables declarations
4889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# into `config.status', and then the shell code to quote escape them in
4899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# for loops in `config.status'.  Finally, any additional code accumulated
4909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
4919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_CONFIG_COMMANDS],
4929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_PROVIDE_IFELSE([LT_OUTPUT],
4939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	dnl If the libtool generation code has been placed in $CONFIG_LT,
4949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	dnl instead of duplicating it all over again into config.status,
4959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	dnl then we will have config.status run $CONFIG_LT later, so it
4969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	dnl needs to know what name is stored there:
4979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        [AC_CONFIG_COMMANDS([libtool],
4989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
4999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    dnl If the libtool generation code is destined for config.status,
5009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    dnl expand the accumulated commands and init code now:
5019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [AC_CONFIG_COMMANDS([libtool],
5029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
5039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])#_LT_CONFIG_COMMANDS
5049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
5059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
5069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Initialize.
5079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
5089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[
5099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
5109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# The HP-UX ksh and POSIX shell print the target directory to stdout
5119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# if CDPATH is set.
5129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
5149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsed_quote_subst='$sed_quote_subst'
5159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldouble_quote_subst='$double_quote_subst'
5169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldelay_variable_subst='$delay_variable_subst'
5179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_CONFIG_STATUS_DECLARATIONS
5189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLTCC='$LTCC'
5199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLTCFLAGS='$LTCFLAGS'
5209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcompiler='$compiler_DEFAULT'
5219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
5229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Quote evaled strings.
5239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfor var in lt_decl_all_varnames([[ \
5249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall]], lt_decl_quote_varnames); do
5259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
5269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *[[\\\\\\\`\\"\\\$]]*)
5279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
5289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
5299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *)
5309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
5329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
5339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldone
5349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
5359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Double-quote double-evaled strings.
5369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfor var in lt_decl_all_varnames([[ \
5379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall]], lt_decl_dquote_varnames); do
5389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
5399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *[[\\\\\\\`\\"\\\$]]*)
5409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
5419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
5429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *)
5439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
5459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
5469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldone
5479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
5489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Fix-up fallback echo if it was mangled by the above quoting rules.
5499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase \$lt_ECHO in
5509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*'\\\[$]0 --fallback-echo"')dnl "
5519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
5529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
5539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
5549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
5559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_OUTPUT_LIBTOOL_INIT
5569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
5579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
5589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
5599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_OUTPUT
5609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ---------
5619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# This macro allows early generation of the libtool script (before
5629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# AC_OUTPUT is called), incase it is used in configure for compilation
5639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# tests.
5649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LT_OUTPUT],
5659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[: ${CONFIG_LT=./config.lt}
5669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_NOTICE([creating $CONFIG_LT])
5679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcat >"$CONFIG_LT" <<_LTEOF
5689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#! $SHELL
5699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Generated by $as_me.
5709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Run this file to recreate a libtool stub with the current configuration.
5719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
5729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_cl_silent=false
5739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallSHELL=\${CONFIG_SHELL-$SHELL}
5749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LTEOF
5759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
5769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcat >>"$CONFIG_LT" <<\_LTEOF
5779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAS_SHELL_SANITIZE
5789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_AS_PREPARE
5799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
5809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallexec AS_MESSAGE_FD>&1
5819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallexec AS_MESSAGE_LOG_FD>>config.log
5829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
5839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  echo
5849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AS_BOX([Running $as_me.])
5859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} >&AS_MESSAGE_LOG_FD
5869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
5879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_cl_help="\
5889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall\`$as_me' creates a local libtool stub from the current configuration,
5899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfor use in further configure time tests before the real libtool is
5909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallgenerated.
5919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
5929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallUsage: $[0] [[OPTIONS]]
5939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
5949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  -h, --help      print this help, then exit
5959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  -V, --version   print version number, then exit
5969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  -q, --quiet     do not print progress messages
5979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  -d, --debug     don't remove temporary files
5989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
5999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallReport bugs to <bug-libtool@gnu.org>."
6009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
6019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_cl_version="\
6029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
6039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
6049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallconfigured by $[0], generated by m4_PACKAGE_STRING.
6059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
6069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallCopyright (C) 2008 Free Software Foundation, Inc.
6079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallThis config.lt script is free software; the Free Software Foundation
6089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallgives unlimited permision to copy, distribute and modify it."
6099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
6109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallwhile test $[#] != 0
6119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldo
6129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $[1] in
6139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    --version | --v* | -V )
6149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      echo "$lt_cl_version"; exit 0 ;;
6159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    --help | --h* | -h )
6169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      echo "$lt_cl_help"; exit 0 ;;
6179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    --debug | --d* | -d )
6189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      debug=: ;;
6199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    --quiet | --q* | --silent | --s* | -q )
6209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_cl_silent=: ;;
6219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
6229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    -*) AC_MSG_ERROR([unrecognized option: $[1]
6239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallTry \`$[0] --help' for more information.]) ;;
6249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
6259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *) AC_MSG_ERROR([unrecognized argument: $[1]
6269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallTry \`$[0] --help' for more information.]) ;;
6279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
6289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shift
6299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldone
6309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
6319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif $lt_cl_silent; then
6329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  exec AS_MESSAGE_FD>/dev/null
6339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
6349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LTEOF
6359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
6369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcat >>"$CONFIG_LT" <<_LTEOF
6379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
6389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LTEOF
6399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
6409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcat >>"$CONFIG_LT" <<\_LTEOF
6419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_NOTICE([creating $ofile])
6429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_OUTPUT_LIBTOOL_COMMANDS
6439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAS_EXIT(0)
6449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LTEOF
6459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallchmod +x "$CONFIG_LT"
6469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
6479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# configure is writing to config.log, but config.lt does its own redirection,
6489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# appending to config.log, which fails on DOS, as config.log is still kept
6499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# open by configure.  Here we exec the FD to /dev/null, effectively closing
6509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# config.log, so it can be properly (re)opened and appended to by config.lt.
6519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "$no_create" != yes; then
6529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cl_success=:
6539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  test "$silent" = yes &&
6549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_config_lt_args="$lt_config_lt_args --quiet"
6559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  exec AS_MESSAGE_LOG_FD>/dev/null
6569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
6579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  exec AS_MESSAGE_LOG_FD>>config.log
6589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  $lt_cl_success || AS_EXIT(1)
6599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
6609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LT_OUTPUT
6619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
6629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
6639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_CONFIG(TAG)
6649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ---------------
6659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# If TAG is the built-in tag, create an initial libtool script with a
6669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# default configuration from the untagged config vars.  Otherwise add code
6679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# to config.status for appending the configuration named by TAG from the
6689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# matching tagged config vars.
6699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_CONFIG],
6709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_CONFIG_SAVE_COMMANDS([
6729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
6739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  m4_if(_LT_TAG, [C], [
6749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # See if we are running on zsh, and set the options which allow our
6759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # commands through without removal of \ escapes.
6769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test -n "${ZSH_VERSION+set}" ; then
6779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      setopt NO_GLOB_SUBST
6789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
6799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
6809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    cfgfile="${ofile}T"
6819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
6829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    $RM "$cfgfile"
6839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
6849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    cat <<_LT_EOF >> "$cfgfile"
6859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#! $SHELL
6869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
6879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
6889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
6899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# NOTE: Changes made to this file will be lost: look at ltmain.sh.
6919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#
6929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_COPYING
6939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_LIBTOOL_TAGS
6949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
6959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ### BEGIN LIBTOOL CONFIG
6969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_LIBTOOL_CONFIG_VARS
6979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_LIBTOOL_TAG_VARS
6989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ### END LIBTOOL CONFIG
6999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
7009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
7019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
7029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $host_os in
7039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  aix3*)
7049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    cat <<\_LT_EOF >> "$cfgfile"
7059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# AIX sometimes has problems with the GCC collect2 program.  For some
7069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# reason, if we set the COLLECT_NAMES environment variable, the problems
7079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# vanish in a puff of smoke.
7089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "X${COLLECT_NAMES+set}" != Xset; then
7099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  COLLECT_NAMES=
7109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  export COLLECT_NAMES
7119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
7129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
7139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
7149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
7159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
7169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_PROG_LTMAIN
7179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
7189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # We use sed instead of cat because bash on DJGPP gets confused if
7199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # text mode, it properly converts lines to CR/LF.  This bash problem
7219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # is reportedly fixed, but why not run on old versions too?
7229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
7239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    || (rm -f "$cfgfile"; exit 1)
7249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
7259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_PROG_XSI_SHELLFNS
7269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
7279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
7289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    || (rm -f "$cfgfile"; exit 1)
7299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
7309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  mv -f "$cfgfile" "$ofile" ||
7319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
7329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  chmod +x "$ofile"
7339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall],
7349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[cat <<_LT_EOF >> "$ofile"
7359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
7369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
7379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl in a comment (ie after a #).
7389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ### BEGIN LIBTOOL TAG CONFIG: $1
7399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_LIBTOOL_TAG_VARS(_LT_TAG)
7409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ### END LIBTOOL TAG CONFIG: $1
7419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
7429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])dnl /m4_if
7439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall],
7449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_if([$1], [], [
7459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    PACKAGE='$PACKAGE'
7469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    VERSION='$VERSION'
7479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    TIMESTAMP='$TIMESTAMP'
7489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    RM='$RM'
7499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ofile='$ofile'], [])
7509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])dnl /_LT_CONFIG_SAVE_COMMANDS
7519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_CONFIG
7529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
7539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
7549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_SUPPORTED_TAG(TAG)
7559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ---------------------
7569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Trace this macro to discover what tags are supported by the libtool
7579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# --tag option, using:
7589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
7599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LT_SUPPORTED_TAG], [])
7609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
7619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
7629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# C support is built-in for now
7639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_LANG_C_enabled], [])
7649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_TAGS], [])
7659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
7669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
7679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_LANG(LANG)
7689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -------------
7699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Enable libtool support for the given language if not already enabled.
7709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LT_LANG],
7719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_BEFORE([$0], [LT_OUTPUT])dnl
7729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_case([$1],
7739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [C],			[_LT_LANG(C)],
7749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [C++],		[_LT_LANG(CXX)],
7759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [Java],		[_LT_LANG(GCJ)],
7769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [Fortran 77],		[_LT_LANG(F77)],
7779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [Fortran],		[_LT_LANG(FC)],
7789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [Windows Resource],	[_LT_LANG(RC)],
7799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
7809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [_LT_LANG($1)],
7819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [m4_fatal([$0: unsupported language: "$1"])])])dnl
7829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LT_LANG
7839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
7849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
7859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_LANG(LANGNAME)
7869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------
7879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_LANG],
7889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_ifdef([_LT_LANG_]$1[_enabled], [],
7899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [LT_SUPPORTED_TAG([$1])dnl
7909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  m4_append([_LT_TAGS], [$1 ])dnl
7919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  m4_define([_LT_LANG_]$1[_enabled], [])dnl
7929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_LANG_$1_CONFIG($1)])dnl
7939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_LANG
7949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
7959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
7969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_LANG_DEFAULT_CONFIG
7979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -----------------------
7989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_LANG_DEFAULT_CONFIG],
7999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_PROVIDE_IFELSE([AC_PROG_CXX],
8009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [LT_LANG(CXX)],
8019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
8029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
8039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_PROVIDE_IFELSE([AC_PROG_F77],
8049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [LT_LANG(F77)],
8059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
8069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
8079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_PROVIDE_IFELSE([AC_PROG_FC],
8089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [LT_LANG(FC)],
8099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
8109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
8119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
8129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl pulling things in needlessly.
8139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_PROVIDE_IFELSE([AC_PROG_GCJ],
8149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [LT_LANG(GCJ)],
8159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
8169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [LT_LANG(GCJ)],
8179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
8189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      [LT_LANG(GCJ)],
8199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      [m4_ifdef([AC_PROG_GCJ],
8209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
8219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       m4_ifdef([A][M_PROG_GCJ],
8229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
8239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       m4_ifdef([LT_PROG_GCJ],
8249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
8259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
8269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_PROVIDE_IFELSE([LT_PROG_RC],
8279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [LT_LANG(RC)],
8289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
8299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_LANG_DEFAULT_CONFIG
8309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
8319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Obsolete macros:
8329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
8339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
8349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
8359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
8369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
8379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LIBTOOL_CXX], [])
8389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LIBTOOL_F77], [])
8399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LIBTOOL_FC], [])
8409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
8419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
8429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
8439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_TAG_COMPILER
8449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------
8459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_TAG_COMPILER],
8469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_REQUIRE([AC_PROG_CC])dnl
8479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
8489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
8499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
8509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
8519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
8529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
8539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# If no C compiler was specified, use CC.
8549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLTCC=${LTCC-"$CC"}
8559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
8569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# If no C compiler flags were specified, use CFLAGS.
8579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
8599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Allow CC to be a program name with arguments.
8609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcompiler=$CC
8619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_TAG_COMPILER
8629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
8639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
8649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_COMPILER_BOILERPLATE
8659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------------
8669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Check for compiler boilerplate output or warnings with
8679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# the simple compiler test code.
8689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_COMPILER_BOILERPLATE],
8699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_DECL_SED])dnl
8709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallac_outfile=conftest.$ac_objext
8719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallecho "$lt_simple_compile_test_code" >conftest.$ac_ext
8729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halleval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
8739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_lt_compiler_boilerplate=`cat conftest.err`
8749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall$RM conftest*
8759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_COMPILER_BOILERPLATE
8769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
8779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
8789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_LINKER_BOILERPLATE
8799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------------
8809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Check for linker boilerplate output or warnings with
8819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# the simple link test code.
8829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_LINKER_BOILERPLATE],
8839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_DECL_SED])dnl
8849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallac_outfile=conftest.$ac_objext
8859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallecho "$lt_simple_link_test_code" >conftest.$ac_ext
8869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halleval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
8879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_lt_linker_boilerplate=`cat conftest.err`
8889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall$RM -r conftest*
8899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_LINKER_BOILERPLATE
8909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
8919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_REQUIRED_DARWIN_CHECKS
8929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -------------------------
8939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
8949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $host_os in
8959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    rhapsody* | darwin*)
8969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
8979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
8989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_CHECK_TOOL([LIPO], [lipo], [:])
8999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_CHECK_TOOL([OTOOL], [otool], [:])
9009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
9019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_DECL([], [DSYMUTIL], [1],
9029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
9039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_DECL([], [NMEDIT], [1],
9049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      [Tool to change global to local symbols on Mac OS X])
9059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_DECL([], [LIPO], [1],
9069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      [Tool to manipulate fat objects and archives on Mac OS X])
9079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_DECL([], [OTOOL], [1],
9089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
9099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_DECL([], [OTOOL64], [1],
9109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
9119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
9129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
9139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      [lt_cv_apple_cc_single_mod=no
9149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test -z "${LT_MULTI_MODULE}"; then
9159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# By default we will add the -single_module flag. You can override
9169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# by either setting the environment variable LT_MULTI_MODULE
9179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# non-empty at configure time, or by adding -multi_module to the
9189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# link flags.
9199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	rm -rf libconftest.dylib*
9209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	echo "int foo(void){return 1;}" > conftest.c
9219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
9239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
9259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _lt_result=$?
9269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
9279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  lt_cv_apple_cc_single_mod=yes
9289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	else
9299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  cat conftest.err >&AS_MESSAGE_LOG_FD
9309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi
9319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	rm -rf libconftest.dylib*
9329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	rm -f conftest.*
9339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi])
9349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
9359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      [lt_cv_ld_exported_symbols_list],
9369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      [lt_cv_ld_exported_symbols_list=no
9379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      save_LDFLAGS=$LDFLAGS
9389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      echo "_main" > conftest.sym
9399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
9409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
9419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[lt_cv_ld_exported_symbols_list=yes],
9429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[lt_cv_ld_exported_symbols_list=no])
9439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	LDFLAGS="$save_LDFLAGS"
9449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ])
9459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $host_os in
9469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    rhapsody* | darwin1.[[012]])
9479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
9489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    darwin1.*)
9499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
9509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    darwin*) # darwin 5.x on
9519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # if running on 10.5 or later, the deployment target defaults
9529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # to the OS version, if on x86, and 10.4, the deployment
9539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # target defaults to 10.4. Don't you love it?
9549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
9559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
9569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
9579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	10.[[012]]*)
9589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
9599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	10.*)
9609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
9619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
9629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
9639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
9649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
9659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _lt_dar_single_mod='$single_module'
9669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
9679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
9689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
9699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    else
9709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
9719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
9729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test "$DSYMUTIL" != ":"; then
9739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _lt_dsymutil='~$DSYMUTIL $lib || :'
9749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    else
9759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _lt_dsymutil=
9769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
9779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
9789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
9799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
9809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
9819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
9829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_DARWIN_LINKER_FEATURES
9839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# --------------------------
9849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Checks for linker and compiler features on darwin
9859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_DARWIN_LINKER_FEATURES],
9869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[
9879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
9889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(hardcode_direct, $1)=no
9909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(hardcode_automatic, $1)=yes
9919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
9929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
9939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(link_all_deplibs, $1)=yes
9949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
9959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $cc_basename in
9969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     ifort*) _lt_dar_can_shared=yes ;;
9979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     *) _lt_dar_can_shared=$GCC ;;
9989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
9999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "$_lt_dar_can_shared" = "yes"; then
10009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    output_verbose_link_cmd=echo
10019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _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}"
10029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
10039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _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}"
10049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _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}"
10059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    m4_if([$1], [CXX],
10069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
10079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _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}"
10089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _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}"
10099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
10109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall],[])
10119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
10129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(ld_shlibs, $1)=no
10139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
10149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
10159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
10169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_SYS_MODULE_PATH_AIX
10179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -----------------------
10189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Links a minimal program and checks the executable
10199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# for the system default hardcoded library path. In most cases,
10209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# this is /usr/lib:/lib, but when the MPI compilers are used
10219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# the location of the communication and MPI libs are included too.
10229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# If we don't find anything, use the default library path according
10239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# to the aix ld manual.
10249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_SYS_MODULE_PATH_AIX],
10259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_DECL_SED])dnl
10269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_LINK_IFELSE(AC_LANG_PROGRAM,[
10279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_aix_libpath_sed='
10289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    /Import File Strings/,/^$/ {
10299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	/^0/ {
10309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    s/^0  *\(.*\)$/\1/
10319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    p
10329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	}
10339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    }'
10349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Check for a 64-bit object if we didn't find anything.
10369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -z "$aix_libpath"; then
10379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi],[])
10399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
10409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_SYS_MODULE_PATH_AIX
10419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
10429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
10439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_SHELL_INIT(ARG)
10449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -------------------
10459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_define([_LT_SHELL_INIT],
10469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[ifdef([AC_DIVERSION_NOTICE],
10479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
10489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 [AC_DIVERT_PUSH(NOTICE)])
10499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall$1
10509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DIVERT_POP
10519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_SHELL_INIT
10529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
10539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
10549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_PROG_ECHO_BACKSLASH
10559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -----------------------
10569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Add some code to the start of the generated configure script which
10579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# will find an echo command which doesn't interpret backslashes.
10589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_PROG_ECHO_BACKSLASH],
10599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[_LT_SHELL_INIT([
10609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Check that we are running under the correct shell.
10619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallSHELL=${CONFIG_SHELL-/bin/sh}
10629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
10639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase X$lt_ECHO in
10649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallX*--fallback-echo)
10659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Remove one level of quotation (which was required for Make).
10669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
10679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
10689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
10699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
10709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallECHO=${lt_ECHO-echo}
10719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "X[$]1" = X--no-reexec; then
10729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Discard the --no-reexec flag, and continue.
10739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shift
10749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelif test "X[$]1" = X--fallback-echo; then
10759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Avoid inline document here, it may be left over
10769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  :
10779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
10789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Yippee, $ECHO works!
10799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  :
10809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
10819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Restart under the correct shell.
10829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
10839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
10849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
10859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "X[$]1" = X--fallback-echo; then
10869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # used as fallback echo
10879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shift
10889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  cat <<_LT_EOF
10899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[$]*
10909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
10919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  exit 0
10929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
10939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
10949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# The HP-UX ksh and POSIX shell print the target directory to stdout
10959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# if CDPATH is set.
10969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
10979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
10989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -z "$lt_ECHO"; then
10999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "X${echo_test_string+set}" != Xset; then
11009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # find a string as large as possible, as long as the shell can cope with it
11019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
11029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
11039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
11049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
11059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      then
11069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        break
11079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
11089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    done
11099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
11109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
11119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
11129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
11139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     test "X$echo_testing_string" = "X$echo_test_string"; then
11149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    :
11159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
11169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # The Solaris, AIX, and Digital Unix default echo programs unquote
11179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # backslashes.  This makes it impossible to quote backslashes using
11189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    #   echo "$something" | sed 's/\\/\\\\/g'
11199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    #
11209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # So, first we look for a working echo in the user's PATH.
11219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
11229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
11239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    for dir in $PATH /usr/ucb; do
11249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      IFS="$lt_save_ifs"
11259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
11269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
11279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
11289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall         test "X$echo_testing_string" = "X$echo_test_string"; then
11299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ECHO="$dir/echo"
11309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        break
11319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
11329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    done
11339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    IFS="$lt_save_ifs"
11349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
11359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test "X$ECHO" = Xecho; then
11369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # We didn't find a better echo, so look for alternatives.
11379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
11389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
11399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall         test "X$echo_testing_string" = "X$echo_test_string"; then
11409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # This shell has a builtin print -r that does the trick.
11419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ECHO='print -r'
11429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
11439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   test "X$CONFIG_SHELL" != X/bin/ksh; then
11449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # If we have ksh, try running configure again with it.
11459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
11469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        export ORIGINAL_CONFIG_SHELL
11479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        CONFIG_SHELL=/bin/ksh
11489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        export CONFIG_SHELL
11499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
11509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
11519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # Try using printf.
11529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ECHO='printf %s\n'
11539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
11549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
11559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   test "X$echo_testing_string" = "X$echo_test_string"; then
11569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # Cool, printf works
11579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  :
11589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
11599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	     test "X$echo_testing_string" = 'X\t' &&
11609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
11619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	     test "X$echo_testing_string" = "X$echo_test_string"; then
11629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
11639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  export CONFIG_SHELL
11649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  SHELL="$CONFIG_SHELL"
11659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  export SHELL
11669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
11679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
11689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	     test "X$echo_testing_string" = 'X\t' &&
11699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
11709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	     test "X$echo_testing_string" = "X$echo_test_string"; then
11719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
11729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        else
11739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # maybe with a smaller string...
11749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  prev=:
11759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
11769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
11779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
11789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    then
11799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      break
11809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    fi
11819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    prev="$cmd"
11829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  done
11839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
11849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  if test "$prev" != 'sed 50q "[$]0"'; then
11859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    echo_test_string=`eval $prev`
11869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    export echo_test_string
11879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
11889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  else
11899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Oops.  We lost completely, so just stick with echo.
11909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ECHO=echo
11919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  fi
11929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        fi
11939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
11949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
11959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
11969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
11979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
11989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Copy echo and quote the copy suitably for passing to libtool from
11999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# the Makefile, instead of quoting the original, which is used later.
12009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_ECHO=$ECHO
12019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
12029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
12039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
12049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
12059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST(lt_ECHO)
12069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
12079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
12089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [ECHO], [1],
12099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [An echo program that does not interpret backslashes])
12109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_PROG_ECHO_BACKSLASH
12119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
12129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
12139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_ENABLE_LOCK
12149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ---------------
12159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_ENABLE_LOCK],
12169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_ARG_ENABLE([libtool-lock],
12179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [AS_HELP_STRING([--disable-libtool-lock],
12189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [avoid locking (might break parallel builds)])])
12199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
12209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
12219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Some flags need to be propagated to the compiler or linker for good
12229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# libtool support.
12239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase $host in
12249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallia64-*-hpux*)
12259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Find out which ABI we are using.
12269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  echo 'int i;' > conftest.$ac_ext
12279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if AC_TRY_EVAL(ac_compile); then
12289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case `/usr/bin/file conftest.$ac_objext` in
12299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *ELF-32*)
12309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	HPUX_IA64_MODE="32"
12319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
12329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *ELF-64*)
12339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	HPUX_IA64_MODE="64"
12349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
12359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
12369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
12379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  rm -rf conftest*
12389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
12399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*-*-irix6*)
12409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Find out which ABI we are using.
12419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
12429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if AC_TRY_EVAL(ac_compile); then
12439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test "$lt_cv_prog_gnu_ld" = yes; then
12449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case `/usr/bin/file conftest.$ac_objext` in
12459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	*32-bit*)
12469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  LD="${LD-ld} -melf32bsmip"
12479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
12489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	*N32*)
12499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  LD="${LD-ld} -melf32bmipn32"
12509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
12519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	*64-bit*)
12529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  LD="${LD-ld} -melf64bmip"
12539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
12549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
12559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    else
12569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case `/usr/bin/file conftest.$ac_objext` in
12579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	*32-bit*)
12589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  LD="${LD-ld} -32"
12599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
12609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	*N32*)
12619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  LD="${LD-ld} -n32"
12629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
12639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	*64-bit*)
12649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  LD="${LD-ld} -64"
12659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
12669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
12679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
12689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
12699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  rm -rf conftest*
12709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
12719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
12729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
12739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halls390*-*linux*|s390*-*tpf*|sparc*-*linux*)
12749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Find out which ABI we are using.
12759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  echo 'int i;' > conftest.$ac_ext
12769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if AC_TRY_EVAL(ac_compile); then
12779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case `/usr/bin/file conftest.o` in
12789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *32-bit*)
12799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $host in
12809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  x86_64-*kfreebsd*-gnu)
12819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    LD="${LD-ld} -m elf_i386_fbsd"
12829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
12839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  x86_64-*linux*)
12849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    LD="${LD-ld} -m elf_i386"
12859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
12869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ppc64-*linux*|powerpc64-*linux*)
12879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    LD="${LD-ld} -m elf32ppclinux"
12889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
12899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  s390x-*linux*)
12909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    LD="${LD-ld} -m elf_s390"
12919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
12929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  sparc64-*linux*)
12939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    LD="${LD-ld} -m elf32_sparc"
12949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
12959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
12969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
12979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *64-bit*)
12989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $host in
12999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  x86_64-*kfreebsd*-gnu)
13009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    LD="${LD-ld} -m elf_x86_64_fbsd"
13019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
13029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  x86_64-*linux*)
13039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    LD="${LD-ld} -m elf_x86_64"
13049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
13059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ppc*-*linux*|powerpc*-*linux*)
13069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    LD="${LD-ld} -m elf64ppc"
13079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
13089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  s390*-*linux*|s390*-*tpf*)
13099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    LD="${LD-ld} -m elf64_s390"
13109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
13119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  sparc*-*linux*)
13129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    LD="${LD-ld} -m elf64_sparc"
13139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
13149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
13159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
13169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
13179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
13189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  rm -rf conftest*
13199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
13209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
13219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*-*-sco3.2v5*)
13229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
13239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  SAVE_CFLAGS="$CFLAGS"
13249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  CFLAGS="$CFLAGS -belf"
13259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
13269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [AC_LANG_PUSH(C)
13279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
13289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     AC_LANG_POP])
13299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
13309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
13319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    CFLAGS="$SAVE_CFLAGS"
13329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
13339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
13349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsparc*-*solaris*)
13359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Find out which ABI we are using.
13369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  echo 'int i;' > conftest.$ac_ext
13379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if AC_TRY_EVAL(ac_compile); then
13389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case `/usr/bin/file conftest.o` in
13399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *64-bit*)
13409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case $lt_cv_prog_gnu_ld in
13419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      yes*) LD="${LD-ld} -m elf64_sparc" ;;
13429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *)
13439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
13449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  LD="${LD-ld} -64"
13459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi
13469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
13479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
13489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
13499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
13509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
13519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  rm -rf conftest*
13529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
13539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
13549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
13559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallneed_locks="$enable_libtool_lock"
13569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_ENABLE_LOCK
13579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
13589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
13599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_CMD_OLD_ARCHIVE
13609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -------------------
13619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_CMD_OLD_ARCHIVE],
13629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_CHECK_TOOL(AR, ar, false)
13639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$AR" && AR=ar
13649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$AR_FLAGS" && AR_FLAGS=cru
13659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [AR], [1], [The archiver])
13669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [AR_FLAGS], [1])
13679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
13689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CHECK_TOOL(STRIP, strip, :)
13699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$STRIP" && STRIP=:
13709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [STRIP], [1], [A symbol stripping program])
13719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
13729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CHECK_TOOL(RANLIB, ranlib, :)
13739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$RANLIB" && RANLIB=:
13749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [RANLIB], [1],
13759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Commands used to install an old-style archive])
13769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
13779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Determine commands to create old-style static archives.
13789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
13799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallold_postinstall_cmds='chmod 644 $oldlib'
13809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallold_postuninstall_cmds=
13819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
13829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n "$RANLIB"; then
13839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $host_os in
13849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  openbsd*)
13859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
13869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
13879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *)
13889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
13899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
13909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
13919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
13929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
13939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [old_postinstall_cmds], [2])
13949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [old_postuninstall_cmds], [2])
13959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [old_archive_cmds], [2],
13969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Commands used to build an old-style archive])
13979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_CMD_OLD_ARCHIVE
13989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
13999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
14009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
14019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
14029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------------------------------------------------------
14039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Check whether the given compiler option works
14049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([_LT_COMPILER_OPTION],
14059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
14069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_DECL_SED])dnl
14079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CACHE_CHECK([$1], [$2],
14089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [$2=no
14099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
14109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   lt_compiler_flag="$3"
14129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   # Insert the option either (1) after the last *FLAGS variable, or
14139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   # (2) before a word containing "conftest.", or (3) at the end.
14149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   # Note that $ac_compile itself does not contain backslashes and begins
14159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   # with a dollar sign (not a hyphen), so the echo should work correctly.
14169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   # The option is referenced via a variable to avoid confusing sed.
14179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   lt_compile=`echo "$ac_compile" | $SED \
14189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
14209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   -e 's:$: $lt_compiler_flag:'`
14219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
14229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   (eval "$lt_compile" 2>conftest.err)
14239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   ac_status=$?
14249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   cat conftest.err >&AS_MESSAGE_LOG_FD
14259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
14269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   if (exit $ac_status) && test -s "$ac_outfile"; then
14279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     # The compiler can only warn and ignore the option if not recognized
14289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     # So say no if there are warnings other than the usual output.
14299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
14309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
14329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       $2=yes
14339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     fi
14349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   fi
14359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   $RM conftest*
14369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
14379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
14389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test x"[$]$2" = xyes; then
14399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    m4_if([$5], , :, [$5])
14409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
14419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    m4_if([$6], , :, [$6])
14429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
14439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_COMPILER_OPTION
14449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
14459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old name:
14469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
14479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
14489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
14499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
14509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
14519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
14529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#                  [ACTION-SUCCESS], [ACTION-FAILURE])
14539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------------------------------------------
14549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Check whether the given linker option works
14559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([_LT_LINKER_OPTION],
14569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
14579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_DECL_SED])dnl
14589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CACHE_CHECK([$1], [$2],
14599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [$2=no
14609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   save_LDFLAGS="$LDFLAGS"
14619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   LDFLAGS="$LDFLAGS $3"
14629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   echo "$lt_simple_link_test_code" > conftest.$ac_ext
14639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
14649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     # The linker can only warn and ignore the option if not recognized
14659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     # So say no if there are warnings
14669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     if test -s conftest.err; then
14679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       # Append any errors to the config.log.
14689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       cat conftest.err 1>&AS_MESSAGE_LOG_FD
14699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
14709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       if diff conftest.exp conftest.er2 >/dev/null; then
14729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall         $2=yes
14739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       fi
14749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     else
14759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       $2=yes
14769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     fi
14779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   fi
14789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   $RM -r conftest*
14799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   LDFLAGS="$save_LDFLAGS"
14809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
14819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
14829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test x"[$]$2" = xyes; then
14839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    m4_if([$4], , :, [$4])
14849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
14859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    m4_if([$5], , :, [$5])
14869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
14879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_LINKER_OPTION
14889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
14899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old name:
14909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
14919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
14929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
14939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
14949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
14959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_CMD_MAX_LEN
14969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#---------------
14979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LT_CMD_MAX_LEN],
14989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_REQUIRE([AC_CANONICAL_HOST])dnl
14999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# find the maximum length of command line arguments
15009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_CHECKING([the maximum length of command line arguments])
15019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
15029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  i=0
15039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  teststring="ABCD"
15049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
15059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $build_os in
15069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  msdosdjgpp*)
15079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # On DJGPP, this test can blow up pretty badly due to problems in libc
15089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # (any single argument exceeding 2000 bytes causes a buffer overrun
15099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # during glob expansion).  Even if it were fixed, the result of this
15109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # check would be larger than it should be.
15119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
15129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
15139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
15149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  gnu*)
15159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Under GNU Hurd, this test is not required because there is
15169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # no limit to the length of command line arguments.
15179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Libtool will interpret -1 as no limit whatsoever
15189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_sys_max_cmd_len=-1;
15199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
15209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
15219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  cygwin* | mingw* | cegcc*)
15229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # On Win9x/ME, this test blows up -- it succeeds, but takes
15239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # about 5 minutes as the teststring grows exponentially.
15249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Worse, since 9x/ME are not pre-emptively multitasking,
15259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # you end up with a "frozen" computer, even though with patience
15269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # the test eventually succeeds (with a max line length of 256k).
15279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Instead, let's just punt: use the minimum linelength reported by
15289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # all of the supported platforms: 8192 (on NT/2K/XP).
15299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_sys_max_cmd_len=8192;
15309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
15319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
15329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  beos*)
15339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # On BeOS, this test takes a really really long time.
15349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # So we just punt and use a minimum line length of 8192.
15359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_sys_max_cmd_len=8192;
15369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
15379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
15389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  amigaos*)
15399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # On AmigaOS with pdksh, this test takes hours, literally.
15409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # So we just punt and use a minimum line length of 8192.
15419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_sys_max_cmd_len=8192;
15429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
15439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
15449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
15459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # This has been around since 386BSD, at least.  Likely further.
15469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test -x /sbin/sysctl; then
15479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
15489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    elif test -x /usr/sbin/sysctl; then
15499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
15509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    else
15519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
15529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
15539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # And add a safety zone
15549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
15559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
15569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
15579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
15589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  interix*)
15599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # We know the value 262144 and hardcode it with a safety zone (like BSD)
15609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_sys_max_cmd_len=196608
15619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
15629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
15639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  osf*)
15649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
15659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
15669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # nice to cause kernel panics so lets avoid the loop below.
15679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # First set a reasonable default.
15689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_sys_max_cmd_len=16384
15699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    #
15709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test -x /sbin/sysconfig; then
15719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
15729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        *1*) lt_cv_sys_max_cmd_len=-1 ;;
15739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
15749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
15759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
15769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sco3.2v5*)
15779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_sys_max_cmd_len=102400
15789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
15799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sysv5* | sco5v6* | sysv4.2uw2*)
15809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
15819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test -n "$kargmax"; then
15829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
15839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    else
15849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_cv_sys_max_cmd_len=32768
15859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
15869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
15879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *)
15889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
15899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test -n "$lt_cv_sys_max_cmd_len"; then
15909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
15919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
15929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    else
15939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Make teststring a little bigger before we do anything with it.
15949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # a 1K string should be a reasonable start.
15959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      for i in 1 2 3 4 5 6 7 8 ; do
15969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        teststring=$teststring$teststring
15979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      done
15989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
15999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # If test is not a shell built-in, we'll probably end up computing a
16009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # maximum length that is only half of the actual maximum length, but
16019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # we can't tell.
16029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
16039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
16049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      test $i != 17 # 1/2 MB should be enough
16059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      do
16069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        i=`expr $i + 1`
16079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        teststring=$teststring$teststring
16089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      done
16099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Only check the string length outside the loop.
16109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
16119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      teststring=
16129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Add a significant safety factor because C++ compilers can tack on
16139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # massive amounts of additional arguments before passing them to the
16149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # linker.  It appears as though 1/2 is a usable value.
16159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
16169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
16179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
16189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
16199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
16209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n $lt_cv_sys_max_cmd_len ; then
16219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
16229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
16239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_RESULT(none)
16249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
16259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallmax_cmd_len=$lt_cv_sys_max_cmd_len
16269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [max_cmd_len], [0],
16279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [What is the maximum length of a command?])
16289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LT_CMD_MAX_LEN
16299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
16309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old name:
16319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
16329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
16339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
16349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
16359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
16369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_HEADER_DLFCN
16379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------
16389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_HEADER_DLFCN],
16399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
16409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_HEADER_DLFCN
16419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
16429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
16439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
16449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
16459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------------------------------------------------------
16469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_TRY_DLOPEN_SELF],
16479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_HEADER_DLFCN])dnl
16489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "$cross_compiling" = yes; then :
16499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [$4]
16509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
16519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
16529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_status=$lt_dlunknown
16539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  cat > conftest.$ac_ext <<_LT_EOF
16549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[#line __oline__ "configure"
16559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "confdefs.h"
16569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
16579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if HAVE_DLFCN_H
16589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include <dlfcn.h>
16599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif
16609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
16619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include <stdio.h>
16629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
16639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#ifdef RTLD_GLOBAL
16649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#  define LT_DLGLOBAL		RTLD_GLOBAL
16659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#else
16669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#  ifdef DL_GLOBAL
16679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#    define LT_DLGLOBAL		DL_GLOBAL
16689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#  else
16699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#    define LT_DLGLOBAL		0
16709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#  endif
16719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif
16729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
16739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
16749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   find out it does not work in some platform. */
16759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#ifndef LT_DLLAZY_OR_NOW
16769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#  ifdef RTLD_LAZY
16779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
16789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#  else
16799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#    ifdef DL_LAZY
16809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#      define LT_DLLAZY_OR_NOW		DL_LAZY
16819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#    else
16829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#      ifdef RTLD_NOW
16839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#        define LT_DLLAZY_OR_NOW	RTLD_NOW
16849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#      else
16859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#        ifdef DL_NOW
16869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#          define LT_DLLAZY_OR_NOW	DL_NOW
16879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#        else
16889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#          define LT_DLLAZY_OR_NOW	0
16899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#        endif
16909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#      endif
16919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#    endif
16929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#  endif
16939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif
16949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
16959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallvoid fnord() { int i=42;}
16969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallint main ()
16979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
16989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
16999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  int status = $lt_dlunknown;
17009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
17019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if (self)
17029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    {
17039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
17049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
17059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      /* dlclose (self); */
17069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    }
17079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
17089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    puts (dlerror ());
17099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
17109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  return status;
17119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}]
17129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
17139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
17149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
17159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_status=$?
17169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case x$lt_status in
17179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      x$lt_dlno_uscore) $1 ;;
17189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      x$lt_dlneed_uscore) $2 ;;
17199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      x$lt_dlunknown|x*) $3 ;;
17209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
17219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else :
17229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # compilation failed
17239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    $3
17249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
17259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
17269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallrm -fr conftest*
17279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_TRY_DLOPEN_SELF
17289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
17299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
17309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_SYS_DLOPEN_SELF
17319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------
17329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LT_SYS_DLOPEN_SELF],
17339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_HEADER_DLFCN])dnl
17349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "x$enable_dlopen" != xyes; then
17359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  enable_dlopen=unknown
17369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  enable_dlopen_self=unknown
17379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  enable_dlopen_self_static=unknown
17389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
17399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_dlopen=no
17409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_dlopen_libs=
17419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
17429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $host_os in
17439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  beos*)
17449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_dlopen="load_add_on"
17459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_dlopen_libs=
17469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_dlopen_self=yes
17479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
17489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
17499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  mingw* | pw32* | cegcc*)
17509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_dlopen="LoadLibrary"
17519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_dlopen_libs=
17529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
17539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
17549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  cygwin*)
17559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_dlopen="dlopen"
17569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_dlopen_libs=
17579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
17589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
17599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  darwin*)
17609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # if libdl is installed we need to link against it
17619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_CHECK_LIB([dl], [dlopen],
17629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
17639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_dlopen="dyld"
17649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_dlopen_libs=
17659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_dlopen_self=yes
17669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ])
17679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
17689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
17699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *)
17709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_CHECK_FUNC([shl_load],
17719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  [lt_cv_dlopen="shl_load"],
17729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      [AC_CHECK_LIB([dld], [shl_load],
17739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
17749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[AC_CHECK_FUNC([dlopen],
17759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      [lt_cv_dlopen="dlopen"],
17769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  [AC_CHECK_LIB([dl], [dlopen],
17779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
17789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    [AC_CHECK_LIB([svld], [dlopen],
17799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
17809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      [AC_CHECK_LIB([dld], [dld_link],
17819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
17829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      ])
17839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ])
17849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ])
17859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	])
17869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ])
17879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
17889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
17899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
17909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "x$lt_cv_dlopen" != xno; then
17919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    enable_dlopen=yes
17929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
17939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    enable_dlopen=no
17949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
17959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
17969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $lt_cv_dlopen in
17979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dlopen)
17989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    save_CPPFLAGS="$CPPFLAGS"
17999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
18009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
18019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    save_LDFLAGS="$LDFLAGS"
18029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
18039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
18049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    save_LIBS="$LIBS"
18059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    LIBS="$lt_cv_dlopen_libs $LIBS"
18069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
18079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_CACHE_CHECK([whether a program can dlopen itself],
18089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  lt_cv_dlopen_self, [dnl
18099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TRY_DLOPEN_SELF(
18109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
18119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
18129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ])
18139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
18149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test "x$lt_cv_dlopen_self" = xyes; then
18159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
18169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
18179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  lt_cv_dlopen_self_static, [dnl
18189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TRY_DLOPEN_SELF(
18199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
18209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
18219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ])
18229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
18239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
18249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    CPPFLAGS="$save_CPPFLAGS"
18259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    LDFLAGS="$save_LDFLAGS"
18269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    LIBS="$save_LIBS"
18279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
18289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
18299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
18309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $lt_cv_dlopen_self in
18319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
18329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *) enable_dlopen_self=unknown ;;
18339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
18349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
18359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $lt_cv_dlopen_self_static in
18369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
18379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *) enable_dlopen_self_static=unknown ;;
18389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
18399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
18409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([dlopen_support], [enable_dlopen], [0],
18419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 [Whether dlopen is supported])
18429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
18439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 [Whether dlopen of programs is supported])
18449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
18459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 [Whether dlopen of statically linked programs is supported])
18469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LT_SYS_DLOPEN_SELF
18479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
18489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old name:
18499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
18509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
18519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
18529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
18539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
18549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_COMPILER_C_O([TAGNAME])
18559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ---------------------------
18569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Check to see if options -c and -o are simultaneously supported by compiler.
18579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# This macro does not hard code the compiler like AC_PROG_CC_C_O.
18589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_COMPILER_C_O],
18599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_DECL_SED])dnl
18609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_FILEUTILS_DEFAULTS])dnl
18619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_TAG_COMPILER])dnl
18629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
18639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
18649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
18659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   $RM -r conftest 2>/dev/null
18669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   mkdir conftest
18679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   cd conftest
18689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   mkdir out
18699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
18709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
18719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   lt_compiler_flag="-o out/conftest2.$ac_objext"
18729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   # Insert the option either (1) after the last *FLAGS variable, or
18739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   # (2) before a word containing "conftest.", or (3) at the end.
18749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   # Note that $ac_compile itself does not contain backslashes and begins
18759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   # with a dollar sign (not a hyphen), so the echo should work correctly.
18769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   lt_compile=`echo "$ac_compile" | $SED \
18779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
18789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
18799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   -e 's:$: $lt_compiler_flag:'`
18809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
18819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   (eval "$lt_compile" 2>out/conftest.err)
18829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   ac_status=$?
18839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   cat out/conftest.err >&AS_MESSAGE_LOG_FD
18849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
18859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   if (exit $ac_status) && test -s out/conftest2.$ac_objext
18869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   then
18879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     # The compiler can only warn and ignore the option if not recognized
18889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     # So say no if there are warnings
18899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
18909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
18919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
18929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
18939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     fi
18949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   fi
18959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   chmod u+w . 2>&AS_MESSAGE_LOG_FD
18969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   $RM conftest*
18979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   # SGI C++ compiler will create directory out/ii_files/ for
18989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   # template instantiation
18999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
19009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   $RM out/* && rmdir out
19019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   cd ..
19029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   $RM -r conftest
19039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   $RM conftest*
19049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
19059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
19069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[Does compiler simultaneously support -c and -o options?])
19079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_COMPILER_C_O
19089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
19099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
19109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_COMPILER_FILE_LOCKS([TAGNAME])
19119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------------------------
19129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Check to see if we can do hard links to lock some files if needed
19139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_COMPILER_FILE_LOCKS],
19149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_ENABLE_LOCK])dnl
19159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_FILEUTILS_DEFAULTS])dnl
19169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_COMPILER_C_O([$1])
19179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
19189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallhard_links="nottested"
19199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
19209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # do not overwrite the value of need_locks provided by the user
19219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_CHECKING([if we can lock with hard links])
19229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  hard_links=yes
19239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  $RM conftest*
19249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ln conftest.a conftest.b 2>/dev/null && hard_links=no
19259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  touch conftest.a
19269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ln conftest.a conftest.b 2>&5 || hard_links=no
19279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ln conftest.a conftest.b 2>/dev/null && hard_links=no
19289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_RESULT([$hard_links])
19299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "$hard_links" = no; then
19309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
19319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    need_locks=warn
19329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
19339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
19349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_locks=no
19359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
19369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
19379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_COMPILER_FILE_LOCKS
19389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
19399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
19409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_CHECK_OBJDIR
19419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------
19429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_CHECK_OBJDIR],
19439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
19449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[rm -f .libs 2>/dev/null
19459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallmkdir .libs 2>/dev/null
19469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -d .libs; then
19479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_objdir=.libs
19489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
19499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # MS-DOS does not allow filenames that begin with a dot.
19509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_objdir=_libs
19519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
19529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallrmdir .libs 2>/dev/null])
19539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallobjdir=$lt_cv_objdir
19549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [objdir], [0],
19559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall         [The name of the directory that contains temporary libtool files])dnl
19569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_pattern_allow([LT_OBJDIR])dnl
19579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
19589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [Define to the sub-directory in which libtool stores uninstalled libraries.])
19599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_CHECK_OBJDIR
19609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
19619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
19629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
19639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# --------------------------------------
19649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Check hardcoding attributes.
19659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
19669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_MSG_CHECKING([how to hardcode library paths into programs])
19679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_action, $1)=
19689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
19699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
19709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
19719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
19729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # We can hardcode non-existent directories.
19739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
19749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     # If the only mechanism to avoid hardcoding is shlibpath_var, we
19759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     # have to relink, otherwise we might link with an installed library
19769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     # when we should be linking with a yet-to-be-installed one
19779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
19789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
19799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Linking always hardcodes the temporary library directory.
19809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(hardcode_action, $1)=relink
19819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
19829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # We can link without hardcoding, and we can hardcode nonexisting dirs.
19839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(hardcode_action, $1)=immediate
19849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
19859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
19869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # We cannot hardcode anything, or else we can only hardcode existing
19879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # directories.
19889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(hardcode_action, $1)=unsupported
19899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
19909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
19919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
19929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
19939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
19949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Fast installation is not supported
19959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  enable_fast_install=no
19969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelif test "$shlibpath_overrides_runpath" = yes ||
19979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     test "$enable_shared" = no; then
19989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Fast installation is not necessary
19999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  enable_fast_install=needless
20009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
20019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [hardcode_action], [0],
20029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [How to hardcode a shared library path into an executable])
20039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_LINKER_HARDCODE_LIBPATH
20049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
20059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
20069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_CMD_STRIPLIB
20079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------
20089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_CMD_STRIPLIB],
20099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_DECL_EGREP])
20109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallstriplib=
20119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallold_striplib=
20129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_CHECKING([whether stripping libraries is possible])
20139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
20149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
20159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
20169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_RESULT([yes])
20179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
20189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# FIXME - insert some real tests, host_os isn't really good enough
20199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $host_os in
20209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  darwin*)
20219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test -n "$STRIP" ; then
20229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      striplib="$STRIP -x"
20239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      old_striplib="$STRIP -S"
20249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      AC_MSG_RESULT([yes])
20259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    else
20269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      AC_MSG_RESULT([no])
20279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
20289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
20299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *)
20309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_MSG_RESULT([no])
20319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
20329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
20339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
20349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
20359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [striplib], [1])
20369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_CMD_STRIPLIB
20379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
20389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
20399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_SYS_DYNAMIC_LINKER([TAG])
20409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -----------------------------
20419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# PORTME Fill in your ld.so characteristics
20429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_SYS_DYNAMIC_LINKER],
20439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_REQUIRE([AC_CANONICAL_HOST])dnl
20449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_DECL_EGREP])dnl
20459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_FILEUTILS_DEFAULTS])dnl
20469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_DECL_OBJDUMP])dnl
20479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_DECL_SED])dnl
20489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_CHECKING([dynamic linker characteristics])
20499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_if([$1],
20509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[], [
20519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "$GCC" = yes; then
20529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $host_os in
20539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
20549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *) lt_awk_arg="/^libraries:/" ;;
20559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
20569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
20579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
20589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # if the path contains ";" then we assume it to be the separator
20599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # otherwise default to the standard path separator (i.e. ":") - it is
20609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # assumed that no part of a normal pathname contains ";" but that should
20619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # okay in the real world where ";" in dirpaths is itself problematic.
20629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
20639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
20649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
20659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
20669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Ok, now we have the path, separated by spaces, we can step through it
20679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # and add multilib dir if necessary.
20689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_tmp_lt_search_path_spec=
20699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
20709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  for lt_sys_path in $lt_search_path_spec; do
20719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
20729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
20739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    else
20749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      test -d "$lt_sys_path" && \
20759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
20769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
20779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  done
20789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
20799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallBEGIN {RS=" "; FS="/|\n";} {
20809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_foo="";
20819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_count=0;
20829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  for (lt_i = NF; lt_i > 0; lt_i--) {
20839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if ($lt_i != "" && $lt_i != ".") {
20849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if ($lt_i == "..") {
20859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        lt_count++;
20869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      } else {
20879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        if (lt_count == 0) {
20889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          lt_foo="/" $lt_i lt_foo;
20899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        } else {
20909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          lt_count--;
20919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        }
20929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      }
20939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    }
20949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  }
20959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
20969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
20979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}'`
20989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
20999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
21009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
21019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi])
21029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllibrary_names_spec=
21039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllibname_spec='lib$name'
21049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsoname_spec=
21059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallshrext_cmds=".so"
21069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallpostinstall_cmds=
21079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallpostuninstall_cmds=
21089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfinish_cmds=
21099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfinish_eval=
21109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallshlibpath_var=
21119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallshlibpath_overrides_runpath=unknown
21129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallversion_type=none
21139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldynamic_linker="$host_os ld.so"
21149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsys_lib_dlsearch_path_spec="/lib /usr/lib"
21159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallneed_lib_prefix=unknown
21169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallhardcode_into_libs=no
21179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
21189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# when you set need_version to no, make sure it does not cause -set_version
21199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# flags to be left without arguments
21209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallneed_version=unknown
21219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
21229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase $host_os in
21239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallaix3*)
21249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=linux
21259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
21269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LIBPATH
21279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
21289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # AIX 3 has no versioning support, so we append a major version to the name.
21299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  soname_spec='${libname}${release}${shared_ext}$major'
21309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
21319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
21329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallaix[[4-9]]*)
21339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=linux
21349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_lib_prefix=no
21359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_version=no
21369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  hardcode_into_libs=yes
21379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "$host_cpu" = ia64; then
21389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # AIX 5 supports IA64
21399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
21409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    shlibpath_var=LD_LIBRARY_PATH
21419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
21429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # With GCC up to 2.95.x, collect2 would create an import file
21439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # for dependence libraries.  The import file would start with
21449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # the line `#! .'.  This would cause the generated library to
21459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # depend on `.', always an invalid library.  This was fixed in
21469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # development snapshots of GCC prior to 3.0.
21479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $host_os in
21489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      aix4 | aix4.[[01]] | aix4.[[01]].*)
21499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
21509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   echo ' yes '
21519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
21529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	:
21539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
21549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	can_build_shared=no
21559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
21569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
21579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
21589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
21599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # soname into executable. Probably we can add versioning support to
21609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # collect2, so additional links can be useful in future.
21619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test "$aix_use_runtimelinking" = yes; then
21629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
21639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # instead of lib<name>.a to let people know that these are not
21649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # typical AIX shared libraries.
21659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
21669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    else
21679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # We preserve .a as extension for shared libraries through AIX4.2
21689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # and later when we are not doing run time linking.
21699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      library_names_spec='${libname}${release}.a $libname.a'
21709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      soname_spec='${libname}${release}${shared_ext}$major'
21719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
21729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    shlibpath_var=LIBPATH
21739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
21749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
21759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
21769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallamigaos*)
21779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $host_cpu in
21789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  powerpc)
21799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Since July 2007 AmigaOS4 officially supports .so libraries.
21809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
21819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
21829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
21839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  m68k)
21849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    library_names_spec='$libname.ixlibrary $libname.a'
21859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Create ${libname}_ixlibrary.a entries in /sys/libs.
21869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    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'
21879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
21889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
21899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
21909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
21919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallbeos*)
21929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='${libname}${shared_ext}'
21939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dynamic_linker="$host_os ld.so"
21949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LIBRARY_PATH
21959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
21969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
21979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallbsdi[[45]]*)
21989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=linux
21999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_version=no
22009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  soname_spec='${libname}${release}${shared_ext}$major'
22029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
22039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LD_LIBRARY_PATH
22049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
22059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
22069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # the default ld.so.conf also contains /usr/contrib/lib and
22079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
22089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # libtool to hard-code these into programs
22099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
22109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
22119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcygwin* | mingw* | pw32* | cegcc*)
22129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=windows
22139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shrext_cmds=".dll"
22149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_version=no
22159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_lib_prefix=no
22169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
22179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $GCC,$host_os in
22189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
22199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    library_names_spec='$libname.dll.a'
22209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # DLL is installed to $(libdir)/../bin by postinstall_cmds
22219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    postinstall_cmds='base_file=`basename \${file}`~
22229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
22239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      dldir=$destdir/`dirname \$dlpath`~
22249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      test -d \$dldir || mkdir -p \$dldir~
22259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      $install_prog $dir/$dlname \$dldir/$dlname~
22269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      chmod a+x \$dldir/$dlname~
22279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
22289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
22299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi'
22309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
22319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      dlpath=$dir/\$dldll~
22329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       $RM \$dlpath'
22339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    shlibpath_overrides_runpath=yes
22349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
22359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $host_os in
22369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    cygwin*)
22379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
22389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      #soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
22399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      soname_spec='`echo ${libname} | sed -e 's/^lib//'`${shared_ext}'
22409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
22419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
22429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    mingw* | cegcc*)
22439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # MinGW DLLs use traditional 'lib' prefix
22449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      #soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
22459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      soname_spec='`echo ${libname} | $SED -e 's/^lib//'`${shared_ext}'
22469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
22479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
22489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # It is most probably a Windows format PATH printed by
22499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # mingw gcc, but we are running on Cygwin. Gcc prints its search
22509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # path with ; separators, and with drive letters. We can handle the
22519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # drive letters (cygwin fileutils understands them), so leave them,
22529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # especially as we might pass files found there to a mingw objdump,
22539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # which wouldn't understand a cygwinified path. Ahh.
22549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
22559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
22569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
22579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
22589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
22599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    pw32*)
22609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # pw32 DLLs use 'pw' prefix rather than 'lib'
22619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
22629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
22639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
22649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
22659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
22669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *)
22679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
22689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
22699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
22709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dynamic_linker='Win32 ld.exe'
22719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # FIXME: first we should search . and the directory the executable is in
22729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=PATH
22739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
22749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
22759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldarwin* | rhapsody*)
22769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dynamic_linker="$host_os dyld"
22779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=darwin
22789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_lib_prefix=no
22799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_version=no
22809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
22819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  soname_spec='${libname}${release}${major}$shared_ext'
22829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_overrides_runpath=yes
22839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=DYLD_LIBRARY_PATH
22849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
22859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_if([$1], [],[
22869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
22879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
22889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
22899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
22909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldgux*)
22919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=linux
22929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_lib_prefix=no
22939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_version=no
22949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
22959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  soname_spec='${libname}${release}${shared_ext}$major'
22969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LD_LIBRARY_PATH
22979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
22989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
22999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfreebsd1*)
23009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dynamic_linker=no
23019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
23029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
23039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfreebsd* | dragonfly*)
23049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # DragonFly does not have aout.  When/if they implement a new
23059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # versioning mechanism, adjust this.
23069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test -x /usr/bin/objformat; then
23079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    objformat=`/usr/bin/objformat`
23089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
23099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $host_os in
23109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    freebsd[[123]]*) objformat=aout ;;
23119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *) objformat=elf ;;
23129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
23139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
23149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=freebsd-$objformat
23159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $version_type in
23169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    freebsd-elf*)
23179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
23189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      need_version=no
23199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      need_lib_prefix=no
23209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
23219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    freebsd-*)
23229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
23239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      need_version=yes
23249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
23259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
23269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LD_LIBRARY_PATH
23279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $host_os in
23289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  freebsd2*)
23299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    shlibpath_overrides_runpath=yes
23309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
23319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
23329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    shlibpath_overrides_runpath=yes
23339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    hardcode_into_libs=yes
23349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
23359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
23369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
23379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    shlibpath_overrides_runpath=no
23389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    hardcode_into_libs=yes
23399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
23409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *) # from 4.6 on, and DragonFly
23419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    shlibpath_overrides_runpath=yes
23429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    hardcode_into_libs=yes
23439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
23449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
23459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
23469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
23479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallgnu*)
23489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=linux
23499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_lib_prefix=no
23509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_version=no
23519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
23529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  soname_spec='${libname}${release}${shared_ext}$major'
23539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LD_LIBRARY_PATH
23549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  hardcode_into_libs=yes
23559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
23569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
23579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallhpux9* | hpux10* | hpux11*)
23589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Give a soname corresponding to the major version so that dld.sl refuses to
23599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # link against other versions.
23609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=sunos
23619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_lib_prefix=no
23629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_version=no
23639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $host_cpu in
23649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ia64*)
23659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    shrext_cmds='.so'
23669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    hardcode_into_libs=yes
23679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    dynamic_linker="$host_os dld.so"
23689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    shlibpath_var=LD_LIBRARY_PATH
23699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
23709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
23719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    soname_spec='${libname}${release}${shared_ext}$major'
23729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test "X$HPUX_IA64_MODE" = X32; then
23739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
23749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    else
23759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
23769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
23779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
23789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
23799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  hppa*64*)
23809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    shrext_cmds='.sl'
23819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    hardcode_into_libs=yes
23829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    dynamic_linker="$host_os dld.sl"
23839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
23849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
23859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
23869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    soname_spec='${libname}${release}${shared_ext}$major'
23879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
23889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
23899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
23909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *)
23919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    shrext_cmds='.sl'
23929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    dynamic_linker="$host_os dld.sl"
23939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    shlibpath_var=SHLIB_PATH
23949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
23959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
23969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    soname_spec='${libname}${release}${shared_ext}$major'
23979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
23989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
23999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # HP-UX runs *really* slowly unless shared libraries are mode 555.
24009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  postinstall_cmds='chmod 555 $lib'
24019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
24029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
24039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallinterix[[3-9]]*)
24049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=linux
24059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_lib_prefix=no
24069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_version=no
24079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
24089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  soname_spec='${libname}${release}${shared_ext}$major'
24099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
24109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LD_LIBRARY_PATH
24119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_overrides_runpath=no
24129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  hardcode_into_libs=yes
24139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
24149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
24159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallirix5* | irix6* | nonstopux*)
24169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $host_os in
24179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    nonstopux*) version_type=nonstopux ;;
24189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *)
24199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if test "$lt_cv_prog_gnu_ld" = yes; then
24209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		version_type=linux
24219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	else
24229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		version_type=irix
24239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi ;;
24249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
24259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_lib_prefix=no
24269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_version=no
24279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  soname_spec='${libname}${release}${shared_ext}$major'
24289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
24299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $host_os in
24309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  irix5* | nonstopux*)
24319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    libsuff= shlibsuff=
24329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
24339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *)
24349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $LD in # libtool.m4 will add one of these switches to LD
24359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
24369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      libsuff= shlibsuff= libmagic=32-bit;;
24379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
24389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      libsuff=32 shlibsuff=N32 libmagic=N32;;
24399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
24409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      libsuff=64 shlibsuff=64 libmagic=64-bit;;
24419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *) libsuff= shlibsuff= libmagic=never-match;;
24429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
24439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
24449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
24459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
24469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_overrides_runpath=no
24479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
24489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
24499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  hardcode_into_libs=yes
24509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
24519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
24529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# No shared lib support for Linux oldld, aout, or coff.
24539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllinux*oldld* | linux*aout* | linux*coff*)
24549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dynamic_linker=no
24559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
24569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
24579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# This must be Linux ELF.
24589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllinux* | k*bsd*-gnu)
24599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=linux
24609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_lib_prefix=no
24619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_version=no
24629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  soname_spec='${libname}${release}${shared_ext}$major'
24649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
24659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LD_LIBRARY_PATH
24669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_overrides_runpath=no
24679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Some binutils ld are patched to set DT_RUNPATH
24689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  save_LDFLAGS=$LDFLAGS
24699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  save_libdir=$libdir
24709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
24719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
24729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
24739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
24749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       [shlibpath_overrides_runpath=yes])])
24759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  LDFLAGS=$save_LDFLAGS
24769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  libdir=$save_libdir
24779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
24789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # This implies no fast_install, which is unacceptable.
24799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Some rework will be needed to allow for fast_install
24809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # before this can be enabled.
24819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  hardcode_into_libs=yes
24829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
24839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Append ld.so.conf contents to the search path
24849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test -f /etc/ld.so.conf; then
24859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    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' ' '`
24869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
24879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
24889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
24899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # We used to test for /lib/ld.so.1 and disable shared libraries on
24909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # powerpc, because MkLinux only supported shared libraries with the
24919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # GNU dynamic linker.  Since this was broken with cross compilers,
24929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # most powerpc-linux boxes support dynamic linking these days and
24939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # people can always --disable-shared, the test was removed, and we
24949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # assume the GNU/Linux dynamic linker is in use.
24959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dynamic_linker='GNU/Linux ld.so'
24969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
24979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
24989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallnetbsd*)
24999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=sunos
25009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_lib_prefix=no
25019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_version=no
25029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
25039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
25049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
25059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    dynamic_linker='NetBSD (a.out) ld.so'
25069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
25079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
25089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    soname_spec='${libname}${release}${shared_ext}$major'
25099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    dynamic_linker='NetBSD ld.elf_so'
25109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
25119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LD_LIBRARY_PATH
25129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_overrides_runpath=yes
25139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  hardcode_into_libs=yes
25149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
25159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
25169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallnewsos6)
25179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=linux
25189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LD_LIBRARY_PATH
25209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_overrides_runpath=yes
25219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
25229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
25239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*nto* | *qnx*)
25249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=qnx
25259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_lib_prefix=no
25269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_version=no
25279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  soname_spec='${libname}${release}${shared_ext}$major'
25299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LD_LIBRARY_PATH
25309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_overrides_runpath=no
25319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  hardcode_into_libs=yes
25329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dynamic_linker='ldqnx.so'
25339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
25349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
25359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallopenbsd*)
25369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=sunos
25379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sys_lib_dlsearch_path_spec="/usr/lib"
25389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_lib_prefix=no
25399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
25409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $host_os in
25419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
25429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *)				need_version=no  ;;
25439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
25449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
25459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
25469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LD_LIBRARY_PATH
25479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
25489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $host_os in
25499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      openbsd2.[[89]] | openbsd2.[[89]].*)
25509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	shlibpath_overrides_runpath=no
25519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
25529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *)
25539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	shlibpath_overrides_runpath=yes
25549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
25559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
25569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
25579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    shlibpath_overrides_runpath=yes
25589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
25599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
25609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
25619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallos2*)
25629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  libname_spec='$name'
25639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shrext_cmds=".dll"
25649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_lib_prefix=no
25659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='$libname${shared_ext} $libname.a'
25669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dynamic_linker='OS/2 ld.exe'
25679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LIBPATH
25689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
25699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
25709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallosf3* | osf4* | osf5*)
25719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=osf
25729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_lib_prefix=no
25739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_version=no
25749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  soname_spec='${libname}${release}${shared_ext}$major'
25759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LD_LIBRARY_PATH
25779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
25789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
25799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
25809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
25819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallrdos*)
25829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dynamic_linker=no
25839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
25849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
25859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsolaris*)
25869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=linux
25879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_lib_prefix=no
25889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_version=no
25899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  soname_spec='${libname}${release}${shared_ext}$major'
25919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LD_LIBRARY_PATH
25929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_overrides_runpath=yes
25939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  hardcode_into_libs=yes
25949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # ldd complains unless libraries are executable
25959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  postinstall_cmds='chmod +x $lib'
25969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
25979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
25989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsunos4*)
25999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=sunos
26009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
26019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
26029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LD_LIBRARY_PATH
26039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_overrides_runpath=yes
26049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "$with_gnu_ld" = yes; then
26059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    need_lib_prefix=no
26069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
26079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_version=yes
26089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
26099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
26109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsysv4 | sysv4.3*)
26119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=linux
26129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  soname_spec='${libname}${release}${shared_ext}$major'
26149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LD_LIBRARY_PATH
26159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $host_vendor in
26169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sni)
26179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      shlibpath_overrides_runpath=no
26189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      need_lib_prefix=no
26199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      runpath_var=LD_RUN_PATH
26209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
26219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    siemens)
26229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      need_lib_prefix=no
26239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
26249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    motorola)
26259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      need_lib_prefix=no
26269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      need_version=no
26279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      shlibpath_overrides_runpath=no
26289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
26299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
26309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
26319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
26329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
26339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsysv4*MP*)
26349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test -d /usr/nec ;then
26359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    version_type=linux
26369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
26379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    soname_spec='$libname${shared_ext}.$major'
26389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    shlibpath_var=LD_LIBRARY_PATH
26399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
26409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
26419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
26429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
26439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=freebsd-elf
26449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_lib_prefix=no
26459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_version=no
26469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
26479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  soname_spec='${libname}${release}${shared_ext}$major'
26489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LD_LIBRARY_PATH
26499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_overrides_runpath=yes
26509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  hardcode_into_libs=yes
26519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "$with_gnu_ld" = yes; then
26529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
26539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
26549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
26559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $host_os in
26569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      sco3.2v5*)
26579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
26589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
26599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
26609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
26619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sys_lib_dlsearch_path_spec='/usr/lib'
26629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
26639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
26649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltpf*)
26659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
26669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=linux
26679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_lib_prefix=no
26689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  need_version=no
26699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LD_LIBRARY_PATH
26719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_overrides_runpath=no
26729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  hardcode_into_libs=yes
26739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
26749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
26759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halluts4*)
26769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  version_type=linux
26779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  soname_spec='${libname}${release}${shared_ext}$major'
26799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  shlibpath_var=LD_LIBRARY_PATH
26809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
26819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
26829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*)
26839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  dynamic_linker=no
26849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
26859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
26869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_RESULT([$dynamic_linker])
26879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest "$dynamic_linker" = no && can_build_shared=no
26889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
26899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
26909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "$GCC" = yes; then
26919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
26929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
26939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
26949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
26959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
26969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
26979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
26989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
26999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
27009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
27019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [variables_saved_for_relink], [1],
27029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Variables whose values should be saved in libtool wrapper scripts and
27039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    restored at link time])
27049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [need_lib_prefix], [0],
27059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Do we need the "lib" prefix for modules?])
27069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
27079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [version_type], [0], [Library versioning type])
27089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
27099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
27109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [shlibpath_overrides_runpath], [0],
27119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Is shlibpath searched before the hard-coded library search path?])
27129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
27139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [library_names_spec], [1],
27149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [[List of archive names.  First name is the real one, the rest are links.
27159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    The last name is the one that the linker finds with -lNAME]])
27169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [soname_spec], [1],
27179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [[The coded name of the library, if different from the real name]])
27189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [postinstall_cmds], [2],
27199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Command to use after installation of a shared archive])
27209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [postuninstall_cmds], [2],
27219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Command to use after uninstallation of a shared archive])
27229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [finish_cmds], [2],
27239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Commands used to finish a libtool library installation in a directory])
27249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [finish_eval], [1],
27259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [[As "finish_cmds", except a single script fragment to be evaled but
27269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    not shown]])
27279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [hardcode_into_libs], [0],
27289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Whether we should hardcode library paths into libraries])
27299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [sys_lib_search_path_spec], [2],
27309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Compile-time system search path for libraries])
27319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
27329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Run-time system search path for libraries])
27339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_SYS_DYNAMIC_LINKER
27349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
27359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
27369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_PATH_TOOL_PREFIX(TOOL)
27379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# --------------------------
27389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# find a file program which can recognize shared library
27399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([_LT_PATH_TOOL_PREFIX],
27409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_DECL_EGREP])dnl
27419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_CHECKING([for $1])
27429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
27439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[case $MAGIC_CMD in
27449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[[\\/*] |  ?:[\\/]*])
27459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
27469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
27479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*)
27489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_save_MAGIC_CMD="$MAGIC_CMD"
27499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
27509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl $ac_dummy forces splitting on constant user-supplied paths.
27519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl POSIX.2 word splitting is done only on the output of word expansions,
27529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl not every word.  This closes a longstanding sh security hole.
27539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ac_dummy="m4_if([$2], , $PATH, [$2])"
27549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  for ac_dir in $ac_dummy; do
27559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    IFS="$lt_save_ifs"
27569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    test -z "$ac_dir" && ac_dir=.
27579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test -f $ac_dir/$1; then
27589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
27599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test -n "$file_magic_test_file"; then
27609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $deplibs_check_method in
27619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	"file_magic "*)
27629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
27639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
27649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
27659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    $EGREP "$file_magic_regex" > /dev/null; then
27669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    :
27679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  else
27689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    cat <<_LT_EOF 1>&2
27699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
27709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** Warning: the command libtool uses to detect shared libraries,
27719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** $file_magic_cmd, produces output that libtool cannot recognize.
27729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** The result is that libtool may fail to recognize shared libraries
27739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** as such.  This will affect the creation of libtool libraries that
27749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** depend on shared libraries, but programs linked with such libtool
27759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** libraries will work regardless of this problem.  Nevertheless, you
27769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** may want to report the problem to your system manager and/or to
27779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** bug-libtool@gnu.org
27789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
27799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
27809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  fi ;;
27819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
27829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
27839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      break
27849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
27859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  done
27869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  IFS="$lt_save_ifs"
27879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  MAGIC_CMD="$lt_save_MAGIC_CMD"
27889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
27899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac])
27909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
27919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n "$MAGIC_CMD"; then
27929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_RESULT($MAGIC_CMD)
27939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
27949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_RESULT(no)
27959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
27969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [MAGIC_CMD], [0],
27979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
27989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_PATH_TOOL_PREFIX
27999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
28009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old name:
28019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
28029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
28039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
28049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
28059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
28069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_PATH_MAGIC
28079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# --------------
28089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# find a file program which can recognize a shared library
28099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_PATH_MAGIC],
28109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
28119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -z "$lt_cv_path_MAGIC_CMD"; then
28129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test -n "$ac_tool_prefix"; then
28139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
28149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
28159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    MAGIC_CMD=:
28169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
28179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
28189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_PATH_MAGIC
28199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
28209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
28219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_PATH_LD
28229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------
28239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# find the pathname to the GNU or non-GNU linker
28249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LT_PATH_LD],
28259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_REQUIRE([AC_PROG_CC])dnl
28269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([AC_CANONICAL_HOST])dnl
28279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([AC_CANONICAL_BUILD])dnl
28289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_DECL_SED])dnl
28299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_DECL_EGREP])dnl
28309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
28319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_ARG_WITH([gnu-ld],
28329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [AS_HELP_STRING([--with-gnu-ld],
28339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
28349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [test "$withval" = no || with_gnu_ld=yes],
28359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [with_gnu_ld=no])dnl
28369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
28379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallac_prog=ld
28389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "$GCC" = yes; then
28399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Check if gcc -print-prog-name=ld gives a path.
28409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_CHECKING([for ld used by $CC])
28419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $host in
28429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *-*-mingw*)
28439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # gcc leaves a trailing carriage return which upsets mingw
28449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
28459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *)
28469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
28479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
28489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $ac_prog in
28499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Accept absolute paths.
28509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [[\\/]]* | ?:[[\\/]]*)
28519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      re_direlt='/[[^/]][[^/]]*/\.\./'
28529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Canonicalize the pathname of ld
28539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
28549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
28559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
28569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      done
28579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      test -z "$LD" && LD="$ac_prog"
28589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
28599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  "")
28609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # If it fails, then pretend we aren't using GCC.
28619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ac_prog=ld
28629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
28639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *)
28649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # If it is relative, then search for the first ld in PATH.
28659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    with_gnu_ld=unknown
28669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
28679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
28689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelif test "$with_gnu_ld" = yes; then
28699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_CHECKING([for GNU ld])
28709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
28719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_CHECKING([for non-GNU ld])
28729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
28739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CACHE_VAL(lt_cv_path_LD,
28749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[if test -z "$LD"; then
28759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
28769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  for ac_dir in $PATH; do
28779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    IFS="$lt_save_ifs"
28789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    test -z "$ac_dir" && ac_dir=.
28799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
28809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_cv_path_LD="$ac_dir/$ac_prog"
28819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Check to see if the program is GNU ld.  I'd rather use --version,
28829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # but apparently some variants of GNU ld only accept -v.
28839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Break only if it was the GNU/non-GNU ld that we prefer.
28849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
28859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *GNU* | *'with BFD'*)
28869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	test "$with_gnu_ld" != no && break
28879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
28889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *)
28899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	test "$with_gnu_ld" != yes && break
28909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
28919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
28929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
28939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  done
28949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  IFS="$lt_save_ifs"
28959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
28969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_path_LD="$LD" # Let the user override the test with a path.
28979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi])
28989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLD="$lt_cv_path_LD"
28999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n "$LD"; then
29009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_RESULT($LD)
29019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
29029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_RESULT(no)
29039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
29049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
29059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_PATH_LD_GNU
29069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([LD])
29079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
29089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
29099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LT_PATH_LD
29109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
29119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old names:
29129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
29139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
29149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
29159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AM_PROG_LD], [])
29169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_PROG_LD], [])
29179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
29189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
29199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_PATH_LD_GNU
29209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#- --------------
29219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_PATH_LD_GNU],
29229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
29239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[# I'd rather use --version here, but apparently some GNU lds only accept -v.
29249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase `$LD -v 2>&1 </dev/null` in
29259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*GNU* | *'with BFD'*)
29269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_prog_gnu_ld=yes
29279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
29289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*)
29299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_prog_gnu_ld=no
29309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
29319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac])
29329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallwith_gnu_ld=$lt_cv_prog_gnu_ld
29339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_PATH_LD_GNU
29349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
29359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
29369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_CMD_RELOAD
29379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# --------------
29389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# find reload flag for linker
29399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#   -- PORTME Some linkers may need a different reload flag.
29409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_CMD_RELOAD],
29419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_CACHE_CHECK([for $LD option to reload object files],
29429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_ld_reload_flag,
29439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [lt_cv_ld_reload_flag='-r'])
29449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallreload_flag=$lt_cv_ld_reload_flag
29459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase $reload_flag in
29469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall"" | " "*) ;;
29479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*) reload_flag=" $reload_flag" ;;
29489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
29499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallreload_cmds='$LD$reload_flag -o $output$reload_objs'
29509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase $host_os in
29519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  darwin*)
29529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test "$GCC" = yes; then
29539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
29549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    else
29559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      reload_cmds='$LD$reload_flag -o $output$reload_objs'
29569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
29579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
29589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
29599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
29609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [reload_cmds], [2])dnl
29619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_CMD_RELOAD
29629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
29639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
29649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_CHECK_MAGIC_METHOD
29659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------------
29669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# how to check for library dependencies
29679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#  -- PORTME fill in with the dynamic library characteristics
29689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_CHECK_MAGIC_METHOD],
29699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_DECL_EGREP])
29709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_DECL_OBJDUMP])
29719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CACHE_CHECK([how to recognize dependent libraries],
29729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_cv_deplibs_check_method,
29739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[lt_cv_file_magic_cmd='$MAGIC_CMD'
29749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_cv_file_magic_test_file=
29759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_cv_deplibs_check_method='unknown'
29769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Need to set the preceding variable on all platforms that support
29779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# interlibrary dependencies.
29789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# 'none' -- dependencies not supported.
29799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# `unknown' -- same as none, but documents that we really don't know.
29809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# 'pass_all' -- all dependencies passed with no checks.
29819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# 'test_compile' -- check by making test program.
29829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# 'file_magic [[regex]]' -- check by looking for files in library path
29839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# which responds to the $file_magic_cmd with a given extended regex.
29849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# If you have `file' or equivalent on your system and you're not sure
29859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# whether `pass_all' will *always* work, you probably want this one.
29869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
29879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase $host_os in
29889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallaix[[4-9]]*)
29899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_deplibs_check_method=pass_all
29909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
29919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
29929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallbeos*)
29939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_deplibs_check_method=pass_all
29949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
29959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
29969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallbsdi[[45]]*)
29979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
29989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_file_magic_cmd='/usr/bin/file -L'
29999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_file_magic_test_file=/shlib/libc.so
30009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
30019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
30029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcygwin*)
30039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # func_win32_libid is a shell function defined in ltmain.sh
30049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
30059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_deplibs_check_method=pass_all
30069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_file_magic_cmd='func_win32_libid'
30079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
30089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
30099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallmingw* | pw32*)
30109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Base MSYS/MinGW do not provide the 'file' command needed by
30119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # func_win32_libid shell function, so use a weaker test based on 'objdump',
30129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # unless we find 'file', for example because we are cross-compiling.
30139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if ( file / ) >/dev/null 2>&1; then
30149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
30159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_file_magic_cmd='func_win32_libid'
30169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
30179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
30189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_file_magic_cmd='$OBJDUMP -f'
30199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
30209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_deplibs_check_method=pass_all
30219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
30229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
30239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcegcc)
30249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # use the weaker test based on 'objdump'. See mingw*.
30259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
30269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_file_magic_cmd='$OBJDUMP -f'
30279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
30289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
30299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldarwin* | rhapsody*)
30309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_deplibs_check_method=pass_all
30319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
30329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
30339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfreebsd* | dragonfly*)
30349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
30359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $host_cpu in
30369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    i*86 )
30379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Not sure whether the presence of OpenBSD here was a mistake.
30389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Let's accept both of them until this is cleared up.
30399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
30409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_cv_file_magic_cmd=/usr/bin/file
30419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
30429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
30439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
30449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
30459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_deplibs_check_method=pass_all
30469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
30479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
30489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
30499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallgnu*)
30509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_deplibs_check_method=pass_all
30519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
30529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
30539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallhpux10.20* | hpux11*)
30549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_file_magic_cmd=/usr/bin/file
30559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $host_cpu in
30569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ia64*)
30579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
30589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
30599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
30609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  hppa*64*)
30619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [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]']
30629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
30639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
30649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *)
30659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
30669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_file_magic_test_file=/usr/lib/libc.sl
30679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
30689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
30699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
30709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
30719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallinterix[[3-9]]*)
30729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
30739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
30749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
30759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
30769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallirix5* | irix6* | nonstopux*)
30779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $LD in
30789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *-32|*"-32 ") libmagic=32-bit;;
30799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *-n32|*"-n32 ") libmagic=N32;;
30809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *-64|*"-64 ") libmagic=64-bit;;
30819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *) libmagic=never-match;;
30829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
30839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_deplibs_check_method=pass_all
30849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
30859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
30869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# This must be Linux ELF.
30879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllinux* | k*bsd*-gnu)
30889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_deplibs_check_method=pass_all
30899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
30909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
30919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallnetbsd*)
30929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
30939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
30949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
30959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
30969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
30979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
30989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
30999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallnewos6*)
31009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
31019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_file_magic_cmd=/usr/bin/file
31029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_file_magic_test_file=/usr/lib/libnls.so
31039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
31049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
31059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*nto* | *qnx*)
31069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_deplibs_check_method=pass_all
31079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
31089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
31099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallopenbsd*)
31109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
31119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
31129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
31139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
31149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
31159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
31169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
31179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallosf3* | osf4* | osf5*)
31189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_deplibs_check_method=pass_all
31199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
31209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
31219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallrdos*)
31229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_deplibs_check_method=pass_all
31239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
31249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
31259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsolaris*)
31269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_deplibs_check_method=pass_all
31279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
31289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
31299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
31309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_deplibs_check_method=pass_all
31319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
31329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
31339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsysv4 | sysv4.3*)
31349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $host_vendor in
31359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  motorola)
31369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    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]]'
31379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
31389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
31399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ncr)
31409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_deplibs_check_method=pass_all
31419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
31429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sequent)
31439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_file_magic_cmd='/bin/file'
31449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
31459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
31469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  sni)
31479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_file_magic_cmd='/bin/file'
31489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
31499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_file_magic_test_file=/lib/libc.so
31509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
31519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  siemens)
31529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_deplibs_check_method=pass_all
31539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
31549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  pc)
31559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_deplibs_check_method=pass_all
31569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
31579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
31589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
31599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
31609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltpf*)
31619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_deplibs_check_method=pass_all
31629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
31639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
31649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
31659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfile_magic_cmd=$lt_cv_file_magic_cmd
31669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldeplibs_check_method=$lt_cv_deplibs_check_method
31679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$deplibs_check_method" && deplibs_check_method=unknown
31689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
31699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [deplibs_check_method], [1],
31709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Method to check whether dependent libraries are shared objects])
31719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [file_magic_cmd], [1],
31729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Command to use when deplibs_check_method == "file_magic"])
31739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_CHECK_MAGIC_METHOD
31749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
31759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
31769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_PATH_NM
31779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------
31789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# find the pathname to a BSD- or MS-compatible name lister
31799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LT_PATH_NM],
31809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_REQUIRE([AC_PROG_CC])dnl
31819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
31829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[if test -n "$NM"; then
31839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Let the user override the test.
31849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_path_NM="$NM"
31859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
31869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_nm_to_check="${ac_tool_prefix}nm"
31879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
31889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_nm_to_check="$lt_nm_to_check nm"
31899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
31909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  for lt_tmp_nm in $lt_nm_to_check; do
31919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
31929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
31939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      IFS="$lt_save_ifs"
31949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      test -z "$ac_dir" && ac_dir=.
31959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      tmp_nm="$ac_dir/$lt_tmp_nm"
31969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
31979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# Check to see if the nm accepts a BSD-compat flag.
31989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
31999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	#   nm: unknown option "B" ignored
32009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# Tru64's nm complains that /dev/null is an invalid object file
32019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
32029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	*/dev/null* | *'Invalid file or object type'*)
32039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  lt_cv_path_NM="$tmp_nm -B"
32049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  break
32059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
32069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	*)
32079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
32089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  */dev/null*)
32099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    lt_cv_path_NM="$tmp_nm -p"
32109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    break
32119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
32129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  *)
32139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
32149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    continue # so that we can try to find one that supports BSD flags
32159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
32169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  esac
32179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
32189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
32199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
32209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    done
32219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    IFS="$lt_save_ifs"
32229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  done
32239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  : ${lt_cv_path_NM=no}
32249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi])
32259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "$lt_cv_path_NM" != "no"; then
32269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  NM="$lt_cv_path_NM"
32279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
32289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Didn't find any BSD compatible name lister, look for dumpbin.
32299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
32309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_SUBST([DUMPBIN])
32319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "$DUMPBIN" != ":"; then
32329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    NM="$DUMPBIN"
32339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
32349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
32359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$NM" && NM=nm
32369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([NM])
32379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
32389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
32399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
32409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [lt_cv_nm_interface="BSD nm"
32419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  echo "int some_variable = 0;" > conftest.$ac_ext
32429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
32439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  (eval "$ac_compile" 2>conftest.err)
32449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  cat conftest.err >&AS_MESSAGE_LOG_FD
32459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
32469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
32479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  cat conftest.err >&AS_MESSAGE_LOG_FD
32489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
32499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  cat conftest.out >&AS_MESSAGE_LOG_FD
32509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
32519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_nm_interface="MS dumpbin"
32529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
32539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  rm -f conftest*])
32549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LT_PATH_NM
32559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
32569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old names:
32579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
32589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
32599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
32609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AM_PROG_NM], [])
32619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_PROG_NM], [])
32629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
32639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
32649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_LIB_M
32659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# --------
32669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# check for math library
32679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LT_LIB_M],
32689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_REQUIRE([AC_CANONICAL_HOST])dnl
32699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallLIBM=
32709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase $host in
32719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
32729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # These system don't have libm, or don't need it
32739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
32749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*-ncr-sysv4.3*)
32759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
32769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
32779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
32789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*)
32799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_CHECK_LIB(m, cos, LIBM="-lm")
32809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
32819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
32829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([LIBM])
32839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# LT_LIB_M
32849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
32859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old name:
32869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
32879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
32889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([AC_CHECK_LIBM], [])
32899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
32909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
32919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_COMPILER_NO_RTTI([TAGNAME])
32929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -------------------------------
32939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_COMPILER_NO_RTTI],
32949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_TAG_COMPILER])dnl
32959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
32969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
32979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
32989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "$GCC" = yes; then
32999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
33009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
33019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
33029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_prog_compiler_rtti_exceptions,
33039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [-fno-rtti -fno-exceptions], [],
33049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
33059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
33069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
33079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[Compiler flag to turn off builtin functions])
33089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_COMPILER_NO_RTTI
33099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
33109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
33119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_CMD_GLOBAL_SYMBOLS
33129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------------
33139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
33149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_REQUIRE([AC_CANONICAL_HOST])dnl
33159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([AC_PROG_CC])dnl
33169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([LT_PATH_NM])dnl
33179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([LT_PATH_LD])dnl
33189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_DECL_SED])dnl
33199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_DECL_EGREP])dnl
33209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_TAG_COMPILER])dnl
33219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
33229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Check for command to grab the raw symbol name followed by C symbol from nm.
33239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_CHECKING([command to parse $NM output from $compiler object])
33249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
33259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[
33269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# These are sane defaults that work on at least a few old systems.
33279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
33289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
33299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Character class describing NM global symbol codes.
33309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsymcode='[[BCDEGRST]]'
33319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
33329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Regexp to match symbols that can be accessed directly from C.
33339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
33349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
33359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Define system-specific variables.
33369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase $host_os in
33379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallaix*)
33389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  symcode='[[BCDT]]'
33399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
33409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcygwin* | mingw* | pw32* | cegcc*)
33419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  symcode='[[ABCDGISTW]]'
33429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
33439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallhpux*)
33449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "$host_cpu" = ia64; then
33459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    symcode='[[ABCDEGRST]]'
33469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
33479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
33489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallirix* | nonstopux*)
33499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  symcode='[[BCDEGRST]]'
33509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
33519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallosf*)
33529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  symcode='[[BCDEGQRST]]'
33539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
33549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsolaris*)
33559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  symcode='[[BDRT]]'
33569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
33579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsco3.2v5*)
33589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  symcode='[[DT]]'
33599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
33609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsysv4.2uw2*)
33619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  symcode='[[DT]]'
33629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
33639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsysv5* | sco5v6* | unixware* | OpenUNIX*)
33649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  symcode='[[ABDT]]'
33659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
33669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsysv4)
33679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  symcode='[[DFNSTU]]'
33689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
33699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
33709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
33719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# If we're using GNU nm, then use its standard symbol codes.
33729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase `$NM -V 2>&1` in
33739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*GNU* | *'with BFD'*)
33749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  symcode='[[ABCDGIRSTW]]' ;;
33759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
33769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
33779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Transform an extracted symbol line into a proper C declaration.
33789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Some systems (esp. on ia64) link data and code symbols differently,
33799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# so use this general approach.
33809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
33819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
33829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Transform an extracted symbol line into symbol name and symbol address
33839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
33849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_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'"
33859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
33869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Handle CRLF in mingw tool chain
33879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallopt_cr=
33889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase $build_os in
33899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallmingw*)
33909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
33919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
33929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
33939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
33949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Try without a prefix underscore, then with it.
33959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfor ac_symprfx in "" "_"; do
33969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
33979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
33989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  symxfrm="\\1 $ac_symprfx\\2 \\2"
33999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
34009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Write the raw and C identifiers.
34019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
34029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Fake it for dumpbin and say T for any non-static function
34039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # and D for any global variable.
34049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Also find C++ and __fastcall symbols from MSVC++,
34059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # which start with @ or ?.
34069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_sys_global_symbol_pipe="$AWK ['"\
34079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall"     {last_section=section; section=\$ 3};"\
34089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
34099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall"     \$ 0!~/External *\|/{next};"\
34109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
34119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall"     {if(hide[section]) next};"\
34129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
34139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
34149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
34159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
34169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall"     ' prfx=^$ac_symprfx]"
34179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
34189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
34199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
34209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
34219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Check to see that the pipe works correctly.
34229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  pipe_works=no
34239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
34249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  rm -f conftest*
34259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  cat > conftest.$ac_ext <<_LT_EOF
34269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#ifdef __cplusplus
34279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern "C" {
34289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif
34299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallchar nm_test_var;
34309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallvoid nm_test_func(void);
34319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallvoid nm_test_func(void){}
34329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#ifdef __cplusplus
34339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
34349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif
34359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallint main(){nm_test_var='a';nm_test_func();return(0);}
34369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
34379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
34389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if AC_TRY_EVAL(ac_compile); then
34399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Now try to grab the symbols.
34409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    nlist=conftest.nm
34419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
34429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Try sorting and uniquifying the output.
34439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if sort "$nlist" | uniq > "$nlist"T; then
34449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	mv -f "$nlist"T "$nlist"
34459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
34469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	rm -f "$nlist"T
34479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
34489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
34499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Make sure that we snagged all the symbols we need.
34509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
34519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
34529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  cat <<_LT_EOF > conftest.$ac_ext
34539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#ifdef __cplusplus
34549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern "C" {
34559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif
34569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
34579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
34589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # Now generate the symbol file.
34599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
34609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
34619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  cat <<_LT_EOF >> conftest.$ac_ext
34629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
34639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* The mapping between symbol names and symbols.  */
34649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallconst struct {
34659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  const char *name;
34669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  void       *address;
34679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
34689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt__PROGRAM__LTX_preloaded_symbols[[]] =
34699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
34709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  { "@PROGRAM@", (void *) 0 },
34719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
34729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
34739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  cat <<\_LT_EOF >> conftest.$ac_ext
34749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  {0, (void *) 0}
34759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall};
34769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
34779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* This works around a problem in FreeBSD linker */
34789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#ifdef FREEBSD_WORKAROUND
34799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallstatic const void *lt_preloaded_setup() {
34809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  return lt__PROGRAM__LTX_preloaded_symbols;
34819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
34829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif
34839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
34849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#ifdef __cplusplus
34859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
34869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif
34879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
34889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # Now try linking the two files.
34899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  mv conftest.$ac_objext conftstm.$ac_objext
34909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  lt_save_LIBS="$LIBS"
34919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  lt_save_CFLAGS="$CFLAGS"
34929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  LIBS="conftstm.$ac_objext"
34939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
34949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
34959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    pipe_works=yes
34969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  fi
34979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  LIBS="$lt_save_LIBS"
34989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  CFLAGS="$lt_save_CFLAGS"
34999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	else
35009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
35019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi
35029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
35039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
35049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
35059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    else
35069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
35079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
35089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
35099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
35109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    cat conftest.$ac_ext >&5
35119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
35129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  rm -rf conftest* conftst*
35139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
35149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Do not use the global_symbol_pipe unless it works.
35159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "$pipe_works" = yes; then
35169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    break
35179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
35189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_sys_global_symbol_pipe=
35199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
35209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldone
35219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
35229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -z "$lt_cv_sys_global_symbol_pipe"; then
35239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_sys_global_symbol_to_cdecl=
35249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
35259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
35269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_RESULT(failed)
35279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
35289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_RESULT(ok)
35299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
35309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
35319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
35329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Take the output of nm and produce a listing of raw symbols and C names])
35339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
35349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Transform the output of nm in a proper C declaration])
35359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([global_symbol_to_c_name_address],
35369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [lt_cv_sys_global_symbol_to_c_name_address], [1],
35379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Transform the output of nm in a C name address pair])
35389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
35399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
35409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Transform the output of nm in a C name address pair when lib prefix is needed])
35419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall]) # _LT_CMD_GLOBAL_SYMBOLS
35429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
35439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
35449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_COMPILER_PIC([TAGNAME])
35459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ---------------------------
35469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_COMPILER_PIC],
35479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_TAG_COMPILER])dnl
35489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(lt_prog_compiler_wl, $1)=
35499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(lt_prog_compiler_pic, $1)=
35509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(lt_prog_compiler_static, $1)=
35519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
35529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_CHECKING([for $compiler option to produce PIC])
35539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_if([$1], [CXX], [
35549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # C++ specific cases for pic, static, wl, etc.
35559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "$GXX" = yes; then
35569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
35579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
35589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
35599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $host_os in
35609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    aix*)
35619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # All AIX code is PIC.
35629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$host_cpu" = ia64; then
35639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# AIX 5 now supports IA64 processor
35649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
35659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
35669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
35679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
35689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    amigaos*)
35699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case $host_cpu in
35709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      powerpc)
35719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            # see comment about AmigaOS4 .so support
35729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
35739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
35749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      m68k)
35759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            # FIXME: we need at least 68020 code to build shared libraries, but
35769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            # adding the `-m68020' flag to GCC prevents building anything better,
35779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            # like `-m68040'.
35789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
35799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
35809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
35819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
35829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
35839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
35849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # PIC is the default for these OSes.
35859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
35869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    mingw* | cygwin* | os2* | pw32* | cegcc*)
35879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # This hack is so that the source file can tell whether it is being
35889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # built for inclusion in a dll (and should export symbols for example).
35899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Although the cygwin gcc ignores -fPIC, still need this for old-style
35909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # (--disable-auto-import) libraries
35919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      m4_if([$1], [GCJ], [],
35929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
35939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
35949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    darwin* | rhapsody*)
35959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # PIC is the default on this platform
35969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Common symbols not allowed in MH_DYLIB files
35979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
35989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
35999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *djgpp*)
36009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # DJGPP does not support shared libraries at all
36019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
36029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
36039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    interix[[3-9]]*)
36049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
36059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Instead, we relocate shared libraries at runtime.
36069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
36079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sysv4*MP*)
36089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test -d /usr/nec; then
36099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
36109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
36119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
36129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    hpux*)
36139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
36149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
36159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # sets the default TLS model and affects inlining.
36169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case $host_cpu in
36179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      hppa*64*)
36189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
36199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *)
36209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
36219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
36229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
36239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
36249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *qnx* | *nto*)
36259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # QNX uses GNU C++, but need to define -shared option too, otherwise
36269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # it will coredump.
36279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
36289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
36299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *)
36309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
36319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
36329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
36339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
36349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $host_os in
36359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      aix[[4-9]]*)
36369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# All AIX code is PIC.
36379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if test "$host_cpu" = ia64; then
36389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # AIX 5 now supports IA64 processor
36399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
36409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	else
36419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
36429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi
36439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
36449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      chorus*)
36459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $cc_basename in
36469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	cxch68*)
36479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # Green Hills C++ Compiler
36489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # _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"
36499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
36509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
36519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
36529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      dgux*)
36539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $cc_basename in
36549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ec++*)
36559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
36569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
36579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ghcx*)
36589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Green Hills C++ Compiler
36599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
36609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
36619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  *)
36629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
36639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
36649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
36659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      freebsd* | dragonfly*)
36669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# FreeBSD uses GNU C++
36679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
36689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      hpux9* | hpux10* | hpux11*)
36699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $cc_basename in
36709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  CC*)
36719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
36729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
36739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    if test "$host_cpu" != ia64; then
36749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
36759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    fi
36769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
36779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  aCC*)
36789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
36799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
36809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    case $host_cpu in
36819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    hppa*64*|ia64*)
36829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      # +Z the default
36839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      ;;
36849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    *)
36859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
36869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      ;;
36879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    esac
36889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
36899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  *)
36909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
36919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
36929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
36939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      interix*)
36949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# This is c89, which is MS Visual C++ (no shared libs)
36959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# Anyone wants to do a port?
36969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
36979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      irix5* | irix6* | nonstopux*)
36989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $cc_basename in
36999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  CC*)
37009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
37019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
37029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # CC pic flag -KPIC is the default.
37039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
37049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  *)
37059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
37069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
37079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
37089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      linux* | k*bsd*-gnu)
37099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $cc_basename in
37109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  KCC*)
37119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # KAI C++ Compiler
37129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
37139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
37149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
37159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ecpc* )
37169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # old Intel C++ for x86_64 which still supported -KPIC.
37179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
37189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
37199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
37209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
37219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  icpc* )
37229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Intel C++, used to be incompatible with GCC.
37239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # ICC 10 doesn't accept -KPIC any more.
37249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
37259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
37269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
37279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
37289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  pgCC* | pgcpp*)
37299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Portland Group C++ compiler
37309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
37319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
37329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
37339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
37349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  cxx*)
37359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Compaq C++
37369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Make sure the PIC flag is empty.  It appears that all Alpha
37379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Linux and Compaq Tru64 Unix objects are PIC.
37389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
37399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
37409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
37419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  xlc* | xlC*)
37429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # IBM XL 8.0 on PPC
37439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
37449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
37459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
37469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
37479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  *)
37489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    case `$CC -V 2>&1 | sed 5q` in
37499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    *Sun\ C*)
37509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      # Sun C++ 5.9
37519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
37529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
37539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
37549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      ;;
37559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    esac
37569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
37579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
37589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
37599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lynxos*)
37609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
37619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      m88k*)
37629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
37639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      mvs*)
37649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $cc_basename in
37659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  cxx*)
37669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
37679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
37689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  *)
37699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
37709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
37719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
37729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      netbsd*)
37739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
37749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *qnx* | *nto*)
37759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # QNX uses GNU C++, but need to define -shared option too, otherwise
37769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # it will coredump.
37779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
37789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
37799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      osf3* | osf4* | osf5*)
37809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $cc_basename in
37819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  KCC*)
37829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
37839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
37849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  RCC*)
37859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Rational C++ 2.4.1
37869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
37879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
37889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  cxx*)
37899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Digital/Compaq C++
37909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
37919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Make sure the PIC flag is empty.  It appears that all Alpha
37929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Linux and Compaq Tru64 Unix objects are PIC.
37939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
37949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
37959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
37969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  *)
37979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
37989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
37999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
38009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      psos*)
38019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
38029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      solaris*)
38039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $cc_basename in
38049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  CC*)
38059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Sun C++ 4.2, 5.x and Centerline C++
38069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
38079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
38089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
38099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
38109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  gcx*)
38119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Green Hills C++ Compiler
38129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
38139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
38149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  *)
38159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
38169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
38179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
38189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      sunos4*)
38199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $cc_basename in
38209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  CC*)
38219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Sun C++ 4.x
38229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
38239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
38249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
38259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  lcc*)
38269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Lucid
38279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
38289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
38299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  *)
38309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
38319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
38329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
38339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
38349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $cc_basename in
38359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  CC*)
38369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
38379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
38389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
38399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
38409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
38419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
38429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      tandem*)
38439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $cc_basename in
38449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  NCC*)
38459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # NonStop-UX NCC 3.20
38469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
38479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
38489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  *)
38499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
38509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
38519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
38529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      vxworks*)
38539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
38549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *)
38559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
38569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
38579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
38589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
38599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall],
38609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[
38619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "$GCC" = yes; then
38629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
38639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
38649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
38659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $host_os in
38669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      aix*)
38679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # All AIX code is PIC.
38689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$host_cpu" = ia64; then
38699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# AIX 5 now supports IA64 processor
38709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
38719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
38729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
38739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
38749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    amigaos*)
38759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case $host_cpu in
38769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      powerpc)
38779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            # see comment about AmigaOS4 .so support
38789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
38799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
38809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      m68k)
38819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            # FIXME: we need at least 68020 code to build shared libraries, but
38829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            # adding the `-m68020' flag to GCC prevents building anything better,
38839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            # like `-m68040'.
38849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
38859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
38869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
38879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
38889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
38899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
38909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # PIC is the default for these OSes.
38919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
38929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
38939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    mingw* | cygwin* | pw32* | os2* | cegcc*)
38949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # This hack is so that the source file can tell whether it is being
38959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # built for inclusion in a dll (and should export symbols for example).
38969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Although the cygwin gcc ignores -fPIC, still need this for old-style
38979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # (--disable-auto-import) libraries
38989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      m4_if([$1], [GCJ], [],
38999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
39009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
39019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
39029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    darwin* | rhapsody*)
39039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # PIC is the default on this platform
39049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Common symbols not allowed in MH_DYLIB files
39059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
39069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
39079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
39089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    hpux*)
39099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
39109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
39119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # sets the default TLS model and affects inlining.
39129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case $host_cpu in
39139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      hppa*64*)
39149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# +Z the default
39159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
39169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *)
39179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
39189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
39199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
39209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
39219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
39229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    interix[[3-9]]*)
39239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
39249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Instead, we relocate shared libraries at runtime.
39259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
39269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
39279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    msdosdjgpp*)
39289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Just because we use GCC doesn't mean we suddenly get shared libraries
39299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # on systems that don't support them.
39309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
39319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      enable_shared=no
39329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
39339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
39349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *nto* | *qnx*)
39359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # QNX uses GNU C++, but need to define -shared option too, otherwise
39369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # it will coredump.
39379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
39389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
39399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
39409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sysv4*MP*)
39419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test -d /usr/nec; then
39429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
39439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
39449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
39459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
39469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *)
39479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
39489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
39499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
39509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
39519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # PORTME Check for flag to pass linker flags through the system compiler.
39529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $host_os in
39539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    aix*)
39549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
39559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$host_cpu" = ia64; then
39569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# AIX 5 now supports IA64 processor
39579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
39589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
39599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
39609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
39619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
39629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
39639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    mingw* | cygwin* | pw32* | os2* | cegcc*)
39649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # This hack is so that the source file can tell whether it is being
39659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # built for inclusion in a dll (and should export symbols for example).
39669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      m4_if([$1], [GCJ], [],
39679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
39689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
39699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
39709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    hpux9* | hpux10* | hpux11*)
39719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
39729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
39739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # not for PA HP-UX.
39749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case $host_cpu in
39759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      hppa*64*|ia64*)
39769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# +Z the default
39779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
39789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *)
39799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
39809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
39819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
39829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Is there a better lt_prog_compiler_static that works with the bundled CC?
39839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
39849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
39859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
39869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    irix5* | irix6* | nonstopux*)
39879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
39889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # PIC (with -KPIC) is the default.
39899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
39909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
39919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
39929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    linux* | k*bsd*-gnu)
39939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case $cc_basename in
39949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # old Intel for x86_64 which still supported -KPIC.
39959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ecc*)
39969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
39979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
39989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
39999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
40009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # icc used to be incompatible with GCC.
40019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # ICC 10 doesn't accept -KPIC any more.
40029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      icc* | ifort*)
40039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
40059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
40069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
40079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Lahey Fortran 8.1.
40089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lf95*)
40099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
40119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
40129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
40139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      pgcc* | pgf77* | pgf90* | pgf95*)
40149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # Portland Group compilers (*not* the Pentium gcc compiler,
40159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# which looks to be a dead project)
40169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
40189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
40199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
40209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ccc*)
40219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # All Alpha code is PIC.
40239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
40249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
40259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      xl*)
40269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# IBM XL C 8.0/Fortran 10.1 on PPC
40279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
40299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
40309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
40319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *)
40329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case `$CC -V 2>&1 | sed 5q` in
40339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	*Sun\ C*)
40349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # Sun C 5.9
40359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
40369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
40379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
40399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	*Sun\ F*)
40409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
40419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
40429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
40439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
40449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
40459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
40469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
40479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
40489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
40499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
40509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    newsos6)
40519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
40529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
40539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
40549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
40559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *nto* | *qnx*)
40569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # QNX uses GNU C++, but need to define -shared option too, otherwise
40579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # it will coredump.
40589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
40599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
40609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
40619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    osf3* | osf4* | osf5*)
40629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # All OSF/1 code is PIC.
40649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
40659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
40669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
40679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    rdos*)
40689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
40699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
40709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
40719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    solaris*)
40729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
40739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
40749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case $cc_basename in
40759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      f77* | f90* | f95*)
40769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
40779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *)
40789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
40799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
40809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
40819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
40829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sunos4*)
40839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
40849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
40859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
40869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
40879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
40889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sysv4 | sysv4.2uw2* | sysv4.3*)
40899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
40919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
40929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
40939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
40949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sysv4*MP*)
40959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test -d /usr/nec ;then
40969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
40979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
40989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
40999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
41009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
41019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
41029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
41039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
41049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
41059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
41069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
41079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    unicos*)
41089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
41099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
41109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
41119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
41129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    uts4*)
41139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
41149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
41159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
41169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
41179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *)
41189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
41199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
41209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
41219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
41229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
41239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase $host_os in
41249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # For platforms which do not support PIC, -DPIC is meaningless:
41259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *djgpp*)
41269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
41279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
41289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *)
41299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
41309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
41319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
41329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
41339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
41349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[How to pass a linker flag through the compiler])
41359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
41369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#
41379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Check to make sure the PIC flag actually works.
41389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#
41399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
41409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
41419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
41429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
41439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
41449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     "" | " "*) ;;
41459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
41469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     esac],
41479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
41489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
41499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
41509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
41519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[Additional compiler flags for building library objects])
41529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
41539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#
41549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Check to make sure the static flag actually works.
41559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#
41569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
41579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
41589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
41599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  $lt_tmp_static_flag,
41609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [],
41619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
41629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
41639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	[Compiler flag to prevent dynamic linking])
41649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_COMPILER_PIC
41659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
41669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
41679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_LINKER_SHLIBS([TAGNAME])
41689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------------------------
41699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# See if the linker supports building shared libraries.
41709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_LINKER_SHLIBS],
41719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_REQUIRE([LT_PATH_LD])dnl
41729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([LT_PATH_NM])dnl
41739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_FILEUTILS_DEFAULTS])dnl
41749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_DECL_EGREP])dnl
41759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_DECL_SED])dnl
41769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
41779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_TAG_COMPILER])dnl
41789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
41799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_if([$1], [CXX], [
41809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
41819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $host_os in
41829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  aix[[4-9]]*)
41839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # If we're using GNU nm, then we don't want the "-C" option.
41849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # -C means demangle to AIX nm, but means don't demangle with GNU nm
41859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
41869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _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'
41879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    else
41889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _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'
41899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
41909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
41919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  pw32*)
41929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
41939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
41949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  cygwin* | mingw* | cegcc*)
41959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _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'
41969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
41979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *)
41989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
41999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
42009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
42019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
42029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall], [
42039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  runpath_var=
42049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(allow_undefined_flag, $1)=
42059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(always_export_symbols, $1)=no
42069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(archive_cmds, $1)=
42079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(archive_expsym_cmds, $1)=
42089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(compiler_needs_object, $1)=no
42099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
42109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
42119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
42129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(hardcode_automatic, $1)=no
42139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(hardcode_direct, $1)=no
42149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
42159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
42169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
42179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(hardcode_libdir_separator, $1)=
42189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(hardcode_minus_L, $1)=no
42199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
42209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(inherit_rpath, $1)=no
42219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(link_all_deplibs, $1)=unknown
42229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(module_cmds, $1)=
42239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(module_expsym_cmds, $1)=
42249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
42259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
42269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(thread_safe_flag_spec, $1)=
42279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(whole_archive_flag_spec, $1)=
42289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # include_expsyms should be a list of space-separated symbols to be *always*
42299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # included in the symbol list
42309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(include_expsyms, $1)=
42319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # exclude_expsyms can be an extended regexp of symbols to exclude
42329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # it will be wrapped by ` (' and `)$', so one must not match beginning or
42339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
42349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # as well as any symbol that contains `d'.
42359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
42369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
42379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # platforms (ab)use it in PIC code, but their linkers get confused if
42389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # the symbol is explicitly referenced.  Since portable code cannot
42399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # rely on this symbol name, it's probably fine to never include it in
42409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # preloaded symbol tables.
42419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Exclude shared library initialization/finalization symbols.
42429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl Note also adjust exclude_expsyms for C++ above.
42439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  extract_expsyms_cmds=
42449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
42459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $host_os in
42469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  cygwin* | mingw* | pw32* | cegcc*)
42479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # FIXME: the MSVC++ port hasn't been tested in a loooong time
42489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # When not using gcc, we currently assume that we are using
42499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Microsoft Visual C++.
42509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test "$GCC" != yes; then
42519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      with_gnu_ld=no
42529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
42539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
42549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  interix*)
42559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # we just hope/assume this is gcc and not c89 (= MSVC++)
42569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    with_gnu_ld=yes
42579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
42589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  openbsd*)
42599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    with_gnu_ld=no
42609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
42619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
42629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
42639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(ld_shlibs, $1)=yes
42649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "$with_gnu_ld" = yes; then
42659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # If archive_cmds runs LD, not CC, wlarc should be empty
42669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    wlarc='${wl}'
42679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
42689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Set some defaults for GNU ld with shared library support. These
42699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # are reset later if shared libraries are not supported. Putting them
42709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # here allows them to be overridden if necessary.
42719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    runpath_var=LD_RUN_PATH
42729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
42739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
42749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # ancient GNU ld didn't support --whole-archive et. al.
42759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
42769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
42779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    else
42789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(whole_archive_flag_spec, $1)=
42799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
42809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    supports_anon_versioning=no
42819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case `$LD -v 2>&1` in
42829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
42839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
42849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
42859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *\ 2.11.*) ;; # other 2.11 versions
42869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *) supports_anon_versioning=yes ;;
42879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
42889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
42899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # See if GNU ld supports shared libraries.
42909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $host_os in
42919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    aix[[3-9]]*)
42929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # On AIX/PPC, the GNU linker is very broken
42939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$host_cpu" != ia64; then
42949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(ld_shlibs, $1)=no
42959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	cat <<_LT_EOF 1>&2
42969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
42979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** Warning: the GNU linker, at least up to release 2.9.1, is reported
42989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** to be unable to reliably create shared libraries on AIX.
42999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** Therefore, libtool is disabling shared libraries support.  If you
43009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** really care for shared libraries, you may want to modify your PATH
43019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** so that a non-GNU linker is found, and then restart.
43029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
43039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
43049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
43059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
43069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
43079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    amigaos*)
43089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case $host_cpu in
43099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      powerpc)
43109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            # see comment about AmigaOS4 .so support
43119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
43129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(archive_expsym_cmds, $1)=''
43139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
43149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      m68k)
43159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _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)'
43169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
43179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(hardcode_minus_L, $1)=yes
43189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
43199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
43209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
43219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
43229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    beos*)
43239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
43249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
43259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
43269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# support --undefined.  This deserves some investigation.  FIXME
43279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
43289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
43299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(ld_shlibs, $1)=no
43309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
43319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
43329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
43339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    cygwin* | mingw* | pw32* | cegcc*)
43349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
43359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # as there is no search path for DLLs.
43369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
43379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
43389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(always_export_symbols, $1)=no
43399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
43409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _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'
43419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
43429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
43439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _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'
43449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# If the export-symbols file already is a .def file (1st line
43459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# is EXPORTS), use it as is; otherwise, prepend...
43469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
43479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  cp $export_symbols $output_objdir/$soname.def;
43489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	else
43499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  echo EXPORTS > $output_objdir/$soname.def;
43509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  cat $export_symbols >> $output_objdir/$soname.def;
43519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi~
43529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
43539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
43549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(ld_shlibs, $1)=no
43559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
43569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
43579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
43589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    interix[[3-9]]*)
43599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_direct, $1)=no
43609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
43619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
43629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
43639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
43649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Instead, shared libraries are loaded at an image base (0x10000000 by
43659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # default) and relocated if they conflict, which is a slow very memory
43669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # consuming and fragmenting process.  To avoid this, we pick a random,
43679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
43689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
43699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _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'
43709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _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'
43719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
43729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
43739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    gnu* | linux* | tpf* | k*bsd*-gnu)
43749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      tmp_diet=no
43759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$host_os" = linux-dietlibc; then
43769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $cc_basename in
43779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
43789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
43799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
43809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
43819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 && test "$tmp_diet" = no
43829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      then
43839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	tmp_addflag=
43849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	tmp_sharedflag='-shared'
43859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $cc_basename,$host_cpu in
43869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        pgcc*)				# Portland Group C compiler
43879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _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'
43889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  tmp_addflag=' $pic_flag'
43899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
43909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
43919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _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'
43929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  tmp_addflag=' $pic_flag -Mnomain' ;;
43939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
43949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  tmp_addflag=' -i_dynamic' ;;
43959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
43969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  tmp_addflag=' -i_dynamic -nofor_main' ;;
43979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	ifc* | ifort*)			# Intel Fortran compiler
43989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  tmp_addflag=' -nofor_main' ;;
43999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	lf95*)				# Lahey Fortran 8.1
44009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
44019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  tmp_sharedflag='--shared' ;;
44029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
44039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  tmp_sharedflag='-qmkshrobj'
44049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  tmp_addflag= ;;
44059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
44069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case `$CC -V 2>&1 | sed 5q` in
44079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	*Sun\ C*)			# Sun C 5.9
44089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _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'
44099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(compiler_needs_object, $1)=yes
44109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  tmp_sharedflag='-G' ;;
44119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	*Sun\ F*)			# Sun Fortran 8.3
44129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  tmp_sharedflag='-G' ;;
44139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
44149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
44159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
44169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        if test "x$supports_anon_versioning" = xyes; then
44179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
44189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
44199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    echo "local: *; };" >> $output_objdir/$libname.ver~
44209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
44219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        fi
44229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
44239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $cc_basename in
44249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	xlf*)
44259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
44269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
44279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
44289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
44299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
44309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  if test "x$supports_anon_versioning" = xyes; then
44319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
44329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
44339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      echo "local: *; };" >> $output_objdir/$libname.ver~
44349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
44359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  fi
44369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
44379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
44389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
44399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(ld_shlibs, $1)=no
44409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
44419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
44429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
44439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    netbsd*)
44449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
44459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
44469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	wlarc=
44479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
44489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
44499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_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'
44509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
44519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
44529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
44539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    solaris*)
44549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
44559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(ld_shlibs, $1)=no
44569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	cat <<_LT_EOF 1>&2
44579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
44589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** Warning: The releases 2.8.* of the GNU linker cannot reliably
44599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** create shared libraries on Solaris systems.  Therefore, libtool
44609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** is disabling shared libraries support.  We urge you to upgrade GNU
44619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** binutils to release 2.9.1 or newer.  Another option is to modify
44629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** your PATH or compiler configuration so that the native linker is
44639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** used, and then restart.
44649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
44659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
44669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
44679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
44689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_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'
44699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
44709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(ld_shlibs, $1)=no
44719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
44729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
44739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
44749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
44759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case `$LD -v 2>&1` in
44769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
44779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(ld_shlibs, $1)=no
44789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	cat <<_LT_EOF 1>&2
44799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
44809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
44819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** reliably create shared libraries on SCO systems.  Therefore, libtool
44829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** is disabling shared libraries support.  We urge you to upgrade GNU
44839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
44849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** your PATH or compiler configuration so that the native linker is
44859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*** used, and then restart.
44869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
44879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
44889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
44899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	*)
44909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # For security reasons, it is highly recommended that you always
44919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # use absolute paths for naming shared libraries, and exclude the
44929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # DT_RUNPATH tag from executables and libraries.  But doing so
44939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # requires that you compile everything twice, which is a pain.
44949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
44959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
44969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
44979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _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'
44989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  else
44999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(ld_shlibs, $1)=no
45009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  fi
45019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
45029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
45039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
45049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
45059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sunos4*)
45069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
45079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      wlarc=
45089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_direct, $1)=yes
45099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
45109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
45119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
45129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *)
45139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
45149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
45159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_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'
45169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
45179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(ld_shlibs, $1)=no
45189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
45199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
45209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
45219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
45229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
45239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      runpath_var=
45249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
45259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
45269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(whole_archive_flag_spec, $1)=
45279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
45289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
45299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # PORTME fill in a description of your system's linker (not GNU ld)
45309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $host_os in
45319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    aix3*)
45329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
45339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(always_export_symbols, $1)=yes
45349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _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'
45359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Note: this linker hardcodes the directories in LIBPATH if there
45369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # are no directories specified by -L.
45379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_minus_L, $1)=yes
45389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
45399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# Neither direct hardcoding nor static linking is supported with a
45409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# broken collect2.
45419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_direct, $1)=unsupported
45429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
45439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
45449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
45459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    aix[[4-9]]*)
45469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$host_cpu" = ia64; then
45479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# On IA64, the linker does run time linking by default, so we don't
45489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# have to do anything special.
45499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	aix_use_runtimelinking=no
45509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	exp_sym_flag='-Bexport'
45519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	no_entry_flag=""
45529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
45539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# If we're using GNU nm, then we don't want the "-C" option.
45549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# -C means demangle to AIX nm, but means don't demangle with GNU nm
45559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
45569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _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'
45579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	else
45589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _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'
45599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi
45609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	aix_use_runtimelinking=no
45619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
45629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# Test if we are trying to use run time linking or normal
45639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
45649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# need to do runtime linking.
45659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
45669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  for ld_flag in $LDFLAGS; do
45679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
45689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    aix_use_runtimelinking=yes
45699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    break
45709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  fi
45719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  done
45729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
45739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
45749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
45759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	exp_sym_flag='-bexport'
45769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	no_entry_flag='-bnoentry'
45779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
45789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
45799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # When large executables or shared objects are built, AIX ld can
45809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # have problems creating the table of contents.  If linking a library
45819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # or program results in "error TOC overflow" add -mminimal-toc to
45829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
45839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
45849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
45859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(archive_cmds, $1)=''
45869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_direct, $1)=yes
45879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
45889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
45899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(link_all_deplibs, $1)=yes
45909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
45919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
45929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$GCC" = yes; then
45939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $host_os in aix4.[[012]]|aix4.[[012]].*)
45949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# We only want to do this on AIX 4.2 and lower, the check
45959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# below for broken collect2 doesn't work under 4.3+
45969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  collect2name=`${CC} -print-prog-name=collect2`
45979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  if test -f "$collect2name" &&
45989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
45999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  then
46009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # We have reworked collect2
46019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  :
46029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  else
46039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # We have old collect2
46049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
46059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # It fails to find uninstalled libraries when the uninstalled
46069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # path is not listed in the libpath.  Setting hardcode_minus_L
46079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # to unsupported forces relinking
46089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
46099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
46109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
46119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  fi
46129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
46139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
46149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	shared_flag='-shared'
46159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if test "$aix_use_runtimelinking" = yes; then
46169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  shared_flag="$shared_flag "'${wl}-G'
46179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi
46189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
46199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# not using gcc
46209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if test "$host_cpu" = ia64; then
46219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
46229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# chokes on -Wl,-G. The following line is correct:
46239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  shared_flag='-G'
46249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	else
46259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  if test "$aix_use_runtimelinking" = yes; then
46269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    shared_flag='${wl}-G'
46279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  else
46289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    shared_flag='${wl}-bM:SRE'
46299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  fi
46309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi
46319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
46329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
46339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
46349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # It seems that -bexpall does not export symbols beginning with
46359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # underscore (_), so it is better to generate a list of symbols to export.
46369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(always_export_symbols, $1)=yes
46379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$aix_use_runtimelinking" = yes; then
46389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# Warning - without using the other runtime loading flags (-brtl),
46399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# -berok will link without error, but may produce a broken library.
46409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
46419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # Determine the default libpath from the value encoded in an
46429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # empty executable.
46439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_SYS_MODULE_PATH_AIX
46449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
46459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _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"
46469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
46479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if test "$host_cpu" = ia64; then
46489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
46499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
46509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _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"
46519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	else
46529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 # Determine the default libpath from the value encoded in an
46539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 # empty executable.
46549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 _LT_SYS_MODULE_PATH_AIX
46559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
46569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # Warning - without using the other run time loading flags,
46579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # -berok will link without error, but may produce a broken library.
46589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
46599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
46609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # Exported symbols can be pulled into shared objects from archives
46619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
46629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
46639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # This is similar to how AIX traditionally builds its shared libraries.
46649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _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'
46659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi
46669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
46679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
46689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
46699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    amigaos*)
46709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case $host_cpu in
46719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      powerpc)
46729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            # see comment about AmigaOS4 .so support
46739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
46749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(archive_expsym_cmds, $1)=''
46759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
46769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      m68k)
46779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _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)'
46789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
46799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(hardcode_minus_L, $1)=yes
46809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
46819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
46829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
46839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
46849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    bsdi[[45]]*)
46859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
46869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
46879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
46889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    cygwin* | mingw* | pw32* | cegcc*)
46899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # When not using gcc, we currently assume that we are using
46909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Microsoft Visual C++.
46919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # hardcode_libdir_flag_spec is actually meaningless, as there is
46929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # no search path for DLLs.
46939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
46949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
46959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Tell ltmain to make .lib files, not .a files.
46969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      libext=lib
46979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Tell ltmain to make .dll files, not .so files.
46989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      shrext_cmds=".dll"
46999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # FIXME: Setting linknames here is a bad hack.
47009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
47019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # The linker will automatically build a .lib file if we build a DLL.
47029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
47039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # FIXME: Should let the user specify the lib program.
47049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
47059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
47069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
47079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
47089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
47099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    darwin* | rhapsody*)
47109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_DARWIN_LINKER_FEATURES($1)
47119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
47129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
47139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    dgux*)
47149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
47159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
47169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
47179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
47189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
47199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    freebsd1*)
47209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(ld_shlibs, $1)=no
47219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
47229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
47239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
47249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # support.  Future versions do this automatically, but an explicit c++rt0.o
47259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # does not break anything, and helps significantly (at the cost of a little
47269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # extra space).
47279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    freebsd2.2*)
47289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
47299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
47309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_direct, $1)=yes
47319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
47329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
47339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
47349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
47359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    freebsd2*)
47369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
47379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_direct, $1)=yes
47389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_minus_L, $1)=yes
47399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
47409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
47419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
47429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
47439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    freebsd* | dragonfly*)
47449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
47459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
47469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_direct, $1)=yes
47479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
47489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
47499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
47509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    hpux9*)
47519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$GCC" = yes; then
47529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_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'
47539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
47549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
47559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
47569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
47579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
47589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_direct, $1)=yes
47599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
47609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # hardcode_minus_L: Not really in the search PATH,
47619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # but as the default location of the library.
47629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_minus_L, $1)=yes
47639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
47649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
47659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
47669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    hpux10*)
47679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
47689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
47699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
47709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
47719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
47729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$with_gnu_ld" = no; then
47739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
47749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
47759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
47769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_direct, $1)=yes
47779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
47789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
47799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# hardcode_minus_L: Not really in the search PATH,
47809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# but as the default location of the library.
47819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_minus_L, $1)=yes
47829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
47839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
47849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
47859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    hpux11*)
47869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
47879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $host_cpu in
47889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	hppa*64*)
47899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
47909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
47919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	ia64*)
47929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
47939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
47949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	*)
47959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
47969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
47979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
47989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
47999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $host_cpu in
48009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	hppa*64*)
48019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
48029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
48039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	ia64*)
48049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
48059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
48069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	*)
48079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
48089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
48099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
48109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
48119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$with_gnu_ld" = no; then
48129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
48139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
48149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
48159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $host_cpu in
48169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	hppa*64*|ia64*)
48179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_direct, $1)=no
48189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
48199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
48209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	*)
48219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_direct, $1)=yes
48229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
48239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
48249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
48259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # hardcode_minus_L: Not really in the search PATH,
48269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # but as the default location of the library.
48279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
48289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
48299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
48309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
48319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
48329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
48339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    irix5* | irix6* | nonstopux*)
48349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$GCC" = yes; then
48359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
48369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# Try to use the -exported_symbol ld option, if it does not
48379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# work, assume that -exports_file does not work either and
48389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# implicitly export all symbols.
48399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        save_LDFLAGS="$LDFLAGS"
48409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
48419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        AC_LINK_IFELSE(int foo(void) {},
48429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
48439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        )
48449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        LDFLAGS="$save_LDFLAGS"
48459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
48469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
48479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
48489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
48499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
48509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
48519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
48529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(inherit_rpath, $1)=yes
48539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(link_all_deplibs, $1)=yes
48549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
48559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
48569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    netbsd*)
48579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
48589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
48599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
48609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
48619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
48629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
48639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_direct, $1)=yes
48649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
48659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
48669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
48679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    newsos6)
48689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
48699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_direct, $1)=yes
48709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
48719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
48729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
48739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
48749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
48759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *nto* | *qnx*)
48769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
48779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
48789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    openbsd*)
48799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test -f /usr/libexec/ld.so; then
48809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_direct, $1)=yes
48819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
48829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
48839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
48849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
48859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
48869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
48879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
48889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	else
48899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  case $host_os in
48909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
48919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
48929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
48939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	     ;;
48949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   *)
48959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
48969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
48979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	     ;;
48989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  esac
48999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi
49009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
49019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(ld_shlibs, $1)=no
49029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
49039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
49049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
49059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    os2*)
49069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
49079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_minus_L, $1)=yes
49089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
49099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
49109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
49119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
49129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
49139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    osf3*)
49149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$GCC" = yes; then
49159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
49169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
49179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
49189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
49199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
49209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
49219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
49229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
49239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
49249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
49259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
49269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    osf4* | osf5*)	# as osf3* with the addition of -msym flag
49279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$GCC" = yes; then
49289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
49299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
49309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
49319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
49329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
49339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
49349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
49359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
49369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
49379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# Both c and cxx compiler support -rpath directly
49389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
49399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
49409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
49419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
49429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
49439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
49449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    solaris*)
49459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
49469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$GCC" = yes; then
49479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	wlarc='${wl}'
49489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
49499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
49509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
49519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
49529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case `$CC -V 2>&1` in
49539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	*"Compilers 5.0"*)
49549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  wlarc=''
49559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
49569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
49579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
49589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
49599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	*)
49609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  wlarc='${wl}'
49619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
49629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
49639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
49649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
49659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
49669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
49679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
49689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
49699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case $host_os in
49709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
49719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *)
49729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# The compiler driver will combine and reorder linker options,
49739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# but understands `-z linker_flag'.  GCC discards it without `$wl',
49749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# but is careful enough not to reorder.
49759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# Supported since Solaris 2.6 (maybe 2.5.1?)
49769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if test "$GCC" = yes; then
49779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
49789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	else
49799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
49809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi
49819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
49829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
49839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(link_all_deplibs, $1)=yes
49849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
49859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
49869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sunos4*)
49879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "x$host_vendor" = xsequent; then
49889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# Use $CC to link under sequent, because it throws in some extra .o
49899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# files that make .init and .fini sections work.
49909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
49919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
49929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
49939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
49949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
49959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_direct, $1)=yes
49969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_minus_L, $1)=yes
49979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
49989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
49999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
50009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sysv4)
50019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case $host_vendor in
50029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	sni)
50039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
50049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
50059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
50069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	siemens)
50079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ## LD is ld it makes a PLAMLIB
50089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ## CC just makes a GrossModule.
50099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
50109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
50119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_direct, $1)=no
50129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
50139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	motorola)
50149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
50159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
50169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
50179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
50189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      runpath_var='LD_RUN_PATH'
50199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
50209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
50219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
50229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sysv4.3*)
50239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
50249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
50259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
50269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
50279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
50289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sysv4*MP*)
50299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test -d /usr/nec; then
50309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
50319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
50329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	runpath_var=LD_RUN_PATH
50339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	hardcode_runpath_var=yes
50349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(ld_shlibs, $1)=yes
50359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
50369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
50379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
50389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
50399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
50409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
50419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
50429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      runpath_var='LD_RUN_PATH'
50439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
50449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$GCC" = yes; then
50459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
50469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
50479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
50489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
50499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
50509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
50519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
50529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
50539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sysv5* | sco3.2v5* | sco5v6*)
50549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Note: We can NOT use -z defs as we might desire, because we do not
50559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # link with -lc, and that would cause any symbols used from libc to
50569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # always be unresolved, which means just about no library would
50579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # ever link correctly.  If we're not using GNU ld we use -z text
50589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # though, which does catch some bad symbols but isn't as heavy-handed
50599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # as -z defs.
50609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
50619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
50629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
50639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
50649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
50659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
50669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(link_all_deplibs, $1)=yes
50679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
50689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      runpath_var='LD_RUN_PATH'
50699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
50709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$GCC" = yes; then
50719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
50729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
50739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
50749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
50759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
50769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
50779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
50789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
50799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    uts4*)
50809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
50819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
50829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
50839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
50849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
50859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *)
50869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(ld_shlibs, $1)=no
50879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
50889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
50899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
50909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test x$host_vendor = xsni; then
50919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case $host in
50929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
50939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
50949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
50959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
50969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
50979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
50989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
50999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
51009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
51019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
51029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
51039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
51049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
51059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
51069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [extract_expsyms_cmds], [2],
51079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [The commands to extract the exported symbol list from a shared archive])
51089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
51099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#
51109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Do we need to explicitly link libc?
51119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#
51129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
51139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallx|xyes)
51149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Assume -lc should be added
51159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
51169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
51179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "$enable_shared" = yes && test "$GCC" = yes; then
51189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $_LT_TAGVAR(archive_cmds, $1) in
51199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *'~'*)
51209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # FIXME: we may have to deal with multi-command sequences.
51219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
51229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    '$CC '*)
51239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Test whether the compiler implicitly links with -lc since on some
51249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # systems, -lgcc has to come before -lc. If gcc already passes -lc
51259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # to ld, don't add -lc before -lgcc.
51269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
51279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      $RM conftest*
51289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
51299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
51309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
51319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        soname=conftest
51329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        lib=conftest
51339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        libobjs=conftest.$ac_objext
51349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        deplibs=
51359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
51369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
51379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        compiler_flags=-v
51389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        linker_flags=-v
51399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        verstring=
51409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        output_objdir=.
51419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        libname=conftest
51429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
51439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(allow_undefined_flag, $1)=
51449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
51459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        then
51469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
51479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        else
51489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
51499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        fi
51509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
51519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
51529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        cat conftest.err 1>&5
51539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
51549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      $RM conftest*
51559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
51569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
51579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
51589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
51599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
51609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
51619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
51629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
51639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Whether or not to add -lc for building shared libraries])
51649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
51659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [enable_shared_with_static_runtimes], [0],
51669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Whether or not to disallow shared libs when runtime libs are static])
51679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
51689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Compiler flag to allow reflexive dlopens])
51699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [whole_archive_flag_spec], [1],
51709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Compiler flag to generate shared objects directly from archives])
51719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [compiler_needs_object], [1],
51729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Whether the compiler copes with passing no objects directly])
51739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
51749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Create an old-style archive from a shared archive])
51759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
51769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Create a temporary old-style archive to link instead of a shared archive])
51779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
51789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [archive_expsym_cmds], [2])
51799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [module_cmds], [2],
51809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Commands used to build a loadable module if different from building
51819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    a shared archive.])
51829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [module_expsym_cmds], [2])
51839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [with_gnu_ld], [1],
51849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Whether we are building with GNU ld or not])
51859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [allow_undefined_flag], [1],
51869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Flag that allows shared libraries with undefined symbols to be built])
51879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [no_undefined_flag], [1],
51889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Flag that enforces no undefined symbols])
51899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
51909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Flag to hardcode $libdir into a binary during linking.
51919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    This must work even if $libdir does not exist])
51929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
51939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [[If ld is used when linking, flag to hardcode $libdir into a binary
51949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    during linking.  This must work even if $libdir does not exist]])
51959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [hardcode_libdir_separator], [1],
51969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Whether we need a single "-rpath" flag with a separated argument])
51979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [hardcode_direct], [0],
51989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
51999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    DIR into the resulting binary])
52009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [hardcode_direct_absolute], [0],
52019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
52029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    DIR into the resulting binary and the resulting library dependency is
52039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
52049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    library is relocated])
52059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [hardcode_minus_L], [0],
52069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
52079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    into the resulting binary])
52089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
52099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
52109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    into the resulting binary])
52119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [hardcode_automatic], [0],
52129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Set to "yes" if building a shared library automatically hardcodes DIR
52139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    into the library and all subsequent libraries and executables linked
52149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    against it])
52159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [inherit_rpath], [0],
52169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Set to yes if linker adds runtime paths of dependent libraries
52179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    to runtime path list])
52189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [link_all_deplibs], [0],
52199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Whether libtool must link a program against all its dependency libraries])
52209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [fix_srcfile_path], [1],
52219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Fix the shell variable $srcfile for the compiler])
52229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [always_export_symbols], [0],
52239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Set to "yes" if exported symbols are required])
52249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [export_symbols_cmds], [2],
52259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [The commands to list exported symbols])
52269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [exclude_expsyms], [1],
52279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Symbols that should not be listed in the preloaded symbols])
52289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [include_expsyms], [1],
52299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Symbols that must always be exported])
52309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [prelink_cmds], [2],
52319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Commands necessary for linking programs (against libraries) with templates])
52329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [file_list_spec], [1],
52339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Specify filename containing input files])
52349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl FIXME: Not yet implemented
52359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
52369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl    [Compiler flag to generate thread safe objects])
52379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_LINKER_SHLIBS
52389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
52399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
52409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_LANG_C_CONFIG([TAG])
52419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------------
52429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Ensure that the configuration variables for a C compiler are suitably
52439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# defined.  These variables are subsequently used by _LT_CONFIG to write
52449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# the compiler configuration to `libtool'.
52459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_LANG_C_CONFIG],
52469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_DECL_EGREP])dnl
52479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_save_CC="$CC"
52489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_LANG_PUSH(C)
52499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
52509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Source file extension for C test sources.
52519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallac_ext=c
52529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
52539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Object file extension for compiled C test sources.
52549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallobjext=o
52559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(objext, $1)=$objext
52569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
52579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Code to be used in simple compile tests
52589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_simple_compile_test_code="int some_variable = 0;"
52599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
52609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Code to be used in simple link tests
52619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_simple_link_test_code='int main(){return(0);}'
52629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
52639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAG_COMPILER
52649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Save the default compiler, since it gets overwritten when the other
52659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
52669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcompiler_DEFAULT=$CC
52679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
52689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# save warnings/boilerplate of simple test code
52699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_COMPILER_BOILERPLATE
52709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_LINKER_BOILERPLATE
52719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
52729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## CAVEAT EMPTOR:
52739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## There is no encapsulation within the following macros, do not change
52749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## the running order or otherwise move them around unless you know exactly
52759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## what you are doing...
52769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n "$compiler"; then
52779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_COMPILER_NO_RTTI($1)
52789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_COMPILER_PIC($1)
52799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_COMPILER_C_O($1)
52809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_COMPILER_FILE_LOCKS($1)
52819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_LINKER_SHLIBS($1)
52829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_SYS_DYNAMIC_LINKER($1)
52839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_LINKER_HARDCODE_LIBPATH($1)
52849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  LT_SYS_DLOPEN_SELF
52859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_CMD_STRIPLIB
52869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
52879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Report which library types will actually be built
52889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_CHECKING([if libtool supports shared libraries])
52899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_RESULT([$can_build_shared])
52909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
52919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_CHECKING([whether to build shared libraries])
52929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  test "$can_build_shared" = "no" && enable_shared=no
52939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
52949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # On AIX, shared libraries and static libraries use the same namespace, and
52959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # are all built from PIC.
52969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $host_os in
52979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  aix3*)
52989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    test "$enable_shared" = yes && enable_static=no
52999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test -n "$RANLIB"; then
53009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      archive_cmds="$archive_cmds~\$RANLIB \$lib"
53019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      postinstall_cmds='$RANLIB $lib'
53029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
53039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
53049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
53059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  aix[[4-9]]*)
53069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
53079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      test "$enable_shared" = yes && enable_static=no
53089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
53099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
53109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
53119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_RESULT([$enable_shared])
53129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
53139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_CHECKING([whether to build static libraries])
53149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Make sure either enable_shared or enable_static is yes.
53159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  test "$enable_shared" = yes || enable_static=yes
53169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_MSG_RESULT([$enable_static])
53179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
53189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_CONFIG($1)
53199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
53209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_LANG_POP
53219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallCC="$lt_save_CC"
53229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_LANG_C_CONFIG
53239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
53249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
53259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_PROG_CXX
53269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------
53279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
53289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# compiler, we have our own version here.
53299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_PROG_CXX],
53309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[
53319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
53329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_PROG_CXX
53339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
53349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
53359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    (test "X$CXX" != "Xg++"))) ; then
53369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  AC_PROG_CXXCPP
53379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
53389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _lt_caught_CXX_error=yes
53399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
53409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallpopdef([AC_MSG_ERROR])
53419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_PROG_CXX
53429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
53439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
53449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([_LT_PROG_CXX], [])
53459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
53469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
53479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_LANG_CXX_CONFIG([TAG])
53489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# --------------------------
53499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Ensure that the configuration variables for a C++ compiler are suitably
53509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# defined.  These variables are subsequently used by _LT_CONFIG to write
53519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# the compiler configuration to `libtool'.
53529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_LANG_CXX_CONFIG],
53539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_REQUIRE([_LT_PROG_CXX])dnl
53549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_FILEUTILS_DEFAULTS])dnl
53559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_require([_LT_DECL_EGREP])dnl
53569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
53579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_LANG_PUSH(C++)
53589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(archive_cmds_need_lc, $1)=no
53599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(allow_undefined_flag, $1)=
53609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(always_export_symbols, $1)=no
53619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(archive_expsym_cmds, $1)=
53629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(compiler_needs_object, $1)=no
53639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(export_dynamic_flag_spec, $1)=
53649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_direct, $1)=no
53659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_direct_absolute, $1)=no
53669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
53679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
53689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_libdir_separator, $1)=
53699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_minus_L, $1)=no
53709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
53719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_automatic, $1)=no
53729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(inherit_rpath, $1)=no
53739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(module_cmds, $1)=
53749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(module_expsym_cmds, $1)=
53759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(link_all_deplibs, $1)=unknown
53769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
53779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(no_undefined_flag, $1)=
53789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(whole_archive_flag_spec, $1)=
53799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
53809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
53819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Source file extension for C++ test sources.
53829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallac_ext=cpp
53839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
53849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Object file extension for compiled C++ test sources.
53859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallobjext=o
53869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(objext, $1)=$objext
53879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
53889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# No sense in running all these tests if we already determined that
53899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# the CXX compiler isn't working.  Some variables (like enable_shared)
53909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# are currently assumed to apply to all compilers on this platform,
53919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# and will be corrupted by setting them based on a non-working compiler.
53929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "$_lt_caught_CXX_error" != yes; then
53939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Code to be used in simple compile tests
53949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_simple_compile_test_code="int some_variable = 0;"
53959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
53969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Code to be used in simple link tests
53979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
53989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
53999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
54009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAG_COMPILER
54019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
54029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # save warnings/boilerplate of simple test code
54039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_COMPILER_BOILERPLATE
54049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_LINKER_BOILERPLATE
54059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
54069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Allow CC to be a program name with arguments.
54079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_save_CC=$CC
54089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_save_LD=$LD
54099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_save_GCC=$GCC
54109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  GCC=$GXX
54119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_save_with_gnu_ld=$with_gnu_ld
54129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_save_path_LD=$lt_cv_path_LD
54139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
54149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
54159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
54169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    $as_unset lt_cv_prog_gnu_ld
54179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
54189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test -n "${lt_cv_path_LDCXX+set}"; then
54199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_path_LD=$lt_cv_path_LDCXX
54209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
54219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    $as_unset lt_cv_path_LD
54229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
54239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  test -z "${LDCXX+set}" || LD=$LDCXX
54249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  CC=${CXX-"c++"}
54259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  compiler=$CC
54269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(compiler, $1)=$CC
54279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_CC_BASENAME([$compiler])
54289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
54299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test -n "$compiler"; then
54309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # We don't want -fno-exception when compiling C++ code, so set the
54319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # no_builtin_flag separately
54329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test "$GXX" = yes; then
54339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
54349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    else
54359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
54369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
54379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
54389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test "$GXX" = yes; then
54399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Set up default GNU C++ configuration
54409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
54419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      LT_PATH_LD
54429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
54439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Check if GNU C++ uses GNU ld as the underlying linker, since the
54449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # archiving commands below assume that GNU ld is being used.
54459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if test "$with_gnu_ld" = yes; then
54469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
54479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
54489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
54499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
54509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
54519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
54529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # If archive_cmds runs LD, not CC, wlarc should be empty
54539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
54549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        #     investigate it a little bit more. (MM)
54559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        wlarc='${wl}'
54569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
54579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # ancient GNU ld didn't support --whole-archive et. al.
54589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
54599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  $GREP 'no-whole-archive' > /dev/null; then
54609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
54619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        else
54629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          _LT_TAGVAR(whole_archive_flag_spec, $1)=
54639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        fi
54649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      else
54659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        with_gnu_ld=no
54669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        wlarc=
54679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
54689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # A generic and very simple default shared library creation
54699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # command for GNU C++ for the case where it uses the native
54709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # linker, instead of GNU ld.  If possible, this setting should
54719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # overridden to take advantage of the native linker features on
54729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # the platform it is being used on.
54739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
54749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
54759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
54769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # Commands to make compiler produce verbose output that lists
54779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # what "hidden" libraries, object files and flags are used when
54789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      # linking a shared library.
54799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
54809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
54819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    else
54829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      GXX=no
54839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      with_gnu_ld=no
54849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      wlarc=
54859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
54869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
54879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # PORTME: fill in a description of your system's C++ link characteristics
54889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
54899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(ld_shlibs, $1)=yes
54909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $host_os in
54919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      aix3*)
54929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # FIXME: insert proper C++ library support
54939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(ld_shlibs, $1)=no
54949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
54959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      aix[[4-9]]*)
54969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        if test "$host_cpu" = ia64; then
54979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          # On IA64, the linker does run time linking by default, so we don't
54989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          # have to do anything special.
54999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          aix_use_runtimelinking=no
55009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          exp_sym_flag='-Bexport'
55019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          no_entry_flag=""
55029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        else
55039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          aix_use_runtimelinking=no
55049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
55059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          # Test if we are trying to use run time linking or normal
55069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
55079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          # need to do runtime linking.
55089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
55099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    for ld_flag in $LDFLAGS; do
55109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      case $ld_flag in
55119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      *-brtl*)
55129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        aix_use_runtimelinking=yes
55139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        break
55149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        ;;
55159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      esac
55169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    done
55179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
55189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          esac
55199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
55209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          exp_sym_flag='-bexport'
55219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          no_entry_flag='-bnoentry'
55229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        fi
55239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
55249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # When large executables or shared objects are built, AIX ld can
55259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # have problems creating the table of contents.  If linking a library
55269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # or program results in "error TOC overflow" add -mminimal-toc to
55279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
55289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
55299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
55309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(archive_cmds, $1)=''
55319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(hardcode_direct, $1)=yes
55329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
55339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
55349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(link_all_deplibs, $1)=yes
55359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
55369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
55379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        if test "$GXX" = yes; then
55389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          case $host_os in aix4.[[012]]|aix4.[[012]].*)
55399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          # We only want to do this on AIX 4.2 and lower, the check
55409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          # below for broken collect2 doesn't work under 4.3+
55419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  collect2name=`${CC} -print-prog-name=collect2`
55429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  if test -f "$collect2name" &&
55439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
55449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  then
55459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # We have reworked collect2
55469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    :
55479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  else
55489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # We have old collect2
55499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
55509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # It fails to find uninstalled libraries when the uninstalled
55519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # path is not listed in the libpath.  Setting hardcode_minus_L
55529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # to unsupported forces relinking
55539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
55549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
55559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
55569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  fi
55579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          esac
55589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          shared_flag='-shared'
55599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  if test "$aix_use_runtimelinking" = yes; then
55609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    shared_flag="$shared_flag "'${wl}-G'
55619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  fi
55629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        else
55639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          # not using gcc
55649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          if test "$host_cpu" = ia64; then
55659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
55669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # chokes on -Wl,-G. The following line is correct:
55679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  shared_flag='-G'
55689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          else
55699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    if test "$aix_use_runtimelinking" = yes; then
55709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      shared_flag='${wl}-G'
55719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    else
55729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      shared_flag='${wl}-bM:SRE'
55739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    fi
55749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          fi
55759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        fi
55769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
55779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
55789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # It seems that -bexpall does not export symbols beginning with
55799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # underscore (_), so it is better to generate a list of symbols to
55809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# export.
55819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(always_export_symbols, $1)=yes
55829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        if test "$aix_use_runtimelinking" = yes; then
55839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          # Warning - without using the other runtime loading flags (-brtl),
55849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          # -berok will link without error, but may produce a broken library.
55859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
55869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          # Determine the default libpath from the value encoded in an empty
55879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          # executable.
55889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          _LT_SYS_MODULE_PATH_AIX
55899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
55909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
55919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          _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"
55929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        else
55939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          if test "$host_cpu" = ia64; then
55949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
55959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
55969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _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"
55979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          else
55989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Determine the default libpath from the value encoded in an
55999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # empty executable.
56009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_SYS_MODULE_PATH_AIX
56019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
56029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Warning - without using the other run time loading flags,
56039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # -berok will link without error, but may produce a broken library.
56049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
56059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
56069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Exported symbols can be pulled into shared objects from archives
56079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
56089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
56099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # This is similar to how AIX traditionally builds its shared
56109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # libraries.
56119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _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'
56129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          fi
56139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        fi
56149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
56159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
56169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      beos*)
56179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
56189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
56199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
56209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # support --undefined.  This deserves some investigation.  FIXME
56219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
56229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	else
56239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(ld_shlibs, $1)=no
56249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi
56259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
56269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
56279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      chorus*)
56289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        case $cc_basename in
56299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          *)
56309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  # FIXME: insert proper C++ library support
56319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(ld_shlibs, $1)=no
56329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
56339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        esac
56349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
56359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
56369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      cygwin* | mingw* | pw32* | cegcc*)
56379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
56389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # as there is no search path for DLLs.
56399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
56409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
56419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(always_export_symbols, $1)=no
56429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
56439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
56449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
56459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
56469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          # If the export-symbols file already is a .def file (1st line
56479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          # is EXPORTS), use it as is; otherwise, prepend...
56489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
56499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    cp $export_symbols $output_objdir/$soname.def;
56509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          else
56519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    echo EXPORTS > $output_objdir/$soname.def;
56529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    cat $export_symbols >> $output_objdir/$soname.def;
56539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          fi~
56549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
56559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        else
56569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          _LT_TAGVAR(ld_shlibs, $1)=no
56579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        fi
56589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
56599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      darwin* | rhapsody*)
56609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_DARWIN_LINKER_FEATURES($1)
56619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
56629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
56639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      dgux*)
56649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        case $cc_basename in
56659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          ec++*)
56669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # FIXME: insert proper C++ library support
56679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(ld_shlibs, $1)=no
56689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
56699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          ghcx*)
56709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Green Hills C++ Compiler
56719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # FIXME: insert proper C++ library support
56729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(ld_shlibs, $1)=no
56739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
56749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          *)
56759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # FIXME: insert proper C++ library support
56769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(ld_shlibs, $1)=no
56779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
56789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        esac
56799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
56809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
56819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      freebsd[[12]]*)
56829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # C++ shared libraries reported to be fairly broken before
56839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# switch to ELF
56849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(ld_shlibs, $1)=no
56859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
56869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
56879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      freebsd-elf*)
56889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
56899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
56909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
56919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      freebsd* | dragonfly*)
56929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
56939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # conventions
56949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(ld_shlibs, $1)=yes
56959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
56969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
56979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      gnu*)
56989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
56999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
57009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      hpux9*)
57019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
57029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
57039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
57049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(hardcode_direct, $1)=yes
57059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
57069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall				             # but as the default
57079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall				             # location of the library.
57089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
57099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        case $cc_basename in
57109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          CC*)
57119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            # FIXME: insert proper C++ library support
57129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(ld_shlibs, $1)=no
57139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            ;;
57149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          aCC*)
57159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
57169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            # Commands to make compiler produce verbose output that lists
57179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            # what "hidden" libraries, object files and flags are used when
57189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            # linking a shared library.
57199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            #
57209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            # There doesn't appear to be a way to prevent this compiler from
57219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            # explicitly linking system object files so we need to strip them
57229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            # from the output so that they don't get included in the library
57239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            # dependencies.
57249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
57259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            ;;
57269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          *)
57279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            if test "$GXX" = yes; then
57289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
57299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            else
57309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall              # FIXME: insert proper C++ library support
57319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall              _LT_TAGVAR(ld_shlibs, $1)=no
57329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            fi
57339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            ;;
57349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        esac
57359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
57369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
57379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      hpux10*|hpux11*)
57389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        if test $with_gnu_ld = no; then
57399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
57409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
57419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
57429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          case $host_cpu in
57439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            hppa*64*|ia64*)
57449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall              ;;
57459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            *)
57469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
57479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall              ;;
57489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          esac
57499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        fi
57509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        case $host_cpu in
57519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          hppa*64*|ia64*)
57529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(hardcode_direct, $1)=no
57539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
57549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            ;;
57559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          *)
57569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(hardcode_direct, $1)=yes
57579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
57589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
57599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall					         # but as the default
57609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall					         # location of the library.
57619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            ;;
57629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        esac
57639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
57649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        case $cc_basename in
57659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          CC*)
57669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # FIXME: insert proper C++ library support
57679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(ld_shlibs, $1)=no
57689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
57699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          aCC*)
57709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    case $host_cpu in
57719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      hppa*64*)
57729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
57739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        ;;
57749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      ia64*)
57759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
57769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        ;;
57779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      *)
57789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
57799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        ;;
57809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    esac
57819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Commands to make compiler produce verbose output that lists
57829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # what "hidden" libraries, object files and flags are used when
57839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # linking a shared library.
57849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    #
57859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # There doesn't appear to be a way to prevent this compiler from
57869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # explicitly linking system object files so we need to strip them
57879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # from the output so that they don't get included in the library
57889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # dependencies.
57899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
57909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
57919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          *)
57929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    if test "$GXX" = yes; then
57939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      if test $with_gnu_ld = no; then
57949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        case $host_cpu in
57959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	          hppa*64*)
57969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
57979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	            ;;
57989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	          ia64*)
57999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
58009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	            ;;
58019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	          *)
58029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
58039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	            ;;
58049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        esac
58059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      fi
58069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    else
58079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      # FIXME: insert proper C++ library support
58089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(ld_shlibs, $1)=no
58099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    fi
58109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
58119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        esac
58129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
58139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
58149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      interix[[3-9]]*)
58159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_direct, $1)=no
58169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
58189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
58199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
58209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# Instead, shared libraries are loaded at an image base (0x10000000 by
58219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# default) and relocated if they conflict, which is a slow very memory
58229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# consuming and fragmenting process.  To avoid this, we pick a random,
58239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
58249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
58259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_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'
58269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_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'
58279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
58289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      irix5* | irix6*)
58299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        case $cc_basename in
58309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          CC*)
58319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # SGI C++
58329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
58339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
58349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Archives containing C++ object files must be created using
58359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
58369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # necessary to make sure instantiated templates are included
58379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # in the archive.
58389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
58399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
58409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          *)
58419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    if test "$GXX" = yes; then
58429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      if test "$with_gnu_ld" = no; then
58439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
58449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      else
58459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
58469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      fi
58479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    fi
58489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(link_all_deplibs, $1)=yes
58499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
58509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        esac
58519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
58529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
58539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(inherit_rpath, $1)=yes
58549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
58559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
58569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      linux* | k*bsd*-gnu)
58579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        case $cc_basename in
58589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          KCC*)
58599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Kuck and Associates, Inc. (KAI) C++ Compiler
58609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
58619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # KCC will only create a shared library if the output file
58629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
58639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # to its proper name (with version) after linking.
58649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
58659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
58669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Commands to make compiler produce verbose output that lists
58679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # what "hidden" libraries, object files and flags are used when
58689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # linking a shared library.
58699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    #
58709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # There doesn't appear to be a way to prevent this compiler from
58719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # explicitly linking system object files so we need to strip them
58729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # from the output so that they don't get included in the library
58739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # dependencies.
58749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
58759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
58769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
58779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
58789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
58799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Archives containing C++ object files must be created using
58809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
58819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
58829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
58839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  icpc* | ecpc* )
58849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Intel C++
58859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    with_gnu_ld=yes
58869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # version 8.0 and above of icpc choke on multiply defined symbols
58879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # if we add $predep_objects and $postdep_objects, however 7.1 and
58889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # earlier do not add the objects themselves.
58899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    case `$CC -V 2>&1` in
58909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      *"Version 7."*)
58919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
58929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
58939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		;;
58949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      *)  # Version 8.0 or newer
58959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        tmp_idyn=
58969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        case $host_cpu in
58979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		  ia64*) tmp_idyn=' -i_dynamic';;
58989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		esac
58999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
59009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
59019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		;;
59029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    esac
59039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
59049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
59059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
59069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
59079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
59089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          pgCC* | pgcpp*)
59099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            # Portland Group C++ compiler
59109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    case `$CC -V` in
59119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
59129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
59139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		rm -rf $tpldir~
59149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
59159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
59169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
59179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		rm -rf $tpldir~
59189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
59199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
59209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		$RANLIB $oldlib'
59219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
59229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		rm -rf $tpldir~
59239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
59249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
59259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
59269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		rm -rf $tpldir~
59279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
59289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
59299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      ;;
59309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    *) # Version 6 will use weak symbols
59319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
59329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
59339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      ;;
59349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    esac
59359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
59369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
59379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
59389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _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'
59399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            ;;
59409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  cxx*)
59419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Compaq C++
59429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
59439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
59449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
59459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    runpath_var=LD_RUN_PATH
59469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
59479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
59489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
59499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Commands to make compiler produce verbose output that lists
59509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # what "hidden" libraries, object files and flags are used when
59519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # linking a shared library.
59529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    #
59539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # There doesn't appear to be a way to prevent this compiler from
59549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # explicitly linking system object files so we need to strip them
59559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # from the output so that they don't get included in the library
59569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # dependencies.
59579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
59589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
59599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  xl*)
59609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # IBM XL 8.0 on PPC, with GNU ld
59619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
59629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
59639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
59649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    if test "x$supports_anon_versioning" = xyes; then
59659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
59669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
59679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		echo "local: *; };" >> $output_objdir/$libname.ver~
59689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
59699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    fi
59709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
59719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  *)
59729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    case `$CC -V 2>&1 | sed 5q` in
59739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    *Sun\ C*)
59749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      # Sun C++ 5.9
59759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
59769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
59779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
59789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
59799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _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'
59809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(compiler_needs_object, $1)=yes
59819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
59829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      # Not sure whether something based on
59839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
59849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      # would be better.
59859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      output_verbose_link_cmd='echo'
59869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
59879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      # Archives containing C++ object files must be created using
59889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
59899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      # necessary to make sure instantiated templates are included
59909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      # in the archive.
59919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
59929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      ;;
59939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    esac
59949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
59959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
59969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
59979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
59989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lynxos*)
59999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # FIXME: insert proper C++ library support
60009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(ld_shlibs, $1)=no
60019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
60029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
60039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      m88k*)
60049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # FIXME: insert proper C++ library support
60059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(ld_shlibs, $1)=no
60069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
60079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
60089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      mvs*)
60099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        case $cc_basename in
60109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          cxx*)
60119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # FIXME: insert proper C++ library support
60129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(ld_shlibs, $1)=no
60139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
60149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  *)
60159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # FIXME: insert proper C++ library support
60169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(ld_shlibs, $1)=no
60179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
60189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
60199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
60209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
60219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      netbsd*)
60229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
60239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
60249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  wlarc=
60259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
60269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_direct, $1)=yes
60279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi
60299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# Workaround some broken pre-1.5 toolchains
60309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
60319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
60329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
60339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *nto* | *qnx*)
60349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(ld_shlibs, $1)=yes
60359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
60369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
60379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      openbsd2*)
60389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # C++ shared libraries are fairly broken
60399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(ld_shlibs, $1)=no
60409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
60419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
60429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      openbsd*)
60439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if test -f /usr/libexec/ld.so; then
60449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_direct, $1)=yes
60459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
60479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
60489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
60499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
60509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
60519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
60529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
60539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  fi
60549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  output_verbose_link_cmd=echo
60559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	else
60569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(ld_shlibs, $1)=no
60579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi
60589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	;;
60599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
60609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      osf3* | osf4* | osf5*)
60619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        case $cc_basename in
60629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          KCC*)
60639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Kuck and Associates, Inc. (KAI) C++ Compiler
60649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
60659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # KCC will only create a shared library if the output file
60669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
60679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # to its proper name (with version) after linking.
60689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
60699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
60709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
60719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
60729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
60739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Archives containing C++ object files must be created using
60749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # the KAI C++ compiler.
60759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    case $host in
60769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
60779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
60789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    esac
60799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
60809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          RCC*)
60819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Rational C++ 2.4.1
60829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # FIXME: insert proper C++ library support
60839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(ld_shlibs, $1)=no
60849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
60859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          cxx*)
60869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    case $host in
60879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      osf3*)
60889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
60899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
60909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
60919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		;;
60929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      *)
60939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
60949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
60959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
60969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	          echo "-hidden">> $lib.exp~
60979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
60989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	          $RM $lib.exp'
60999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
61009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		;;
61019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    esac
61029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
61039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
61049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
61059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Commands to make compiler produce verbose output that lists
61069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # what "hidden" libraries, object files and flags are used when
61079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # linking a shared library.
61089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    #
61099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # There doesn't appear to be a way to prevent this compiler from
61109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # explicitly linking system object files so we need to strip them
61119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # from the output so that they don't get included in the library
61129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # dependencies.
61139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
61149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
61159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  *)
61169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
61179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
61189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      case $host in
61199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        osf3*)
61209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
61219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		  ;;
61229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        *)
61239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
61249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		  ;;
61259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      esac
61269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
61279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
61289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
61299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
61309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      # Commands to make compiler produce verbose output that lists
61319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      # what "hidden" libraries, object files and flags are used when
61329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      # linking a shared library.
61339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
61349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
61359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    else
61369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      # FIXME: insert proper C++ library support
61379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(ld_shlibs, $1)=no
61389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    fi
61399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
61409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        esac
61419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
61429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
61439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      psos*)
61449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # FIXME: insert proper C++ library support
61459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(ld_shlibs, $1)=no
61469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
61479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
61489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      sunos4*)
61499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        case $cc_basename in
61509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          CC*)
61519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Sun C++ 4.x
61529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # FIXME: insert proper C++ library support
61539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(ld_shlibs, $1)=no
61549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
61559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          lcc*)
61569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Lucid
61579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # FIXME: insert proper C++ library support
61589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(ld_shlibs, $1)=no
61599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
61609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          *)
61619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # FIXME: insert proper C++ library support
61629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(ld_shlibs, $1)=no
61639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
61649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        esac
61659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
61669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
61679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      solaris*)
61689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        case $cc_basename in
61699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          CC*)
61709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Sun C++ 4.2, 5.x and Centerline C++
61719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
61729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
61739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
61749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
61759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
61769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
61779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
61789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
61799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    case $host_os in
61809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
61819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      *)
61829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		# The compiler driver will combine and reorder linker options,
61839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		# but understands `-z linker_flag'.
61849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        # Supported since Solaris 2.6 (maybe 2.5.1?)
61859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
61869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        ;;
61879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    esac
61889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(link_all_deplibs, $1)=yes
61899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
61909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    output_verbose_link_cmd='echo'
61919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
61929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Archives containing C++ object files must be created using
61939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
61949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # necessary to make sure instantiated templates are included
61959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # in the archive.
61969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
61979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
61989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          gcx*)
61999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # Green Hills C++ Compiler
62009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
62019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
62029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # The C++ compiler must be used to create the archive.
62039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
62049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
62059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          *)
62069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # GNU C++ compiler with Solaris linker
62079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
62089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
62099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
62109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
62119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
62129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
62139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
62149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        # Commands to make compiler produce verbose output that lists
62159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        # what "hidden" libraries, object files and flags are used when
62169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        # linking a shared library.
62179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
62189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      else
62199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
62209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        # platform.
62219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
62229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
62239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
62249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
62259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        # Commands to make compiler produce verbose output that lists
62269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        # what "hidden" libraries, object files and flags are used when
62279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        # linking a shared library.
62289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
62299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      fi
62309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
62319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
62329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      case $host_os in
62339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
62349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		*)
62359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
62369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		  ;;
62379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	      esac
62389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    fi
62399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
62409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        esac
62419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
62429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
62439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
62449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
62459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
62469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
62479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      runpath_var='LD_RUN_PATH'
62489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
62499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      case $cc_basename in
62509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        CC*)
62519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
62529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
62539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
62549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	*)
62559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
62569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
62579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  ;;
62589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      esac
62599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
62609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
62619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      sysv5* | sco3.2v5* | sco5v6*)
62629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# Note: We can NOT use -z defs as we might desire, because we do not
62639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# link with -lc, and that would cause any symbols used from libc to
62649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# always be unresolved, which means just about no library would
62659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# ever link correctly.  If we're not using GNU ld we use -z text
62669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# though, which does catch some bad symbols but isn't as heavy-handed
62679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	# as -z defs.
62689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
62699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
62709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
62719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
62729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
62739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
62749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(link_all_deplibs, $1)=yes
62759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
62769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	runpath_var='LD_RUN_PATH'
62779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
62789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	case $cc_basename in
62799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          CC*)
62809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
62819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
62829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
62839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  *)
62849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
62859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
62869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
62879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	esac
62889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
62899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
62909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      tandem*)
62919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        case $cc_basename in
62929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          NCC*)
62939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # NonStop-UX NCC 3.20
62949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # FIXME: insert proper C++ library support
62959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(ld_shlibs, $1)=no
62969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
62979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          *)
62989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    # FIXME: insert proper C++ library support
62999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    _LT_TAGVAR(ld_shlibs, $1)=no
63009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    ;;
63019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        esac
63029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
63039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
63049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      vxworks*)
63059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # FIXME: insert proper C++ library support
63069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(ld_shlibs, $1)=no
63079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
63089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
63099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      *)
63109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        # FIXME: insert proper C++ library support
63119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        _LT_TAGVAR(ld_shlibs, $1)=no
63129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
63139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
63149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
63159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
63169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
63179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
63189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(GCC, $1)="$GXX"
63199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(LD, $1)="$LD"
63209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
63219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ## CAVEAT EMPTOR:
63229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ## There is no encapsulation within the following macros, do not change
63239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ## the running order or otherwise move them around unless you know exactly
63249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ## what you are doing...
63259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_SYS_HIDDEN_LIBDEPS($1)
63269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_COMPILER_PIC($1)
63279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_COMPILER_C_O($1)
63289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_COMPILER_FILE_LOCKS($1)
63299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_LINKER_SHLIBS($1)
63309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_SYS_DYNAMIC_LINKER($1)
63319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_LINKER_HARDCODE_LIBPATH($1)
63329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
63339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_CONFIG($1)
63349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi # test -n "$compiler"
63359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
63369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  CC=$lt_save_CC
63379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  LDCXX=$LD
63389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  LD=$lt_save_LD
63399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  GCC=$lt_save_GCC
63409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  with_gnu_ld=$lt_save_with_gnu_ld
63419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_path_LDCXX=$lt_cv_path_LD
63429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_path_LD=$lt_save_path_LD
63439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
63449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
63459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi # test "$_lt_caught_CXX_error" != yes
63469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
63479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_LANG_POP
63489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_LANG_CXX_CONFIG
63499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
63509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
63519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
63529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ---------------------------------
63539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Figure out "hidden" library dependencies from verbose
63549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# compiler output when linking a shared library.
63559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Parse the compiler output and extract the necessary
63569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# objects, libraries and library flags.
63579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
63589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
63599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Dependencies to place before and after the object being linked:
63609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(predep_objects, $1)=
63619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(postdep_objects, $1)=
63629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(predeps, $1)=
63639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(postdeps, $1)=
63649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(compiler_lib_search_path, $1)=
63659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
63669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl we can't use the lt_simple_compile_test_code here,
63679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl because it contains code intended for an executable,
63689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl not a library.  It's possible we should let each
63699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl tag define a new lt_????_link_test_code variable,
63709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl but it's only used here...
63719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
63729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallint a;
63739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallvoid foo (void) { a = 0; }
63749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
63759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
63769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallclass Foo
63779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
63789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallpublic:
63799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  Foo (void) { a = 0; }
63809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallprivate:
63819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  int a;
63829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall};
63839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
63849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
63859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      subroutine foo
63869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      implicit none
63879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      integer*4 a
63889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      a=0
63899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      return
63909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      end
63919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
63929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
63939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      subroutine foo
63949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      implicit none
63959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      integer a
63969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      a=0
63979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      return
63989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      end
63999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
64009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
64019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallpublic class foo {
64029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  private int a;
64039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  public void bar (void) {
64049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    a = 0;
64059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  }
64069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall};
64079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
64089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
64099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl Parse the compiler output and extract the necessary
64109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl objects, libraries and library flags.
64119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif AC_TRY_EVAL(ac_compile); then
64129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Parse the compiler output and extract the necessary
64139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # objects, libraries and library flags.
64149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
64159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Sentinel used to keep track of whether or not we are before
64169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # the conftest object file.
64179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  pre_test_object_deps_done=no
64189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
64199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  for p in `eval "$output_verbose_link_cmd"`; do
64209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $p in
64219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
64229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    -L* | -R* | -l*)
64239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       # Some compilers place space between "-{L,R}" and the path.
64249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       # Remove the space.
64259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       if test $p = "-L" ||
64269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          test $p = "-R"; then
64279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 prev=$p
64289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 continue
64299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       else
64309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 prev=
64319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       fi
64329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
64339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       if test "$pre_test_object_deps_done" = no; then
64349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 case $p in
64359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 -L* | -R*)
64369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   # Internal compiler library paths should come after those
64379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   # provided the user.  The postdeps already come after the
64389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   # user supplied libs so there is no need to process them.
64399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
64409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
64419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   else
64429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
64439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   fi
64449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   ;;
64459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 # The "-l" case would never come before the object being
64469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 # linked, so don't bother handling this case.
64479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 esac
64489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       else
64499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
64509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
64519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 else
64529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
64539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 fi
64549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       fi
64559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       ;;
64569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
64579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *.$objext)
64589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       # This assumes that the test object file only shows up
64599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       # once in the compiler output.
64609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       if test "$p" = "conftest.$objext"; then
64619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 pre_test_object_deps_done=yes
64629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 continue
64639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       fi
64649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
64659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       if test "$pre_test_object_deps_done" = no; then
64669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
64679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   _LT_TAGVAR(predep_objects, $1)="$p"
64689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 else
64699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
64709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 fi
64719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       else
64729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
64739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   _LT_TAGVAR(postdep_objects, $1)="$p"
64749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 else
64759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
64769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	 fi
64779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       fi
64789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall       ;;
64799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
64809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *) ;; # Ignore the rest.
64819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
64829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
64839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  done
64849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
64859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Clean up.
64869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  rm -f a.out a.exe
64879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
64889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  echo "libtool.m4: error: problem compiling $1 test program"
64899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
64909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
64919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall$RM -f confest.$objext
64929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
64939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# PORTME: override above test on systems where it is broken
64949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_if([$1], [CXX],
64959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[case $host_os in
64969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallinterix[[3-9]]*)
64979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Interix 3.5 installs completely hosed .la files for C++, so rather than
64989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # hack all around it, let's just trust "g++" to DTRT.
64999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(predep_objects,$1)=
65009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(postdep_objects,$1)=
65019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(postdeps,$1)=
65029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
65039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
65049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllinux*)
65059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case `$CC -V 2>&1 | sed 5q` in
65069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *Sun\ C*)
65079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Sun C++ 5.9
65089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
65099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # The more standards-conforming stlport4 library is
65109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # incompatible with the Cstd library. Avoid specifying
65119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # it if it's in CXXFLAGS. Ignore libCrun as
65129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # -library=stlport4 depends on it.
65139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case " $CXX $CXXFLAGS " in
65149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *" -library=stlport4 "*)
65159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      solaris_use_stlport4=yes
65169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
65179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
65189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
65199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test "$solaris_use_stlport4" != yes; then
65209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
65219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
65229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
65239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
65249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
65259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
65269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallsolaris*)
65279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case $cc_basename in
65289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  CC*)
65299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # The more standards-conforming stlport4 library is
65309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # incompatible with the Cstd library. Avoid specifying
65319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # it if it's in CXXFLAGS. Ignore libCrun as
65329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # -library=stlport4 depends on it.
65339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case " $CXX $CXXFLAGS " in
65349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *" -library=stlport4 "*)
65359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      solaris_use_stlport4=yes
65369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      ;;
65379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
65389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
65399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Adding this requires a known-good setup of shared libraries for
65409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Sun compiler versions before 5.6, else PIC objects from an old
65419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # archive will be linked into the output, leading to subtle bugs.
65429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test "$solaris_use_stlport4" != yes; then
65439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
65449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
65459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
65469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
65479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
65489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
65499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
65509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
65519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase " $_LT_TAGVAR(postdeps, $1) " in
65529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
65539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
65549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall _LT_TAGVAR(compiler_lib_search_dirs, $1)=
65559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
65569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
65579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
65589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
65599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [The directories searched by this compiler when creating a shared library])
65609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [predep_objects], [1],
65619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Dependencies to place before and after the objects being linked to
65629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    create a shared library])
65639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [postdep_objects], [1])
65649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [predeps], [1])
65659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [postdeps], [1])
65669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGDECL([], [compiler_lib_search_path], [1],
65679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [The library search path used internally by the compiler when linking
65689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    a shared library])
65699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_SYS_HIDDEN_LIBDEPS
65709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
65719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
65729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_PROG_F77
65739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------
65749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Since AC_PROG_F77 is broken, in that it returns the empty string
65759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# if there is no fortran compiler, we have our own version here.
65769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_PROG_F77],
65779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[
65789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
65799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_PROG_F77
65809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -z "$F77" || test "X$F77" = "Xno"; then
65819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _lt_disable_F77=yes
65829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
65839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallpopdef([AC_MSG_ERROR])
65849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_PROG_F77
65859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
65869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
65879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([_LT_PROG_F77], [])
65889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
65899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
65909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_LANG_F77_CONFIG([TAG])
65919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# --------------------------
65929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Ensure that the configuration variables for a Fortran 77 compiler are
65939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# suitably defined.  These variables are subsequently used by _LT_CONFIG
65949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# to write the compiler configuration to `libtool'.
65959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_LANG_F77_CONFIG],
65969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_REQUIRE([_LT_PROG_F77])dnl
65979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_LANG_PUSH(Fortran 77)
65989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
65999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(archive_cmds_need_lc, $1)=no
66009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(allow_undefined_flag, $1)=
66019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(always_export_symbols, $1)=no
66029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(archive_expsym_cmds, $1)=
66039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(export_dynamic_flag_spec, $1)=
66049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_direct, $1)=no
66059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_direct_absolute, $1)=no
66069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
66079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
66089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_libdir_separator, $1)=
66099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_minus_L, $1)=no
66109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_automatic, $1)=no
66119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(inherit_rpath, $1)=no
66129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(module_cmds, $1)=
66139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(module_expsym_cmds, $1)=
66149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(link_all_deplibs, $1)=unknown
66159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
66169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(no_undefined_flag, $1)=
66179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(whole_archive_flag_spec, $1)=
66189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
66199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
66209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Source file extension for f77 test sources.
66219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallac_ext=f
66229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
66239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Object file extension for compiled f77 test sources.
66249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallobjext=o
66259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(objext, $1)=$objext
66269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
66279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# No sense in running all these tests if we already determined that
66289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# the F77 compiler isn't working.  Some variables (like enable_shared)
66299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# are currently assumed to apply to all compilers on this platform,
66309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# and will be corrupted by setting them based on a non-working compiler.
66319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "$_lt_disable_F77" != yes; then
66329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Code to be used in simple compile tests
66339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_simple_compile_test_code="\
66349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      subroutine t
66359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      return
66369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      end
66379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall"
66389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
66399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Code to be used in simple link tests
66409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_simple_link_test_code="\
66419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      program t
66429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      end
66439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall"
66449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
66459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
66469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAG_COMPILER
66479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
66489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # save warnings/boilerplate of simple test code
66499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_COMPILER_BOILERPLATE
66509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_LINKER_BOILERPLATE
66519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
66529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Allow CC to be a program name with arguments.
66539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_save_CC="$CC"
66549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_save_GCC=$GCC
66559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  CC=${F77-"f77"}
66569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  compiler=$CC
66579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(compiler, $1)=$CC
66589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_CC_BASENAME([$compiler])
66599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  GCC=$G77
66609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test -n "$compiler"; then
66619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_MSG_CHECKING([if libtool supports shared libraries])
66629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_MSG_RESULT([$can_build_shared])
66639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
66649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_MSG_CHECKING([whether to build shared libraries])
66659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    test "$can_build_shared" = "no" && enable_shared=no
66669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
66679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # On AIX, shared libraries and static libraries use the same namespace, and
66689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # are all built from PIC.
66699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $host_os in
66709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      aix3*)
66719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        test "$enable_shared" = yes && enable_static=no
66729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        if test -n "$RANLIB"; then
66739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          archive_cmds="$archive_cmds~\$RANLIB \$lib"
66749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          postinstall_cmds='$RANLIB $lib'
66759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        fi
66769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
66779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      aix[[4-9]]*)
66789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
66799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  test "$enable_shared" = yes && enable_static=no
66809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi
66819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
66829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
66839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_MSG_RESULT([$enable_shared])
66849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
66859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_MSG_CHECKING([whether to build static libraries])
66869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Make sure either enable_shared or enable_static is yes.
66879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    test "$enable_shared" = yes || enable_static=yes
66889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_MSG_RESULT([$enable_static])
66899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
66909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(GCC, $1)="$G77"
66919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(LD, $1)="$LD"
66929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
66939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ## CAVEAT EMPTOR:
66949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ## There is no encapsulation within the following macros, do not change
66959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ## the running order or otherwise move them around unless you know exactly
66969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ## what you are doing...
66979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_COMPILER_PIC($1)
66989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_COMPILER_C_O($1)
66999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_COMPILER_FILE_LOCKS($1)
67009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_LINKER_SHLIBS($1)
67019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_SYS_DYNAMIC_LINKER($1)
67029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_LINKER_HARDCODE_LIBPATH($1)
67039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
67049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_CONFIG($1)
67059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi # test -n "$compiler"
67069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
67079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  GCC=$lt_save_GCC
67089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  CC="$lt_save_CC"
67099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi # test "$_lt_disable_F77" != yes
67109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
67119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_LANG_POP
67129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_LANG_F77_CONFIG
67139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
67149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
67159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_PROG_FC
67169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -----------
67179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Since AC_PROG_FC is broken, in that it returns the empty string
67189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# if there is no fortran compiler, we have our own version here.
67199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_PROG_FC],
67209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[
67219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
67229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_PROG_FC
67239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -z "$FC" || test "X$FC" = "Xno"; then
67249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _lt_disable_FC=yes
67259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
67269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallpopdef([AC_MSG_ERROR])
67279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_PROG_FC
67289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
67299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
67309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([_LT_PROG_FC], [])
67319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
67329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
67339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_LANG_FC_CONFIG([TAG])
67349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -------------------------
67359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Ensure that the configuration variables for a Fortran compiler are
67369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# suitably defined.  These variables are subsequently used by _LT_CONFIG
67379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# to write the compiler configuration to `libtool'.
67389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_LANG_FC_CONFIG],
67399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_REQUIRE([_LT_PROG_FC])dnl
67409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_LANG_PUSH(Fortran)
67419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
67429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(archive_cmds_need_lc, $1)=no
67439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(allow_undefined_flag, $1)=
67449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(always_export_symbols, $1)=no
67459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(archive_expsym_cmds, $1)=
67469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(export_dynamic_flag_spec, $1)=
67479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_direct, $1)=no
67489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_direct_absolute, $1)=no
67499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
67509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
67519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_libdir_separator, $1)=
67529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_minus_L, $1)=no
67539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(hardcode_automatic, $1)=no
67549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(inherit_rpath, $1)=no
67559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(module_cmds, $1)=
67569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(module_expsym_cmds, $1)=
67579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(link_all_deplibs, $1)=unknown
67589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
67599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(no_undefined_flag, $1)=
67609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(whole_archive_flag_spec, $1)=
67619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
67629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
67639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Source file extension for fc test sources.
67649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallac_ext=${ac_fc_srcext-f}
67659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
67669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Object file extension for compiled fc test sources.
67679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallobjext=o
67689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(objext, $1)=$objext
67699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
67709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# No sense in running all these tests if we already determined that
67719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# the FC compiler isn't working.  Some variables (like enable_shared)
67729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# are currently assumed to apply to all compilers on this platform,
67739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# and will be corrupted by setting them based on a non-working compiler.
67749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test "$_lt_disable_FC" != yes; then
67759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Code to be used in simple compile tests
67769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_simple_compile_test_code="\
67779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      subroutine t
67789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      return
67799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      end
67809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall"
67819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
67829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Code to be used in simple link tests
67839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_simple_link_test_code="\
67849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      program t
67859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      end
67869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall"
67879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
67889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
67899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAG_COMPILER
67909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
67919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # save warnings/boilerplate of simple test code
67929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_COMPILER_BOILERPLATE
67939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_LINKER_BOILERPLATE
67949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
67959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Allow CC to be a program name with arguments.
67969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_save_CC="$CC"
67979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_save_GCC=$GCC
67989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  CC=${FC-"f95"}
67999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  compiler=$CC
68009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  GCC=$ac_cv_fc_compiler_gnu
68019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
68029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_TAGVAR(compiler, $1)=$CC
68039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_CC_BASENAME([$compiler])
68049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
68059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test -n "$compiler"; then
68069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_MSG_CHECKING([if libtool supports shared libraries])
68079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_MSG_RESULT([$can_build_shared])
68089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
68099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_MSG_CHECKING([whether to build shared libraries])
68109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    test "$can_build_shared" = "no" && enable_shared=no
68119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
68129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # On AIX, shared libraries and static libraries use the same namespace, and
68139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # are all built from PIC.
68149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    case $host_os in
68159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      aix3*)
68169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        test "$enable_shared" = yes && enable_static=no
68179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        if test -n "$RANLIB"; then
68189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          archive_cmds="$archive_cmds~\$RANLIB \$lib"
68199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall          postinstall_cmds='$RANLIB $lib'
68209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        fi
68219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
68229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      aix[[4-9]]*)
68239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
68249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	  test "$enable_shared" = yes && enable_static=no
68259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	fi
68269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        ;;
68279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    esac
68289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_MSG_RESULT([$enable_shared])
68299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
68309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_MSG_CHECKING([whether to build static libraries])
68319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # Make sure either enable_shared or enable_static is yes.
68329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    test "$enable_shared" = yes || enable_static=yes
68339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    AC_MSG_RESULT([$enable_static])
68349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
68359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
68369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_TAGVAR(LD, $1)="$LD"
68379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
68389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ## CAVEAT EMPTOR:
68399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ## There is no encapsulation within the following macros, do not change
68409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ## the running order or otherwise move them around unless you know exactly
68419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ## what you are doing...
68429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_SYS_HIDDEN_LIBDEPS($1)
68439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_COMPILER_PIC($1)
68449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_COMPILER_C_O($1)
68459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_COMPILER_FILE_LOCKS($1)
68469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_LINKER_SHLIBS($1)
68479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_SYS_DYNAMIC_LINKER($1)
68489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_LINKER_HARDCODE_LIBPATH($1)
68499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
68509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    _LT_CONFIG($1)
68519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi # test -n "$compiler"
68529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
68539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  GCC=$lt_save_GCC
68549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  CC="$lt_save_CC"
68559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi # test "$_lt_disable_FC" != yes
68569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
68579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_LANG_POP
68589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_LANG_FC_CONFIG
68599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
68609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
68619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_LANG_GCJ_CONFIG([TAG])
68629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# --------------------------
68639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Ensure that the configuration variables for the GNU Java Compiler compiler
68649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# are suitably defined.  These variables are subsequently used by _LT_CONFIG
68659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# to write the compiler configuration to `libtool'.
68669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_LANG_GCJ_CONFIG],
68679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_REQUIRE([LT_PROG_GCJ])dnl
68689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_LANG_SAVE
68699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
68709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Source file extension for Java test sources.
68719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallac_ext=java
68729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
68739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Object file extension for compiled Java test sources.
68749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallobjext=o
68759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(objext, $1)=$objext
68769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
68779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Code to be used in simple compile tests
68789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_simple_compile_test_code="class foo {}"
68799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
68809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Code to be used in simple link tests
68819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
68829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
68839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ltmain only uses $CC for tagged configurations so make sure $CC is set.
68849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAG_COMPILER
68859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
68869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# save warnings/boilerplate of simple test code
68879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_COMPILER_BOILERPLATE
68889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_LINKER_BOILERPLATE
68899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
68909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Allow CC to be a program name with arguments.
68919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_save_CC="$CC"
68929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_save_GCC=$GCC
68939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallGCC=yes
68949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallCC=${GCJ-"gcj"}
68959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcompiler=$CC
68969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(compiler, $1)=$CC
68979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(LD, $1)="$LD"
68989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_CC_BASENAME([$compiler])
68999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# GCJ did not exist at the time GCC didn't implicitly link libc in.
69019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(archive_cmds_need_lc, $1)=no
69029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
69049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## CAVEAT EMPTOR:
69069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## There is no encapsulation within the following macros, do not change
69079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## the running order or otherwise move them around unless you know exactly
69089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall## what you are doing...
69099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n "$compiler"; then
69109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_COMPILER_NO_RTTI($1)
69119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_COMPILER_PIC($1)
69129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_COMPILER_C_O($1)
69139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_COMPILER_FILE_LOCKS($1)
69149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_LINKER_SHLIBS($1)
69159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_LINKER_HARDCODE_LIBPATH($1)
69169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_CONFIG($1)
69189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
69199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_LANG_RESTORE
69219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallGCC=$lt_save_GCC
69239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallCC="$lt_save_CC"
69249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_LANG_GCJ_CONFIG
69259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_LANG_RC_CONFIG([TAG])
69289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -------------------------
69299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Ensure that the configuration variables for the Windows resource compiler
69309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# are suitably defined.  These variables are subsequently used by _LT_CONFIG
69319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# to write the compiler configuration to `libtool'.
69329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_LANG_RC_CONFIG],
69339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_REQUIRE([LT_PROG_RC])dnl
69349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_LANG_SAVE
69359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Source file extension for RC test sources.
69379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallac_ext=rc
69389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Object file extension for compiled RC test sources.
69409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallobjext=o
69419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(objext, $1)=$objext
69429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Code to be used in simple compile tests
69449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
69459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Code to be used in simple link tests
69479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_simple_link_test_code="$lt_simple_compile_test_code"
69489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ltmain only uses $CC for tagged configurations so make sure $CC is set.
69509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAG_COMPILER
69519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# save warnings/boilerplate of simple test code
69539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_COMPILER_BOILERPLATE
69549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_LINKER_BOILERPLATE
69559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Allow CC to be a program name with arguments.
69579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_save_CC="$CC"
69589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_save_GCC=$GCC
69599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallGCC=
69609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallCC=${RC-"windres"}
69619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcompiler=$CC
69629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(compiler, $1)=$CC
69639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_CC_BASENAME([$compiler])
69649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
69659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif test -n "$compiler"; then
69679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  :
69689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  _LT_CONFIG($1)
69699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
69709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallGCC=$lt_save_GCC
69729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_LANG_RESTORE
69739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallCC="$lt_save_CC"
69749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_LANG_RC_CONFIG
69759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_PROG_GCJ
69789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# -----------
69799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LT_PROG_GCJ],
69809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
69819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
69829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [AC_CHECK_TOOL(GCJ, gcj,)
69839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
69849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      AC_SUBST(GCJFLAGS)])])[]dnl
69859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
69869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old name:
69889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
69899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
69909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([LT_AC_PROG_GCJ], [])
69919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# LT_PROG_RC
69949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ----------
69959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_DEFUN([LT_PROG_RC],
69969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_CHECK_TOOL(RC, windres,)
69979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
69989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
69999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old name:
70009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
70019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
70029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([LT_AC_PROG_RC], [])
70039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
70049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
70059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_DECL_EGREP
70069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# --------------
70079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# If we don't have a new enough Autoconf to choose the best grep
70089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# available, choose the one first in the user's PATH.
70099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_DECL_EGREP],
70109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_REQUIRE([AC_PROG_EGREP])dnl
70119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_REQUIRE([AC_PROG_FGREP])dnl
70129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$GREP" && GREP=grep
70139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
70149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [EGREP], [1], [An ERE matcher])
70159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [FGREP], [1], [A literal string matcher])
70169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
70179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([GREP])
70189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
70199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
70209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
70219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_DECL_OBJDUMP
70229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# --------------
70239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# If we don't have a new enough Autoconf to choose the best objdump
70249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# available, choose the one first in the user's PATH.
70259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_DECL_OBJDUMP],
70269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_CHECK_TOOL(OBJDUMP, objdump, false)
70279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$OBJDUMP" && OBJDUMP=objdump
70289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
70299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([OBJDUMP])
70309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
70319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
70329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
70339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_DECL_SED
70349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------
70359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Check for a fully-functional sed program, that truncates
70369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# as few characters as possible.  Prefer GNU sed if found.
70379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_DECL_SED],
70389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_PROG_SED
70399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltest -z "$SED" && SED=sed
70409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallXsed="$SED -e 1s/^X//"
70419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
70429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
70439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
70449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_DECL_SED
70459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
70469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_ifndef([AC_PROG_SED], [
70479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall############################################################
70489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# NOTE: This macro has been submitted for inclusion into   #
70499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
70509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#  a released version of Autoconf we should remove this    #
70519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#  macro and use it instead.                               #
70529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall############################################################
70539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
70549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([AC_PROG_SED],
70559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_MSG_CHECKING([for a sed that does not truncate output])
70569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_CACHE_VAL(lt_cv_path_SED,
70579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[# Loop through the user's path and test for sed and gsed.
70589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Then use that list of sed's as ones to test for truncation.
70599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
70609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfor as_dir in $PATH
70619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldo
70629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  IFS=$as_save_IFS
70639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  test -z "$as_dir" && as_dir=.
70649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  for lt_ac_prog in sed gsed; do
70659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    for ac_exec_ext in '' $ac_executable_extensions; do
70669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
70679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
70689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      fi
70699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    done
70709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  done
70719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldone
70729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallIFS=$as_save_IFS
70739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_ac_max=0
70749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_ac_count=0
70759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Add /usr/xpg4/bin/sed as it is typically found on Solaris
70769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# along with /bin/sed that truncates output.
70779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
70789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  test ! -f $lt_ac_sed && continue
70799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  cat /dev/null > conftest.in
70809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_ac_count=0
70819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
70829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Check for GNU sed and select it if it is found.
70839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
70849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_cv_path_SED=$lt_ac_sed
70859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    break
70869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
70879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  while true; do
70889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    cat conftest.in conftest.in >conftest.tmp
70899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    mv conftest.tmp conftest.in
70909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    cp conftest.in conftest.nl
70919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    echo >>conftest.nl
70929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
70939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    cmp -s conftest.out conftest.nl || break
70949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # 10000 chars as input seems more than enough
70959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    test $lt_ac_count -gt 10 && break
70969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    lt_ac_count=`expr $lt_ac_count + 1`
70979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    if test $lt_ac_count -gt $lt_ac_max; then
70989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_ac_max=$lt_ac_count
70999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      lt_cv_path_SED=$lt_ac_sed
71009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    fi
71019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  done
71029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldone
71039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
71049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallSED=$lt_cv_path_SED
71059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_SUBST([SED])
71069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_RESULT([$SED])
71079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])#AC_PROG_SED
71089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])#m4_ifndef
71099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
71109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Old name:
71119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
71129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl aclocal-1.4 backwards compatibility:
71139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl AC_DEFUN([LT_AC_PROG_SED], [])
71149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
71159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
71169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_CHECK_SHELL_FEATURES
71179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ------------------------
71189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Find out whether the shell is Bourne or XSI compatible,
71199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# or has some other useful features.
71209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_CHECK_SHELL_FEATURES],
71219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
71229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Try some XSI features
71239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallxsi_shell=no
71249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall( _lt_dummy="a/b/c"
71259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
71269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall      = c,a/b,, \
71279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    && eval 'test $(( 1 + 1 )) -eq 2 \
71289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
71299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  && xsi_shell=yes
71309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_RESULT([$xsi_shell])
71319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
71329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
71339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_CHECKING([whether the shell understands "+="])
71349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halllt_shell_append=no
71359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
71369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    >/dev/null 2>&1 \
71379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  && lt_shell_append=yes
71389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallAC_MSG_RESULT([$lt_shell_append])
71399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
71409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
71419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
71429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_unset=unset
71439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallelse
71449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_unset=false
71459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfi
71469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
71479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
71489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# test EBCDIC or ASCII
71499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase `echo X|tr X '\101'` in
71509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall A) # ASCII based system
71519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
71529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_SP2NL='tr \040 \012'
71539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_NL2SP='tr \015\012 \040\040'
71549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
71559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall *) # EBCDIC based system
71569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_SP2NL='tr \100 \n'
71579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  lt_NL2SP='tr \r\n \100\100'
71589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  ;;
71599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
71609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
71619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
71629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])# _LT_CHECK_SHELL_FEATURES
71639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
71649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
71659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# _LT_PROG_XSI_SHELLFNS
71669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# ---------------------
71679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Bourne and XSI compatible variants of some useful shell functions.
71689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallm4_defun([_LT_PROG_XSI_SHELLFNS],
71699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall[case $xsi_shell in
71709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  yes)
71719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    cat << \_LT_EOF >> "$cfgfile"
71729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
71739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_dirname file append nondir_replacement
71749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
71759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# otherwise set result to NONDIR_REPLACEMENT.
71769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfunc_dirname ()
71779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
71789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case ${1} in
71799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    */*) func_dirname_result="${1%/*}${2}" ;;
71809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *  ) func_dirname_result="${3}" ;;
71819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
71829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
71839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
71849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_basename file
71859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfunc_basename ()
71869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
71879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  func_basename_result="${1##*/}"
71889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
71899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
71909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_dirname_and_basename file append nondir_replacement
71919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# perform func_basename and func_dirname in a single function
71929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# call:
71939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#   dirname:  Compute the dirname of FILE.  If nonempty,
71949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#             add APPEND to the result, otherwise set result
71959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#             to NONDIR_REPLACEMENT.
71969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#             value returned in "$func_dirname_result"
71979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#   basename: Compute filename of FILE.
71989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#             value retuned in "$func_basename_result"
71999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Implementation must be kept synchronized with func_dirname
72009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# and func_basename. For efficiency, we do not delegate to
72019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# those functions but instead duplicate the functionality here.
72029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfunc_dirname_and_basename ()
72039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
72049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case ${1} in
72059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    */*) func_dirname_result="${1%/*}${2}" ;;
72069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *  ) func_dirname_result="${3}" ;;
72079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
72089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  func_basename_result="${1##*/}"
72099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
72109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
72119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_stripname prefix suffix name
72129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# strip PREFIX and SUFFIX off of NAME.
72139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# PREFIX and SUFFIX must not contain globbing or regex special
72149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# characters, hashes, percent signs, but SUFFIX may contain a leading
72159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# dot (in which case that matches only a dot).
72169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfunc_stripname ()
72179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
72189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
72199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # positional parameters, so assign one to ordinary parameter first.
72209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  func_stripname_result=${3}
72219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  func_stripname_result=${func_stripname_result#"${1}"}
72229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  func_stripname_result=${func_stripname_result%"${2}"}
72239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
72249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
72259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_opt_split
72269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfunc_opt_split ()
72279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
72289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  func_opt_split_opt=${1%%=*}
72299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  func_opt_split_arg=${1#*=}
72309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
72319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
72329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_lo2o object
72339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfunc_lo2o ()
72349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
72359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case ${1} in
72369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
72379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *)    func_lo2o_result=${1} ;;
72389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
72399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
72409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
72419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_xform libobj-or-source
72429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfunc_xform ()
72439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
72449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  func_xform_result=${1%.*}.lo
72459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
72469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
72479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_arith arithmetic-term...
72489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfunc_arith ()
72499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
72509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  func_arith_result=$(( $[*] ))
72519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
72529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
72539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_len string
72549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# STRING may not start with a hyphen.
72559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfunc_len ()
72569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
72579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  func_len_result=${#1}
72589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
72599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
72609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
72619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
72629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *) # Bourne compatible functions.
72639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    cat << \_LT_EOF >> "$cfgfile"
72649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
72659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_dirname file append nondir_replacement
72669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
72679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# otherwise set result to NONDIR_REPLACEMENT.
72689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfunc_dirname ()
72699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
72709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  # Extract subdirectory from the argument.
72719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
72729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  if test "X$func_dirname_result" = "X${1}"; then
72739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    func_dirname_result="${3}"
72749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  else
72759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    func_dirname_result="$func_dirname_result${2}"
72769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  fi
72779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
72789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
72799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_basename file
72809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfunc_basename ()
72819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
72829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
72839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
72849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
72859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl func_dirname_and_basename
72869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl A portable version of this function is already defined in general.m4sh
72879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldnl so there is no need for it here.
72889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
72899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_stripname prefix suffix name
72909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# strip PREFIX and SUFFIX off of NAME.
72919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# PREFIX and SUFFIX must not contain globbing or regex special
72929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# characters, hashes, percent signs, but SUFFIX may contain a leading
72939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# dot (in which case that matches only a dot).
72949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_strip_suffix prefix name
72959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfunc_stripname ()
72969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
72979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  case ${2} in
72989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    .*) func_stripname_result=`$ECHO "X${3}" \
72999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
73009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    *)  func_stripname_result=`$ECHO "X${3}" \
73019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
73029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
73039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
73049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
73059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# sed scripts:
73069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
73079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallmy_sed_long_arg='1s/^-[[^=]]*=//'
73089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
73099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_opt_split
73109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfunc_opt_split ()
73119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
73129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
73139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
73149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
73159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
73169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_lo2o object
73179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfunc_lo2o ()
73189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
73199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
73209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
73219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
73229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_xform libobj-or-source
73239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfunc_xform ()
73249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
73259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
73269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
73279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
73289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_arith arithmetic-term...
73299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfunc_arith ()
73309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
73319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  func_arith_result=`expr "$[@]"`
73329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
73339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
73349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_len string
73359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# STRING may not start with a hyphen.
73369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfunc_len ()
73379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
73389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
73399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
73409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
73419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
73429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallesac
73439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
73449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcase $lt_shell_append in
73459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  yes)
73469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    cat << \_LT_EOF >> "$cfgfile"
73479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
73489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_append var value
73499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Append VALUE to the end of shell variable VAR.
73509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfunc_append ()
73519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
73529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  eval "$[1]+=\$[2]"
73539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
73549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
73559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
73569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  *)
73579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    cat << \_LT_EOF >> "$cfgfile"
73589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
73599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# func_append var value
73609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# Append VALUE to the end of shell variable VAR.
73619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallfunc_append ()
73629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{
73639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  eval "$[1]=\$$[1]\$[2]"
73649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
73659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
73669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall_LT_EOF
73679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    ;;
73689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall  esac
73699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall])
73709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
7371