aclocal.m4 revision 2ec8c4b4
17104f784Smrg# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
209885543Smrg
309885543Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
47104f784Smrg# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
509885543Smrg# This file is free software; the Free Software Foundation
609885543Smrg# gives unlimited permission to copy and/or distribute it,
709885543Smrg# with or without modifications, as long as this notice is preserved.
809885543Smrg
909885543Smrg# This program is distributed in the hope that it will be useful,
1009885543Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
1109885543Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1209885543Smrg# PARTICULAR PURPOSE.
1309885543Smrg
147104f784Smrgm4_ifndef([AC_AUTOCONF_VERSION],
157104f784Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
167104f784Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
177104f784Smrg[m4_warning([this file was generated for autoconf 2.63.
187104f784SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
197104f784SmrgIf you have problems, you may need to regenerate the build system entirely.
207104f784SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
217104f784Smrg
2209885543Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
232ec8c4b4Smrg#
242ec8c4b4Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
252ec8c4b4Smrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
262ec8c4b4Smrg#   Written by Gordon Matzigkeit, 1996
272ec8c4b4Smrg#
282ec8c4b4Smrg# This file is free software; the Free Software Foundation gives
292ec8c4b4Smrg# unlimited permission to copy and/or distribute it, with or without
302ec8c4b4Smrg# modifications, as long as this notice is preserved.
312ec8c4b4Smrg
322ec8c4b4Smrgm4_define([_LT_COPYING], [dnl
332ec8c4b4Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
342ec8c4b4Smrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
352ec8c4b4Smrg#   Written by Gordon Matzigkeit, 1996
362ec8c4b4Smrg#
372ec8c4b4Smrg#   This file is part of GNU Libtool.
382ec8c4b4Smrg#
392ec8c4b4Smrg# GNU Libtool is free software; you can redistribute it and/or
402ec8c4b4Smrg# modify it under the terms of the GNU General Public License as
412ec8c4b4Smrg# published by the Free Software Foundation; either version 2 of
422ec8c4b4Smrg# the License, or (at your option) any later version.
432ec8c4b4Smrg#
442ec8c4b4Smrg# As a special exception to the GNU General Public License,
452ec8c4b4Smrg# if you distribute this file as part of a program or library that
462ec8c4b4Smrg# is built using GNU Libtool, you may include this file under the
472ec8c4b4Smrg# same distribution terms that you use for the rest of that program.
482ec8c4b4Smrg#
492ec8c4b4Smrg# GNU Libtool is distributed in the hope that it will be useful,
502ec8c4b4Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
512ec8c4b4Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
522ec8c4b4Smrg# GNU General Public License for more details.
532ec8c4b4Smrg#
542ec8c4b4Smrg# You should have received a copy of the GNU General Public License
552ec8c4b4Smrg# along with GNU Libtool; see the file COPYING.  If not, a copy
562ec8c4b4Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
572ec8c4b4Smrg# obtained by writing to the Free Software Foundation, Inc.,
582ec8c4b4Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
592ec8c4b4Smrg])
6009885543Smrg
612ec8c4b4Smrg# serial 56 LT_INIT
6209885543Smrg
6309885543Smrg
642ec8c4b4Smrg# LT_PREREQ(VERSION)
652ec8c4b4Smrg# ------------------
662ec8c4b4Smrg# Complain and exit if this libtool version is less that VERSION.
672ec8c4b4Smrgm4_defun([LT_PREREQ],
682ec8c4b4Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
692ec8c4b4Smrg       [m4_default([$3],
702ec8c4b4Smrg		   [m4_fatal([Libtool version $1 or higher is required],
712ec8c4b4Smrg		             63)])],
722ec8c4b4Smrg       [$2])])
7309885543Smrg
7409885543Smrg
752ec8c4b4Smrg# _LT_CHECK_BUILDDIR
762ec8c4b4Smrg# ------------------
772ec8c4b4Smrg# Complain if the absolute build directory name contains unusual characters
782ec8c4b4Smrgm4_defun([_LT_CHECK_BUILDDIR],
792ec8c4b4Smrg[case `pwd` in
802ec8c4b4Smrg  *\ * | *\	*)
812ec8c4b4Smrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
822ec8c4b4Smrgesac
832ec8c4b4Smrg])
842ec8c4b4Smrg
852ec8c4b4Smrg
862ec8c4b4Smrg# LT_INIT([OPTIONS])
872ec8c4b4Smrg# ------------------
882ec8c4b4SmrgAC_DEFUN([LT_INIT],
892ec8c4b4Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
902ec8c4b4SmrgAC_BEFORE([$0], [LT_LANG])dnl
912ec8c4b4SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
922ec8c4b4SmrgAC_BEFORE([$0], [LTDL_INIT])dnl
932ec8c4b4Smrgm4_require([_LT_CHECK_BUILDDIR])dnl
942ec8c4b4Smrg
952ec8c4b4Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
962ec8c4b4Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
972ec8c4b4Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
982ec8c4b4Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
992ec8c4b4Smrgdnl unless we require an AC_DEFUNed macro:
1002ec8c4b4SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
1012ec8c4b4SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
1022ec8c4b4SmrgAC_REQUIRE([LTVERSION_VERSION])dnl
1032ec8c4b4SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
1042ec8c4b4Smrgm4_require([_LT_PROG_LTMAIN])dnl
1052ec8c4b4Smrg
1062ec8c4b4Smrgdnl Parse OPTIONS
1072ec8c4b4Smrg_LT_SET_OPTIONS([$0], [$1])
10809885543Smrg
10909885543Smrg# This can be used to rebuild libtool when needed
1102ec8c4b4SmrgLIBTOOL_DEPS="$ltmain"
11109885543Smrg
11209885543Smrg# Always use our own libtool.
11309885543SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
11409885543SmrgAC_SUBST(LIBTOOL)dnl
11509885543Smrg
1162ec8c4b4Smrg_LT_SETUP
11709885543Smrg
1182ec8c4b4Smrg# Only expand once:
1192ec8c4b4Smrgm4_define([LT_INIT])
1202ec8c4b4Smrg])# LT_INIT
12109885543Smrg
1222ec8c4b4Smrg# Old names:
1232ec8c4b4SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1242ec8c4b4SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1252ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
1262ec8c4b4Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1272ec8c4b4Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1282ec8c4b4Smrg
1292ec8c4b4Smrg
1302ec8c4b4Smrg# _LT_CC_BASENAME(CC)
1312ec8c4b4Smrg# -------------------
1322ec8c4b4Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1332ec8c4b4Smrgm4_defun([_LT_CC_BASENAME],
1342ec8c4b4Smrg[for cc_temp in $1""; do
1352ec8c4b4Smrg  case $cc_temp in
1362ec8c4b4Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1372ec8c4b4Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1382ec8c4b4Smrg    \-*) ;;
1392ec8c4b4Smrg    *) break;;
1402ec8c4b4Smrg  esac
1412ec8c4b4Smrgdone
1422ec8c4b4Smrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1432ec8c4b4Smrg])
1442ec8c4b4Smrg
1452ec8c4b4Smrg
1462ec8c4b4Smrg# _LT_FILEUTILS_DEFAULTS
1472ec8c4b4Smrg# ----------------------
1482ec8c4b4Smrg# It is okay to use these file commands and assume they have been set
1492ec8c4b4Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1502ec8c4b4Smrgm4_defun([_LT_FILEUTILS_DEFAULTS],
1512ec8c4b4Smrg[: ${CP="cp -f"}
1522ec8c4b4Smrg: ${MV="mv -f"}
1532ec8c4b4Smrg: ${RM="rm -f"}
1542ec8c4b4Smrg])# _LT_FILEUTILS_DEFAULTS
1552ec8c4b4Smrg
1562ec8c4b4Smrg
1572ec8c4b4Smrg# _LT_SETUP
1582ec8c4b4Smrg# ---------
1592ec8c4b4Smrgm4_defun([_LT_SETUP],
1602ec8c4b4Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
16109885543SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
1622ec8c4b4Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl
1632ec8c4b4Smrg_LT_DECL([], [host], [0])dnl
1642ec8c4b4Smrg_LT_DECL([], [host_os], [0])dnl
1652ec8c4b4Smrgdnl
1662ec8c4b4Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl
1672ec8c4b4Smrg_LT_DECL([], [build], [0])dnl
1682ec8c4b4Smrg_LT_DECL([], [build_os], [0])dnl
1692ec8c4b4Smrgdnl
17009885543SmrgAC_REQUIRE([AC_PROG_CC])dnl
1712ec8c4b4SmrgAC_REQUIRE([LT_PATH_LD])dnl
1722ec8c4b4SmrgAC_REQUIRE([LT_PATH_NM])dnl
1732ec8c4b4Smrgdnl
17409885543SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
1752ec8c4b4Smrgtest -z "$LN_S" && LN_S="ln -s"
1762ec8c4b4Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1772ec8c4b4Smrgdnl
1782ec8c4b4SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
1792ec8c4b4Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1802ec8c4b4Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
18109885543Smrgdnl
1822ec8c4b4Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1832ec8c4b4Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
1842ec8c4b4Smrgm4_require([_LT_CMD_RELOAD])dnl
1852ec8c4b4Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
1862ec8c4b4Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
1872ec8c4b4Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1882ec8c4b4Smrg
1892ec8c4b4Smrg_LT_CONFIG_LIBTOOL_INIT([
1902ec8c4b4Smrg# See if we are running on zsh, and set the options which allow our
1912ec8c4b4Smrg# commands through without removal of \ escapes INIT.
1922ec8c4b4Smrgif test -n "\${ZSH_VERSION+set}" ; then
1932ec8c4b4Smrg   setopt NO_GLOB_SUBST
1942ec8c4b4Smrgfi
1952ec8c4b4Smrg])
1962ec8c4b4Smrgif test -n "${ZSH_VERSION+set}" ; then
1972ec8c4b4Smrg   setopt NO_GLOB_SUBST
1982ec8c4b4Smrgfi
1992ec8c4b4Smrg
2002ec8c4b4Smrg_LT_CHECK_OBJDIR
20109885543Smrg
2022ec8c4b4Smrgm4_require([_LT_TAG_COMPILER])dnl
2032ec8c4b4Smrg_LT_PROG_ECHO_BACKSLASH
20409885543Smrg
20509885543Smrgcase $host_os in
20609885543Smrgaix3*)
20709885543Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
20809885543Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
20909885543Smrg  # vanish in a puff of smoke.
21009885543Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
21109885543Smrg    COLLECT_NAMES=
21209885543Smrg    export COLLECT_NAMES
21309885543Smrg  fi
21409885543Smrg  ;;
21509885543Smrgesac
21609885543Smrg
21709885543Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
21809885543Smrg# metacharacters that are still active within double-quoted strings.
2192ec8c4b4Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
22009885543Smrg
22109885543Smrg# Same as above, but do not quote variable references.
2222ec8c4b4Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
22309885543Smrg
22409885543Smrg# Sed substitution to delay expansion of an escaped shell variable in a
22509885543Smrg# double_quote_subst'ed string.
22609885543Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
22709885543Smrg
2282ec8c4b4Smrg# Sed substitution to delay expansion of an escaped single quote.
2292ec8c4b4Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2302ec8c4b4Smrg
23109885543Smrg# Sed substitution to avoid accidental globbing in evaled expressions
23209885543Smrgno_glob_subst='s/\*/\\\*/g'
23309885543Smrg
23409885543Smrg# Global variables:
2352ec8c4b4Smrgofile=libtool
23609885543Smrgcan_build_shared=yes
23709885543Smrg
23809885543Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
23909885543Smrg# which needs '.lib').
24009885543Smrglibext=a
24109885543Smrg
2422ec8c4b4Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
24309885543Smrg
24409885543Smrgold_CC="$CC"
24509885543Smrgold_CFLAGS="$CFLAGS"
24609885543Smrg
24709885543Smrg# Set sane defaults for various variables
24809885543Smrgtest -z "$CC" && CC=cc
24909885543Smrgtest -z "$LTCC" && LTCC=$CC
25009885543Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
25109885543Smrgtest -z "$LD" && LD=ld
25209885543Smrgtest -z "$ac_objext" && ac_objext=o
25309885543Smrg
25409885543Smrg_LT_CC_BASENAME([$compiler])
25509885543Smrg
25609885543Smrg# Only perform the check for file, if the check method requires it
2572ec8c4b4Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
25809885543Smrgcase $deplibs_check_method in
25909885543Smrgfile_magic*)
26009885543Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2612ec8c4b4Smrg    _LT_PATH_MAGIC
26209885543Smrg  fi
26309885543Smrg  ;;
26409885543Smrgesac
26509885543Smrg
2662ec8c4b4Smrg# Use C for the default configuration in the libtool script
2672ec8c4b4SmrgLT_SUPPORTED_TAG([CC])
2682ec8c4b4Smrg_LT_LANG_C_CONFIG
2692ec8c4b4Smrg_LT_LANG_DEFAULT_CONFIG
2702ec8c4b4Smrg_LT_CONFIG_COMMANDS
2712ec8c4b4Smrg])# _LT_SETUP
2727104f784Smrg
27309885543Smrg
2742ec8c4b4Smrg# _LT_PROG_LTMAIN
2752ec8c4b4Smrg# ---------------
2762ec8c4b4Smrg# Note that this code is called both from `configure', and `config.status'
2772ec8c4b4Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2782ec8c4b4Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
2792ec8c4b4Smrg# so we pass a copy along to make sure it has a sensible value anyway.
2802ec8c4b4Smrgm4_defun([_LT_PROG_LTMAIN],
2812ec8c4b4Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2822ec8c4b4Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2832ec8c4b4Smrgltmain="$ac_aux_dir/ltmain.sh"
2842ec8c4b4Smrg])# _LT_PROG_LTMAIN
28509885543Smrg
28609885543Smrg
2872ec8c4b4Smrg
2882ec8c4b4Smrg# So that we can recreate a full libtool script including additional
2892ec8c4b4Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2902ec8c4b4Smrg# in macros and then make a single call at the end using the `libtool'
2912ec8c4b4Smrg# label.
2922ec8c4b4Smrg
2932ec8c4b4Smrg
2942ec8c4b4Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2952ec8c4b4Smrg# ----------------------------------------
2962ec8c4b4Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2972ec8c4b4Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
2982ec8c4b4Smrg[m4_ifval([$1],
2992ec8c4b4Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
3002ec8c4b4Smrg                     [$1
3012ec8c4b4Smrg])])])
3022ec8c4b4Smrg
3032ec8c4b4Smrg# Initialize.
3042ec8c4b4Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
3052ec8c4b4Smrg
3062ec8c4b4Smrg
3072ec8c4b4Smrg# _LT_CONFIG_LIBTOOL([COMMANDS])
3082ec8c4b4Smrg# ------------------------------
3092ec8c4b4Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3102ec8c4b4Smrgm4_define([_LT_CONFIG_LIBTOOL],
3112ec8c4b4Smrg[m4_ifval([$1],
3122ec8c4b4Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
3132ec8c4b4Smrg                     [$1
3142ec8c4b4Smrg])])])
3152ec8c4b4Smrg
3162ec8c4b4Smrg# Initialize.
3172ec8c4b4Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
3182ec8c4b4Smrg
3192ec8c4b4Smrg
3202ec8c4b4Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
3212ec8c4b4Smrg# -----------------------------------------------------
3222ec8c4b4Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
3232ec8c4b4Smrg[_LT_CONFIG_LIBTOOL([$1])
3242ec8c4b4Smrg_LT_CONFIG_LIBTOOL_INIT([$2])
3252ec8c4b4Smrg])
3262ec8c4b4Smrg
3272ec8c4b4Smrg
3282ec8c4b4Smrg# _LT_FORMAT_COMMENT([COMMENT])
3292ec8c4b4Smrg# -----------------------------
3302ec8c4b4Smrg# Add leading comment marks to the start of each line, and a trailing
3312ec8c4b4Smrg# full-stop to the whole comment if one is not present already.
3322ec8c4b4Smrgm4_define([_LT_FORMAT_COMMENT],
3332ec8c4b4Smrg[m4_ifval([$1], [
3342ec8c4b4Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
3352ec8c4b4Smrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
3362ec8c4b4Smrg)])
3372ec8c4b4Smrg
3382ec8c4b4Smrg
3392ec8c4b4Smrg
3402ec8c4b4Smrg
3412ec8c4b4Smrg
3422ec8c4b4Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
3432ec8c4b4Smrg# -------------------------------------------------------------------
3442ec8c4b4Smrg# CONFIGNAME is the name given to the value in the libtool script.
3452ec8c4b4Smrg# VARNAME is the (base) name used in the configure script.
3462ec8c4b4Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
3472ec8c4b4Smrg# VARNAME.  Any other value will be used directly.
3482ec8c4b4Smrgm4_define([_LT_DECL],
3492ec8c4b4Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
3502ec8c4b4Smrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
3512ec8c4b4Smrg	[m4_ifval([$1], [$1], [$2])])
3522ec8c4b4Smrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
3532ec8c4b4Smrg    m4_ifval([$4],
3542ec8c4b4Smrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
3552ec8c4b4Smrg    lt_dict_add_subkey([lt_decl_dict], [$2],
3562ec8c4b4Smrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
3572ec8c4b4Smrg])
3582ec8c4b4Smrg
3592ec8c4b4Smrg
3602ec8c4b4Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
3612ec8c4b4Smrg# --------------------------------------------------------
3622ec8c4b4Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
3632ec8c4b4Smrg
3642ec8c4b4Smrg
3652ec8c4b4Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
3662ec8c4b4Smrg# ------------------------------------------------
3672ec8c4b4Smrgm4_define([lt_decl_tag_varnames],
3682ec8c4b4Smrg[_lt_decl_filter([tagged?], [yes], $@)])
3692ec8c4b4Smrg
3702ec8c4b4Smrg
3712ec8c4b4Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
3722ec8c4b4Smrg# ---------------------------------------------------------
3732ec8c4b4Smrgm4_define([_lt_decl_filter],
3742ec8c4b4Smrg[m4_case([$#],
3752ec8c4b4Smrg  [0], [m4_fatal([$0: too few arguments: $#])],
3762ec8c4b4Smrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
3772ec8c4b4Smrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
3782ec8c4b4Smrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
3792ec8c4b4Smrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
3802ec8c4b4Smrg])
3812ec8c4b4Smrg
3822ec8c4b4Smrg
3832ec8c4b4Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
3842ec8c4b4Smrg# --------------------------------------------------
3852ec8c4b4Smrgm4_define([lt_decl_quote_varnames],
3862ec8c4b4Smrg[_lt_decl_filter([value], [1], $@)])
3872ec8c4b4Smrg
3882ec8c4b4Smrg
3892ec8c4b4Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
3902ec8c4b4Smrg# ---------------------------------------------------
3912ec8c4b4Smrgm4_define([lt_decl_dquote_varnames],
3922ec8c4b4Smrg[_lt_decl_filter([value], [2], $@)])
3932ec8c4b4Smrg
3942ec8c4b4Smrg
3952ec8c4b4Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
3962ec8c4b4Smrg# ---------------------------------------------------
3972ec8c4b4Smrgm4_define([lt_decl_varnames_tagged],
3982ec8c4b4Smrg[m4_assert([$# <= 2])dnl
3992ec8c4b4Smrg_$0(m4_quote(m4_default([$1], [[, ]])),
4002ec8c4b4Smrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
4012ec8c4b4Smrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
4022ec8c4b4Smrgm4_define([_lt_decl_varnames_tagged],
4032ec8c4b4Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
4042ec8c4b4Smrg
4052ec8c4b4Smrg
4062ec8c4b4Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
4072ec8c4b4Smrg# ------------------------------------------------
4082ec8c4b4Smrgm4_define([lt_decl_all_varnames],
4092ec8c4b4Smrg[_$0(m4_quote(m4_default([$1], [[, ]])),
4102ec8c4b4Smrg     m4_if([$2], [],
4112ec8c4b4Smrg	   m4_quote(lt_decl_varnames),
4122ec8c4b4Smrg	m4_quote(m4_shift($@))))[]dnl
4132ec8c4b4Smrg])
4142ec8c4b4Smrgm4_define([_lt_decl_all_varnames],
4152ec8c4b4Smrg[lt_join($@, lt_decl_varnames_tagged([$1],
4162ec8c4b4Smrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
4172ec8c4b4Smrg])
4182ec8c4b4Smrg
4192ec8c4b4Smrg
4202ec8c4b4Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
4212ec8c4b4Smrg# ------------------------------------
4222ec8c4b4Smrg# Quote a variable value, and forward it to `config.status' so that its
4232ec8c4b4Smrg# declaration there will have the same value as in `configure'.  VARNAME
4242ec8c4b4Smrg# must have a single quote delimited value for this to work.
4252ec8c4b4Smrgm4_define([_LT_CONFIG_STATUS_DECLARE],
4262ec8c4b4Smrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
4272ec8c4b4Smrg
4282ec8c4b4Smrg
4292ec8c4b4Smrg# _LT_CONFIG_STATUS_DECLARATIONS
4302ec8c4b4Smrg# ------------------------------
4312ec8c4b4Smrg# We delimit libtool config variables with single quotes, so when
4322ec8c4b4Smrg# we write them to config.status, we have to be sure to quote all
4332ec8c4b4Smrg# embedded single quotes properly.  In configure, this macro expands
4342ec8c4b4Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
4357104f784Smrg#
4362ec8c4b4Smrg#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
4372ec8c4b4Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
4382ec8c4b4Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
4392ec8c4b4Smrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
4402ec8c4b4Smrg
4412ec8c4b4Smrg
4422ec8c4b4Smrg# _LT_LIBTOOL_TAGS
4432ec8c4b4Smrg# ----------------
4442ec8c4b4Smrg# Output comment and list of tags supported by the script
4452ec8c4b4Smrgm4_defun([_LT_LIBTOOL_TAGS],
4462ec8c4b4Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
4472ec8c4b4Smrgavailable_tags="_LT_TAGS"dnl
4482ec8c4b4Smrg])
4492ec8c4b4Smrg
4502ec8c4b4Smrg
4512ec8c4b4Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
4522ec8c4b4Smrg# -----------------------------------
4532ec8c4b4Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and
4542ec8c4b4Smrg# expand to a commented shell variable setting:
4557104f784Smrg#
4562ec8c4b4Smrg#    # Some comment about what VAR is for.
4572ec8c4b4Smrg#    visible_name=$lt_internal_name
4582ec8c4b4Smrgm4_define([_LT_LIBTOOL_DECLARE],
4592ec8c4b4Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
4602ec8c4b4Smrg					   [description])))[]dnl
4612ec8c4b4Smrgm4_pushdef([_libtool_name],
4622ec8c4b4Smrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
4632ec8c4b4Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
4642ec8c4b4Smrg    [0], [_libtool_name=[$]$1],
4652ec8c4b4Smrg    [1], [_libtool_name=$lt_[]$1],
4662ec8c4b4Smrg    [2], [_libtool_name=$lt_[]$1],
4672ec8c4b4Smrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
4682ec8c4b4Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
4692ec8c4b4Smrg])
4707104f784Smrg
47109885543Smrg
4722ec8c4b4Smrg# _LT_LIBTOOL_CONFIG_VARS
4732ec8c4b4Smrg# -----------------------
4742ec8c4b4Smrg# Produce commented declarations of non-tagged libtool config variables
4752ec8c4b4Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
4762ec8c4b4Smrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
4772ec8c4b4Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
4782ec8c4b4Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
4792ec8c4b4Smrg[m4_foreach([_lt_var],
4802ec8c4b4Smrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
4812ec8c4b4Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
48209885543Smrg
4837104f784Smrg
4842ec8c4b4Smrg# _LT_LIBTOOL_TAG_VARS(TAG)
4852ec8c4b4Smrg# -------------------------
4862ec8c4b4Smrgm4_define([_LT_LIBTOOL_TAG_VARS],
4872ec8c4b4Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
4882ec8c4b4Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
4892ec8c4b4Smrg
4902ec8c4b4Smrg
4912ec8c4b4Smrg# _LT_TAGVAR(VARNAME, [TAGNAME])
4922ec8c4b4Smrg# ------------------------------
4932ec8c4b4Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
4942ec8c4b4Smrg
4952ec8c4b4Smrg
4962ec8c4b4Smrg# _LT_CONFIG_COMMANDS
4972ec8c4b4Smrg# -------------------
4982ec8c4b4Smrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
4992ec8c4b4Smrg# variables for single and double quote escaping we saved from calls
5002ec8c4b4Smrg# to _LT_DECL, we can put quote escaped variables declarations
5012ec8c4b4Smrg# into `config.status', and then the shell code to quote escape them in
5022ec8c4b4Smrg# for loops in `config.status'.  Finally, any additional code accumulated
5032ec8c4b4Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
5042ec8c4b4Smrgm4_defun([_LT_CONFIG_COMMANDS],
5052ec8c4b4Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
5062ec8c4b4Smrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
5072ec8c4b4Smrg	dnl instead of duplicating it all over again into config.status,
5082ec8c4b4Smrg	dnl then we will have config.status run $CONFIG_LT later, so it
5092ec8c4b4Smrg	dnl needs to know what name is stored there:
5102ec8c4b4Smrg        [AC_CONFIG_COMMANDS([libtool],
5112ec8c4b4Smrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
5122ec8c4b4Smrg    dnl If the libtool generation code is destined for config.status,
5132ec8c4b4Smrg    dnl expand the accumulated commands and init code now:
5142ec8c4b4Smrg    [AC_CONFIG_COMMANDS([libtool],
5152ec8c4b4Smrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
5162ec8c4b4Smrg])#_LT_CONFIG_COMMANDS
5172ec8c4b4Smrg
5182ec8c4b4Smrg
5192ec8c4b4Smrg# Initialize.
5202ec8c4b4Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
5212ec8c4b4Smrg[
5222ec8c4b4Smrg
5232ec8c4b4Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
5242ec8c4b4Smrg# if CDPATH is set.
5252ec8c4b4Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5262ec8c4b4Smrg
5272ec8c4b4Smrgsed_quote_subst='$sed_quote_subst'
5282ec8c4b4Smrgdouble_quote_subst='$double_quote_subst'
5292ec8c4b4Smrgdelay_variable_subst='$delay_variable_subst'
5302ec8c4b4Smrg_LT_CONFIG_STATUS_DECLARATIONS
5312ec8c4b4SmrgLTCC='$LTCC'
5322ec8c4b4SmrgLTCFLAGS='$LTCFLAGS'
5332ec8c4b4Smrgcompiler='$compiler_DEFAULT'
5342ec8c4b4Smrg
5352ec8c4b4Smrg# Quote evaled strings.
5362ec8c4b4Smrgfor var in lt_decl_all_varnames([[ \
5372ec8c4b4Smrg]], lt_decl_quote_varnames); do
5382ec8c4b4Smrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
5392ec8c4b4Smrg    *[[\\\\\\\`\\"\\\$]]*)
5402ec8c4b4Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
5412ec8c4b4Smrg      ;;
5422ec8c4b4Smrg    *)
5432ec8c4b4Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5442ec8c4b4Smrg      ;;
5452ec8c4b4Smrg    esac
5462ec8c4b4Smrgdone
5472ec8c4b4Smrg
5482ec8c4b4Smrg# Double-quote double-evaled strings.
5492ec8c4b4Smrgfor var in lt_decl_all_varnames([[ \
5502ec8c4b4Smrg]], lt_decl_dquote_varnames); do
5512ec8c4b4Smrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
5522ec8c4b4Smrg    *[[\\\\\\\`\\"\\\$]]*)
5532ec8c4b4Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
5542ec8c4b4Smrg      ;;
5552ec8c4b4Smrg    *)
5562ec8c4b4Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5572ec8c4b4Smrg      ;;
5582ec8c4b4Smrg    esac
5592ec8c4b4Smrgdone
5602ec8c4b4Smrg
5612ec8c4b4Smrg# Fix-up fallback echo if it was mangled by the above quoting rules.
5622ec8c4b4Smrgcase \$lt_ECHO in
5632ec8c4b4Smrg*'\\\[$]0 --fallback-echo"')dnl "
5642ec8c4b4Smrg  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
5652ec8c4b4Smrg  ;;
5662ec8c4b4Smrgesac
5672ec8c4b4Smrg
5682ec8c4b4Smrg_LT_OUTPUT_LIBTOOL_INIT
5697104f784Smrg])
5702ec8c4b4Smrg
5712ec8c4b4Smrg
5722ec8c4b4Smrg# LT_OUTPUT
5732ec8c4b4Smrg# ---------
5742ec8c4b4Smrg# This macro allows early generation of the libtool script (before
5752ec8c4b4Smrg# AC_OUTPUT is called), incase it is used in configure for compilation
5762ec8c4b4Smrg# tests.
5772ec8c4b4SmrgAC_DEFUN([LT_OUTPUT],
5782ec8c4b4Smrg[: ${CONFIG_LT=./config.lt}
5792ec8c4b4SmrgAC_MSG_NOTICE([creating $CONFIG_LT])
5802ec8c4b4Smrgcat >"$CONFIG_LT" <<_LTEOF
5812ec8c4b4Smrg#! $SHELL
5822ec8c4b4Smrg# Generated by $as_me.
5832ec8c4b4Smrg# Run this file to recreate a libtool stub with the current configuration.
5842ec8c4b4Smrg
5852ec8c4b4Smrglt_cl_silent=false
5862ec8c4b4SmrgSHELL=\${CONFIG_SHELL-$SHELL}
5872ec8c4b4Smrg_LTEOF
5882ec8c4b4Smrg
5892ec8c4b4Smrgcat >>"$CONFIG_LT" <<\_LTEOF
5902ec8c4b4SmrgAS_SHELL_SANITIZE
5912ec8c4b4Smrg_AS_PREPARE
5922ec8c4b4Smrg
5932ec8c4b4Smrgexec AS_MESSAGE_FD>&1
5942ec8c4b4Smrgexec AS_MESSAGE_LOG_FD>>config.log
5952ec8c4b4Smrg{
5962ec8c4b4Smrg  echo
5972ec8c4b4Smrg  AS_BOX([Running $as_me.])
5982ec8c4b4Smrg} >&AS_MESSAGE_LOG_FD
5992ec8c4b4Smrg
6002ec8c4b4Smrglt_cl_help="\
6012ec8c4b4Smrg\`$as_me' creates a local libtool stub from the current configuration,
6022ec8c4b4Smrgfor use in further configure time tests before the real libtool is
6032ec8c4b4Smrggenerated.
6042ec8c4b4Smrg
6052ec8c4b4SmrgUsage: $[0] [[OPTIONS]]
6062ec8c4b4Smrg
6072ec8c4b4Smrg  -h, --help      print this help, then exit
6082ec8c4b4Smrg  -V, --version   print version number, then exit
6092ec8c4b4Smrg  -q, --quiet     do not print progress messages
6102ec8c4b4Smrg  -d, --debug     don't remove temporary files
6112ec8c4b4Smrg
6122ec8c4b4SmrgReport bugs to <bug-libtool@gnu.org>."
6132ec8c4b4Smrg
6142ec8c4b4Smrglt_cl_version="\
6152ec8c4b4Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
6162ec8c4b4Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
6172ec8c4b4Smrgconfigured by $[0], generated by m4_PACKAGE_STRING.
6182ec8c4b4Smrg
6192ec8c4b4SmrgCopyright (C) 2008 Free Software Foundation, Inc.
6202ec8c4b4SmrgThis config.lt script is free software; the Free Software Foundation
6212ec8c4b4Smrggives unlimited permision to copy, distribute and modify it."
6222ec8c4b4Smrg
6232ec8c4b4Smrgwhile test $[#] != 0
6242ec8c4b4Smrgdo
6252ec8c4b4Smrg  case $[1] in
6262ec8c4b4Smrg    --version | --v* | -V )
6272ec8c4b4Smrg      echo "$lt_cl_version"; exit 0 ;;
6282ec8c4b4Smrg    --help | --h* | -h )
6292ec8c4b4Smrg      echo "$lt_cl_help"; exit 0 ;;
6302ec8c4b4Smrg    --debug | --d* | -d )
6312ec8c4b4Smrg      debug=: ;;
6322ec8c4b4Smrg    --quiet | --q* | --silent | --s* | -q )
6332ec8c4b4Smrg      lt_cl_silent=: ;;
6342ec8c4b4Smrg
6352ec8c4b4Smrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
6362ec8c4b4SmrgTry \`$[0] --help' for more information.]) ;;
6372ec8c4b4Smrg
6382ec8c4b4Smrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
6392ec8c4b4SmrgTry \`$[0] --help' for more information.]) ;;
6402ec8c4b4Smrg  esac
6412ec8c4b4Smrg  shift
6422ec8c4b4Smrgdone
6432ec8c4b4Smrg
6442ec8c4b4Smrgif $lt_cl_silent; then
6452ec8c4b4Smrg  exec AS_MESSAGE_FD>/dev/null
6467104f784Smrgfi
6472ec8c4b4Smrg_LTEOF
6482ec8c4b4Smrg
6492ec8c4b4Smrgcat >>"$CONFIG_LT" <<_LTEOF
6502ec8c4b4Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
6512ec8c4b4Smrg_LTEOF
6522ec8c4b4Smrg
6532ec8c4b4Smrgcat >>"$CONFIG_LT" <<\_LTEOF
6542ec8c4b4SmrgAC_MSG_NOTICE([creating $ofile])
6552ec8c4b4Smrg_LT_OUTPUT_LIBTOOL_COMMANDS
6562ec8c4b4SmrgAS_EXIT(0)
6572ec8c4b4Smrg_LTEOF
6582ec8c4b4Smrgchmod +x "$CONFIG_LT"
6592ec8c4b4Smrg
6602ec8c4b4Smrg# configure is writing to config.log, but config.lt does its own redirection,
6612ec8c4b4Smrg# appending to config.log, which fails on DOS, as config.log is still kept
6622ec8c4b4Smrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
6632ec8c4b4Smrg# config.log, so it can be properly (re)opened and appended to by config.lt.
6642ec8c4b4Smrgif test "$no_create" != yes; then
6652ec8c4b4Smrg  lt_cl_success=:
6662ec8c4b4Smrg  test "$silent" = yes &&
6672ec8c4b4Smrg    lt_config_lt_args="$lt_config_lt_args --quiet"
6682ec8c4b4Smrg  exec AS_MESSAGE_LOG_FD>/dev/null
6692ec8c4b4Smrg  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
6702ec8c4b4Smrg  exec AS_MESSAGE_LOG_FD>>config.log
6712ec8c4b4Smrg  $lt_cl_success || AS_EXIT(1)
6722ec8c4b4Smrgfi
6732ec8c4b4Smrg])# LT_OUTPUT
6747104f784Smrg
6757104f784Smrg
6762ec8c4b4Smrg# _LT_CONFIG(TAG)
6772ec8c4b4Smrg# ---------------
6782ec8c4b4Smrg# If TAG is the built-in tag, create an initial libtool script with a
6792ec8c4b4Smrg# default configuration from the untagged config vars.  Otherwise add code
6802ec8c4b4Smrg# to config.status for appending the configuration named by TAG from the
6812ec8c4b4Smrg# matching tagged config vars.
6822ec8c4b4Smrgm4_defun([_LT_CONFIG],
6832ec8c4b4Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6842ec8c4b4Smrg_LT_CONFIG_SAVE_COMMANDS([
6852ec8c4b4Smrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
6862ec8c4b4Smrg  m4_if(_LT_TAG, [C], [
6872ec8c4b4Smrg    # See if we are running on zsh, and set the options which allow our
6882ec8c4b4Smrg    # commands through without removal of \ escapes.
6892ec8c4b4Smrg    if test -n "${ZSH_VERSION+set}" ; then
6902ec8c4b4Smrg      setopt NO_GLOB_SUBST
6912ec8c4b4Smrg    fi
6927104f784Smrg
6932ec8c4b4Smrg    cfgfile="${ofile}T"
6942ec8c4b4Smrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
6952ec8c4b4Smrg    $RM "$cfgfile"
6967104f784Smrg
6972ec8c4b4Smrg    cat <<_LT_EOF >> "$cfgfile"
6982ec8c4b4Smrg#! $SHELL
6992ec8c4b4Smrg
7002ec8c4b4Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7012ec8c4b4Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
7022ec8c4b4Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7032ec8c4b4Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
7042ec8c4b4Smrg#
7052ec8c4b4Smrg_LT_COPYING
7062ec8c4b4Smrg_LT_LIBTOOL_TAGS
7072ec8c4b4Smrg
7082ec8c4b4Smrg# ### BEGIN LIBTOOL CONFIG
7092ec8c4b4Smrg_LT_LIBTOOL_CONFIG_VARS
7102ec8c4b4Smrg_LT_LIBTOOL_TAG_VARS
7112ec8c4b4Smrg# ### END LIBTOOL CONFIG
7122ec8c4b4Smrg
7132ec8c4b4Smrg_LT_EOF
7142ec8c4b4Smrg
7152ec8c4b4Smrg  case $host_os in
7162ec8c4b4Smrg  aix3*)
7172ec8c4b4Smrg    cat <<\_LT_EOF >> "$cfgfile"
7182ec8c4b4Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
7192ec8c4b4Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
7202ec8c4b4Smrg# vanish in a puff of smoke.
7212ec8c4b4Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
7222ec8c4b4Smrg  COLLECT_NAMES=
7232ec8c4b4Smrg  export COLLECT_NAMES
7247104f784Smrgfi
7252ec8c4b4Smrg_LT_EOF
7262ec8c4b4Smrg    ;;
7272ec8c4b4Smrg  esac
7287104f784Smrg
7292ec8c4b4Smrg  _LT_PROG_LTMAIN
7307104f784Smrg
7312ec8c4b4Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
7322ec8c4b4Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7332ec8c4b4Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
7342ec8c4b4Smrg  # is reportedly fixed, but why not run on old versions too?
7352ec8c4b4Smrg  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
7362ec8c4b4Smrg    || (rm -f "$cfgfile"; exit 1)
7372ec8c4b4Smrg
7382ec8c4b4Smrg  _LT_PROG_XSI_SHELLFNS
7392ec8c4b4Smrg
7402ec8c4b4Smrg  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
7412ec8c4b4Smrg    || (rm -f "$cfgfile"; exit 1)
7422ec8c4b4Smrg
7432ec8c4b4Smrg  mv -f "$cfgfile" "$ofile" ||
7442ec8c4b4Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
7452ec8c4b4Smrg  chmod +x "$ofile"
7462ec8c4b4Smrg],
7472ec8c4b4Smrg[cat <<_LT_EOF >> "$ofile"
7482ec8c4b4Smrg
7492ec8c4b4Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
7502ec8c4b4Smrgdnl in a comment (ie after a #).
7512ec8c4b4Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1
7522ec8c4b4Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
7532ec8c4b4Smrg# ### END LIBTOOL TAG CONFIG: $1
7542ec8c4b4Smrg_LT_EOF
7552ec8c4b4Smrg])dnl /m4_if
7562ec8c4b4Smrg],
7572ec8c4b4Smrg[m4_if([$1], [], [
7582ec8c4b4Smrg    PACKAGE='$PACKAGE'
7592ec8c4b4Smrg    VERSION='$VERSION'
7602ec8c4b4Smrg    TIMESTAMP='$TIMESTAMP'
7612ec8c4b4Smrg    RM='$RM'
7622ec8c4b4Smrg    ofile='$ofile'], [])
7632ec8c4b4Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS
7642ec8c4b4Smrg])# _LT_CONFIG
7652ec8c4b4Smrg
7662ec8c4b4Smrg
7672ec8c4b4Smrg# LT_SUPPORTED_TAG(TAG)
7682ec8c4b4Smrg# ---------------------
7692ec8c4b4Smrg# Trace this macro to discover what tags are supported by the libtool
7702ec8c4b4Smrg# --tag option, using:
7712ec8c4b4Smrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
7722ec8c4b4SmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
7732ec8c4b4Smrg
7742ec8c4b4Smrg
7752ec8c4b4Smrg# C support is built-in for now
7762ec8c4b4Smrgm4_define([_LT_LANG_C_enabled], [])
7772ec8c4b4Smrgm4_define([_LT_TAGS], [])
7782ec8c4b4Smrg
7792ec8c4b4Smrg
7802ec8c4b4Smrg# LT_LANG(LANG)
7812ec8c4b4Smrg# -------------
7822ec8c4b4Smrg# Enable libtool support for the given language if not already enabled.
7832ec8c4b4SmrgAC_DEFUN([LT_LANG],
7842ec8c4b4Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
7852ec8c4b4Smrgm4_case([$1],
7862ec8c4b4Smrg  [C],			[_LT_LANG(C)],
7872ec8c4b4Smrg  [C++],		[_LT_LANG(CXX)],
7882ec8c4b4Smrg  [Java],		[_LT_LANG(GCJ)],
7892ec8c4b4Smrg  [Fortran 77],		[_LT_LANG(F77)],
7902ec8c4b4Smrg  [Fortran],		[_LT_LANG(FC)],
7912ec8c4b4Smrg  [Windows Resource],	[_LT_LANG(RC)],
7922ec8c4b4Smrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
7932ec8c4b4Smrg    [_LT_LANG($1)],
7942ec8c4b4Smrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
7952ec8c4b4Smrg])# LT_LANG
7962ec8c4b4Smrg
7972ec8c4b4Smrg
7982ec8c4b4Smrg# _LT_LANG(LANGNAME)
7992ec8c4b4Smrg# ------------------
8002ec8c4b4Smrgm4_defun([_LT_LANG],
8012ec8c4b4Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
8022ec8c4b4Smrg  [LT_SUPPORTED_TAG([$1])dnl
8032ec8c4b4Smrg  m4_append([_LT_TAGS], [$1 ])dnl
8042ec8c4b4Smrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
8052ec8c4b4Smrg  _LT_LANG_$1_CONFIG($1)])dnl
8062ec8c4b4Smrg])# _LT_LANG
8072ec8c4b4Smrg
8082ec8c4b4Smrg
8092ec8c4b4Smrg# _LT_LANG_DEFAULT_CONFIG
8102ec8c4b4Smrg# -----------------------
8112ec8c4b4Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
8122ec8c4b4Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
8132ec8c4b4Smrg  [LT_LANG(CXX)],
8142ec8c4b4Smrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
8152ec8c4b4Smrg
8162ec8c4b4SmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
8172ec8c4b4Smrg  [LT_LANG(F77)],
8182ec8c4b4Smrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
8192ec8c4b4Smrg
8202ec8c4b4SmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
8212ec8c4b4Smrg  [LT_LANG(FC)],
8222ec8c4b4Smrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
8232ec8c4b4Smrg
8242ec8c4b4Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
8252ec8c4b4Smrgdnl pulling things in needlessly.
8262ec8c4b4SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
8272ec8c4b4Smrg  [LT_LANG(GCJ)],
8282ec8c4b4Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
8292ec8c4b4Smrg    [LT_LANG(GCJ)],
8302ec8c4b4Smrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
8312ec8c4b4Smrg      [LT_LANG(GCJ)],
8322ec8c4b4Smrg      [m4_ifdef([AC_PROG_GCJ],
8332ec8c4b4Smrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
8342ec8c4b4Smrg       m4_ifdef([A][M_PROG_GCJ],
8352ec8c4b4Smrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
8362ec8c4b4Smrg       m4_ifdef([LT_PROG_GCJ],
8372ec8c4b4Smrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
8382ec8c4b4Smrg
8392ec8c4b4SmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
8402ec8c4b4Smrg  [LT_LANG(RC)],
8412ec8c4b4Smrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
8422ec8c4b4Smrg])# _LT_LANG_DEFAULT_CONFIG
8432ec8c4b4Smrg
8442ec8c4b4Smrg# Obsolete macros:
8452ec8c4b4SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
8462ec8c4b4SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
8472ec8c4b4SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
8482ec8c4b4SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
8492ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
8502ec8c4b4Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
8512ec8c4b4Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
8522ec8c4b4Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
8532ec8c4b4Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
8542ec8c4b4Smrg
8552ec8c4b4Smrg
8562ec8c4b4Smrg# _LT_TAG_COMPILER
8572ec8c4b4Smrg# ----------------
8582ec8c4b4Smrgm4_defun([_LT_TAG_COMPILER],
85909885543Smrg[AC_REQUIRE([AC_PROG_CC])dnl
86009885543Smrg
8612ec8c4b4Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
8622ec8c4b4Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
8632ec8c4b4Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
8642ec8c4b4Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
8652ec8c4b4Smrg
86609885543Smrg# If no C compiler was specified, use CC.
86709885543SmrgLTCC=${LTCC-"$CC"}
86809885543Smrg
86909885543Smrg# If no C compiler flags were specified, use CFLAGS.
87009885543SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
87109885543Smrg
87209885543Smrg# Allow CC to be a program name with arguments.
87309885543Smrgcompiler=$CC
8742ec8c4b4Smrg])# _LT_TAG_COMPILER
87509885543Smrg
87609885543Smrg
87709885543Smrg# _LT_COMPILER_BOILERPLATE
87809885543Smrg# ------------------------
87909885543Smrg# Check for compiler boilerplate output or warnings with
88009885543Smrg# the simple compiler test code.
8812ec8c4b4Smrgm4_defun([_LT_COMPILER_BOILERPLATE],
8822ec8c4b4Smrg[m4_require([_LT_DECL_SED])dnl
8837104f784Smrgac_outfile=conftest.$ac_objext
8847104f784Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
88509885543Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
88609885543Smrg_lt_compiler_boilerplate=`cat conftest.err`
8872ec8c4b4Smrg$RM conftest*
88809885543Smrg])# _LT_COMPILER_BOILERPLATE
88909885543Smrg
89009885543Smrg
89109885543Smrg# _LT_LINKER_BOILERPLATE
89209885543Smrg# ----------------------
89309885543Smrg# Check for linker boilerplate output or warnings with
89409885543Smrg# the simple link test code.
8952ec8c4b4Smrgm4_defun([_LT_LINKER_BOILERPLATE],
8962ec8c4b4Smrg[m4_require([_LT_DECL_SED])dnl
8977104f784Smrgac_outfile=conftest.$ac_objext
8987104f784Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
89909885543Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
90009885543Smrg_lt_linker_boilerplate=`cat conftest.err`
9012ec8c4b4Smrg$RM -r conftest*
90209885543Smrg])# _LT_LINKER_BOILERPLATE
90309885543Smrg
9047104f784Smrg# _LT_REQUIRED_DARWIN_CHECKS
9052ec8c4b4Smrg# -------------------------
9062ec8c4b4Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
9077104f784Smrg  case $host_os in
9087104f784Smrg    rhapsody* | darwin*)
9097104f784Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
9107104f784Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
9112ec8c4b4Smrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
9122ec8c4b4Smrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
9132ec8c4b4Smrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
9142ec8c4b4Smrg    _LT_DECL([], [DSYMUTIL], [1],
9152ec8c4b4Smrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
9162ec8c4b4Smrg    _LT_DECL([], [NMEDIT], [1],
9172ec8c4b4Smrg      [Tool to change global to local symbols on Mac OS X])
9182ec8c4b4Smrg    _LT_DECL([], [LIPO], [1],
9192ec8c4b4Smrg      [Tool to manipulate fat objects and archives on Mac OS X])
9202ec8c4b4Smrg    _LT_DECL([], [OTOOL], [1],
9212ec8c4b4Smrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
9222ec8c4b4Smrg    _LT_DECL([], [OTOOL64], [1],
9232ec8c4b4Smrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
9247104f784Smrg
9257104f784Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
9267104f784Smrg      [lt_cv_apple_cc_single_mod=no
9277104f784Smrg      if test -z "${LT_MULTI_MODULE}"; then
9282ec8c4b4Smrg	# By default we will add the -single_module flag. You can override
9292ec8c4b4Smrg	# by either setting the environment variable LT_MULTI_MODULE
9302ec8c4b4Smrg	# non-empty at configure time, or by adding -multi_module to the
9312ec8c4b4Smrg	# link flags.
9322ec8c4b4Smrg	rm -rf libconftest.dylib*
9332ec8c4b4Smrg	echo "int foo(void){return 1;}" > conftest.c
9342ec8c4b4Smrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9352ec8c4b4Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
9362ec8c4b4Smrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9372ec8c4b4Smrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
9382ec8c4b4Smrg        _lt_result=$?
9392ec8c4b4Smrg	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
9402ec8c4b4Smrg	  lt_cv_apple_cc_single_mod=yes
9412ec8c4b4Smrg	else
9422ec8c4b4Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
9432ec8c4b4Smrg	fi
9442ec8c4b4Smrg	rm -rf libconftest.dylib*
9452ec8c4b4Smrg	rm -f conftest.*
9467104f784Smrg      fi])
9477104f784Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
9487104f784Smrg      [lt_cv_ld_exported_symbols_list],
9497104f784Smrg      [lt_cv_ld_exported_symbols_list=no
9507104f784Smrg      save_LDFLAGS=$LDFLAGS
9517104f784Smrg      echo "_main" > conftest.sym
9527104f784Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
9537104f784Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
9542ec8c4b4Smrg	[lt_cv_ld_exported_symbols_list=yes],
9552ec8c4b4Smrg	[lt_cv_ld_exported_symbols_list=no])
9562ec8c4b4Smrg	LDFLAGS="$save_LDFLAGS"
9577104f784Smrg    ])
9587104f784Smrg    case $host_os in
9592ec8c4b4Smrg    rhapsody* | darwin1.[[012]])
9607104f784Smrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
9617104f784Smrg    darwin1.*)
9622ec8c4b4Smrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
9632ec8c4b4Smrg    darwin*) # darwin 5.x on
9647104f784Smrg      # if running on 10.5 or later, the deployment target defaults
9657104f784Smrg      # to the OS version, if on x86, and 10.4, the deployment
9667104f784Smrg      # target defaults to 10.4. Don't you love it?
9677104f784Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
9682ec8c4b4Smrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
9692ec8c4b4Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
9702ec8c4b4Smrg	10.[[012]]*)
9712ec8c4b4Smrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
9722ec8c4b4Smrg	10.*)
9732ec8c4b4Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
9747104f784Smrg      esac
9757104f784Smrg    ;;
9767104f784Smrg  esac
9777104f784Smrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
9787104f784Smrg      _lt_dar_single_mod='$single_module'
9797104f784Smrg    fi
9807104f784Smrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
9817104f784Smrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
9827104f784Smrg    else
9832ec8c4b4Smrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
9847104f784Smrg    fi
9857104f784Smrg    if test "$DSYMUTIL" != ":"; then
9862ec8c4b4Smrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
9877104f784Smrg    else
9887104f784Smrg      _lt_dsymutil=
9897104f784Smrg    fi
9907104f784Smrg    ;;
9917104f784Smrg  esac
9927104f784Smrg])
99309885543Smrg
9942ec8c4b4Smrg
9952ec8c4b4Smrg# _LT_DARWIN_LINKER_FEATURES
9962ec8c4b4Smrg# --------------------------
9972ec8c4b4Smrg# Checks for linker and compiler features on darwin
9982ec8c4b4Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
9992ec8c4b4Smrg[
10002ec8c4b4Smrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
10012ec8c4b4Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
10022ec8c4b4Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
10032ec8c4b4Smrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
10042ec8c4b4Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
10052ec8c4b4Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
10062ec8c4b4Smrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
10072ec8c4b4Smrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
10082ec8c4b4Smrg  case $cc_basename in
10092ec8c4b4Smrg     ifort*) _lt_dar_can_shared=yes ;;
10102ec8c4b4Smrg     *) _lt_dar_can_shared=$GCC ;;
10112ec8c4b4Smrg  esac
10122ec8c4b4Smrg  if test "$_lt_dar_can_shared" = "yes"; then
10132ec8c4b4Smrg    output_verbose_link_cmd=echo
10142ec8c4b4Smrg    _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}"
10152ec8c4b4Smrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
10162ec8c4b4Smrg    _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}"
10172ec8c4b4Smrg    _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}"
10182ec8c4b4Smrg    m4_if([$1], [CXX],
10192ec8c4b4Smrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
10202ec8c4b4Smrg      _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}"
10212ec8c4b4Smrg      _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}"
10222ec8c4b4Smrg    fi
10232ec8c4b4Smrg],[])
10242ec8c4b4Smrg  else
10252ec8c4b4Smrg  _LT_TAGVAR(ld_shlibs, $1)=no
10262ec8c4b4Smrg  fi
10272ec8c4b4Smrg])
10282ec8c4b4Smrg
10292ec8c4b4Smrg# _LT_SYS_MODULE_PATH_AIX
10302ec8c4b4Smrg# -----------------------
10312ec8c4b4Smrg# Links a minimal program and checks the executable
10322ec8c4b4Smrg# for the system default hardcoded library path. In most cases,
10332ec8c4b4Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
10342ec8c4b4Smrg# the location of the communication and MPI libs are included too.
10352ec8c4b4Smrg# If we don't find anything, use the default library path according
103609885543Smrg# to the aix ld manual.
10372ec8c4b4Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
10382ec8c4b4Smrg[m4_require([_LT_DECL_SED])dnl
10397104f784SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
10407104f784Smrglt_aix_libpath_sed='
10417104f784Smrg    /Import File Strings/,/^$/ {
10427104f784Smrg	/^0/ {
10437104f784Smrg	    s/^0  *\(.*\)$/\1/
10447104f784Smrg	    p
10457104f784Smrg	}
10467104f784Smrg    }'
10477104f784Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
104809885543Smrg# Check for a 64-bit object if we didn't find anything.
10497104f784Smrgif test -z "$aix_libpath"; then
10507104f784Smrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10517104f784Smrgfi],[])
105209885543Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
10532ec8c4b4Smrg])# _LT_SYS_MODULE_PATH_AIX
105409885543Smrg
105509885543Smrg
10562ec8c4b4Smrg# _LT_SHELL_INIT(ARG)
10572ec8c4b4Smrg# -------------------
10582ec8c4b4Smrgm4_define([_LT_SHELL_INIT],
105909885543Smrg[ifdef([AC_DIVERSION_NOTICE],
106009885543Smrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
106109885543Smrg	 [AC_DIVERT_PUSH(NOTICE)])
106209885543Smrg$1
106309885543SmrgAC_DIVERT_POP
10642ec8c4b4Smrg])# _LT_SHELL_INIT
106509885543Smrg
106609885543Smrg
10672ec8c4b4Smrg# _LT_PROG_ECHO_BACKSLASH
10682ec8c4b4Smrg# -----------------------
106909885543Smrg# Add some code to the start of the generated configure script which
107009885543Smrg# will find an echo command which doesn't interpret backslashes.
10712ec8c4b4Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
10722ec8c4b4Smrg[_LT_SHELL_INIT([
107309885543Smrg# Check that we are running under the correct shell.
107409885543SmrgSHELL=${CONFIG_SHELL-/bin/sh}
107509885543Smrg
10762ec8c4b4Smrgcase X$lt_ECHO in
107709885543SmrgX*--fallback-echo)
107809885543Smrg  # Remove one level of quotation (which was required for Make).
10792ec8c4b4Smrg  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
108009885543Smrg  ;;
108109885543Smrgesac
108209885543Smrg
10832ec8c4b4SmrgECHO=${lt_ECHO-echo}
108409885543Smrgif test "X[$]1" = X--no-reexec; then
108509885543Smrg  # Discard the --no-reexec flag, and continue.
108609885543Smrg  shift
108709885543Smrgelif test "X[$]1" = X--fallback-echo; then
108809885543Smrg  # Avoid inline document here, it may be left over
108909885543Smrg  :
10902ec8c4b4Smrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
10912ec8c4b4Smrg  # Yippee, $ECHO works!
109209885543Smrg  :
109309885543Smrgelse
109409885543Smrg  # Restart under the correct shell.
109509885543Smrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
109609885543Smrgfi
109709885543Smrg
109809885543Smrgif test "X[$]1" = X--fallback-echo; then
109909885543Smrg  # used as fallback echo
110009885543Smrg  shift
11012ec8c4b4Smrg  cat <<_LT_EOF
110209885543Smrg[$]*
11032ec8c4b4Smrg_LT_EOF
110409885543Smrg  exit 0
110509885543Smrgfi
110609885543Smrg
110709885543Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
110809885543Smrg# if CDPATH is set.
110909885543Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
111009885543Smrg
11112ec8c4b4Smrgif test -z "$lt_ECHO"; then
11122ec8c4b4Smrg  if test "X${echo_test_string+set}" != Xset; then
11132ec8c4b4Smrg    # find a string as large as possible, as long as the shell can cope with it
11142ec8c4b4Smrg    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
11152ec8c4b4Smrg      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
11162ec8c4b4Smrg      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
11172ec8c4b4Smrg	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
11182ec8c4b4Smrg      then
11192ec8c4b4Smrg        break
11202ec8c4b4Smrg      fi
11212ec8c4b4Smrg    done
11222ec8c4b4Smrg  fi
112309885543Smrg
11242ec8c4b4Smrg  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
11252ec8c4b4Smrg     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
11262ec8c4b4Smrg     test "X$echo_testing_string" = "X$echo_test_string"; then
11272ec8c4b4Smrg    :
11282ec8c4b4Smrg  else
11292ec8c4b4Smrg    # The Solaris, AIX, and Digital Unix default echo programs unquote
11302ec8c4b4Smrg    # backslashes.  This makes it impossible to quote backslashes using
11312ec8c4b4Smrg    #   echo "$something" | sed 's/\\/\\\\/g'
11322ec8c4b4Smrg    #
11332ec8c4b4Smrg    # So, first we look for a working echo in the user's PATH.
113409885543Smrg
11352ec8c4b4Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
11362ec8c4b4Smrg    for dir in $PATH /usr/ucb; do
11372ec8c4b4Smrg      IFS="$lt_save_ifs"
11382ec8c4b4Smrg      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
11392ec8c4b4Smrg         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
11402ec8c4b4Smrg         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
11412ec8c4b4Smrg         test "X$echo_testing_string" = "X$echo_test_string"; then
11422ec8c4b4Smrg        ECHO="$dir/echo"
11432ec8c4b4Smrg        break
11442ec8c4b4Smrg      fi
11452ec8c4b4Smrg    done
114609885543Smrg    IFS="$lt_save_ifs"
114709885543Smrg
11482ec8c4b4Smrg    if test "X$ECHO" = Xecho; then
11492ec8c4b4Smrg      # We didn't find a better echo, so look for alternatives.
11502ec8c4b4Smrg      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
11512ec8c4b4Smrg         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
11522ec8c4b4Smrg         test "X$echo_testing_string" = "X$echo_test_string"; then
11532ec8c4b4Smrg        # This shell has a builtin print -r that does the trick.
11542ec8c4b4Smrg        ECHO='print -r'
11552ec8c4b4Smrg      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
11562ec8c4b4Smrg	   test "X$CONFIG_SHELL" != X/bin/ksh; then
11572ec8c4b4Smrg        # If we have ksh, try running configure again with it.
11582ec8c4b4Smrg        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
11592ec8c4b4Smrg        export ORIGINAL_CONFIG_SHELL
11602ec8c4b4Smrg        CONFIG_SHELL=/bin/ksh
11612ec8c4b4Smrg        export CONFIG_SHELL
11622ec8c4b4Smrg        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
116309885543Smrg      else
11642ec8c4b4Smrg        # Try using printf.
11652ec8c4b4Smrg        ECHO='printf %s\n'
11662ec8c4b4Smrg        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
11672ec8c4b4Smrg	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
11682ec8c4b4Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
11692ec8c4b4Smrg	  # Cool, printf works
11702ec8c4b4Smrg	  :
11712ec8c4b4Smrg        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
11722ec8c4b4Smrg	     test "X$echo_testing_string" = 'X\t' &&
11732ec8c4b4Smrg	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
11742ec8c4b4Smrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
11752ec8c4b4Smrg	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
11762ec8c4b4Smrg	  export CONFIG_SHELL
11772ec8c4b4Smrg	  SHELL="$CONFIG_SHELL"
11782ec8c4b4Smrg	  export SHELL
11792ec8c4b4Smrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
11802ec8c4b4Smrg        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
11812ec8c4b4Smrg	     test "X$echo_testing_string" = 'X\t' &&
11822ec8c4b4Smrg	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
11832ec8c4b4Smrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
11842ec8c4b4Smrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
11852ec8c4b4Smrg        else
11862ec8c4b4Smrg	  # maybe with a smaller string...
11872ec8c4b4Smrg	  prev=:
118809885543Smrg
11892ec8c4b4Smrg	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
11902ec8c4b4Smrg	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
11912ec8c4b4Smrg	    then
11922ec8c4b4Smrg	      break
11932ec8c4b4Smrg	    fi
11942ec8c4b4Smrg	    prev="$cmd"
11952ec8c4b4Smrg	  done
119609885543Smrg
11972ec8c4b4Smrg	  if test "$prev" != 'sed 50q "[$]0"'; then
11982ec8c4b4Smrg	    echo_test_string=`eval $prev`
11992ec8c4b4Smrg	    export echo_test_string
12002ec8c4b4Smrg	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
12012ec8c4b4Smrg	  else
12022ec8c4b4Smrg	    # Oops.  We lost completely, so just stick with echo.
12032ec8c4b4Smrg	    ECHO=echo
12042ec8c4b4Smrg	  fi
12052ec8c4b4Smrg        fi
120609885543Smrg      fi
120709885543Smrg    fi
120809885543Smrg  fi
120909885543Smrgfi
121009885543Smrg
121109885543Smrg# Copy echo and quote the copy suitably for passing to libtool from
121209885543Smrg# the Makefile, instead of quoting the original, which is used later.
12132ec8c4b4Smrglt_ECHO=$ECHO
12142ec8c4b4Smrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
12152ec8c4b4Smrg   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
121609885543Smrgfi
121709885543Smrg
12182ec8c4b4SmrgAC_SUBST(lt_ECHO)
12192ec8c4b4Smrg])
12202ec8c4b4Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
12212ec8c4b4Smrg_LT_DECL([], [ECHO], [1],
12222ec8c4b4Smrg    [An echo program that does not interpret backslashes])
12232ec8c4b4Smrg])# _LT_PROG_ECHO_BACKSLASH
122409885543Smrg
122509885543Smrg
12262ec8c4b4Smrg# _LT_ENABLE_LOCK
12272ec8c4b4Smrg# ---------------
12282ec8c4b4Smrgm4_defun([_LT_ENABLE_LOCK],
122909885543Smrg[AC_ARG_ENABLE([libtool-lock],
12302ec8c4b4Smrg  [AS_HELP_STRING([--disable-libtool-lock],
12312ec8c4b4Smrg    [avoid locking (might break parallel builds)])])
123209885543Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
123309885543Smrg
123409885543Smrg# Some flags need to be propagated to the compiler or linker for good
123509885543Smrg# libtool support.
123609885543Smrgcase $host in
123709885543Smrgia64-*-hpux*)
123809885543Smrg  # Find out which ABI we are using.
123909885543Smrg  echo 'int i;' > conftest.$ac_ext
124009885543Smrg  if AC_TRY_EVAL(ac_compile); then
124109885543Smrg    case `/usr/bin/file conftest.$ac_objext` in
12422ec8c4b4Smrg      *ELF-32*)
12432ec8c4b4Smrg	HPUX_IA64_MODE="32"
12442ec8c4b4Smrg	;;
12452ec8c4b4Smrg      *ELF-64*)
12462ec8c4b4Smrg	HPUX_IA64_MODE="64"
12472ec8c4b4Smrg	;;
124809885543Smrg    esac
124909885543Smrg  fi
125009885543Smrg  rm -rf conftest*
125109885543Smrg  ;;
125209885543Smrg*-*-irix6*)
125309885543Smrg  # Find out which ABI we are using.
125409885543Smrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
125509885543Smrg  if AC_TRY_EVAL(ac_compile); then
12562ec8c4b4Smrg    if test "$lt_cv_prog_gnu_ld" = yes; then
12572ec8c4b4Smrg      case `/usr/bin/file conftest.$ac_objext` in
12582ec8c4b4Smrg	*32-bit*)
12592ec8c4b4Smrg	  LD="${LD-ld} -melf32bsmip"
12602ec8c4b4Smrg	  ;;
12612ec8c4b4Smrg	*N32*)
12622ec8c4b4Smrg	  LD="${LD-ld} -melf32bmipn32"
12632ec8c4b4Smrg	  ;;
12642ec8c4b4Smrg	*64-bit*)
12652ec8c4b4Smrg	  LD="${LD-ld} -melf64bmip"
12662ec8c4b4Smrg	;;
12672ec8c4b4Smrg      esac
12682ec8c4b4Smrg    else
12692ec8c4b4Smrg      case `/usr/bin/file conftest.$ac_objext` in
12702ec8c4b4Smrg	*32-bit*)
12712ec8c4b4Smrg	  LD="${LD-ld} -32"
12722ec8c4b4Smrg	  ;;
12732ec8c4b4Smrg	*N32*)
12742ec8c4b4Smrg	  LD="${LD-ld} -n32"
12752ec8c4b4Smrg	  ;;
12762ec8c4b4Smrg	*64-bit*)
12772ec8c4b4Smrg	  LD="${LD-ld} -64"
12782ec8c4b4Smrg	  ;;
12792ec8c4b4Smrg      esac
12802ec8c4b4Smrg    fi
128109885543Smrg  fi
128209885543Smrg  rm -rf conftest*
128309885543Smrg  ;;
128409885543Smrg
12857104f784Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
12862ec8c4b4Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
128709885543Smrg  # Find out which ABI we are using.
128809885543Smrg  echo 'int i;' > conftest.$ac_ext
128909885543Smrg  if AC_TRY_EVAL(ac_compile); then
129009885543Smrg    case `/usr/bin/file conftest.o` in
12912ec8c4b4Smrg      *32-bit*)
12922ec8c4b4Smrg	case $host in
12932ec8c4b4Smrg	  x86_64-*kfreebsd*-gnu)
12942ec8c4b4Smrg	    LD="${LD-ld} -m elf_i386_fbsd"
12952ec8c4b4Smrg	    ;;
12962ec8c4b4Smrg	  x86_64-*linux*)
12972ec8c4b4Smrg	    LD="${LD-ld} -m elf_i386"
12982ec8c4b4Smrg	    ;;
12992ec8c4b4Smrg	  ppc64-*linux*|powerpc64-*linux*)
13002ec8c4b4Smrg	    LD="${LD-ld} -m elf32ppclinux"
13012ec8c4b4Smrg	    ;;
13022ec8c4b4Smrg	  s390x-*linux*)
13032ec8c4b4Smrg	    LD="${LD-ld} -m elf_s390"
13042ec8c4b4Smrg	    ;;
13052ec8c4b4Smrg	  sparc64-*linux*)
13062ec8c4b4Smrg	    LD="${LD-ld} -m elf32_sparc"
13072ec8c4b4Smrg	    ;;
13082ec8c4b4Smrg	esac
13092ec8c4b4Smrg	;;
13102ec8c4b4Smrg      *64-bit*)
13112ec8c4b4Smrg	case $host in
13122ec8c4b4Smrg	  x86_64-*kfreebsd*-gnu)
13132ec8c4b4Smrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
13142ec8c4b4Smrg	    ;;
13152ec8c4b4Smrg	  x86_64-*linux*)
13162ec8c4b4Smrg	    LD="${LD-ld} -m elf_x86_64"
13172ec8c4b4Smrg	    ;;
13182ec8c4b4Smrg	  ppc*-*linux*|powerpc*-*linux*)
13192ec8c4b4Smrg	    LD="${LD-ld} -m elf64ppc"
13202ec8c4b4Smrg	    ;;
13212ec8c4b4Smrg	  s390*-*linux*|s390*-*tpf*)
13222ec8c4b4Smrg	    LD="${LD-ld} -m elf64_s390"
13232ec8c4b4Smrg	    ;;
13242ec8c4b4Smrg	  sparc*-*linux*)
13252ec8c4b4Smrg	    LD="${LD-ld} -m elf64_sparc"
13262ec8c4b4Smrg	    ;;
13272ec8c4b4Smrg	esac
13282ec8c4b4Smrg	;;
132909885543Smrg    esac
133009885543Smrg  fi
133109885543Smrg  rm -rf conftest*
133209885543Smrg  ;;
133309885543Smrg
133409885543Smrg*-*-sco3.2v5*)
133509885543Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
133609885543Smrg  SAVE_CFLAGS="$CFLAGS"
133709885543Smrg  CFLAGS="$CFLAGS -belf"
133809885543Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
133909885543Smrg    [AC_LANG_PUSH(C)
13402ec8c4b4Smrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
134109885543Smrg     AC_LANG_POP])
134209885543Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
134309885543Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
134409885543Smrg    CFLAGS="$SAVE_CFLAGS"
134509885543Smrg  fi
134609885543Smrg  ;;
134709885543Smrgsparc*-*solaris*)
134809885543Smrg  # Find out which ABI we are using.
134909885543Smrg  echo 'int i;' > conftest.$ac_ext
135009885543Smrg  if AC_TRY_EVAL(ac_compile); then
135109885543Smrg    case `/usr/bin/file conftest.o` in
135209885543Smrg    *64-bit*)
135309885543Smrg      case $lt_cv_prog_gnu_ld in
135409885543Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
13557104f784Smrg      *)
13562ec8c4b4Smrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
13577104f784Smrg	  LD="${LD-ld} -64"
13587104f784Smrg	fi
13597104f784Smrg	;;
136009885543Smrg      esac
136109885543Smrg      ;;
136209885543Smrg    esac
136309885543Smrg  fi
136409885543Smrg  rm -rf conftest*
136509885543Smrg  ;;
136609885543Smrgesac
136709885543Smrg
136809885543Smrgneed_locks="$enable_libtool_lock"
13692ec8c4b4Smrg])# _LT_ENABLE_LOCK
13702ec8c4b4Smrg
13712ec8c4b4Smrg
13722ec8c4b4Smrg# _LT_CMD_OLD_ARCHIVE
13732ec8c4b4Smrg# -------------------
13742ec8c4b4Smrgm4_defun([_LT_CMD_OLD_ARCHIVE],
13752ec8c4b4Smrg[AC_CHECK_TOOL(AR, ar, false)
13762ec8c4b4Smrgtest -z "$AR" && AR=ar
13772ec8c4b4Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
13782ec8c4b4Smrg_LT_DECL([], [AR], [1], [The archiver])
13792ec8c4b4Smrg_LT_DECL([], [AR_FLAGS], [1])
13802ec8c4b4Smrg
13812ec8c4b4SmrgAC_CHECK_TOOL(STRIP, strip, :)
13822ec8c4b4Smrgtest -z "$STRIP" && STRIP=:
13832ec8c4b4Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
13842ec8c4b4Smrg
13852ec8c4b4SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
13862ec8c4b4Smrgtest -z "$RANLIB" && RANLIB=:
13872ec8c4b4Smrg_LT_DECL([], [RANLIB], [1],
13882ec8c4b4Smrg    [Commands used to install an old-style archive])
138909885543Smrg
13902ec8c4b4Smrg# Determine commands to create old-style static archives.
13912ec8c4b4Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
13922ec8c4b4Smrgold_postinstall_cmds='chmod 644 $oldlib'
13932ec8c4b4Smrgold_postuninstall_cmds=
13942ec8c4b4Smrg
13952ec8c4b4Smrgif test -n "$RANLIB"; then
13962ec8c4b4Smrg  case $host_os in
13972ec8c4b4Smrg  openbsd*)
13982ec8c4b4Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
13992ec8c4b4Smrg    ;;
14002ec8c4b4Smrg  *)
14012ec8c4b4Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
14022ec8c4b4Smrg    ;;
14032ec8c4b4Smrg  esac
14042ec8c4b4Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
14052ec8c4b4Smrgfi
14062ec8c4b4Smrg_LT_DECL([], [old_postinstall_cmds], [2])
14072ec8c4b4Smrg_LT_DECL([], [old_postuninstall_cmds], [2])
14082ec8c4b4Smrg_LT_TAGDECL([], [old_archive_cmds], [2],
14092ec8c4b4Smrg    [Commands used to build an old-style archive])
14102ec8c4b4Smrg])# _LT_CMD_OLD_ARCHIVE
141109885543Smrg
141209885543Smrg
14132ec8c4b4Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
141409885543Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
141509885543Smrg# ----------------------------------------------------------------
141609885543Smrg# Check whether the given compiler option works
14172ec8c4b4SmrgAC_DEFUN([_LT_COMPILER_OPTION],
14182ec8c4b4Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
14192ec8c4b4Smrgm4_require([_LT_DECL_SED])dnl
142009885543SmrgAC_CACHE_CHECK([$1], [$2],
142109885543Smrg  [$2=no
14222ec8c4b4Smrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
14237104f784Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
142409885543Smrg   lt_compiler_flag="$3"
142509885543Smrg   # Insert the option either (1) after the last *FLAGS variable, or
142609885543Smrg   # (2) before a word containing "conftest.", or (3) at the end.
142709885543Smrg   # Note that $ac_compile itself does not contain backslashes and begins
142809885543Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
142909885543Smrg   # The option is referenced via a variable to avoid confusing sed.
143009885543Smrg   lt_compile=`echo "$ac_compile" | $SED \
143109885543Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
143209885543Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
143309885543Smrg   -e 's:$: $lt_compiler_flag:'`
143409885543Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
143509885543Smrg   (eval "$lt_compile" 2>conftest.err)
143609885543Smrg   ac_status=$?
143709885543Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
143809885543Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
143909885543Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
144009885543Smrg     # The compiler can only warn and ignore the option if not recognized
144109885543Smrg     # So say no if there are warnings other than the usual output.
14422ec8c4b4Smrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
144309885543Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
144409885543Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
144509885543Smrg       $2=yes
144609885543Smrg     fi
144709885543Smrg   fi
14482ec8c4b4Smrg   $RM conftest*
144909885543Smrg])
145009885543Smrg
145109885543Smrgif test x"[$]$2" = xyes; then
14522ec8c4b4Smrg    m4_if([$5], , :, [$5])
145309885543Smrgelse
14542ec8c4b4Smrg    m4_if([$6], , :, [$6])
145509885543Smrgfi
14562ec8c4b4Smrg])# _LT_COMPILER_OPTION
145709885543Smrg
14582ec8c4b4Smrg# Old name:
14592ec8c4b4SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
14602ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
14612ec8c4b4Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
146209885543Smrg
14632ec8c4b4Smrg
14642ec8c4b4Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
14652ec8c4b4Smrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
14662ec8c4b4Smrg# ----------------------------------------------------
14672ec8c4b4Smrg# Check whether the given linker option works
14682ec8c4b4SmrgAC_DEFUN([_LT_LINKER_OPTION],
14692ec8c4b4Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
14702ec8c4b4Smrgm4_require([_LT_DECL_SED])dnl
14717104f784SmrgAC_CACHE_CHECK([$1], [$2],
147209885543Smrg  [$2=no
147309885543Smrg   save_LDFLAGS="$LDFLAGS"
147409885543Smrg   LDFLAGS="$LDFLAGS $3"
14757104f784Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
147609885543Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
147709885543Smrg     # The linker can only warn and ignore the option if not recognized
147809885543Smrg     # So say no if there are warnings
147909885543Smrg     if test -s conftest.err; then
148009885543Smrg       # Append any errors to the config.log.
148109885543Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
14822ec8c4b4Smrg       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
148309885543Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
148409885543Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
148509885543Smrg         $2=yes
148609885543Smrg       fi
148709885543Smrg     else
148809885543Smrg       $2=yes
148909885543Smrg     fi
149009885543Smrg   fi
14912ec8c4b4Smrg   $RM -r conftest*
149209885543Smrg   LDFLAGS="$save_LDFLAGS"
149309885543Smrg])
149409885543Smrg
149509885543Smrgif test x"[$]$2" = xyes; then
14962ec8c4b4Smrg    m4_if([$4], , :, [$4])
149709885543Smrgelse
14982ec8c4b4Smrg    m4_if([$5], , :, [$5])
149909885543Smrgfi
15002ec8c4b4Smrg])# _LT_LINKER_OPTION
150109885543Smrg
15022ec8c4b4Smrg# Old name:
15032ec8c4b4SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
15042ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
15052ec8c4b4Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
150609885543Smrg
15072ec8c4b4Smrg
15082ec8c4b4Smrg# LT_CMD_MAX_LEN
15092ec8c4b4Smrg#---------------
15102ec8c4b4SmrgAC_DEFUN([LT_CMD_MAX_LEN],
15112ec8c4b4Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
15122ec8c4b4Smrg# find the maximum length of command line arguments
151309885543SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
151409885543SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
151509885543Smrg  i=0
151609885543Smrg  teststring="ABCD"
151709885543Smrg
151809885543Smrg  case $build_os in
151909885543Smrg  msdosdjgpp*)
152009885543Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
152109885543Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
152209885543Smrg    # during glob expansion).  Even if it were fixed, the result of this
152309885543Smrg    # check would be larger than it should be.
152409885543Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
152509885543Smrg    ;;
152609885543Smrg
152709885543Smrg  gnu*)
152809885543Smrg    # Under GNU Hurd, this test is not required because there is
152909885543Smrg    # no limit to the length of command line arguments.
153009885543Smrg    # Libtool will interpret -1 as no limit whatsoever
153109885543Smrg    lt_cv_sys_max_cmd_len=-1;
153209885543Smrg    ;;
153309885543Smrg
15342ec8c4b4Smrg  cygwin* | mingw* | cegcc*)
153509885543Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
153609885543Smrg    # about 5 minutes as the teststring grows exponentially.
153709885543Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
153809885543Smrg    # you end up with a "frozen" computer, even though with patience
153909885543Smrg    # the test eventually succeeds (with a max line length of 256k).
154009885543Smrg    # Instead, let's just punt: use the minimum linelength reported by
154109885543Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
154209885543Smrg    lt_cv_sys_max_cmd_len=8192;
154309885543Smrg    ;;
154409885543Smrg
154509885543Smrg  amigaos*)
154609885543Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
154709885543Smrg    # So we just punt and use a minimum line length of 8192.
154809885543Smrg    lt_cv_sys_max_cmd_len=8192;
154909885543Smrg    ;;
155009885543Smrg
155109885543Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
155209885543Smrg    # This has been around since 386BSD, at least.  Likely further.
155309885543Smrg    if test -x /sbin/sysctl; then
155409885543Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
155509885543Smrg    elif test -x /usr/sbin/sysctl; then
155609885543Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
155709885543Smrg    else
155809885543Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
155909885543Smrg    fi
156009885543Smrg    # And add a safety zone
156109885543Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
156209885543Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
156309885543Smrg    ;;
156409885543Smrg
156509885543Smrg  interix*)
156609885543Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
156709885543Smrg    lt_cv_sys_max_cmd_len=196608
156809885543Smrg    ;;
156909885543Smrg
157009885543Smrg  osf*)
157109885543Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
157209885543Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
157309885543Smrg    # nice to cause kernel panics so lets avoid the loop below.
157409885543Smrg    # First set a reasonable default.
157509885543Smrg    lt_cv_sys_max_cmd_len=16384
157609885543Smrg    #
157709885543Smrg    if test -x /sbin/sysconfig; then
157809885543Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
157909885543Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
158009885543Smrg      esac
158109885543Smrg    fi
158209885543Smrg    ;;
158309885543Smrg  sco3.2v5*)
158409885543Smrg    lt_cv_sys_max_cmd_len=102400
158509885543Smrg    ;;
158609885543Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
158709885543Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
158809885543Smrg    if test -n "$kargmax"; then
15892ec8c4b4Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
159009885543Smrg    else
159109885543Smrg      lt_cv_sys_max_cmd_len=32768
159209885543Smrg    fi
159309885543Smrg    ;;
159409885543Smrg  *)
15957104f784Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
15967104f784Smrg    if test -n "$lt_cv_sys_max_cmd_len"; then
15977104f784Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
15987104f784Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
15997104f784Smrg    else
16002ec8c4b4Smrg      # Make teststring a little bigger before we do anything with it.
16012ec8c4b4Smrg      # a 1K string should be a reasonable start.
16022ec8c4b4Smrg      for i in 1 2 3 4 5 6 7 8 ; do
16032ec8c4b4Smrg        teststring=$teststring$teststring
16042ec8c4b4Smrg      done
16057104f784Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
16062ec8c4b4Smrg      # If test is not a shell built-in, we'll probably end up computing a
16072ec8c4b4Smrg      # maximum length that is only half of the actual maximum length, but
16082ec8c4b4Smrg      # we can't tell.
16092ec8c4b4Smrg      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
16102ec8c4b4Smrg	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
16117104f784Smrg	      test $i != 17 # 1/2 MB should be enough
16127104f784Smrg      do
16137104f784Smrg        i=`expr $i + 1`
16147104f784Smrg        teststring=$teststring$teststring
16157104f784Smrg      done
16162ec8c4b4Smrg      # Only check the string length outside the loop.
16172ec8c4b4Smrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
16187104f784Smrg      teststring=
16192ec8c4b4Smrg      # Add a significant safety factor because C++ compilers can tack on
16202ec8c4b4Smrg      # massive amounts of additional arguments before passing them to the
16212ec8c4b4Smrg      # linker.  It appears as though 1/2 is a usable value.
16227104f784Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
16237104f784Smrg    fi
162409885543Smrg    ;;
162509885543Smrg  esac
162609885543Smrg])
162709885543Smrgif test -n $lt_cv_sys_max_cmd_len ; then
162809885543Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
162909885543Smrgelse
163009885543Smrg  AC_MSG_RESULT(none)
163109885543Smrgfi
16322ec8c4b4Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
16332ec8c4b4Smrg_LT_DECL([], [max_cmd_len], [0],
16342ec8c4b4Smrg    [What is the maximum length of a command?])
16352ec8c4b4Smrg])# LT_CMD_MAX_LEN
163609885543Smrg
16372ec8c4b4Smrg# Old name:
16382ec8c4b4SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
16392ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
16402ec8c4b4Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
164109885543Smrg
16422ec8c4b4Smrg
16432ec8c4b4Smrg# _LT_HEADER_DLFCN
16442ec8c4b4Smrg# ----------------
16452ec8c4b4Smrgm4_defun([_LT_HEADER_DLFCN],
16462ec8c4b4Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
16472ec8c4b4Smrg])# _LT_HEADER_DLFCN
164809885543Smrg
164909885543Smrg
16502ec8c4b4Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
16512ec8c4b4Smrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
16522ec8c4b4Smrg# ----------------------------------------------------------------
16532ec8c4b4Smrgm4_defun([_LT_TRY_DLOPEN_SELF],
16542ec8c4b4Smrg[m4_require([_LT_HEADER_DLFCN])dnl
165509885543Smrgif test "$cross_compiling" = yes; then :
165609885543Smrg  [$4]
165709885543Smrgelse
165809885543Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
165909885543Smrg  lt_status=$lt_dlunknown
16602ec8c4b4Smrg  cat > conftest.$ac_ext <<_LT_EOF
166109885543Smrg[#line __oline__ "configure"
166209885543Smrg#include "confdefs.h"
166309885543Smrg
166409885543Smrg#if HAVE_DLFCN_H
166509885543Smrg#include <dlfcn.h>
166609885543Smrg#endif
166709885543Smrg
166809885543Smrg#include <stdio.h>
166909885543Smrg
167009885543Smrg#ifdef RTLD_GLOBAL
167109885543Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
167209885543Smrg#else
167309885543Smrg#  ifdef DL_GLOBAL
167409885543Smrg#    define LT_DLGLOBAL		DL_GLOBAL
167509885543Smrg#  else
167609885543Smrg#    define LT_DLGLOBAL		0
167709885543Smrg#  endif
167809885543Smrg#endif
167909885543Smrg
168009885543Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
168109885543Smrg   find out it does not work in some platform. */
168209885543Smrg#ifndef LT_DLLAZY_OR_NOW
168309885543Smrg#  ifdef RTLD_LAZY
168409885543Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
168509885543Smrg#  else
168609885543Smrg#    ifdef DL_LAZY
168709885543Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
168809885543Smrg#    else
168909885543Smrg#      ifdef RTLD_NOW
169009885543Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
169109885543Smrg#      else
169209885543Smrg#        ifdef DL_NOW
169309885543Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
169409885543Smrg#        else
169509885543Smrg#          define LT_DLLAZY_OR_NOW	0
169609885543Smrg#        endif
169709885543Smrg#      endif
169809885543Smrg#    endif
169909885543Smrg#  endif
170009885543Smrg#endif
170109885543Smrg
170209885543Smrgvoid fnord() { int i=42;}
170309885543Smrgint main ()
170409885543Smrg{
170509885543Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
170609885543Smrg  int status = $lt_dlunknown;
170709885543Smrg
170809885543Smrg  if (self)
170909885543Smrg    {
171009885543Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
171109885543Smrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
171209885543Smrg      /* dlclose (self); */
171309885543Smrg    }
171409885543Smrg  else
171509885543Smrg    puts (dlerror ());
171609885543Smrg
17172ec8c4b4Smrg  return status;
171809885543Smrg}]
17192ec8c4b4Smrg_LT_EOF
172009885543Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
172109885543Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
172209885543Smrg    lt_status=$?
172309885543Smrg    case x$lt_status in
172409885543Smrg      x$lt_dlno_uscore) $1 ;;
172509885543Smrg      x$lt_dlneed_uscore) $2 ;;
172609885543Smrg      x$lt_dlunknown|x*) $3 ;;
172709885543Smrg    esac
172809885543Smrg  else :
172909885543Smrg    # compilation failed
173009885543Smrg    $3
173109885543Smrg  fi
173209885543Smrgfi
173309885543Smrgrm -fr conftest*
17342ec8c4b4Smrg])# _LT_TRY_DLOPEN_SELF
173509885543Smrg
173609885543Smrg
17372ec8c4b4Smrg# LT_SYS_DLOPEN_SELF
17382ec8c4b4Smrg# ------------------
17392ec8c4b4SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
17402ec8c4b4Smrg[m4_require([_LT_HEADER_DLFCN])dnl
174109885543Smrgif test "x$enable_dlopen" != xyes; then
174209885543Smrg  enable_dlopen=unknown
174309885543Smrg  enable_dlopen_self=unknown
174409885543Smrg  enable_dlopen_self_static=unknown
174509885543Smrgelse
174609885543Smrg  lt_cv_dlopen=no
174709885543Smrg  lt_cv_dlopen_libs=
174809885543Smrg
174909885543Smrg  case $host_os in
175009885543Smrg  beos*)
175109885543Smrg    lt_cv_dlopen="load_add_on"
175209885543Smrg    lt_cv_dlopen_libs=
175309885543Smrg    lt_cv_dlopen_self=yes
175409885543Smrg    ;;
175509885543Smrg
17562ec8c4b4Smrg  mingw* | pw32* | cegcc*)
175709885543Smrg    lt_cv_dlopen="LoadLibrary"
175809885543Smrg    lt_cv_dlopen_libs=
17592ec8c4b4Smrg    ;;
176009885543Smrg
176109885543Smrg  cygwin*)
176209885543Smrg    lt_cv_dlopen="dlopen"
176309885543Smrg    lt_cv_dlopen_libs=
17642ec8c4b4Smrg    ;;
176509885543Smrg
176609885543Smrg  darwin*)
176709885543Smrg  # if libdl is installed we need to link against it
176809885543Smrg    AC_CHECK_LIB([dl], [dlopen],
176909885543Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
177009885543Smrg    lt_cv_dlopen="dyld"
177109885543Smrg    lt_cv_dlopen_libs=
177209885543Smrg    lt_cv_dlopen_self=yes
177309885543Smrg    ])
17742ec8c4b4Smrg    ;;
177509885543Smrg
177609885543Smrg  *)
177709885543Smrg    AC_CHECK_FUNC([shl_load],
177809885543Smrg	  [lt_cv_dlopen="shl_load"],
177909885543Smrg      [AC_CHECK_LIB([dld], [shl_load],
17807104f784Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
178109885543Smrg	[AC_CHECK_FUNC([dlopen],
178209885543Smrg	      [lt_cv_dlopen="dlopen"],
178309885543Smrg	  [AC_CHECK_LIB([dl], [dlopen],
178409885543Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
178509885543Smrg	    [AC_CHECK_LIB([svld], [dlopen],
178609885543Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
178709885543Smrg	      [AC_CHECK_LIB([dld], [dld_link],
17887104f784Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
178909885543Smrg	      ])
179009885543Smrg	    ])
179109885543Smrg	  ])
179209885543Smrg	])
179309885543Smrg      ])
179409885543Smrg    ;;
179509885543Smrg  esac
179609885543Smrg
179709885543Smrg  if test "x$lt_cv_dlopen" != xno; then
179809885543Smrg    enable_dlopen=yes
179909885543Smrg  else
180009885543Smrg    enable_dlopen=no
180109885543Smrg  fi
180209885543Smrg
180309885543Smrg  case $lt_cv_dlopen in
180409885543Smrg  dlopen)
180509885543Smrg    save_CPPFLAGS="$CPPFLAGS"
180609885543Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
180709885543Smrg
180809885543Smrg    save_LDFLAGS="$LDFLAGS"
180909885543Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
181009885543Smrg
181109885543Smrg    save_LIBS="$LIBS"
181209885543Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
181309885543Smrg
181409885543Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
181509885543Smrg	  lt_cv_dlopen_self, [dnl
18162ec8c4b4Smrg	  _LT_TRY_DLOPEN_SELF(
181709885543Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
181809885543Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
181909885543Smrg    ])
182009885543Smrg
182109885543Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
182209885543Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
182309885543Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
18242ec8c4b4Smrg	  lt_cv_dlopen_self_static, [dnl
18252ec8c4b4Smrg	  _LT_TRY_DLOPEN_SELF(
182609885543Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
182709885543Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
182809885543Smrg      ])
182909885543Smrg    fi
183009885543Smrg
183109885543Smrg    CPPFLAGS="$save_CPPFLAGS"
183209885543Smrg    LDFLAGS="$save_LDFLAGS"
183309885543Smrg    LIBS="$save_LIBS"
183409885543Smrg    ;;
183509885543Smrg  esac
183609885543Smrg
183709885543Smrg  case $lt_cv_dlopen_self in
183809885543Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
183909885543Smrg  *) enable_dlopen_self=unknown ;;
184009885543Smrg  esac
184109885543Smrg
184209885543Smrg  case $lt_cv_dlopen_self_static in
184309885543Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
184409885543Smrg  *) enable_dlopen_self_static=unknown ;;
184509885543Smrg  esac
184609885543Smrgfi
18472ec8c4b4Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
18482ec8c4b4Smrg	 [Whether dlopen is supported])
18492ec8c4b4Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
18502ec8c4b4Smrg	 [Whether dlopen of programs is supported])
18512ec8c4b4Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
18522ec8c4b4Smrg	 [Whether dlopen of statically linked programs is supported])
18532ec8c4b4Smrg])# LT_SYS_DLOPEN_SELF
185409885543Smrg
18552ec8c4b4Smrg# Old name:
18562ec8c4b4SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
18572ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
18582ec8c4b4Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
185909885543Smrg
18602ec8c4b4Smrg
18612ec8c4b4Smrg# _LT_COMPILER_C_O([TAGNAME])
18622ec8c4b4Smrg# ---------------------------
18632ec8c4b4Smrg# Check to see if options -c and -o are simultaneously supported by compiler.
18642ec8c4b4Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
18652ec8c4b4Smrgm4_defun([_LT_COMPILER_C_O],
18662ec8c4b4Smrg[m4_require([_LT_DECL_SED])dnl
18672ec8c4b4Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
18682ec8c4b4Smrgm4_require([_LT_TAG_COMPILER])dnl
186909885543SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
18702ec8c4b4Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
18712ec8c4b4Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
18722ec8c4b4Smrg   $RM -r conftest 2>/dev/null
187309885543Smrg   mkdir conftest
187409885543Smrg   cd conftest
187509885543Smrg   mkdir out
18767104f784Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
187709885543Smrg
187809885543Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
187909885543Smrg   # Insert the option either (1) after the last *FLAGS variable, or
188009885543Smrg   # (2) before a word containing "conftest.", or (3) at the end.
188109885543Smrg   # Note that $ac_compile itself does not contain backslashes and begins
188209885543Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
188309885543Smrg   lt_compile=`echo "$ac_compile" | $SED \
188409885543Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
188509885543Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
188609885543Smrg   -e 's:$: $lt_compiler_flag:'`
188709885543Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
188809885543Smrg   (eval "$lt_compile" 2>out/conftest.err)
188909885543Smrg   ac_status=$?
189009885543Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
189109885543Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
189209885543Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
189309885543Smrg   then
189409885543Smrg     # The compiler can only warn and ignore the option if not recognized
189509885543Smrg     # So say no if there are warnings
18962ec8c4b4Smrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
189709885543Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
189809885543Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
18992ec8c4b4Smrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
190009885543Smrg     fi
190109885543Smrg   fi
190209885543Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
19032ec8c4b4Smrg   $RM conftest*
190409885543Smrg   # SGI C++ compiler will create directory out/ii_files/ for
190509885543Smrg   # template instantiation
19062ec8c4b4Smrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
19072ec8c4b4Smrg   $RM out/* && rmdir out
190809885543Smrg   cd ..
19092ec8c4b4Smrg   $RM -r conftest
19102ec8c4b4Smrg   $RM conftest*
191109885543Smrg])
19122ec8c4b4Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
19132ec8c4b4Smrg	[Does compiler simultaneously support -c and -o options?])
19142ec8c4b4Smrg])# _LT_COMPILER_C_O
191509885543Smrg
191609885543Smrg
19172ec8c4b4Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
19182ec8c4b4Smrg# ----------------------------------
191909885543Smrg# Check to see if we can do hard links to lock some files if needed
19202ec8c4b4Smrgm4_defun([_LT_COMPILER_FILE_LOCKS],
19212ec8c4b4Smrg[m4_require([_LT_ENABLE_LOCK])dnl
19222ec8c4b4Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
19232ec8c4b4Smrg_LT_COMPILER_C_O([$1])
192409885543Smrg
192509885543Smrghard_links="nottested"
19262ec8c4b4Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
192709885543Smrg  # do not overwrite the value of need_locks provided by the user
192809885543Smrg  AC_MSG_CHECKING([if we can lock with hard links])
192909885543Smrg  hard_links=yes
19302ec8c4b4Smrg  $RM conftest*
193109885543Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
193209885543Smrg  touch conftest.a
193309885543Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
193409885543Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
193509885543Smrg  AC_MSG_RESULT([$hard_links])
193609885543Smrg  if test "$hard_links" = no; then
193709885543Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
193809885543Smrg    need_locks=warn
193909885543Smrg  fi
194009885543Smrgelse
194109885543Smrg  need_locks=no
194209885543Smrgfi
19432ec8c4b4Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
19442ec8c4b4Smrg])# _LT_COMPILER_FILE_LOCKS
194509885543Smrg
194609885543Smrg
19472ec8c4b4Smrg# _LT_CHECK_OBJDIR
19482ec8c4b4Smrg# ----------------
19492ec8c4b4Smrgm4_defun([_LT_CHECK_OBJDIR],
195009885543Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
195109885543Smrg[rm -f .libs 2>/dev/null
195209885543Smrgmkdir .libs 2>/dev/null
195309885543Smrgif test -d .libs; then
195409885543Smrg  lt_cv_objdir=.libs
195509885543Smrgelse
195609885543Smrg  # MS-DOS does not allow filenames that begin with a dot.
195709885543Smrg  lt_cv_objdir=_libs
195809885543Smrgfi
195909885543Smrgrmdir .libs 2>/dev/null])
196009885543Smrgobjdir=$lt_cv_objdir
19612ec8c4b4Smrg_LT_DECL([], [objdir], [0],
19622ec8c4b4Smrg         [The name of the directory that contains temporary libtool files])dnl
19632ec8c4b4Smrgm4_pattern_allow([LT_OBJDIR])dnl
19642ec8c4b4SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
19652ec8c4b4Smrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
19662ec8c4b4Smrg])# _LT_CHECK_OBJDIR
196709885543Smrg
196809885543Smrg
19692ec8c4b4Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
19702ec8c4b4Smrg# --------------------------------------
197109885543Smrg# Check hardcoding attributes.
19722ec8c4b4Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
197309885543Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
19742ec8c4b4Smrg_LT_TAGVAR(hardcode_action, $1)=
19752ec8c4b4Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
19762ec8c4b4Smrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
19772ec8c4b4Smrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
197809885543Smrg
19792ec8c4b4Smrg  # We can hardcode non-existent directories.
19802ec8c4b4Smrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
198109885543Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
198209885543Smrg     # have to relink, otherwise we might link with an installed library
198309885543Smrg     # when we should be linking with a yet-to-be-installed one
19842ec8c4b4Smrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
19852ec8c4b4Smrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
198609885543Smrg    # Linking always hardcodes the temporary library directory.
19872ec8c4b4Smrg    _LT_TAGVAR(hardcode_action, $1)=relink
198809885543Smrg  else
198909885543Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
19902ec8c4b4Smrg    _LT_TAGVAR(hardcode_action, $1)=immediate
199109885543Smrg  fi
199209885543Smrgelse
199309885543Smrg  # We cannot hardcode anything, or else we can only hardcode existing
199409885543Smrg  # directories.
19952ec8c4b4Smrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
199609885543Smrgfi
19972ec8c4b4SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
199809885543Smrg
19992ec8c4b4Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
20002ec8c4b4Smrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
200109885543Smrg  # Fast installation is not supported
200209885543Smrg  enable_fast_install=no
200309885543Smrgelif test "$shlibpath_overrides_runpath" = yes ||
200409885543Smrg     test "$enable_shared" = no; then
200509885543Smrg  # Fast installation is not necessary
200609885543Smrg  enable_fast_install=needless
200709885543Smrgfi
20082ec8c4b4Smrg_LT_TAGDECL([], [hardcode_action], [0],
20092ec8c4b4Smrg    [How to hardcode a shared library path into an executable])
20102ec8c4b4Smrg])# _LT_LINKER_HARDCODE_LIBPATH
201109885543Smrg
201209885543Smrg
20132ec8c4b4Smrg# _LT_CMD_STRIPLIB
20142ec8c4b4Smrg# ----------------
20152ec8c4b4Smrgm4_defun([_LT_CMD_STRIPLIB],
20162ec8c4b4Smrg[m4_require([_LT_DECL_EGREP])
20172ec8c4b4Smrgstriplib=
201809885543Smrgold_striplib=
201909885543SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
20202ec8c4b4Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
202109885543Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
202209885543Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
202309885543Smrg  AC_MSG_RESULT([yes])
202409885543Smrgelse
202509885543Smrg# FIXME - insert some real tests, host_os isn't really good enough
202609885543Smrg  case $host_os in
20272ec8c4b4Smrg  darwin*)
20282ec8c4b4Smrg    if test -n "$STRIP" ; then
20292ec8c4b4Smrg      striplib="$STRIP -x"
20302ec8c4b4Smrg      old_striplib="$STRIP -S"
20312ec8c4b4Smrg      AC_MSG_RESULT([yes])
20322ec8c4b4Smrg    else
20332ec8c4b4Smrg      AC_MSG_RESULT([no])
20342ec8c4b4Smrg    fi
20352ec8c4b4Smrg    ;;
20362ec8c4b4Smrg  *)
20372ec8c4b4Smrg    AC_MSG_RESULT([no])
203809885543Smrg    ;;
203909885543Smrg  esac
204009885543Smrgfi
20412ec8c4b4Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
20422ec8c4b4Smrg_LT_DECL([], [striplib], [1])
20432ec8c4b4Smrg])# _LT_CMD_STRIPLIB
204409885543Smrg
204509885543Smrg
20462ec8c4b4Smrg# _LT_SYS_DYNAMIC_LINKER([TAG])
204709885543Smrg# -----------------------------
204809885543Smrg# PORTME Fill in your ld.so characteristics
20492ec8c4b4Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
20502ec8c4b4Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
20512ec8c4b4Smrgm4_require([_LT_DECL_EGREP])dnl
20522ec8c4b4Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
20532ec8c4b4Smrgm4_require([_LT_DECL_OBJDUMP])dnl
20542ec8c4b4Smrgm4_require([_LT_DECL_SED])dnl
20557104f784SmrgAC_MSG_CHECKING([dynamic linker characteristics])
20562ec8c4b4Smrgm4_if([$1],
20572ec8c4b4Smrg	[], [
205809885543Smrgif test "$GCC" = yes; then
20597104f784Smrg  case $host_os in
20607104f784Smrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
20617104f784Smrg    *) lt_awk_arg="/^libraries:/" ;;
20627104f784Smrg  esac
20637104f784Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
20642ec8c4b4Smrg  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
206509885543Smrg    # if the path contains ";" then we assume it to be the separator
206609885543Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
206709885543Smrg    # assumed that no part of a normal pathname contains ";" but that should
206809885543Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
20692ec8c4b4Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
207009885543Smrg  else
20712ec8c4b4Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
207209885543Smrg  fi
20737104f784Smrg  # Ok, now we have the path, separated by spaces, we can step through it
20747104f784Smrg  # and add multilib dir if necessary.
20757104f784Smrg  lt_tmp_lt_search_path_spec=
20767104f784Smrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
20777104f784Smrg  for lt_sys_path in $lt_search_path_spec; do
20787104f784Smrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
20797104f784Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
20807104f784Smrg    else
20817104f784Smrg      test -d "$lt_sys_path" && \
20827104f784Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
20837104f784Smrg    fi
20847104f784Smrg  done
20852ec8c4b4Smrg  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
20867104f784SmrgBEGIN {RS=" "; FS="/|\n";} {
20877104f784Smrg  lt_foo="";
20887104f784Smrg  lt_count=0;
20897104f784Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
20907104f784Smrg    if ($lt_i != "" && $lt_i != ".") {
20917104f784Smrg      if ($lt_i == "..") {
20927104f784Smrg        lt_count++;
20937104f784Smrg      } else {
20947104f784Smrg        if (lt_count == 0) {
20957104f784Smrg          lt_foo="/" $lt_i lt_foo;
20967104f784Smrg        } else {
20977104f784Smrg          lt_count--;
20987104f784Smrg        }
20997104f784Smrg      }
21007104f784Smrg    }
21017104f784Smrg  }
21027104f784Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
21037104f784Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
21047104f784Smrg}'`
21052ec8c4b4Smrg  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
210609885543Smrgelse
210709885543Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
21087104f784Smrgfi])
21092ec8c4b4Smrglibrary_names_spec=
21102ec8c4b4Smrglibname_spec='lib$name'
21112ec8c4b4Smrgsoname_spec=
21122ec8c4b4Smrgshrext_cmds=".so"
21132ec8c4b4Smrgpostinstall_cmds=
21142ec8c4b4Smrgpostuninstall_cmds=
21152ec8c4b4Smrgfinish_cmds=
21162ec8c4b4Smrgfinish_eval=
21172ec8c4b4Smrgshlibpath_var=
21182ec8c4b4Smrgshlibpath_overrides_runpath=unknown
21192ec8c4b4Smrgversion_type=none
21202ec8c4b4Smrgdynamic_linker="$host_os ld.so"
21212ec8c4b4Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
212209885543Smrgneed_lib_prefix=unknown
212309885543Smrghardcode_into_libs=no
212409885543Smrg
212509885543Smrg# when you set need_version to no, make sure it does not cause -set_version
212609885543Smrg# flags to be left without arguments
212709885543Smrgneed_version=unknown
212809885543Smrg
212909885543Smrgcase $host_os in
213009885543Smrgaix3*)
213109885543Smrg  version_type=linux
213209885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
213309885543Smrg  shlibpath_var=LIBPATH
213409885543Smrg
213509885543Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
213609885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
213709885543Smrg  ;;
213809885543Smrg
21397104f784Smrgaix[[4-9]]*)
214009885543Smrg  version_type=linux
214109885543Smrg  need_lib_prefix=no
214209885543Smrg  need_version=no
214309885543Smrg  hardcode_into_libs=yes
214409885543Smrg  if test "$host_cpu" = ia64; then
214509885543Smrg    # AIX 5 supports IA64
214609885543Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
214709885543Smrg    shlibpath_var=LD_LIBRARY_PATH
214809885543Smrg  else
214909885543Smrg    # With GCC up to 2.95.x, collect2 would create an import file
215009885543Smrg    # for dependence libraries.  The import file would start with
215109885543Smrg    # the line `#! .'.  This would cause the generated library to
215209885543Smrg    # depend on `.', always an invalid library.  This was fixed in
215309885543Smrg    # development snapshots of GCC prior to 3.0.
215409885543Smrg    case $host_os in
215509885543Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
215609885543Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
215709885543Smrg	   echo ' yes '
21582ec8c4b4Smrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
215909885543Smrg	:
216009885543Smrg      else
216109885543Smrg	can_build_shared=no
216209885543Smrg      fi
216309885543Smrg      ;;
216409885543Smrg    esac
216509885543Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
216609885543Smrg    # soname into executable. Probably we can add versioning support to
216709885543Smrg    # collect2, so additional links can be useful in future.
216809885543Smrg    if test "$aix_use_runtimelinking" = yes; then
216909885543Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
217009885543Smrg      # instead of lib<name>.a to let people know that these are not
217109885543Smrg      # typical AIX shared libraries.
217209885543Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
217309885543Smrg    else
217409885543Smrg      # We preserve .a as extension for shared libraries through AIX4.2
217509885543Smrg      # and later when we are not doing run time linking.
217609885543Smrg      library_names_spec='${libname}${release}.a $libname.a'
217709885543Smrg      soname_spec='${libname}${release}${shared_ext}$major'
217809885543Smrg    fi
217909885543Smrg    shlibpath_var=LIBPATH
218009885543Smrg  fi
218109885543Smrg  ;;
218209885543Smrg
218309885543Smrgamigaos*)
21842ec8c4b4Smrg  case $host_cpu in
21852ec8c4b4Smrg  powerpc)
21862ec8c4b4Smrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
21872ec8c4b4Smrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
21882ec8c4b4Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
21892ec8c4b4Smrg    ;;
21902ec8c4b4Smrg  m68k)
21912ec8c4b4Smrg    library_names_spec='$libname.ixlibrary $libname.a'
21922ec8c4b4Smrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
21932ec8c4b4Smrg    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'
21942ec8c4b4Smrg    ;;
21952ec8c4b4Smrg  esac
219609885543Smrg  ;;
219709885543Smrg
219809885543Smrgbeos*)
219909885543Smrg  library_names_spec='${libname}${shared_ext}'
220009885543Smrg  dynamic_linker="$host_os ld.so"
220109885543Smrg  shlibpath_var=LIBRARY_PATH
220209885543Smrg  ;;
220309885543Smrg
220409885543Smrgbsdi[[45]]*)
220509885543Smrg  version_type=linux
220609885543Smrg  need_version=no
220709885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
220809885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
220909885543Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
221009885543Smrg  shlibpath_var=LD_LIBRARY_PATH
221109885543Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
221209885543Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
221309885543Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
221409885543Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
221509885543Smrg  # libtool to hard-code these into programs
221609885543Smrg  ;;
221709885543Smrg
22182ec8c4b4Smrgcygwin* | mingw* | pw32* | cegcc*)
221909885543Smrg  version_type=windows
222009885543Smrg  shrext_cmds=".dll"
222109885543Smrg  need_version=no
222209885543Smrg  need_lib_prefix=no
222309885543Smrg
222409885543Smrg  case $GCC,$host_os in
22252ec8c4b4Smrg  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
222609885543Smrg    library_names_spec='$libname.dll.a'
222709885543Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
222809885543Smrg    postinstall_cmds='base_file=`basename \${file}`~
22292ec8c4b4Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
223009885543Smrg      dldir=$destdir/`dirname \$dlpath`~
223109885543Smrg      test -d \$dldir || mkdir -p \$dldir~
223209885543Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
22332ec8c4b4Smrg      chmod a+x \$dldir/$dlname~
22342ec8c4b4Smrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
22352ec8c4b4Smrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
22362ec8c4b4Smrg      fi'
223709885543Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
223809885543Smrg      dlpath=$dir/\$dldll~
22392ec8c4b4Smrg       $RM \$dlpath'
224009885543Smrg    shlibpath_overrides_runpath=yes
224109885543Smrg
224209885543Smrg    case $host_os in
224309885543Smrg    cygwin*)
224409885543Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
224509885543Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
224609885543Smrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
224709885543Smrg      ;;
22482ec8c4b4Smrg    mingw* | cegcc*)
224909885543Smrg      # MinGW DLLs use traditional 'lib' prefix
225009885543Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
22512ec8c4b4Smrg      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
22522ec8c4b4Smrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
225309885543Smrg        # It is most probably a Windows format PATH printed by
225409885543Smrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
225509885543Smrg        # path with ; separators, and with drive letters. We can handle the
225609885543Smrg        # drive letters (cygwin fileutils understands them), so leave them,
225709885543Smrg        # especially as we might pass files found there to a mingw objdump,
225809885543Smrg        # which wouldn't understand a cygwinified path. Ahh.
22592ec8c4b4Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
226009885543Smrg      else
22612ec8c4b4Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
226209885543Smrg      fi
226309885543Smrg      ;;
226409885543Smrg    pw32*)
226509885543Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
226609885543Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
226709885543Smrg      ;;
226809885543Smrg    esac
226909885543Smrg    ;;
227009885543Smrg
227109885543Smrg  *)
227209885543Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
227309885543Smrg    ;;
227409885543Smrg  esac
227509885543Smrg  dynamic_linker='Win32 ld.exe'
227609885543Smrg  # FIXME: first we should search . and the directory the executable is in
227709885543Smrg  shlibpath_var=PATH
227809885543Smrg  ;;
227909885543Smrg
228009885543Smrgdarwin* | rhapsody*)
228109885543Smrg  dynamic_linker="$host_os dyld"
228209885543Smrg  version_type=darwin
228309885543Smrg  need_lib_prefix=no
228409885543Smrg  need_version=no
22852ec8c4b4Smrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
228609885543Smrg  soname_spec='${libname}${release}${major}$shared_ext'
228709885543Smrg  shlibpath_overrides_runpath=yes
228809885543Smrg  shlibpath_var=DYLD_LIBRARY_PATH
228909885543Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
22902ec8c4b4Smrgm4_if([$1], [],[
22912ec8c4b4Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
229209885543Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
229309885543Smrg  ;;
229409885543Smrg
229509885543Smrgdgux*)
229609885543Smrg  version_type=linux
229709885543Smrg  need_lib_prefix=no
229809885543Smrg  need_version=no
229909885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
230009885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
230109885543Smrg  shlibpath_var=LD_LIBRARY_PATH
230209885543Smrg  ;;
230309885543Smrg
230409885543Smrgfreebsd1*)
230509885543Smrg  dynamic_linker=no
230609885543Smrg  ;;
230709885543Smrg
230809885543Smrgfreebsd* | dragonfly*)
230909885543Smrg  # DragonFly does not have aout.  When/if they implement a new
231009885543Smrg  # versioning mechanism, adjust this.
231109885543Smrg  if test -x /usr/bin/objformat; then
231209885543Smrg    objformat=`/usr/bin/objformat`
231309885543Smrg  else
231409885543Smrg    case $host_os in
231509885543Smrg    freebsd[[123]]*) objformat=aout ;;
231609885543Smrg    *) objformat=elf ;;
231709885543Smrg    esac
231809885543Smrg  fi
23192ec8c4b4Smrg  version_type=freebsd-$objformat
232009885543Smrg  case $version_type in
232109885543Smrg    freebsd-elf*)
232209885543Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
232309885543Smrg      need_version=no
232409885543Smrg      need_lib_prefix=no
232509885543Smrg      ;;
232609885543Smrg    freebsd-*)
232709885543Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
232809885543Smrg      need_version=yes
232909885543Smrg      ;;
233009885543Smrg  esac
233109885543Smrg  shlibpath_var=LD_LIBRARY_PATH
233209885543Smrg  case $host_os in
233309885543Smrg  freebsd2*)
233409885543Smrg    shlibpath_overrides_runpath=yes
233509885543Smrg    ;;
233609885543Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
233709885543Smrg    shlibpath_overrides_runpath=yes
233809885543Smrg    hardcode_into_libs=yes
233909885543Smrg    ;;
234009885543Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
234109885543Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
234209885543Smrg    shlibpath_overrides_runpath=no
234309885543Smrg    hardcode_into_libs=yes
234409885543Smrg    ;;
23457104f784Smrg  *) # from 4.6 on, and DragonFly
234609885543Smrg    shlibpath_overrides_runpath=yes
234709885543Smrg    hardcode_into_libs=yes
234809885543Smrg    ;;
234909885543Smrg  esac
235009885543Smrg  ;;
235109885543Smrg
235209885543Smrggnu*)
235309885543Smrg  version_type=linux
235409885543Smrg  need_lib_prefix=no
235509885543Smrg  need_version=no
235609885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
235709885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
235809885543Smrg  shlibpath_var=LD_LIBRARY_PATH
235909885543Smrg  hardcode_into_libs=yes
236009885543Smrg  ;;
236109885543Smrg
236209885543Smrghpux9* | hpux10* | hpux11*)
236309885543Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
236409885543Smrg  # link against other versions.
236509885543Smrg  version_type=sunos
236609885543Smrg  need_lib_prefix=no
236709885543Smrg  need_version=no
236809885543Smrg  case $host_cpu in
236909885543Smrg  ia64*)
237009885543Smrg    shrext_cmds='.so'
237109885543Smrg    hardcode_into_libs=yes
237209885543Smrg    dynamic_linker="$host_os dld.so"
237309885543Smrg    shlibpath_var=LD_LIBRARY_PATH
237409885543Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
237509885543Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
237609885543Smrg    soname_spec='${libname}${release}${shared_ext}$major'
237709885543Smrg    if test "X$HPUX_IA64_MODE" = X32; then
237809885543Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
237909885543Smrg    else
238009885543Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
238109885543Smrg    fi
238209885543Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
238309885543Smrg    ;;
23842ec8c4b4Smrg  hppa*64*)
23852ec8c4b4Smrg    shrext_cmds='.sl'
23862ec8c4b4Smrg    hardcode_into_libs=yes
23872ec8c4b4Smrg    dynamic_linker="$host_os dld.sl"
23882ec8c4b4Smrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
23892ec8c4b4Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
23902ec8c4b4Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
23912ec8c4b4Smrg    soname_spec='${libname}${release}${shared_ext}$major'
23922ec8c4b4Smrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
23932ec8c4b4Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
23942ec8c4b4Smrg    ;;
23952ec8c4b4Smrg  *)
239609885543Smrg    shrext_cmds='.sl'
239709885543Smrg    dynamic_linker="$host_os dld.sl"
239809885543Smrg    shlibpath_var=SHLIB_PATH
239909885543Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
240009885543Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
240109885543Smrg    soname_spec='${libname}${release}${shared_ext}$major'
240209885543Smrg    ;;
240309885543Smrg  esac
240409885543Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
240509885543Smrg  postinstall_cmds='chmod 555 $lib'
240609885543Smrg  ;;
240709885543Smrg
24087104f784Smrginterix[[3-9]]*)
240909885543Smrg  version_type=linux
241009885543Smrg  need_lib_prefix=no
241109885543Smrg  need_version=no
241209885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
241309885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
241409885543Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
241509885543Smrg  shlibpath_var=LD_LIBRARY_PATH
241609885543Smrg  shlibpath_overrides_runpath=no
241709885543Smrg  hardcode_into_libs=yes
241809885543Smrg  ;;
241909885543Smrg
242009885543Smrgirix5* | irix6* | nonstopux*)
242109885543Smrg  case $host_os in
242209885543Smrg    nonstopux*) version_type=nonstopux ;;
242309885543Smrg    *)
242409885543Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
242509885543Smrg		version_type=linux
242609885543Smrg	else
242709885543Smrg		version_type=irix
242809885543Smrg	fi ;;
242909885543Smrg  esac
243009885543Smrg  need_lib_prefix=no
243109885543Smrg  need_version=no
243209885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
243309885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
243409885543Smrg  case $host_os in
243509885543Smrg  irix5* | nonstopux*)
243609885543Smrg    libsuff= shlibsuff=
243709885543Smrg    ;;
243809885543Smrg  *)
243909885543Smrg    case $LD in # libtool.m4 will add one of these switches to LD
244009885543Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
244109885543Smrg      libsuff= shlibsuff= libmagic=32-bit;;
244209885543Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
244309885543Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
244409885543Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
244509885543Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
244609885543Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
244709885543Smrg    esac
244809885543Smrg    ;;
244909885543Smrg  esac
245009885543Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
245109885543Smrg  shlibpath_overrides_runpath=no
245209885543Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
245309885543Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
245409885543Smrg  hardcode_into_libs=yes
245509885543Smrg  ;;
245609885543Smrg
245709885543Smrg# No shared lib support for Linux oldld, aout, or coff.
245809885543Smrglinux*oldld* | linux*aout* | linux*coff*)
245909885543Smrg  dynamic_linker=no
246009885543Smrg  ;;
246109885543Smrg
246209885543Smrg# This must be Linux ELF.
246309885543Smrglinux* | k*bsd*-gnu)
246409885543Smrg  version_type=linux
246509885543Smrg  need_lib_prefix=no
246609885543Smrg  need_version=no
246709885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
246809885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
246909885543Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
247009885543Smrg  shlibpath_var=LD_LIBRARY_PATH
247109885543Smrg  shlibpath_overrides_runpath=no
24722ec8c4b4Smrg  # Some binutils ld are patched to set DT_RUNPATH
24732ec8c4b4Smrg  save_LDFLAGS=$LDFLAGS
24742ec8c4b4Smrg  save_libdir=$libdir
24752ec8c4b4Smrg  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
24762ec8c4b4Smrg       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
24772ec8c4b4Smrg  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
24782ec8c4b4Smrg    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
24792ec8c4b4Smrg       [shlibpath_overrides_runpath=yes])])
24802ec8c4b4Smrg  LDFLAGS=$save_LDFLAGS
24812ec8c4b4Smrg  libdir=$save_libdir
24822ec8c4b4Smrg
248309885543Smrg  # This implies no fast_install, which is unacceptable.
248409885543Smrg  # Some rework will be needed to allow for fast_install
248509885543Smrg  # before this can be enabled.
248609885543Smrg  hardcode_into_libs=yes
248709885543Smrg
24882ec8c4b4Smrg  # Add ABI-specific directories to the system library path.
24892ec8c4b4Smrg  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
24902ec8c4b4Smrg
249109885543Smrg  # Append ld.so.conf contents to the search path
249209885543Smrg  if test -f /etc/ld.so.conf; then
24932ec8c4b4Smrg    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' ' '`
24942ec8c4b4Smrg    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
249509885543Smrg  fi
249609885543Smrg
249709885543Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
249809885543Smrg  # powerpc, because MkLinux only supported shared libraries with the
249909885543Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
250009885543Smrg  # most powerpc-linux boxes support dynamic linking these days and
250109885543Smrg  # people can always --disable-shared, the test was removed, and we
250209885543Smrg  # assume the GNU/Linux dynamic linker is in use.
250309885543Smrg  dynamic_linker='GNU/Linux ld.so'
250409885543Smrg  ;;
250509885543Smrg
250609885543Smrgnetbsd*)
250709885543Smrg  version_type=sunos
250809885543Smrg  need_lib_prefix=no
250909885543Smrg  need_version=no
25102ec8c4b4Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
251109885543Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
251209885543Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
251309885543Smrg    dynamic_linker='NetBSD (a.out) ld.so'
251409885543Smrg  else
251509885543Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
251609885543Smrg    soname_spec='${libname}${release}${shared_ext}$major'
251709885543Smrg    dynamic_linker='NetBSD ld.elf_so'
251809885543Smrg  fi
251909885543Smrg  shlibpath_var=LD_LIBRARY_PATH
252009885543Smrg  shlibpath_overrides_runpath=yes
252109885543Smrg  hardcode_into_libs=yes
252209885543Smrg  ;;
252309885543Smrg
252409885543Smrgnewsos6)
252509885543Smrg  version_type=linux
252609885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
252709885543Smrg  shlibpath_var=LD_LIBRARY_PATH
252809885543Smrg  shlibpath_overrides_runpath=yes
252909885543Smrg  ;;
253009885543Smrg
25312ec8c4b4Smrg*nto* | *qnx*)
25322ec8c4b4Smrg  version_type=qnx
253309885543Smrg  need_lib_prefix=no
253409885543Smrg  need_version=no
253509885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
253609885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
253709885543Smrg  shlibpath_var=LD_LIBRARY_PATH
25382ec8c4b4Smrg  shlibpath_overrides_runpath=no
25392ec8c4b4Smrg  hardcode_into_libs=yes
25402ec8c4b4Smrg  dynamic_linker='ldqnx.so'
254109885543Smrg  ;;
254209885543Smrg
254309885543Smrgopenbsd*)
254409885543Smrg  version_type=sunos
254509885543Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
254609885543Smrg  need_lib_prefix=no
254709885543Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
254809885543Smrg  case $host_os in
25492ec8c4b4Smrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
25502ec8c4b4Smrg    *)				need_version=no  ;;
255109885543Smrg  esac
255209885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
255309885543Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
255409885543Smrg  shlibpath_var=LD_LIBRARY_PATH
25552ec8c4b4Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
255609885543Smrg    case $host_os in
255709885543Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
255809885543Smrg	shlibpath_overrides_runpath=no
255909885543Smrg	;;
256009885543Smrg      *)
256109885543Smrg	shlibpath_overrides_runpath=yes
256209885543Smrg	;;
256309885543Smrg      esac
256409885543Smrg  else
256509885543Smrg    shlibpath_overrides_runpath=yes
256609885543Smrg  fi
256709885543Smrg  ;;
256809885543Smrg
256909885543Smrgos2*)
257009885543Smrg  libname_spec='$name'
257109885543Smrg  shrext_cmds=".dll"
257209885543Smrg  need_lib_prefix=no
257309885543Smrg  library_names_spec='$libname${shared_ext} $libname.a'
257409885543Smrg  dynamic_linker='OS/2 ld.exe'
257509885543Smrg  shlibpath_var=LIBPATH
257609885543Smrg  ;;
257709885543Smrg
257809885543Smrgosf3* | osf4* | osf5*)
257909885543Smrg  version_type=osf
258009885543Smrg  need_lib_prefix=no
258109885543Smrg  need_version=no
258209885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
258309885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
258409885543Smrg  shlibpath_var=LD_LIBRARY_PATH
258509885543Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
258609885543Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
258709885543Smrg  ;;
258809885543Smrg
25897104f784Smrgrdos*)
25907104f784Smrg  dynamic_linker=no
25917104f784Smrg  ;;
25927104f784Smrg
259309885543Smrgsolaris*)
259409885543Smrg  version_type=linux
259509885543Smrg  need_lib_prefix=no
259609885543Smrg  need_version=no
259709885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
259809885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
259909885543Smrg  shlibpath_var=LD_LIBRARY_PATH
260009885543Smrg  shlibpath_overrides_runpath=yes
260109885543Smrg  hardcode_into_libs=yes
260209885543Smrg  # ldd complains unless libraries are executable
260309885543Smrg  postinstall_cmds='chmod +x $lib'
260409885543Smrg  ;;
260509885543Smrg
260609885543Smrgsunos4*)
260709885543Smrg  version_type=sunos
260809885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
260909885543Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
261009885543Smrg  shlibpath_var=LD_LIBRARY_PATH
261109885543Smrg  shlibpath_overrides_runpath=yes
261209885543Smrg  if test "$with_gnu_ld" = yes; then
261309885543Smrg    need_lib_prefix=no
261409885543Smrg  fi
261509885543Smrg  need_version=yes
261609885543Smrg  ;;
261709885543Smrg
261809885543Smrgsysv4 | sysv4.3*)
261909885543Smrg  version_type=linux
262009885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
262109885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
262209885543Smrg  shlibpath_var=LD_LIBRARY_PATH
262309885543Smrg  case $host_vendor in
262409885543Smrg    sni)
262509885543Smrg      shlibpath_overrides_runpath=no
262609885543Smrg      need_lib_prefix=no
262709885543Smrg      runpath_var=LD_RUN_PATH
262809885543Smrg      ;;
262909885543Smrg    siemens)
263009885543Smrg      need_lib_prefix=no
263109885543Smrg      ;;
263209885543Smrg    motorola)
263309885543Smrg      need_lib_prefix=no
263409885543Smrg      need_version=no
263509885543Smrg      shlibpath_overrides_runpath=no
263609885543Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
263709885543Smrg      ;;
263809885543Smrg  esac
263909885543Smrg  ;;
264009885543Smrg
264109885543Smrgsysv4*MP*)
264209885543Smrg  if test -d /usr/nec ;then
264309885543Smrg    version_type=linux
264409885543Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
264509885543Smrg    soname_spec='$libname${shared_ext}.$major'
264609885543Smrg    shlibpath_var=LD_LIBRARY_PATH
264709885543Smrg  fi
264809885543Smrg  ;;
264909885543Smrg
265009885543Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
265109885543Smrg  version_type=freebsd-elf
265209885543Smrg  need_lib_prefix=no
265309885543Smrg  need_version=no
265409885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
265509885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
265609885543Smrg  shlibpath_var=LD_LIBRARY_PATH
26572ec8c4b4Smrg  shlibpath_overrides_runpath=yes
265809885543Smrg  hardcode_into_libs=yes
265909885543Smrg  if test "$with_gnu_ld" = yes; then
266009885543Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
266109885543Smrg  else
266209885543Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
266309885543Smrg    case $host_os in
266409885543Smrg      sco3.2v5*)
266509885543Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
266609885543Smrg	;;
266709885543Smrg    esac
266809885543Smrg  fi
266909885543Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
267009885543Smrg  ;;
267109885543Smrg
26722ec8c4b4Smrgtpf*)
26732ec8c4b4Smrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
26742ec8c4b4Smrg  version_type=linux
26752ec8c4b4Smrg  need_lib_prefix=no
26762ec8c4b4Smrg  need_version=no
26772ec8c4b4Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26782ec8c4b4Smrg  shlibpath_var=LD_LIBRARY_PATH
26792ec8c4b4Smrg  shlibpath_overrides_runpath=no
26802ec8c4b4Smrg  hardcode_into_libs=yes
26812ec8c4b4Smrg  ;;
26822ec8c4b4Smrg
268309885543Smrguts4*)
268409885543Smrg  version_type=linux
268509885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
268609885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
268709885543Smrg  shlibpath_var=LD_LIBRARY_PATH
268809885543Smrg  ;;
268909885543Smrg
269009885543Smrg*)
269109885543Smrg  dynamic_linker=no
269209885543Smrg  ;;
269309885543Smrgesac
269409885543SmrgAC_MSG_RESULT([$dynamic_linker])
269509885543Smrgtest "$dynamic_linker" = no && can_build_shared=no
269609885543Smrg
269709885543Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
269809885543Smrgif test "$GCC" = yes; then
269909885543Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
270009885543Smrgfi
270109885543Smrg
27022ec8c4b4Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
27032ec8c4b4Smrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
27042ec8c4b4Smrgfi
27052ec8c4b4Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
27062ec8c4b4Smrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
27072ec8c4b4Smrgfi
270809885543Smrg
27092ec8c4b4Smrg_LT_DECL([], [variables_saved_for_relink], [1],
27102ec8c4b4Smrg    [Variables whose values should be saved in libtool wrapper scripts and
27112ec8c4b4Smrg    restored at link time])
27122ec8c4b4Smrg_LT_DECL([], [need_lib_prefix], [0],
27132ec8c4b4Smrg    [Do we need the "lib" prefix for modules?])
27142ec8c4b4Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
27152ec8c4b4Smrg_LT_DECL([], [version_type], [0], [Library versioning type])
27162ec8c4b4Smrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
27172ec8c4b4Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
27182ec8c4b4Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
27192ec8c4b4Smrg    [Is shlibpath searched before the hard-coded library search path?])
27202ec8c4b4Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
27212ec8c4b4Smrg_LT_DECL([], [library_names_spec], [1],
27222ec8c4b4Smrg    [[List of archive names.  First name is the real one, the rest are links.
27232ec8c4b4Smrg    The last name is the one that the linker finds with -lNAME]])
27242ec8c4b4Smrg_LT_DECL([], [soname_spec], [1],
27252ec8c4b4Smrg    [[The coded name of the library, if different from the real name]])
27262ec8c4b4Smrg_LT_DECL([], [postinstall_cmds], [2],
27272ec8c4b4Smrg    [Command to use after installation of a shared archive])
27282ec8c4b4Smrg_LT_DECL([], [postuninstall_cmds], [2],
27292ec8c4b4Smrg    [Command to use after uninstallation of a shared archive])
27302ec8c4b4Smrg_LT_DECL([], [finish_cmds], [2],
27312ec8c4b4Smrg    [Commands used to finish a libtool library installation in a directory])
27322ec8c4b4Smrg_LT_DECL([], [finish_eval], [1],
27332ec8c4b4Smrg    [[As "finish_cmds", except a single script fragment to be evaled but
27342ec8c4b4Smrg    not shown]])
27352ec8c4b4Smrg_LT_DECL([], [hardcode_into_libs], [0],
27362ec8c4b4Smrg    [Whether we should hardcode library paths into libraries])
27372ec8c4b4Smrg_LT_DECL([], [sys_lib_search_path_spec], [2],
27382ec8c4b4Smrg    [Compile-time system search path for libraries])
27392ec8c4b4Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
27402ec8c4b4Smrg    [Run-time system search path for libraries])
27412ec8c4b4Smrg])# _LT_SYS_DYNAMIC_LINKER
27422ec8c4b4Smrg
27432ec8c4b4Smrg
27442ec8c4b4Smrg# _LT_PATH_TOOL_PREFIX(TOOL)
274509885543Smrg# --------------------------
27467104f784Smrg# find a file program which can recognize shared library
27472ec8c4b4SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
27482ec8c4b4Smrg[m4_require([_LT_DECL_EGREP])dnl
274909885543SmrgAC_MSG_CHECKING([for $1])
275009885543SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
275109885543Smrg[case $MAGIC_CMD in
275209885543Smrg[[\\/*] |  ?:[\\/]*])
275309885543Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
275409885543Smrg  ;;
275509885543Smrg*)
275609885543Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
275709885543Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
275809885543Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
275909885543Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
276009885543Smrgdnl not every word.  This closes a longstanding sh security hole.
27612ec8c4b4Smrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
276209885543Smrg  for ac_dir in $ac_dummy; do
276309885543Smrg    IFS="$lt_save_ifs"
276409885543Smrg    test -z "$ac_dir" && ac_dir=.
276509885543Smrg    if test -f $ac_dir/$1; then
276609885543Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
276709885543Smrg      if test -n "$file_magic_test_file"; then
276809885543Smrg	case $deplibs_check_method in
276909885543Smrg	"file_magic "*)
277009885543Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
277109885543Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
277209885543Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
277309885543Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
277409885543Smrg	    :
277509885543Smrg	  else
27762ec8c4b4Smrg	    cat <<_LT_EOF 1>&2
277709885543Smrg
277809885543Smrg*** Warning: the command libtool uses to detect shared libraries,
277909885543Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
278009885543Smrg*** The result is that libtool may fail to recognize shared libraries
278109885543Smrg*** as such.  This will affect the creation of libtool libraries that
278209885543Smrg*** depend on shared libraries, but programs linked with such libtool
278309885543Smrg*** libraries will work regardless of this problem.  Nevertheless, you
278409885543Smrg*** may want to report the problem to your system manager and/or to
278509885543Smrg*** bug-libtool@gnu.org
278609885543Smrg
27872ec8c4b4Smrg_LT_EOF
278809885543Smrg	  fi ;;
278909885543Smrg	esac
279009885543Smrg      fi
279109885543Smrg      break
279209885543Smrg    fi
279309885543Smrg  done
279409885543Smrg  IFS="$lt_save_ifs"
279509885543Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
279609885543Smrg  ;;
279709885543Smrgesac])
279809885543SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
279909885543Smrgif test -n "$MAGIC_CMD"; then
280009885543Smrg  AC_MSG_RESULT($MAGIC_CMD)
280109885543Smrgelse
280209885543Smrg  AC_MSG_RESULT(no)
280309885543Smrgfi
28042ec8c4b4Smrg_LT_DECL([], [MAGIC_CMD], [0],
28052ec8c4b4Smrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
28062ec8c4b4Smrg])# _LT_PATH_TOOL_PREFIX
280709885543Smrg
28082ec8c4b4Smrg# Old name:
28092ec8c4b4SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
28102ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
28112ec8c4b4Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
281209885543Smrg
28132ec8c4b4Smrg
28142ec8c4b4Smrg# _LT_PATH_MAGIC
28152ec8c4b4Smrg# --------------
28167104f784Smrg# find a file program which can recognize a shared library
28172ec8c4b4Smrgm4_defun([_LT_PATH_MAGIC],
28182ec8c4b4Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
281909885543Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
282009885543Smrg  if test -n "$ac_tool_prefix"; then
28212ec8c4b4Smrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
282209885543Smrg  else
282309885543Smrg    MAGIC_CMD=:
282409885543Smrg  fi
282509885543Smrgfi
28262ec8c4b4Smrg])# _LT_PATH_MAGIC
282709885543Smrg
282809885543Smrg
28292ec8c4b4Smrg# LT_PATH_LD
283009885543Smrg# ----------
283109885543Smrg# find the pathname to the GNU or non-GNU linker
28322ec8c4b4SmrgAC_DEFUN([LT_PATH_LD],
28332ec8c4b4Smrg[AC_REQUIRE([AC_PROG_CC])dnl
283409885543SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
283509885543SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
28362ec8c4b4Smrgm4_require([_LT_DECL_SED])dnl
28372ec8c4b4Smrgm4_require([_LT_DECL_EGREP])dnl
28382ec8c4b4Smrg
28392ec8c4b4SmrgAC_ARG_WITH([gnu-ld],
28402ec8c4b4Smrg    [AS_HELP_STRING([--with-gnu-ld],
28412ec8c4b4Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
28422ec8c4b4Smrg    [test "$withval" = no || with_gnu_ld=yes],
28432ec8c4b4Smrg    [with_gnu_ld=no])dnl
28442ec8c4b4Smrg
284509885543Smrgac_prog=ld
284609885543Smrgif test "$GCC" = yes; then
284709885543Smrg  # Check if gcc -print-prog-name=ld gives a path.
284809885543Smrg  AC_MSG_CHECKING([for ld used by $CC])
284909885543Smrg  case $host in
285009885543Smrg  *-*-mingw*)
285109885543Smrg    # gcc leaves a trailing carriage return which upsets mingw
285209885543Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
285309885543Smrg  *)
285409885543Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
285509885543Smrg  esac
285609885543Smrg  case $ac_prog in
285709885543Smrg    # Accept absolute paths.
285809885543Smrg    [[\\/]]* | ?:[[\\/]]*)
285909885543Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
286009885543Smrg      # Canonicalize the pathname of ld
28612ec8c4b4Smrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
28622ec8c4b4Smrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
28632ec8c4b4Smrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
286409885543Smrg      done
286509885543Smrg      test -z "$LD" && LD="$ac_prog"
286609885543Smrg      ;;
286709885543Smrg  "")
286809885543Smrg    # If it fails, then pretend we aren't using GCC.
286909885543Smrg    ac_prog=ld
287009885543Smrg    ;;
287109885543Smrg  *)
287209885543Smrg    # If it is relative, then search for the first ld in PATH.
287309885543Smrg    with_gnu_ld=unknown
287409885543Smrg    ;;
287509885543Smrg  esac
287609885543Smrgelif test "$with_gnu_ld" = yes; then
287709885543Smrg  AC_MSG_CHECKING([for GNU ld])
287809885543Smrgelse
287909885543Smrg  AC_MSG_CHECKING([for non-GNU ld])
288009885543Smrgfi
288109885543SmrgAC_CACHE_VAL(lt_cv_path_LD,
288209885543Smrg[if test -z "$LD"; then
288309885543Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
288409885543Smrg  for ac_dir in $PATH; do
288509885543Smrg    IFS="$lt_save_ifs"
288609885543Smrg    test -z "$ac_dir" && ac_dir=.
288709885543Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
288809885543Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
288909885543Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
289009885543Smrg      # but apparently some variants of GNU ld only accept -v.
289109885543Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
289209885543Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
289309885543Smrg      *GNU* | *'with BFD'*)
289409885543Smrg	test "$with_gnu_ld" != no && break
289509885543Smrg	;;
289609885543Smrg      *)
289709885543Smrg	test "$with_gnu_ld" != yes && break
289809885543Smrg	;;
289909885543Smrg      esac
290009885543Smrg    fi
290109885543Smrg  done
290209885543Smrg  IFS="$lt_save_ifs"
290309885543Smrgelse
290409885543Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
290509885543Smrgfi])
290609885543SmrgLD="$lt_cv_path_LD"
290709885543Smrgif test -n "$LD"; then
290809885543Smrg  AC_MSG_RESULT($LD)
290909885543Smrgelse
291009885543Smrg  AC_MSG_RESULT(no)
291109885543Smrgfi
291209885543Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
29132ec8c4b4Smrg_LT_PATH_LD_GNU
29142ec8c4b4SmrgAC_SUBST([LD])
291509885543Smrg
29162ec8c4b4Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
29172ec8c4b4Smrg])# LT_PATH_LD
291809885543Smrg
29192ec8c4b4Smrg# Old names:
29202ec8c4b4SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
29212ec8c4b4SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
29222ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
29232ec8c4b4Smrgdnl AC_DEFUN([AM_PROG_LD], [])
29242ec8c4b4Smrgdnl AC_DEFUN([AC_PROG_LD], [])
29252ec8c4b4Smrg
29262ec8c4b4Smrg
29272ec8c4b4Smrg# _LT_PATH_LD_GNU
29282ec8c4b4Smrg#- --------------
29292ec8c4b4Smrgm4_defun([_LT_PATH_LD_GNU],
29302ec8c4b4Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
293109885543Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
293209885543Smrgcase `$LD -v 2>&1 </dev/null` in
293309885543Smrg*GNU* | *'with BFD'*)
293409885543Smrg  lt_cv_prog_gnu_ld=yes
293509885543Smrg  ;;
293609885543Smrg*)
293709885543Smrg  lt_cv_prog_gnu_ld=no
293809885543Smrg  ;;
293909885543Smrgesac])
294009885543Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
29412ec8c4b4Smrg])# _LT_PATH_LD_GNU
294209885543Smrg
294309885543Smrg
29442ec8c4b4Smrg# _LT_CMD_RELOAD
29452ec8c4b4Smrg# --------------
294609885543Smrg# find reload flag for linker
294709885543Smrg#   -- PORTME Some linkers may need a different reload flag.
29482ec8c4b4Smrgm4_defun([_LT_CMD_RELOAD],
294909885543Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
295009885543Smrg  lt_cv_ld_reload_flag,
295109885543Smrg  [lt_cv_ld_reload_flag='-r'])
295209885543Smrgreload_flag=$lt_cv_ld_reload_flag
295309885543Smrgcase $reload_flag in
295409885543Smrg"" | " "*) ;;
295509885543Smrg*) reload_flag=" $reload_flag" ;;
295609885543Smrgesac
295709885543Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
295809885543Smrgcase $host_os in
295909885543Smrg  darwin*)
296009885543Smrg    if test "$GCC" = yes; then
296109885543Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
296209885543Smrg    else
296309885543Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
296409885543Smrg    fi
296509885543Smrg    ;;
296609885543Smrgesac
29672ec8c4b4Smrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
29682ec8c4b4Smrg_LT_DECL([], [reload_cmds], [2])dnl
29692ec8c4b4Smrg])# _LT_CMD_RELOAD
297009885543Smrg
297109885543Smrg
29722ec8c4b4Smrg# _LT_CHECK_MAGIC_METHOD
29732ec8c4b4Smrg# ----------------------
297409885543Smrg# how to check for library dependencies
297509885543Smrg#  -- PORTME fill in with the dynamic library characteristics
29762ec8c4b4Smrgm4_defun([_LT_CHECK_MAGIC_METHOD],
29772ec8c4b4Smrg[m4_require([_LT_DECL_EGREP])
29782ec8c4b4Smrgm4_require([_LT_DECL_OBJDUMP])
29792ec8c4b4SmrgAC_CACHE_CHECK([how to recognize dependent libraries],
298009885543Smrglt_cv_deplibs_check_method,
298109885543Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
298209885543Smrglt_cv_file_magic_test_file=
298309885543Smrglt_cv_deplibs_check_method='unknown'
298409885543Smrg# Need to set the preceding variable on all platforms that support
298509885543Smrg# interlibrary dependencies.
298609885543Smrg# 'none' -- dependencies not supported.
298709885543Smrg# `unknown' -- same as none, but documents that we really don't know.
298809885543Smrg# 'pass_all' -- all dependencies passed with no checks.
298909885543Smrg# 'test_compile' -- check by making test program.
299009885543Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
299109885543Smrg# which responds to the $file_magic_cmd with a given extended regex.
299209885543Smrg# If you have `file' or equivalent on your system and you're not sure
299309885543Smrg# whether `pass_all' will *always* work, you probably want this one.
299409885543Smrg
299509885543Smrgcase $host_os in
29967104f784Smrgaix[[4-9]]*)
299709885543Smrg  lt_cv_deplibs_check_method=pass_all
299809885543Smrg  ;;
299909885543Smrg
300009885543Smrgbeos*)
300109885543Smrg  lt_cv_deplibs_check_method=pass_all
300209885543Smrg  ;;
300309885543Smrg
300409885543Smrgbsdi[[45]]*)
300509885543Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
300609885543Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
300709885543Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
300809885543Smrg  ;;
300909885543Smrg
301009885543Smrgcygwin*)
301109885543Smrg  # func_win32_libid is a shell function defined in ltmain.sh
301209885543Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
301309885543Smrg  lt_cv_file_magic_cmd='func_win32_libid'
301409885543Smrg  ;;
301509885543Smrg
301609885543Smrgmingw* | pw32*)
301709885543Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
30187104f784Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
30197104f784Smrg  # unless we find 'file', for example because we are cross-compiling.
30207104f784Smrg  if ( file / ) >/dev/null 2>&1; then
30217104f784Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
30227104f784Smrg    lt_cv_file_magic_cmd='func_win32_libid'
30237104f784Smrg  else
30247104f784Smrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
30257104f784Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
30267104f784Smrg  fi
302709885543Smrg  ;;
302809885543Smrg
30292ec8c4b4Smrgcegcc)
30302ec8c4b4Smrg  # use the weaker test based on 'objdump'. See mingw*.
30312ec8c4b4Smrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
30322ec8c4b4Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
30332ec8c4b4Smrg  ;;
30342ec8c4b4Smrg
303509885543Smrgdarwin* | rhapsody*)
303609885543Smrg  lt_cv_deplibs_check_method=pass_all
303709885543Smrg  ;;
303809885543Smrg
303909885543Smrgfreebsd* | dragonfly*)
30402ec8c4b4Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
304109885543Smrg    case $host_cpu in
304209885543Smrg    i*86 )
304309885543Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
304409885543Smrg      # Let's accept both of them until this is cleared up.
304509885543Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
304609885543Smrg      lt_cv_file_magic_cmd=/usr/bin/file
304709885543Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
304809885543Smrg      ;;
304909885543Smrg    esac
305009885543Smrg  else
305109885543Smrg    lt_cv_deplibs_check_method=pass_all
305209885543Smrg  fi
305309885543Smrg  ;;
305409885543Smrg
305509885543Smrggnu*)
305609885543Smrg  lt_cv_deplibs_check_method=pass_all
305709885543Smrg  ;;
305809885543Smrg
305909885543Smrghpux10.20* | hpux11*)
306009885543Smrg  lt_cv_file_magic_cmd=/usr/bin/file
306109885543Smrg  case $host_cpu in
306209885543Smrg  ia64*)
306309885543Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
306409885543Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
306509885543Smrg    ;;
306609885543Smrg  hppa*64*)
306709885543Smrg    [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]']
306809885543Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
306909885543Smrg    ;;
307009885543Smrg  *)
307109885543Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
307209885543Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
307309885543Smrg    ;;
307409885543Smrg  esac
307509885543Smrg  ;;
307609885543Smrg
30777104f784Smrginterix[[3-9]]*)
307809885543Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
307909885543Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
308009885543Smrg  ;;
308109885543Smrg
308209885543Smrgirix5* | irix6* | nonstopux*)
308309885543Smrg  case $LD in
308409885543Smrg  *-32|*"-32 ") libmagic=32-bit;;
308509885543Smrg  *-n32|*"-n32 ") libmagic=N32;;
308609885543Smrg  *-64|*"-64 ") libmagic=64-bit;;
308709885543Smrg  *) libmagic=never-match;;
308809885543Smrg  esac
308909885543Smrg  lt_cv_deplibs_check_method=pass_all
309009885543Smrg  ;;
309109885543Smrg
309209885543Smrg# This must be Linux ELF.
309309885543Smrglinux* | k*bsd*-gnu)
309409885543Smrg  lt_cv_deplibs_check_method=pass_all
309509885543Smrg  ;;
309609885543Smrg
30977104f784Smrgnetbsd*)
30982ec8c4b4Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
309909885543Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
310009885543Smrg  else
310109885543Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
310209885543Smrg  fi
310309885543Smrg  ;;
310409885543Smrg
310509885543Smrgnewos6*)
310609885543Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
310709885543Smrg  lt_cv_file_magic_cmd=/usr/bin/file
310809885543Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
310909885543Smrg  ;;
311009885543Smrg
31112ec8c4b4Smrg*nto* | *qnx*)
31122ec8c4b4Smrg  lt_cv_deplibs_check_method=pass_all
311309885543Smrg  ;;
311409885543Smrg
311509885543Smrgopenbsd*)
31162ec8c4b4Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
311709885543Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
311809885543Smrg  else
311909885543Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
312009885543Smrg  fi
312109885543Smrg  ;;
312209885543Smrg
312309885543Smrgosf3* | osf4* | osf5*)
312409885543Smrg  lt_cv_deplibs_check_method=pass_all
312509885543Smrg  ;;
312609885543Smrg
31277104f784Smrgrdos*)
31287104f784Smrg  lt_cv_deplibs_check_method=pass_all
31297104f784Smrg  ;;
31307104f784Smrg
313109885543Smrgsolaris*)
313209885543Smrg  lt_cv_deplibs_check_method=pass_all
313309885543Smrg  ;;
313409885543Smrg
31352ec8c4b4Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
31362ec8c4b4Smrg  lt_cv_deplibs_check_method=pass_all
31372ec8c4b4Smrg  ;;
31382ec8c4b4Smrg
313909885543Smrgsysv4 | sysv4.3*)
314009885543Smrg  case $host_vendor in
314109885543Smrg  motorola)
314209885543Smrg    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]]'
314309885543Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
314409885543Smrg    ;;
314509885543Smrg  ncr)
314609885543Smrg    lt_cv_deplibs_check_method=pass_all
314709885543Smrg    ;;
314809885543Smrg  sequent)
314909885543Smrg    lt_cv_file_magic_cmd='/bin/file'
315009885543Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
315109885543Smrg    ;;
315209885543Smrg  sni)
315309885543Smrg    lt_cv_file_magic_cmd='/bin/file'
315409885543Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
315509885543Smrg    lt_cv_file_magic_test_file=/lib/libc.so
315609885543Smrg    ;;
315709885543Smrg  siemens)
315809885543Smrg    lt_cv_deplibs_check_method=pass_all
315909885543Smrg    ;;
316009885543Smrg  pc)
316109885543Smrg    lt_cv_deplibs_check_method=pass_all
316209885543Smrg    ;;
316309885543Smrg  esac
316409885543Smrg  ;;
316509885543Smrg
31662ec8c4b4Smrgtpf*)
316709885543Smrg  lt_cv_deplibs_check_method=pass_all
316809885543Smrg  ;;
316909885543Smrgesac
317009885543Smrg])
317109885543Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
317209885543Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
317309885543Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
317409885543Smrg
31752ec8c4b4Smrg_LT_DECL([], [deplibs_check_method], [1],
31762ec8c4b4Smrg    [Method to check whether dependent libraries are shared objects])
31772ec8c4b4Smrg_LT_DECL([], [file_magic_cmd], [1],
31782ec8c4b4Smrg    [Command to use when deplibs_check_method == "file_magic"])
31792ec8c4b4Smrg])# _LT_CHECK_MAGIC_METHOD
318009885543Smrg
31812ec8c4b4Smrg
31822ec8c4b4Smrg# LT_PATH_NM
318309885543Smrg# ----------
31842ec8c4b4Smrg# find the pathname to a BSD- or MS-compatible name lister
31852ec8c4b4SmrgAC_DEFUN([LT_PATH_NM],
31862ec8c4b4Smrg[AC_REQUIRE([AC_PROG_CC])dnl
31872ec8c4b4SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
318809885543Smrg[if test -n "$NM"; then
318909885543Smrg  # Let the user override the test.
319009885543Smrg  lt_cv_path_NM="$NM"
319109885543Smrgelse
319209885543Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
31937104f784Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
319409885543Smrg    lt_nm_to_check="$lt_nm_to_check nm"
319509885543Smrg  fi
319609885543Smrg  for lt_tmp_nm in $lt_nm_to_check; do
319709885543Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
319809885543Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
319909885543Smrg      IFS="$lt_save_ifs"
320009885543Smrg      test -z "$ac_dir" && ac_dir=.
320109885543Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
320209885543Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
320309885543Smrg	# Check to see if the nm accepts a BSD-compat flag.
320409885543Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
320509885543Smrg	#   nm: unknown option "B" ignored
320609885543Smrg	# Tru64's nm complains that /dev/null is an invalid object file
320709885543Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
320809885543Smrg	*/dev/null* | *'Invalid file or object type'*)
320909885543Smrg	  lt_cv_path_NM="$tmp_nm -B"
321009885543Smrg	  break
321109885543Smrg	  ;;
321209885543Smrg	*)
321309885543Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
321409885543Smrg	  */dev/null*)
321509885543Smrg	    lt_cv_path_NM="$tmp_nm -p"
321609885543Smrg	    break
321709885543Smrg	    ;;
321809885543Smrg	  *)
321909885543Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
322009885543Smrg	    continue # so that we can try to find one that supports BSD flags
322109885543Smrg	    ;;
322209885543Smrg	  esac
322309885543Smrg	  ;;
322409885543Smrg	esac
322509885543Smrg      fi
322609885543Smrg    done
322709885543Smrg    IFS="$lt_save_ifs"
322809885543Smrg  done
32292ec8c4b4Smrg  : ${lt_cv_path_NM=no}
323009885543Smrgfi])
32312ec8c4b4Smrgif test "$lt_cv_path_NM" != "no"; then
32322ec8c4b4Smrg  NM="$lt_cv_path_NM"
32332ec8c4b4Smrgelse
32342ec8c4b4Smrg  # Didn't find any BSD compatible name lister, look for dumpbin.
32352ec8c4b4Smrg  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
32362ec8c4b4Smrg  AC_SUBST([DUMPBIN])
32372ec8c4b4Smrg  if test "$DUMPBIN" != ":"; then
32382ec8c4b4Smrg    NM="$DUMPBIN"
32392ec8c4b4Smrg  fi
32402ec8c4b4Smrgfi
32412ec8c4b4Smrgtest -z "$NM" && NM=nm
32422ec8c4b4SmrgAC_SUBST([NM])
32432ec8c4b4Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
32442ec8c4b4Smrg
32452ec8c4b4SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
32462ec8c4b4Smrg  [lt_cv_nm_interface="BSD nm"
32472ec8c4b4Smrg  echo "int some_variable = 0;" > conftest.$ac_ext
32482ec8c4b4Smrg  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
32492ec8c4b4Smrg  (eval "$ac_compile" 2>conftest.err)
32502ec8c4b4Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
32512ec8c4b4Smrg  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
32522ec8c4b4Smrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
32532ec8c4b4Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
32542ec8c4b4Smrg  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
32552ec8c4b4Smrg  cat conftest.out >&AS_MESSAGE_LOG_FD
32562ec8c4b4Smrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
32572ec8c4b4Smrg    lt_cv_nm_interface="MS dumpbin"
32582ec8c4b4Smrg  fi
32592ec8c4b4Smrg  rm -f conftest*])
32602ec8c4b4Smrg])# LT_PATH_NM
326109885543Smrg
32622ec8c4b4Smrg# Old names:
32632ec8c4b4SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
32642ec8c4b4SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
32652ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
32662ec8c4b4Smrgdnl AC_DEFUN([AM_PROG_NM], [])
32672ec8c4b4Smrgdnl AC_DEFUN([AC_PROG_NM], [])
326809885543Smrg
32692ec8c4b4Smrg
32702ec8c4b4Smrg# LT_LIB_M
32712ec8c4b4Smrg# --------
327209885543Smrg# check for math library
32732ec8c4b4SmrgAC_DEFUN([LT_LIB_M],
327409885543Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
327509885543SmrgLIBM=
327609885543Smrgcase $host in
327709885543Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
327809885543Smrg  # These system don't have libm, or don't need it
327909885543Smrg  ;;
328009885543Smrg*-ncr-sysv4.3*)
328109885543Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
328209885543Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
328309885543Smrg  ;;
328409885543Smrg*)
328509885543Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
328609885543Smrg  ;;
328709885543Smrgesac
32882ec8c4b4SmrgAC_SUBST([LIBM])
32892ec8c4b4Smrg])# LT_LIB_M
329009885543Smrg
32912ec8c4b4Smrg# Old name:
32922ec8c4b4SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
32932ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
32942ec8c4b4Smrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
329509885543Smrg
329609885543Smrg
32972ec8c4b4Smrg# _LT_COMPILER_NO_RTTI([TAGNAME])
32982ec8c4b4Smrg# -------------------------------
32992ec8c4b4Smrgm4_defun([_LT_COMPILER_NO_RTTI],
33002ec8c4b4Smrg[m4_require([_LT_TAG_COMPILER])dnl
330109885543Smrg
33022ec8c4b4Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
330309885543Smrg
33042ec8c4b4Smrgif test "$GCC" = yes; then
33052ec8c4b4Smrg  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
330609885543Smrg
33072ec8c4b4Smrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
33082ec8c4b4Smrg    lt_cv_prog_compiler_rtti_exceptions,
33092ec8c4b4Smrg    [-fno-rtti -fno-exceptions], [],
33102ec8c4b4Smrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
33112ec8c4b4Smrgfi
33122ec8c4b4Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
33132ec8c4b4Smrg	[Compiler flag to turn off builtin functions])
33142ec8c4b4Smrg])# _LT_COMPILER_NO_RTTI
331509885543Smrg
331609885543Smrg
33172ec8c4b4Smrg# _LT_CMD_GLOBAL_SYMBOLS
33182ec8c4b4Smrg# ----------------------
33192ec8c4b4Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
33202ec8c4b4Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
33212ec8c4b4SmrgAC_REQUIRE([AC_PROG_CC])dnl
33222ec8c4b4SmrgAC_REQUIRE([LT_PATH_NM])dnl
33232ec8c4b4SmrgAC_REQUIRE([LT_PATH_LD])dnl
33242ec8c4b4Smrgm4_require([_LT_DECL_SED])dnl
33252ec8c4b4Smrgm4_require([_LT_DECL_EGREP])dnl
33262ec8c4b4Smrgm4_require([_LT_TAG_COMPILER])dnl
332709885543Smrg
33282ec8c4b4Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
33292ec8c4b4SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
33302ec8c4b4SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
333109885543Smrg[
33322ec8c4b4Smrg# These are sane defaults that work on at least a few old systems.
33332ec8c4b4Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
333409885543Smrg
33352ec8c4b4Smrg# Character class describing NM global symbol codes.
33362ec8c4b4Smrgsymcode='[[BCDEGRST]]'
333709885543Smrg
33382ec8c4b4Smrg# Regexp to match symbols that can be accessed directly from C.
33392ec8c4b4Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
334009885543Smrg
33412ec8c4b4Smrg# Define system-specific variables.
33422ec8c4b4Smrgcase $host_os in
33432ec8c4b4Smrgaix*)
33442ec8c4b4Smrg  symcode='[[BCDT]]'
33452ec8c4b4Smrg  ;;
33462ec8c4b4Smrgcygwin* | mingw* | pw32* | cegcc*)
33472ec8c4b4Smrg  symcode='[[ABCDGISTW]]'
33482ec8c4b4Smrg  ;;
33492ec8c4b4Smrghpux*)
33502ec8c4b4Smrg  if test "$host_cpu" = ia64; then
33512ec8c4b4Smrg    symcode='[[ABCDEGRST]]'
33522ec8c4b4Smrg  fi
33532ec8c4b4Smrg  ;;
33542ec8c4b4Smrgirix* | nonstopux*)
33552ec8c4b4Smrg  symcode='[[BCDEGRST]]'
33562ec8c4b4Smrg  ;;
33572ec8c4b4Smrgosf*)
33582ec8c4b4Smrg  symcode='[[BCDEGQRST]]'
33592ec8c4b4Smrg  ;;
33602ec8c4b4Smrgsolaris*)
33612ec8c4b4Smrg  symcode='[[BDRT]]'
33622ec8c4b4Smrg  ;;
33632ec8c4b4Smrgsco3.2v5*)
33642ec8c4b4Smrg  symcode='[[DT]]'
33652ec8c4b4Smrg  ;;
33662ec8c4b4Smrgsysv4.2uw2*)
33672ec8c4b4Smrg  symcode='[[DT]]'
33682ec8c4b4Smrg  ;;
33692ec8c4b4Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
33702ec8c4b4Smrg  symcode='[[ABDT]]'
33712ec8c4b4Smrg  ;;
33722ec8c4b4Smrgsysv4)
33732ec8c4b4Smrg  symcode='[[DFNSTU]]'
33742ec8c4b4Smrg  ;;
33752ec8c4b4Smrgesac
337609885543Smrg
33772ec8c4b4Smrg# If we're using GNU nm, then use its standard symbol codes.
33782ec8c4b4Smrgcase `$NM -V 2>&1` in
33792ec8c4b4Smrg*GNU* | *'with BFD'*)
33802ec8c4b4Smrg  symcode='[[ABCDGIRSTW]]' ;;
33812ec8c4b4Smrgesac
338209885543Smrg
33832ec8c4b4Smrg# Transform an extracted symbol line into a proper C declaration.
33842ec8c4b4Smrg# Some systems (esp. on ia64) link data and code symbols differently,
33852ec8c4b4Smrg# so use this general approach.
33862ec8c4b4Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
338709885543Smrg
33882ec8c4b4Smrg# Transform an extracted symbol line into symbol name and symbol address
33892ec8c4b4Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
33902ec8c4b4Smrglt_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'"
339109885543Smrg
33922ec8c4b4Smrg# Handle CRLF in mingw tool chain
33932ec8c4b4Smrgopt_cr=
33942ec8c4b4Smrgcase $build_os in
33952ec8c4b4Smrgmingw*)
33962ec8c4b4Smrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
33972ec8c4b4Smrg  ;;
33982ec8c4b4Smrgesac
339909885543Smrg
34002ec8c4b4Smrg# Try without a prefix underscore, then with it.
34012ec8c4b4Smrgfor ac_symprfx in "" "_"; do
340209885543Smrg
34032ec8c4b4Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
34042ec8c4b4Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
340509885543Smrg
34062ec8c4b4Smrg  # Write the raw and C identifiers.
34072ec8c4b4Smrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
34082ec8c4b4Smrg    # Fake it for dumpbin and say T for any non-static function
34092ec8c4b4Smrg    # and D for any global variable.
34102ec8c4b4Smrg    # Also find C++ and __fastcall symbols from MSVC++,
34112ec8c4b4Smrg    # which start with @ or ?.
34122ec8c4b4Smrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
34132ec8c4b4Smrg"     {last_section=section; section=\$ 3};"\
34142ec8c4b4Smrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
34152ec8c4b4Smrg"     \$ 0!~/External *\|/{next};"\
34162ec8c4b4Smrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
34172ec8c4b4Smrg"     {if(hide[section]) next};"\
34182ec8c4b4Smrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
34192ec8c4b4Smrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
34202ec8c4b4Smrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
34212ec8c4b4Smrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
34222ec8c4b4Smrg"     ' prfx=^$ac_symprfx]"
34232ec8c4b4Smrg  else
34242ec8c4b4Smrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
34252ec8c4b4Smrg  fi
342609885543Smrg
34272ec8c4b4Smrg  # Check to see that the pipe works correctly.
34282ec8c4b4Smrg  pipe_works=no
342909885543Smrg
34302ec8c4b4Smrg  rm -f conftest*
34312ec8c4b4Smrg  cat > conftest.$ac_ext <<_LT_EOF
34322ec8c4b4Smrg#ifdef __cplusplus
34332ec8c4b4Smrgextern "C" {
34342ec8c4b4Smrg#endif
34352ec8c4b4Smrgchar nm_test_var;
34362ec8c4b4Smrgvoid nm_test_func(void);
34372ec8c4b4Smrgvoid nm_test_func(void){}
34382ec8c4b4Smrg#ifdef __cplusplus
34392ec8c4b4Smrg}
34402ec8c4b4Smrg#endif
34412ec8c4b4Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
34422ec8c4b4Smrg_LT_EOF
344309885543Smrg
34442ec8c4b4Smrg  if AC_TRY_EVAL(ac_compile); then
34452ec8c4b4Smrg    # Now try to grab the symbols.
34462ec8c4b4Smrg    nlist=conftest.nm
34472ec8c4b4Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
34482ec8c4b4Smrg      # Try sorting and uniquifying the output.
34492ec8c4b4Smrg      if sort "$nlist" | uniq > "$nlist"T; then
34502ec8c4b4Smrg	mv -f "$nlist"T "$nlist"
34512ec8c4b4Smrg      else
34522ec8c4b4Smrg	rm -f "$nlist"T
34532ec8c4b4Smrg      fi
345409885543Smrg
34552ec8c4b4Smrg      # Make sure that we snagged all the symbols we need.
34562ec8c4b4Smrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
34572ec8c4b4Smrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
34582ec8c4b4Smrg	  cat <<_LT_EOF > conftest.$ac_ext
34592ec8c4b4Smrg#ifdef __cplusplus
34602ec8c4b4Smrgextern "C" {
34612ec8c4b4Smrg#endif
346209885543Smrg
34632ec8c4b4Smrg_LT_EOF
34642ec8c4b4Smrg	  # Now generate the symbol file.
34652ec8c4b4Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
346609885543Smrg
34672ec8c4b4Smrg	  cat <<_LT_EOF >> conftest.$ac_ext
346809885543Smrg
34692ec8c4b4Smrg/* The mapping between symbol names and symbols.  */
34702ec8c4b4Smrgconst struct {
34712ec8c4b4Smrg  const char *name;
34722ec8c4b4Smrg  void       *address;
34732ec8c4b4Smrg}
34742ec8c4b4Smrglt__PROGRAM__LTX_preloaded_symbols[[]] =
34752ec8c4b4Smrg{
34762ec8c4b4Smrg  { "@PROGRAM@", (void *) 0 },
34772ec8c4b4Smrg_LT_EOF
34782ec8c4b4Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
34792ec8c4b4Smrg	  cat <<\_LT_EOF >> conftest.$ac_ext
34802ec8c4b4Smrg  {0, (void *) 0}
34812ec8c4b4Smrg};
348209885543Smrg
34832ec8c4b4Smrg/* This works around a problem in FreeBSD linker */
34842ec8c4b4Smrg#ifdef FREEBSD_WORKAROUND
34852ec8c4b4Smrgstatic const void *lt_preloaded_setup() {
34862ec8c4b4Smrg  return lt__PROGRAM__LTX_preloaded_symbols;
34872ec8c4b4Smrg}
34882ec8c4b4Smrg#endif
348909885543Smrg
34902ec8c4b4Smrg#ifdef __cplusplus
34912ec8c4b4Smrg}
34922ec8c4b4Smrg#endif
34932ec8c4b4Smrg_LT_EOF
34942ec8c4b4Smrg	  # Now try linking the two files.
34952ec8c4b4Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
34962ec8c4b4Smrg	  lt_save_LIBS="$LIBS"
34972ec8c4b4Smrg	  lt_save_CFLAGS="$CFLAGS"
34982ec8c4b4Smrg	  LIBS="conftstm.$ac_objext"
34992ec8c4b4Smrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
35002ec8c4b4Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
35012ec8c4b4Smrg	    pipe_works=yes
35022ec8c4b4Smrg	  fi
35032ec8c4b4Smrg	  LIBS="$lt_save_LIBS"
35042ec8c4b4Smrg	  CFLAGS="$lt_save_CFLAGS"
35052ec8c4b4Smrg	else
35062ec8c4b4Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
35072ec8c4b4Smrg	fi
35082ec8c4b4Smrg      else
35092ec8c4b4Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
35102ec8c4b4Smrg      fi
351109885543Smrg    else
35122ec8c4b4Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
351309885543Smrg    fi
351409885543Smrg  else
35152ec8c4b4Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
35162ec8c4b4Smrg    cat conftest.$ac_ext >&5
351709885543Smrg  fi
35182ec8c4b4Smrg  rm -rf conftest* conftst*
351909885543Smrg
35202ec8c4b4Smrg  # Do not use the global_symbol_pipe unless it works.
35212ec8c4b4Smrg  if test "$pipe_works" = yes; then
35222ec8c4b4Smrg    break
35232ec8c4b4Smrg  else
35242ec8c4b4Smrg    lt_cv_sys_global_symbol_pipe=
35252ec8c4b4Smrg  fi
35262ec8c4b4Smrgdone
35272ec8c4b4Smrg])
35282ec8c4b4Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
35292ec8c4b4Smrg  lt_cv_sys_global_symbol_to_cdecl=
35302ec8c4b4Smrgfi
35312ec8c4b4Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
35322ec8c4b4Smrg  AC_MSG_RESULT(failed)
353309885543Smrgelse
35342ec8c4b4Smrg  AC_MSG_RESULT(ok)
353509885543Smrgfi
353609885543Smrg
35372ec8c4b4Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
35382ec8c4b4Smrg    [Take the output of nm and produce a listing of raw symbols and C names])
35392ec8c4b4Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
35402ec8c4b4Smrg    [Transform the output of nm in a proper C declaration])
35412ec8c4b4Smrg_LT_DECL([global_symbol_to_c_name_address],
35422ec8c4b4Smrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
35432ec8c4b4Smrg    [Transform the output of nm in a C name address pair])
35442ec8c4b4Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
35452ec8c4b4Smrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
35462ec8c4b4Smrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
35472ec8c4b4Smrg]) # _LT_CMD_GLOBAL_SYMBOLS
354809885543Smrg
354909885543Smrg
35502ec8c4b4Smrg# _LT_COMPILER_PIC([TAGNAME])
35512ec8c4b4Smrg# ---------------------------
35522ec8c4b4Smrgm4_defun([_LT_COMPILER_PIC],
35532ec8c4b4Smrg[m4_require([_LT_TAG_COMPILER])dnl
35542ec8c4b4Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
35552ec8c4b4Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
35562ec8c4b4Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
355709885543Smrg
35582ec8c4b4SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
35592ec8c4b4Smrgm4_if([$1], [CXX], [
35602ec8c4b4Smrg  # C++ specific cases for pic, static, wl, etc.
35612ec8c4b4Smrg  if test "$GXX" = yes; then
35622ec8c4b4Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
35632ec8c4b4Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
356409885543Smrg
35652ec8c4b4Smrg    case $host_os in
35662ec8c4b4Smrg    aix*)
35672ec8c4b4Smrg      # All AIX code is PIC.
356809885543Smrg      if test "$host_cpu" = ia64; then
35692ec8c4b4Smrg	# AIX 5 now supports IA64 processor
35702ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
357109885543Smrg      fi
35722ec8c4b4Smrg      ;;
357309885543Smrg
35742ec8c4b4Smrg    amigaos*)
35752ec8c4b4Smrg      case $host_cpu in
35762ec8c4b4Smrg      powerpc)
35772ec8c4b4Smrg            # see comment about AmigaOS4 .so support
35782ec8c4b4Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
35792ec8c4b4Smrg        ;;
35802ec8c4b4Smrg      m68k)
35812ec8c4b4Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
35822ec8c4b4Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
35832ec8c4b4Smrg            # like `-m68040'.
35842ec8c4b4Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
358509885543Smrg        ;;
35862ec8c4b4Smrg      esac
35872ec8c4b4Smrg      ;;
358809885543Smrg
35892ec8c4b4Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
35902ec8c4b4Smrg      # PIC is the default for these OSes.
35912ec8c4b4Smrg      ;;
35922ec8c4b4Smrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
35932ec8c4b4Smrg      # This hack is so that the source file can tell whether it is being
35942ec8c4b4Smrg      # built for inclusion in a dll (and should export symbols for example).
35952ec8c4b4Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
35962ec8c4b4Smrg      # (--disable-auto-import) libraries
35972ec8c4b4Smrg      m4_if([$1], [GCJ], [],
35982ec8c4b4Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
35992ec8c4b4Smrg      ;;
36002ec8c4b4Smrg    darwin* | rhapsody*)
36012ec8c4b4Smrg      # PIC is the default on this platform
36022ec8c4b4Smrg      # Common symbols not allowed in MH_DYLIB files
36032ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
36042ec8c4b4Smrg      ;;
36052ec8c4b4Smrg    *djgpp*)
36062ec8c4b4Smrg      # DJGPP does not support shared libraries at all
36072ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
36082ec8c4b4Smrg      ;;
36092ec8c4b4Smrg    interix[[3-9]]*)
36102ec8c4b4Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
36112ec8c4b4Smrg      # Instead, we relocate shared libraries at runtime.
36122ec8c4b4Smrg      ;;
36132ec8c4b4Smrg    sysv4*MP*)
36142ec8c4b4Smrg      if test -d /usr/nec; then
36152ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
36162ec8c4b4Smrg      fi
36172ec8c4b4Smrg      ;;
36182ec8c4b4Smrg    hpux*)
36192ec8c4b4Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
36202ec8c4b4Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
36212ec8c4b4Smrg      # sets the default TLS model and affects inlining.
36222ec8c4b4Smrg      case $host_cpu in
36232ec8c4b4Smrg      hppa*64*)
362409885543Smrg	;;
362509885543Smrg      *)
36262ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
362709885543Smrg	;;
36282ec8c4b4Smrg      esac
362909885543Smrg      ;;
36302ec8c4b4Smrg    *qnx* | *nto*)
36312ec8c4b4Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
36322ec8c4b4Smrg      # it will coredump.
36332ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
363409885543Smrg      ;;
363509885543Smrg    *)
36362ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
363709885543Smrg      ;;
363809885543Smrg    esac
36392ec8c4b4Smrg  else
36402ec8c4b4Smrg    case $host_os in
36412ec8c4b4Smrg      aix[[4-9]]*)
36422ec8c4b4Smrg	# All AIX code is PIC.
36432ec8c4b4Smrg	if test "$host_cpu" = ia64; then
36442ec8c4b4Smrg	  # AIX 5 now supports IA64 processor
36452ec8c4b4Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
36462ec8c4b4Smrg	else
36472ec8c4b4Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
36482ec8c4b4Smrg	fi
364909885543Smrg	;;
36502ec8c4b4Smrg      chorus*)
36512ec8c4b4Smrg	case $cc_basename in
36522ec8c4b4Smrg	cxch68*)
36532ec8c4b4Smrg	  # Green Hills C++ Compiler
36542ec8c4b4Smrg	  # _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"
365509885543Smrg	  ;;
365609885543Smrg	esac
365709885543Smrg	;;
36582ec8c4b4Smrg      dgux*)
36592ec8c4b4Smrg	case $cc_basename in
36602ec8c4b4Smrg	  ec++*)
36612ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
36622ec8c4b4Smrg	    ;;
36632ec8c4b4Smrg	  ghcx*)
36642ec8c4b4Smrg	    # Green Hills C++ Compiler
36652ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
36662ec8c4b4Smrg	    ;;
36672ec8c4b4Smrg	  *)
36682ec8c4b4Smrg	    ;;
36692ec8c4b4Smrg	esac
36702ec8c4b4Smrg	;;
36712ec8c4b4Smrg      freebsd* | dragonfly*)
36722ec8c4b4Smrg	# FreeBSD uses GNU C++
36732ec8c4b4Smrg	;;
36742ec8c4b4Smrg      hpux9* | hpux10* | hpux11*)
36752ec8c4b4Smrg	case $cc_basename in
36762ec8c4b4Smrg	  CC*)
36772ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
36782ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
36792ec8c4b4Smrg	    if test "$host_cpu" != ia64; then
36802ec8c4b4Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
36812ec8c4b4Smrg	    fi
36822ec8c4b4Smrg	    ;;
36832ec8c4b4Smrg	  aCC*)
36842ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
36852ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
368609885543Smrg	    case $host_cpu in
36872ec8c4b4Smrg	    hppa*64*|ia64*)
36882ec8c4b4Smrg	      # +Z the default
368909885543Smrg	      ;;
369009885543Smrg	    *)
36912ec8c4b4Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
369209885543Smrg	      ;;
369309885543Smrg	    esac
36942ec8c4b4Smrg	    ;;
36952ec8c4b4Smrg	  *)
36962ec8c4b4Smrg	    ;;
369709885543Smrg	esac
369809885543Smrg	;;
36992ec8c4b4Smrg      interix*)
37002ec8c4b4Smrg	# This is c89, which is MS Visual C++ (no shared libs)
37012ec8c4b4Smrg	# Anyone wants to do a port?
370209885543Smrg	;;
37032ec8c4b4Smrg      irix5* | irix6* | nonstopux*)
37042ec8c4b4Smrg	case $cc_basename in
37052ec8c4b4Smrg	  CC*)
37062ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
37072ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
37082ec8c4b4Smrg	    # CC pic flag -KPIC is the default.
37092ec8c4b4Smrg	    ;;
37102ec8c4b4Smrg	  *)
37112ec8c4b4Smrg	    ;;
37127104f784Smrg	esac
37137104f784Smrg	;;
37142ec8c4b4Smrg      linux* | k*bsd*-gnu)
37152ec8c4b4Smrg	case $cc_basename in
37162ec8c4b4Smrg	  KCC*)
37172ec8c4b4Smrg	    # KAI C++ Compiler
37182ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
37192ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
37202ec8c4b4Smrg	    ;;
37212ec8c4b4Smrg	  ecpc* )
37222ec8c4b4Smrg	    # old Intel C++ for x86_64 which still supported -KPIC.
37232ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
37242ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
37252ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
37262ec8c4b4Smrg	    ;;
37272ec8c4b4Smrg	  icpc* )
37282ec8c4b4Smrg	    # Intel C++, used to be incompatible with GCC.
37292ec8c4b4Smrg	    # ICC 10 doesn't accept -KPIC any more.
37302ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
37312ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
37322ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
37332ec8c4b4Smrg	    ;;
37342ec8c4b4Smrg	  pgCC* | pgcpp*)
37352ec8c4b4Smrg	    # Portland Group C++ compiler
37362ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
37372ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
37382ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
37392ec8c4b4Smrg	    ;;
37402ec8c4b4Smrg	  cxx*)
37412ec8c4b4Smrg	    # Compaq C++
37422ec8c4b4Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
37432ec8c4b4Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
37442ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
37452ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
37462ec8c4b4Smrg	    ;;
37472ec8c4b4Smrg	  xlc* | xlC*)
37482ec8c4b4Smrg	    # IBM XL 8.0 on PPC
37492ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
37502ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
37512ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
37522ec8c4b4Smrg	    ;;
37532ec8c4b4Smrg	  *)
37542ec8c4b4Smrg	    case `$CC -V 2>&1 | sed 5q` in
37552ec8c4b4Smrg	    *Sun\ C*)
37562ec8c4b4Smrg	      # Sun C++ 5.9
37572ec8c4b4Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
37582ec8c4b4Smrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
37592ec8c4b4Smrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
37602ec8c4b4Smrg	      ;;
37612ec8c4b4Smrg	    esac
37622ec8c4b4Smrg	    ;;
37632ec8c4b4Smrg	esac
376409885543Smrg	;;
37652ec8c4b4Smrg      lynxos*)
376609885543Smrg	;;
37672ec8c4b4Smrg      m88k*)
376809885543Smrg	;;
37692ec8c4b4Smrg      mvs*)
37702ec8c4b4Smrg	case $cc_basename in
37712ec8c4b4Smrg	  cxx*)
37722ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
37732ec8c4b4Smrg	    ;;
37742ec8c4b4Smrg	  *)
37752ec8c4b4Smrg	    ;;
37762ec8c4b4Smrg	esac
377709885543Smrg	;;
37782ec8c4b4Smrg      netbsd*)
377909885543Smrg	;;
37802ec8c4b4Smrg      *qnx* | *nto*)
37812ec8c4b4Smrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
37822ec8c4b4Smrg        # it will coredump.
37832ec8c4b4Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
37842ec8c4b4Smrg        ;;
37852ec8c4b4Smrg      osf3* | osf4* | osf5*)
37862ec8c4b4Smrg	case $cc_basename in
37872ec8c4b4Smrg	  KCC*)
37882ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
37892ec8c4b4Smrg	    ;;
37902ec8c4b4Smrg	  RCC*)
37912ec8c4b4Smrg	    # Rational C++ 2.4.1
37922ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
37932ec8c4b4Smrg	    ;;
37942ec8c4b4Smrg	  cxx*)
37952ec8c4b4Smrg	    # Digital/Compaq C++
37962ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
37972ec8c4b4Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
37982ec8c4b4Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
37992ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
38002ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
38012ec8c4b4Smrg	    ;;
38022ec8c4b4Smrg	  *)
38032ec8c4b4Smrg	    ;;
38042ec8c4b4Smrg	esac
380509885543Smrg	;;
38062ec8c4b4Smrg      psos*)
380709885543Smrg	;;
38082ec8c4b4Smrg      solaris*)
38092ec8c4b4Smrg	case $cc_basename in
38102ec8c4b4Smrg	  CC*)
38112ec8c4b4Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
38122ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
38132ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
38142ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
38152ec8c4b4Smrg	    ;;
38162ec8c4b4Smrg	  gcx*)
38172ec8c4b4Smrg	    # Green Hills C++ Compiler
38182ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
38192ec8c4b4Smrg	    ;;
382009885543Smrg	  *)
382109885543Smrg	    ;;
382209885543Smrg	esac
382309885543Smrg	;;
38242ec8c4b4Smrg      sunos4*)
38252ec8c4b4Smrg	case $cc_basename in
38262ec8c4b4Smrg	  CC*)
38272ec8c4b4Smrg	    # Sun C++ 4.x
38282ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
38292ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
38302ec8c4b4Smrg	    ;;
38312ec8c4b4Smrg	  lcc*)
38322ec8c4b4Smrg	    # Lucid
38332ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
38342ec8c4b4Smrg	    ;;
38357104f784Smrg	  *)
38367104f784Smrg	    ;;
38372ec8c4b4Smrg	esac
383809885543Smrg	;;
38392ec8c4b4Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
38402ec8c4b4Smrg	case $cc_basename in
38412ec8c4b4Smrg	  CC*)
38422ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
38432ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
38442ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
38452ec8c4b4Smrg	    ;;
38462ec8c4b4Smrg	esac
384709885543Smrg	;;
38482ec8c4b4Smrg      tandem*)
38492ec8c4b4Smrg	case $cc_basename in
38502ec8c4b4Smrg	  NCC*)
38512ec8c4b4Smrg	    # NonStop-UX NCC 3.20
38522ec8c4b4Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
38532ec8c4b4Smrg	    ;;
38542ec8c4b4Smrg	  *)
38552ec8c4b4Smrg	    ;;
38562ec8c4b4Smrg	esac
385709885543Smrg	;;
38582ec8c4b4Smrg      vxworks*)
385909885543Smrg	;;
386009885543Smrg      *)
38612ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
386209885543Smrg	;;
386309885543Smrg    esac
38642ec8c4b4Smrg  fi
38652ec8c4b4Smrg],
38662ec8c4b4Smrg[
38672ec8c4b4Smrg  if test "$GCC" = yes; then
38682ec8c4b4Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
38692ec8c4b4Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
387009885543Smrg
38712ec8c4b4Smrg    case $host_os in
38722ec8c4b4Smrg      aix*)
38732ec8c4b4Smrg      # All AIX code is PIC.
38742ec8c4b4Smrg      if test "$host_cpu" = ia64; then
38752ec8c4b4Smrg	# AIX 5 now supports IA64 processor
38762ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
38772ec8c4b4Smrg      fi
38782ec8c4b4Smrg      ;;
387909885543Smrg
38802ec8c4b4Smrg    amigaos*)
38812ec8c4b4Smrg      case $host_cpu in
38822ec8c4b4Smrg      powerpc)
38832ec8c4b4Smrg            # see comment about AmigaOS4 .so support
38842ec8c4b4Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
38852ec8c4b4Smrg        ;;
38862ec8c4b4Smrg      m68k)
38872ec8c4b4Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
38882ec8c4b4Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
38892ec8c4b4Smrg            # like `-m68040'.
38902ec8c4b4Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
38912ec8c4b4Smrg        ;;
38922ec8c4b4Smrg      esac
38932ec8c4b4Smrg      ;;
389409885543Smrg
38952ec8c4b4Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
38962ec8c4b4Smrg      # PIC is the default for these OSes.
38972ec8c4b4Smrg      ;;
389809885543Smrg
38992ec8c4b4Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
39002ec8c4b4Smrg      # This hack is so that the source file can tell whether it is being
39012ec8c4b4Smrg      # built for inclusion in a dll (and should export symbols for example).
39022ec8c4b4Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
39032ec8c4b4Smrg      # (--disable-auto-import) libraries
39042ec8c4b4Smrg      m4_if([$1], [GCJ], [],
39052ec8c4b4Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
39062ec8c4b4Smrg      ;;
390709885543Smrg
39082ec8c4b4Smrg    darwin* | rhapsody*)
39092ec8c4b4Smrg      # PIC is the default on this platform
39102ec8c4b4Smrg      # Common symbols not allowed in MH_DYLIB files
39112ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
39122ec8c4b4Smrg      ;;
391309885543Smrg
39142ec8c4b4Smrg    hpux*)
39152ec8c4b4Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
39162ec8c4b4Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
39172ec8c4b4Smrg      # sets the default TLS model and affects inlining.
39182ec8c4b4Smrg      case $host_cpu in
39192ec8c4b4Smrg      hppa*64*)
39202ec8c4b4Smrg	# +Z the default
39212ec8c4b4Smrg	;;
39222ec8c4b4Smrg      *)
39232ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
39242ec8c4b4Smrg	;;
39252ec8c4b4Smrg      esac
39262ec8c4b4Smrg      ;;
392709885543Smrg
39282ec8c4b4Smrg    interix[[3-9]]*)
39292ec8c4b4Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
39302ec8c4b4Smrg      # Instead, we relocate shared libraries at runtime.
39312ec8c4b4Smrg      ;;
393209885543Smrg
39332ec8c4b4Smrg    msdosdjgpp*)
39342ec8c4b4Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
39352ec8c4b4Smrg      # on systems that don't support them.
39362ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
39372ec8c4b4Smrg      enable_shared=no
39382ec8c4b4Smrg      ;;
393909885543Smrg
39402ec8c4b4Smrg    *nto* | *qnx*)
39412ec8c4b4Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
39422ec8c4b4Smrg      # it will coredump.
39432ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
39442ec8c4b4Smrg      ;;
394509885543Smrg
39462ec8c4b4Smrg    sysv4*MP*)
39472ec8c4b4Smrg      if test -d /usr/nec; then
39482ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
39492ec8c4b4Smrg      fi
39502ec8c4b4Smrg      ;;
395109885543Smrg
39522ec8c4b4Smrg    *)
39532ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
39542ec8c4b4Smrg      ;;
39552ec8c4b4Smrg    esac
39562ec8c4b4Smrg  else
39572ec8c4b4Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
39582ec8c4b4Smrg    case $host_os in
39592ec8c4b4Smrg    aix*)
39602ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
39612ec8c4b4Smrg      if test "$host_cpu" = ia64; then
39622ec8c4b4Smrg	# AIX 5 now supports IA64 processor
39632ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
39642ec8c4b4Smrg      else
39652ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
39662ec8c4b4Smrg      fi
39672ec8c4b4Smrg      ;;
396809885543Smrg
39692ec8c4b4Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
39702ec8c4b4Smrg      # This hack is so that the source file can tell whether it is being
39712ec8c4b4Smrg      # built for inclusion in a dll (and should export symbols for example).
39722ec8c4b4Smrg      m4_if([$1], [GCJ], [],
39732ec8c4b4Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
39742ec8c4b4Smrg      ;;
397509885543Smrg
39762ec8c4b4Smrg    hpux9* | hpux10* | hpux11*)
39772ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
39782ec8c4b4Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
39792ec8c4b4Smrg      # not for PA HP-UX.
39802ec8c4b4Smrg      case $host_cpu in
39812ec8c4b4Smrg      hppa*64*|ia64*)
39822ec8c4b4Smrg	# +Z the default
39832ec8c4b4Smrg	;;
39842ec8c4b4Smrg      *)
39852ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
39862ec8c4b4Smrg	;;
39872ec8c4b4Smrg      esac
39882ec8c4b4Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
39892ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
39902ec8c4b4Smrg      ;;
399109885543Smrg
39922ec8c4b4Smrg    irix5* | irix6* | nonstopux*)
39932ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
39942ec8c4b4Smrg      # PIC (with -KPIC) is the default.
39952ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
39962ec8c4b4Smrg      ;;
399709885543Smrg
39982ec8c4b4Smrg    linux* | k*bsd*-gnu)
39992ec8c4b4Smrg      case $cc_basename in
40002ec8c4b4Smrg      # old Intel for x86_64 which still supported -KPIC.
40012ec8c4b4Smrg      ecc*)
40022ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40032ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
40042ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
40052ec8c4b4Smrg        ;;
40062ec8c4b4Smrg      # icc used to be incompatible with GCC.
40072ec8c4b4Smrg      # ICC 10 doesn't accept -KPIC any more.
40082ec8c4b4Smrg      icc* | ifort*)
40092ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40102ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
40112ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
40122ec8c4b4Smrg        ;;
40132ec8c4b4Smrg      # Lahey Fortran 8.1.
40142ec8c4b4Smrg      lf95*)
40152ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40162ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
40172ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
40182ec8c4b4Smrg	;;
40192ec8c4b4Smrg      pgcc* | pgf77* | pgf90* | pgf95*)
40202ec8c4b4Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
40212ec8c4b4Smrg	# which looks to be a dead project)
40222ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40232ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
40242ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
40252ec8c4b4Smrg        ;;
40262ec8c4b4Smrg      ccc*)
40272ec8c4b4Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40282ec8c4b4Smrg        # All Alpha code is PIC.
40292ec8c4b4Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
40302ec8c4b4Smrg        ;;
40312ec8c4b4Smrg      xl*)
40322ec8c4b4Smrg	# IBM XL C 8.0/Fortran 10.1 on PPC
40332ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40342ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
40352ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
40362ec8c4b4Smrg	;;
40372ec8c4b4Smrg      *)
40382ec8c4b4Smrg	case `$CC -V 2>&1 | sed 5q` in
40392ec8c4b4Smrg	*Sun\ C*)
40402ec8c4b4Smrg	  # Sun C 5.9
40412ec8c4b4Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
40422ec8c4b4Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
40432ec8c4b4Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40442ec8c4b4Smrg	  ;;
40452ec8c4b4Smrg	*Sun\ F*)
40462ec8c4b4Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
40472ec8c4b4Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
40482ec8c4b4Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
40492ec8c4b4Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
40502ec8c4b4Smrg	  ;;
40512ec8c4b4Smrg	esac
40522ec8c4b4Smrg	;;
40532ec8c4b4Smrg      esac
40542ec8c4b4Smrg      ;;
405509885543Smrg
40562ec8c4b4Smrg    newsos6)
40572ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
40582ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
40592ec8c4b4Smrg      ;;
40607104f784Smrg
40612ec8c4b4Smrg    *nto* | *qnx*)
40622ec8c4b4Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
40632ec8c4b4Smrg      # it will coredump.
40642ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
40652ec8c4b4Smrg      ;;
406609885543Smrg
40672ec8c4b4Smrg    osf3* | osf4* | osf5*)
40682ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40692ec8c4b4Smrg      # All OSF/1 code is PIC.
40702ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
40717104f784Smrg      ;;
40727104f784Smrg
40732ec8c4b4Smrg    rdos*)
40742ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
40757104f784Smrg      ;;
40767104f784Smrg
40772ec8c4b4Smrg    solaris*)
40782ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
40792ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
40802ec8c4b4Smrg      case $cc_basename in
40812ec8c4b4Smrg      f77* | f90* | f95*)
40822ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
40832ec8c4b4Smrg      *)
40842ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
40852ec8c4b4Smrg      esac
40862ec8c4b4Smrg      ;;
408709885543Smrg
40882ec8c4b4Smrg    sunos4*)
40892ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
40902ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
40912ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
40922ec8c4b4Smrg      ;;
409309885543Smrg
40942ec8c4b4Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
40952ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40962ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
40972ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
40982ec8c4b4Smrg      ;;
409909885543Smrg
41002ec8c4b4Smrg    sysv4*MP*)
41012ec8c4b4Smrg      if test -d /usr/nec ;then
41022ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
41032ec8c4b4Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
41042ec8c4b4Smrg      fi
41052ec8c4b4Smrg      ;;
410609885543Smrg
41072ec8c4b4Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
41082ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
41092ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
41102ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
41112ec8c4b4Smrg      ;;
411209885543Smrg
41132ec8c4b4Smrg    unicos*)
41142ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
41152ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
41162ec8c4b4Smrg      ;;
411709885543Smrg
41182ec8c4b4Smrg    uts4*)
41192ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
41202ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
41212ec8c4b4Smrg      ;;
412209885543Smrg
41232ec8c4b4Smrg    *)
41242ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
41252ec8c4b4Smrg      ;;
41262ec8c4b4Smrg    esac
41272ec8c4b4Smrg  fi
41282ec8c4b4Smrg])
41292ec8c4b4Smrgcase $host_os in
41302ec8c4b4Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
41312ec8c4b4Smrg  *djgpp*)
41322ec8c4b4Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
41332ec8c4b4Smrg    ;;
41342ec8c4b4Smrg  *)
41352ec8c4b4Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
41362ec8c4b4Smrg    ;;
41372ec8c4b4Smrgesac
41382ec8c4b4SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
41392ec8c4b4Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
41402ec8c4b4Smrg	[How to pass a linker flag through the compiler])
414109885543Smrg
41422ec8c4b4Smrg#
41432ec8c4b4Smrg# Check to make sure the PIC flag actually works.
41442ec8c4b4Smrg#
41452ec8c4b4Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
41462ec8c4b4Smrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
41472ec8c4b4Smrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
41482ec8c4b4Smrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
41492ec8c4b4Smrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
41502ec8c4b4Smrg     "" | " "*) ;;
41512ec8c4b4Smrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
41522ec8c4b4Smrg     esac],
41532ec8c4b4Smrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
41542ec8c4b4Smrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
41552ec8c4b4Smrgfi
41562ec8c4b4Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
41572ec8c4b4Smrg	[Additional compiler flags for building library objects])
415809885543Smrg
41592ec8c4b4Smrg#
41602ec8c4b4Smrg# Check to make sure the static flag actually works.
41612ec8c4b4Smrg#
41622ec8c4b4Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
41632ec8c4b4Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
41642ec8c4b4Smrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
41652ec8c4b4Smrg  $lt_tmp_static_flag,
41662ec8c4b4Smrg  [],
41672ec8c4b4Smrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
41682ec8c4b4Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
41692ec8c4b4Smrg	[Compiler flag to prevent dynamic linking])
41702ec8c4b4Smrg])# _LT_COMPILER_PIC
417109885543Smrg
417209885543Smrg
41732ec8c4b4Smrg# _LT_LINKER_SHLIBS([TAGNAME])
41742ec8c4b4Smrg# ----------------------------
41752ec8c4b4Smrg# See if the linker supports building shared libraries.
41762ec8c4b4Smrgm4_defun([_LT_LINKER_SHLIBS],
41772ec8c4b4Smrg[AC_REQUIRE([LT_PATH_LD])dnl
41782ec8c4b4SmrgAC_REQUIRE([LT_PATH_NM])dnl
41792ec8c4b4Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
41802ec8c4b4Smrgm4_require([_LT_DECL_EGREP])dnl
41812ec8c4b4Smrgm4_require([_LT_DECL_SED])dnl
41822ec8c4b4Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
41832ec8c4b4Smrgm4_require([_LT_TAG_COMPILER])dnl
41842ec8c4b4SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
41852ec8c4b4Smrgm4_if([$1], [CXX], [
41862ec8c4b4Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
41872ec8c4b4Smrg  case $host_os in
41882ec8c4b4Smrg  aix[[4-9]]*)
41892ec8c4b4Smrg    # If we're using GNU nm, then we don't want the "-C" option.
41902ec8c4b4Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
41912ec8c4b4Smrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
41922ec8c4b4Smrg      _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'
41932ec8c4b4Smrg    else
41942ec8c4b4Smrg      _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'
41952ec8c4b4Smrg    fi
41962ec8c4b4Smrg    ;;
41972ec8c4b4Smrg  pw32*)
41982ec8c4b4Smrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
419909885543Smrg  ;;
42002ec8c4b4Smrg  cygwin* | mingw* | cegcc*)
42012ec8c4b4Smrg    _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'
420209885543Smrg  ;;
42032ec8c4b4Smrg  *)
42042ec8c4b4Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
42052ec8c4b4Smrg  ;;
42062ec8c4b4Smrg  esac
42072ec8c4b4Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
42082ec8c4b4Smrg], [
42092ec8c4b4Smrg  runpath_var=
42102ec8c4b4Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=
42112ec8c4b4Smrg  _LT_TAGVAR(always_export_symbols, $1)=no
42122ec8c4b4Smrg  _LT_TAGVAR(archive_cmds, $1)=
42132ec8c4b4Smrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
42142ec8c4b4Smrg  _LT_TAGVAR(compiler_needs_object, $1)=no
42152ec8c4b4Smrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
42162ec8c4b4Smrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
42172ec8c4b4Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
42182ec8c4b4Smrg  _LT_TAGVAR(hardcode_automatic, $1)=no
42192ec8c4b4Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
42202ec8c4b4Smrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
42212ec8c4b4Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
42222ec8c4b4Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
42232ec8c4b4Smrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
42242ec8c4b4Smrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
42252ec8c4b4Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
42262ec8c4b4Smrg  _LT_TAGVAR(inherit_rpath, $1)=no
42272ec8c4b4Smrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
42282ec8c4b4Smrg  _LT_TAGVAR(module_cmds, $1)=
42292ec8c4b4Smrg  _LT_TAGVAR(module_expsym_cmds, $1)=
42302ec8c4b4Smrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
42312ec8c4b4Smrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
42322ec8c4b4Smrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
42332ec8c4b4Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
42342ec8c4b4Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
42352ec8c4b4Smrg  # included in the symbol list
42362ec8c4b4Smrg  _LT_TAGVAR(include_expsyms, $1)=
42372ec8c4b4Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
42382ec8c4b4Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
42392ec8c4b4Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
42402ec8c4b4Smrg  # as well as any symbol that contains `d'.
42412ec8c4b4Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
42422ec8c4b4Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
42432ec8c4b4Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
42442ec8c4b4Smrg  # the symbol is explicitly referenced.  Since portable code cannot
42452ec8c4b4Smrg  # rely on this symbol name, it's probably fine to never include it in
42462ec8c4b4Smrg  # preloaded symbol tables.
42472ec8c4b4Smrg  # Exclude shared library initialization/finalization symbols.
42482ec8c4b4Smrgdnl Note also adjust exclude_expsyms for C++ above.
42492ec8c4b4Smrg  extract_expsyms_cmds=
425009885543Smrg
42512ec8c4b4Smrg  case $host_os in
42522ec8c4b4Smrg  cygwin* | mingw* | pw32* | cegcc*)
42532ec8c4b4Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
42542ec8c4b4Smrg    # When not using gcc, we currently assume that we are using
42552ec8c4b4Smrg    # Microsoft Visual C++.
42562ec8c4b4Smrg    if test "$GCC" != yes; then
42572ec8c4b4Smrg      with_gnu_ld=no
42582ec8c4b4Smrg    fi
42592ec8c4b4Smrg    ;;
42602ec8c4b4Smrg  interix*)
42612ec8c4b4Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
42622ec8c4b4Smrg    with_gnu_ld=yes
42632ec8c4b4Smrg    ;;
42642ec8c4b4Smrg  openbsd*)
42652ec8c4b4Smrg    with_gnu_ld=no
42662ec8c4b4Smrg    ;;
42672ec8c4b4Smrg  esac
426809885543Smrg
42692ec8c4b4Smrg  _LT_TAGVAR(ld_shlibs, $1)=yes
42702ec8c4b4Smrg  if test "$with_gnu_ld" = yes; then
42712ec8c4b4Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
42722ec8c4b4Smrg    wlarc='${wl}'
427309885543Smrg
42742ec8c4b4Smrg    # Set some defaults for GNU ld with shared library support. These
42752ec8c4b4Smrg    # are reset later if shared libraries are not supported. Putting them
42762ec8c4b4Smrg    # here allows them to be overridden if necessary.
42772ec8c4b4Smrg    runpath_var=LD_RUN_PATH
42782ec8c4b4Smrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
42792ec8c4b4Smrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
42802ec8c4b4Smrg    # ancient GNU ld didn't support --whole-archive et. al.
42812ec8c4b4Smrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
42822ec8c4b4Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
42832ec8c4b4Smrg    else
42842ec8c4b4Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
42852ec8c4b4Smrg    fi
42862ec8c4b4Smrg    supports_anon_versioning=no
42872ec8c4b4Smrg    case `$LD -v 2>&1` in
42882ec8c4b4Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
42892ec8c4b4Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
42902ec8c4b4Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
42912ec8c4b4Smrg      *\ 2.11.*) ;; # other 2.11 versions
42922ec8c4b4Smrg      *) supports_anon_versioning=yes ;;
42932ec8c4b4Smrg    esac
429409885543Smrg
42952ec8c4b4Smrg    # See if GNU ld supports shared libraries.
42962ec8c4b4Smrg    case $host_os in
42972ec8c4b4Smrg    aix[[3-9]]*)
42982ec8c4b4Smrg      # On AIX/PPC, the GNU linker is very broken
42992ec8c4b4Smrg      if test "$host_cpu" != ia64; then
43002ec8c4b4Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
43012ec8c4b4Smrg	cat <<_LT_EOF 1>&2
430209885543Smrg
43032ec8c4b4Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
43042ec8c4b4Smrg*** to be unable to reliably create shared libraries on AIX.
43052ec8c4b4Smrg*** Therefore, libtool is disabling shared libraries support.  If you
43062ec8c4b4Smrg*** really care for shared libraries, you may want to modify your PATH
43072ec8c4b4Smrg*** so that a non-GNU linker is found, and then restart.
430809885543Smrg
43092ec8c4b4Smrg_LT_EOF
43102ec8c4b4Smrg      fi
43112ec8c4b4Smrg      ;;
431209885543Smrg
43132ec8c4b4Smrg    amigaos*)
43142ec8c4b4Smrg      case $host_cpu in
43152ec8c4b4Smrg      powerpc)
43162ec8c4b4Smrg            # see comment about AmigaOS4 .so support
43172ec8c4b4Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
43182ec8c4b4Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
43192ec8c4b4Smrg        ;;
43202ec8c4b4Smrg      m68k)
43212ec8c4b4Smrg            _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)'
43222ec8c4b4Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
43232ec8c4b4Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
43242ec8c4b4Smrg        ;;
43252ec8c4b4Smrg      esac
43262ec8c4b4Smrg      ;;
432709885543Smrg
43282ec8c4b4Smrg    beos*)
43292ec8c4b4Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
43302ec8c4b4Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
43312ec8c4b4Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
43322ec8c4b4Smrg	# support --undefined.  This deserves some investigation.  FIXME
43332ec8c4b4Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
43342ec8c4b4Smrg      else
43352ec8c4b4Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
43362ec8c4b4Smrg      fi
43372ec8c4b4Smrg      ;;
433809885543Smrg
43392ec8c4b4Smrg    cygwin* | mingw* | pw32* | cegcc*)
43402ec8c4b4Smrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
43412ec8c4b4Smrg      # as there is no search path for DLLs.
43422ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
43432ec8c4b4Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
43442ec8c4b4Smrg      _LT_TAGVAR(always_export_symbols, $1)=no
43452ec8c4b4Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
43462ec8c4b4Smrg      _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'
43472ec8c4b4Smrg
43482ec8c4b4Smrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
43492ec8c4b4Smrg        _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'
43502ec8c4b4Smrg	# If the export-symbols file already is a .def file (1st line
43512ec8c4b4Smrg	# is EXPORTS), use it as is; otherwise, prepend...
43522ec8c4b4Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
43532ec8c4b4Smrg	  cp $export_symbols $output_objdir/$soname.def;
43542ec8c4b4Smrg	else
43552ec8c4b4Smrg	  echo EXPORTS > $output_objdir/$soname.def;
43562ec8c4b4Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
43572ec8c4b4Smrg	fi~
43582ec8c4b4Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
43592ec8c4b4Smrg      else
43602ec8c4b4Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
43612ec8c4b4Smrg      fi
43622ec8c4b4Smrg      ;;
436309885543Smrg
43642ec8c4b4Smrg    interix[[3-9]]*)
43652ec8c4b4Smrg      _LT_TAGVAR(hardcode_direct, $1)=no
43662ec8c4b4Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
43672ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
43682ec8c4b4Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
43692ec8c4b4Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
43702ec8c4b4Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
43712ec8c4b4Smrg      # default) and relocated if they conflict, which is a slow very memory
43722ec8c4b4Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
43732ec8c4b4Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
43742ec8c4b4Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
43752ec8c4b4Smrg      _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'
43762ec8c4b4Smrg      _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'
43772ec8c4b4Smrg      ;;
437809885543Smrg
43792ec8c4b4Smrg    gnu* | linux* | tpf* | k*bsd*-gnu)
43802ec8c4b4Smrg      tmp_diet=no
43812ec8c4b4Smrg      if test "$host_os" = linux-dietlibc; then
43822ec8c4b4Smrg	case $cc_basename in
43832ec8c4b4Smrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
43842ec8c4b4Smrg	esac
43852ec8c4b4Smrg      fi
43862ec8c4b4Smrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
43872ec8c4b4Smrg	 && test "$tmp_diet" = no
43882ec8c4b4Smrg      then
43892ec8c4b4Smrg	tmp_addflag=
43902ec8c4b4Smrg	tmp_sharedflag='-shared'
43912ec8c4b4Smrg	case $cc_basename,$host_cpu in
43922ec8c4b4Smrg        pgcc*)				# Portland Group C compiler
43932ec8c4b4Smrg	  _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'
43942ec8c4b4Smrg	  tmp_addflag=' $pic_flag'
43952ec8c4b4Smrg	  ;;
43962ec8c4b4Smrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
43972ec8c4b4Smrg	  _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'
43982ec8c4b4Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
43992ec8c4b4Smrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
44002ec8c4b4Smrg	  tmp_addflag=' -i_dynamic' ;;
44012ec8c4b4Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
44022ec8c4b4Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
44032ec8c4b4Smrg	ifc* | ifort*)			# Intel Fortran compiler
44042ec8c4b4Smrg	  tmp_addflag=' -nofor_main' ;;
44052ec8c4b4Smrg	lf95*)				# Lahey Fortran 8.1
44062ec8c4b4Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
44072ec8c4b4Smrg	  tmp_sharedflag='--shared' ;;
44082ec8c4b4Smrg	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
44092ec8c4b4Smrg	  tmp_sharedflag='-qmkshrobj'
44102ec8c4b4Smrg	  tmp_addflag= ;;
44112ec8c4b4Smrg	esac
44122ec8c4b4Smrg	case `$CC -V 2>&1 | sed 5q` in
44132ec8c4b4Smrg	*Sun\ C*)			# Sun C 5.9
44142ec8c4b4Smrg	  _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'
44152ec8c4b4Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
44162ec8c4b4Smrg	  tmp_sharedflag='-G' ;;
44172ec8c4b4Smrg	*Sun\ F*)			# Sun Fortran 8.3
44182ec8c4b4Smrg	  tmp_sharedflag='-G' ;;
44192ec8c4b4Smrg	esac
44202ec8c4b4Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
442109885543Smrg
44222ec8c4b4Smrg        if test "x$supports_anon_versioning" = xyes; then
44232ec8c4b4Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
44242ec8c4b4Smrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
44252ec8c4b4Smrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
44262ec8c4b4Smrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
44272ec8c4b4Smrg        fi
442809885543Smrg
44292ec8c4b4Smrg	case $cc_basename in
44302ec8c4b4Smrg	xlf*)
44312ec8c4b4Smrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
44322ec8c4b4Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
44332ec8c4b4Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
44342ec8c4b4Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
44352ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
44362ec8c4b4Smrg	  if test "x$supports_anon_versioning" = xyes; then
44372ec8c4b4Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
44382ec8c4b4Smrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
44392ec8c4b4Smrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
44402ec8c4b4Smrg	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
44412ec8c4b4Smrg	  fi
44422ec8c4b4Smrg	  ;;
44432ec8c4b4Smrg	esac
44442ec8c4b4Smrg      else
44452ec8c4b4Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
44462ec8c4b4Smrg      fi
44472ec8c4b4Smrg      ;;
444809885543Smrg
44492ec8c4b4Smrg    netbsd*)
44502ec8c4b4Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
44512ec8c4b4Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
44522ec8c4b4Smrg	wlarc=
44532ec8c4b4Smrg      else
44542ec8c4b4Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
44552ec8c4b4Smrg	_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'
44562ec8c4b4Smrg      fi
44572ec8c4b4Smrg      ;;
445809885543Smrg
44592ec8c4b4Smrg    solaris*)
44602ec8c4b4Smrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
44612ec8c4b4Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
44622ec8c4b4Smrg	cat <<_LT_EOF 1>&2
446309885543Smrg
44642ec8c4b4Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
44652ec8c4b4Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
44662ec8c4b4Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
44672ec8c4b4Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
44682ec8c4b4Smrg*** your PATH or compiler configuration so that the native linker is
44692ec8c4b4Smrg*** used, and then restart.
447009885543Smrg
44712ec8c4b4Smrg_LT_EOF
44722ec8c4b4Smrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
44732ec8c4b4Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
44742ec8c4b4Smrg	_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'
44752ec8c4b4Smrg      else
44762ec8c4b4Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
44772ec8c4b4Smrg      fi
44782ec8c4b4Smrg      ;;
447909885543Smrg
44802ec8c4b4Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
44812ec8c4b4Smrg      case `$LD -v 2>&1` in
44822ec8c4b4Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
44832ec8c4b4Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
44842ec8c4b4Smrg	cat <<_LT_EOF 1>&2
448509885543Smrg
44862ec8c4b4Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
44872ec8c4b4Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
44882ec8c4b4Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
44892ec8c4b4Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
44902ec8c4b4Smrg*** your PATH or compiler configuration so that the native linker is
44912ec8c4b4Smrg*** used, and then restart.
449209885543Smrg
44932ec8c4b4Smrg_LT_EOF
44942ec8c4b4Smrg	;;
44952ec8c4b4Smrg	*)
44962ec8c4b4Smrg	  # For security reasons, it is highly recommended that you always
44972ec8c4b4Smrg	  # use absolute paths for naming shared libraries, and exclude the
44982ec8c4b4Smrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
44992ec8c4b4Smrg	  # requires that you compile everything twice, which is a pain.
45002ec8c4b4Smrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
45012ec8c4b4Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
45022ec8c4b4Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
45032ec8c4b4Smrg	    _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'
45042ec8c4b4Smrg	  else
45052ec8c4b4Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
45062ec8c4b4Smrg	  fi
45072ec8c4b4Smrg	;;
45082ec8c4b4Smrg      esac
45092ec8c4b4Smrg      ;;
451009885543Smrg
45112ec8c4b4Smrg    sunos4*)
45122ec8c4b4Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
45132ec8c4b4Smrg      wlarc=
45142ec8c4b4Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
45152ec8c4b4Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
451609885543Smrg      ;;
45172ec8c4b4Smrg
451809885543Smrg    *)
45192ec8c4b4Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
45202ec8c4b4Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
45212ec8c4b4Smrg	_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'
45222ec8c4b4Smrg      else
45232ec8c4b4Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
45242ec8c4b4Smrg      fi
452509885543Smrg      ;;
452609885543Smrg    esac
452709885543Smrg
45282ec8c4b4Smrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
45292ec8c4b4Smrg      runpath_var=
45302ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
45312ec8c4b4Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
45322ec8c4b4Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
45332ec8c4b4Smrg    fi
45342ec8c4b4Smrg  else
45352ec8c4b4Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
45362ec8c4b4Smrg    case $host_os in
45372ec8c4b4Smrg    aix3*)
45382ec8c4b4Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
45392ec8c4b4Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
45402ec8c4b4Smrg      _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'
45412ec8c4b4Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
45422ec8c4b4Smrg      # are no directories specified by -L.
45432ec8c4b4Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
45442ec8c4b4Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
45452ec8c4b4Smrg	# Neither direct hardcoding nor static linking is supported with a
45462ec8c4b4Smrg	# broken collect2.
45472ec8c4b4Smrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
45482ec8c4b4Smrg      fi
45492ec8c4b4Smrg      ;;
455009885543Smrg
45512ec8c4b4Smrg    aix[[4-9]]*)
45522ec8c4b4Smrg      if test "$host_cpu" = ia64; then
45532ec8c4b4Smrg	# On IA64, the linker does run time linking by default, so we don't
45542ec8c4b4Smrg	# have to do anything special.
45552ec8c4b4Smrg	aix_use_runtimelinking=no
45562ec8c4b4Smrg	exp_sym_flag='-Bexport'
45572ec8c4b4Smrg	no_entry_flag=""
45582ec8c4b4Smrg      else
45592ec8c4b4Smrg	# If we're using GNU nm, then we don't want the "-C" option.
45602ec8c4b4Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
45612ec8c4b4Smrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
45622ec8c4b4Smrg	  _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'
45632ec8c4b4Smrg	else
45642ec8c4b4Smrg	  _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'
45652ec8c4b4Smrg	fi
45662ec8c4b4Smrg	aix_use_runtimelinking=no
456709885543Smrg
45682ec8c4b4Smrg	# Test if we are trying to use run time linking or normal
45692ec8c4b4Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
45702ec8c4b4Smrg	# need to do runtime linking.
45712ec8c4b4Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
45722ec8c4b4Smrg	  for ld_flag in $LDFLAGS; do
45732ec8c4b4Smrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
45742ec8c4b4Smrg	    aix_use_runtimelinking=yes
45752ec8c4b4Smrg	    break
45762ec8c4b4Smrg	  fi
45772ec8c4b4Smrg	  done
45782ec8c4b4Smrg	  ;;
45792ec8c4b4Smrg	esac
458009885543Smrg
45812ec8c4b4Smrg	exp_sym_flag='-bexport'
45822ec8c4b4Smrg	no_entry_flag='-bnoentry'
45832ec8c4b4Smrg      fi
458409885543Smrg
45852ec8c4b4Smrg      # When large executables or shared objects are built, AIX ld can
45862ec8c4b4Smrg      # have problems creating the table of contents.  If linking a library
45872ec8c4b4Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
45882ec8c4b4Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
45892ec8c4b4Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
459009885543Smrg
45912ec8c4b4Smrg      _LT_TAGVAR(archive_cmds, $1)=''
45922ec8c4b4Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
45932ec8c4b4Smrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
45942ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
45952ec8c4b4Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
45962ec8c4b4Smrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
459709885543Smrg
45982ec8c4b4Smrg      if test "$GCC" = yes; then
45992ec8c4b4Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
46002ec8c4b4Smrg	# We only want to do this on AIX 4.2 and lower, the check
46012ec8c4b4Smrg	# below for broken collect2 doesn't work under 4.3+
46022ec8c4b4Smrg	  collect2name=`${CC} -print-prog-name=collect2`
46032ec8c4b4Smrg	  if test -f "$collect2name" &&
46042ec8c4b4Smrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
46052ec8c4b4Smrg	  then
46062ec8c4b4Smrg	  # We have reworked collect2
46072ec8c4b4Smrg	  :
46082ec8c4b4Smrg	  else
46092ec8c4b4Smrg	  # We have old collect2
46102ec8c4b4Smrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
46112ec8c4b4Smrg	  # It fails to find uninstalled libraries when the uninstalled
46122ec8c4b4Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
46132ec8c4b4Smrg	  # to unsupported forces relinking
46142ec8c4b4Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
46152ec8c4b4Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
46162ec8c4b4Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
46172ec8c4b4Smrg	  fi
46182ec8c4b4Smrg	  ;;
46192ec8c4b4Smrg	esac
46202ec8c4b4Smrg	shared_flag='-shared'
46212ec8c4b4Smrg	if test "$aix_use_runtimelinking" = yes; then
46222ec8c4b4Smrg	  shared_flag="$shared_flag "'${wl}-G'
46232ec8c4b4Smrg	fi
46242ec8c4b4Smrg      else
46252ec8c4b4Smrg	# not using gcc
46262ec8c4b4Smrg	if test "$host_cpu" = ia64; then
46272ec8c4b4Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
46282ec8c4b4Smrg	# chokes on -Wl,-G. The following line is correct:
46292ec8c4b4Smrg	  shared_flag='-G'
46302ec8c4b4Smrg	else
46312ec8c4b4Smrg	  if test "$aix_use_runtimelinking" = yes; then
46322ec8c4b4Smrg	    shared_flag='${wl}-G'
46332ec8c4b4Smrg	  else
46342ec8c4b4Smrg	    shared_flag='${wl}-bM:SRE'
46352ec8c4b4Smrg	  fi
46362ec8c4b4Smrg	fi
46372ec8c4b4Smrg      fi
463809885543Smrg
46392ec8c4b4Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
46402ec8c4b4Smrg      # It seems that -bexpall does not export symbols beginning with
46412ec8c4b4Smrg      # underscore (_), so it is better to generate a list of symbols to export.
46422ec8c4b4Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
46432ec8c4b4Smrg      if test "$aix_use_runtimelinking" = yes; then
46442ec8c4b4Smrg	# Warning - without using the other runtime loading flags (-brtl),
46452ec8c4b4Smrg	# -berok will link without error, but may produce a broken library.
46462ec8c4b4Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
46472ec8c4b4Smrg        # Determine the default libpath from the value encoded in an
46482ec8c4b4Smrg        # empty executable.
46492ec8c4b4Smrg        _LT_SYS_MODULE_PATH_AIX
46502ec8c4b4Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
46512ec8c4b4Smrg        _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"
46522ec8c4b4Smrg      else
46532ec8c4b4Smrg	if test "$host_cpu" = ia64; then
46542ec8c4b4Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
46552ec8c4b4Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
46562ec8c4b4Smrg	  _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"
46572ec8c4b4Smrg	else
46582ec8c4b4Smrg	 # Determine the default libpath from the value encoded in an
46592ec8c4b4Smrg	 # empty executable.
46602ec8c4b4Smrg	 _LT_SYS_MODULE_PATH_AIX
46612ec8c4b4Smrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
46622ec8c4b4Smrg	  # Warning - without using the other run time loading flags,
46632ec8c4b4Smrg	  # -berok will link without error, but may produce a broken library.
46642ec8c4b4Smrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
46652ec8c4b4Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
46662ec8c4b4Smrg	  # Exported symbols can be pulled into shared objects from archives
46672ec8c4b4Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
46682ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
46692ec8c4b4Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
46702ec8c4b4Smrg	  _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'
46712ec8c4b4Smrg	fi
46722ec8c4b4Smrg      fi
46732ec8c4b4Smrg      ;;
467409885543Smrg
46752ec8c4b4Smrg    amigaos*)
46762ec8c4b4Smrg      case $host_cpu in
46772ec8c4b4Smrg      powerpc)
46782ec8c4b4Smrg            # see comment about AmigaOS4 .so support
46792ec8c4b4Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
46802ec8c4b4Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
46812ec8c4b4Smrg        ;;
46822ec8c4b4Smrg      m68k)
46832ec8c4b4Smrg            _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)'
46842ec8c4b4Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
46852ec8c4b4Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
46862ec8c4b4Smrg        ;;
46872ec8c4b4Smrg      esac
46882ec8c4b4Smrg      ;;
468909885543Smrg
46902ec8c4b4Smrg    bsdi[[45]]*)
46912ec8c4b4Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
46922ec8c4b4Smrg      ;;
469309885543Smrg
46942ec8c4b4Smrg    cygwin* | mingw* | pw32* | cegcc*)
46952ec8c4b4Smrg      # When not using gcc, we currently assume that we are using
46962ec8c4b4Smrg      # Microsoft Visual C++.
46972ec8c4b4Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
46982ec8c4b4Smrg      # no search path for DLLs.
46992ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
47002ec8c4b4Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
47012ec8c4b4Smrg      # Tell ltmain to make .lib files, not .a files.
47022ec8c4b4Smrg      libext=lib
47032ec8c4b4Smrg      # Tell ltmain to make .dll files, not .so files.
47042ec8c4b4Smrg      shrext_cmds=".dll"
47052ec8c4b4Smrg      # FIXME: Setting linknames here is a bad hack.
47062ec8c4b4Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
47072ec8c4b4Smrg      # The linker will automatically build a .lib file if we build a DLL.
47082ec8c4b4Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
47092ec8c4b4Smrg      # FIXME: Should let the user specify the lib program.
47102ec8c4b4Smrg      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
47112ec8c4b4Smrg      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
47122ec8c4b4Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
47132ec8c4b4Smrg      ;;
471409885543Smrg
47152ec8c4b4Smrg    darwin* | rhapsody*)
47162ec8c4b4Smrg      _LT_DARWIN_LINKER_FEATURES($1)
47172ec8c4b4Smrg      ;;
471809885543Smrg
47192ec8c4b4Smrg    dgux*)
47202ec8c4b4Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
47212ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
47222ec8c4b4Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
47232ec8c4b4Smrg      ;;
472409885543Smrg
47252ec8c4b4Smrg    freebsd1*)
47262ec8c4b4Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
47272ec8c4b4Smrg      ;;
472809885543Smrg
47292ec8c4b4Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
47302ec8c4b4Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
47312ec8c4b4Smrg    # does not break anything, and helps significantly (at the cost of a little
47322ec8c4b4Smrg    # extra space).
47332ec8c4b4Smrg    freebsd2.2*)
47342ec8c4b4Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
47352ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
47362ec8c4b4Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
47372ec8c4b4Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
47382ec8c4b4Smrg      ;;
473909885543Smrg
47402ec8c4b4Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
47412ec8c4b4Smrg    freebsd2*)
47422ec8c4b4Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
47432ec8c4b4Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
47442ec8c4b4Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
47452ec8c4b4Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
47462ec8c4b4Smrg      ;;
474709885543Smrg
47482ec8c4b4Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
47492ec8c4b4Smrg    freebsd* | dragonfly*)
47502ec8c4b4Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
47512ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
47522ec8c4b4Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
47532ec8c4b4Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
47542ec8c4b4Smrg      ;;
475509885543Smrg
47562ec8c4b4Smrg    hpux9*)
47572ec8c4b4Smrg      if test "$GCC" = yes; then
47582ec8c4b4Smrg	_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'
47592ec8c4b4Smrg      else
47602ec8c4b4Smrg	_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'
47612ec8c4b4Smrg      fi
47622ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
47632ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
47642ec8c4b4Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
476509885543Smrg
47662ec8c4b4Smrg      # hardcode_minus_L: Not really in the search PATH,
47672ec8c4b4Smrg      # but as the default location of the library.
47682ec8c4b4Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
47692ec8c4b4Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
47702ec8c4b4Smrg      ;;
477109885543Smrg
47722ec8c4b4Smrg    hpux10*)
47732ec8c4b4Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
47742ec8c4b4Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
47752ec8c4b4Smrg      else
47762ec8c4b4Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
47772ec8c4b4Smrg      fi
47782ec8c4b4Smrg      if test "$with_gnu_ld" = no; then
47792ec8c4b4Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
47802ec8c4b4Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
47812ec8c4b4Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
47822ec8c4b4Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
47832ec8c4b4Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
47842ec8c4b4Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
47852ec8c4b4Smrg	# hardcode_minus_L: Not really in the search PATH,
47862ec8c4b4Smrg	# but as the default location of the library.
47872ec8c4b4Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
47882ec8c4b4Smrg      fi
47892ec8c4b4Smrg      ;;
479009885543Smrg
47912ec8c4b4Smrg    hpux11*)
47922ec8c4b4Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
47932ec8c4b4Smrg	case $host_cpu in
47942ec8c4b4Smrg	hppa*64*)
47952ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
47962ec8c4b4Smrg	  ;;
47972ec8c4b4Smrg	ia64*)
47982ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
47992ec8c4b4Smrg	  ;;
48002ec8c4b4Smrg	*)
48012ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
48022ec8c4b4Smrg	  ;;
48032ec8c4b4Smrg	esac
48042ec8c4b4Smrg      else
48052ec8c4b4Smrg	case $host_cpu in
48062ec8c4b4Smrg	hppa*64*)
48072ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
48082ec8c4b4Smrg	  ;;
48092ec8c4b4Smrg	ia64*)
48102ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
48112ec8c4b4Smrg	  ;;
48122ec8c4b4Smrg	*)
48132ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
48142ec8c4b4Smrg	  ;;
48152ec8c4b4Smrg	esac
48162ec8c4b4Smrg      fi
48172ec8c4b4Smrg      if test "$with_gnu_ld" = no; then
48182ec8c4b4Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
48192ec8c4b4Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
482009885543Smrg
48212ec8c4b4Smrg	case $host_cpu in
48222ec8c4b4Smrg	hppa*64*|ia64*)
48232ec8c4b4Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
48242ec8c4b4Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
48252ec8c4b4Smrg	  ;;
48262ec8c4b4Smrg	*)
48272ec8c4b4Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
48282ec8c4b4Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
48292ec8c4b4Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
483009885543Smrg
48312ec8c4b4Smrg	  # hardcode_minus_L: Not really in the search PATH,
48322ec8c4b4Smrg	  # but as the default location of the library.
48332ec8c4b4Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
48342ec8c4b4Smrg	  ;;
48352ec8c4b4Smrg	esac
48362ec8c4b4Smrg      fi
48372ec8c4b4Smrg      ;;
483809885543Smrg
48392ec8c4b4Smrg    irix5* | irix6* | nonstopux*)
48402ec8c4b4Smrg      if test "$GCC" = yes; then
48412ec8c4b4Smrg	_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'
48422ec8c4b4Smrg	# Try to use the -exported_symbol ld option, if it does not
48432ec8c4b4Smrg	# work, assume that -exports_file does not work either and
48442ec8c4b4Smrg	# implicitly export all symbols.
48452ec8c4b4Smrg        save_LDFLAGS="$LDFLAGS"
48462ec8c4b4Smrg        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
48472ec8c4b4Smrg        AC_LINK_IFELSE(int foo(void) {},
48482ec8c4b4Smrg          _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'
48492ec8c4b4Smrg        )
48502ec8c4b4Smrg        LDFLAGS="$save_LDFLAGS"
48512ec8c4b4Smrg      else
48522ec8c4b4Smrg	_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'
48532ec8c4b4Smrg	_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'
48542ec8c4b4Smrg      fi
48552ec8c4b4Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
48562ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
48572ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
48582ec8c4b4Smrg      _LT_TAGVAR(inherit_rpath, $1)=yes
48592ec8c4b4Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
48602ec8c4b4Smrg      ;;
486109885543Smrg
48622ec8c4b4Smrg    netbsd*)
48632ec8c4b4Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
48642ec8c4b4Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
48652ec8c4b4Smrg      else
48662ec8c4b4Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
48672ec8c4b4Smrg      fi
48682ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
48692ec8c4b4Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
48702ec8c4b4Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
48712ec8c4b4Smrg      ;;
487209885543Smrg
48732ec8c4b4Smrg    newsos6)
48742ec8c4b4Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
48752ec8c4b4Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
48762ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
48772ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
48782ec8c4b4Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
48792ec8c4b4Smrg      ;;
488009885543Smrg
48812ec8c4b4Smrg    *nto* | *qnx*)
48822ec8c4b4Smrg      ;;
488309885543Smrg
48842ec8c4b4Smrg    openbsd*)
48852ec8c4b4Smrg      if test -f /usr/libexec/ld.so; then
48862ec8c4b4Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
48872ec8c4b4Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
48882ec8c4b4Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
48892ec8c4b4Smrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
48902ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
48912ec8c4b4Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
48922ec8c4b4Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
48932ec8c4b4Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
48942ec8c4b4Smrg	else
48952ec8c4b4Smrg	  case $host_os in
48962ec8c4b4Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
48972ec8c4b4Smrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
48982ec8c4b4Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
48992ec8c4b4Smrg	     ;;
49002ec8c4b4Smrg	   *)
49012ec8c4b4Smrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
49022ec8c4b4Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
49032ec8c4b4Smrg	     ;;
49042ec8c4b4Smrg	  esac
49052ec8c4b4Smrg	fi
49062ec8c4b4Smrg      else
49072ec8c4b4Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
49082ec8c4b4Smrg      fi
49092ec8c4b4Smrg      ;;
491009885543Smrg
49112ec8c4b4Smrg    os2*)
49122ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
49132ec8c4b4Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
49142ec8c4b4Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
49152ec8c4b4Smrg      _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'
49162ec8c4b4Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
49172ec8c4b4Smrg      ;;
491809885543Smrg
49192ec8c4b4Smrg    osf3*)
49202ec8c4b4Smrg      if test "$GCC" = yes; then
49212ec8c4b4Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
49222ec8c4b4Smrg	_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'
49232ec8c4b4Smrg      else
49242ec8c4b4Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
49252ec8c4b4Smrg	_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'
49262ec8c4b4Smrg      fi
49272ec8c4b4Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
49282ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
49292ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
49302ec8c4b4Smrg      ;;
493109885543Smrg
49322ec8c4b4Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
49332ec8c4b4Smrg      if test "$GCC" = yes; then
49342ec8c4b4Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
49352ec8c4b4Smrg	_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'
49362ec8c4b4Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
49372ec8c4b4Smrg      else
49382ec8c4b4Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
49392ec8c4b4Smrg	_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'
49402ec8c4b4Smrg	_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~
49412ec8c4b4Smrg	$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'
494209885543Smrg
49432ec8c4b4Smrg	# Both c and cxx compiler support -rpath directly
49442ec8c4b4Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
49452ec8c4b4Smrg      fi
49462ec8c4b4Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
49472ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
49482ec8c4b4Smrg      ;;
494909885543Smrg
49502ec8c4b4Smrg    solaris*)
49512ec8c4b4Smrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
49522ec8c4b4Smrg      if test "$GCC" = yes; then
49532ec8c4b4Smrg	wlarc='${wl}'
49542ec8c4b4Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
49552ec8c4b4Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
49562ec8c4b4Smrg	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
49572ec8c4b4Smrg      else
49582ec8c4b4Smrg	case `$CC -V 2>&1` in
49592ec8c4b4Smrg	*"Compilers 5.0"*)
49602ec8c4b4Smrg	  wlarc=''
49612ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
49622ec8c4b4Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
49632ec8c4b4Smrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
49642ec8c4b4Smrg	  ;;
49652ec8c4b4Smrg	*)
49662ec8c4b4Smrg	  wlarc='${wl}'
49672ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
49682ec8c4b4Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
49692ec8c4b4Smrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
49702ec8c4b4Smrg	  ;;
49712ec8c4b4Smrg	esac
49722ec8c4b4Smrg      fi
49732ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
49742ec8c4b4Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
49752ec8c4b4Smrg      case $host_os in
49762ec8c4b4Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
49772ec8c4b4Smrg      *)
49782ec8c4b4Smrg	# The compiler driver will combine and reorder linker options,
49792ec8c4b4Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
49802ec8c4b4Smrg	# but is careful enough not to reorder.
49812ec8c4b4Smrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
49822ec8c4b4Smrg	if test "$GCC" = yes; then
49832ec8c4b4Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
49842ec8c4b4Smrg	else
49852ec8c4b4Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
49862ec8c4b4Smrg	fi
49872ec8c4b4Smrg	;;
49882ec8c4b4Smrg      esac
49892ec8c4b4Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
49902ec8c4b4Smrg      ;;
499109885543Smrg
49922ec8c4b4Smrg    sunos4*)
49932ec8c4b4Smrg      if test "x$host_vendor" = xsequent; then
49942ec8c4b4Smrg	# Use $CC to link under sequent, because it throws in some extra .o
49952ec8c4b4Smrg	# files that make .init and .fini sections work.
49962ec8c4b4Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
49972ec8c4b4Smrg      else
49982ec8c4b4Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
49992ec8c4b4Smrg      fi
50002ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
50012ec8c4b4Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
50022ec8c4b4Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
50032ec8c4b4Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
50042ec8c4b4Smrg      ;;
500509885543Smrg
50062ec8c4b4Smrg    sysv4)
50072ec8c4b4Smrg      case $host_vendor in
50082ec8c4b4Smrg	sni)
50092ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
50102ec8c4b4Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
50112ec8c4b4Smrg	;;
50122ec8c4b4Smrg	siemens)
50132ec8c4b4Smrg	  ## LD is ld it makes a PLAMLIB
50142ec8c4b4Smrg	  ## CC just makes a GrossModule.
50152ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
50162ec8c4b4Smrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
50172ec8c4b4Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
50182ec8c4b4Smrg        ;;
50192ec8c4b4Smrg	motorola)
50202ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
50212ec8c4b4Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
50222ec8c4b4Smrg	;;
50232ec8c4b4Smrg      esac
50242ec8c4b4Smrg      runpath_var='LD_RUN_PATH'
50252ec8c4b4Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
50262ec8c4b4Smrg      ;;
502709885543Smrg
50282ec8c4b4Smrg    sysv4.3*)
50292ec8c4b4Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
50302ec8c4b4Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
50312ec8c4b4Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
50322ec8c4b4Smrg      ;;
503309885543Smrg
50342ec8c4b4Smrg    sysv4*MP*)
50352ec8c4b4Smrg      if test -d /usr/nec; then
50362ec8c4b4Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
50372ec8c4b4Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
50382ec8c4b4Smrg	runpath_var=LD_RUN_PATH
50392ec8c4b4Smrg	hardcode_runpath_var=yes
50402ec8c4b4Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
50412ec8c4b4Smrg      fi
50422ec8c4b4Smrg      ;;
504309885543Smrg
50442ec8c4b4Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
50452ec8c4b4Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
50462ec8c4b4Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
50472ec8c4b4Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
50482ec8c4b4Smrg      runpath_var='LD_RUN_PATH'
504909885543Smrg
50502ec8c4b4Smrg      if test "$GCC" = yes; then
50512ec8c4b4Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
50522ec8c4b4Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
50532ec8c4b4Smrg      else
50542ec8c4b4Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
50552ec8c4b4Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
50562ec8c4b4Smrg      fi
50572ec8c4b4Smrg      ;;
505809885543Smrg
50592ec8c4b4Smrg    sysv5* | sco3.2v5* | sco5v6*)
50602ec8c4b4Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
50612ec8c4b4Smrg      # link with -lc, and that would cause any symbols used from libc to
50622ec8c4b4Smrg      # always be unresolved, which means just about no library would
50632ec8c4b4Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
50642ec8c4b4Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
50652ec8c4b4Smrg      # as -z defs.
50662ec8c4b4Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
50672ec8c4b4Smrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
50682ec8c4b4Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
50692ec8c4b4Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
50702ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
50712ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
50722ec8c4b4Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
50732ec8c4b4Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
50742ec8c4b4Smrg      runpath_var='LD_RUN_PATH'
507509885543Smrg
50762ec8c4b4Smrg      if test "$GCC" = yes; then
50772ec8c4b4Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
50782ec8c4b4Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
50792ec8c4b4Smrg      else
50802ec8c4b4Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
50812ec8c4b4Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
50822ec8c4b4Smrg      fi
50832ec8c4b4Smrg      ;;
508409885543Smrg
50852ec8c4b4Smrg    uts4*)
50862ec8c4b4Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
50872ec8c4b4Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
50882ec8c4b4Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
50892ec8c4b4Smrg      ;;
509009885543Smrg
50912ec8c4b4Smrg    *)
50922ec8c4b4Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
50932ec8c4b4Smrg      ;;
50942ec8c4b4Smrg    esac
509509885543Smrg
50962ec8c4b4Smrg    if test x$host_vendor = xsni; then
50972ec8c4b4Smrg      case $host in
50982ec8c4b4Smrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
50992ec8c4b4Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
51002ec8c4b4Smrg	;;
51012ec8c4b4Smrg      esac
51022ec8c4b4Smrg    fi
51032ec8c4b4Smrg  fi
51042ec8c4b4Smrg])
51052ec8c4b4SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
51062ec8c4b4Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
510709885543Smrg
51082ec8c4b4Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
510909885543Smrg
51102ec8c4b4Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
51112ec8c4b4Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
51122ec8c4b4Smrg_LT_DECL([], [extract_expsyms_cmds], [2],
51132ec8c4b4Smrg    [The commands to extract the exported symbol list from a shared archive])
511409885543Smrg
51152ec8c4b4Smrg#
51162ec8c4b4Smrg# Do we need to explicitly link libc?
51172ec8c4b4Smrg#
51182ec8c4b4Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
51192ec8c4b4Smrgx|xyes)
51202ec8c4b4Smrg  # Assume -lc should be added
51212ec8c4b4Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
512209885543Smrg
51232ec8c4b4Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
51242ec8c4b4Smrg    case $_LT_TAGVAR(archive_cmds, $1) in
51252ec8c4b4Smrg    *'~'*)
51262ec8c4b4Smrg      # FIXME: we may have to deal with multi-command sequences.
51272ec8c4b4Smrg      ;;
51282ec8c4b4Smrg    '$CC '*)
51292ec8c4b4Smrg      # Test whether the compiler implicitly links with -lc since on some
51302ec8c4b4Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
51312ec8c4b4Smrg      # to ld, don't add -lc before -lgcc.
51322ec8c4b4Smrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
51332ec8c4b4Smrg      $RM conftest*
51342ec8c4b4Smrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
513509885543Smrg
51362ec8c4b4Smrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
51372ec8c4b4Smrg        soname=conftest
51382ec8c4b4Smrg        lib=conftest
51392ec8c4b4Smrg        libobjs=conftest.$ac_objext
51402ec8c4b4Smrg        deplibs=
51412ec8c4b4Smrg        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
51422ec8c4b4Smrg	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
51432ec8c4b4Smrg        compiler_flags=-v
51442ec8c4b4Smrg        linker_flags=-v
51452ec8c4b4Smrg        verstring=
51462ec8c4b4Smrg        output_objdir=.
51472ec8c4b4Smrg        libname=conftest
51482ec8c4b4Smrg        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
51492ec8c4b4Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=
51502ec8c4b4Smrg        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
51512ec8c4b4Smrg        then
51522ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
51532ec8c4b4Smrg        else
51542ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
51552ec8c4b4Smrg        fi
51562ec8c4b4Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
51572ec8c4b4Smrg      else
51582ec8c4b4Smrg        cat conftest.err 1>&5
51592ec8c4b4Smrg      fi
51602ec8c4b4Smrg      $RM conftest*
51612ec8c4b4Smrg      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
51622ec8c4b4Smrg      ;;
51632ec8c4b4Smrg    esac
51642ec8c4b4Smrg  fi
51652ec8c4b4Smrg  ;;
51662ec8c4b4Smrgesac
516709885543Smrg
51682ec8c4b4Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
51692ec8c4b4Smrg    [Whether or not to add -lc for building shared libraries])
51702ec8c4b4Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
51712ec8c4b4Smrg    [enable_shared_with_static_runtimes], [0],
51722ec8c4b4Smrg    [Whether or not to disallow shared libs when runtime libs are static])
51732ec8c4b4Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
51742ec8c4b4Smrg    [Compiler flag to allow reflexive dlopens])
51752ec8c4b4Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
51762ec8c4b4Smrg    [Compiler flag to generate shared objects directly from archives])
51772ec8c4b4Smrg_LT_TAGDECL([], [compiler_needs_object], [1],
51782ec8c4b4Smrg    [Whether the compiler copes with passing no objects directly])
51792ec8c4b4Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
51802ec8c4b4Smrg    [Create an old-style archive from a shared archive])
51812ec8c4b4Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
51822ec8c4b4Smrg    [Create a temporary old-style archive to link instead of a shared archive])
51832ec8c4b4Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
51842ec8c4b4Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
51852ec8c4b4Smrg_LT_TAGDECL([], [module_cmds], [2],
51862ec8c4b4Smrg    [Commands used to build a loadable module if different from building
51872ec8c4b4Smrg    a shared archive.])
51882ec8c4b4Smrg_LT_TAGDECL([], [module_expsym_cmds], [2])
51892ec8c4b4Smrg_LT_TAGDECL([], [with_gnu_ld], [1],
51902ec8c4b4Smrg    [Whether we are building with GNU ld or not])
51912ec8c4b4Smrg_LT_TAGDECL([], [allow_undefined_flag], [1],
51922ec8c4b4Smrg    [Flag that allows shared libraries with undefined symbols to be built])
51932ec8c4b4Smrg_LT_TAGDECL([], [no_undefined_flag], [1],
51942ec8c4b4Smrg    [Flag that enforces no undefined symbols])
51952ec8c4b4Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
51962ec8c4b4Smrg    [Flag to hardcode $libdir into a binary during linking.
51972ec8c4b4Smrg    This must work even if $libdir does not exist])
51982ec8c4b4Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
51992ec8c4b4Smrg    [[If ld is used when linking, flag to hardcode $libdir into a binary
52002ec8c4b4Smrg    during linking.  This must work even if $libdir does not exist]])
52012ec8c4b4Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
52022ec8c4b4Smrg    [Whether we need a single "-rpath" flag with a separated argument])
52032ec8c4b4Smrg_LT_TAGDECL([], [hardcode_direct], [0],
52042ec8c4b4Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
52052ec8c4b4Smrg    DIR into the resulting binary])
52062ec8c4b4Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
52072ec8c4b4Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
52082ec8c4b4Smrg    DIR into the resulting binary and the resulting library dependency is
52092ec8c4b4Smrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
52102ec8c4b4Smrg    library is relocated])
52112ec8c4b4Smrg_LT_TAGDECL([], [hardcode_minus_L], [0],
52122ec8c4b4Smrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
52132ec8c4b4Smrg    into the resulting binary])
52142ec8c4b4Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
52152ec8c4b4Smrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
52162ec8c4b4Smrg    into the resulting binary])
52172ec8c4b4Smrg_LT_TAGDECL([], [hardcode_automatic], [0],
52182ec8c4b4Smrg    [Set to "yes" if building a shared library automatically hardcodes DIR
52192ec8c4b4Smrg    into the library and all subsequent libraries and executables linked
52202ec8c4b4Smrg    against it])
52212ec8c4b4Smrg_LT_TAGDECL([], [inherit_rpath], [0],
52222ec8c4b4Smrg    [Set to yes if linker adds runtime paths of dependent libraries
52232ec8c4b4Smrg    to runtime path list])
52242ec8c4b4Smrg_LT_TAGDECL([], [link_all_deplibs], [0],
52252ec8c4b4Smrg    [Whether libtool must link a program against all its dependency libraries])
52262ec8c4b4Smrg_LT_TAGDECL([], [fix_srcfile_path], [1],
52272ec8c4b4Smrg    [Fix the shell variable $srcfile for the compiler])
52282ec8c4b4Smrg_LT_TAGDECL([], [always_export_symbols], [0],
52292ec8c4b4Smrg    [Set to "yes" if exported symbols are required])
52302ec8c4b4Smrg_LT_TAGDECL([], [export_symbols_cmds], [2],
52312ec8c4b4Smrg    [The commands to list exported symbols])
52322ec8c4b4Smrg_LT_TAGDECL([], [exclude_expsyms], [1],
52332ec8c4b4Smrg    [Symbols that should not be listed in the preloaded symbols])
52342ec8c4b4Smrg_LT_TAGDECL([], [include_expsyms], [1],
52352ec8c4b4Smrg    [Symbols that must always be exported])
52362ec8c4b4Smrg_LT_TAGDECL([], [prelink_cmds], [2],
52372ec8c4b4Smrg    [Commands necessary for linking programs (against libraries) with templates])
52382ec8c4b4Smrg_LT_TAGDECL([], [file_list_spec], [1],
52392ec8c4b4Smrg    [Specify filename containing input files])
52402ec8c4b4Smrgdnl FIXME: Not yet implemented
52412ec8c4b4Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
52422ec8c4b4Smrgdnl    [Compiler flag to generate thread safe objects])
52432ec8c4b4Smrg])# _LT_LINKER_SHLIBS
52442ec8c4b4Smrg
52452ec8c4b4Smrg
52462ec8c4b4Smrg# _LT_LANG_C_CONFIG([TAG])
52472ec8c4b4Smrg# ------------------------
52482ec8c4b4Smrg# Ensure that the configuration variables for a C compiler are suitably
52492ec8c4b4Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
52502ec8c4b4Smrg# the compiler configuration to `libtool'.
52512ec8c4b4Smrgm4_defun([_LT_LANG_C_CONFIG],
52522ec8c4b4Smrg[m4_require([_LT_DECL_EGREP])dnl
52532ec8c4b4Smrglt_save_CC="$CC"
52542ec8c4b4SmrgAC_LANG_PUSH(C)
525509885543Smrg
52562ec8c4b4Smrg# Source file extension for C test sources.
52572ec8c4b4Smrgac_ext=c
525809885543Smrg
52592ec8c4b4Smrg# Object file extension for compiled C test sources.
52602ec8c4b4Smrgobjext=o
52612ec8c4b4Smrg_LT_TAGVAR(objext, $1)=$objext
526209885543Smrg
52632ec8c4b4Smrg# Code to be used in simple compile tests
52642ec8c4b4Smrglt_simple_compile_test_code="int some_variable = 0;"
526509885543Smrg
52662ec8c4b4Smrg# Code to be used in simple link tests
52672ec8c4b4Smrglt_simple_link_test_code='int main(){return(0);}'
526809885543Smrg
52692ec8c4b4Smrg_LT_TAG_COMPILER
52702ec8c4b4Smrg# Save the default compiler, since it gets overwritten when the other
52712ec8c4b4Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
52722ec8c4b4Smrgcompiler_DEFAULT=$CC
527309885543Smrg
52742ec8c4b4Smrg# save warnings/boilerplate of simple test code
52752ec8c4b4Smrg_LT_COMPILER_BOILERPLATE
52762ec8c4b4Smrg_LT_LINKER_BOILERPLATE
527709885543Smrg
52782ec8c4b4Smrgif test -n "$compiler"; then
52792ec8c4b4Smrg  _LT_COMPILER_NO_RTTI($1)
52802ec8c4b4Smrg  _LT_COMPILER_PIC($1)
52812ec8c4b4Smrg  _LT_COMPILER_C_O($1)
52822ec8c4b4Smrg  _LT_COMPILER_FILE_LOCKS($1)
52832ec8c4b4Smrg  _LT_LINKER_SHLIBS($1)
52842ec8c4b4Smrg  _LT_SYS_DYNAMIC_LINKER($1)
52852ec8c4b4Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
52862ec8c4b4Smrg  LT_SYS_DLOPEN_SELF
52872ec8c4b4Smrg  _LT_CMD_STRIPLIB
52882ec8c4b4Smrg
52892ec8c4b4Smrg  # Report which library types will actually be built
52902ec8c4b4Smrg  AC_MSG_CHECKING([if libtool supports shared libraries])
52912ec8c4b4Smrg  AC_MSG_RESULT([$can_build_shared])
52922ec8c4b4Smrg
52932ec8c4b4Smrg  AC_MSG_CHECKING([whether to build shared libraries])
52942ec8c4b4Smrg  test "$can_build_shared" = "no" && enable_shared=no
52952ec8c4b4Smrg
52962ec8c4b4Smrg  # On AIX, shared libraries and static libraries use the same namespace, and
52972ec8c4b4Smrg  # are all built from PIC.
52982ec8c4b4Smrg  case $host_os in
52992ec8c4b4Smrg  aix3*)
53002ec8c4b4Smrg    test "$enable_shared" = yes && enable_static=no
53012ec8c4b4Smrg    if test -n "$RANLIB"; then
53022ec8c4b4Smrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
53032ec8c4b4Smrg      postinstall_cmds='$RANLIB $lib'
53042ec8c4b4Smrg    fi
53052ec8c4b4Smrg    ;;
530609885543Smrg
53072ec8c4b4Smrg  aix[[4-9]]*)
53082ec8c4b4Smrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
53092ec8c4b4Smrg      test "$enable_shared" = yes && enable_static=no
53102ec8c4b4Smrg    fi
53112ec8c4b4Smrg    ;;
53122ec8c4b4Smrg  esac
53132ec8c4b4Smrg  AC_MSG_RESULT([$enable_shared])
531409885543Smrg
53152ec8c4b4Smrg  AC_MSG_CHECKING([whether to build static libraries])
53162ec8c4b4Smrg  # Make sure either enable_shared or enable_static is yes.
53172ec8c4b4Smrg  test "$enable_shared" = yes || enable_static=yes
53182ec8c4b4Smrg  AC_MSG_RESULT([$enable_static])
531909885543Smrg
53202ec8c4b4Smrg  _LT_CONFIG($1)
53212ec8c4b4Smrgfi
53222ec8c4b4SmrgAC_LANG_POP
53232ec8c4b4SmrgCC="$lt_save_CC"
53242ec8c4b4Smrg])# _LT_LANG_C_CONFIG
532509885543Smrg
532609885543Smrg
53272ec8c4b4Smrg# _LT_PROG_CXX
53282ec8c4b4Smrg# ------------
53292ec8c4b4Smrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
53302ec8c4b4Smrg# compiler, we have our own version here.
53312ec8c4b4Smrgm4_defun([_LT_PROG_CXX],
53322ec8c4b4Smrg[
53332ec8c4b4Smrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
53342ec8c4b4SmrgAC_PROG_CXX
53352ec8c4b4Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
53362ec8c4b4Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
53372ec8c4b4Smrg    (test "X$CXX" != "Xg++"))) ; then
53382ec8c4b4Smrg  AC_PROG_CXXCPP
53392ec8c4b4Smrgelse
53402ec8c4b4Smrg  _lt_caught_CXX_error=yes
53412ec8c4b4Smrgfi
53422ec8c4b4Smrgpopdef([AC_MSG_ERROR])
53432ec8c4b4Smrg])# _LT_PROG_CXX
534409885543Smrg
53452ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
53462ec8c4b4Smrgdnl AC_DEFUN([_LT_PROG_CXX], [])
534709885543Smrg
534809885543Smrg
53492ec8c4b4Smrg# _LT_LANG_CXX_CONFIG([TAG])
53502ec8c4b4Smrg# --------------------------
53512ec8c4b4Smrg# Ensure that the configuration variables for a C++ compiler are suitably
53522ec8c4b4Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
53532ec8c4b4Smrg# the compiler configuration to `libtool'.
53542ec8c4b4Smrgm4_defun([_LT_LANG_CXX_CONFIG],
53552ec8c4b4Smrg[AC_REQUIRE([_LT_PROG_CXX])dnl
53562ec8c4b4Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
53572ec8c4b4Smrgm4_require([_LT_DECL_EGREP])dnl
53582ec8c4b4Smrg
53592ec8c4b4SmrgAC_LANG_PUSH(C++)
53602ec8c4b4Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
53612ec8c4b4Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
53622ec8c4b4Smrg_LT_TAGVAR(always_export_symbols, $1)=no
53632ec8c4b4Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
53642ec8c4b4Smrg_LT_TAGVAR(compiler_needs_object, $1)=no
53652ec8c4b4Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
53662ec8c4b4Smrg_LT_TAGVAR(hardcode_direct, $1)=no
53672ec8c4b4Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
53682ec8c4b4Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
53692ec8c4b4Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
53702ec8c4b4Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
53712ec8c4b4Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
53722ec8c4b4Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
53732ec8c4b4Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
53742ec8c4b4Smrg_LT_TAGVAR(inherit_rpath, $1)=no
53752ec8c4b4Smrg_LT_TAGVAR(module_cmds, $1)=
53762ec8c4b4Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
53772ec8c4b4Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
53782ec8c4b4Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
53792ec8c4b4Smrg_LT_TAGVAR(no_undefined_flag, $1)=
53802ec8c4b4Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
53812ec8c4b4Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
538209885543Smrg
53832ec8c4b4Smrg# Source file extension for C++ test sources.
53842ec8c4b4Smrgac_ext=cpp
53857104f784Smrg
53862ec8c4b4Smrg# Object file extension for compiled C++ test sources.
53872ec8c4b4Smrgobjext=o
53882ec8c4b4Smrg_LT_TAGVAR(objext, $1)=$objext
53892ec8c4b4Smrg
53902ec8c4b4Smrg# No sense in running all these tests if we already determined that
53912ec8c4b4Smrg# the CXX compiler isn't working.  Some variables (like enable_shared)
53922ec8c4b4Smrg# are currently assumed to apply to all compilers on this platform,
53932ec8c4b4Smrg# and will be corrupted by setting them based on a non-working compiler.
53942ec8c4b4Smrgif test "$_lt_caught_CXX_error" != yes; then
53952ec8c4b4Smrg  # Code to be used in simple compile tests
53962ec8c4b4Smrg  lt_simple_compile_test_code="int some_variable = 0;"
53972ec8c4b4Smrg
53982ec8c4b4Smrg  # Code to be used in simple link tests
53992ec8c4b4Smrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
54002ec8c4b4Smrg
54012ec8c4b4Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
54022ec8c4b4Smrg  _LT_TAG_COMPILER
54032ec8c4b4Smrg
54042ec8c4b4Smrg  # save warnings/boilerplate of simple test code
54052ec8c4b4Smrg  _LT_COMPILER_BOILERPLATE
54062ec8c4b4Smrg  _LT_LINKER_BOILERPLATE
54072ec8c4b4Smrg
54082ec8c4b4Smrg  # Allow CC to be a program name with arguments.
54092ec8c4b4Smrg  lt_save_CC=$CC
54102ec8c4b4Smrg  lt_save_LD=$LD
54112ec8c4b4Smrg  lt_save_GCC=$GCC
54122ec8c4b4Smrg  GCC=$GXX
54132ec8c4b4Smrg  lt_save_with_gnu_ld=$with_gnu_ld
54142ec8c4b4Smrg  lt_save_path_LD=$lt_cv_path_LD
54152ec8c4b4Smrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
54162ec8c4b4Smrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
54172ec8c4b4Smrg  else
54182ec8c4b4Smrg    $as_unset lt_cv_prog_gnu_ld
54192ec8c4b4Smrg  fi
54202ec8c4b4Smrg  if test -n "${lt_cv_path_LDCXX+set}"; then
54212ec8c4b4Smrg    lt_cv_path_LD=$lt_cv_path_LDCXX
54222ec8c4b4Smrg  else
54232ec8c4b4Smrg    $as_unset lt_cv_path_LD
54242ec8c4b4Smrg  fi
54252ec8c4b4Smrg  test -z "${LDCXX+set}" || LD=$LDCXX
54262ec8c4b4Smrg  CC=${CXX-"c++"}
54272ec8c4b4Smrg  compiler=$CC
54282ec8c4b4Smrg  _LT_TAGVAR(compiler, $1)=$CC
54292ec8c4b4Smrg  _LT_CC_BASENAME([$compiler])
543009885543Smrg
54312ec8c4b4Smrg  if test -n "$compiler"; then
54322ec8c4b4Smrg    # We don't want -fno-exception when compiling C++ code, so set the
54332ec8c4b4Smrg    # no_builtin_flag separately
54342ec8c4b4Smrg    if test "$GXX" = yes; then
54352ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
54362ec8c4b4Smrg    else
54372ec8c4b4Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
54382ec8c4b4Smrg    fi
543909885543Smrg
54402ec8c4b4Smrg    if test "$GXX" = yes; then
54412ec8c4b4Smrg      # Set up default GNU C++ configuration
544209885543Smrg
54432ec8c4b4Smrg      LT_PATH_LD
544409885543Smrg
54452ec8c4b4Smrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
54462ec8c4b4Smrg      # archiving commands below assume that GNU ld is being used.
54472ec8c4b4Smrg      if test "$with_gnu_ld" = yes; then
54482ec8c4b4Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
54492ec8c4b4Smrg        _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'
545009885543Smrg
54512ec8c4b4Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
54522ec8c4b4Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
545309885543Smrg
54542ec8c4b4Smrg        # If archive_cmds runs LD, not CC, wlarc should be empty
54552ec8c4b4Smrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
54562ec8c4b4Smrg        #     investigate it a little bit more. (MM)
54572ec8c4b4Smrg        wlarc='${wl}'
545809885543Smrg
54592ec8c4b4Smrg        # ancient GNU ld didn't support --whole-archive et. al.
54602ec8c4b4Smrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
54612ec8c4b4Smrg	  $GREP 'no-whole-archive' > /dev/null; then
54622ec8c4b4Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
54632ec8c4b4Smrg        else
54642ec8c4b4Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
54652ec8c4b4Smrg        fi
54662ec8c4b4Smrg      else
54672ec8c4b4Smrg        with_gnu_ld=no
54682ec8c4b4Smrg        wlarc=
54692ec8c4b4Smrg
54702ec8c4b4Smrg        # A generic and very simple default shared library creation
54712ec8c4b4Smrg        # command for GNU C++ for the case where it uses the native
54722ec8c4b4Smrg        # linker, instead of GNU ld.  If possible, this setting should
54732ec8c4b4Smrg        # overridden to take advantage of the native linker features on
54742ec8c4b4Smrg        # the platform it is being used on.
54752ec8c4b4Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
54762ec8c4b4Smrg      fi
547709885543Smrg
54782ec8c4b4Smrg      # Commands to make compiler produce verbose output that lists
54792ec8c4b4Smrg      # what "hidden" libraries, object files and flags are used when
54802ec8c4b4Smrg      # linking a shared library.
54812ec8c4b4Smrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
548209885543Smrg
54832ec8c4b4Smrg    else
54842ec8c4b4Smrg      GXX=no
54852ec8c4b4Smrg      with_gnu_ld=no
54862ec8c4b4Smrg      wlarc=
54872ec8c4b4Smrg    fi
548809885543Smrg
54892ec8c4b4Smrg    # PORTME: fill in a description of your system's C++ link characteristics
54902ec8c4b4Smrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
54912ec8c4b4Smrg    _LT_TAGVAR(ld_shlibs, $1)=yes
54922ec8c4b4Smrg    case $host_os in
54932ec8c4b4Smrg      aix3*)
54942ec8c4b4Smrg        # FIXME: insert proper C++ library support
54952ec8c4b4Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
54962ec8c4b4Smrg        ;;
54972ec8c4b4Smrg      aix[[4-9]]*)
54982ec8c4b4Smrg        if test "$host_cpu" = ia64; then
54992ec8c4b4Smrg          # On IA64, the linker does run time linking by default, so we don't
55002ec8c4b4Smrg          # have to do anything special.
55012ec8c4b4Smrg          aix_use_runtimelinking=no
55022ec8c4b4Smrg          exp_sym_flag='-Bexport'
55032ec8c4b4Smrg          no_entry_flag=""
55042ec8c4b4Smrg        else
55052ec8c4b4Smrg          aix_use_runtimelinking=no
55062ec8c4b4Smrg
55072ec8c4b4Smrg          # Test if we are trying to use run time linking or normal
55082ec8c4b4Smrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
55092ec8c4b4Smrg          # need to do runtime linking.
55102ec8c4b4Smrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
55112ec8c4b4Smrg	    for ld_flag in $LDFLAGS; do
55122ec8c4b4Smrg	      case $ld_flag in
55132ec8c4b4Smrg	      *-brtl*)
55142ec8c4b4Smrg	        aix_use_runtimelinking=yes
55152ec8c4b4Smrg	        break
55162ec8c4b4Smrg	        ;;
55172ec8c4b4Smrg	      esac
55182ec8c4b4Smrg	    done
55192ec8c4b4Smrg	    ;;
55202ec8c4b4Smrg          esac
552109885543Smrg
55222ec8c4b4Smrg          exp_sym_flag='-bexport'
55232ec8c4b4Smrg          no_entry_flag='-bnoentry'
55242ec8c4b4Smrg        fi
552509885543Smrg
55262ec8c4b4Smrg        # When large executables or shared objects are built, AIX ld can
55272ec8c4b4Smrg        # have problems creating the table of contents.  If linking a library
55282ec8c4b4Smrg        # or program results in "error TOC overflow" add -mminimal-toc to
55292ec8c4b4Smrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
55302ec8c4b4Smrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
55312ec8c4b4Smrg
55322ec8c4b4Smrg        _LT_TAGVAR(archive_cmds, $1)=''
55332ec8c4b4Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
55342ec8c4b4Smrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
55352ec8c4b4Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
55362ec8c4b4Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
55372ec8c4b4Smrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
55382ec8c4b4Smrg
55392ec8c4b4Smrg        if test "$GXX" = yes; then
55402ec8c4b4Smrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
55412ec8c4b4Smrg          # We only want to do this on AIX 4.2 and lower, the check
55422ec8c4b4Smrg          # below for broken collect2 doesn't work under 4.3+
55432ec8c4b4Smrg	  collect2name=`${CC} -print-prog-name=collect2`
55442ec8c4b4Smrg	  if test -f "$collect2name" &&
55452ec8c4b4Smrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
55462ec8c4b4Smrg	  then
55472ec8c4b4Smrg	    # We have reworked collect2
55482ec8c4b4Smrg	    :
55492ec8c4b4Smrg	  else
55502ec8c4b4Smrg	    # We have old collect2
55512ec8c4b4Smrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
55522ec8c4b4Smrg	    # It fails to find uninstalled libraries when the uninstalled
55532ec8c4b4Smrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
55542ec8c4b4Smrg	    # to unsupported forces relinking
55552ec8c4b4Smrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
55562ec8c4b4Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
55572ec8c4b4Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
55582ec8c4b4Smrg	  fi
55592ec8c4b4Smrg          esac
55602ec8c4b4Smrg          shared_flag='-shared'
55612ec8c4b4Smrg	  if test "$aix_use_runtimelinking" = yes; then
55622ec8c4b4Smrg	    shared_flag="$shared_flag "'${wl}-G'
55632ec8c4b4Smrg	  fi
55642ec8c4b4Smrg        else
55652ec8c4b4Smrg          # not using gcc
55662ec8c4b4Smrg          if test "$host_cpu" = ia64; then
55672ec8c4b4Smrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
55682ec8c4b4Smrg	  # chokes on -Wl,-G. The following line is correct:
55692ec8c4b4Smrg	  shared_flag='-G'
55702ec8c4b4Smrg          else
55712ec8c4b4Smrg	    if test "$aix_use_runtimelinking" = yes; then
55722ec8c4b4Smrg	      shared_flag='${wl}-G'
55732ec8c4b4Smrg	    else
55742ec8c4b4Smrg	      shared_flag='${wl}-bM:SRE'
55752ec8c4b4Smrg	    fi
55762ec8c4b4Smrg          fi
55772ec8c4b4Smrg        fi
557809885543Smrg
55792ec8c4b4Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
55802ec8c4b4Smrg        # It seems that -bexpall does not export symbols beginning with
55812ec8c4b4Smrg        # underscore (_), so it is better to generate a list of symbols to
55822ec8c4b4Smrg	# export.
55832ec8c4b4Smrg        _LT_TAGVAR(always_export_symbols, $1)=yes
55842ec8c4b4Smrg        if test "$aix_use_runtimelinking" = yes; then
55852ec8c4b4Smrg          # Warning - without using the other runtime loading flags (-brtl),
55862ec8c4b4Smrg          # -berok will link without error, but may produce a broken library.
55872ec8c4b4Smrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
55882ec8c4b4Smrg          # Determine the default libpath from the value encoded in an empty
55892ec8c4b4Smrg          # executable.
55902ec8c4b4Smrg          _LT_SYS_MODULE_PATH_AIX
55912ec8c4b4Smrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
55922ec8c4b4Smrg
55932ec8c4b4Smrg          _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"
55942ec8c4b4Smrg        else
55952ec8c4b4Smrg          if test "$host_cpu" = ia64; then
55962ec8c4b4Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
55972ec8c4b4Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
55982ec8c4b4Smrg	    _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"
55992ec8c4b4Smrg          else
56002ec8c4b4Smrg	    # Determine the default libpath from the value encoded in an
56012ec8c4b4Smrg	    # empty executable.
56022ec8c4b4Smrg	    _LT_SYS_MODULE_PATH_AIX
56032ec8c4b4Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
56042ec8c4b4Smrg	    # Warning - without using the other run time loading flags,
56052ec8c4b4Smrg	    # -berok will link without error, but may produce a broken library.
56062ec8c4b4Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
56072ec8c4b4Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
56082ec8c4b4Smrg	    # Exported symbols can be pulled into shared objects from archives
56092ec8c4b4Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
56102ec8c4b4Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
56112ec8c4b4Smrg	    # This is similar to how AIX traditionally builds its shared
56122ec8c4b4Smrg	    # libraries.
56132ec8c4b4Smrg	    _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'
56142ec8c4b4Smrg          fi
56152ec8c4b4Smrg        fi
56162ec8c4b4Smrg        ;;
561709885543Smrg
56182ec8c4b4Smrg      beos*)
56192ec8c4b4Smrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
56202ec8c4b4Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
56212ec8c4b4Smrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
56222ec8c4b4Smrg	  # support --undefined.  This deserves some investigation.  FIXME
56232ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
56242ec8c4b4Smrg	else
56252ec8c4b4Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
56262ec8c4b4Smrg	fi
56272ec8c4b4Smrg	;;
562809885543Smrg
56292ec8c4b4Smrg      chorus*)
56302ec8c4b4Smrg        case $cc_basename in
56312ec8c4b4Smrg          *)
56322ec8c4b4Smrg	  # FIXME: insert proper C++ library support
56332ec8c4b4Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
56342ec8c4b4Smrg	  ;;
56352ec8c4b4Smrg        esac
56362ec8c4b4Smrg        ;;
563709885543Smrg
56382ec8c4b4Smrg      cygwin* | mingw* | pw32* | cegcc*)
56392ec8c4b4Smrg        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
56402ec8c4b4Smrg        # as there is no search path for DLLs.
56412ec8c4b4Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
56422ec8c4b4Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
56432ec8c4b4Smrg        _LT_TAGVAR(always_export_symbols, $1)=no
56442ec8c4b4Smrg        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
56452ec8c4b4Smrg
56462ec8c4b4Smrg        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
56472ec8c4b4Smrg          _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'
56482ec8c4b4Smrg          # If the export-symbols file already is a .def file (1st line
56492ec8c4b4Smrg          # is EXPORTS), use it as is; otherwise, prepend...
56502ec8c4b4Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
56512ec8c4b4Smrg	    cp $export_symbols $output_objdir/$soname.def;
56522ec8c4b4Smrg          else
56532ec8c4b4Smrg	    echo EXPORTS > $output_objdir/$soname.def;
56542ec8c4b4Smrg	    cat $export_symbols >> $output_objdir/$soname.def;
56552ec8c4b4Smrg          fi~
56562ec8c4b4Smrg          $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'
56572ec8c4b4Smrg        else
56582ec8c4b4Smrg          _LT_TAGVAR(ld_shlibs, $1)=no
56592ec8c4b4Smrg        fi
56602ec8c4b4Smrg        ;;
56612ec8c4b4Smrg      darwin* | rhapsody*)
56622ec8c4b4Smrg        _LT_DARWIN_LINKER_FEATURES($1)
56632ec8c4b4Smrg	;;
566409885543Smrg
56652ec8c4b4Smrg      dgux*)
56662ec8c4b4Smrg        case $cc_basename in
56672ec8c4b4Smrg          ec++*)
56682ec8c4b4Smrg	    # FIXME: insert proper C++ library support
56692ec8c4b4Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
56702ec8c4b4Smrg	    ;;
56712ec8c4b4Smrg          ghcx*)
56722ec8c4b4Smrg	    # Green Hills C++ Compiler
56732ec8c4b4Smrg	    # FIXME: insert proper C++ library support
56742ec8c4b4Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
56752ec8c4b4Smrg	    ;;
56762ec8c4b4Smrg          *)
56772ec8c4b4Smrg	    # FIXME: insert proper C++ library support
56782ec8c4b4Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
56792ec8c4b4Smrg	    ;;
56802ec8c4b4Smrg        esac
56812ec8c4b4Smrg        ;;
568209885543Smrg
56832ec8c4b4Smrg      freebsd[[12]]*)
56842ec8c4b4Smrg        # C++ shared libraries reported to be fairly broken before
56852ec8c4b4Smrg	# switch to ELF
56862ec8c4b4Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
56872ec8c4b4Smrg        ;;
568809885543Smrg
56892ec8c4b4Smrg      freebsd-elf*)
56902ec8c4b4Smrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
56912ec8c4b4Smrg        ;;
569209885543Smrg
56932ec8c4b4Smrg      freebsd* | dragonfly*)
56942ec8c4b4Smrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
56952ec8c4b4Smrg        # conventions
56962ec8c4b4Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
56972ec8c4b4Smrg        ;;
569809885543Smrg
56992ec8c4b4Smrg      gnu*)
57002ec8c4b4Smrg        ;;
570109885543Smrg
57022ec8c4b4Smrg      hpux9*)
57032ec8c4b4Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
57042ec8c4b4Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
57052ec8c4b4Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
57062ec8c4b4Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
57072ec8c4b4Smrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
57082ec8c4b4Smrg				             # but as the default
57092ec8c4b4Smrg				             # location of the library.
57102ec8c4b4Smrg
57112ec8c4b4Smrg        case $cc_basename in
57122ec8c4b4Smrg          CC*)
57132ec8c4b4Smrg            # FIXME: insert proper C++ library support
57142ec8c4b4Smrg            _LT_TAGVAR(ld_shlibs, $1)=no
57152ec8c4b4Smrg            ;;
57162ec8c4b4Smrg          aCC*)
57172ec8c4b4Smrg            _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'
57182ec8c4b4Smrg            # Commands to make compiler produce verbose output that lists
57192ec8c4b4Smrg            # what "hidden" libraries, object files and flags are used when
57202ec8c4b4Smrg            # linking a shared library.
57212ec8c4b4Smrg            #
57222ec8c4b4Smrg            # There doesn't appear to be a way to prevent this compiler from
57232ec8c4b4Smrg            # explicitly linking system object files so we need to strip them
57242ec8c4b4Smrg            # from the output so that they don't get included in the library
57252ec8c4b4Smrg            # dependencies.
57262ec8c4b4Smrg            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'
57272ec8c4b4Smrg            ;;
57282ec8c4b4Smrg          *)
57292ec8c4b4Smrg            if test "$GXX" = yes; then
57302ec8c4b4Smrg              _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'
57312ec8c4b4Smrg            else
57322ec8c4b4Smrg              # FIXME: insert proper C++ library support
57332ec8c4b4Smrg              _LT_TAGVAR(ld_shlibs, $1)=no
57342ec8c4b4Smrg            fi
57352ec8c4b4Smrg            ;;
57362ec8c4b4Smrg        esac
57372ec8c4b4Smrg        ;;
573809885543Smrg
57392ec8c4b4Smrg      hpux10*|hpux11*)
57402ec8c4b4Smrg        if test $with_gnu_ld = no; then
57412ec8c4b4Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
57422ec8c4b4Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
57432ec8c4b4Smrg
57442ec8c4b4Smrg          case $host_cpu in
57452ec8c4b4Smrg            hppa*64*|ia64*)
57462ec8c4b4Smrg              ;;
57472ec8c4b4Smrg            *)
57482ec8c4b4Smrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
57492ec8c4b4Smrg              ;;
57502ec8c4b4Smrg          esac
57512ec8c4b4Smrg        fi
57522ec8c4b4Smrg        case $host_cpu in
57532ec8c4b4Smrg          hppa*64*|ia64*)
57542ec8c4b4Smrg            _LT_TAGVAR(hardcode_direct, $1)=no
57552ec8c4b4Smrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
57562ec8c4b4Smrg            ;;
57572ec8c4b4Smrg          *)
57582ec8c4b4Smrg            _LT_TAGVAR(hardcode_direct, $1)=yes
57592ec8c4b4Smrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
57602ec8c4b4Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
57612ec8c4b4Smrg					         # but as the default
57622ec8c4b4Smrg					         # location of the library.
57632ec8c4b4Smrg            ;;
57642ec8c4b4Smrg        esac
57652ec8c4b4Smrg
57662ec8c4b4Smrg        case $cc_basename in
57672ec8c4b4Smrg          CC*)
57682ec8c4b4Smrg	    # FIXME: insert proper C++ library support
57692ec8c4b4Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
57702ec8c4b4Smrg	    ;;
57712ec8c4b4Smrg          aCC*)
57722ec8c4b4Smrg	    case $host_cpu in
57732ec8c4b4Smrg	      hppa*64*)
57742ec8c4b4Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
57752ec8c4b4Smrg	        ;;
57762ec8c4b4Smrg	      ia64*)
57772ec8c4b4Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
57782ec8c4b4Smrg	        ;;
57792ec8c4b4Smrg	      *)
57802ec8c4b4Smrg	        _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'
57812ec8c4b4Smrg	        ;;
57822ec8c4b4Smrg	    esac
57832ec8c4b4Smrg	    # Commands to make compiler produce verbose output that lists
57842ec8c4b4Smrg	    # what "hidden" libraries, object files and flags are used when
57852ec8c4b4Smrg	    # linking a shared library.
57862ec8c4b4Smrg	    #
57872ec8c4b4Smrg	    # There doesn't appear to be a way to prevent this compiler from
57882ec8c4b4Smrg	    # explicitly linking system object files so we need to strip them
57892ec8c4b4Smrg	    # from the output so that they don't get included in the library
57902ec8c4b4Smrg	    # dependencies.
57912ec8c4b4Smrg	    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'
57922ec8c4b4Smrg	    ;;
57932ec8c4b4Smrg          *)
57942ec8c4b4Smrg	    if test "$GXX" = yes; then
57952ec8c4b4Smrg	      if test $with_gnu_ld = no; then
57962ec8c4b4Smrg	        case $host_cpu in
57972ec8c4b4Smrg	          hppa*64*)
57982ec8c4b4Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
57992ec8c4b4Smrg	            ;;
58002ec8c4b4Smrg	          ia64*)
58012ec8c4b4Smrg	            _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'
58022ec8c4b4Smrg	            ;;
58032ec8c4b4Smrg	          *)
58042ec8c4b4Smrg	            _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'
58052ec8c4b4Smrg	            ;;
58062ec8c4b4Smrg	        esac
58072ec8c4b4Smrg	      fi
58082ec8c4b4Smrg	    else
58092ec8c4b4Smrg	      # FIXME: insert proper C++ library support
58102ec8c4b4Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
58112ec8c4b4Smrg	    fi
58122ec8c4b4Smrg	    ;;
58132ec8c4b4Smrg        esac
58142ec8c4b4Smrg        ;;
581509885543Smrg
58162ec8c4b4Smrg      interix[[3-9]]*)
58172ec8c4b4Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
58182ec8c4b4Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58192ec8c4b4Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
58202ec8c4b4Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
58212ec8c4b4Smrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
58222ec8c4b4Smrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
58232ec8c4b4Smrg	# default) and relocated if they conflict, which is a slow very memory
58242ec8c4b4Smrg	# consuming and fragmenting process.  To avoid this, we pick a random,
58252ec8c4b4Smrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
58262ec8c4b4Smrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
58272ec8c4b4Smrg	_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'
58282ec8c4b4Smrg	_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'
58292ec8c4b4Smrg	;;
58302ec8c4b4Smrg      irix5* | irix6*)
58312ec8c4b4Smrg        case $cc_basename in
58322ec8c4b4Smrg          CC*)
58332ec8c4b4Smrg	    # SGI C++
58342ec8c4b4Smrg	    _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'
58352ec8c4b4Smrg
58362ec8c4b4Smrg	    # Archives containing C++ object files must be created using
58372ec8c4b4Smrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
58382ec8c4b4Smrg	    # necessary to make sure instantiated templates are included
58392ec8c4b4Smrg	    # in the archive.
58402ec8c4b4Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
58412ec8c4b4Smrg	    ;;
58422ec8c4b4Smrg          *)
58432ec8c4b4Smrg	    if test "$GXX" = yes; then
58442ec8c4b4Smrg	      if test "$with_gnu_ld" = no; then
58452ec8c4b4Smrg	        _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'
58462ec8c4b4Smrg	      else
58472ec8c4b4Smrg	        _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'
58482ec8c4b4Smrg	      fi
58492ec8c4b4Smrg	    fi
58502ec8c4b4Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
58512ec8c4b4Smrg	    ;;
58522ec8c4b4Smrg        esac
58532ec8c4b4Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
58542ec8c4b4Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
58552ec8c4b4Smrg        _LT_TAGVAR(inherit_rpath, $1)=yes
58562ec8c4b4Smrg        ;;
585709885543Smrg
58582ec8c4b4Smrg      linux* | k*bsd*-gnu)
58592ec8c4b4Smrg        case $cc_basename in
58602ec8c4b4Smrg          KCC*)
58612ec8c4b4Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
58622ec8c4b4Smrg
58632ec8c4b4Smrg	    # KCC will only create a shared library if the output file
58642ec8c4b4Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
58652ec8c4b4Smrg	    # to its proper name (with version) after linking.
58662ec8c4b4Smrg	    _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'
58672ec8c4b4Smrg	    _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'
58682ec8c4b4Smrg	    # Commands to make compiler produce verbose output that lists
58692ec8c4b4Smrg	    # what "hidden" libraries, object files and flags are used when
58702ec8c4b4Smrg	    # linking a shared library.
58712ec8c4b4Smrg	    #
58722ec8c4b4Smrg	    # There doesn't appear to be a way to prevent this compiler from
58732ec8c4b4Smrg	    # explicitly linking system object files so we need to strip them
58742ec8c4b4Smrg	    # from the output so that they don't get included in the library
58752ec8c4b4Smrg	    # dependencies.
58762ec8c4b4Smrg	    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'
58772ec8c4b4Smrg
58782ec8c4b4Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
58792ec8c4b4Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
58802ec8c4b4Smrg
58812ec8c4b4Smrg	    # Archives containing C++ object files must be created using
58822ec8c4b4Smrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
58832ec8c4b4Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
58842ec8c4b4Smrg	    ;;
58852ec8c4b4Smrg	  icpc* | ecpc* )
58862ec8c4b4Smrg	    # Intel C++
58872ec8c4b4Smrg	    with_gnu_ld=yes
58882ec8c4b4Smrg	    # version 8.0 and above of icpc choke on multiply defined symbols
58892ec8c4b4Smrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
58902ec8c4b4Smrg	    # earlier do not add the objects themselves.
58912ec8c4b4Smrg	    case `$CC -V 2>&1` in
58922ec8c4b4Smrg	      *"Version 7."*)
58932ec8c4b4Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
58942ec8c4b4Smrg		_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'
58952ec8c4b4Smrg		;;
58962ec8c4b4Smrg	      *)  # Version 8.0 or newer
58972ec8c4b4Smrg	        tmp_idyn=
58982ec8c4b4Smrg	        case $host_cpu in
58992ec8c4b4Smrg		  ia64*) tmp_idyn=' -i_dynamic';;
59002ec8c4b4Smrg		esac
59012ec8c4b4Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
59022ec8c4b4Smrg		_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'
59032ec8c4b4Smrg		;;
59042ec8c4b4Smrg	    esac
59052ec8c4b4Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
59062ec8c4b4Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
59072ec8c4b4Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
59082ec8c4b4Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
59092ec8c4b4Smrg	    ;;
59102ec8c4b4Smrg          pgCC* | pgcpp*)
59112ec8c4b4Smrg            # Portland Group C++ compiler
59122ec8c4b4Smrg	    case `$CC -V` in
59132ec8c4b4Smrg	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
59142ec8c4b4Smrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
59152ec8c4b4Smrg		rm -rf $tpldir~
59162ec8c4b4Smrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
59172ec8c4b4Smrg		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
59182ec8c4b4Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
59192ec8c4b4Smrg		rm -rf $tpldir~
59202ec8c4b4Smrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
59212ec8c4b4Smrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
59222ec8c4b4Smrg		$RANLIB $oldlib'
59232ec8c4b4Smrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
59242ec8c4b4Smrg		rm -rf $tpldir~
59252ec8c4b4Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
59262ec8c4b4Smrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
59272ec8c4b4Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
59282ec8c4b4Smrg		rm -rf $tpldir~
59292ec8c4b4Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
59302ec8c4b4Smrg		$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'
59312ec8c4b4Smrg	      ;;
59322ec8c4b4Smrg	    *) # Version 6 will use weak symbols
59332ec8c4b4Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
59342ec8c4b4Smrg	      _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'
59352ec8c4b4Smrg	      ;;
59362ec8c4b4Smrg	    esac
593709885543Smrg
59382ec8c4b4Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
59392ec8c4b4Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
59402ec8c4b4Smrg	    _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'
59412ec8c4b4Smrg            ;;
59422ec8c4b4Smrg	  cxx*)
59432ec8c4b4Smrg	    # Compaq C++
59442ec8c4b4Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
59452ec8c4b4Smrg	    _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'
594609885543Smrg
59472ec8c4b4Smrg	    runpath_var=LD_RUN_PATH
59482ec8c4b4Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
59492ec8c4b4Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
595009885543Smrg
59512ec8c4b4Smrg	    # Commands to make compiler produce verbose output that lists
59522ec8c4b4Smrg	    # what "hidden" libraries, object files and flags are used when
59532ec8c4b4Smrg	    # linking a shared library.
59542ec8c4b4Smrg	    #
59552ec8c4b4Smrg	    # There doesn't appear to be a way to prevent this compiler from
59562ec8c4b4Smrg	    # explicitly linking system object files so we need to strip them
59572ec8c4b4Smrg	    # from the output so that they don't get included in the library
59582ec8c4b4Smrg	    # dependencies.
59592ec8c4b4Smrg	    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'
59602ec8c4b4Smrg	    ;;
59612ec8c4b4Smrg	  xl*)
59622ec8c4b4Smrg	    # IBM XL 8.0 on PPC, with GNU ld
59632ec8c4b4Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
59642ec8c4b4Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
59652ec8c4b4Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
59662ec8c4b4Smrg	    if test "x$supports_anon_versioning" = xyes; then
59672ec8c4b4Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
59682ec8c4b4Smrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
59692ec8c4b4Smrg		echo "local: *; };" >> $output_objdir/$libname.ver~
59702ec8c4b4Smrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
59712ec8c4b4Smrg	    fi
59722ec8c4b4Smrg	    ;;
59732ec8c4b4Smrg	  *)
59742ec8c4b4Smrg	    case `$CC -V 2>&1 | sed 5q` in
59752ec8c4b4Smrg	    *Sun\ C*)
59762ec8c4b4Smrg	      # Sun C++ 5.9
59772ec8c4b4Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
59782ec8c4b4Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
59792ec8c4b4Smrg	      _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'
59802ec8c4b4Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
59812ec8c4b4Smrg	      _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'
59822ec8c4b4Smrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
59832ec8c4b4Smrg
59842ec8c4b4Smrg	      # Not sure whether something based on
59852ec8c4b4Smrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
59862ec8c4b4Smrg	      # would be better.
59872ec8c4b4Smrg	      output_verbose_link_cmd='echo'
59882ec8c4b4Smrg
59892ec8c4b4Smrg	      # Archives containing C++ object files must be created using
59902ec8c4b4Smrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
59912ec8c4b4Smrg	      # necessary to make sure instantiated templates are included
59922ec8c4b4Smrg	      # in the archive.
59932ec8c4b4Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
59942ec8c4b4Smrg	      ;;
59952ec8c4b4Smrg	    esac
59962ec8c4b4Smrg	    ;;
59972ec8c4b4Smrg	esac
59982ec8c4b4Smrg	;;
599909885543Smrg
60002ec8c4b4Smrg      lynxos*)
60012ec8c4b4Smrg        # FIXME: insert proper C++ library support
60022ec8c4b4Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
60032ec8c4b4Smrg	;;
600409885543Smrg
60052ec8c4b4Smrg      m88k*)
60062ec8c4b4Smrg        # FIXME: insert proper C++ library support
60072ec8c4b4Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
60082ec8c4b4Smrg	;;
600909885543Smrg
60102ec8c4b4Smrg      mvs*)
60112ec8c4b4Smrg        case $cc_basename in
60122ec8c4b4Smrg          cxx*)
60132ec8c4b4Smrg	    # FIXME: insert proper C++ library support
60142ec8c4b4Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
60152ec8c4b4Smrg	    ;;
60162ec8c4b4Smrg	  *)
60172ec8c4b4Smrg	    # FIXME: insert proper C++ library support
60182ec8c4b4Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
60192ec8c4b4Smrg	    ;;
60202ec8c4b4Smrg	esac
60212ec8c4b4Smrg	;;
602209885543Smrg
60232ec8c4b4Smrg      netbsd*)
60242ec8c4b4Smrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
60252ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
60262ec8c4b4Smrg	  wlarc=
60272ec8c4b4Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
60282ec8c4b4Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
60292ec8c4b4Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60302ec8c4b4Smrg	fi
60312ec8c4b4Smrg	# Workaround some broken pre-1.5 toolchains
60322ec8c4b4Smrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
60332ec8c4b4Smrg	;;
603409885543Smrg
60352ec8c4b4Smrg      *nto* | *qnx*)
60362ec8c4b4Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
60372ec8c4b4Smrg	;;
603809885543Smrg
60392ec8c4b4Smrg      openbsd2*)
60402ec8c4b4Smrg        # C++ shared libraries are fairly broken
60412ec8c4b4Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
60422ec8c4b4Smrg	;;
604309885543Smrg
60442ec8c4b4Smrg      openbsd*)
60452ec8c4b4Smrg	if test -f /usr/libexec/ld.so; then
60462ec8c4b4Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
60472ec8c4b4Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60482ec8c4b4Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
60492ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
60502ec8c4b4Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
60512ec8c4b4Smrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
60522ec8c4b4Smrg	    _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'
60532ec8c4b4Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
60542ec8c4b4Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
60552ec8c4b4Smrg	  fi
60562ec8c4b4Smrg	  output_verbose_link_cmd=echo
60572ec8c4b4Smrg	else
60582ec8c4b4Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
60592ec8c4b4Smrg	fi
60602ec8c4b4Smrg	;;
606109885543Smrg
60622ec8c4b4Smrg      osf3* | osf4* | osf5*)
60632ec8c4b4Smrg        case $cc_basename in
60642ec8c4b4Smrg          KCC*)
60652ec8c4b4Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
60662ec8c4b4Smrg
60672ec8c4b4Smrg	    # KCC will only create a shared library if the output file
60682ec8c4b4Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
60692ec8c4b4Smrg	    # to its proper name (with version) after linking.
60702ec8c4b4Smrg	    _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'
60712ec8c4b4Smrg
60722ec8c4b4Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
60732ec8c4b4Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
60742ec8c4b4Smrg
60752ec8c4b4Smrg	    # Archives containing C++ object files must be created using
60762ec8c4b4Smrg	    # the KAI C++ compiler.
60772ec8c4b4Smrg	    case $host in
60782ec8c4b4Smrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
60792ec8c4b4Smrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
60802ec8c4b4Smrg	    esac
60812ec8c4b4Smrg	    ;;
60822ec8c4b4Smrg          RCC*)
60832ec8c4b4Smrg	    # Rational C++ 2.4.1
60842ec8c4b4Smrg	    # FIXME: insert proper C++ library support
60852ec8c4b4Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
60862ec8c4b4Smrg	    ;;
60872ec8c4b4Smrg          cxx*)
60882ec8c4b4Smrg	    case $host in
60892ec8c4b4Smrg	      osf3*)
60902ec8c4b4Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
60912ec8c4b4Smrg	        _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'
60922ec8c4b4Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
60932ec8c4b4Smrg		;;
60942ec8c4b4Smrg	      *)
60952ec8c4b4Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
60962ec8c4b4Smrg	        _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'
60972ec8c4b4Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
60982ec8c4b4Smrg	          echo "-hidden">> $lib.exp~
60992ec8c4b4Smrg	          $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~
61002ec8c4b4Smrg	          $RM $lib.exp'
61012ec8c4b4Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
61022ec8c4b4Smrg		;;
61032ec8c4b4Smrg	    esac
610409885543Smrg
61052ec8c4b4Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
610609885543Smrg
61072ec8c4b4Smrg	    # Commands to make compiler produce verbose output that lists
61082ec8c4b4Smrg	    # what "hidden" libraries, object files and flags are used when
61092ec8c4b4Smrg	    # linking a shared library.
61102ec8c4b4Smrg	    #
61112ec8c4b4Smrg	    # There doesn't appear to be a way to prevent this compiler from
61122ec8c4b4Smrg	    # explicitly linking system object files so we need to strip them
61132ec8c4b4Smrg	    # from the output so that they don't get included in the library
61142ec8c4b4Smrg	    # dependencies.
61152ec8c4b4Smrg	    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'
61162ec8c4b4Smrg	    ;;
61172ec8c4b4Smrg	  *)
61182ec8c4b4Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
61192ec8c4b4Smrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
61202ec8c4b4Smrg	      case $host in
61212ec8c4b4Smrg	        osf3*)
61222ec8c4b4Smrg	          _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'
61232ec8c4b4Smrg		  ;;
61242ec8c4b4Smrg	        *)
61252ec8c4b4Smrg	          _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'
61262ec8c4b4Smrg		  ;;
61272ec8c4b4Smrg	      esac
61282ec8c4b4Smrg
61292ec8c4b4Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
61302ec8c4b4Smrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
61312ec8c4b4Smrg
61322ec8c4b4Smrg	      # Commands to make compiler produce verbose output that lists
61332ec8c4b4Smrg	      # what "hidden" libraries, object files and flags are used when
61342ec8c4b4Smrg	      # linking a shared library.
61352ec8c4b4Smrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
61362ec8c4b4Smrg
61372ec8c4b4Smrg	    else
61382ec8c4b4Smrg	      # FIXME: insert proper C++ library support
61392ec8c4b4Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
61402ec8c4b4Smrg	    fi
61412ec8c4b4Smrg	    ;;
61422ec8c4b4Smrg        esac
61432ec8c4b4Smrg        ;;
614409885543Smrg
61452ec8c4b4Smrg      psos*)
61462ec8c4b4Smrg        # FIXME: insert proper C++ library support
61472ec8c4b4Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
61482ec8c4b4Smrg        ;;
614909885543Smrg
61502ec8c4b4Smrg      sunos4*)
61512ec8c4b4Smrg        case $cc_basename in
61522ec8c4b4Smrg          CC*)
61532ec8c4b4Smrg	    # Sun C++ 4.x
61542ec8c4b4Smrg	    # FIXME: insert proper C++ library support
61552ec8c4b4Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
61562ec8c4b4Smrg	    ;;
61572ec8c4b4Smrg          lcc*)
61582ec8c4b4Smrg	    # Lucid
61592ec8c4b4Smrg	    # FIXME: insert proper C++ library support
61602ec8c4b4Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
61612ec8c4b4Smrg	    ;;
61622ec8c4b4Smrg          *)
61632ec8c4b4Smrg	    # FIXME: insert proper C++ library support
61642ec8c4b4Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
61652ec8c4b4Smrg	    ;;
61662ec8c4b4Smrg        esac
61672ec8c4b4Smrg        ;;
616809885543Smrg
61692ec8c4b4Smrg      solaris*)
61702ec8c4b4Smrg        case $cc_basename in
61712ec8c4b4Smrg          CC*)
61722ec8c4b4Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
61732ec8c4b4Smrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
61742ec8c4b4Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
61752ec8c4b4Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
61762ec8c4b4Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
61772ec8c4b4Smrg	      $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'
61782ec8c4b4Smrg
61792ec8c4b4Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
61802ec8c4b4Smrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
61812ec8c4b4Smrg	    case $host_os in
61822ec8c4b4Smrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
61832ec8c4b4Smrg	      *)
61842ec8c4b4Smrg		# The compiler driver will combine and reorder linker options,
61852ec8c4b4Smrg		# but understands `-z linker_flag'.
61862ec8c4b4Smrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
61872ec8c4b4Smrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
61882ec8c4b4Smrg	        ;;
61892ec8c4b4Smrg	    esac
61902ec8c4b4Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
619109885543Smrg
61922ec8c4b4Smrg	    output_verbose_link_cmd='echo'
619309885543Smrg
61942ec8c4b4Smrg	    # Archives containing C++ object files must be created using
61952ec8c4b4Smrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
61962ec8c4b4Smrg	    # necessary to make sure instantiated templates are included
61972ec8c4b4Smrg	    # in the archive.
61982ec8c4b4Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
61992ec8c4b4Smrg	    ;;
62002ec8c4b4Smrg          gcx*)
62012ec8c4b4Smrg	    # Green Hills C++ Compiler
62022ec8c4b4Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
620309885543Smrg
62042ec8c4b4Smrg	    # The C++ compiler must be used to create the archive.
62052ec8c4b4Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
62062ec8c4b4Smrg	    ;;
62072ec8c4b4Smrg          *)
62082ec8c4b4Smrg	    # GNU C++ compiler with Solaris linker
62092ec8c4b4Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
62102ec8c4b4Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
62112ec8c4b4Smrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
62122ec8c4b4Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
62132ec8c4b4Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
62142ec8c4b4Smrg		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
62152ec8c4b4Smrg
62162ec8c4b4Smrg	        # Commands to make compiler produce verbose output that lists
62172ec8c4b4Smrg	        # what "hidden" libraries, object files and flags are used when
62182ec8c4b4Smrg	        # linking a shared library.
62192ec8c4b4Smrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
62202ec8c4b4Smrg	      else
62212ec8c4b4Smrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
62222ec8c4b4Smrg	        # platform.
62232ec8c4b4Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
62242ec8c4b4Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
62252ec8c4b4Smrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
62262ec8c4b4Smrg
62272ec8c4b4Smrg	        # Commands to make compiler produce verbose output that lists
62282ec8c4b4Smrg	        # what "hidden" libraries, object files and flags are used when
62292ec8c4b4Smrg	        # linking a shared library.
62302ec8c4b4Smrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
62312ec8c4b4Smrg	      fi
62322ec8c4b4Smrg
62332ec8c4b4Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
62342ec8c4b4Smrg	      case $host_os in
62352ec8c4b4Smrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
62362ec8c4b4Smrg		*)
62372ec8c4b4Smrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
62382ec8c4b4Smrg		  ;;
62392ec8c4b4Smrg	      esac
62402ec8c4b4Smrg	    fi
62412ec8c4b4Smrg	    ;;
62422ec8c4b4Smrg        esac
62432ec8c4b4Smrg        ;;
624409885543Smrg
62452ec8c4b4Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
62462ec8c4b4Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
62472ec8c4b4Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
62482ec8c4b4Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
62492ec8c4b4Smrg      runpath_var='LD_RUN_PATH'
625009885543Smrg
62512ec8c4b4Smrg      case $cc_basename in
62522ec8c4b4Smrg        CC*)
62532ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
62542ec8c4b4Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
62552ec8c4b4Smrg	  ;;
62562ec8c4b4Smrg	*)
62572ec8c4b4Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
62582ec8c4b4Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
62592ec8c4b4Smrg	  ;;
62602ec8c4b4Smrg      esac
62612ec8c4b4Smrg      ;;
626209885543Smrg
62632ec8c4b4Smrg      sysv5* | sco3.2v5* | sco5v6*)
62642ec8c4b4Smrg	# Note: We can NOT use -z defs as we might desire, because we do not
62652ec8c4b4Smrg	# link with -lc, and that would cause any symbols used from libc to
62662ec8c4b4Smrg	# always be unresolved, which means just about no library would
62672ec8c4b4Smrg	# ever link correctly.  If we're not using GNU ld we use -z text
62682ec8c4b4Smrg	# though, which does catch some bad symbols but isn't as heavy-handed
62692ec8c4b4Smrg	# as -z defs.
62702ec8c4b4Smrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
62712ec8c4b4Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
62722ec8c4b4Smrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
62732ec8c4b4Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
62742ec8c4b4Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
62752ec8c4b4Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
62762ec8c4b4Smrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
62772ec8c4b4Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
62782ec8c4b4Smrg	runpath_var='LD_RUN_PATH'
627909885543Smrg
62802ec8c4b4Smrg	case $cc_basename in
62812ec8c4b4Smrg          CC*)
62822ec8c4b4Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
62832ec8c4b4Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
62842ec8c4b4Smrg	    ;;
62852ec8c4b4Smrg	  *)
62862ec8c4b4Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
62872ec8c4b4Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
62882ec8c4b4Smrg	    ;;
62892ec8c4b4Smrg	esac
62902ec8c4b4Smrg      ;;
629109885543Smrg
62922ec8c4b4Smrg      tandem*)
62932ec8c4b4Smrg        case $cc_basename in
62942ec8c4b4Smrg          NCC*)
62952ec8c4b4Smrg	    # NonStop-UX NCC 3.20
62962ec8c4b4Smrg	    # FIXME: insert proper C++ library support
62972ec8c4b4Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
62982ec8c4b4Smrg	    ;;
62992ec8c4b4Smrg          *)
63002ec8c4b4Smrg	    # FIXME: insert proper C++ library support
63012ec8c4b4Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
63022ec8c4b4Smrg	    ;;
63032ec8c4b4Smrg        esac
63042ec8c4b4Smrg        ;;
630509885543Smrg
63062ec8c4b4Smrg      vxworks*)
63072ec8c4b4Smrg        # FIXME: insert proper C++ library support
63082ec8c4b4Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
63092ec8c4b4Smrg        ;;
631009885543Smrg
63112ec8c4b4Smrg      *)
63122ec8c4b4Smrg        # FIXME: insert proper C++ library support
63132ec8c4b4Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
63142ec8c4b4Smrg        ;;
63152ec8c4b4Smrg    esac
631609885543Smrg
63172ec8c4b4Smrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
63182ec8c4b4Smrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
63192ec8c4b4Smrg
63202ec8c4b4Smrg    _LT_TAGVAR(GCC, $1)="$GXX"
63212ec8c4b4Smrg    _LT_TAGVAR(LD, $1)="$LD"
63222ec8c4b4Smrg
63232ec8c4b4Smrg    ## CAVEAT EMPTOR:
63242ec8c4b4Smrg    ## There is no encapsulation within the following macros, do not change
63252ec8c4b4Smrg    ## the running order or otherwise move them around unless you know exactly
63262ec8c4b4Smrg    ## what you are doing...
63272ec8c4b4Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
63282ec8c4b4Smrg    _LT_COMPILER_PIC($1)
63292ec8c4b4Smrg    _LT_COMPILER_C_O($1)
63302ec8c4b4Smrg    _LT_COMPILER_FILE_LOCKS($1)
63312ec8c4b4Smrg    _LT_LINKER_SHLIBS($1)
63322ec8c4b4Smrg    _LT_SYS_DYNAMIC_LINKER($1)
63332ec8c4b4Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
63342ec8c4b4Smrg
63352ec8c4b4Smrg    _LT_CONFIG($1)
63362ec8c4b4Smrg  fi # test -n "$compiler"
63372ec8c4b4Smrg
63382ec8c4b4Smrg  CC=$lt_save_CC
63392ec8c4b4Smrg  LDCXX=$LD
63402ec8c4b4Smrg  LD=$lt_save_LD
63412ec8c4b4Smrg  GCC=$lt_save_GCC
63422ec8c4b4Smrg  with_gnu_ld=$lt_save_with_gnu_ld
63432ec8c4b4Smrg  lt_cv_path_LDCXX=$lt_cv_path_LD
63442ec8c4b4Smrg  lt_cv_path_LD=$lt_save_path_LD
63452ec8c4b4Smrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
63462ec8c4b4Smrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
63472ec8c4b4Smrgfi # test "$_lt_caught_CXX_error" != yes
634809885543Smrg
63492ec8c4b4SmrgAC_LANG_POP
63502ec8c4b4Smrg])# _LT_LANG_CXX_CONFIG
635109885543Smrg
635209885543Smrg
63532ec8c4b4Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
63542ec8c4b4Smrg# ---------------------------------
63552ec8c4b4Smrg# Figure out "hidden" library dependencies from verbose
63562ec8c4b4Smrg# compiler output when linking a shared library.
63572ec8c4b4Smrg# Parse the compiler output and extract the necessary
63582ec8c4b4Smrg# objects, libraries and library flags.
63592ec8c4b4Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
63602ec8c4b4Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
63612ec8c4b4Smrg# Dependencies to place before and after the object being linked:
63622ec8c4b4Smrg_LT_TAGVAR(predep_objects, $1)=
63632ec8c4b4Smrg_LT_TAGVAR(postdep_objects, $1)=
63642ec8c4b4Smrg_LT_TAGVAR(predeps, $1)=
63652ec8c4b4Smrg_LT_TAGVAR(postdeps, $1)=
63662ec8c4b4Smrg_LT_TAGVAR(compiler_lib_search_path, $1)=
636709885543Smrg
63682ec8c4b4Smrgdnl we can't use the lt_simple_compile_test_code here,
63692ec8c4b4Smrgdnl because it contains code intended for an executable,
63702ec8c4b4Smrgdnl not a library.  It's possible we should let each
63712ec8c4b4Smrgdnl tag define a new lt_????_link_test_code variable,
63722ec8c4b4Smrgdnl but it's only used here...
63732ec8c4b4Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
63742ec8c4b4Smrgint a;
63752ec8c4b4Smrgvoid foo (void) { a = 0; }
63762ec8c4b4Smrg_LT_EOF
63772ec8c4b4Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
63782ec8c4b4Smrgclass Foo
637909885543Smrg{
63802ec8c4b4Smrgpublic:
63812ec8c4b4Smrg  Foo (void) { a = 0; }
63822ec8c4b4Smrgprivate:
63832ec8c4b4Smrg  int a;
63842ec8c4b4Smrg};
63852ec8c4b4Smrg_LT_EOF
63862ec8c4b4Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
63872ec8c4b4Smrg      subroutine foo
63882ec8c4b4Smrg      implicit none
63892ec8c4b4Smrg      integer*4 a
63902ec8c4b4Smrg      a=0
63912ec8c4b4Smrg      return
63922ec8c4b4Smrg      end
63932ec8c4b4Smrg_LT_EOF
63942ec8c4b4Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
63952ec8c4b4Smrg      subroutine foo
63962ec8c4b4Smrg      implicit none
63972ec8c4b4Smrg      integer a
63982ec8c4b4Smrg      a=0
63992ec8c4b4Smrg      return
64002ec8c4b4Smrg      end
64012ec8c4b4Smrg_LT_EOF
64022ec8c4b4Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
64032ec8c4b4Smrgpublic class foo {
64042ec8c4b4Smrg  private int a;
64052ec8c4b4Smrg  public void bar (void) {
64062ec8c4b4Smrg    a = 0;
64072ec8c4b4Smrg  }
640809885543Smrg};
64092ec8c4b4Smrg_LT_EOF
64102ec8c4b4Smrg])
64112ec8c4b4Smrgdnl Parse the compiler output and extract the necessary
64122ec8c4b4Smrgdnl objects, libraries and library flags.
64132ec8c4b4Smrgif AC_TRY_EVAL(ac_compile); then
64142ec8c4b4Smrg  # Parse the compiler output and extract the necessary
64152ec8c4b4Smrg  # objects, libraries and library flags.
641609885543Smrg
64172ec8c4b4Smrg  # Sentinel used to keep track of whether or not we are before
64182ec8c4b4Smrg  # the conftest object file.
64192ec8c4b4Smrg  pre_test_object_deps_done=no
642009885543Smrg
64212ec8c4b4Smrg  for p in `eval "$output_verbose_link_cmd"`; do
64222ec8c4b4Smrg    case $p in
64232ec8c4b4Smrg
64242ec8c4b4Smrg    -L* | -R* | -l*)
64252ec8c4b4Smrg       # Some compilers place space between "-{L,R}" and the path.
64262ec8c4b4Smrg       # Remove the space.
64272ec8c4b4Smrg       if test $p = "-L" ||
64282ec8c4b4Smrg          test $p = "-R"; then
64292ec8c4b4Smrg	 prev=$p
64302ec8c4b4Smrg	 continue
64312ec8c4b4Smrg       else
64322ec8c4b4Smrg	 prev=
64332ec8c4b4Smrg       fi
64342ec8c4b4Smrg
64352ec8c4b4Smrg       if test "$pre_test_object_deps_done" = no; then
64362ec8c4b4Smrg	 case $p in
64372ec8c4b4Smrg	 -L* | -R*)
64382ec8c4b4Smrg	   # Internal compiler library paths should come after those
64392ec8c4b4Smrg	   # provided the user.  The postdeps already come after the
64402ec8c4b4Smrg	   # user supplied libs so there is no need to process them.
64412ec8c4b4Smrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
64422ec8c4b4Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
64432ec8c4b4Smrg	   else
64442ec8c4b4Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
64452ec8c4b4Smrg	   fi
64462ec8c4b4Smrg	   ;;
64472ec8c4b4Smrg	 # The "-l" case would never come before the object being
64482ec8c4b4Smrg	 # linked, so don't bother handling this case.
64492ec8c4b4Smrg	 esac
64502ec8c4b4Smrg       else
64512ec8c4b4Smrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
64522ec8c4b4Smrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
64532ec8c4b4Smrg	 else
64542ec8c4b4Smrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
64552ec8c4b4Smrg	 fi
64562ec8c4b4Smrg       fi
64572ec8c4b4Smrg       ;;
64582ec8c4b4Smrg
64592ec8c4b4Smrg    *.$objext)
64602ec8c4b4Smrg       # This assumes that the test object file only shows up
64612ec8c4b4Smrg       # once in the compiler output.
64622ec8c4b4Smrg       if test "$p" = "conftest.$objext"; then
64632ec8c4b4Smrg	 pre_test_object_deps_done=yes
64642ec8c4b4Smrg	 continue
64652ec8c4b4Smrg       fi
64662ec8c4b4Smrg
64672ec8c4b4Smrg       if test "$pre_test_object_deps_done" = no; then
64682ec8c4b4Smrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
64692ec8c4b4Smrg	   _LT_TAGVAR(predep_objects, $1)="$p"
64702ec8c4b4Smrg	 else
64712ec8c4b4Smrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
64722ec8c4b4Smrg	 fi
64732ec8c4b4Smrg       else
64742ec8c4b4Smrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
64752ec8c4b4Smrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
64762ec8c4b4Smrg	 else
64772ec8c4b4Smrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
64782ec8c4b4Smrg	 fi
64792ec8c4b4Smrg       fi
64802ec8c4b4Smrg       ;;
64812ec8c4b4Smrg
64822ec8c4b4Smrg    *) ;; # Ignore the rest.
64832ec8c4b4Smrg
64842ec8c4b4Smrg    esac
64852ec8c4b4Smrg  done
64862ec8c4b4Smrg
64872ec8c4b4Smrg  # Clean up.
64882ec8c4b4Smrg  rm -f a.out a.exe
648909885543Smrgelse
64902ec8c4b4Smrg  echo "libtool.m4: error: problem compiling $1 test program"
649109885543Smrgfi
649209885543Smrg
64932ec8c4b4Smrg$RM -f confest.$objext
649409885543Smrg
64952ec8c4b4Smrg# PORTME: override above test on systems where it is broken
64962ec8c4b4Smrgm4_if([$1], [CXX],
64972ec8c4b4Smrg[case $host_os in
64982ec8c4b4Smrginterix[[3-9]]*)
64992ec8c4b4Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
65002ec8c4b4Smrg  # hack all around it, let's just trust "g++" to DTRT.
65012ec8c4b4Smrg  _LT_TAGVAR(predep_objects,$1)=
65022ec8c4b4Smrg  _LT_TAGVAR(postdep_objects,$1)=
65032ec8c4b4Smrg  _LT_TAGVAR(postdeps,$1)=
65042ec8c4b4Smrg  ;;
650509885543Smrg
65062ec8c4b4Smrglinux*)
65072ec8c4b4Smrg  case `$CC -V 2>&1 | sed 5q` in
65082ec8c4b4Smrg  *Sun\ C*)
65092ec8c4b4Smrg    # Sun C++ 5.9
651009885543Smrg
65112ec8c4b4Smrg    # The more standards-conforming stlport4 library is
65122ec8c4b4Smrg    # incompatible with the Cstd library. Avoid specifying
65132ec8c4b4Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
65142ec8c4b4Smrg    # -library=stlport4 depends on it.
65152ec8c4b4Smrg    case " $CXX $CXXFLAGS " in
65162ec8c4b4Smrg    *" -library=stlport4 "*)
65172ec8c4b4Smrg      solaris_use_stlport4=yes
651809885543Smrg      ;;
65192ec8c4b4Smrg    esac
65202ec8c4b4Smrg
65212ec8c4b4Smrg    if test "$solaris_use_stlport4" != yes; then
65222ec8c4b4Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
65232ec8c4b4Smrg    fi
65242ec8c4b4Smrg    ;;
65252ec8c4b4Smrg  esac
65262ec8c4b4Smrg  ;;
65272ec8c4b4Smrg
65282ec8c4b4Smrgsolaris*)
65292ec8c4b4Smrg  case $cc_basename in
65302ec8c4b4Smrg  CC*)
65312ec8c4b4Smrg    # The more standards-conforming stlport4 library is
65322ec8c4b4Smrg    # incompatible with the Cstd library. Avoid specifying
65332ec8c4b4Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
65342ec8c4b4Smrg    # -library=stlport4 depends on it.
65352ec8c4b4Smrg    case " $CXX $CXXFLAGS " in
65362ec8c4b4Smrg    *" -library=stlport4 "*)
65372ec8c4b4Smrg      solaris_use_stlport4=yes
653809885543Smrg      ;;
653909885543Smrg    esac
65402ec8c4b4Smrg
65412ec8c4b4Smrg    # Adding this requires a known-good setup of shared libraries for
65422ec8c4b4Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
65432ec8c4b4Smrg    # archive will be linked into the output, leading to subtle bugs.
65442ec8c4b4Smrg    if test "$solaris_use_stlport4" != yes; then
65452ec8c4b4Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
65462ec8c4b4Smrg    fi
65472ec8c4b4Smrg    ;;
65482ec8c4b4Smrg  esac
65492ec8c4b4Smrg  ;;
65502ec8c4b4Smrgesac
65512ec8c4b4Smrg])
65522ec8c4b4Smrg
65532ec8c4b4Smrgcase " $_LT_TAGVAR(postdeps, $1) " in
65542ec8c4b4Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
65552ec8c4b4Smrgesac
65562ec8c4b4Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
65572ec8c4b4Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
65582ec8c4b4Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
65592ec8c4b4Smrgfi
65602ec8c4b4Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
65612ec8c4b4Smrg    [The directories searched by this compiler when creating a shared library])
65622ec8c4b4Smrg_LT_TAGDECL([], [predep_objects], [1],
65632ec8c4b4Smrg    [Dependencies to place before and after the objects being linked to
65642ec8c4b4Smrg    create a shared library])
65652ec8c4b4Smrg_LT_TAGDECL([], [postdep_objects], [1])
65662ec8c4b4Smrg_LT_TAGDECL([], [predeps], [1])
65672ec8c4b4Smrg_LT_TAGDECL([], [postdeps], [1])
65682ec8c4b4Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
65692ec8c4b4Smrg    [The library search path used internally by the compiler when linking
65702ec8c4b4Smrg    a shared library])
65712ec8c4b4Smrg])# _LT_SYS_HIDDEN_LIBDEPS
65722ec8c4b4Smrg
65732ec8c4b4Smrg
65742ec8c4b4Smrg# _LT_PROG_F77
65752ec8c4b4Smrg# ------------
65762ec8c4b4Smrg# Since AC_PROG_F77 is broken, in that it returns the empty string
65772ec8c4b4Smrg# if there is no fortran compiler, we have our own version here.
65782ec8c4b4Smrgm4_defun([_LT_PROG_F77],
65792ec8c4b4Smrg[
65802ec8c4b4Smrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
65812ec8c4b4SmrgAC_PROG_F77
65822ec8c4b4Smrgif test -z "$F77" || test "X$F77" = "Xno"; then
65832ec8c4b4Smrg  _lt_disable_F77=yes
65842ec8c4b4Smrgfi
65852ec8c4b4Smrgpopdef([AC_MSG_ERROR])
65862ec8c4b4Smrg])# _LT_PROG_F77
65872ec8c4b4Smrg
65882ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
65892ec8c4b4Smrgdnl AC_DEFUN([_LT_PROG_F77], [])
65902ec8c4b4Smrg
65912ec8c4b4Smrg
65922ec8c4b4Smrg# _LT_LANG_F77_CONFIG([TAG])
65932ec8c4b4Smrg# --------------------------
65942ec8c4b4Smrg# Ensure that the configuration variables for a Fortran 77 compiler are
65952ec8c4b4Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
65962ec8c4b4Smrg# to write the compiler configuration to `libtool'.
65972ec8c4b4Smrgm4_defun([_LT_LANG_F77_CONFIG],
65982ec8c4b4Smrg[AC_REQUIRE([_LT_PROG_F77])dnl
65992ec8c4b4SmrgAC_LANG_PUSH(Fortran 77)
66002ec8c4b4Smrg
66012ec8c4b4Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
66022ec8c4b4Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
66032ec8c4b4Smrg_LT_TAGVAR(always_export_symbols, $1)=no
66042ec8c4b4Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
66052ec8c4b4Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
66062ec8c4b4Smrg_LT_TAGVAR(hardcode_direct, $1)=no
66072ec8c4b4Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
66082ec8c4b4Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
66092ec8c4b4Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
66102ec8c4b4Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
66112ec8c4b4Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
66122ec8c4b4Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
66132ec8c4b4Smrg_LT_TAGVAR(inherit_rpath, $1)=no
66142ec8c4b4Smrg_LT_TAGVAR(module_cmds, $1)=
66152ec8c4b4Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
66162ec8c4b4Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
66172ec8c4b4Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
66182ec8c4b4Smrg_LT_TAGVAR(no_undefined_flag, $1)=
66192ec8c4b4Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
66202ec8c4b4Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
66212ec8c4b4Smrg
66222ec8c4b4Smrg# Source file extension for f77 test sources.
66232ec8c4b4Smrgac_ext=f
66242ec8c4b4Smrg
66252ec8c4b4Smrg# Object file extension for compiled f77 test sources.
66262ec8c4b4Smrgobjext=o
66272ec8c4b4Smrg_LT_TAGVAR(objext, $1)=$objext
66282ec8c4b4Smrg
66292ec8c4b4Smrg# No sense in running all these tests if we already determined that
66302ec8c4b4Smrg# the F77 compiler isn't working.  Some variables (like enable_shared)
66312ec8c4b4Smrg# are currently assumed to apply to all compilers on this platform,
66322ec8c4b4Smrg# and will be corrupted by setting them based on a non-working compiler.
66332ec8c4b4Smrgif test "$_lt_disable_F77" != yes; then
66342ec8c4b4Smrg  # Code to be used in simple compile tests
66352ec8c4b4Smrg  lt_simple_compile_test_code="\
66362ec8c4b4Smrg      subroutine t
66372ec8c4b4Smrg      return
66382ec8c4b4Smrg      end
66392ec8c4b4Smrg"
66402ec8c4b4Smrg
66412ec8c4b4Smrg  # Code to be used in simple link tests
66422ec8c4b4Smrg  lt_simple_link_test_code="\
66432ec8c4b4Smrg      program t
66442ec8c4b4Smrg      end
66452ec8c4b4Smrg"
66462ec8c4b4Smrg
66472ec8c4b4Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
66482ec8c4b4Smrg  _LT_TAG_COMPILER
66492ec8c4b4Smrg
66502ec8c4b4Smrg  # save warnings/boilerplate of simple test code
66512ec8c4b4Smrg  _LT_COMPILER_BOILERPLATE
66522ec8c4b4Smrg  _LT_LINKER_BOILERPLATE
66532ec8c4b4Smrg
66542ec8c4b4Smrg  # Allow CC to be a program name with arguments.
66552ec8c4b4Smrg  lt_save_CC="$CC"
66562ec8c4b4Smrg  lt_save_GCC=$GCC
66572ec8c4b4Smrg  CC=${F77-"f77"}
66582ec8c4b4Smrg  compiler=$CC
66592ec8c4b4Smrg  _LT_TAGVAR(compiler, $1)=$CC
66602ec8c4b4Smrg  _LT_CC_BASENAME([$compiler])
66612ec8c4b4Smrg  GCC=$G77
66622ec8c4b4Smrg  if test -n "$compiler"; then
66632ec8c4b4Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
66642ec8c4b4Smrg    AC_MSG_RESULT([$can_build_shared])
66652ec8c4b4Smrg
66662ec8c4b4Smrg    AC_MSG_CHECKING([whether to build shared libraries])
66672ec8c4b4Smrg    test "$can_build_shared" = "no" && enable_shared=no
66682ec8c4b4Smrg
66692ec8c4b4Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
66702ec8c4b4Smrg    # are all built from PIC.
667109885543Smrg    case $host_os in
66722ec8c4b4Smrg      aix3*)
66732ec8c4b4Smrg        test "$enable_shared" = yes && enable_static=no
66742ec8c4b4Smrg        if test -n "$RANLIB"; then
66752ec8c4b4Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
66762ec8c4b4Smrg          postinstall_cmds='$RANLIB $lib'
66772ec8c4b4Smrg        fi
66782ec8c4b4Smrg        ;;
66797104f784Smrg      aix[[4-9]]*)
66802ec8c4b4Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
66812ec8c4b4Smrg	  test "$enable_shared" = yes && enable_static=no
668209885543Smrg	fi
66832ec8c4b4Smrg        ;;
668409885543Smrg    esac
66852ec8c4b4Smrg    AC_MSG_RESULT([$enable_shared])
66862ec8c4b4Smrg
66872ec8c4b4Smrg    AC_MSG_CHECKING([whether to build static libraries])
66882ec8c4b4Smrg    # Make sure either enable_shared or enable_static is yes.
66892ec8c4b4Smrg    test "$enable_shared" = yes || enable_static=yes
66902ec8c4b4Smrg    AC_MSG_RESULT([$enable_static])
66912ec8c4b4Smrg
66922ec8c4b4Smrg    _LT_TAGVAR(GCC, $1)="$G77"
66932ec8c4b4Smrg    _LT_TAGVAR(LD, $1)="$LD"
66942ec8c4b4Smrg
66952ec8c4b4Smrg    ## CAVEAT EMPTOR:
66962ec8c4b4Smrg    ## There is no encapsulation within the following macros, do not change
66972ec8c4b4Smrg    ## the running order or otherwise move them around unless you know exactly
66982ec8c4b4Smrg    ## what you are doing...
66992ec8c4b4Smrg    _LT_COMPILER_PIC($1)
67002ec8c4b4Smrg    _LT_COMPILER_C_O($1)
67012ec8c4b4Smrg    _LT_COMPILER_FILE_LOCKS($1)
67022ec8c4b4Smrg    _LT_LINKER_SHLIBS($1)
67032ec8c4b4Smrg    _LT_SYS_DYNAMIC_LINKER($1)
67042ec8c4b4Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
67052ec8c4b4Smrg
67062ec8c4b4Smrg    _LT_CONFIG($1)
67072ec8c4b4Smrg  fi # test -n "$compiler"
67082ec8c4b4Smrg
67092ec8c4b4Smrg  GCC=$lt_save_GCC
67102ec8c4b4Smrg  CC="$lt_save_CC"
67112ec8c4b4Smrgfi # test "$_lt_disable_F77" != yes
67122ec8c4b4Smrg
67132ec8c4b4SmrgAC_LANG_POP
67142ec8c4b4Smrg])# _LT_LANG_F77_CONFIG
67152ec8c4b4Smrg
67162ec8c4b4Smrg
67172ec8c4b4Smrg# _LT_PROG_FC
67182ec8c4b4Smrg# -----------
67192ec8c4b4Smrg# Since AC_PROG_FC is broken, in that it returns the empty string
67202ec8c4b4Smrg# if there is no fortran compiler, we have our own version here.
67212ec8c4b4Smrgm4_defun([_LT_PROG_FC],
672209885543Smrg[
67232ec8c4b4Smrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
67242ec8c4b4SmrgAC_PROG_FC
67252ec8c4b4Smrgif test -z "$FC" || test "X$FC" = "Xno"; then
67262ec8c4b4Smrg  _lt_disable_FC=yes
67272ec8c4b4Smrgfi
67282ec8c4b4Smrgpopdef([AC_MSG_ERROR])
67292ec8c4b4Smrg])# _LT_PROG_FC
67302ec8c4b4Smrg
67312ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
67322ec8c4b4Smrgdnl AC_DEFUN([_LT_PROG_FC], [])
67332ec8c4b4Smrg
67342ec8c4b4Smrg
67352ec8c4b4Smrg# _LT_LANG_FC_CONFIG([TAG])
67362ec8c4b4Smrg# -------------------------
67372ec8c4b4Smrg# Ensure that the configuration variables for a Fortran compiler are
67382ec8c4b4Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
67392ec8c4b4Smrg# to write the compiler configuration to `libtool'.
67402ec8c4b4Smrgm4_defun([_LT_LANG_FC_CONFIG],
67412ec8c4b4Smrg[AC_REQUIRE([_LT_PROG_FC])dnl
67422ec8c4b4SmrgAC_LANG_PUSH(Fortran)
67432ec8c4b4Smrg
67442ec8c4b4Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
67452ec8c4b4Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
67462ec8c4b4Smrg_LT_TAGVAR(always_export_symbols, $1)=no
67472ec8c4b4Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
67482ec8c4b4Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
67492ec8c4b4Smrg_LT_TAGVAR(hardcode_direct, $1)=no
67502ec8c4b4Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
67512ec8c4b4Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
67522ec8c4b4Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
67532ec8c4b4Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
67542ec8c4b4Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
67552ec8c4b4Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
67562ec8c4b4Smrg_LT_TAGVAR(inherit_rpath, $1)=no
67572ec8c4b4Smrg_LT_TAGVAR(module_cmds, $1)=
67582ec8c4b4Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
67592ec8c4b4Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
67602ec8c4b4Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
67612ec8c4b4Smrg_LT_TAGVAR(no_undefined_flag, $1)=
67622ec8c4b4Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
67632ec8c4b4Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
67642ec8c4b4Smrg
67652ec8c4b4Smrg# Source file extension for fc test sources.
67662ec8c4b4Smrgac_ext=${ac_fc_srcext-f}
67672ec8c4b4Smrg
67682ec8c4b4Smrg# Object file extension for compiled fc test sources.
67692ec8c4b4Smrgobjext=o
67702ec8c4b4Smrg_LT_TAGVAR(objext, $1)=$objext
67712ec8c4b4Smrg
67722ec8c4b4Smrg# No sense in running all these tests if we already determined that
67732ec8c4b4Smrg# the FC compiler isn't working.  Some variables (like enable_shared)
67742ec8c4b4Smrg# are currently assumed to apply to all compilers on this platform,
67752ec8c4b4Smrg# and will be corrupted by setting them based on a non-working compiler.
67762ec8c4b4Smrgif test "$_lt_disable_FC" != yes; then
67772ec8c4b4Smrg  # Code to be used in simple compile tests
67782ec8c4b4Smrg  lt_simple_compile_test_code="\
67792ec8c4b4Smrg      subroutine t
67802ec8c4b4Smrg      return
67812ec8c4b4Smrg      end
67822ec8c4b4Smrg"
67832ec8c4b4Smrg
67842ec8c4b4Smrg  # Code to be used in simple link tests
67852ec8c4b4Smrg  lt_simple_link_test_code="\
67862ec8c4b4Smrg      program t
67872ec8c4b4Smrg      end
67882ec8c4b4Smrg"
67892ec8c4b4Smrg
67902ec8c4b4Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
67912ec8c4b4Smrg  _LT_TAG_COMPILER
679209885543Smrg
67932ec8c4b4Smrg  # save warnings/boilerplate of simple test code
67942ec8c4b4Smrg  _LT_COMPILER_BOILERPLATE
67952ec8c4b4Smrg  _LT_LINKER_BOILERPLATE
67962ec8c4b4Smrg
67972ec8c4b4Smrg  # Allow CC to be a program name with arguments.
67982ec8c4b4Smrg  lt_save_CC="$CC"
67992ec8c4b4Smrg  lt_save_GCC=$GCC
68002ec8c4b4Smrg  CC=${FC-"f95"}
68012ec8c4b4Smrg  compiler=$CC
68022ec8c4b4Smrg  GCC=$ac_cv_fc_compiler_gnu
68032ec8c4b4Smrg
68042ec8c4b4Smrg  _LT_TAGVAR(compiler, $1)=$CC
68052ec8c4b4Smrg  _LT_CC_BASENAME([$compiler])
68062ec8c4b4Smrg
68072ec8c4b4Smrg  if test -n "$compiler"; then
68082ec8c4b4Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
68092ec8c4b4Smrg    AC_MSG_RESULT([$can_build_shared])
68102ec8c4b4Smrg
68112ec8c4b4Smrg    AC_MSG_CHECKING([whether to build shared libraries])
68122ec8c4b4Smrg    test "$can_build_shared" = "no" && enable_shared=no
68132ec8c4b4Smrg
68142ec8c4b4Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
68152ec8c4b4Smrg    # are all built from PIC.
681609885543Smrg    case $host_os in
68172ec8c4b4Smrg      aix3*)
68182ec8c4b4Smrg        test "$enable_shared" = yes && enable_static=no
68192ec8c4b4Smrg        if test -n "$RANLIB"; then
68202ec8c4b4Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
68212ec8c4b4Smrg          postinstall_cmds='$RANLIB $lib'
68222ec8c4b4Smrg        fi
68232ec8c4b4Smrg        ;;
68242ec8c4b4Smrg      aix[[4-9]]*)
68252ec8c4b4Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
68262ec8c4b4Smrg	  test "$enable_shared" = yes && enable_static=no
68272ec8c4b4Smrg	fi
68282ec8c4b4Smrg        ;;
68292ec8c4b4Smrg    esac
68302ec8c4b4Smrg    AC_MSG_RESULT([$enable_shared])
68312ec8c4b4Smrg
68322ec8c4b4Smrg    AC_MSG_CHECKING([whether to build static libraries])
68332ec8c4b4Smrg    # Make sure either enable_shared or enable_static is yes.
68342ec8c4b4Smrg    test "$enable_shared" = yes || enable_static=yes
68352ec8c4b4Smrg    AC_MSG_RESULT([$enable_static])
68362ec8c4b4Smrg
68372ec8c4b4Smrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
68382ec8c4b4Smrg    _LT_TAGVAR(LD, $1)="$LD"
68392ec8c4b4Smrg
68402ec8c4b4Smrg    ## CAVEAT EMPTOR:
68412ec8c4b4Smrg    ## There is no encapsulation within the following macros, do not change
68422ec8c4b4Smrg    ## the running order or otherwise move them around unless you know exactly
68432ec8c4b4Smrg    ## what you are doing...
68442ec8c4b4Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
68452ec8c4b4Smrg    _LT_COMPILER_PIC($1)
68462ec8c4b4Smrg    _LT_COMPILER_C_O($1)
68472ec8c4b4Smrg    _LT_COMPILER_FILE_LOCKS($1)
68482ec8c4b4Smrg    _LT_LINKER_SHLIBS($1)
68492ec8c4b4Smrg    _LT_SYS_DYNAMIC_LINKER($1)
68502ec8c4b4Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
68512ec8c4b4Smrg
68522ec8c4b4Smrg    _LT_CONFIG($1)
68532ec8c4b4Smrg  fi # test -n "$compiler"
68542ec8c4b4Smrg
68552ec8c4b4Smrg  GCC=$lt_save_GCC
68562ec8c4b4Smrg  CC="$lt_save_CC"
68572ec8c4b4Smrgfi # test "$_lt_disable_FC" != yes
685809885543Smrg
68592ec8c4b4SmrgAC_LANG_POP
68602ec8c4b4Smrg])# _LT_LANG_FC_CONFIG
686109885543Smrg
686209885543Smrg
68632ec8c4b4Smrg# _LT_LANG_GCJ_CONFIG([TAG])
68642ec8c4b4Smrg# --------------------------
68652ec8c4b4Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler
68662ec8c4b4Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
68672ec8c4b4Smrg# to write the compiler configuration to `libtool'.
68682ec8c4b4Smrgm4_defun([_LT_LANG_GCJ_CONFIG],
68692ec8c4b4Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl
68702ec8c4b4SmrgAC_LANG_SAVE
687109885543Smrg
68722ec8c4b4Smrg# Source file extension for Java test sources.
68732ec8c4b4Smrgac_ext=java
687409885543Smrg
68752ec8c4b4Smrg# Object file extension for compiled Java test sources.
68762ec8c4b4Smrgobjext=o
68772ec8c4b4Smrg_LT_TAGVAR(objext, $1)=$objext
687809885543Smrg
68792ec8c4b4Smrg# Code to be used in simple compile tests
68802ec8c4b4Smrglt_simple_compile_test_code="class foo {}"
688109885543Smrg
68822ec8c4b4Smrg# Code to be used in simple link tests
68832ec8c4b4Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
688409885543Smrg
68852ec8c4b4Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
68862ec8c4b4Smrg_LT_TAG_COMPILER
688709885543Smrg
68882ec8c4b4Smrg# save warnings/boilerplate of simple test code
68892ec8c4b4Smrg_LT_COMPILER_BOILERPLATE
68902ec8c4b4Smrg_LT_LINKER_BOILERPLATE
689109885543Smrg
68922ec8c4b4Smrg# Allow CC to be a program name with arguments.
68932ec8c4b4Smrglt_save_CC="$CC"
68942ec8c4b4Smrglt_save_GCC=$GCC
68952ec8c4b4SmrgGCC=yes
68962ec8c4b4SmrgCC=${GCJ-"gcj"}
68972ec8c4b4Smrgcompiler=$CC
68982ec8c4b4Smrg_LT_TAGVAR(compiler, $1)=$CC
68992ec8c4b4Smrg_LT_TAGVAR(LD, $1)="$LD"
69002ec8c4b4Smrg_LT_CC_BASENAME([$compiler])
690109885543Smrg
69022ec8c4b4Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
69032ec8c4b4Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
690409885543Smrg
69052ec8c4b4Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
690609885543Smrg
69072ec8c4b4Smrgif test -n "$compiler"; then
69082ec8c4b4Smrg  _LT_COMPILER_NO_RTTI($1)
69092ec8c4b4Smrg  _LT_COMPILER_PIC($1)
69102ec8c4b4Smrg  _LT_COMPILER_C_O($1)
69112ec8c4b4Smrg  _LT_COMPILER_FILE_LOCKS($1)
69122ec8c4b4Smrg  _LT_LINKER_SHLIBS($1)
69132ec8c4b4Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
691409885543Smrg
69152ec8c4b4Smrg  _LT_CONFIG($1)
69162ec8c4b4Smrgfi
69172ec8c4b4Smrg
69182ec8c4b4SmrgAC_LANG_RESTORE
69192ec8c4b4Smrg
69202ec8c4b4SmrgGCC=$lt_save_GCC
69212ec8c4b4SmrgCC="$lt_save_CC"
69222ec8c4b4Smrg])# _LT_LANG_GCJ_CONFIG
69232ec8c4b4Smrg
69242ec8c4b4Smrg
69252ec8c4b4Smrg# _LT_LANG_RC_CONFIG([TAG])
69262ec8c4b4Smrg# -------------------------
69272ec8c4b4Smrg# Ensure that the configuration variables for the Windows resource compiler
69282ec8c4b4Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
69292ec8c4b4Smrg# to write the compiler configuration to `libtool'.
69302ec8c4b4Smrgm4_defun([_LT_LANG_RC_CONFIG],
69312ec8c4b4Smrg[AC_REQUIRE([LT_PROG_RC])dnl
69322ec8c4b4SmrgAC_LANG_SAVE
69332ec8c4b4Smrg
69342ec8c4b4Smrg# Source file extension for RC test sources.
69352ec8c4b4Smrgac_ext=rc
69362ec8c4b4Smrg
69372ec8c4b4Smrg# Object file extension for compiled RC test sources.
69382ec8c4b4Smrgobjext=o
69392ec8c4b4Smrg_LT_TAGVAR(objext, $1)=$objext
69402ec8c4b4Smrg
69412ec8c4b4Smrg# Code to be used in simple compile tests
69422ec8c4b4Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
69432ec8c4b4Smrg
69442ec8c4b4Smrg# Code to be used in simple link tests
69452ec8c4b4Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
69462ec8c4b4Smrg
69472ec8c4b4Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
69482ec8c4b4Smrg_LT_TAG_COMPILER
69492ec8c4b4Smrg
69502ec8c4b4Smrg# save warnings/boilerplate of simple test code
69512ec8c4b4Smrg_LT_COMPILER_BOILERPLATE
69522ec8c4b4Smrg_LT_LINKER_BOILERPLATE
69532ec8c4b4Smrg
69542ec8c4b4Smrg# Allow CC to be a program name with arguments.
69552ec8c4b4Smrglt_save_CC="$CC"
69562ec8c4b4Smrglt_save_GCC=$GCC
69572ec8c4b4SmrgGCC=
69582ec8c4b4SmrgCC=${RC-"windres"}
69592ec8c4b4Smrgcompiler=$CC
69602ec8c4b4Smrg_LT_TAGVAR(compiler, $1)=$CC
69612ec8c4b4Smrg_LT_CC_BASENAME([$compiler])
69622ec8c4b4Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
69632ec8c4b4Smrg
69642ec8c4b4Smrgif test -n "$compiler"; then
69652ec8c4b4Smrg  :
69662ec8c4b4Smrg  _LT_CONFIG($1)
69672ec8c4b4Smrgfi
69682ec8c4b4Smrg
69692ec8c4b4SmrgGCC=$lt_save_GCC
69702ec8c4b4SmrgAC_LANG_RESTORE
69712ec8c4b4SmrgCC="$lt_save_CC"
69722ec8c4b4Smrg])# _LT_LANG_RC_CONFIG
69732ec8c4b4Smrg
69742ec8c4b4Smrg
69752ec8c4b4Smrg# LT_PROG_GCJ
69762ec8c4b4Smrg# -----------
69772ec8c4b4SmrgAC_DEFUN([LT_PROG_GCJ],
69782ec8c4b4Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
69792ec8c4b4Smrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
69802ec8c4b4Smrg    [AC_CHECK_TOOL(GCJ, gcj,)
69812ec8c4b4Smrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
69822ec8c4b4Smrg      AC_SUBST(GCJFLAGS)])])[]dnl
69832ec8c4b4Smrg])
69842ec8c4b4Smrg
69852ec8c4b4Smrg# Old name:
69862ec8c4b4SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
69872ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
69882ec8c4b4Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
69892ec8c4b4Smrg
69902ec8c4b4Smrg
69912ec8c4b4Smrg# LT_PROG_RC
69922ec8c4b4Smrg# ----------
69932ec8c4b4SmrgAC_DEFUN([LT_PROG_RC],
69942ec8c4b4Smrg[AC_CHECK_TOOL(RC, windres,)
69952ec8c4b4Smrg])
69962ec8c4b4Smrg
69972ec8c4b4Smrg# Old name:
69982ec8c4b4SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
69992ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
70002ec8c4b4Smrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
70012ec8c4b4Smrg
70022ec8c4b4Smrg
70032ec8c4b4Smrg# _LT_DECL_EGREP
70042ec8c4b4Smrg# --------------
70052ec8c4b4Smrg# If we don't have a new enough Autoconf to choose the best grep
70062ec8c4b4Smrg# available, choose the one first in the user's PATH.
70072ec8c4b4Smrgm4_defun([_LT_DECL_EGREP],
70082ec8c4b4Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
70092ec8c4b4SmrgAC_REQUIRE([AC_PROG_FGREP])dnl
70102ec8c4b4Smrgtest -z "$GREP" && GREP=grep
70112ec8c4b4Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
70122ec8c4b4Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
70132ec8c4b4Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
70142ec8c4b4Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
70152ec8c4b4SmrgAC_SUBST([GREP])
70162ec8c4b4Smrg])
70172ec8c4b4Smrg
70182ec8c4b4Smrg
70192ec8c4b4Smrg# _LT_DECL_OBJDUMP
70202ec8c4b4Smrg# --------------
70212ec8c4b4Smrg# If we don't have a new enough Autoconf to choose the best objdump
70222ec8c4b4Smrg# available, choose the one first in the user's PATH.
70232ec8c4b4Smrgm4_defun([_LT_DECL_OBJDUMP],
70242ec8c4b4Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
70252ec8c4b4Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
70262ec8c4b4Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
70272ec8c4b4SmrgAC_SUBST([OBJDUMP])
70282ec8c4b4Smrg])
70292ec8c4b4Smrg
70302ec8c4b4Smrg
70312ec8c4b4Smrg# _LT_DECL_SED
70322ec8c4b4Smrg# ------------
70332ec8c4b4Smrg# Check for a fully-functional sed program, that truncates
70342ec8c4b4Smrg# as few characters as possible.  Prefer GNU sed if found.
70352ec8c4b4Smrgm4_defun([_LT_DECL_SED],
70362ec8c4b4Smrg[AC_PROG_SED
70372ec8c4b4Smrgtest -z "$SED" && SED=sed
70382ec8c4b4SmrgXsed="$SED -e 1s/^X//"
70392ec8c4b4Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
70402ec8c4b4Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
70412ec8c4b4Smrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
70422ec8c4b4Smrg])# _LT_DECL_SED
70432ec8c4b4Smrg
70442ec8c4b4Smrgm4_ifndef([AC_PROG_SED], [
70452ec8c4b4Smrg# NOTE: This macro has been submitted for inclusion into   #
70462ec8c4b4Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
70472ec8c4b4Smrg#  a released version of Autoconf we should remove this    #
70482ec8c4b4Smrg#  macro and use it instead.                               #
70492ec8c4b4Smrg
70502ec8c4b4Smrgm4_defun([AC_PROG_SED],
70512ec8c4b4Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
70522ec8c4b4SmrgAC_CACHE_VAL(lt_cv_path_SED,
70532ec8c4b4Smrg[# Loop through the user's path and test for sed and gsed.
70542ec8c4b4Smrg# Then use that list of sed's as ones to test for truncation.
70552ec8c4b4Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
70562ec8c4b4Smrgfor as_dir in $PATH
70572ec8c4b4Smrgdo
70582ec8c4b4Smrg  IFS=$as_save_IFS
70592ec8c4b4Smrg  test -z "$as_dir" && as_dir=.
70602ec8c4b4Smrg  for lt_ac_prog in sed gsed; do
70612ec8c4b4Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
70622ec8c4b4Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
70632ec8c4b4Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
70642ec8c4b4Smrg      fi
70652ec8c4b4Smrg    done
70662ec8c4b4Smrg  done
70672ec8c4b4Smrgdone
70682ec8c4b4SmrgIFS=$as_save_IFS
70692ec8c4b4Smrglt_ac_max=0
70702ec8c4b4Smrglt_ac_count=0
70712ec8c4b4Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
70722ec8c4b4Smrg# along with /bin/sed that truncates output.
70732ec8c4b4Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
70742ec8c4b4Smrg  test ! -f $lt_ac_sed && continue
70752ec8c4b4Smrg  cat /dev/null > conftest.in
70762ec8c4b4Smrg  lt_ac_count=0
70772ec8c4b4Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
70782ec8c4b4Smrg  # Check for GNU sed and select it if it is found.
70792ec8c4b4Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
70802ec8c4b4Smrg    lt_cv_path_SED=$lt_ac_sed
70812ec8c4b4Smrg    break
70822ec8c4b4Smrg  fi
70832ec8c4b4Smrg  while true; do
70842ec8c4b4Smrg    cat conftest.in conftest.in >conftest.tmp
70852ec8c4b4Smrg    mv conftest.tmp conftest.in
70862ec8c4b4Smrg    cp conftest.in conftest.nl
70872ec8c4b4Smrg    echo >>conftest.nl
70882ec8c4b4Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
70892ec8c4b4Smrg    cmp -s conftest.out conftest.nl || break
70902ec8c4b4Smrg    # 10000 chars as input seems more than enough
70912ec8c4b4Smrg    test $lt_ac_count -gt 10 && break
70922ec8c4b4Smrg    lt_ac_count=`expr $lt_ac_count + 1`
70932ec8c4b4Smrg    if test $lt_ac_count -gt $lt_ac_max; then
70942ec8c4b4Smrg      lt_ac_max=$lt_ac_count
70952ec8c4b4Smrg      lt_cv_path_SED=$lt_ac_sed
70962ec8c4b4Smrg    fi
70972ec8c4b4Smrg  done
70982ec8c4b4Smrgdone
70992ec8c4b4Smrg])
71002ec8c4b4SmrgSED=$lt_cv_path_SED
71012ec8c4b4SmrgAC_SUBST([SED])
71022ec8c4b4SmrgAC_MSG_RESULT([$SED])
71032ec8c4b4Smrg])#AC_PROG_SED
71042ec8c4b4Smrg])#m4_ifndef
710509885543Smrg
71062ec8c4b4Smrg# Old name:
71072ec8c4b4SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
71082ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
71092ec8c4b4Smrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
711009885543Smrg
71117104f784Smrg
71122ec8c4b4Smrg# _LT_CHECK_SHELL_FEATURES
71132ec8c4b4Smrg# ------------------------
71142ec8c4b4Smrg# Find out whether the shell is Bourne or XSI compatible,
71152ec8c4b4Smrg# or has some other useful features.
71162ec8c4b4Smrgm4_defun([_LT_CHECK_SHELL_FEATURES],
71172ec8c4b4Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
71182ec8c4b4Smrg# Try some XSI features
71192ec8c4b4Smrgxsi_shell=no
71202ec8c4b4Smrg( _lt_dummy="a/b/c"
71212ec8c4b4Smrg  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
71222ec8c4b4Smrg      = c,a/b,, \
71232ec8c4b4Smrg    && eval 'test $(( 1 + 1 )) -eq 2 \
71242ec8c4b4Smrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
71252ec8c4b4Smrg  && xsi_shell=yes
71262ec8c4b4SmrgAC_MSG_RESULT([$xsi_shell])
71272ec8c4b4Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
71282ec8c4b4Smrg
71292ec8c4b4SmrgAC_MSG_CHECKING([whether the shell understands "+="])
71302ec8c4b4Smrglt_shell_append=no
71312ec8c4b4Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
71322ec8c4b4Smrg    >/dev/null 2>&1 \
71332ec8c4b4Smrg  && lt_shell_append=yes
71342ec8c4b4SmrgAC_MSG_RESULT([$lt_shell_append])
71352ec8c4b4Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
71362ec8c4b4Smrg
71372ec8c4b4Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
71382ec8c4b4Smrg  lt_unset=unset
71392ec8c4b4Smrgelse
71402ec8c4b4Smrg  lt_unset=false
71412ec8c4b4Smrgfi
71422ec8c4b4Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
71432ec8c4b4Smrg
71442ec8c4b4Smrg# test EBCDIC or ASCII
71452ec8c4b4Smrgcase `echo X|tr X '\101'` in
71462ec8c4b4Smrg A) # ASCII based system
71472ec8c4b4Smrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
71482ec8c4b4Smrg  lt_SP2NL='tr \040 \012'
71492ec8c4b4Smrg  lt_NL2SP='tr \015\012 \040\040'
71502ec8c4b4Smrg  ;;
71512ec8c4b4Smrg *) # EBCDIC based system
71522ec8c4b4Smrg  lt_SP2NL='tr \100 \n'
71532ec8c4b4Smrg  lt_NL2SP='tr \r\n \100\100'
71542ec8c4b4Smrg  ;;
71552ec8c4b4Smrgesac
71562ec8c4b4Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
71572ec8c4b4Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
71582ec8c4b4Smrg])# _LT_CHECK_SHELL_FEATURES
71592ec8c4b4Smrg
71602ec8c4b4Smrg
71612ec8c4b4Smrg# _LT_PROG_XSI_SHELLFNS
71622ec8c4b4Smrg# ---------------------
71632ec8c4b4Smrg# Bourne and XSI compatible variants of some useful shell functions.
71642ec8c4b4Smrgm4_defun([_LT_PROG_XSI_SHELLFNS],
71652ec8c4b4Smrg[case $xsi_shell in
71662ec8c4b4Smrg  yes)
71672ec8c4b4Smrg    cat << \_LT_EOF >> "$cfgfile"
71682ec8c4b4Smrg
71692ec8c4b4Smrg# func_dirname file append nondir_replacement
71702ec8c4b4Smrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
71712ec8c4b4Smrg# otherwise set result to NONDIR_REPLACEMENT.
71722ec8c4b4Smrgfunc_dirname ()
71732ec8c4b4Smrg{
71742ec8c4b4Smrg  case ${1} in
71752ec8c4b4Smrg    */*) func_dirname_result="${1%/*}${2}" ;;
71762ec8c4b4Smrg    *  ) func_dirname_result="${3}" ;;
71772ec8c4b4Smrg  esac
71782ec8c4b4Smrg}
717909885543Smrg
71802ec8c4b4Smrg# func_basename file
71812ec8c4b4Smrgfunc_basename ()
71822ec8c4b4Smrg{
71832ec8c4b4Smrg  func_basename_result="${1##*/}"
71842ec8c4b4Smrg}
718509885543Smrg
71862ec8c4b4Smrg# func_dirname_and_basename file append nondir_replacement
71872ec8c4b4Smrg# perform func_basename and func_dirname in a single function
71882ec8c4b4Smrg# call:
71892ec8c4b4Smrg#   dirname:  Compute the dirname of FILE.  If nonempty,
71902ec8c4b4Smrg#             add APPEND to the result, otherwise set result
71912ec8c4b4Smrg#             to NONDIR_REPLACEMENT.
71922ec8c4b4Smrg#             value returned in "$func_dirname_result"
71932ec8c4b4Smrg#   basename: Compute filename of FILE.
71942ec8c4b4Smrg#             value retuned in "$func_basename_result"
71952ec8c4b4Smrg# Implementation must be kept synchronized with func_dirname
71962ec8c4b4Smrg# and func_basename. For efficiency, we do not delegate to
71972ec8c4b4Smrg# those functions but instead duplicate the functionality here.
71982ec8c4b4Smrgfunc_dirname_and_basename ()
71992ec8c4b4Smrg{
72002ec8c4b4Smrg  case ${1} in
72012ec8c4b4Smrg    */*) func_dirname_result="${1%/*}${2}" ;;
72022ec8c4b4Smrg    *  ) func_dirname_result="${3}" ;;
72032ec8c4b4Smrg  esac
72042ec8c4b4Smrg  func_basename_result="${1##*/}"
72052ec8c4b4Smrg}
720609885543Smrg
72072ec8c4b4Smrg# func_stripname prefix suffix name
72082ec8c4b4Smrg# strip PREFIX and SUFFIX off of NAME.
72092ec8c4b4Smrg# PREFIX and SUFFIX must not contain globbing or regex special
72102ec8c4b4Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
72112ec8c4b4Smrg# dot (in which case that matches only a dot).
72122ec8c4b4Smrgfunc_stripname ()
72132ec8c4b4Smrg{
72142ec8c4b4Smrg  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
72152ec8c4b4Smrg  # positional parameters, so assign one to ordinary parameter first.
72162ec8c4b4Smrg  func_stripname_result=${3}
72172ec8c4b4Smrg  func_stripname_result=${func_stripname_result#"${1}"}
72182ec8c4b4Smrg  func_stripname_result=${func_stripname_result%"${2}"}
72192ec8c4b4Smrg}
722009885543Smrg
72212ec8c4b4Smrg# func_opt_split
72222ec8c4b4Smrgfunc_opt_split ()
72232ec8c4b4Smrg{
72242ec8c4b4Smrg  func_opt_split_opt=${1%%=*}
72252ec8c4b4Smrg  func_opt_split_arg=${1#*=}
72262ec8c4b4Smrg}
722709885543Smrg
72282ec8c4b4Smrg# func_lo2o object
72292ec8c4b4Smrgfunc_lo2o ()
72302ec8c4b4Smrg{
72312ec8c4b4Smrg  case ${1} in
72322ec8c4b4Smrg    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
72332ec8c4b4Smrg    *)    func_lo2o_result=${1} ;;
72342ec8c4b4Smrg  esac
72352ec8c4b4Smrg}
723609885543Smrg
72372ec8c4b4Smrg# func_xform libobj-or-source
72382ec8c4b4Smrgfunc_xform ()
72392ec8c4b4Smrg{
72402ec8c4b4Smrg  func_xform_result=${1%.*}.lo
72412ec8c4b4Smrg}
724209885543Smrg
72432ec8c4b4Smrg# func_arith arithmetic-term...
72442ec8c4b4Smrgfunc_arith ()
72452ec8c4b4Smrg{
72462ec8c4b4Smrg  func_arith_result=$(( $[*] ))
72472ec8c4b4Smrg}
724809885543Smrg
72492ec8c4b4Smrg# func_len string
72502ec8c4b4Smrg# STRING may not start with a hyphen.
72512ec8c4b4Smrgfunc_len ()
72522ec8c4b4Smrg{
72532ec8c4b4Smrg  func_len_result=${#1}
72542ec8c4b4Smrg}
72552ec8c4b4Smrg
72562ec8c4b4Smrg_LT_EOF
725709885543Smrg    ;;
72582ec8c4b4Smrg  *) # Bourne compatible functions.
72592ec8c4b4Smrg    cat << \_LT_EOF >> "$cfgfile"
726009885543Smrg
72612ec8c4b4Smrg# func_dirname file append nondir_replacement
72622ec8c4b4Smrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
72632ec8c4b4Smrg# otherwise set result to NONDIR_REPLACEMENT.
72642ec8c4b4Smrgfunc_dirname ()
72652ec8c4b4Smrg{
72662ec8c4b4Smrg  # Extract subdirectory from the argument.
72672ec8c4b4Smrg  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
72682ec8c4b4Smrg  if test "X$func_dirname_result" = "X${1}"; then
72692ec8c4b4Smrg    func_dirname_result="${3}"
72702ec8c4b4Smrg  else
72712ec8c4b4Smrg    func_dirname_result="$func_dirname_result${2}"
72722ec8c4b4Smrg  fi
72732ec8c4b4Smrg}
727409885543Smrg
72752ec8c4b4Smrg# func_basename file
72762ec8c4b4Smrgfunc_basename ()
72772ec8c4b4Smrg{
72782ec8c4b4Smrg  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
72792ec8c4b4Smrg}
728009885543Smrg
72812ec8c4b4Smrgdnl func_dirname_and_basename
72822ec8c4b4Smrgdnl A portable version of this function is already defined in general.m4sh
72832ec8c4b4Smrgdnl so there is no need for it here.
72842ec8c4b4Smrg
72852ec8c4b4Smrg# func_stripname prefix suffix name
72862ec8c4b4Smrg# strip PREFIX and SUFFIX off of NAME.
72872ec8c4b4Smrg# PREFIX and SUFFIX must not contain globbing or regex special
72882ec8c4b4Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
72892ec8c4b4Smrg# dot (in which case that matches only a dot).
72902ec8c4b4Smrg# func_strip_suffix prefix name
72912ec8c4b4Smrgfunc_stripname ()
72922ec8c4b4Smrg{
72932ec8c4b4Smrg  case ${2} in
72942ec8c4b4Smrg    .*) func_stripname_result=`$ECHO "X${3}" \
72952ec8c4b4Smrg           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
72962ec8c4b4Smrg    *)  func_stripname_result=`$ECHO "X${3}" \
72972ec8c4b4Smrg           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
729809885543Smrg  esac
72992ec8c4b4Smrg}
730009885543Smrg
73012ec8c4b4Smrg# sed scripts:
73022ec8c4b4Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
73032ec8c4b4Smrgmy_sed_long_arg='1s/^-[[^=]]*=//'
730409885543Smrg
73052ec8c4b4Smrg# func_opt_split
73062ec8c4b4Smrgfunc_opt_split ()
73072ec8c4b4Smrg{
73082ec8c4b4Smrg  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
73092ec8c4b4Smrg  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
73102ec8c4b4Smrg}
731109885543Smrg
73122ec8c4b4Smrg# func_lo2o object
73132ec8c4b4Smrgfunc_lo2o ()
73142ec8c4b4Smrg{
73152ec8c4b4Smrg  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
73162ec8c4b4Smrg}
731709885543Smrg
73182ec8c4b4Smrg# func_xform libobj-or-source
73192ec8c4b4Smrgfunc_xform ()
73202ec8c4b4Smrg{
73212ec8c4b4Smrg  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
73222ec8c4b4Smrg}
732309885543Smrg
73242ec8c4b4Smrg# func_arith arithmetic-term...
73252ec8c4b4Smrgfunc_arith ()
73262ec8c4b4Smrg{
73272ec8c4b4Smrg  func_arith_result=`expr "$[@]"`
73282ec8c4b4Smrg}
732909885543Smrg
73302ec8c4b4Smrg# func_len string
73312ec8c4b4Smrg# STRING may not start with a hyphen.
73322ec8c4b4Smrgfunc_len ()
73332ec8c4b4Smrg{
73342ec8c4b4Smrg  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
73352ec8c4b4Smrg}
733609885543Smrg
73372ec8c4b4Smrg_LT_EOF
73382ec8c4b4Smrgesac
733909885543Smrg
73402ec8c4b4Smrgcase $lt_shell_append in
73412ec8c4b4Smrg  yes)
73422ec8c4b4Smrg    cat << \_LT_EOF >> "$cfgfile"
734309885543Smrg
73442ec8c4b4Smrg# func_append var value
73452ec8c4b4Smrg# Append VALUE to the end of shell variable VAR.
73462ec8c4b4Smrgfunc_append ()
73472ec8c4b4Smrg{
73482ec8c4b4Smrg  eval "$[1]+=\$[2]"
73492ec8c4b4Smrg}
73502ec8c4b4Smrg_LT_EOF
73512ec8c4b4Smrg    ;;
73522ec8c4b4Smrg  *)
73532ec8c4b4Smrg    cat << \_LT_EOF >> "$cfgfile"
735409885543Smrg
73552ec8c4b4Smrg# func_append var value
73562ec8c4b4Smrg# Append VALUE to the end of shell variable VAR.
73572ec8c4b4Smrgfunc_append ()
73582ec8c4b4Smrg{
73592ec8c4b4Smrg  eval "$[1]=\$$[1]\$[2]"
73602ec8c4b4Smrg}
736109885543Smrg
73622ec8c4b4Smrg_LT_EOF
73632ec8c4b4Smrg    ;;
73642ec8c4b4Smrg  esac
73652ec8c4b4Smrg])
736609885543Smrg
73672ec8c4b4Smrg# Helper functions for option handling.                    -*- Autoconf -*-
73682ec8c4b4Smrg#
73692ec8c4b4Smrg#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
73702ec8c4b4Smrg#   Written by Gary V. Vaughan, 2004
73712ec8c4b4Smrg#
73722ec8c4b4Smrg# This file is free software; the Free Software Foundation gives
73732ec8c4b4Smrg# unlimited permission to copy and/or distribute it, with or without
73742ec8c4b4Smrg# modifications, as long as this notice is preserved.
737509885543Smrg
73762ec8c4b4Smrg# serial 6 ltoptions.m4
737709885543Smrg
73782ec8c4b4Smrg# This is to help aclocal find these macros, as it can't see m4_define.
73792ec8c4b4SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
73802ec8c4b4Smrg
73812ec8c4b4Smrg
73822ec8c4b4Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
73832ec8c4b4Smrg# ------------------------------------------
73842ec8c4b4Smrgm4_define([_LT_MANGLE_OPTION],
73852ec8c4b4Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
73862ec8c4b4Smrg
73872ec8c4b4Smrg
73882ec8c4b4Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
73892ec8c4b4Smrg# ---------------------------------------
73902ec8c4b4Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
73912ec8c4b4Smrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
73922ec8c4b4Smrg# saved as a flag.
73932ec8c4b4Smrgm4_define([_LT_SET_OPTION],
73942ec8c4b4Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
73952ec8c4b4Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
73962ec8c4b4Smrg        _LT_MANGLE_DEFUN([$1], [$2]),
73972ec8c4b4Smrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
73982ec8c4b4Smrg])
739909885543Smrg
740009885543Smrg
74012ec8c4b4Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
74022ec8c4b4Smrg# ------------------------------------------------------------
74032ec8c4b4Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
74042ec8c4b4Smrgm4_define([_LT_IF_OPTION],
74052ec8c4b4Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
74062ec8c4b4Smrg
74072ec8c4b4Smrg
74082ec8c4b4Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
74092ec8c4b4Smrg# -------------------------------------------------------
74102ec8c4b4Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
74112ec8c4b4Smrg# are set.
74122ec8c4b4Smrgm4_define([_LT_UNLESS_OPTIONS],
74132ec8c4b4Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
74142ec8c4b4Smrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
74152ec8c4b4Smrg		      [m4_define([$0_found])])])[]dnl
74162ec8c4b4Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
74172ec8c4b4Smrg])[]dnl
74182ec8c4b4Smrg])
741909885543Smrg
742009885543Smrg
74212ec8c4b4Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
74222ec8c4b4Smrg# ----------------------------------------
74232ec8c4b4Smrg# OPTION-LIST is a space-separated list of Libtool options associated
74242ec8c4b4Smrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
74252ec8c4b4Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
74262ec8c4b4Smrg# the unknown option and exit.
74272ec8c4b4Smrgm4_defun([_LT_SET_OPTIONS],
74282ec8c4b4Smrg[# Set options
74292ec8c4b4Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
74302ec8c4b4Smrg    [_LT_SET_OPTION([$1], _LT_Option)])
74312ec8c4b4Smrg
74322ec8c4b4Smrgm4_if([$1],[LT_INIT],[
74332ec8c4b4Smrg  dnl
74342ec8c4b4Smrg  dnl Simply set some default values (i.e off) if boolean options were not
74352ec8c4b4Smrg  dnl specified:
74362ec8c4b4Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
74372ec8c4b4Smrg  ])
74382ec8c4b4Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
74392ec8c4b4Smrg  ])
74402ec8c4b4Smrg  dnl
74412ec8c4b4Smrg  dnl If no reference was made to various pairs of opposing options, then
74422ec8c4b4Smrg  dnl we run the default mode handler for the pair.  For example, if neither
74432ec8c4b4Smrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
74442ec8c4b4Smrg  dnl archives by default:
74452ec8c4b4Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
74462ec8c4b4Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
74472ec8c4b4Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
74482ec8c4b4Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
74492ec8c4b4Smrg  		   [_LT_ENABLE_FAST_INSTALL])
74502ec8c4b4Smrg  ])
74512ec8c4b4Smrg])# _LT_SET_OPTIONS
745209885543Smrg
745309885543Smrg
745409885543Smrg
74552ec8c4b4Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
74562ec8c4b4Smrg# -----------------------------------------
74572ec8c4b4Smrgm4_define([_LT_MANGLE_DEFUN],
74582ec8c4b4Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
745909885543Smrg
746009885543Smrg
74612ec8c4b4Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
74622ec8c4b4Smrg# -----------------------------------------------
74632ec8c4b4Smrgm4_define([LT_OPTION_DEFINE],
74642ec8c4b4Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
74652ec8c4b4Smrg])# LT_OPTION_DEFINE
746609885543Smrg
746709885543Smrg
74682ec8c4b4Smrg# dlopen
74692ec8c4b4Smrg# ------
74702ec8c4b4SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
74712ec8c4b4Smrg])
747209885543Smrg
74732ec8c4b4SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
74742ec8c4b4Smrg[_LT_SET_OPTION([LT_INIT], [dlopen])
74752ec8c4b4SmrgAC_DIAGNOSE([obsolete],
74762ec8c4b4Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
74772ec8c4b4Smrgput the `dlopen' option into LT_INIT's first parameter.])
74782ec8c4b4Smrg])
747909885543Smrg
74802ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
74812ec8c4b4Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
748209885543Smrg
748309885543Smrg
74842ec8c4b4Smrg# win32-dll
74852ec8c4b4Smrg# ---------
74862ec8c4b4Smrg# Declare package support for building win32 dll's.
74872ec8c4b4SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
74882ec8c4b4Smrg[enable_win32_dll=yes
748909885543Smrg
74902ec8c4b4Smrgcase $host in
74912ec8c4b4Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
74922ec8c4b4Smrg  AC_CHECK_TOOL(AS, as, false)
74932ec8c4b4Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
74942ec8c4b4Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
74952ec8c4b4Smrg  ;;
74962ec8c4b4Smrgesac
749709885543Smrg
74982ec8c4b4Smrgtest -z "$AS" && AS=as
74992ec8c4b4Smrg_LT_DECL([], [AS],      [0], [Assembler program])dnl
750009885543Smrg
75012ec8c4b4Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
75022ec8c4b4Smrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
750309885543Smrg
75042ec8c4b4Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
75052ec8c4b4Smrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
75062ec8c4b4Smrg])# win32-dll
750709885543Smrg
75082ec8c4b4SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
75092ec8c4b4Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
75102ec8c4b4Smrg_LT_SET_OPTION([LT_INIT], [win32-dll])
75112ec8c4b4SmrgAC_DIAGNOSE([obsolete],
75122ec8c4b4Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
75132ec8c4b4Smrgput the `win32-dll' option into LT_INIT's first parameter.])
75142ec8c4b4Smrg])
751509885543Smrg
75162ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
75172ec8c4b4Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
751809885543Smrg
751909885543Smrg
75202ec8c4b4Smrg# _LT_ENABLE_SHARED([DEFAULT])
75212ec8c4b4Smrg# ----------------------------
75222ec8c4b4Smrg# implement the --enable-shared flag, and supports the `shared' and
75232ec8c4b4Smrg# `disable-shared' LT_INIT options.
75242ec8c4b4Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
75252ec8c4b4Smrgm4_define([_LT_ENABLE_SHARED],
75262ec8c4b4Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
75272ec8c4b4SmrgAC_ARG_ENABLE([shared],
75282ec8c4b4Smrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
75292ec8c4b4Smrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
75302ec8c4b4Smrg    [p=${PACKAGE-default}
75312ec8c4b4Smrg    case $enableval in
75322ec8c4b4Smrg    yes) enable_shared=yes ;;
75332ec8c4b4Smrg    no) enable_shared=no ;;
75342ec8c4b4Smrg    *)
75352ec8c4b4Smrg      enable_shared=no
75362ec8c4b4Smrg      # Look at the argument we got.  We use all the common list separators.
75372ec8c4b4Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
75382ec8c4b4Smrg      for pkg in $enableval; do
75392ec8c4b4Smrg	IFS="$lt_save_ifs"
75402ec8c4b4Smrg	if test "X$pkg" = "X$p"; then
75412ec8c4b4Smrg	  enable_shared=yes
75422ec8c4b4Smrg	fi
75432ec8c4b4Smrg      done
75442ec8c4b4Smrg      IFS="$lt_save_ifs"
754509885543Smrg      ;;
75462ec8c4b4Smrg    esac],
75472ec8c4b4Smrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
754809885543Smrg
75492ec8c4b4Smrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
75502ec8c4b4Smrg	[Whether or not to build shared libraries])
75512ec8c4b4Smrg])# _LT_ENABLE_SHARED
755209885543Smrg
75532ec8c4b4SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
75542ec8c4b4SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
755509885543Smrg
75562ec8c4b4Smrg# Old names:
75572ec8c4b4SmrgAC_DEFUN([AC_ENABLE_SHARED],
75582ec8c4b4Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
75592ec8c4b4Smrg])
756009885543Smrg
75612ec8c4b4SmrgAC_DEFUN([AC_DISABLE_SHARED],
75622ec8c4b4Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
75632ec8c4b4Smrg])
756409885543Smrg
75652ec8c4b4SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
75662ec8c4b4SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
756709885543Smrg
75682ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
75692ec8c4b4Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
75702ec8c4b4Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
757109885543Smrg
757209885543Smrg
75732ec8c4b4Smrg
75742ec8c4b4Smrg# _LT_ENABLE_STATIC([DEFAULT])
75752ec8c4b4Smrg# ----------------------------
75762ec8c4b4Smrg# implement the --enable-static flag, and support the `static' and
75772ec8c4b4Smrg# `disable-static' LT_INIT options.
75782ec8c4b4Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
75792ec8c4b4Smrgm4_define([_LT_ENABLE_STATIC],
75802ec8c4b4Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
75812ec8c4b4SmrgAC_ARG_ENABLE([static],
75822ec8c4b4Smrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
75832ec8c4b4Smrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
75842ec8c4b4Smrg    [p=${PACKAGE-default}
75852ec8c4b4Smrg    case $enableval in
75862ec8c4b4Smrg    yes) enable_static=yes ;;
75872ec8c4b4Smrg    no) enable_static=no ;;
75882ec8c4b4Smrg    *)
75892ec8c4b4Smrg     enable_static=no
75902ec8c4b4Smrg      # Look at the argument we got.  We use all the common list separators.
75912ec8c4b4Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
75922ec8c4b4Smrg      for pkg in $enableval; do
75932ec8c4b4Smrg	IFS="$lt_save_ifs"
75942ec8c4b4Smrg	if test "X$pkg" = "X$p"; then
75952ec8c4b4Smrg	  enable_static=yes
75962ec8c4b4Smrg	fi
75972ec8c4b4Smrg      done
75982ec8c4b4Smrg      IFS="$lt_save_ifs"
759909885543Smrg      ;;
76002ec8c4b4Smrg    esac],
76012ec8c4b4Smrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
760209885543Smrg
76032ec8c4b4Smrg    _LT_DECL([build_old_libs], [enable_static], [0],
76042ec8c4b4Smrg	[Whether or not to build static libraries])
76052ec8c4b4Smrg])# _LT_ENABLE_STATIC
760609885543Smrg
76072ec8c4b4SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
76082ec8c4b4SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
760909885543Smrg
76102ec8c4b4Smrg# Old names:
76112ec8c4b4SmrgAC_DEFUN([AC_ENABLE_STATIC],
76122ec8c4b4Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
76132ec8c4b4Smrg])
761409885543Smrg
76152ec8c4b4SmrgAC_DEFUN([AC_DISABLE_STATIC],
76162ec8c4b4Smrg[_LT_SET_OPTION([LT_INIT], [disable-static])
76172ec8c4b4Smrg])
761809885543Smrg
76192ec8c4b4SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
76202ec8c4b4SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
762109885543Smrg
76222ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
76232ec8c4b4Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
76242ec8c4b4Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
762509885543Smrg
762609885543Smrg
762709885543Smrg
76282ec8c4b4Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
76292ec8c4b4Smrg# ----------------------------------
76302ec8c4b4Smrg# implement the --enable-fast-install flag, and support the `fast-install'
76312ec8c4b4Smrg# and `disable-fast-install' LT_INIT options.
76322ec8c4b4Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
76332ec8c4b4Smrgm4_define([_LT_ENABLE_FAST_INSTALL],
76342ec8c4b4Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
76352ec8c4b4SmrgAC_ARG_ENABLE([fast-install],
76362ec8c4b4Smrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
76372ec8c4b4Smrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
76382ec8c4b4Smrg    [p=${PACKAGE-default}
76392ec8c4b4Smrg    case $enableval in
76402ec8c4b4Smrg    yes) enable_fast_install=yes ;;
76412ec8c4b4Smrg    no) enable_fast_install=no ;;
76422ec8c4b4Smrg    *)
76432ec8c4b4Smrg      enable_fast_install=no
76442ec8c4b4Smrg      # Look at the argument we got.  We use all the common list separators.
76452ec8c4b4Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
76462ec8c4b4Smrg      for pkg in $enableval; do
76472ec8c4b4Smrg	IFS="$lt_save_ifs"
76482ec8c4b4Smrg	if test "X$pkg" = "X$p"; then
76492ec8c4b4Smrg	  enable_fast_install=yes
76507104f784Smrg	fi
76512ec8c4b4Smrg      done
76522ec8c4b4Smrg      IFS="$lt_save_ifs"
765309885543Smrg      ;;
76542ec8c4b4Smrg    esac],
76552ec8c4b4Smrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
765609885543Smrg
76572ec8c4b4Smrg_LT_DECL([fast_install], [enable_fast_install], [0],
76582ec8c4b4Smrg	 [Whether or not to optimize for fast installation])dnl
76592ec8c4b4Smrg])# _LT_ENABLE_FAST_INSTALL
766009885543Smrg
76612ec8c4b4SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
76622ec8c4b4SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
766309885543Smrg
76642ec8c4b4Smrg# Old names:
76652ec8c4b4SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
76662ec8c4b4Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
76672ec8c4b4SmrgAC_DIAGNOSE([obsolete],
76682ec8c4b4Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
76692ec8c4b4Smrgthe `fast-install' option into LT_INIT's first parameter.])
76702ec8c4b4Smrg])
767109885543Smrg
76722ec8c4b4SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
76732ec8c4b4Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
76742ec8c4b4SmrgAC_DIAGNOSE([obsolete],
76752ec8c4b4Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
76762ec8c4b4Smrgthe `disable-fast-install' option into LT_INIT's first parameter.])
76772ec8c4b4Smrg])
767809885543Smrg
76792ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
76802ec8c4b4Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
76812ec8c4b4Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
768209885543Smrg
768309885543Smrg
76842ec8c4b4Smrg# _LT_WITH_PIC([MODE])
76852ec8c4b4Smrg# --------------------
76862ec8c4b4Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
76872ec8c4b4Smrg# LT_INIT options.
76882ec8c4b4Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
76892ec8c4b4Smrgm4_define([_LT_WITH_PIC],
76902ec8c4b4Smrg[AC_ARG_WITH([pic],
76912ec8c4b4Smrg    [AS_HELP_STRING([--with-pic],
76922ec8c4b4Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
76932ec8c4b4Smrg    [pic_mode="$withval"],
76942ec8c4b4Smrg    [pic_mode=default])
769509885543Smrg
76962ec8c4b4Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
769709885543Smrg
76982ec8c4b4Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
76992ec8c4b4Smrg])# _LT_WITH_PIC
770009885543Smrg
77012ec8c4b4SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
77022ec8c4b4SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
77032ec8c4b4Smrg
77042ec8c4b4Smrg# Old name:
77052ec8c4b4SmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
77062ec8c4b4Smrg[_LT_SET_OPTION([LT_INIT], [pic-only])
77072ec8c4b4SmrgAC_DIAGNOSE([obsolete],
77082ec8c4b4Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
77092ec8c4b4Smrgput the `pic-only' option into LT_INIT's first parameter.])
771009885543Smrg])
771109885543Smrg
77122ec8c4b4Smrgdnl aclocal-1.4 backwards compatibility:
77132ec8c4b4Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
771409885543Smrg
771509885543Smrg
77162ec8c4b4Smrgm4_define([_LTDL_MODE], [])
77172ec8c4b4SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
77182ec8c4b4Smrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
77192ec8c4b4SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
77202ec8c4b4Smrg		 [m4_define([_LTDL_MODE], [recursive])])
77212ec8c4b4SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
77222ec8c4b4Smrg		 [m4_define([_LTDL_MODE], [subproject])])
772309885543Smrg
77242ec8c4b4Smrgm4_define([_LTDL_TYPE], [])
77252ec8c4b4SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
77262ec8c4b4Smrg		 [m4_define([_LTDL_TYPE], [installable])])
77272ec8c4b4SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
77282ec8c4b4Smrg		 [m4_define([_LTDL_TYPE], [convenience])])
772909885543Smrg
77302ec8c4b4Smrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
773109885543Smrg#
77322ec8c4b4Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
77332ec8c4b4Smrg# Written by Gary V. Vaughan, 2004
773409885543Smrg#
77352ec8c4b4Smrg# This file is free software; the Free Software Foundation gives
77362ec8c4b4Smrg# unlimited permission to copy and/or distribute it, with or without
77372ec8c4b4Smrg# modifications, as long as this notice is preserved.
77382ec8c4b4Smrg
77392ec8c4b4Smrg# serial 6 ltsugar.m4
77402ec8c4b4Smrg
77412ec8c4b4Smrg# This is to help aclocal find these macros, as it can't see m4_define.
77422ec8c4b4SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
77432ec8c4b4Smrg
77442ec8c4b4Smrg
77452ec8c4b4Smrg# lt_join(SEP, ARG1, [ARG2...])
77462ec8c4b4Smrg# -----------------------------
77472ec8c4b4Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
77482ec8c4b4Smrg# associated separator.
77492ec8c4b4Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
77502ec8c4b4Smrg# versions in m4sugar had bugs.
77512ec8c4b4Smrgm4_define([lt_join],
77522ec8c4b4Smrg[m4_if([$#], [1], [],
77532ec8c4b4Smrg       [$#], [2], [[$2]],
77542ec8c4b4Smrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
77552ec8c4b4Smrgm4_define([_lt_join],
77562ec8c4b4Smrg[m4_if([$#$2], [2], [],
77572ec8c4b4Smrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
77582ec8c4b4Smrg
77592ec8c4b4Smrg
77602ec8c4b4Smrg# lt_car(LIST)
77612ec8c4b4Smrg# lt_cdr(LIST)
77622ec8c4b4Smrg# ------------
77632ec8c4b4Smrg# Manipulate m4 lists.
77642ec8c4b4Smrg# These macros are necessary as long as will still need to support
77652ec8c4b4Smrg# Autoconf-2.59 which quotes differently.
77662ec8c4b4Smrgm4_define([lt_car], [[$1]])
77672ec8c4b4Smrgm4_define([lt_cdr],
77682ec8c4b4Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
77692ec8c4b4Smrg       [$#], 1, [],
77702ec8c4b4Smrg       [m4_dquote(m4_shift($@))])])
77712ec8c4b4Smrgm4_define([lt_unquote], $1)
77722ec8c4b4Smrg
77732ec8c4b4Smrg
77742ec8c4b4Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
77752ec8c4b4Smrg# ------------------------------------------
77762ec8c4b4Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
77772ec8c4b4Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
77782ec8c4b4Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
77792ec8c4b4Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
77802ec8c4b4Smrg# than defined and empty).
778109885543Smrg#
77822ec8c4b4Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
77832ec8c4b4Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
77842ec8c4b4Smrgm4_define([lt_append],
77852ec8c4b4Smrg[m4_define([$1],
77862ec8c4b4Smrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
77872ec8c4b4Smrg
77882ec8c4b4Smrg
77892ec8c4b4Smrg
77902ec8c4b4Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
77912ec8c4b4Smrg# ----------------------------------------------------------
77922ec8c4b4Smrg# Produce a SEP delimited list of all paired combinations of elements of
77932ec8c4b4Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
77942ec8c4b4Smrg# has the form PREFIXmINFIXSUFFIXn.
77952ec8c4b4Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
77962ec8c4b4Smrgm4_define([lt_combine],
77972ec8c4b4Smrg[m4_if(m4_eval([$# > 3]), [1],
77982ec8c4b4Smrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
77992ec8c4b4Smrg[[m4_foreach([_Lt_prefix], [$2],
78002ec8c4b4Smrg	     [m4_foreach([_Lt_suffix],
78012ec8c4b4Smrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
78022ec8c4b4Smrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
78032ec8c4b4Smrg
78042ec8c4b4Smrg
78052ec8c4b4Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
78062ec8c4b4Smrg# -----------------------------------------------------------------------
78072ec8c4b4Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
78082ec8c4b4Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
78092ec8c4b4Smrgm4_define([lt_if_append_uniq],
78102ec8c4b4Smrg[m4_ifdef([$1],
78112ec8c4b4Smrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
78122ec8c4b4Smrg		 [lt_append([$1], [$2], [$3])$4],
78132ec8c4b4Smrg		 [$5])],
78142ec8c4b4Smrg	  [lt_append([$1], [$2], [$3])$4])])
78152ec8c4b4Smrg
78162ec8c4b4Smrg
78172ec8c4b4Smrg# lt_dict_add(DICT, KEY, VALUE)
78182ec8c4b4Smrg# -----------------------------
78192ec8c4b4Smrgm4_define([lt_dict_add],
78202ec8c4b4Smrg[m4_define([$1($2)], [$3])])
782109885543Smrg
782209885543Smrg
78232ec8c4b4Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
78242ec8c4b4Smrg# --------------------------------------------
78252ec8c4b4Smrgm4_define([lt_dict_add_subkey],
78262ec8c4b4Smrg[m4_define([$1($2:$3)], [$4])])
782709885543Smrg
782809885543Smrg
78292ec8c4b4Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
78302ec8c4b4Smrg# ----------------------------------
78312ec8c4b4Smrgm4_define([lt_dict_fetch],
78322ec8c4b4Smrg[m4_ifval([$3],
78332ec8c4b4Smrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
78342ec8c4b4Smrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
783509885543Smrg
783609885543Smrg
78372ec8c4b4Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
78382ec8c4b4Smrg# -----------------------------------------------------------------
78392ec8c4b4Smrgm4_define([lt_if_dict_fetch],
78402ec8c4b4Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
78412ec8c4b4Smrg	[$5],
78422ec8c4b4Smrg    [$6])])
784309885543Smrg
78442ec8c4b4Smrg
78452ec8c4b4Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
78462ec8c4b4Smrg# --------------------------------------------------------------
78472ec8c4b4Smrgm4_define([lt_dict_filter],
78482ec8c4b4Smrg[m4_if([$5], [], [],
78492ec8c4b4Smrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
78502ec8c4b4Smrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
78512ec8c4b4Smrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
785209885543Smrg])
785309885543Smrg
78542ec8c4b4Smrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
78552ec8c4b4Smrg#
78562ec8c4b4Smrg#   Copyright (C) 2004 Free Software Foundation, Inc.
78572ec8c4b4Smrg#   Written by Scott James Remnant, 2004
78582ec8c4b4Smrg#
78592ec8c4b4Smrg# This file is free software; the Free Software Foundation gives
78602ec8c4b4Smrg# unlimited permission to copy and/or distribute it, with or without
78612ec8c4b4Smrg# modifications, as long as this notice is preserved.
78627104f784Smrg
78632ec8c4b4Smrg# Generated from ltversion.in.
78647104f784Smrg
78652ec8c4b4Smrg# serial 3012 ltversion.m4
78662ec8c4b4Smrg# This file is part of GNU Libtool
78677104f784Smrg
78682ec8c4b4Smrgm4_define([LT_PACKAGE_VERSION], [2.2.6])
78692ec8c4b4Smrgm4_define([LT_PACKAGE_REVISION], [1.3012])
78707104f784Smrg
78712ec8c4b4SmrgAC_DEFUN([LTVERSION_VERSION],
78722ec8c4b4Smrg[macro_version='2.2.6'
78732ec8c4b4Smrgmacro_revision='1.3012'
78742ec8c4b4Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
78752ec8c4b4Smrg_LT_DECL(, macro_revision, 0)
787609885543Smrg])
787709885543Smrg
78782ec8c4b4Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
78792ec8c4b4Smrg#
78802ec8c4b4Smrg#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
78812ec8c4b4Smrg#   Written by Scott James Remnant, 2004.
78822ec8c4b4Smrg#
78832ec8c4b4Smrg# This file is free software; the Free Software Foundation gives
78842ec8c4b4Smrg# unlimited permission to copy and/or distribute it, with or without
78852ec8c4b4Smrg# modifications, as long as this notice is preserved.
78862ec8c4b4Smrg
78872ec8c4b4Smrg# serial 4 lt~obsolete.m4
78882ec8c4b4Smrg
78892ec8c4b4Smrg# These exist entirely to fool aclocal when bootstrapping libtool.
78902ec8c4b4Smrg#
78912ec8c4b4Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
78922ec8c4b4Smrg# which have later been changed to m4_define as they aren't part of the
78932ec8c4b4Smrg# exported API, or moved to Autoconf or Automake where they belong.
78942ec8c4b4Smrg#
78952ec8c4b4Smrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
78962ec8c4b4Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
78972ec8c4b4Smrg# using a macro with the same name in our local m4/libtool.m4 it'll
78982ec8c4b4Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
78992ec8c4b4Smrg# and doesn't know about Autoconf macros at all.)
79002ec8c4b4Smrg#
79012ec8c4b4Smrg# So we provide this file, which has a silly filename so it's always
79022ec8c4b4Smrg# included after everything else.  This provides aclocal with the
79032ec8c4b4Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
79042ec8c4b4Smrg# because those macros already exist, or will be overwritten later.
79052ec8c4b4Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
79062ec8c4b4Smrg#
79072ec8c4b4Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
79082ec8c4b4Smrg# Yes, that means every name once taken will need to remain here until
79092ec8c4b4Smrg# we give up compatibility with versions before 1.7, at which point
79102ec8c4b4Smrg# we need to keep only those names which we still refer to.
79112ec8c4b4Smrg
79122ec8c4b4Smrg# This is to help aclocal find these macros, as it can't see m4_define.
79132ec8c4b4SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
79142ec8c4b4Smrg
79152ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
79162ec8c4b4Smrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
79172ec8c4b4Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
79182ec8c4b4Smrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
79192ec8c4b4Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
79202ec8c4b4Smrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
79212ec8c4b4Smrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
79222ec8c4b4Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
79232ec8c4b4Smrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
79242ec8c4b4Smrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
79252ec8c4b4Smrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
79262ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
79272ec8c4b4Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
79282ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
79292ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
79302ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
79312ec8c4b4Smrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
79322ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
79332ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
79342ec8c4b4Smrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
79352ec8c4b4Smrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
79362ec8c4b4Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
79372ec8c4b4Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
79382ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
79392ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
79402ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
79412ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
79422ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
79432ec8c4b4Smrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
79442ec8c4b4Smrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
79452ec8c4b4Smrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
79462ec8c4b4Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
79472ec8c4b4Smrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
79482ec8c4b4Smrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
79492ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
79502ec8c4b4Smrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
79512ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
79522ec8c4b4Smrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
79532ec8c4b4Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
79542ec8c4b4Smrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
79552ec8c4b4Smrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
79562ec8c4b4Smrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
79572ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
79582ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
79592ec8c4b4Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
79602ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
79612ec8c4b4Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
79622ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
79632ec8c4b4Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
79642ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
79652ec8c4b4Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
79662ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
79672ec8c4b4Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
79682ec8c4b4Smrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
79692ec8c4b4Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
79702ec8c4b4Smrg
797109885543Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
797209885543Smrg# 
797309885543Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
797409885543Smrg#
797509885543Smrg# This program is free software; you can redistribute it and/or modify
797609885543Smrg# it under the terms of the GNU General Public License as published by
797709885543Smrg# the Free Software Foundation; either version 2 of the License, or
797809885543Smrg# (at your option) any later version.
797909885543Smrg#
798009885543Smrg# This program is distributed in the hope that it will be useful, but
798109885543Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
798209885543Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
798309885543Smrg# General Public License for more details.
798409885543Smrg#
798509885543Smrg# You should have received a copy of the GNU General Public License
798609885543Smrg# along with this program; if not, write to the Free Software
798709885543Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
798809885543Smrg#
798909885543Smrg# As a special exception to the GNU General Public License, if you
799009885543Smrg# distribute this file as part of a program that contains a
799109885543Smrg# configuration script generated by Autoconf, you may include it under
799209885543Smrg# the same distribution terms that you use for the rest of that program.
799309885543Smrg
799409885543Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
799509885543Smrg# ----------------------------------
799609885543SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
799709885543Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
799809885543Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
799909885543SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
800009885543Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
800109885543Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
800209885543Smrgfi
800309885543Smrgif test -n "$PKG_CONFIG"; then
800409885543Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
800509885543Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
800609885543Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
800709885543Smrg		AC_MSG_RESULT([yes])
800809885543Smrg	else
800909885543Smrg		AC_MSG_RESULT([no])
801009885543Smrg		PKG_CONFIG=""
801109885543Smrg	fi
801209885543Smrg		
801309885543Smrgfi[]dnl
801409885543Smrg])# PKG_PROG_PKG_CONFIG
801509885543Smrg
801609885543Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
801709885543Smrg#
801809885543Smrg# Check to see whether a particular set of modules exists.  Similar
801909885543Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
802009885543Smrg#
802109885543Smrg#
802209885543Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
802309885543Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
802409885543Smrg# PKG_CHECK_EXISTS manually
802509885543Smrg# --------------------------------------------------------------
802609885543SmrgAC_DEFUN([PKG_CHECK_EXISTS],
802709885543Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
802809885543Smrgif test -n "$PKG_CONFIG" && \
802909885543Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
803009885543Smrg  m4_ifval([$2], [$2], [:])
803109885543Smrgm4_ifvaln([$3], [else
803209885543Smrg  $3])dnl
803309885543Smrgfi])
803409885543Smrg
803509885543Smrg
803609885543Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
803709885543Smrg# ---------------------------------------------
803809885543Smrgm4_define([_PKG_CONFIG],
80397104f784Smrg[if test -n "$$1"; then
80407104f784Smrg    pkg_cv_[]$1="$$1"
80417104f784Smrg elif test -n "$PKG_CONFIG"; then
80427104f784Smrg    PKG_CHECK_EXISTS([$3],
80437104f784Smrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
80447104f784Smrg		     [pkg_failed=yes])
80457104f784Smrg else
80467104f784Smrg    pkg_failed=untried
804709885543Smrgfi[]dnl
804809885543Smrg])# _PKG_CONFIG
804909885543Smrg
805009885543Smrg# _PKG_SHORT_ERRORS_SUPPORTED
805109885543Smrg# -----------------------------
805209885543SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
805309885543Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
805409885543Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
805509885543Smrg        _pkg_short_errors_supported=yes
805609885543Smrgelse
805709885543Smrg        _pkg_short_errors_supported=no
805809885543Smrgfi[]dnl
805909885543Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
806009885543Smrg
806109885543Smrg
806209885543Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
806309885543Smrg# [ACTION-IF-NOT-FOUND])
806409885543Smrg#
806509885543Smrg#
806609885543Smrg# Note that if there is a possibility the first call to
806709885543Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
806809885543Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
806909885543Smrg#
807009885543Smrg#
807109885543Smrg# --------------------------------------------------------------
807209885543SmrgAC_DEFUN([PKG_CHECK_MODULES],
807309885543Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
807409885543SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
807509885543SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
807609885543Smrg
807709885543Smrgpkg_failed=no
807809885543SmrgAC_MSG_CHECKING([for $1])
807909885543Smrg
808009885543Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
808109885543Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
808209885543Smrg
808309885543Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
808409885543Smrgand $1[]_LIBS to avoid the need to call pkg-config.
808509885543SmrgSee the pkg-config man page for more details.])
808609885543Smrg
808709885543Smrgif test $pkg_failed = yes; then
808809885543Smrg        _PKG_SHORT_ERRORS_SUPPORTED
808909885543Smrg        if test $_pkg_short_errors_supported = yes; then
80907104f784Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
809109885543Smrg        else 
80927104f784Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
809309885543Smrg        fi
809409885543Smrg	# Put the nasty error message in config.log where it belongs
809509885543Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
809609885543Smrg
809709885543Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
809809885543Smrg[Package requirements ($2) were not met:
809909885543Smrg
810009885543Smrg$$1_PKG_ERRORS
810109885543Smrg
810209885543SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
810309885543Smrginstalled software in a non-standard prefix.
810409885543Smrg
810509885543Smrg_PKG_TEXT
810609885543Smrg])],
810709885543Smrg		[AC_MSG_RESULT([no])
810809885543Smrg                $4])
810909885543Smrgelif test $pkg_failed = untried; then
811009885543Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
811109885543Smrg[The pkg-config script could not be found or is too old.  Make sure it
811209885543Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
811309885543Smrgpath to pkg-config.
811409885543Smrg
811509885543Smrg_PKG_TEXT
811609885543Smrg
81177104f784SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
811809885543Smrg		[$4])
811909885543Smrgelse
812009885543Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
812109885543Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
812209885543Smrg        AC_MSG_RESULT([yes])
812309885543Smrg	ifelse([$3], , :, [$3])
812409885543Smrgfi[]dnl
812509885543Smrg])# PKG_CHECK_MODULES
812609885543Smrg
81277104f784Smrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
812809885543Smrgdnl
812909885543Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
813009885543Smrgdnl 
813109885543Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
813209885543Smrgdnl copy of this software and associated documentation files (the
813309885543Smrgdnl "Software"), to deal in the Software without restriction, including
813409885543Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
813509885543Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
813609885543Smrgdnl to whom the Software is furnished to do so, provided that the above
813709885543Smrgdnl copyright notice(s) and this permission notice appear in all copies of
813809885543Smrgdnl the Software and that both the above copyright notice(s) and this
813909885543Smrgdnl permission notice appear in supporting documentation.
814009885543Smrgdnl
814109885543Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
814209885543Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
814309885543Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
814409885543Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
814509885543Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
814609885543Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
814709885543Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
814809885543Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
814909885543Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
815009885543Smrgdnl
815109885543Smrgdnl Except as contained in this notice, the name of a copyright holder
815209885543Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
815309885543Smrgdnl or other dealings in this Software without prior written authorization
815409885543Smrgdnl of the copyright holder.
815509885543Smrg
815609885543Smrg# XORG_MACROS_VERSION(required-version)
815709885543Smrg# -------------------------------------
815809885543Smrg# Minimum version: 1.1.0
815909885543Smrg#
816009885543Smrg# If you're using a macro added in Version 1.1 or newer, include this in
816109885543Smrg# your configure.ac with the minimum required version, such as:
816209885543Smrg# XORG_MACROS_VERSION(1.1)
816309885543Smrg#
816409885543Smrg# To force at least a version with this macro defined, also add:
816509885543Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
816609885543Smrg#
816709885543Smrg#
816809885543Smrg# See the "minimum version" comment for each macro you use to see what 
816909885543Smrg# version you require.
817009885543SmrgAC_DEFUN([XORG_MACROS_VERSION],[
817109885543Smrg	[XORG_MACROS_needed_version=$1
817209885543Smrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
817309885543Smrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
817409885543Smrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
81757104f784Smrg	[XORG_MACROS_version=1.2.1
817609885543Smrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
817709885543Smrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
817809885543Smrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
817909885543Smrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
818009885543Smrg	fi
818109885543Smrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
818209885543Smrg		AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
818309885543Smrg	fi
818409885543Smrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
818509885543Smrg]) # XORG_MACROS_VERSION
818609885543Smrg
818709885543Smrg# XORG_PROG_RAWCPP()
818809885543Smrg# ------------------
818909885543Smrg# Minimum version: 1.0.0
819009885543Smrg#
819109885543Smrg# Find cpp program and necessary flags for use in pre-processing text files
819209885543Smrg# such as man pages and config files
819309885543SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
819409885543SmrgAC_REQUIRE([AC_PROG_CPP])
819509885543SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
819609885543Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
819709885543Smrg
819809885543Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
819909885543Smrg# which is not the best choice for supporting other OS'es, but covers most
820009885543Smrg# of the ones we need for now.
820109885543SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
820209885543SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
820309885543Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
820409885543Smrg	AC_MSG_RESULT([no])
820509885543Smrgelse
820609885543Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
820709885543Smrg		RAWCPPFLAGS=-undef
820809885543Smrg		AC_MSG_RESULT([yes])
82097104f784Smrg	# under Cygwin unix is still defined even with -undef
82107104f784Smrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
82117104f784Smrg		RAWCPPFLAGS="-undef -ansi"
82127104f784Smrg		AC_MSG_RESULT([yes, with -ansi])
821309885543Smrg	else
821409885543Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
821509885543Smrg	fi
821609885543Smrgfi
821709885543Smrgrm -f conftest.$ac_ext
821809885543Smrg
821909885543SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
822009885543SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
822109885543Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
822209885543Smrg	AC_MSG_RESULT([no])
822309885543Smrgelse
822409885543Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
822509885543Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
822609885543Smrg		AC_MSG_RESULT([yes])
822709885543Smrg	else
822809885543Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
822909885543Smrg	fi
823009885543Smrgfi
823109885543Smrgrm -f conftest.$ac_ext
823209885543SmrgAC_SUBST(RAWCPPFLAGS)
823309885543Smrg]) # XORG_PROG_RAWCPP
823409885543Smrg
823509885543Smrg# XORG_MANPAGE_SECTIONS()
823609885543Smrg# -----------------------
823709885543Smrg# Minimum version: 1.0.0
823809885543Smrg#
823909885543Smrg# Determine which sections man pages go in for the different man page types
824009885543Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
824109885543Smrg# Not sure if there's any better way than just hardcoding by OS name.
824209885543Smrg# Override default settings by setting environment variables
824309885543Smrg
824409885543SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
824509885543SmrgAC_REQUIRE([AC_CANONICAL_HOST])
824609885543Smrg
824709885543Smrgif test x$APP_MAN_SUFFIX = x    ; then
824809885543Smrg    APP_MAN_SUFFIX=1
824909885543Smrgfi
825009885543Smrgif test x$APP_MAN_DIR = x    ; then
825109885543Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
825209885543Smrgfi
825309885543Smrg
825409885543Smrgif test x$LIB_MAN_SUFFIX = x    ; then
825509885543Smrg    LIB_MAN_SUFFIX=3
825609885543Smrgfi
825709885543Smrgif test x$LIB_MAN_DIR = x    ; then
825809885543Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
825909885543Smrgfi
826009885543Smrg
826109885543Smrgif test x$FILE_MAN_SUFFIX = x    ; then
826209885543Smrg    case $host_os in
826309885543Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
826409885543Smrg	*)		FILE_MAN_SUFFIX=5  ;;
826509885543Smrg    esac
826609885543Smrgfi
826709885543Smrgif test x$FILE_MAN_DIR = x    ; then
826809885543Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
826909885543Smrgfi
827009885543Smrg
827109885543Smrgif test x$MISC_MAN_SUFFIX = x    ; then
827209885543Smrg    case $host_os in
827309885543Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
827409885543Smrg	*)		MISC_MAN_SUFFIX=7  ;;
827509885543Smrg    esac
827609885543Smrgfi
827709885543Smrgif test x$MISC_MAN_DIR = x    ; then
827809885543Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
827909885543Smrgfi
828009885543Smrg
828109885543Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
828209885543Smrg    case $host_os in
828309885543Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
828409885543Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
828509885543Smrg    esac
828609885543Smrgfi
828709885543Smrgif test x$DRIVER_MAN_DIR = x    ; then
828809885543Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
828909885543Smrgfi
829009885543Smrg
829109885543Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
829209885543Smrg    case $host_os in
829309885543Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
829409885543Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
829509885543Smrg    esac
829609885543Smrgfi
829709885543Smrgif test x$ADMIN_MAN_DIR = x    ; then
829809885543Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
829909885543Smrgfi
830009885543Smrg
830109885543Smrg
830209885543SmrgAC_SUBST([APP_MAN_SUFFIX])
830309885543SmrgAC_SUBST([LIB_MAN_SUFFIX])
830409885543SmrgAC_SUBST([FILE_MAN_SUFFIX])
830509885543SmrgAC_SUBST([MISC_MAN_SUFFIX])
830609885543SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
830709885543SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
830809885543SmrgAC_SUBST([APP_MAN_DIR])
830909885543SmrgAC_SUBST([LIB_MAN_DIR])
831009885543SmrgAC_SUBST([FILE_MAN_DIR])
831109885543SmrgAC_SUBST([MISC_MAN_DIR])
831209885543SmrgAC_SUBST([DRIVER_MAN_DIR])
831309885543SmrgAC_SUBST([ADMIN_MAN_DIR])
831409885543Smrg]) # XORG_MANPAGE_SECTIONS
831509885543Smrg
831609885543Smrg# XORG_CHECK_LINUXDOC
831709885543Smrg# -------------------
831809885543Smrg# Minimum version: 1.0.0
831909885543Smrg#
832009885543Smrg# Defines the variable MAKE_TEXT if the necessary tools and
832109885543Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
832209885543Smrg# Whether or not the necessary tools and files are found can be checked
832309885543Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
832409885543SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
83257104f784Smrgif test x$XORG_SGML_PATH = x ; then
83267104f784Smrg    XORG_SGML_PATH=$prefix/share/sgml
83277104f784Smrgfi
832809885543SmrgHAVE_DEFS_ENT=
832909885543Smrg
83307104f784Smrgif test x"$cross_compiling" = x"yes" ; then
83317104f784Smrg  HAVE_DEFS_ENT=no
83327104f784Smrgelse
83337104f784Smrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
83347104f784Smrgfi
833509885543Smrg
833609885543SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
833709885543SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
833809885543Smrg
833909885543SmrgAC_MSG_CHECKING([Whether to build documentation])
834009885543Smrg
834109885543Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
834209885543Smrg   BUILDDOC=yes
834309885543Smrgelse
834409885543Smrg   BUILDDOC=no
834509885543Smrgfi
834609885543Smrg
834709885543SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
834809885543Smrg
834909885543SmrgAC_MSG_RESULT([$BUILDDOC])
835009885543Smrg
835109885543SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
835209885543Smrg
835309885543Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
835409885543Smrg   BUILDPDFDOC=yes
835509885543Smrgelse
835609885543Smrg   BUILDPDFDOC=no
835709885543Smrgfi
835809885543Smrg
835909885543SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
836009885543Smrg
836109885543SmrgAC_MSG_RESULT([$BUILDPDFDOC])
836209885543Smrg
836309885543SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
836409885543SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
836509885543SmrgMAKE_PDF="$PS2PDF"
836609885543SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
836709885543Smrg
836809885543SmrgAC_SUBST(MAKE_TEXT)
836909885543SmrgAC_SUBST(MAKE_PS)
837009885543SmrgAC_SUBST(MAKE_PDF)
837109885543SmrgAC_SUBST(MAKE_HTML)
837209885543Smrg]) # XORG_CHECK_LINUXDOC
837309885543Smrg
837409885543Smrg# XORG_CHECK_DOCBOOK
837509885543Smrg# -------------------
837609885543Smrg# Minimum version: 1.0.0
837709885543Smrg#
837809885543Smrg# Checks for the ability to build output formats from SGML DocBook source.
837909885543Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
838009885543Smrg# indicates whether the necessary tools and files are found and, if set,
838109885543Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
838209885543SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
83837104f784Smrgif test x$XORG_SGML_PATH = x ; then
83847104f784Smrg    XORG_SGML_PATH=$prefix/share/sgml
83857104f784Smrgfi
838609885543SmrgHAVE_DEFS_ENT=
838709885543SmrgBUILDTXTDOC=no
838809885543SmrgBUILDPDFDOC=no
838909885543SmrgBUILDPSDOC=no
839009885543SmrgBUILDHTMLDOC=no
839109885543Smrg
839209885543SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
839309885543Smrg
839409885543SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
839509885543SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
839609885543SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
839709885543SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
839809885543Smrg
839909885543SmrgAC_MSG_CHECKING([Whether to build text documentation])
840009885543Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
840109885543Smrg   test x$BUILD_TXTDOC != xno; then
840209885543Smrg	BUILDTXTDOC=yes
840309885543Smrgfi
840409885543SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
840509885543SmrgAC_MSG_RESULT([$BUILDTXTDOC])
840609885543Smrg
840709885543SmrgAC_MSG_CHECKING([Whether to build PDF documentation])
840809885543Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
840909885543Smrg   test x$BUILD_PDFDOC != xno; then
841009885543Smrg	BUILDPDFDOC=yes
841109885543Smrgfi
841209885543SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
841309885543SmrgAC_MSG_RESULT([$BUILDPDFDOC])
841409885543Smrg
841509885543SmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
841609885543Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
841709885543Smrg   test x$BUILD_PSDOC != xno; then
841809885543Smrg	BUILDPSDOC=yes
841909885543Smrgfi
842009885543SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
842109885543SmrgAC_MSG_RESULT([$BUILDPSDOC])
842209885543Smrg
842309885543SmrgAC_MSG_CHECKING([Whether to build HTML documentation])
842409885543Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
842509885543Smrg   test x$BUILD_HTMLDOC != xno; then
842609885543Smrg	BUILDHTMLDOC=yes
842709885543Smrgfi
842809885543SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
842909885543SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
843009885543Smrg
843109885543SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
843209885543SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
843309885543SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
843409885543SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
843509885543Smrg
843609885543SmrgAC_SUBST(MAKE_TEXT)
843709885543SmrgAC_SUBST(MAKE_PS)
843809885543SmrgAC_SUBST(MAKE_PDF)
843909885543SmrgAC_SUBST(MAKE_HTML)
844009885543Smrg]) # XORG_CHECK_DOCBOOK
844109885543Smrg
844209885543Smrg# XORG_CHECK_MALLOC_ZERO
844309885543Smrg# ----------------------
844409885543Smrg# Minimum version: 1.0.0
844509885543Smrg#
844609885543Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
844709885543Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
844809885543Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
844909885543SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
845009885543SmrgAC_ARG_ENABLE(malloc0returnsnull,
845109885543Smrg	AC_HELP_STRING([--enable-malloc0returnsnull],
845209885543Smrg		       [malloc(0) returns NULL (default: auto)]),
845309885543Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
845409885543Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
845509885543Smrg
845609885543SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
845709885543Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
845809885543Smrg	AC_RUN_IFELSE([
845909885543Smrgchar *malloc();
846009885543Smrgchar *realloc();
846109885543Smrgchar *calloc();
846209885543Smrgmain() {
846309885543Smrg    char *m0, *r0, *c0, *p;
846409885543Smrg    m0 = malloc(0);
846509885543Smrg    p = malloc(10);
846609885543Smrg    r0 = realloc(p,0);
846709885543Smrg    c0 = calloc(0);
846809885543Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
846909885543Smrg}],
847009885543Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
847109885543Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
847209885543Smrgfi
847309885543SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
847409885543Smrg
847509885543Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
847609885543Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
847709885543Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
847809885543Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
847909885543Smrgelse
848009885543Smrg	MALLOC_ZERO_CFLAGS=""
848109885543Smrg	XMALLOC_ZERO_CFLAGS=""
848209885543Smrg	XTMALLOC_ZERO_CFLAGS=""
848309885543Smrgfi
848409885543Smrg
848509885543SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
848609885543SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
848709885543SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
848809885543Smrg]) # XORG_CHECK_MALLOC_ZERO
848909885543Smrg
849009885543Smrg# XORG_WITH_LINT()
849109885543Smrg# ----------------
849209885543Smrg# Minimum version: 1.1.0
849309885543Smrg#
849409885543Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
849509885543Smrg# is specified.   (Use --with-lint=sparse for sparse.)
849609885543Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
849709885543Smrg# Sets $LINT_FLAGS to flags to pass to source checker
849809885543Smrg# Sets LINT automake conditional if enabled (default: disabled)
849909885543Smrg#
850009885543SmrgAC_DEFUN([XORG_WITH_LINT],[
850109885543Smrg
850209885543Smrg# Allow checking code with lint, sparse, etc.
850309885543SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
850409885543Smrg		[Use a lint-style source code checker (default: disabled)])],
850509885543Smrg		[use_lint=$withval], [use_lint=no])
850609885543Smrgif test "x$use_lint" = "xyes" ; then
850709885543Smrg	LINT="lint"
850809885543Smrgelse
850909885543Smrg	LINT="$use_lint"
851009885543Smrgfi
851109885543Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
851209885543Smrg    case $LINT in
851309885543Smrg	lint|*/lint)
851409885543Smrg	    case $host_os in
851509885543Smrg		solaris*)
851609885543Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
851709885543Smrg			;;
851809885543Smrg	    esac
851909885543Smrg	    ;;
852009885543Smrg    esac
852109885543Smrgfi
852209885543Smrg
852309885543SmrgAC_SUBST(LINT)
852409885543SmrgAC_SUBST(LINT_FLAGS)
852509885543SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
852609885543Smrg
852709885543Smrg]) # XORG_WITH_LINT
852809885543Smrg
852909885543Smrg# XORG_LINT_LIBRARY(LIBNAME)
853009885543Smrg# --------------------------
853109885543Smrg# Minimum version: 1.1.0
853209885543Smrg#
853309885543Smrg# Sets up flags for building lint libraries for checking programs that call
853409885543Smrg# functions in the library.
853509885543Smrg# Disabled by default, enable with --enable-lint-library
853609885543Smrg# Sets: 
853709885543Smrg#	@LINTLIB@		- name of lint library file to make
853809885543Smrg#	MAKE_LINT_LIB		- automake conditional
853909885543Smrg#
854009885543Smrg
854109885543SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
854209885543SmrgAC_REQUIRE([XORG_WITH_LINT])
854309885543Smrg# Build lint "library" for more indepth checks of programs calling this library
854409885543SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
854509885543Smrg	[Create lint library (default: disabled)])],
854609885543Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
854709885543Smrgif test "x$make_lint_lib" != "xno" ; then
854809885543Smrg	if test "x$LINT" = "xno" ; then
854909885543Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
855009885543Smrg	fi
855109885543Smrg	if test "x$make_lint_lib" = "xyes" ; then
855209885543Smrg		LINTLIB=llib-l$1.ln
855309885543Smrg	else
855409885543Smrg		LINTLIB=$make_lint_lib
855509885543Smrg	fi
855609885543Smrgfi
855709885543SmrgAC_SUBST(LINTLIB)
855809885543SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
855909885543Smrg
856009885543Smrg]) # XORG_LINT_LIBRARY
856109885543Smrg
85627104f784Smrg# XORG_CWARNFLAGS
85637104f784Smrg# ---------------
85647104f784Smrg# Minimum version: 1.2.0
85657104f784Smrg#
85667104f784Smrg# Defines CWARNFLAGS to enable C compiler warnings.
85677104f784Smrg#
85687104f784SmrgAC_DEFUN([XORG_CWARNFLAGS], [
85697104f784SmrgAC_REQUIRE([AC_PROG_CC])
85707104f784Smrgif  test "x$GCC" = xyes ; then
85717104f784Smrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
85727104f784Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
85737104f784Smrg-Wbad-function-cast"
85747104f784Smrg    case `gcc -dumpversion` in
85757104f784Smrg    3.4.* | 4.*)
85767104f784Smrg	CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement"
85777104f784Smrg	;;
85787104f784Smrg    esac
85797104f784Smrgelse
85807104f784Smrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
85817104f784Smrg    if test "x$SUNCC" = "xyes"; then
85827104f784Smrg	CWARNFLAGS="-v"
85837104f784Smrg    fi
85847104f784Smrgfi
85857104f784SmrgAC_SUBST(CWARNFLAGS)
85867104f784Smrg]) # XORG_CWARNFLAGS
858709885543Smrgdnl Copyright 2005 Red Hat, Inc
858809885543Smrgdnl
858909885543Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
859009885543Smrgdnl documentation for any purpose is hereby granted without fee, provided that
859109885543Smrgdnl the above copyright notice appear in all copies and that both that
859209885543Smrgdnl copyright notice and this permission notice appear in supporting
859309885543Smrgdnl documentation.
859409885543Smrgdnl
859509885543Smrgdnl The above copyright notice and this permission notice shall be included
859609885543Smrgdnl in all copies or substantial portions of the Software.
859709885543Smrgdnl
859809885543Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
859909885543Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
860009885543Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
860109885543Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
860209885543Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
860309885543Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
860409885543Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
860509885543Smrgdnl
860609885543Smrgdnl Except as contained in this notice, the name of the copyright holders shall
860709885543Smrgdnl not be used in advertising or otherwise to promote the sale, use or
860809885543Smrgdnl other dealings in this Software without prior written authorization
860909885543Smrgdnl from the copyright holders.
861009885543Smrgdnl
861109885543Smrg
861209885543Smrg# XORG_RELEASE_VERSION
861309885543Smrg# --------------------
861409885543Smrg# Adds --with/without-release-string and changes the PACKAGE and
861509885543Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
861609885543Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
861709885543Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
861809885543Smrg 
861909885543SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
862009885543Smrg	AC_ARG_WITH(release-version,
862109885543Smrg			AC_HELP_STRING([--with-release-version=STRING],
862209885543Smrg				[Use release version string in package name]),
862309885543Smrg			[RELEASE_VERSION="$withval"],
862409885543Smrg			[RELEASE_VERSION=""])
862509885543Smrg	if test "x$RELEASE_VERSION" != "x"; then
862609885543Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
862709885543Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
862809885543Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
862909885543Smrg	fi
863009885543Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
863109885543Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
863209885543Smrg		[Major version of this package])
86337104f784Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
863409885543Smrg	if test "x$PVM" = "x"; then
863509885543Smrg		PVM="0"
863609885543Smrg	fi
863709885543Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
863809885543Smrg		[$PVM],
863909885543Smrg		[Minor version of this package])
86407104f784Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
864109885543Smrg	if test "x$PVP" = "x"; then
864209885543Smrg		PVP="0"
864309885543Smrg	fi
864409885543Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
864509885543Smrg		[$PVP],
864609885543Smrg		[Patch version of this package])
864709885543Smrg])
864809885543Smrg
86497104f784Smrg# XORG_CHANGELOG()
86507104f784Smrg# ----------------
86517104f784Smrg# Minimum version: 1.2.0
86527104f784Smrg#
86537104f784Smrg# Defines the variable CHANGELOG_CMD as the command to generate
86547104f784Smrg# ChangeLog from git.
86557104f784Smrg#
86567104f784Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean.
86577104f784Smrg#
86587104f784SmrgAC_DEFUN([XORG_CHANGELOG], [
86597104f784SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
86607104f784Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
86617104f784Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
86627104f784SmrgAC_SUBST([CHANGELOG_CMD])
86637104f784SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
86647104f784Smrg]) # XORG_CHANGELOG
86657104f784Smrg
86667104f784Smrgdnl Copyright 2005 Red Hat, Inc
86677104f784Smrgdnl 
86687104f784Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
86697104f784Smrgdnl documentation for any purpose is hereby granted without fee, provided that
86707104f784Smrgdnl the above copyright notice appear in all copies and that both that
86717104f784Smrgdnl copyright notice and this permission notice appear in supporting
86727104f784Smrgdnl documentation.
86737104f784Smrgdnl 
86747104f784Smrgdnl The above copyright notice and this permission notice shall be included
86757104f784Smrgdnl in all copies or substantial portions of the Software.
86767104f784Smrgdnl 
86777104f784Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
86787104f784Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
86797104f784Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
86807104f784Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
86817104f784Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
86827104f784Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
86837104f784Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
86847104f784Smrgdnl 
86857104f784Smrgdnl Except as contained in this notice, the name of the copyright holders shall
86867104f784Smrgdnl not be used in advertising or otherwise to promote the sale, use or
86877104f784Smrgdnl other dealings in this Software without prior written authorization
86887104f784Smrgdnl from the copyright holders.
86897104f784Smrgdnl 
86907104f784Smrg
86917104f784Smrg# XORG_DRIVER_CHECK_EXT()
86927104f784Smrg# --------------------------
86937104f784Smrg# Checks for the $1 define in xorg-server.h (from the sdk).  If it
86947104f784Smrg# is defined, then add $1 to $REQUIRED_MODULES.
86957104f784Smrg
86967104f784SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[
86977104f784Smrg	SAVE_CFLAGS="$CFLAGS"
86987104f784Smrg	CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
86997104f784Smrg	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
87007104f784Smrg#include "xorg-server.h"
87017104f784Smrg#if !defined $1
87027104f784Smrg#error $1 not defined
87037104f784Smrg#endif
87047104f784Smrg		]])],
87057104f784Smrg		[_EXT_CHECK=yes],
87067104f784Smrg		[_EXT_CHECK=no])
87077104f784Smrg	CFLAGS="$SAVE_CFLAGS"
87087104f784Smrg	AC_MSG_CHECKING([if $1 is defined])
87097104f784Smrg	AC_MSG_RESULT([$_EXT_CHECK])
87107104f784Smrg	if test "$_EXT_CHECK" != no; then
87117104f784Smrg		REQUIRED_MODULES="$REQUIRED_MODULES $2"
87127104f784Smrg	fi
87137104f784Smrg])
87147104f784Smrg
87157104f784Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
871609885543Smrg#
871709885543Smrg# This file is free software; the Free Software Foundation
871809885543Smrg# gives unlimited permission to copy and/or distribute it,
871909885543Smrg# with or without modifications, as long as this notice is preserved.
872009885543Smrg
872109885543Smrg# AM_AUTOMAKE_VERSION(VERSION)
872209885543Smrg# ----------------------------
872309885543Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
872409885543Smrg# generated from the m4 files accompanying Automake X.Y.
87257104f784Smrg# (This private macro should not be called outside this file.)
87267104f784SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
87277104f784Smrg[am__api_version='1.10'
87287104f784Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
87297104f784Smrgdnl require some minimum version.  Point them to the right macro.
87307104f784Smrgm4_if([$1], [1.10.2], [],
87317104f784Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
87327104f784Smrg])
87337104f784Smrg
87347104f784Smrg# _AM_AUTOCONF_VERSION(VERSION)
87357104f784Smrg# -----------------------------
87367104f784Smrg# aclocal traces this macro to find the Autoconf version.
87377104f784Smrg# This is a private macro too.  Using m4_define simplifies
87387104f784Smrg# the logic in aclocal, which can simply ignore this definition.
87397104f784Smrgm4_define([_AM_AUTOCONF_VERSION], [])
874009885543Smrg
874109885543Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
874209885543Smrg# -------------------------------
87437104f784Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
87447104f784Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
874509885543SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
87467104f784Smrg[AM_AUTOMAKE_VERSION([1.10.2])dnl
87477104f784Smrgm4_ifndef([AC_AUTOCONF_VERSION],
87487104f784Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
87497104f784Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
875009885543Smrg
875109885543Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
875209885543Smrg
875309885543Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
875409885543Smrg#
875509885543Smrg# This file is free software; the Free Software Foundation
875609885543Smrg# gives unlimited permission to copy and/or distribute it,
875709885543Smrg# with or without modifications, as long as this notice is preserved.
875809885543Smrg
875909885543Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
876009885543Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
876109885543Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
876209885543Smrg#
876309885543Smrg# Of course, Automake must honor this variable whenever it calls a
876409885543Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
876509885543Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
876609885543Smrg# depending on how configure is run.  This is pretty annoying, since
876709885543Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
876809885543Smrg# source directory, any form will work fine, but in subdirectories a
876909885543Smrg# relative path needs to be adjusted first.
877009885543Smrg#
877109885543Smrg# $ac_aux_dir/missing
877209885543Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
877309885543Smrg# $top_srcdir/$ac_aux_dir/missing
877409885543Smrg#    fails if $ac_aux_dir is absolute,
877509885543Smrg#    fails when called from a subdirectory in a VPATH build with
877609885543Smrg#          a relative $ac_aux_dir
877709885543Smrg#
877809885543Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
877909885543Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
878009885543Smrg# harmless because $srcdir is `.', but things will broke when you
878109885543Smrg# start a VPATH build or use an absolute $srcdir.
878209885543Smrg#
878309885543Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
878409885543Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
878509885543Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
878609885543Smrg# and then we would define $MISSING as
878709885543Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
878809885543Smrg# This will work as long as MISSING is not called from configure, because
878909885543Smrg# unfortunately $(top_srcdir) has no meaning in configure.
879009885543Smrg# However there are other variables, like CC, which are often used in
879109885543Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
879209885543Smrg#
879309885543Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
879409885543Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
879509885543Smrg# configured tree to be moved without reconfiguration.
879609885543Smrg
879709885543SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
879809885543Smrg[dnl Rely on autoconf to set up CDPATH properly.
879909885543SmrgAC_PREREQ([2.50])dnl
880009885543Smrg# expand $ac_aux_dir to an absolute path
880109885543Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
880209885543Smrg])
880309885543Smrg
880409885543Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
880509885543Smrg
88067104f784Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
880709885543Smrg# Free Software Foundation, Inc.
880809885543Smrg#
880909885543Smrg# This file is free software; the Free Software Foundation
881009885543Smrg# gives unlimited permission to copy and/or distribute it,
881109885543Smrg# with or without modifications, as long as this notice is preserved.
881209885543Smrg
88137104f784Smrg# serial 8
881409885543Smrg
881509885543Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
881609885543Smrg# -------------------------------------
881709885543Smrg# Define a conditional.
881809885543SmrgAC_DEFUN([AM_CONDITIONAL],
881909885543Smrg[AC_PREREQ(2.52)dnl
882009885543Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
882109885543Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
88227104f784SmrgAC_SUBST([$1_TRUE])dnl
88237104f784SmrgAC_SUBST([$1_FALSE])dnl
88247104f784Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
88257104f784Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
882609885543Smrgif $2; then
882709885543Smrg  $1_TRUE=
882809885543Smrg  $1_FALSE='#'
882909885543Smrgelse
883009885543Smrg  $1_TRUE='#'
883109885543Smrg  $1_FALSE=
883209885543Smrgfi
883309885543SmrgAC_CONFIG_COMMANDS_PRE(
883409885543Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
883509885543Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
883609885543SmrgUsually this means the macro was only invoked conditionally.]])
883709885543Smrgfi])])
883809885543Smrg
88397104f784Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
884009885543Smrg# Free Software Foundation, Inc.
884109885543Smrg#
884209885543Smrg# This file is free software; the Free Software Foundation
884309885543Smrg# gives unlimited permission to copy and/or distribute it,
884409885543Smrg# with or without modifications, as long as this notice is preserved.
884509885543Smrg
88467104f784Smrg# serial 9
884709885543Smrg
884809885543Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
884909885543Smrg# written in clear, in which case automake, when reading aclocal.m4,
885009885543Smrg# will think it sees a *use*, and therefore will trigger all it's
885109885543Smrg# C support machinery.  Also note that it means that autoscan, seeing
885209885543Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
885309885543Smrg
885409885543Smrg
885509885543Smrg# _AM_DEPENDENCIES(NAME)
885609885543Smrg# ----------------------
885709885543Smrg# See how the compiler implements dependency checking.
885809885543Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
885909885543Smrg# We try a few techniques and use that to set a single cache variable.
886009885543Smrg#
886109885543Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
886209885543Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
886309885543Smrg# dependency, and given that the user is not expected to run this macro,
886409885543Smrg# just rely on AC_PROG_CC.
886509885543SmrgAC_DEFUN([_AM_DEPENDENCIES],
886609885543Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
886709885543SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
886809885543SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
886909885543SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
887009885543Smrg
887109885543Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
887209885543Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
887309885543Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
88747104f784Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
887509885543Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
887609885543Smrg                   [depcc="$$1"   am_compiler_list=])
887709885543Smrg
887809885543SmrgAC_CACHE_CHECK([dependency style of $depcc],
887909885543Smrg               [am_cv_$1_dependencies_compiler_type],
888009885543Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
888109885543Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
888209885543Smrg  # making bogus files that we don't know about and never remove.  For
888309885543Smrg  # instance it was reported that on HP-UX the gcc test will end up
888409885543Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
888509885543Smrg  # in D'.
888609885543Smrg  mkdir conftest.dir
888709885543Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
888809885543Smrg  # using a relative directory.
888909885543Smrg  cp "$am_depcomp" conftest.dir
889009885543Smrg  cd conftest.dir
889109885543Smrg  # We will build objects and dependencies in a subdirectory because
889209885543Smrg  # it helps to detect inapplicable dependency modes.  For instance
889309885543Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
889409885543Smrg  # side effect of compilation, but ICC will put the dependencies in
889509885543Smrg  # the current directory while Tru64 will put them in the object
889609885543Smrg  # directory.
889709885543Smrg  mkdir sub
889809885543Smrg
889909885543Smrg  am_cv_$1_dependencies_compiler_type=none
890009885543Smrg  if test "$am_compiler_list" = ""; then
890109885543Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
890209885543Smrg  fi
890309885543Smrg  for depmode in $am_compiler_list; do
890409885543Smrg    # Setup a source with many dependencies, because some compilers
890509885543Smrg    # like to wrap large dependency lists on column 80 (with \), and
890609885543Smrg    # we should not choose a depcomp mode which is confused by this.
890709885543Smrg    #
890809885543Smrg    # We need to recreate these files for each test, as the compiler may
890909885543Smrg    # overwrite some of them when testing with obscure command lines.
891009885543Smrg    # This happens at least with the AIX C compiler.
891109885543Smrg    : > sub/conftest.c
891209885543Smrg    for i in 1 2 3 4 5 6; do
891309885543Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
891409885543Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
891509885543Smrg      # Solaris 8's {/usr,}/bin/sh.
891609885543Smrg      touch sub/conftst$i.h
891709885543Smrg    done
891809885543Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
891909885543Smrg
892009885543Smrg    case $depmode in
892109885543Smrg    nosideeffect)
892209885543Smrg      # after this tag, mechanisms are not by side-effect, so they'll
892309885543Smrg      # only be used when explicitly requested
892409885543Smrg      if test "x$enable_dependency_tracking" = xyes; then
892509885543Smrg	continue
892609885543Smrg      else
892709885543Smrg	break
892809885543Smrg      fi
892909885543Smrg      ;;
893009885543Smrg    none) break ;;
893109885543Smrg    esac
893209885543Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
893309885543Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
893409885543Smrg    # handle `-M -o', and we need to detect this.
893509885543Smrg    if depmode=$depmode \
893609885543Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
893709885543Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
893809885543Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
893909885543Smrg         >/dev/null 2>conftest.err &&
89407104f784Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
894109885543Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
894209885543Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
894309885543Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
894409885543Smrg      # icc doesn't choke on unknown options, it will just issue warnings
894509885543Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
894609885543Smrg      # that says an option was ignored or not supported.
894709885543Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
894809885543Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
894909885543Smrg      # The diagnosis changed in icc 8.0:
895009885543Smrg      #   icc: Command line remark: option '-MP' not supported
895109885543Smrg      if (grep 'ignoring option' conftest.err ||
895209885543Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
895309885543Smrg        am_cv_$1_dependencies_compiler_type=$depmode
895409885543Smrg        break
895509885543Smrg      fi
895609885543Smrg    fi
895709885543Smrg  done
895809885543Smrg
895909885543Smrg  cd ..
896009885543Smrg  rm -rf conftest.dir
896109885543Smrgelse
896209885543Smrg  am_cv_$1_dependencies_compiler_type=none
896309885543Smrgfi
896409885543Smrg])
896509885543SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
896609885543SmrgAM_CONDITIONAL([am__fastdep$1], [
896709885543Smrg  test "x$enable_dependency_tracking" != xno \
896809885543Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
896909885543Smrg])
897009885543Smrg
897109885543Smrg
897209885543Smrg# AM_SET_DEPDIR
897309885543Smrg# -------------
897409885543Smrg# Choose a directory name for dependency files.
897509885543Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
897609885543SmrgAC_DEFUN([AM_SET_DEPDIR],
897709885543Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
897809885543SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
897909885543Smrg])
898009885543Smrg
898109885543Smrg
898209885543Smrg# AM_DEP_TRACK
898309885543Smrg# ------------
898409885543SmrgAC_DEFUN([AM_DEP_TRACK],
898509885543Smrg[AC_ARG_ENABLE(dependency-tracking,
898609885543Smrg[  --disable-dependency-tracking  speeds up one-time build
898709885543Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
898809885543Smrgif test "x$enable_dependency_tracking" != xno; then
898909885543Smrg  am_depcomp="$ac_aux_dir/depcomp"
899009885543Smrg  AMDEPBACKSLASH='\'
899109885543Smrgfi
899209885543SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
89937104f784SmrgAC_SUBST([AMDEPBACKSLASH])dnl
89947104f784Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
899509885543Smrg])
899609885543Smrg
899709885543Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
899809885543Smrg
89997104f784Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
900009885543Smrg# Free Software Foundation, Inc.
900109885543Smrg#
900209885543Smrg# This file is free software; the Free Software Foundation
900309885543Smrg# gives unlimited permission to copy and/or distribute it,
900409885543Smrg# with or without modifications, as long as this notice is preserved.
900509885543Smrg
90067104f784Smrg#serial 4
900709885543Smrg
900809885543Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
900909885543Smrg# ------------------------------
901009885543SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
90117104f784Smrg[# Autoconf 2.62 quotes --file arguments for eval, but not when files
90127104f784Smrg# are listed without --file.  Let's play safe and only enable the eval
90137104f784Smrg# if we detect the quoting.
90147104f784Smrgcase $CONFIG_FILES in
90157104f784Smrg*\'*) eval set x "$CONFIG_FILES" ;;
90167104f784Smrg*)   set x $CONFIG_FILES ;;
90177104f784Smrgesac
90187104f784Smrgshift
90197104f784Smrgfor mf
90207104f784Smrgdo
902109885543Smrg  # Strip MF so we end up with the name of the file.
902209885543Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
902309885543Smrg  # Check whether this is an Automake generated Makefile or not.
902409885543Smrg  # We used to match only the files named `Makefile.in', but
902509885543Smrg  # some people rename them; so instead we look at the file content.
902609885543Smrg  # Grep'ing the first line is not enough: some people post-process
902709885543Smrg  # each Makefile.in and add a new line on top of each file to say so.
90287104f784Smrg  # Grep'ing the whole file is not good either: AIX grep has a line
90297104f784Smrg  # limit of 2048, but all sed's we know have understand at least 4000.
90307104f784Smrg  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
903109885543Smrg    dirpart=`AS_DIRNAME("$mf")`
903209885543Smrg  else
903309885543Smrg    continue
903409885543Smrg  fi
903509885543Smrg  # Extract the definition of DEPDIR, am__include, and am__quote
903609885543Smrg  # from the Makefile without running `make'.
903709885543Smrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
903809885543Smrg  test -z "$DEPDIR" && continue
903909885543Smrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
904009885543Smrg  test -z "am__include" && continue
904109885543Smrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
904209885543Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
904309885543Smrg  U=`sed -n 's/^U = //p' < "$mf"`
904409885543Smrg  # Find all dependency output files, they are included files with
904509885543Smrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
904609885543Smrg  # simplest approach to changing $(DEPDIR) to its actual value in the
904709885543Smrg  # expansion.
904809885543Smrg  for file in `sed -n "
904909885543Smrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
905009885543Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
905109885543Smrg    # Make sure the directory exists.
905209885543Smrg    test -f "$dirpart/$file" && continue
905309885543Smrg    fdir=`AS_DIRNAME(["$file"])`
905409885543Smrg    AS_MKDIR_P([$dirpart/$fdir])
905509885543Smrg    # echo "creating $dirpart/$file"
905609885543Smrg    echo '# dummy' > "$dirpart/$file"
905709885543Smrg  done
905809885543Smrgdone
905909885543Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
906009885543Smrg
906109885543Smrg
906209885543Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
906309885543Smrg# -----------------------------
906409885543Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
906509885543Smrg#
906609885543Smrg# This code is only required when automatic dependency tracking
906709885543Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
906809885543Smrg# need in order to bootstrap the dependency handling code.
906909885543SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
907009885543Smrg[AC_CONFIG_COMMANDS([depfiles],
907109885543Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
907209885543Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
907309885543Smrg])
907409885543Smrg
907509885543Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
907609885543Smrg# Free Software Foundation, Inc.
907709885543Smrg#
907809885543Smrg# This file is free software; the Free Software Foundation
907909885543Smrg# gives unlimited permission to copy and/or distribute it,
908009885543Smrg# with or without modifications, as long as this notice is preserved.
908109885543Smrg
908209885543Smrg# serial 8
908309885543Smrg
908409885543Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
908509885543SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
908609885543Smrg
908709885543Smrg# Do all the work for Automake.                             -*- Autoconf -*-
908809885543Smrg
90897104f784Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
90907104f784Smrg# 2005, 2006, 2008 Free Software Foundation, Inc.
909109885543Smrg#
909209885543Smrg# This file is free software; the Free Software Foundation
909309885543Smrg# gives unlimited permission to copy and/or distribute it,
909409885543Smrg# with or without modifications, as long as this notice is preserved.
909509885543Smrg
90967104f784Smrg# serial 13
909709885543Smrg
909809885543Smrg# This macro actually does too much.  Some checks are only needed if
909909885543Smrg# your package does certain things.  But this isn't really a big deal.
910009885543Smrg
910109885543Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
910209885543Smrg# AM_INIT_AUTOMAKE([OPTIONS])
910309885543Smrg# -----------------------------------------------
910409885543Smrg# The call with PACKAGE and VERSION arguments is the old style
910509885543Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
910609885543Smrg# and VERSION should now be passed to AC_INIT and removed from
910709885543Smrg# the call to AM_INIT_AUTOMAKE.
910809885543Smrg# We support both call styles for the transition.  After
910909885543Smrg# the next Automake release, Autoconf can make the AC_INIT
911009885543Smrg# arguments mandatory, and then we can depend on a new Autoconf
911109885543Smrg# release and drop the old call support.
911209885543SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
91137104f784Smrg[AC_PREREQ([2.60])dnl
911409885543Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
911509885543Smrgdnl the ones we care about.
911609885543Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
911709885543SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
911809885543SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
91197104f784Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
91207104f784Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
91217104f784Smrg  # is not polluted with repeated "-I."
91227104f784Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
91237104f784Smrg  # test to see if srcdir already configured
91247104f784Smrg  if test -f $srcdir/config.status; then
91257104f784Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
91267104f784Smrg  fi
912709885543Smrgfi
912809885543Smrg
912909885543Smrg# test whether we have cygpath
913009885543Smrgif test -z "$CYGPATH_W"; then
913109885543Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
913209885543Smrg    CYGPATH_W='cygpath -w'
913309885543Smrg  else
913409885543Smrg    CYGPATH_W=echo
913509885543Smrg  fi
913609885543Smrgfi
913709885543SmrgAC_SUBST([CYGPATH_W])
913809885543Smrg
913909885543Smrg# Define the identity of the package.
914009885543Smrgdnl Distinguish between old-style and new-style calls.
914109885543Smrgm4_ifval([$2],
914209885543Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
914309885543Smrg AC_SUBST([PACKAGE], [$1])dnl
914409885543Smrg AC_SUBST([VERSION], [$2])],
914509885543Smrg[_AM_SET_OPTIONS([$1])dnl
91467104f784Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
91477104f784Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
91487104f784Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
914909885543Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
915009885543Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
915109885543Smrg
915209885543Smrg_AM_IF_OPTION([no-define],,
915309885543Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
915409885543Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
915509885543Smrg
915609885543Smrg# Some tools Automake needs.
915709885543SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
915809885543SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
915909885543SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
916009885543SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
916109885543SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
916209885543SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
916309885543SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
916409885543SmrgAM_PROG_INSTALL_SH
916509885543SmrgAM_PROG_INSTALL_STRIP
916609885543SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
916709885543Smrg# We need awk for the "check" target.  The system "awk" is bad on
916809885543Smrg# some platforms.
916909885543SmrgAC_REQUIRE([AC_PROG_AWK])dnl
917009885543SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
917109885543SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
917209885543Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
917309885543Smrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
917409885543Smrg	      		     [_AM_PROG_TAR([v7])])])
917509885543Smrg_AM_IF_OPTION([no-dependencies],,
917609885543Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
917709885543Smrg                  [_AM_DEPENDENCIES(CC)],
917809885543Smrg                  [define([AC_PROG_CC],
917909885543Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
918009885543SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
918109885543Smrg                  [_AM_DEPENDENCIES(CXX)],
918209885543Smrg                  [define([AC_PROG_CXX],
918309885543Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
91847104f784SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
91857104f784Smrg                  [_AM_DEPENDENCIES(OBJC)],
91867104f784Smrg                  [define([AC_PROG_OBJC],
91877104f784Smrg                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
918809885543Smrg])
918909885543Smrg])
919009885543Smrg
919109885543Smrg
919209885543Smrg# When config.status generates a header, we must update the stamp-h file.
919309885543Smrg# This file resides in the same directory as the config header
919409885543Smrg# that is generated.  The stamp files are numbered to have different names.
919509885543Smrg
919609885543Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
919709885543Smrg# loop where config.status creates the headers, so we can generate
919809885543Smrg# our stamp files there.
919909885543SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
920009885543Smrg[# Compute $1's index in $config_headers.
92017104f784Smrg_am_arg=$1
920209885543Smrg_am_stamp_count=1
920309885543Smrgfor _am_header in $config_headers :; do
920409885543Smrg  case $_am_header in
92057104f784Smrg    $_am_arg | $_am_arg:* )
920609885543Smrg      break ;;
920709885543Smrg    * )
920809885543Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
920909885543Smrg  esac
921009885543Smrgdone
92117104f784Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
921209885543Smrg
921309885543Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
921409885543Smrg#
921509885543Smrg# This file is free software; the Free Software Foundation
921609885543Smrg# gives unlimited permission to copy and/or distribute it,
921709885543Smrg# with or without modifications, as long as this notice is preserved.
921809885543Smrg
921909885543Smrg# AM_PROG_INSTALL_SH
922009885543Smrg# ------------------
922109885543Smrg# Define $install_sh.
922209885543SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
922309885543Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
92247104f784Smrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
922509885543SmrgAC_SUBST(install_sh)])
922609885543Smrg
922709885543Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
922809885543Smrg#
922909885543Smrg# This file is free software; the Free Software Foundation
923009885543Smrg# gives unlimited permission to copy and/or distribute it,
923109885543Smrg# with or without modifications, as long as this notice is preserved.
923209885543Smrg
923309885543Smrg# serial 2
923409885543Smrg
923509885543Smrg# Check whether the underlying file-system supports filenames
923609885543Smrg# with a leading dot.  For instance MS-DOS doesn't.
923709885543SmrgAC_DEFUN([AM_SET_LEADING_DOT],
923809885543Smrg[rm -rf .tst 2>/dev/null
923909885543Smrgmkdir .tst 2>/dev/null
924009885543Smrgif test -d .tst; then
924109885543Smrg  am__leading_dot=.
924209885543Smrgelse
924309885543Smrg  am__leading_dot=_
924409885543Smrgfi
924509885543Smrgrmdir .tst 2>/dev/null
924609885543SmrgAC_SUBST([am__leading_dot])])
924709885543Smrg
924809885543Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
924909885543Smrg# From Jim Meyering
925009885543Smrg
925109885543Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
925209885543Smrg# Free Software Foundation, Inc.
925309885543Smrg#
925409885543Smrg# This file is free software; the Free Software Foundation
925509885543Smrg# gives unlimited permission to copy and/or distribute it,
925609885543Smrg# with or without modifications, as long as this notice is preserved.
925709885543Smrg
925809885543Smrg# serial 4
925909885543Smrg
926009885543SmrgAC_DEFUN([AM_MAINTAINER_MODE],
926109885543Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
926209885543Smrg  dnl maintainer-mode is disabled by default
926309885543Smrg  AC_ARG_ENABLE(maintainer-mode,
926409885543Smrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
926509885543Smrg			  (and sometimes confusing) to the casual installer],
926609885543Smrg      USE_MAINTAINER_MODE=$enableval,
926709885543Smrg      USE_MAINTAINER_MODE=no)
926809885543Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
926909885543Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
927009885543Smrg  MAINT=$MAINTAINER_MODE_TRUE
927109885543Smrg  AC_SUBST(MAINT)dnl
927209885543Smrg]
927309885543Smrg)
927409885543Smrg
927509885543SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
927609885543Smrg
927709885543Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
927809885543Smrg
927909885543Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
928009885543Smrg#
928109885543Smrg# This file is free software; the Free Software Foundation
928209885543Smrg# gives unlimited permission to copy and/or distribute it,
928309885543Smrg# with or without modifications, as long as this notice is preserved.
928409885543Smrg
928509885543Smrg# serial 3
928609885543Smrg
928709885543Smrg# AM_MAKE_INCLUDE()
928809885543Smrg# -----------------
928909885543Smrg# Check to see how make treats includes.
929009885543SmrgAC_DEFUN([AM_MAKE_INCLUDE],
929109885543Smrg[am_make=${MAKE-make}
929209885543Smrgcat > confinc << 'END'
929309885543Smrgam__doit:
929409885543Smrg	@echo done
929509885543Smrg.PHONY: am__doit
929609885543SmrgEND
929709885543Smrg# If we don't find an include directive, just comment out the code.
929809885543SmrgAC_MSG_CHECKING([for style of include used by $am_make])
929909885543Smrgam__include="#"
930009885543Smrgam__quote=
930109885543Smrg_am_result=none
930209885543Smrg# First try GNU make style include.
930309885543Smrgecho "include confinc" > confmf
930409885543Smrg# We grep out `Entering directory' and `Leaving directory'
930509885543Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
930609885543Smrg# In particular we don't look at `^make:' because GNU make might
930709885543Smrg# be invoked under some other name (usually "gmake"), in which
930809885543Smrg# case it prints its new name instead of `make'.
930909885543Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
931009885543Smrg   am__include=include
931109885543Smrg   am__quote=
931209885543Smrg   _am_result=GNU
931309885543Smrgfi
931409885543Smrg# Now try BSD make style include.
931509885543Smrgif test "$am__include" = "#"; then
931609885543Smrg   echo '.include "confinc"' > confmf
931709885543Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
931809885543Smrg      am__include=.include
931909885543Smrg      am__quote="\""
932009885543Smrg      _am_result=BSD
932109885543Smrg   fi
932209885543Smrgfi
932309885543SmrgAC_SUBST([am__include])
932409885543SmrgAC_SUBST([am__quote])
932509885543SmrgAC_MSG_RESULT([$_am_result])
932609885543Smrgrm -f confinc confmf
932709885543Smrg])
932809885543Smrg
932909885543Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
933009885543Smrg
93317104f784Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
933209885543Smrg# Free Software Foundation, Inc.
933309885543Smrg#
933409885543Smrg# This file is free software; the Free Software Foundation
933509885543Smrg# gives unlimited permission to copy and/or distribute it,
933609885543Smrg# with or without modifications, as long as this notice is preserved.
933709885543Smrg
93387104f784Smrg# serial 5
933909885543Smrg
934009885543Smrg# AM_MISSING_PROG(NAME, PROGRAM)
934109885543Smrg# ------------------------------
934209885543SmrgAC_DEFUN([AM_MISSING_PROG],
934309885543Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
934409885543Smrg$1=${$1-"${am_missing_run}$2"}
934509885543SmrgAC_SUBST($1)])
934609885543Smrg
934709885543Smrg
934809885543Smrg# AM_MISSING_HAS_RUN
934909885543Smrg# ------------------
935009885543Smrg# Define MISSING if not defined so far and test if it supports --run.
935109885543Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
935209885543SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
935309885543Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
93547104f784SmrgAC_REQUIRE_AUX_FILE([missing])dnl
935509885543Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
935609885543Smrg# Use eval to expand $SHELL
935709885543Smrgif eval "$MISSING --run true"; then
935809885543Smrg  am_missing_run="$MISSING --run "
935909885543Smrgelse
936009885543Smrg  am_missing_run=
936109885543Smrg  AC_MSG_WARN([`missing' script is too old or missing])
936209885543Smrgfi
936309885543Smrg])
936409885543Smrg
93657104f784Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
936609885543Smrg#
936709885543Smrg# This file is free software; the Free Software Foundation
936809885543Smrg# gives unlimited permission to copy and/or distribute it,
936909885543Smrg# with or without modifications, as long as this notice is preserved.
937009885543Smrg
937109885543Smrg# AM_PROG_MKDIR_P
937209885543Smrg# ---------------
93737104f784Smrg# Check for `mkdir -p'.
937409885543SmrgAC_DEFUN([AM_PROG_MKDIR_P],
93757104f784Smrg[AC_PREREQ([2.60])dnl
93767104f784SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
93777104f784Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
93787104f784Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
93797104f784Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
93807104f784Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
93817104f784Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
93827104f784Smrgdnl adjustment using top_builddir (which is defined more often than
93837104f784Smrgdnl MKDIR_P).
93847104f784SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
93857104f784Smrgcase $mkdir_p in
93867104f784Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
93877104f784Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
93887104f784Smrgesac
93897104f784Smrg])
939009885543Smrg
939109885543Smrg# Helper functions for option handling.                     -*- Autoconf -*-
939209885543Smrg
93937104f784Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
939409885543Smrg#
939509885543Smrg# This file is free software; the Free Software Foundation
939609885543Smrg# gives unlimited permission to copy and/or distribute it,
939709885543Smrg# with or without modifications, as long as this notice is preserved.
939809885543Smrg
93997104f784Smrg# serial 4
940009885543Smrg
940109885543Smrg# _AM_MANGLE_OPTION(NAME)
940209885543Smrg# -----------------------
940309885543SmrgAC_DEFUN([_AM_MANGLE_OPTION],
940409885543Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
940509885543Smrg
940609885543Smrg# _AM_SET_OPTION(NAME)
940709885543Smrg# ------------------------------
940809885543Smrg# Set option NAME.  Presently that only means defining a flag for this option.
940909885543SmrgAC_DEFUN([_AM_SET_OPTION],
941009885543Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
941109885543Smrg
941209885543Smrg# _AM_SET_OPTIONS(OPTIONS)
941309885543Smrg# ----------------------------------
941409885543Smrg# OPTIONS is a space-separated list of Automake options.
941509885543SmrgAC_DEFUN([_AM_SET_OPTIONS],
94167104f784Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
941709885543Smrg
941809885543Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
941909885543Smrg# -------------------------------------------
942009885543Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
942109885543SmrgAC_DEFUN([_AM_IF_OPTION],
942209885543Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
942309885543Smrg
942409885543Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
942509885543Smrg
942609885543Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
942709885543Smrg# Free Software Foundation, Inc.
942809885543Smrg#
942909885543Smrg# This file is free software; the Free Software Foundation
943009885543Smrg# gives unlimited permission to copy and/or distribute it,
943109885543Smrg# with or without modifications, as long as this notice is preserved.
943209885543Smrg
943309885543Smrg# serial 4
943409885543Smrg
943509885543Smrg# AM_SANITY_CHECK
943609885543Smrg# ---------------
943709885543SmrgAC_DEFUN([AM_SANITY_CHECK],
943809885543Smrg[AC_MSG_CHECKING([whether build environment is sane])
943909885543Smrg# Just in case
944009885543Smrgsleep 1
944109885543Smrgecho timestamp > conftest.file
944209885543Smrg# Do `set' in a subshell so we don't clobber the current shell's
944309885543Smrg# arguments.  Must try -L first in case configure is actually a
944409885543Smrg# symlink; some systems play weird games with the mod time of symlinks
944509885543Smrg# (eg FreeBSD returns the mod time of the symlink's containing
944609885543Smrg# directory).
944709885543Smrgif (
944809885543Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
944909885543Smrg   if test "$[*]" = "X"; then
945009885543Smrg      # -L didn't work.
945109885543Smrg      set X `ls -t $srcdir/configure conftest.file`
945209885543Smrg   fi
945309885543Smrg   rm -f conftest.file
945409885543Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
945509885543Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
945609885543Smrg
945709885543Smrg      # If neither matched, then we have a broken ls.  This can happen
945809885543Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
945909885543Smrg      # broken ls alias from the environment.  This has actually
946009885543Smrg      # happened.  Such a system could not be considered "sane".
946109885543Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
946209885543Smrgalias in your environment])
946309885543Smrg   fi
946409885543Smrg
946509885543Smrg   test "$[2]" = conftest.file
946609885543Smrg   )
946709885543Smrgthen
946809885543Smrg   # Ok.
946909885543Smrg   :
947009885543Smrgelse
947109885543Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
947209885543SmrgCheck your system clock])
947309885543Smrgfi
947409885543SmrgAC_MSG_RESULT(yes)])
947509885543Smrg
947609885543Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
947709885543Smrg#
947809885543Smrg# This file is free software; the Free Software Foundation
947909885543Smrg# gives unlimited permission to copy and/or distribute it,
948009885543Smrg# with or without modifications, as long as this notice is preserved.
948109885543Smrg
948209885543Smrg# AM_PROG_INSTALL_STRIP
948309885543Smrg# ---------------------
948409885543Smrg# One issue with vendor `install' (even GNU) is that you can't
948509885543Smrg# specify the program used to strip binaries.  This is especially
948609885543Smrg# annoying in cross-compiling environments, where the build's strip
948709885543Smrg# is unlikely to handle the host's binaries.
948809885543Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
948909885543Smrg# always use install-sh in `make install-strip', and initialize
949009885543Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
949109885543SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
949209885543Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
949309885543Smrg# Installed binaries are usually stripped using `strip' when the user
949409885543Smrg# run `make install-strip'.  However `strip' might not be the right
949509885543Smrg# tool to use in cross-compilation environments, therefore Automake
949609885543Smrg# will honor the `STRIP' environment variable to overrule this program.
949709885543Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
949809885543Smrgif test "$cross_compiling" != no; then
949909885543Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
950009885543Smrgfi
95017104f784SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
950209885543SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
950309885543Smrg
95047104f784Smrg# Copyright (C) 2006  Free Software Foundation, Inc.
95057104f784Smrg#
95067104f784Smrg# This file is free software; the Free Software Foundation
95077104f784Smrg# gives unlimited permission to copy and/or distribute it,
95087104f784Smrg# with or without modifications, as long as this notice is preserved.
95097104f784Smrg
95107104f784Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
95117104f784Smrg# ---------------------------
95127104f784Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
95137104f784Smrg# This macro is traced by Automake.
95147104f784SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
95157104f784Smrg
951609885543Smrg# Check how to create a tarball.                            -*- Autoconf -*-
951709885543Smrg
951809885543Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
951909885543Smrg#
952009885543Smrg# This file is free software; the Free Software Foundation
952109885543Smrg# gives unlimited permission to copy and/or distribute it,
952209885543Smrg# with or without modifications, as long as this notice is preserved.
952309885543Smrg
952409885543Smrg# serial 2
952509885543Smrg
952609885543Smrg# _AM_PROG_TAR(FORMAT)
952709885543Smrg# --------------------
952809885543Smrg# Check how to create a tarball in format FORMAT.
952909885543Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
953009885543Smrg#
953109885543Smrg# Substitute a variable $(am__tar) that is a command
953209885543Smrg# writing to stdout a FORMAT-tarball containing the directory
953309885543Smrg# $tardir.
953409885543Smrg#     tardir=directory && $(am__tar) > result.tar
953509885543Smrg#
953609885543Smrg# Substitute a variable $(am__untar) that extract such
953709885543Smrg# a tarball read from stdin.
953809885543Smrg#     $(am__untar) < result.tar
953909885543SmrgAC_DEFUN([_AM_PROG_TAR],
954009885543Smrg[# Always define AMTAR for backward compatibility.
954109885543SmrgAM_MISSING_PROG([AMTAR], [tar])
954209885543Smrgm4_if([$1], [v7],
954309885543Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
954409885543Smrg     [m4_case([$1], [ustar],, [pax],,
954509885543Smrg              [m4_fatal([Unknown tar format])])
954609885543SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
954709885543Smrg# Loop over all known methods to create a tar archive until one works.
954809885543Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
954909885543Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
955009885543Smrg# Do not fold the above two line into one, because Tru64 sh and
955109885543Smrg# Solaris sh will not grok spaces in the rhs of `-'.
955209885543Smrgfor _am_tool in $_am_tools
955309885543Smrgdo
955409885543Smrg  case $_am_tool in
955509885543Smrg  gnutar)
955609885543Smrg    for _am_tar in tar gnutar gtar;
955709885543Smrg    do
955809885543Smrg      AM_RUN_LOG([$_am_tar --version]) && break
955909885543Smrg    done
956009885543Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
956109885543Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
956209885543Smrg    am__untar="$_am_tar -xf -"
956309885543Smrg    ;;
956409885543Smrg  plaintar)
956509885543Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
956609885543Smrg    # ustar tarball either.
956709885543Smrg    (tar --version) >/dev/null 2>&1 && continue
956809885543Smrg    am__tar='tar chf - "$$tardir"'
956909885543Smrg    am__tar_='tar chf - "$tardir"'
957009885543Smrg    am__untar='tar xf -'
957109885543Smrg    ;;
957209885543Smrg  pax)
957309885543Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
957409885543Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
957509885543Smrg    am__untar='pax -r'
957609885543Smrg    ;;
957709885543Smrg  cpio)
957809885543Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
957909885543Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
958009885543Smrg    am__untar='cpio -i -H $1 -d'
958109885543Smrg    ;;
958209885543Smrg  none)
958309885543Smrg    am__tar=false
958409885543Smrg    am__tar_=false
958509885543Smrg    am__untar=false
958609885543Smrg    ;;
958709885543Smrg  esac
958809885543Smrg
958909885543Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
959009885543Smrg  # and am__untar set.
959109885543Smrg  test -n "${am_cv_prog_tar_$1}" && break
959209885543Smrg
959309885543Smrg  # tar/untar a dummy directory, and stop if the command works
959409885543Smrg  rm -rf conftest.dir
959509885543Smrg  mkdir conftest.dir
959609885543Smrg  echo GrepMe > conftest.dir/file
959709885543Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
959809885543Smrg  rm -rf conftest.dir
959909885543Smrg  if test -s conftest.tar; then
960009885543Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
960109885543Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
960209885543Smrg  fi
960309885543Smrgdone
960409885543Smrgrm -rf conftest.dir
960509885543Smrg
960609885543SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
960709885543SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
960809885543SmrgAC_SUBST([am__tar])
960909885543SmrgAC_SUBST([am__untar])
961009885543Smrg]) # _AM_PROG_TAR
961109885543Smrg
9612