aclocal.m4 revision 1f0ac6a5
11f0ac6a5Smrg# generated automatically by aclocal 1.10 -*- Autoconf -*-
21f0ac6a5Smrg
31f0ac6a5Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
41f0ac6a5Smrg# 2005, 2006  Free Software Foundation, Inc.
51f0ac6a5Smrg# This file is free software; the Free Software Foundation
61f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
71f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
81f0ac6a5Smrg
91f0ac6a5Smrg# This program is distributed in the hope that it will be useful,
101f0ac6a5Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
111f0ac6a5Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
121f0ac6a5Smrg# PARTICULAR PURPOSE.
131f0ac6a5Smrg
141f0ac6a5Smrgm4_if(m4_PACKAGE_VERSION, [2.61],,
151f0ac6a5Smrg[m4_fatal([this file was generated for autoconf 2.61.
161f0ac6a5SmrgYou have another version of autoconf.  If you want to use that,
171f0ac6a5Smrgyou should regenerate the build system entirely.], [63])])
181f0ac6a5Smrg
191f0ac6a5Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
201f0ac6a5Smrg# 
211f0ac6a5Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
221f0ac6a5Smrg#
231f0ac6a5Smrg# This program is free software; you can redistribute it and/or modify
241f0ac6a5Smrg# it under the terms of the GNU General Public License as published by
251f0ac6a5Smrg# the Free Software Foundation; either version 2 of the License, or
261f0ac6a5Smrg# (at your option) any later version.
271f0ac6a5Smrg#
281f0ac6a5Smrg# This program is distributed in the hope that it will be useful, but
291f0ac6a5Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
301f0ac6a5Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
311f0ac6a5Smrg# General Public License for more details.
321f0ac6a5Smrg#
331f0ac6a5Smrg# You should have received a copy of the GNU General Public License
341f0ac6a5Smrg# along with this program; if not, write to the Free Software
351f0ac6a5Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
361f0ac6a5Smrg#
371f0ac6a5Smrg# As a special exception to the GNU General Public License, if you
381f0ac6a5Smrg# distribute this file as part of a program that contains a
391f0ac6a5Smrg# configuration script generated by Autoconf, you may include it under
401f0ac6a5Smrg# the same distribution terms that you use for the rest of that program.
411f0ac6a5Smrg
421f0ac6a5Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
431f0ac6a5Smrg# ----------------------------------
441f0ac6a5SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
451f0ac6a5Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
461f0ac6a5Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
471f0ac6a5SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
481f0ac6a5Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
491f0ac6a5Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
501f0ac6a5Smrgfi
511f0ac6a5Smrgif test -n "$PKG_CONFIG"; then
521f0ac6a5Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
531f0ac6a5Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
541f0ac6a5Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
551f0ac6a5Smrg		AC_MSG_RESULT([yes])
561f0ac6a5Smrg	else
571f0ac6a5Smrg		AC_MSG_RESULT([no])
581f0ac6a5Smrg		PKG_CONFIG=""
591f0ac6a5Smrg	fi
601f0ac6a5Smrg		
611f0ac6a5Smrgfi[]dnl
621f0ac6a5Smrg])# PKG_PROG_PKG_CONFIG
631f0ac6a5Smrg
641f0ac6a5Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
651f0ac6a5Smrg#
661f0ac6a5Smrg# Check to see whether a particular set of modules exists.  Similar
671f0ac6a5Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
681f0ac6a5Smrg#
691f0ac6a5Smrg#
701f0ac6a5Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
711f0ac6a5Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
721f0ac6a5Smrg# PKG_CHECK_EXISTS manually
731f0ac6a5Smrg# --------------------------------------------------------------
741f0ac6a5SmrgAC_DEFUN([PKG_CHECK_EXISTS],
751f0ac6a5Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
761f0ac6a5Smrgif test -n "$PKG_CONFIG" && \
771f0ac6a5Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
781f0ac6a5Smrg  m4_ifval([$2], [$2], [:])
791f0ac6a5Smrgm4_ifvaln([$3], [else
801f0ac6a5Smrg  $3])dnl
811f0ac6a5Smrgfi])
821f0ac6a5Smrg
831f0ac6a5Smrg
841f0ac6a5Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
851f0ac6a5Smrg# ---------------------------------------------
861f0ac6a5Smrgm4_define([_PKG_CONFIG],
871f0ac6a5Smrg[if test -n "$PKG_CONFIG"; then
881f0ac6a5Smrg    if test -n "$$1"; then
891f0ac6a5Smrg        pkg_cv_[]$1="$$1"
901f0ac6a5Smrg    else
911f0ac6a5Smrg        PKG_CHECK_EXISTS([$3],
921f0ac6a5Smrg                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
931f0ac6a5Smrg			 [pkg_failed=yes])
941f0ac6a5Smrg    fi
951f0ac6a5Smrgelse
961f0ac6a5Smrg	pkg_failed=untried
971f0ac6a5Smrgfi[]dnl
981f0ac6a5Smrg])# _PKG_CONFIG
991f0ac6a5Smrg
1001f0ac6a5Smrg# _PKG_SHORT_ERRORS_SUPPORTED
1011f0ac6a5Smrg# -----------------------------
1021f0ac6a5SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1031f0ac6a5Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1041f0ac6a5Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1051f0ac6a5Smrg        _pkg_short_errors_supported=yes
1061f0ac6a5Smrgelse
1071f0ac6a5Smrg        _pkg_short_errors_supported=no
1081f0ac6a5Smrgfi[]dnl
1091f0ac6a5Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
1101f0ac6a5Smrg
1111f0ac6a5Smrg
1121f0ac6a5Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1131f0ac6a5Smrg# [ACTION-IF-NOT-FOUND])
1141f0ac6a5Smrg#
1151f0ac6a5Smrg#
1161f0ac6a5Smrg# Note that if there is a possibility the first call to
1171f0ac6a5Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
1181f0ac6a5Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1191f0ac6a5Smrg#
1201f0ac6a5Smrg#
1211f0ac6a5Smrg# --------------------------------------------------------------
1221f0ac6a5SmrgAC_DEFUN([PKG_CHECK_MODULES],
1231f0ac6a5Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1241f0ac6a5SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1251f0ac6a5SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1261f0ac6a5Smrg
1271f0ac6a5Smrgpkg_failed=no
1281f0ac6a5SmrgAC_MSG_CHECKING([for $1])
1291f0ac6a5Smrg
1301f0ac6a5Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1311f0ac6a5Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1321f0ac6a5Smrg
1331f0ac6a5Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1341f0ac6a5Smrgand $1[]_LIBS to avoid the need to call pkg-config.
1351f0ac6a5SmrgSee the pkg-config man page for more details.])
1361f0ac6a5Smrg
1371f0ac6a5Smrgif test $pkg_failed = yes; then
1381f0ac6a5Smrg        _PKG_SHORT_ERRORS_SUPPORTED
1391f0ac6a5Smrg        if test $_pkg_short_errors_supported = yes; then
1401f0ac6a5Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
1411f0ac6a5Smrg        else 
1421f0ac6a5Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
1431f0ac6a5Smrg        fi
1441f0ac6a5Smrg	# Put the nasty error message in config.log where it belongs
1451f0ac6a5Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1461f0ac6a5Smrg
1471f0ac6a5Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
1481f0ac6a5Smrg[Package requirements ($2) were not met:
1491f0ac6a5Smrg
1501f0ac6a5Smrg$$1_PKG_ERRORS
1511f0ac6a5Smrg
1521f0ac6a5SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
1531f0ac6a5Smrginstalled software in a non-standard prefix.
1541f0ac6a5Smrg
1551f0ac6a5Smrg_PKG_TEXT
1561f0ac6a5Smrg])],
1571f0ac6a5Smrg		[AC_MSG_RESULT([no])
1581f0ac6a5Smrg                $4])
1591f0ac6a5Smrgelif test $pkg_failed = untried; then
1601f0ac6a5Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
1611f0ac6a5Smrg[The pkg-config script could not be found or is too old.  Make sure it
1621f0ac6a5Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
1631f0ac6a5Smrgpath to pkg-config.
1641f0ac6a5Smrg
1651f0ac6a5Smrg_PKG_TEXT
1661f0ac6a5Smrg
1671f0ac6a5SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
1681f0ac6a5Smrg		[$4])
1691f0ac6a5Smrgelse
1701f0ac6a5Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1711f0ac6a5Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1721f0ac6a5Smrg        AC_MSG_RESULT([yes])
1731f0ac6a5Smrg	ifelse([$3], , :, [$3])
1741f0ac6a5Smrgfi[]dnl
1751f0ac6a5Smrg])# PKG_CHECK_MODULES
1761f0ac6a5Smrg
1771f0ac6a5Smrgdnl
1781f0ac6a5Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
1791f0ac6a5Smrgdnl 
1801f0ac6a5Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
1811f0ac6a5Smrgdnl copy of this software and associated documentation files (the
1821f0ac6a5Smrgdnl "Software"), to deal in the Software without restriction, including
1831f0ac6a5Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
1841f0ac6a5Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
1851f0ac6a5Smrgdnl to whom the Software is furnished to do so, provided that the above
1861f0ac6a5Smrgdnl copyright notice(s) and this permission notice appear in all copies of
1871f0ac6a5Smrgdnl the Software and that both the above copyright notice(s) and this
1881f0ac6a5Smrgdnl permission notice appear in supporting documentation.
1891f0ac6a5Smrgdnl
1901f0ac6a5Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1911f0ac6a5Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1921f0ac6a5Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
1931f0ac6a5Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
1941f0ac6a5Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
1951f0ac6a5Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
1961f0ac6a5Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
1971f0ac6a5Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
1981f0ac6a5Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1991f0ac6a5Smrgdnl
2001f0ac6a5Smrgdnl Except as contained in this notice, the name of a copyright holder
2011f0ac6a5Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
2021f0ac6a5Smrgdnl or other dealings in this Software without prior written authorization
2031f0ac6a5Smrgdnl of the copyright holder.
2041f0ac6a5Smrg
2051f0ac6a5Smrg# XORG_MACROS_VERSION(required-version)
2061f0ac6a5Smrg# -------------------------------------
2071f0ac6a5Smrg# Minimum version: 1.1.0
2081f0ac6a5Smrg#
2091f0ac6a5Smrg# If you're using a macro added in Version 1.1 or newer, include this in
2101f0ac6a5Smrg# your configure.ac with the minimum required version, such as:
2111f0ac6a5Smrg# XORG_MACROS_VERSION(1.1)
2121f0ac6a5Smrg#
2131f0ac6a5Smrg# To force at least a version with this macro defined, also add:
2141f0ac6a5Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
2151f0ac6a5Smrg#
2161f0ac6a5Smrg#
2171f0ac6a5Smrg# See the "minimum version" comment for each macro you use to see what 
2181f0ac6a5Smrg# version you require.
2191f0ac6a5SmrgAC_DEFUN([XORG_MACROS_VERSION],[
2201f0ac6a5Smrg	[XORG_MACROS_needed_version=$1
2211f0ac6a5Smrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
2221f0ac6a5Smrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
2231f0ac6a5Smrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
2241f0ac6a5Smrg	[XORG_MACROS_version=1.1.5
2251f0ac6a5Smrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
2261f0ac6a5Smrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
2271f0ac6a5Smrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
2281f0ac6a5Smrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
2291f0ac6a5Smrg	fi
2301f0ac6a5Smrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
2311f0ac6a5Smrg		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])
2321f0ac6a5Smrg	fi
2331f0ac6a5Smrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
2341f0ac6a5Smrg]) # XORG_MACROS_VERSION
2351f0ac6a5Smrg
2361f0ac6a5Smrg# XORG_PROG_RAWCPP()
2371f0ac6a5Smrg# ------------------
2381f0ac6a5Smrg# Minimum version: 1.0.0
2391f0ac6a5Smrg#
2401f0ac6a5Smrg# Find cpp program and necessary flags for use in pre-processing text files
2411f0ac6a5Smrg# such as man pages and config files
2421f0ac6a5SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
2431f0ac6a5SmrgAC_REQUIRE([AC_PROG_CPP])
2441f0ac6a5SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
2451f0ac6a5Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
2461f0ac6a5Smrg
2471f0ac6a5Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
2481f0ac6a5Smrg# which is not the best choice for supporting other OS'es, but covers most
2491f0ac6a5Smrg# of the ones we need for now.
2501f0ac6a5SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
2511f0ac6a5SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
2521f0ac6a5Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
2531f0ac6a5Smrg	AC_MSG_RESULT([no])
2541f0ac6a5Smrgelse
2551f0ac6a5Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
2561f0ac6a5Smrg		RAWCPPFLAGS=-undef
2571f0ac6a5Smrg		AC_MSG_RESULT([yes])
2581f0ac6a5Smrg	else
2591f0ac6a5Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
2601f0ac6a5Smrg	fi
2611f0ac6a5Smrgfi
2621f0ac6a5Smrgrm -f conftest.$ac_ext
2631f0ac6a5Smrg
2641f0ac6a5SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
2651f0ac6a5SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
2661f0ac6a5Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
2671f0ac6a5Smrg	AC_MSG_RESULT([no])
2681f0ac6a5Smrgelse
2691f0ac6a5Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
2701f0ac6a5Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
2711f0ac6a5Smrg		AC_MSG_RESULT([yes])
2721f0ac6a5Smrg	else
2731f0ac6a5Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
2741f0ac6a5Smrg	fi
2751f0ac6a5Smrgfi
2761f0ac6a5Smrgrm -f conftest.$ac_ext
2771f0ac6a5SmrgAC_SUBST(RAWCPPFLAGS)
2781f0ac6a5Smrg]) # XORG_PROG_RAWCPP
2791f0ac6a5Smrg
2801f0ac6a5Smrg# XORG_MANPAGE_SECTIONS()
2811f0ac6a5Smrg# -----------------------
2821f0ac6a5Smrg# Minimum version: 1.0.0
2831f0ac6a5Smrg#
2841f0ac6a5Smrg# Determine which sections man pages go in for the different man page types
2851f0ac6a5Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
2861f0ac6a5Smrg# Not sure if there's any better way than just hardcoding by OS name.
2871f0ac6a5Smrg# Override default settings by setting environment variables
2881f0ac6a5Smrg
2891f0ac6a5SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
2901f0ac6a5SmrgAC_REQUIRE([AC_CANONICAL_HOST])
2911f0ac6a5Smrg
2921f0ac6a5Smrgif test x$APP_MAN_SUFFIX = x    ; then
2931f0ac6a5Smrg    APP_MAN_SUFFIX=1
2941f0ac6a5Smrgfi
2951f0ac6a5Smrgif test x$APP_MAN_DIR = x    ; then
2961f0ac6a5Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
2971f0ac6a5Smrgfi
2981f0ac6a5Smrg
2991f0ac6a5Smrgif test x$LIB_MAN_SUFFIX = x    ; then
3001f0ac6a5Smrg    LIB_MAN_SUFFIX=3
3011f0ac6a5Smrgfi
3021f0ac6a5Smrgif test x$LIB_MAN_DIR = x    ; then
3031f0ac6a5Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
3041f0ac6a5Smrgfi
3051f0ac6a5Smrg
3061f0ac6a5Smrgif test x$FILE_MAN_SUFFIX = x    ; then
3071f0ac6a5Smrg    case $host_os in
3081f0ac6a5Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
3091f0ac6a5Smrg	*)		FILE_MAN_SUFFIX=5  ;;
3101f0ac6a5Smrg    esac
3111f0ac6a5Smrgfi
3121f0ac6a5Smrgif test x$FILE_MAN_DIR = x    ; then
3131f0ac6a5Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
3141f0ac6a5Smrgfi
3151f0ac6a5Smrg
3161f0ac6a5Smrgif test x$MISC_MAN_SUFFIX = x    ; then
3171f0ac6a5Smrg    case $host_os in
3181f0ac6a5Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
3191f0ac6a5Smrg	*)		MISC_MAN_SUFFIX=7  ;;
3201f0ac6a5Smrg    esac
3211f0ac6a5Smrgfi
3221f0ac6a5Smrgif test x$MISC_MAN_DIR = x    ; then
3231f0ac6a5Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
3241f0ac6a5Smrgfi
3251f0ac6a5Smrg
3261f0ac6a5Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
3271f0ac6a5Smrg    case $host_os in
3281f0ac6a5Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
3291f0ac6a5Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
3301f0ac6a5Smrg    esac
3311f0ac6a5Smrgfi
3321f0ac6a5Smrgif test x$DRIVER_MAN_DIR = x    ; then
3331f0ac6a5Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
3341f0ac6a5Smrgfi
3351f0ac6a5Smrg
3361f0ac6a5Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
3371f0ac6a5Smrg    case $host_os in
3381f0ac6a5Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
3391f0ac6a5Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
3401f0ac6a5Smrg    esac
3411f0ac6a5Smrgfi
3421f0ac6a5Smrgif test x$ADMIN_MAN_DIR = x    ; then
3431f0ac6a5Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
3441f0ac6a5Smrgfi
3451f0ac6a5Smrg
3461f0ac6a5Smrg
3471f0ac6a5SmrgAC_SUBST([APP_MAN_SUFFIX])
3481f0ac6a5SmrgAC_SUBST([LIB_MAN_SUFFIX])
3491f0ac6a5SmrgAC_SUBST([FILE_MAN_SUFFIX])
3501f0ac6a5SmrgAC_SUBST([MISC_MAN_SUFFIX])
3511f0ac6a5SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
3521f0ac6a5SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
3531f0ac6a5SmrgAC_SUBST([APP_MAN_DIR])
3541f0ac6a5SmrgAC_SUBST([LIB_MAN_DIR])
3551f0ac6a5SmrgAC_SUBST([FILE_MAN_DIR])
3561f0ac6a5SmrgAC_SUBST([MISC_MAN_DIR])
3571f0ac6a5SmrgAC_SUBST([DRIVER_MAN_DIR])
3581f0ac6a5SmrgAC_SUBST([ADMIN_MAN_DIR])
3591f0ac6a5Smrg]) # XORG_MANPAGE_SECTIONS
3601f0ac6a5Smrg
3611f0ac6a5Smrg# XORG_CHECK_LINUXDOC
3621f0ac6a5Smrg# -------------------
3631f0ac6a5Smrg# Minimum version: 1.0.0
3641f0ac6a5Smrg#
3651f0ac6a5Smrg# Defines the variable MAKE_TEXT if the necessary tools and
3661f0ac6a5Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
3671f0ac6a5Smrg# Whether or not the necessary tools and files are found can be checked
3681f0ac6a5Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
3691f0ac6a5SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
3701f0ac6a5SmrgXORG_SGML_PATH=$prefix/share/sgml
3711f0ac6a5SmrgHAVE_DEFS_ENT=
3721f0ac6a5Smrg
3731f0ac6a5SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
3741f0ac6a5Smrg
3751f0ac6a5SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
3761f0ac6a5SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
3771f0ac6a5Smrg
3781f0ac6a5SmrgAC_MSG_CHECKING([Whether to build documentation])
3791f0ac6a5Smrg
3801f0ac6a5Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
3811f0ac6a5Smrg   BUILDDOC=yes
3821f0ac6a5Smrgelse
3831f0ac6a5Smrg   BUILDDOC=no
3841f0ac6a5Smrgfi
3851f0ac6a5Smrg
3861f0ac6a5SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
3871f0ac6a5Smrg
3881f0ac6a5SmrgAC_MSG_RESULT([$BUILDDOC])
3891f0ac6a5Smrg
3901f0ac6a5SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
3911f0ac6a5Smrg
3921f0ac6a5Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
3931f0ac6a5Smrg   BUILDPDFDOC=yes
3941f0ac6a5Smrgelse
3951f0ac6a5Smrg   BUILDPDFDOC=no
3961f0ac6a5Smrgfi
3971f0ac6a5Smrg
3981f0ac6a5SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
3991f0ac6a5Smrg
4001f0ac6a5SmrgAC_MSG_RESULT([$BUILDPDFDOC])
4011f0ac6a5Smrg
4021f0ac6a5SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
4031f0ac6a5SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
4041f0ac6a5SmrgMAKE_PDF="$PS2PDF"
4051f0ac6a5SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
4061f0ac6a5Smrg
4071f0ac6a5SmrgAC_SUBST(MAKE_TEXT)
4081f0ac6a5SmrgAC_SUBST(MAKE_PS)
4091f0ac6a5SmrgAC_SUBST(MAKE_PDF)
4101f0ac6a5SmrgAC_SUBST(MAKE_HTML)
4111f0ac6a5Smrg]) # XORG_CHECK_LINUXDOC
4121f0ac6a5Smrg
4131f0ac6a5Smrg# XORG_CHECK_DOCBOOK
4141f0ac6a5Smrg# -------------------
4151f0ac6a5Smrg# Minimum version: 1.0.0
4161f0ac6a5Smrg#
4171f0ac6a5Smrg# Checks for the ability to build output formats from SGML DocBook source.
4181f0ac6a5Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
4191f0ac6a5Smrg# indicates whether the necessary tools and files are found and, if set,
4201f0ac6a5Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
4211f0ac6a5SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
4221f0ac6a5SmrgXORG_SGML_PATH=$prefix/share/sgml
4231f0ac6a5SmrgHAVE_DEFS_ENT=
4241f0ac6a5SmrgBUILDTXTDOC=no
4251f0ac6a5SmrgBUILDPDFDOC=no
4261f0ac6a5SmrgBUILDPSDOC=no
4271f0ac6a5SmrgBUILDHTMLDOC=no
4281f0ac6a5Smrg
4291f0ac6a5SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
4301f0ac6a5Smrg
4311f0ac6a5SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
4321f0ac6a5SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
4331f0ac6a5SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
4341f0ac6a5SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
4351f0ac6a5Smrg
4361f0ac6a5SmrgAC_MSG_CHECKING([Whether to build text documentation])
4371f0ac6a5Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
4381f0ac6a5Smrg   test x$BUILD_TXTDOC != xno; then
4391f0ac6a5Smrg	BUILDTXTDOC=yes
4401f0ac6a5Smrgfi
4411f0ac6a5SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
4421f0ac6a5SmrgAC_MSG_RESULT([$BUILDTXTDOC])
4431f0ac6a5Smrg
4441f0ac6a5SmrgAC_MSG_CHECKING([Whether to build PDF documentation])
4451f0ac6a5Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
4461f0ac6a5Smrg   test x$BUILD_PDFDOC != xno; then
4471f0ac6a5Smrg	BUILDPDFDOC=yes
4481f0ac6a5Smrgfi
4491f0ac6a5SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
4501f0ac6a5SmrgAC_MSG_RESULT([$BUILDPDFDOC])
4511f0ac6a5Smrg
4521f0ac6a5SmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
4531f0ac6a5Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
4541f0ac6a5Smrg   test x$BUILD_PSDOC != xno; then
4551f0ac6a5Smrg	BUILDPSDOC=yes
4561f0ac6a5Smrgfi
4571f0ac6a5SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
4581f0ac6a5SmrgAC_MSG_RESULT([$BUILDPSDOC])
4591f0ac6a5Smrg
4601f0ac6a5SmrgAC_MSG_CHECKING([Whether to build HTML documentation])
4611f0ac6a5Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
4621f0ac6a5Smrg   test x$BUILD_HTMLDOC != xno; then
4631f0ac6a5Smrg	BUILDHTMLDOC=yes
4641f0ac6a5Smrgfi
4651f0ac6a5SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
4661f0ac6a5SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
4671f0ac6a5Smrg
4681f0ac6a5SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
4691f0ac6a5SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
4701f0ac6a5SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
4711f0ac6a5SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
4721f0ac6a5Smrg
4731f0ac6a5SmrgAC_SUBST(MAKE_TEXT)
4741f0ac6a5SmrgAC_SUBST(MAKE_PS)
4751f0ac6a5SmrgAC_SUBST(MAKE_PDF)
4761f0ac6a5SmrgAC_SUBST(MAKE_HTML)
4771f0ac6a5Smrg]) # XORG_CHECK_DOCBOOK
4781f0ac6a5Smrg
4791f0ac6a5Smrg# XORG_CHECK_MALLOC_ZERO
4801f0ac6a5Smrg# ----------------------
4811f0ac6a5Smrg# Minimum version: 1.0.0
4821f0ac6a5Smrg#
4831f0ac6a5Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
4841f0ac6a5Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
4851f0ac6a5Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
4861f0ac6a5SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
4871f0ac6a5SmrgAC_ARG_ENABLE(malloc0returnsnull,
4881f0ac6a5Smrg	AC_HELP_STRING([--enable-malloc0returnsnull],
4891f0ac6a5Smrg		       [malloc(0) returns NULL (default: auto)]),
4901f0ac6a5Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
4911f0ac6a5Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
4921f0ac6a5Smrg
4931f0ac6a5SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
4941f0ac6a5Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
4951f0ac6a5Smrg	AC_RUN_IFELSE([
4961f0ac6a5Smrgchar *malloc();
4971f0ac6a5Smrgchar *realloc();
4981f0ac6a5Smrgchar *calloc();
4991f0ac6a5Smrgmain() {
5001f0ac6a5Smrg    char *m0, *r0, *c0, *p;
5011f0ac6a5Smrg    m0 = malloc(0);
5021f0ac6a5Smrg    p = malloc(10);
5031f0ac6a5Smrg    r0 = realloc(p,0);
5041f0ac6a5Smrg    c0 = calloc(0);
5051f0ac6a5Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
5061f0ac6a5Smrg}],
5071f0ac6a5Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
5081f0ac6a5Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
5091f0ac6a5Smrgfi
5101f0ac6a5SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
5111f0ac6a5Smrg
5121f0ac6a5Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
5131f0ac6a5Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
5141f0ac6a5Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
5151f0ac6a5Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
5161f0ac6a5Smrgelse
5171f0ac6a5Smrg	MALLOC_ZERO_CFLAGS=""
5181f0ac6a5Smrg	XMALLOC_ZERO_CFLAGS=""
5191f0ac6a5Smrg	XTMALLOC_ZERO_CFLAGS=""
5201f0ac6a5Smrgfi
5211f0ac6a5Smrg
5221f0ac6a5SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
5231f0ac6a5SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
5241f0ac6a5SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
5251f0ac6a5Smrg]) # XORG_CHECK_MALLOC_ZERO
5261f0ac6a5Smrg
5271f0ac6a5Smrg# XORG_WITH_LINT()
5281f0ac6a5Smrg# ----------------
5291f0ac6a5Smrg# Minimum version: 1.1.0
5301f0ac6a5Smrg#
5311f0ac6a5Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
5321f0ac6a5Smrg# is specified.   (Use --with-lint=sparse for sparse.)
5331f0ac6a5Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
5341f0ac6a5Smrg# Sets $LINT_FLAGS to flags to pass to source checker
5351f0ac6a5Smrg# Sets LINT automake conditional if enabled (default: disabled)
5361f0ac6a5Smrg#
5371f0ac6a5SmrgAC_DEFUN([XORG_WITH_LINT],[
5381f0ac6a5Smrg
5391f0ac6a5Smrg# Allow checking code with lint, sparse, etc.
5401f0ac6a5SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
5411f0ac6a5Smrg		[Use a lint-style source code checker (default: disabled)])],
5421f0ac6a5Smrg		[use_lint=$withval], [use_lint=no])
5431f0ac6a5Smrgif test "x$use_lint" = "xyes" ; then
5441f0ac6a5Smrg	LINT="lint"
5451f0ac6a5Smrgelse
5461f0ac6a5Smrg	LINT="$use_lint"
5471f0ac6a5Smrgfi
5481f0ac6a5Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
5491f0ac6a5Smrg    case $LINT in
5501f0ac6a5Smrg	lint|*/lint)
5511f0ac6a5Smrg	    case $host_os in
5521f0ac6a5Smrg		solaris*)
5531f0ac6a5Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
5541f0ac6a5Smrg			;;
5551f0ac6a5Smrg	    esac
5561f0ac6a5Smrg	    ;;
5571f0ac6a5Smrg    esac
5581f0ac6a5Smrgfi
5591f0ac6a5Smrg
5601f0ac6a5SmrgAC_SUBST(LINT)
5611f0ac6a5SmrgAC_SUBST(LINT_FLAGS)
5621f0ac6a5SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
5631f0ac6a5Smrg
5641f0ac6a5Smrg]) # XORG_WITH_LINT
5651f0ac6a5Smrg
5661f0ac6a5Smrg# XORG_LINT_LIBRARY(LIBNAME)
5671f0ac6a5Smrg# --------------------------
5681f0ac6a5Smrg# Minimum version: 1.1.0
5691f0ac6a5Smrg#
5701f0ac6a5Smrg# Sets up flags for building lint libraries for checking programs that call
5711f0ac6a5Smrg# functions in the library.
5721f0ac6a5Smrg# Disabled by default, enable with --enable-lint-library
5731f0ac6a5Smrg# Sets: 
5741f0ac6a5Smrg#	@LINTLIB@		- name of lint library file to make
5751f0ac6a5Smrg#	MAKE_LINT_LIB		- automake conditional
5761f0ac6a5Smrg#
5771f0ac6a5Smrg
5781f0ac6a5SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
5791f0ac6a5SmrgAC_REQUIRE([XORG_WITH_LINT])
5801f0ac6a5Smrg# Build lint "library" for more indepth checks of programs calling this library
5811f0ac6a5SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
5821f0ac6a5Smrg	[Create lint library (default: disabled)])],
5831f0ac6a5Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
5841f0ac6a5Smrgif test "x$make_lint_lib" != "xno" ; then
5851f0ac6a5Smrg	if test "x$LINT" = "xno" ; then
5861f0ac6a5Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
5871f0ac6a5Smrg	fi
5881f0ac6a5Smrg	if test "x$make_lint_lib" = "xyes" ; then
5891f0ac6a5Smrg		LINTLIB=llib-l$1.ln
5901f0ac6a5Smrg	else
5911f0ac6a5Smrg		LINTLIB=$make_lint_lib
5921f0ac6a5Smrg	fi
5931f0ac6a5Smrgfi
5941f0ac6a5SmrgAC_SUBST(LINTLIB)
5951f0ac6a5SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
5961f0ac6a5Smrg
5971f0ac6a5Smrg]) # XORG_LINT_LIBRARY
5981f0ac6a5Smrg
5991f0ac6a5Smrgdnl Copyright 2005 Red Hat, Inc
6001f0ac6a5Smrgdnl
6011f0ac6a5Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
6021f0ac6a5Smrgdnl documentation for any purpose is hereby granted without fee, provided that
6031f0ac6a5Smrgdnl the above copyright notice appear in all copies and that both that
6041f0ac6a5Smrgdnl copyright notice and this permission notice appear in supporting
6051f0ac6a5Smrgdnl documentation.
6061f0ac6a5Smrgdnl
6071f0ac6a5Smrgdnl The above copyright notice and this permission notice shall be included
6081f0ac6a5Smrgdnl in all copies or substantial portions of the Software.
6091f0ac6a5Smrgdnl
6101f0ac6a5Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
6111f0ac6a5Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
6121f0ac6a5Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
6131f0ac6a5Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
6141f0ac6a5Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
6151f0ac6a5Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
6161f0ac6a5Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
6171f0ac6a5Smrgdnl
6181f0ac6a5Smrgdnl Except as contained in this notice, the name of the copyright holders shall
6191f0ac6a5Smrgdnl not be used in advertising or otherwise to promote the sale, use or
6201f0ac6a5Smrgdnl other dealings in this Software without prior written authorization
6211f0ac6a5Smrgdnl from the copyright holders.
6221f0ac6a5Smrgdnl
6231f0ac6a5Smrg
6241f0ac6a5Smrg# XORG_RELEASE_VERSION
6251f0ac6a5Smrg# --------------------
6261f0ac6a5Smrg# Adds --with/without-release-string and changes the PACKAGE and
6271f0ac6a5Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
6281f0ac6a5Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
6291f0ac6a5Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
6301f0ac6a5Smrg 
6311f0ac6a5SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
6321f0ac6a5Smrg	AC_ARG_WITH(release-version,
6331f0ac6a5Smrg			AC_HELP_STRING([--with-release-version=STRING],
6341f0ac6a5Smrg				[Use release version string in package name]),
6351f0ac6a5Smrg			[RELEASE_VERSION="$withval"],
6361f0ac6a5Smrg			[RELEASE_VERSION=""])
6371f0ac6a5Smrg	if test "x$RELEASE_VERSION" != "x"; then
6381f0ac6a5Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
6391f0ac6a5Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
6401f0ac6a5Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
6411f0ac6a5Smrg	fi
6421f0ac6a5Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
6431f0ac6a5Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
6441f0ac6a5Smrg		[Major version of this package])
6451f0ac6a5Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
6461f0ac6a5Smrg	if test "x$PVM" = "x"; then
6471f0ac6a5Smrg		PVM="0"
6481f0ac6a5Smrg	fi
6491f0ac6a5Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
6501f0ac6a5Smrg		[$PVM],
6511f0ac6a5Smrg		[Minor version of this package])
6521f0ac6a5Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
6531f0ac6a5Smrg	if test "x$PVP" = "x"; then
6541f0ac6a5Smrg		PVP="0"
6551f0ac6a5Smrg	fi
6561f0ac6a5Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
6571f0ac6a5Smrg		[$PVP],
6581f0ac6a5Smrg		[Patch version of this package])
6591f0ac6a5Smrg])
6601f0ac6a5Smrg
6611f0ac6a5Smrg# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
6621f0ac6a5Smrg#
6631f0ac6a5Smrg# This file is free software; the Free Software Foundation
6641f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
6651f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
6661f0ac6a5Smrg
6671f0ac6a5Smrg# AM_AUTOMAKE_VERSION(VERSION)
6681f0ac6a5Smrg# ----------------------------
6691f0ac6a5Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
6701f0ac6a5Smrg# generated from the m4 files accompanying Automake X.Y.
6711f0ac6a5Smrg# (This private macro should not be called outside this file.)
6721f0ac6a5SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
6731f0ac6a5Smrg[am__api_version='1.10'
6741f0ac6a5Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
6751f0ac6a5Smrgdnl require some minimum version.  Point them to the right macro.
6761f0ac6a5Smrgm4_if([$1], [1.10], [],
6771f0ac6a5Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
6781f0ac6a5Smrg])
6791f0ac6a5Smrg
6801f0ac6a5Smrg# _AM_AUTOCONF_VERSION(VERSION)
6811f0ac6a5Smrg# -----------------------------
6821f0ac6a5Smrg# aclocal traces this macro to find the Autoconf version.
6831f0ac6a5Smrg# This is a private macro too.  Using m4_define simplifies
6841f0ac6a5Smrg# the logic in aclocal, which can simply ignore this definition.
6851f0ac6a5Smrgm4_define([_AM_AUTOCONF_VERSION], [])
6861f0ac6a5Smrg
6871f0ac6a5Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
6881f0ac6a5Smrg# -------------------------------
6891f0ac6a5Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
6901f0ac6a5Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6911f0ac6a5SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6921f0ac6a5Smrg[AM_AUTOMAKE_VERSION([1.10])dnl
6931f0ac6a5Smrg_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
6941f0ac6a5Smrg
6951f0ac6a5Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
6961f0ac6a5Smrg
6971f0ac6a5Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
6981f0ac6a5Smrg#
6991f0ac6a5Smrg# This file is free software; the Free Software Foundation
7001f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
7011f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
7021f0ac6a5Smrg
7031f0ac6a5Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
7041f0ac6a5Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
7051f0ac6a5Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
7061f0ac6a5Smrg#
7071f0ac6a5Smrg# Of course, Automake must honor this variable whenever it calls a
7081f0ac6a5Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
7091f0ac6a5Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
7101f0ac6a5Smrg# depending on how configure is run.  This is pretty annoying, since
7111f0ac6a5Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
7121f0ac6a5Smrg# source directory, any form will work fine, but in subdirectories a
7131f0ac6a5Smrg# relative path needs to be adjusted first.
7141f0ac6a5Smrg#
7151f0ac6a5Smrg# $ac_aux_dir/missing
7161f0ac6a5Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
7171f0ac6a5Smrg# $top_srcdir/$ac_aux_dir/missing
7181f0ac6a5Smrg#    fails if $ac_aux_dir is absolute,
7191f0ac6a5Smrg#    fails when called from a subdirectory in a VPATH build with
7201f0ac6a5Smrg#          a relative $ac_aux_dir
7211f0ac6a5Smrg#
7221f0ac6a5Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
7231f0ac6a5Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
7241f0ac6a5Smrg# harmless because $srcdir is `.', but things will broke when you
7251f0ac6a5Smrg# start a VPATH build or use an absolute $srcdir.
7261f0ac6a5Smrg#
7271f0ac6a5Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
7281f0ac6a5Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
7291f0ac6a5Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
7301f0ac6a5Smrg# and then we would define $MISSING as
7311f0ac6a5Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
7321f0ac6a5Smrg# This will work as long as MISSING is not called from configure, because
7331f0ac6a5Smrg# unfortunately $(top_srcdir) has no meaning in configure.
7341f0ac6a5Smrg# However there are other variables, like CC, which are often used in
7351f0ac6a5Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
7361f0ac6a5Smrg#
7371f0ac6a5Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
7381f0ac6a5Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
7391f0ac6a5Smrg# configured tree to be moved without reconfiguration.
7401f0ac6a5Smrg
7411f0ac6a5SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
7421f0ac6a5Smrg[dnl Rely on autoconf to set up CDPATH properly.
7431f0ac6a5SmrgAC_PREREQ([2.50])dnl
7441f0ac6a5Smrg# expand $ac_aux_dir to an absolute path
7451f0ac6a5Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
7461f0ac6a5Smrg])
7471f0ac6a5Smrg
7481f0ac6a5Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
7491f0ac6a5Smrg
7501f0ac6a5Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
7511f0ac6a5Smrg# Free Software Foundation, Inc.
7521f0ac6a5Smrg#
7531f0ac6a5Smrg# This file is free software; the Free Software Foundation
7541f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
7551f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
7561f0ac6a5Smrg
7571f0ac6a5Smrg# serial 8
7581f0ac6a5Smrg
7591f0ac6a5Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
7601f0ac6a5Smrg# -------------------------------------
7611f0ac6a5Smrg# Define a conditional.
7621f0ac6a5SmrgAC_DEFUN([AM_CONDITIONAL],
7631f0ac6a5Smrg[AC_PREREQ(2.52)dnl
7641f0ac6a5Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
7651f0ac6a5Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
7661f0ac6a5SmrgAC_SUBST([$1_TRUE])dnl
7671f0ac6a5SmrgAC_SUBST([$1_FALSE])dnl
7681f0ac6a5Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
7691f0ac6a5Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
7701f0ac6a5Smrgif $2; then
7711f0ac6a5Smrg  $1_TRUE=
7721f0ac6a5Smrg  $1_FALSE='#'
7731f0ac6a5Smrgelse
7741f0ac6a5Smrg  $1_TRUE='#'
7751f0ac6a5Smrg  $1_FALSE=
7761f0ac6a5Smrgfi
7771f0ac6a5SmrgAC_CONFIG_COMMANDS_PRE(
7781f0ac6a5Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
7791f0ac6a5Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
7801f0ac6a5SmrgUsually this means the macro was only invoked conditionally.]])
7811f0ac6a5Smrgfi])])
7821f0ac6a5Smrg
7831f0ac6a5Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7841f0ac6a5Smrg# Free Software Foundation, Inc.
7851f0ac6a5Smrg#
7861f0ac6a5Smrg# This file is free software; the Free Software Foundation
7871f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
7881f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
7891f0ac6a5Smrg
7901f0ac6a5Smrg# serial 9
7911f0ac6a5Smrg
7921f0ac6a5Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
7931f0ac6a5Smrg# written in clear, in which case automake, when reading aclocal.m4,
7941f0ac6a5Smrg# will think it sees a *use*, and therefore will trigger all it's
7951f0ac6a5Smrg# C support machinery.  Also note that it means that autoscan, seeing
7961f0ac6a5Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
7971f0ac6a5Smrg
7981f0ac6a5Smrg
7991f0ac6a5Smrg# _AM_DEPENDENCIES(NAME)
8001f0ac6a5Smrg# ----------------------
8011f0ac6a5Smrg# See how the compiler implements dependency checking.
8021f0ac6a5Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
8031f0ac6a5Smrg# We try a few techniques and use that to set a single cache variable.
8041f0ac6a5Smrg#
8051f0ac6a5Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
8061f0ac6a5Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
8071f0ac6a5Smrg# dependency, and given that the user is not expected to run this macro,
8081f0ac6a5Smrg# just rely on AC_PROG_CC.
8091f0ac6a5SmrgAC_DEFUN([_AM_DEPENDENCIES],
8101f0ac6a5Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
8111f0ac6a5SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
8121f0ac6a5SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
8131f0ac6a5SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
8141f0ac6a5Smrg
8151f0ac6a5Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
8161f0ac6a5Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
8171f0ac6a5Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
8181f0ac6a5Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
8191f0ac6a5Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
8201f0ac6a5Smrg                   [depcc="$$1"   am_compiler_list=])
8211f0ac6a5Smrg
8221f0ac6a5SmrgAC_CACHE_CHECK([dependency style of $depcc],
8231f0ac6a5Smrg               [am_cv_$1_dependencies_compiler_type],
8241f0ac6a5Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
8251f0ac6a5Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
8261f0ac6a5Smrg  # making bogus files that we don't know about and never remove.  For
8271f0ac6a5Smrg  # instance it was reported that on HP-UX the gcc test will end up
8281f0ac6a5Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
8291f0ac6a5Smrg  # in D'.
8301f0ac6a5Smrg  mkdir conftest.dir
8311f0ac6a5Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
8321f0ac6a5Smrg  # using a relative directory.
8331f0ac6a5Smrg  cp "$am_depcomp" conftest.dir
8341f0ac6a5Smrg  cd conftest.dir
8351f0ac6a5Smrg  # We will build objects and dependencies in a subdirectory because
8361f0ac6a5Smrg  # it helps to detect inapplicable dependency modes.  For instance
8371f0ac6a5Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
8381f0ac6a5Smrg  # side effect of compilation, but ICC will put the dependencies in
8391f0ac6a5Smrg  # the current directory while Tru64 will put them in the object
8401f0ac6a5Smrg  # directory.
8411f0ac6a5Smrg  mkdir sub
8421f0ac6a5Smrg
8431f0ac6a5Smrg  am_cv_$1_dependencies_compiler_type=none
8441f0ac6a5Smrg  if test "$am_compiler_list" = ""; then
8451f0ac6a5Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
8461f0ac6a5Smrg  fi
8471f0ac6a5Smrg  for depmode in $am_compiler_list; do
8481f0ac6a5Smrg    # Setup a source with many dependencies, because some compilers
8491f0ac6a5Smrg    # like to wrap large dependency lists on column 80 (with \), and
8501f0ac6a5Smrg    # we should not choose a depcomp mode which is confused by this.
8511f0ac6a5Smrg    #
8521f0ac6a5Smrg    # We need to recreate these files for each test, as the compiler may
8531f0ac6a5Smrg    # overwrite some of them when testing with obscure command lines.
8541f0ac6a5Smrg    # This happens at least with the AIX C compiler.
8551f0ac6a5Smrg    : > sub/conftest.c
8561f0ac6a5Smrg    for i in 1 2 3 4 5 6; do
8571f0ac6a5Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
8581f0ac6a5Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
8591f0ac6a5Smrg      # Solaris 8's {/usr,}/bin/sh.
8601f0ac6a5Smrg      touch sub/conftst$i.h
8611f0ac6a5Smrg    done
8621f0ac6a5Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
8631f0ac6a5Smrg
8641f0ac6a5Smrg    case $depmode in
8651f0ac6a5Smrg    nosideeffect)
8661f0ac6a5Smrg      # after this tag, mechanisms are not by side-effect, so they'll
8671f0ac6a5Smrg      # only be used when explicitly requested
8681f0ac6a5Smrg      if test "x$enable_dependency_tracking" = xyes; then
8691f0ac6a5Smrg	continue
8701f0ac6a5Smrg      else
8711f0ac6a5Smrg	break
8721f0ac6a5Smrg      fi
8731f0ac6a5Smrg      ;;
8741f0ac6a5Smrg    none) break ;;
8751f0ac6a5Smrg    esac
8761f0ac6a5Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
8771f0ac6a5Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
8781f0ac6a5Smrg    # handle `-M -o', and we need to detect this.
8791f0ac6a5Smrg    if depmode=$depmode \
8801f0ac6a5Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
8811f0ac6a5Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
8821f0ac6a5Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
8831f0ac6a5Smrg         >/dev/null 2>conftest.err &&
8841f0ac6a5Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
8851f0ac6a5Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
8861f0ac6a5Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
8871f0ac6a5Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
8881f0ac6a5Smrg      # icc doesn't choke on unknown options, it will just issue warnings
8891f0ac6a5Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
8901f0ac6a5Smrg      # that says an option was ignored or not supported.
8911f0ac6a5Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
8921f0ac6a5Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
8931f0ac6a5Smrg      # The diagnosis changed in icc 8.0:
8941f0ac6a5Smrg      #   icc: Command line remark: option '-MP' not supported
8951f0ac6a5Smrg      if (grep 'ignoring option' conftest.err ||
8961f0ac6a5Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
8971f0ac6a5Smrg        am_cv_$1_dependencies_compiler_type=$depmode
8981f0ac6a5Smrg        break
8991f0ac6a5Smrg      fi
9001f0ac6a5Smrg    fi
9011f0ac6a5Smrg  done
9021f0ac6a5Smrg
9031f0ac6a5Smrg  cd ..
9041f0ac6a5Smrg  rm -rf conftest.dir
9051f0ac6a5Smrgelse
9061f0ac6a5Smrg  am_cv_$1_dependencies_compiler_type=none
9071f0ac6a5Smrgfi
9081f0ac6a5Smrg])
9091f0ac6a5SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9101f0ac6a5SmrgAM_CONDITIONAL([am__fastdep$1], [
9111f0ac6a5Smrg  test "x$enable_dependency_tracking" != xno \
9121f0ac6a5Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9131f0ac6a5Smrg])
9141f0ac6a5Smrg
9151f0ac6a5Smrg
9161f0ac6a5Smrg# AM_SET_DEPDIR
9171f0ac6a5Smrg# -------------
9181f0ac6a5Smrg# Choose a directory name for dependency files.
9191f0ac6a5Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
9201f0ac6a5SmrgAC_DEFUN([AM_SET_DEPDIR],
9211f0ac6a5Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9221f0ac6a5SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9231f0ac6a5Smrg])
9241f0ac6a5Smrg
9251f0ac6a5Smrg
9261f0ac6a5Smrg# AM_DEP_TRACK
9271f0ac6a5Smrg# ------------
9281f0ac6a5SmrgAC_DEFUN([AM_DEP_TRACK],
9291f0ac6a5Smrg[AC_ARG_ENABLE(dependency-tracking,
9301f0ac6a5Smrg[  --disable-dependency-tracking  speeds up one-time build
9311f0ac6a5Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
9321f0ac6a5Smrgif test "x$enable_dependency_tracking" != xno; then
9331f0ac6a5Smrg  am_depcomp="$ac_aux_dir/depcomp"
9341f0ac6a5Smrg  AMDEPBACKSLASH='\'
9351f0ac6a5Smrgfi
9361f0ac6a5SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9371f0ac6a5SmrgAC_SUBST([AMDEPBACKSLASH])dnl
9381f0ac6a5Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9391f0ac6a5Smrg])
9401f0ac6a5Smrg
9411f0ac6a5Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
9421f0ac6a5Smrg
9431f0ac6a5Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
9441f0ac6a5Smrg# Free Software Foundation, Inc.
9451f0ac6a5Smrg#
9461f0ac6a5Smrg# This file is free software; the Free Software Foundation
9471f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
9481f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
9491f0ac6a5Smrg
9501f0ac6a5Smrg#serial 3
9511f0ac6a5Smrg
9521f0ac6a5Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
9531f0ac6a5Smrg# ------------------------------
9541f0ac6a5SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9551f0ac6a5Smrg[for mf in $CONFIG_FILES; do
9561f0ac6a5Smrg  # Strip MF so we end up with the name of the file.
9571f0ac6a5Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
9581f0ac6a5Smrg  # Check whether this is an Automake generated Makefile or not.
9591f0ac6a5Smrg  # We used to match only the files named `Makefile.in', but
9601f0ac6a5Smrg  # some people rename them; so instead we look at the file content.
9611f0ac6a5Smrg  # Grep'ing the first line is not enough: some people post-process
9621f0ac6a5Smrg  # each Makefile.in and add a new line on top of each file to say so.
9631f0ac6a5Smrg  # Grep'ing the whole file is not good either: AIX grep has a line
9641f0ac6a5Smrg  # limit of 2048, but all sed's we know have understand at least 4000.
9651f0ac6a5Smrg  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
9661f0ac6a5Smrg    dirpart=`AS_DIRNAME("$mf")`
9671f0ac6a5Smrg  else
9681f0ac6a5Smrg    continue
9691f0ac6a5Smrg  fi
9701f0ac6a5Smrg  # Extract the definition of DEPDIR, am__include, and am__quote
9711f0ac6a5Smrg  # from the Makefile without running `make'.
9721f0ac6a5Smrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9731f0ac6a5Smrg  test -z "$DEPDIR" && continue
9741f0ac6a5Smrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
9751f0ac6a5Smrg  test -z "am__include" && continue
9761f0ac6a5Smrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9771f0ac6a5Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
9781f0ac6a5Smrg  U=`sed -n 's/^U = //p' < "$mf"`
9791f0ac6a5Smrg  # Find all dependency output files, they are included files with
9801f0ac6a5Smrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
9811f0ac6a5Smrg  # simplest approach to changing $(DEPDIR) to its actual value in the
9821f0ac6a5Smrg  # expansion.
9831f0ac6a5Smrg  for file in `sed -n "
9841f0ac6a5Smrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9851f0ac6a5Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9861f0ac6a5Smrg    # Make sure the directory exists.
9871f0ac6a5Smrg    test -f "$dirpart/$file" && continue
9881f0ac6a5Smrg    fdir=`AS_DIRNAME(["$file"])`
9891f0ac6a5Smrg    AS_MKDIR_P([$dirpart/$fdir])
9901f0ac6a5Smrg    # echo "creating $dirpart/$file"
9911f0ac6a5Smrg    echo '# dummy' > "$dirpart/$file"
9921f0ac6a5Smrg  done
9931f0ac6a5Smrgdone
9941f0ac6a5Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9951f0ac6a5Smrg
9961f0ac6a5Smrg
9971f0ac6a5Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
9981f0ac6a5Smrg# -----------------------------
9991f0ac6a5Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
10001f0ac6a5Smrg#
10011f0ac6a5Smrg# This code is only required when automatic dependency tracking
10021f0ac6a5Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
10031f0ac6a5Smrg# need in order to bootstrap the dependency handling code.
10041f0ac6a5SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
10051f0ac6a5Smrg[AC_CONFIG_COMMANDS([depfiles],
10061f0ac6a5Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
10071f0ac6a5Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
10081f0ac6a5Smrg])
10091f0ac6a5Smrg
10101f0ac6a5Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
10111f0ac6a5Smrg# Free Software Foundation, Inc.
10121f0ac6a5Smrg#
10131f0ac6a5Smrg# This file is free software; the Free Software Foundation
10141f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
10151f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
10161f0ac6a5Smrg
10171f0ac6a5Smrg# serial 8
10181f0ac6a5Smrg
10191f0ac6a5Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
10201f0ac6a5SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
10211f0ac6a5Smrg
10221f0ac6a5Smrg# Do all the work for Automake.                             -*- Autoconf -*-
10231f0ac6a5Smrg
10241f0ac6a5Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
10251f0ac6a5Smrg# 2005, 2006 Free Software Foundation, Inc.
10261f0ac6a5Smrg#
10271f0ac6a5Smrg# This file is free software; the Free Software Foundation
10281f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
10291f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
10301f0ac6a5Smrg
10311f0ac6a5Smrg# serial 12
10321f0ac6a5Smrg
10331f0ac6a5Smrg# This macro actually does too much.  Some checks are only needed if
10341f0ac6a5Smrg# your package does certain things.  But this isn't really a big deal.
10351f0ac6a5Smrg
10361f0ac6a5Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
10371f0ac6a5Smrg# AM_INIT_AUTOMAKE([OPTIONS])
10381f0ac6a5Smrg# -----------------------------------------------
10391f0ac6a5Smrg# The call with PACKAGE and VERSION arguments is the old style
10401f0ac6a5Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
10411f0ac6a5Smrg# and VERSION should now be passed to AC_INIT and removed from
10421f0ac6a5Smrg# the call to AM_INIT_AUTOMAKE.
10431f0ac6a5Smrg# We support both call styles for the transition.  After
10441f0ac6a5Smrg# the next Automake release, Autoconf can make the AC_INIT
10451f0ac6a5Smrg# arguments mandatory, and then we can depend on a new Autoconf
10461f0ac6a5Smrg# release and drop the old call support.
10471f0ac6a5SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
10481f0ac6a5Smrg[AC_PREREQ([2.60])dnl
10491f0ac6a5Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
10501f0ac6a5Smrgdnl the ones we care about.
10511f0ac6a5Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
10521f0ac6a5SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
10531f0ac6a5SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
10541f0ac6a5Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
10551f0ac6a5Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
10561f0ac6a5Smrg  # is not polluted with repeated "-I."
10571f0ac6a5Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
10581f0ac6a5Smrg  # test to see if srcdir already configured
10591f0ac6a5Smrg  if test -f $srcdir/config.status; then
10601f0ac6a5Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
10611f0ac6a5Smrg  fi
10621f0ac6a5Smrgfi
10631f0ac6a5Smrg
10641f0ac6a5Smrg# test whether we have cygpath
10651f0ac6a5Smrgif test -z "$CYGPATH_W"; then
10661f0ac6a5Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
10671f0ac6a5Smrg    CYGPATH_W='cygpath -w'
10681f0ac6a5Smrg  else
10691f0ac6a5Smrg    CYGPATH_W=echo
10701f0ac6a5Smrg  fi
10711f0ac6a5Smrgfi
10721f0ac6a5SmrgAC_SUBST([CYGPATH_W])
10731f0ac6a5Smrg
10741f0ac6a5Smrg# Define the identity of the package.
10751f0ac6a5Smrgdnl Distinguish between old-style and new-style calls.
10761f0ac6a5Smrgm4_ifval([$2],
10771f0ac6a5Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
10781f0ac6a5Smrg AC_SUBST([PACKAGE], [$1])dnl
10791f0ac6a5Smrg AC_SUBST([VERSION], [$2])],
10801f0ac6a5Smrg[_AM_SET_OPTIONS([$1])dnl
10811f0ac6a5Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
10821f0ac6a5Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
10831f0ac6a5Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
10841f0ac6a5Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
10851f0ac6a5Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
10861f0ac6a5Smrg
10871f0ac6a5Smrg_AM_IF_OPTION([no-define],,
10881f0ac6a5Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
10891f0ac6a5Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
10901f0ac6a5Smrg
10911f0ac6a5Smrg# Some tools Automake needs.
10921f0ac6a5SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
10931f0ac6a5SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
10941f0ac6a5SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
10951f0ac6a5SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
10961f0ac6a5SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
10971f0ac6a5SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
10981f0ac6a5SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
10991f0ac6a5SmrgAM_PROG_INSTALL_SH
11001f0ac6a5SmrgAM_PROG_INSTALL_STRIP
11011f0ac6a5SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
11021f0ac6a5Smrg# We need awk for the "check" target.  The system "awk" is bad on
11031f0ac6a5Smrg# some platforms.
11041f0ac6a5SmrgAC_REQUIRE([AC_PROG_AWK])dnl
11051f0ac6a5SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
11061f0ac6a5SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
11071f0ac6a5Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
11081f0ac6a5Smrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
11091f0ac6a5Smrg	      		     [_AM_PROG_TAR([v7])])])
11101f0ac6a5Smrg_AM_IF_OPTION([no-dependencies],,
11111f0ac6a5Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
11121f0ac6a5Smrg                  [_AM_DEPENDENCIES(CC)],
11131f0ac6a5Smrg                  [define([AC_PROG_CC],
11141f0ac6a5Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
11151f0ac6a5SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
11161f0ac6a5Smrg                  [_AM_DEPENDENCIES(CXX)],
11171f0ac6a5Smrg                  [define([AC_PROG_CXX],
11181f0ac6a5Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
11191f0ac6a5SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
11201f0ac6a5Smrg                  [_AM_DEPENDENCIES(OBJC)],
11211f0ac6a5Smrg                  [define([AC_PROG_OBJC],
11221f0ac6a5Smrg                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
11231f0ac6a5Smrg])
11241f0ac6a5Smrg])
11251f0ac6a5Smrg
11261f0ac6a5Smrg
11271f0ac6a5Smrg# When config.status generates a header, we must update the stamp-h file.
11281f0ac6a5Smrg# This file resides in the same directory as the config header
11291f0ac6a5Smrg# that is generated.  The stamp files are numbered to have different names.
11301f0ac6a5Smrg
11311f0ac6a5Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
11321f0ac6a5Smrg# loop where config.status creates the headers, so we can generate
11331f0ac6a5Smrg# our stamp files there.
11341f0ac6a5SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
11351f0ac6a5Smrg[# Compute $1's index in $config_headers.
11361f0ac6a5Smrg_am_stamp_count=1
11371f0ac6a5Smrgfor _am_header in $config_headers :; do
11381f0ac6a5Smrg  case $_am_header in
11391f0ac6a5Smrg    $1 | $1:* )
11401f0ac6a5Smrg      break ;;
11411f0ac6a5Smrg    * )
11421f0ac6a5Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
11431f0ac6a5Smrg  esac
11441f0ac6a5Smrgdone
11451f0ac6a5Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
11461f0ac6a5Smrg
11471f0ac6a5Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
11481f0ac6a5Smrg#
11491f0ac6a5Smrg# This file is free software; the Free Software Foundation
11501f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
11511f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
11521f0ac6a5Smrg
11531f0ac6a5Smrg# AM_PROG_INSTALL_SH
11541f0ac6a5Smrg# ------------------
11551f0ac6a5Smrg# Define $install_sh.
11561f0ac6a5SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
11571f0ac6a5Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11581f0ac6a5Smrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
11591f0ac6a5SmrgAC_SUBST(install_sh)])
11601f0ac6a5Smrg
11611f0ac6a5Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
11621f0ac6a5Smrg#
11631f0ac6a5Smrg# This file is free software; the Free Software Foundation
11641f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
11651f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
11661f0ac6a5Smrg
11671f0ac6a5Smrg# serial 2
11681f0ac6a5Smrg
11691f0ac6a5Smrg# Check whether the underlying file-system supports filenames
11701f0ac6a5Smrg# with a leading dot.  For instance MS-DOS doesn't.
11711f0ac6a5SmrgAC_DEFUN([AM_SET_LEADING_DOT],
11721f0ac6a5Smrg[rm -rf .tst 2>/dev/null
11731f0ac6a5Smrgmkdir .tst 2>/dev/null
11741f0ac6a5Smrgif test -d .tst; then
11751f0ac6a5Smrg  am__leading_dot=.
11761f0ac6a5Smrgelse
11771f0ac6a5Smrg  am__leading_dot=_
11781f0ac6a5Smrgfi
11791f0ac6a5Smrgrmdir .tst 2>/dev/null
11801f0ac6a5SmrgAC_SUBST([am__leading_dot])])
11811f0ac6a5Smrg
11821f0ac6a5Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
11831f0ac6a5Smrg
11841f0ac6a5Smrg# serial 48 AC_PROG_LIBTOOL
11851f0ac6a5Smrg
11861f0ac6a5Smrg
11871f0ac6a5Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
11881f0ac6a5Smrg# -----------------------------------------------------------
11891f0ac6a5Smrg# If this macro is not defined by Autoconf, define it here.
11901f0ac6a5Smrgm4_ifdef([AC_PROVIDE_IFELSE],
11911f0ac6a5Smrg         [],
11921f0ac6a5Smrg         [m4_define([AC_PROVIDE_IFELSE],
11931f0ac6a5Smrg	         [m4_ifdef([AC_PROVIDE_$1],
11941f0ac6a5Smrg		           [$2], [$3])])])
11951f0ac6a5Smrg
11961f0ac6a5Smrg
11971f0ac6a5Smrg# AC_PROG_LIBTOOL
11981f0ac6a5Smrg# ---------------
11991f0ac6a5SmrgAC_DEFUN([AC_PROG_LIBTOOL],
12001f0ac6a5Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
12011f0ac6a5Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
12021f0ac6a5Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
12031f0ac6a5Smrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
12041f0ac6a5Smrg    [AC_LIBTOOL_CXX],
12051f0ac6a5Smrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
12061f0ac6a5Smrg  ])])
12071f0ac6a5Smrgdnl And a similar setup for Fortran 77 support
12081f0ac6a5Smrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
12091f0ac6a5Smrg    [AC_LIBTOOL_F77],
12101f0ac6a5Smrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
12111f0ac6a5Smrg])])
12121f0ac6a5Smrg
12131f0ac6a5Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
12141f0ac6a5Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
12151f0ac6a5Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
12161f0ac6a5Smrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
12171f0ac6a5Smrg    [AC_LIBTOOL_GCJ],
12181f0ac6a5Smrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
12191f0ac6a5Smrg      [AC_LIBTOOL_GCJ],
12201f0ac6a5Smrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
12211f0ac6a5Smrg	[AC_LIBTOOL_GCJ],
12221f0ac6a5Smrg      [ifdef([AC_PROG_GCJ],
12231f0ac6a5Smrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
12241f0ac6a5Smrg       ifdef([A][M_PROG_GCJ],
12251f0ac6a5Smrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
12261f0ac6a5Smrg       ifdef([LT_AC_PROG_GCJ],
12271f0ac6a5Smrg	     [define([LT_AC_PROG_GCJ],
12281f0ac6a5Smrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
12291f0ac6a5Smrg])])# AC_PROG_LIBTOOL
12301f0ac6a5Smrg
12311f0ac6a5Smrg
12321f0ac6a5Smrg# _AC_PROG_LIBTOOL
12331f0ac6a5Smrg# ----------------
12341f0ac6a5SmrgAC_DEFUN([_AC_PROG_LIBTOOL],
12351f0ac6a5Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
12361f0ac6a5SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
12371f0ac6a5SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
12381f0ac6a5SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
12391f0ac6a5Smrg
12401f0ac6a5Smrg# This can be used to rebuild libtool when needed
12411f0ac6a5SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
12421f0ac6a5Smrg
12431f0ac6a5Smrg# Always use our own libtool.
12441f0ac6a5SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
12451f0ac6a5SmrgAC_SUBST(LIBTOOL)dnl
12461f0ac6a5Smrg
12471f0ac6a5Smrg# Prevent multiple expansion
12481f0ac6a5Smrgdefine([AC_PROG_LIBTOOL], [])
12491f0ac6a5Smrg])# _AC_PROG_LIBTOOL
12501f0ac6a5Smrg
12511f0ac6a5Smrg
12521f0ac6a5Smrg# AC_LIBTOOL_SETUP
12531f0ac6a5Smrg# ----------------
12541f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_SETUP],
12551f0ac6a5Smrg[AC_PREREQ(2.50)dnl
12561f0ac6a5SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
12571f0ac6a5SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
12581f0ac6a5SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
12591f0ac6a5SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
12601f0ac6a5SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
12611f0ac6a5SmrgAC_REQUIRE([AC_PROG_CC])dnl
12621f0ac6a5SmrgAC_REQUIRE([AC_PROG_LD])dnl
12631f0ac6a5SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
12641f0ac6a5SmrgAC_REQUIRE([AC_PROG_NM])dnl
12651f0ac6a5Smrg
12661f0ac6a5SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
12671f0ac6a5SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
12681f0ac6a5Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
12691f0ac6a5SmrgAC_REQUIRE([AC_OBJEXT])dnl
12701f0ac6a5SmrgAC_REQUIRE([AC_EXEEXT])dnl
12711f0ac6a5Smrgdnl
12721f0ac6a5Smrg
12731f0ac6a5SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
12741f0ac6a5SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
12751f0ac6a5SmrgAC_LIBTOOL_OBJDIR
12761f0ac6a5Smrg
12771f0ac6a5SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
12781f0ac6a5Smrg_LT_AC_PROG_ECHO_BACKSLASH
12791f0ac6a5Smrg
12801f0ac6a5Smrgcase $host_os in
12811f0ac6a5Smrgaix3*)
12821f0ac6a5Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
12831f0ac6a5Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
12841f0ac6a5Smrg  # vanish in a puff of smoke.
12851f0ac6a5Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
12861f0ac6a5Smrg    COLLECT_NAMES=
12871f0ac6a5Smrg    export COLLECT_NAMES
12881f0ac6a5Smrg  fi
12891f0ac6a5Smrg  ;;
12901f0ac6a5Smrgesac
12911f0ac6a5Smrg
12921f0ac6a5Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
12931f0ac6a5Smrg# metacharacters that are still active within double-quoted strings.
12941f0ac6a5SmrgXsed='sed -e 1s/^X//'
12951f0ac6a5Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
12961f0ac6a5Smrg
12971f0ac6a5Smrg# Same as above, but do not quote variable references.
12981f0ac6a5Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
12991f0ac6a5Smrg
13001f0ac6a5Smrg# Sed substitution to delay expansion of an escaped shell variable in a
13011f0ac6a5Smrg# double_quote_subst'ed string.
13021f0ac6a5Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
13031f0ac6a5Smrg
13041f0ac6a5Smrg# Sed substitution to avoid accidental globbing in evaled expressions
13051f0ac6a5Smrgno_glob_subst='s/\*/\\\*/g'
13061f0ac6a5Smrg
13071f0ac6a5Smrg# Constants:
13081f0ac6a5Smrgrm="rm -f"
13091f0ac6a5Smrg
13101f0ac6a5Smrg# Global variables:
13111f0ac6a5Smrgdefault_ofile=libtool
13121f0ac6a5Smrgcan_build_shared=yes
13131f0ac6a5Smrg
13141f0ac6a5Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
13151f0ac6a5Smrg# which needs '.lib').
13161f0ac6a5Smrglibext=a
13171f0ac6a5Smrgltmain="$ac_aux_dir/ltmain.sh"
13181f0ac6a5Smrgofile="$default_ofile"
13191f0ac6a5Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
13201f0ac6a5Smrg
13211f0ac6a5SmrgAC_CHECK_TOOL(AR, ar, false)
13221f0ac6a5SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
13231f0ac6a5SmrgAC_CHECK_TOOL(STRIP, strip, :)
13241f0ac6a5Smrg
13251f0ac6a5Smrgold_CC="$CC"
13261f0ac6a5Smrgold_CFLAGS="$CFLAGS"
13271f0ac6a5Smrg
13281f0ac6a5Smrg# Set sane defaults for various variables
13291f0ac6a5Smrgtest -z "$AR" && AR=ar
13301f0ac6a5Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
13311f0ac6a5Smrgtest -z "$AS" && AS=as
13321f0ac6a5Smrgtest -z "$CC" && CC=cc
13331f0ac6a5Smrgtest -z "$LTCC" && LTCC=$CC
13341f0ac6a5Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
13351f0ac6a5Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
13361f0ac6a5Smrgtest -z "$LD" && LD=ld
13371f0ac6a5Smrgtest -z "$LN_S" && LN_S="ln -s"
13381f0ac6a5Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
13391f0ac6a5Smrgtest -z "$NM" && NM=nm
13401f0ac6a5Smrgtest -z "$SED" && SED=sed
13411f0ac6a5Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
13421f0ac6a5Smrgtest -z "$RANLIB" && RANLIB=:
13431f0ac6a5Smrgtest -z "$STRIP" && STRIP=:
13441f0ac6a5Smrgtest -z "$ac_objext" && ac_objext=o
13451f0ac6a5Smrg
13461f0ac6a5Smrg# Determine commands to create old-style static archives.
13471f0ac6a5Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
13481f0ac6a5Smrgold_postinstall_cmds='chmod 644 $oldlib'
13491f0ac6a5Smrgold_postuninstall_cmds=
13501f0ac6a5Smrg
13511f0ac6a5Smrgif test -n "$RANLIB"; then
13521f0ac6a5Smrg  case $host_os in
13531f0ac6a5Smrg  openbsd*)
13541f0ac6a5Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
13551f0ac6a5Smrg    ;;
13561f0ac6a5Smrg  *)
13571f0ac6a5Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
13581f0ac6a5Smrg    ;;
13591f0ac6a5Smrg  esac
13601f0ac6a5Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
13611f0ac6a5Smrgfi
13621f0ac6a5Smrg
13631f0ac6a5Smrg_LT_CC_BASENAME([$compiler])
13641f0ac6a5Smrg
13651f0ac6a5Smrg# Only perform the check for file, if the check method requires it
13661f0ac6a5Smrgcase $deplibs_check_method in
13671f0ac6a5Smrgfile_magic*)
13681f0ac6a5Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
13691f0ac6a5Smrg    AC_PATH_MAGIC
13701f0ac6a5Smrg  fi
13711f0ac6a5Smrg  ;;
13721f0ac6a5Smrgesac
13731f0ac6a5Smrg
13741f0ac6a5SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
13751f0ac6a5SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
13761f0ac6a5Smrgenable_win32_dll=yes, enable_win32_dll=no)
13771f0ac6a5Smrg
13781f0ac6a5SmrgAC_ARG_ENABLE([libtool-lock],
13791f0ac6a5Smrg    [AC_HELP_STRING([--disable-libtool-lock],
13801f0ac6a5Smrg	[avoid locking (might break parallel builds)])])
13811f0ac6a5Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
13821f0ac6a5Smrg
13831f0ac6a5SmrgAC_ARG_WITH([pic],
13841f0ac6a5Smrg    [AC_HELP_STRING([--with-pic],
13851f0ac6a5Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
13861f0ac6a5Smrg    [pic_mode="$withval"],
13871f0ac6a5Smrg    [pic_mode=default])
13881f0ac6a5Smrgtest -z "$pic_mode" && pic_mode=default
13891f0ac6a5Smrg
13901f0ac6a5Smrg# Use C for the default configuration in the libtool script
13911f0ac6a5Smrgtagname=
13921f0ac6a5SmrgAC_LIBTOOL_LANG_C_CONFIG
13931f0ac6a5Smrg_LT_AC_TAGCONFIG
13941f0ac6a5Smrg])# AC_LIBTOOL_SETUP
13951f0ac6a5Smrg
13961f0ac6a5Smrg
13971f0ac6a5Smrg# _LT_AC_SYS_COMPILER
13981f0ac6a5Smrg# -------------------
13991f0ac6a5SmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
14001f0ac6a5Smrg[AC_REQUIRE([AC_PROG_CC])dnl
14011f0ac6a5Smrg
14021f0ac6a5Smrg# If no C compiler was specified, use CC.
14031f0ac6a5SmrgLTCC=${LTCC-"$CC"}
14041f0ac6a5Smrg
14051f0ac6a5Smrg# If no C compiler flags were specified, use CFLAGS.
14061f0ac6a5SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
14071f0ac6a5Smrg
14081f0ac6a5Smrg# Allow CC to be a program name with arguments.
14091f0ac6a5Smrgcompiler=$CC
14101f0ac6a5Smrg])# _LT_AC_SYS_COMPILER
14111f0ac6a5Smrg
14121f0ac6a5Smrg
14131f0ac6a5Smrg# _LT_CC_BASENAME(CC)
14141f0ac6a5Smrg# -------------------
14151f0ac6a5Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
14161f0ac6a5SmrgAC_DEFUN([_LT_CC_BASENAME],
14171f0ac6a5Smrg[for cc_temp in $1""; do
14181f0ac6a5Smrg  case $cc_temp in
14191f0ac6a5Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
14201f0ac6a5Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
14211f0ac6a5Smrg    \-*) ;;
14221f0ac6a5Smrg    *) break;;
14231f0ac6a5Smrg  esac
14241f0ac6a5Smrgdone
14251f0ac6a5Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
14261f0ac6a5Smrg])
14271f0ac6a5Smrg
14281f0ac6a5Smrg
14291f0ac6a5Smrg# _LT_COMPILER_BOILERPLATE
14301f0ac6a5Smrg# ------------------------
14311f0ac6a5Smrg# Check for compiler boilerplate output or warnings with
14321f0ac6a5Smrg# the simple compiler test code.
14331f0ac6a5SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
14341f0ac6a5Smrg[ac_outfile=conftest.$ac_objext
14351f0ac6a5Smrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext
14361f0ac6a5Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
14371f0ac6a5Smrg_lt_compiler_boilerplate=`cat conftest.err`
14381f0ac6a5Smrg$rm conftest*
14391f0ac6a5Smrg])# _LT_COMPILER_BOILERPLATE
14401f0ac6a5Smrg
14411f0ac6a5Smrg
14421f0ac6a5Smrg# _LT_LINKER_BOILERPLATE
14431f0ac6a5Smrg# ----------------------
14441f0ac6a5Smrg# Check for linker boilerplate output or warnings with
14451f0ac6a5Smrg# the simple link test code.
14461f0ac6a5SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
14471f0ac6a5Smrg[ac_outfile=conftest.$ac_objext
14481f0ac6a5Smrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext
14491f0ac6a5Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
14501f0ac6a5Smrg_lt_linker_boilerplate=`cat conftest.err`
14511f0ac6a5Smrg$rm conftest*
14521f0ac6a5Smrg])# _LT_LINKER_BOILERPLATE
14531f0ac6a5Smrg
14541f0ac6a5Smrg
14551f0ac6a5Smrg# _LT_AC_SYS_LIBPATH_AIX
14561f0ac6a5Smrg# ----------------------
14571f0ac6a5Smrg# Links a minimal program and checks the executable
14581f0ac6a5Smrg# for the system default hardcoded library path. In most cases,
14591f0ac6a5Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
14601f0ac6a5Smrg# the location of the communication and MPI libs are included too.
14611f0ac6a5Smrg# If we don't find anything, use the default library path according
14621f0ac6a5Smrg# to the aix ld manual.
14631f0ac6a5SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
14641f0ac6a5Smrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
14651f0ac6a5Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
14661f0ac6a5Smrg}'`
14671f0ac6a5Smrg# Check for a 64-bit object if we didn't find anything.
14681f0ac6a5Smrgif test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
14691f0ac6a5Smrg}'`; fi],[])
14701f0ac6a5Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
14711f0ac6a5Smrg])# _LT_AC_SYS_LIBPATH_AIX
14721f0ac6a5Smrg
14731f0ac6a5Smrg
14741f0ac6a5Smrg# _LT_AC_SHELL_INIT(ARG)
14751f0ac6a5Smrg# ----------------------
14761f0ac6a5SmrgAC_DEFUN([_LT_AC_SHELL_INIT],
14771f0ac6a5Smrg[ifdef([AC_DIVERSION_NOTICE],
14781f0ac6a5Smrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
14791f0ac6a5Smrg	 [AC_DIVERT_PUSH(NOTICE)])
14801f0ac6a5Smrg$1
14811f0ac6a5SmrgAC_DIVERT_POP
14821f0ac6a5Smrg])# _LT_AC_SHELL_INIT
14831f0ac6a5Smrg
14841f0ac6a5Smrg
14851f0ac6a5Smrg# _LT_AC_PROG_ECHO_BACKSLASH
14861f0ac6a5Smrg# --------------------------
14871f0ac6a5Smrg# Add some code to the start of the generated configure script which
14881f0ac6a5Smrg# will find an echo command which doesn't interpret backslashes.
14891f0ac6a5SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
14901f0ac6a5Smrg[_LT_AC_SHELL_INIT([
14911f0ac6a5Smrg# Check that we are running under the correct shell.
14921f0ac6a5SmrgSHELL=${CONFIG_SHELL-/bin/sh}
14931f0ac6a5Smrg
14941f0ac6a5Smrgcase X$ECHO in
14951f0ac6a5SmrgX*--fallback-echo)
14961f0ac6a5Smrg  # Remove one level of quotation (which was required for Make).
14971f0ac6a5Smrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
14981f0ac6a5Smrg  ;;
14991f0ac6a5Smrgesac
15001f0ac6a5Smrg
15011f0ac6a5Smrgecho=${ECHO-echo}
15021f0ac6a5Smrgif test "X[$]1" = X--no-reexec; then
15031f0ac6a5Smrg  # Discard the --no-reexec flag, and continue.
15041f0ac6a5Smrg  shift
15051f0ac6a5Smrgelif test "X[$]1" = X--fallback-echo; then
15061f0ac6a5Smrg  # Avoid inline document here, it may be left over
15071f0ac6a5Smrg  :
15081f0ac6a5Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
15091f0ac6a5Smrg  # Yippee, $echo works!
15101f0ac6a5Smrg  :
15111f0ac6a5Smrgelse
15121f0ac6a5Smrg  # Restart under the correct shell.
15131f0ac6a5Smrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
15141f0ac6a5Smrgfi
15151f0ac6a5Smrg
15161f0ac6a5Smrgif test "X[$]1" = X--fallback-echo; then
15171f0ac6a5Smrg  # used as fallback echo
15181f0ac6a5Smrg  shift
15191f0ac6a5Smrg  cat <<EOF
15201f0ac6a5Smrg[$]*
15211f0ac6a5SmrgEOF
15221f0ac6a5Smrg  exit 0
15231f0ac6a5Smrgfi
15241f0ac6a5Smrg
15251f0ac6a5Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
15261f0ac6a5Smrg# if CDPATH is set.
15271f0ac6a5Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15281f0ac6a5Smrg
15291f0ac6a5Smrgif test -z "$ECHO"; then
15301f0ac6a5Smrgif test "X${echo_test_string+set}" != Xset; then
15311f0ac6a5Smrg# find a string as large as possible, as long as the shell can cope with it
15321f0ac6a5Smrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
15331f0ac6a5Smrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
15341f0ac6a5Smrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
15351f0ac6a5Smrg       echo_test_string=`eval $cmd` &&
15361f0ac6a5Smrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
15371f0ac6a5Smrg    then
15381f0ac6a5Smrg      break
15391f0ac6a5Smrg    fi
15401f0ac6a5Smrg  done
15411f0ac6a5Smrgfi
15421f0ac6a5Smrg
15431f0ac6a5Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
15441f0ac6a5Smrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
15451f0ac6a5Smrg   test "X$echo_testing_string" = "X$echo_test_string"; then
15461f0ac6a5Smrg  :
15471f0ac6a5Smrgelse
15481f0ac6a5Smrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
15491f0ac6a5Smrg  # backslashes.  This makes it impossible to quote backslashes using
15501f0ac6a5Smrg  #   echo "$something" | sed 's/\\/\\\\/g'
15511f0ac6a5Smrg  #
15521f0ac6a5Smrg  # So, first we look for a working echo in the user's PATH.
15531f0ac6a5Smrg
15541f0ac6a5Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
15551f0ac6a5Smrg  for dir in $PATH /usr/ucb; do
15561f0ac6a5Smrg    IFS="$lt_save_ifs"
15571f0ac6a5Smrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
15581f0ac6a5Smrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
15591f0ac6a5Smrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
15601f0ac6a5Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
15611f0ac6a5Smrg      echo="$dir/echo"
15621f0ac6a5Smrg      break
15631f0ac6a5Smrg    fi
15641f0ac6a5Smrg  done
15651f0ac6a5Smrg  IFS="$lt_save_ifs"
15661f0ac6a5Smrg
15671f0ac6a5Smrg  if test "X$echo" = Xecho; then
15681f0ac6a5Smrg    # We didn't find a better echo, so look for alternatives.
15691f0ac6a5Smrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
15701f0ac6a5Smrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
15711f0ac6a5Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
15721f0ac6a5Smrg      # This shell has a builtin print -r that does the trick.
15731f0ac6a5Smrg      echo='print -r'
15741f0ac6a5Smrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
15751f0ac6a5Smrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
15761f0ac6a5Smrg      # If we have ksh, try running configure again with it.
15771f0ac6a5Smrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
15781f0ac6a5Smrg      export ORIGINAL_CONFIG_SHELL
15791f0ac6a5Smrg      CONFIG_SHELL=/bin/ksh
15801f0ac6a5Smrg      export CONFIG_SHELL
15811f0ac6a5Smrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
15821f0ac6a5Smrg    else
15831f0ac6a5Smrg      # Try using printf.
15841f0ac6a5Smrg      echo='printf %s\n'
15851f0ac6a5Smrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
15861f0ac6a5Smrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
15871f0ac6a5Smrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
15881f0ac6a5Smrg	# Cool, printf works
15891f0ac6a5Smrg	:
15901f0ac6a5Smrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
15911f0ac6a5Smrg	   test "X$echo_testing_string" = 'X\t' &&
15921f0ac6a5Smrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
15931f0ac6a5Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
15941f0ac6a5Smrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
15951f0ac6a5Smrg	export CONFIG_SHELL
15961f0ac6a5Smrg	SHELL="$CONFIG_SHELL"
15971f0ac6a5Smrg	export SHELL
15981f0ac6a5Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
15991f0ac6a5Smrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
16001f0ac6a5Smrg	   test "X$echo_testing_string" = 'X\t' &&
16011f0ac6a5Smrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
16021f0ac6a5Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
16031f0ac6a5Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
16041f0ac6a5Smrg      else
16051f0ac6a5Smrg	# maybe with a smaller string...
16061f0ac6a5Smrg	prev=:
16071f0ac6a5Smrg
16081f0ac6a5Smrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
16091f0ac6a5Smrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
16101f0ac6a5Smrg	  then
16111f0ac6a5Smrg	    break
16121f0ac6a5Smrg	  fi
16131f0ac6a5Smrg	  prev="$cmd"
16141f0ac6a5Smrg	done
16151f0ac6a5Smrg
16161f0ac6a5Smrg	if test "$prev" != 'sed 50q "[$]0"'; then
16171f0ac6a5Smrg	  echo_test_string=`eval $prev`
16181f0ac6a5Smrg	  export echo_test_string
16191f0ac6a5Smrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
16201f0ac6a5Smrg	else
16211f0ac6a5Smrg	  # Oops.  We lost completely, so just stick with echo.
16221f0ac6a5Smrg	  echo=echo
16231f0ac6a5Smrg	fi
16241f0ac6a5Smrg      fi
16251f0ac6a5Smrg    fi
16261f0ac6a5Smrg  fi
16271f0ac6a5Smrgfi
16281f0ac6a5Smrgfi
16291f0ac6a5Smrg
16301f0ac6a5Smrg# Copy echo and quote the copy suitably for passing to libtool from
16311f0ac6a5Smrg# the Makefile, instead of quoting the original, which is used later.
16321f0ac6a5SmrgECHO=$echo
16331f0ac6a5Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
16341f0ac6a5Smrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
16351f0ac6a5Smrgfi
16361f0ac6a5Smrg
16371f0ac6a5SmrgAC_SUBST(ECHO)
16381f0ac6a5Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH
16391f0ac6a5Smrg
16401f0ac6a5Smrg
16411f0ac6a5Smrg# _LT_AC_LOCK
16421f0ac6a5Smrg# -----------
16431f0ac6a5SmrgAC_DEFUN([_LT_AC_LOCK],
16441f0ac6a5Smrg[AC_ARG_ENABLE([libtool-lock],
16451f0ac6a5Smrg    [AC_HELP_STRING([--disable-libtool-lock],
16461f0ac6a5Smrg	[avoid locking (might break parallel builds)])])
16471f0ac6a5Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
16481f0ac6a5Smrg
16491f0ac6a5Smrg# Some flags need to be propagated to the compiler or linker for good
16501f0ac6a5Smrg# libtool support.
16511f0ac6a5Smrgcase $host in
16521f0ac6a5Smrgia64-*-hpux*)
16531f0ac6a5Smrg  # Find out which ABI we are using.
16541f0ac6a5Smrg  echo 'int i;' > conftest.$ac_ext
16551f0ac6a5Smrg  if AC_TRY_EVAL(ac_compile); then
16561f0ac6a5Smrg    case `/usr/bin/file conftest.$ac_objext` in
16571f0ac6a5Smrg    *ELF-32*)
16581f0ac6a5Smrg      HPUX_IA64_MODE="32"
16591f0ac6a5Smrg      ;;
16601f0ac6a5Smrg    *ELF-64*)
16611f0ac6a5Smrg      HPUX_IA64_MODE="64"
16621f0ac6a5Smrg      ;;
16631f0ac6a5Smrg    esac
16641f0ac6a5Smrg  fi
16651f0ac6a5Smrg  rm -rf conftest*
16661f0ac6a5Smrg  ;;
16671f0ac6a5Smrg*-*-irix6*)
16681f0ac6a5Smrg  # Find out which ABI we are using.
16691f0ac6a5Smrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
16701f0ac6a5Smrg  if AC_TRY_EVAL(ac_compile); then
16711f0ac6a5Smrg   if test "$lt_cv_prog_gnu_ld" = yes; then
16721f0ac6a5Smrg    case `/usr/bin/file conftest.$ac_objext` in
16731f0ac6a5Smrg    *32-bit*)
16741f0ac6a5Smrg      LD="${LD-ld} -melf32bsmip"
16751f0ac6a5Smrg      ;;
16761f0ac6a5Smrg    *N32*)
16771f0ac6a5Smrg      LD="${LD-ld} -melf32bmipn32"
16781f0ac6a5Smrg      ;;
16791f0ac6a5Smrg    *64-bit*)
16801f0ac6a5Smrg      LD="${LD-ld} -melf64bmip"
16811f0ac6a5Smrg      ;;
16821f0ac6a5Smrg    esac
16831f0ac6a5Smrg   else
16841f0ac6a5Smrg    case `/usr/bin/file conftest.$ac_objext` in
16851f0ac6a5Smrg    *32-bit*)
16861f0ac6a5Smrg      LD="${LD-ld} -32"
16871f0ac6a5Smrg      ;;
16881f0ac6a5Smrg    *N32*)
16891f0ac6a5Smrg      LD="${LD-ld} -n32"
16901f0ac6a5Smrg      ;;
16911f0ac6a5Smrg    *64-bit*)
16921f0ac6a5Smrg      LD="${LD-ld} -64"
16931f0ac6a5Smrg      ;;
16941f0ac6a5Smrg    esac
16951f0ac6a5Smrg   fi
16961f0ac6a5Smrg  fi
16971f0ac6a5Smrg  rm -rf conftest*
16981f0ac6a5Smrg  ;;
16991f0ac6a5Smrg
17001f0ac6a5Smrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
17011f0ac6a5Smrg  # Find out which ABI we are using.
17021f0ac6a5Smrg  echo 'int i;' > conftest.$ac_ext
17031f0ac6a5Smrg  if AC_TRY_EVAL(ac_compile); then
17041f0ac6a5Smrg    case `/usr/bin/file conftest.o` in
17051f0ac6a5Smrg    *32-bit*)
17061f0ac6a5Smrg      case $host in
17071f0ac6a5Smrg        x86_64-*linux*)
17081f0ac6a5Smrg          LD="${LD-ld} -m elf_i386"
17091f0ac6a5Smrg          ;;
17101f0ac6a5Smrg        ppc64-*linux*|powerpc64-*linux*)
17111f0ac6a5Smrg          LD="${LD-ld} -m elf32ppclinux"
17121f0ac6a5Smrg          ;;
17131f0ac6a5Smrg        s390x-*linux*)
17141f0ac6a5Smrg          LD="${LD-ld} -m elf_s390"
17151f0ac6a5Smrg          ;;
17161f0ac6a5Smrg        sparc64-*linux*)
17171f0ac6a5Smrg          LD="${LD-ld} -m elf32_sparc"
17181f0ac6a5Smrg          ;;
17191f0ac6a5Smrg      esac
17201f0ac6a5Smrg      ;;
17211f0ac6a5Smrg    *64-bit*)
17221f0ac6a5Smrg      case $host in
17231f0ac6a5Smrg        x86_64-*linux*)
17241f0ac6a5Smrg          LD="${LD-ld} -m elf_x86_64"
17251f0ac6a5Smrg          ;;
17261f0ac6a5Smrg        ppc*-*linux*|powerpc*-*linux*)
17271f0ac6a5Smrg          LD="${LD-ld} -m elf64ppc"
17281f0ac6a5Smrg          ;;
17291f0ac6a5Smrg        s390*-*linux*)
17301f0ac6a5Smrg          LD="${LD-ld} -m elf64_s390"
17311f0ac6a5Smrg          ;;
17321f0ac6a5Smrg        sparc*-*linux*)
17331f0ac6a5Smrg          LD="${LD-ld} -m elf64_sparc"
17341f0ac6a5Smrg          ;;
17351f0ac6a5Smrg      esac
17361f0ac6a5Smrg      ;;
17371f0ac6a5Smrg    esac
17381f0ac6a5Smrg  fi
17391f0ac6a5Smrg  rm -rf conftest*
17401f0ac6a5Smrg  ;;
17411f0ac6a5Smrg
17421f0ac6a5Smrg*-*-sco3.2v5*)
17431f0ac6a5Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
17441f0ac6a5Smrg  SAVE_CFLAGS="$CFLAGS"
17451f0ac6a5Smrg  CFLAGS="$CFLAGS -belf"
17461f0ac6a5Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
17471f0ac6a5Smrg    [AC_LANG_PUSH(C)
17481f0ac6a5Smrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
17491f0ac6a5Smrg     AC_LANG_POP])
17501f0ac6a5Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
17511f0ac6a5Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
17521f0ac6a5Smrg    CFLAGS="$SAVE_CFLAGS"
17531f0ac6a5Smrg  fi
17541f0ac6a5Smrg  ;;
17551f0ac6a5Smrgsparc*-*solaris*)
17561f0ac6a5Smrg  # Find out which ABI we are using.
17571f0ac6a5Smrg  echo 'int i;' > conftest.$ac_ext
17581f0ac6a5Smrg  if AC_TRY_EVAL(ac_compile); then
17591f0ac6a5Smrg    case `/usr/bin/file conftest.o` in
17601f0ac6a5Smrg    *64-bit*)
17611f0ac6a5Smrg      case $lt_cv_prog_gnu_ld in
17621f0ac6a5Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
17631f0ac6a5Smrg      *)    LD="${LD-ld} -64" ;;
17641f0ac6a5Smrg      esac
17651f0ac6a5Smrg      ;;
17661f0ac6a5Smrg    esac
17671f0ac6a5Smrg  fi
17681f0ac6a5Smrg  rm -rf conftest*
17691f0ac6a5Smrg  ;;
17701f0ac6a5Smrg
17711f0ac6a5SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
17721f0ac6a5Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
17731f0ac6a5Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
17741f0ac6a5Smrg  AC_CHECK_TOOL(AS, as, false)
17751f0ac6a5Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
17761f0ac6a5Smrg  ;;
17771f0ac6a5Smrg  ])
17781f0ac6a5Smrgesac
17791f0ac6a5Smrg
17801f0ac6a5Smrgneed_locks="$enable_libtool_lock"
17811f0ac6a5Smrg
17821f0ac6a5Smrg])# _LT_AC_LOCK
17831f0ac6a5Smrg
17841f0ac6a5Smrg
17851f0ac6a5Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
17861f0ac6a5Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
17871f0ac6a5Smrg# ----------------------------------------------------------------
17881f0ac6a5Smrg# Check whether the given compiler option works
17891f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
17901f0ac6a5Smrg[AC_REQUIRE([LT_AC_PROG_SED])
17911f0ac6a5SmrgAC_CACHE_CHECK([$1], [$2],
17921f0ac6a5Smrg  [$2=no
17931f0ac6a5Smrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
17941f0ac6a5Smrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
17951f0ac6a5Smrg   lt_compiler_flag="$3"
17961f0ac6a5Smrg   # Insert the option either (1) after the last *FLAGS variable, or
17971f0ac6a5Smrg   # (2) before a word containing "conftest.", or (3) at the end.
17981f0ac6a5Smrg   # Note that $ac_compile itself does not contain backslashes and begins
17991f0ac6a5Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
18001f0ac6a5Smrg   # The option is referenced via a variable to avoid confusing sed.
18011f0ac6a5Smrg   lt_compile=`echo "$ac_compile" | $SED \
18021f0ac6a5Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
18031f0ac6a5Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
18041f0ac6a5Smrg   -e 's:$: $lt_compiler_flag:'`
18051f0ac6a5Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
18061f0ac6a5Smrg   (eval "$lt_compile" 2>conftest.err)
18071f0ac6a5Smrg   ac_status=$?
18081f0ac6a5Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
18091f0ac6a5Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
18101f0ac6a5Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
18111f0ac6a5Smrg     # The compiler can only warn and ignore the option if not recognized
18121f0ac6a5Smrg     # So say no if there are warnings other than the usual output.
18131f0ac6a5Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
18141f0ac6a5Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
18151f0ac6a5Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
18161f0ac6a5Smrg       $2=yes
18171f0ac6a5Smrg     fi
18181f0ac6a5Smrg   fi
18191f0ac6a5Smrg   $rm conftest*
18201f0ac6a5Smrg])
18211f0ac6a5Smrg
18221f0ac6a5Smrgif test x"[$]$2" = xyes; then
18231f0ac6a5Smrg    ifelse([$5], , :, [$5])
18241f0ac6a5Smrgelse
18251f0ac6a5Smrg    ifelse([$6], , :, [$6])
18261f0ac6a5Smrgfi
18271f0ac6a5Smrg])# AC_LIBTOOL_COMPILER_OPTION
18281f0ac6a5Smrg
18291f0ac6a5Smrg
18301f0ac6a5Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
18311f0ac6a5Smrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
18321f0ac6a5Smrg# ------------------------------------------------------------
18331f0ac6a5Smrg# Check whether the given compiler option works
18341f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
18351f0ac6a5Smrg[AC_CACHE_CHECK([$1], [$2],
18361f0ac6a5Smrg  [$2=no
18371f0ac6a5Smrg   save_LDFLAGS="$LDFLAGS"
18381f0ac6a5Smrg   LDFLAGS="$LDFLAGS $3"
18391f0ac6a5Smrg   printf "$lt_simple_link_test_code" > conftest.$ac_ext
18401f0ac6a5Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
18411f0ac6a5Smrg     # The linker can only warn and ignore the option if not recognized
18421f0ac6a5Smrg     # So say no if there are warnings
18431f0ac6a5Smrg     if test -s conftest.err; then
18441f0ac6a5Smrg       # Append any errors to the config.log.
18451f0ac6a5Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
18461f0ac6a5Smrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
18471f0ac6a5Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
18481f0ac6a5Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
18491f0ac6a5Smrg         $2=yes
18501f0ac6a5Smrg       fi
18511f0ac6a5Smrg     else
18521f0ac6a5Smrg       $2=yes
18531f0ac6a5Smrg     fi
18541f0ac6a5Smrg   fi
18551f0ac6a5Smrg   $rm conftest*
18561f0ac6a5Smrg   LDFLAGS="$save_LDFLAGS"
18571f0ac6a5Smrg])
18581f0ac6a5Smrg
18591f0ac6a5Smrgif test x"[$]$2" = xyes; then
18601f0ac6a5Smrg    ifelse([$4], , :, [$4])
18611f0ac6a5Smrgelse
18621f0ac6a5Smrg    ifelse([$5], , :, [$5])
18631f0ac6a5Smrgfi
18641f0ac6a5Smrg])# AC_LIBTOOL_LINKER_OPTION
18651f0ac6a5Smrg
18661f0ac6a5Smrg
18671f0ac6a5Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
18681f0ac6a5Smrg# --------------------------
18691f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
18701f0ac6a5Smrg[# find the maximum length of command line arguments
18711f0ac6a5SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
18721f0ac6a5SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
18731f0ac6a5Smrg  i=0
18741f0ac6a5Smrg  teststring="ABCD"
18751f0ac6a5Smrg
18761f0ac6a5Smrg  case $build_os in
18771f0ac6a5Smrg  msdosdjgpp*)
18781f0ac6a5Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
18791f0ac6a5Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
18801f0ac6a5Smrg    # during glob expansion).  Even if it were fixed, the result of this
18811f0ac6a5Smrg    # check would be larger than it should be.
18821f0ac6a5Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
18831f0ac6a5Smrg    ;;
18841f0ac6a5Smrg
18851f0ac6a5Smrg  gnu*)
18861f0ac6a5Smrg    # Under GNU Hurd, this test is not required because there is
18871f0ac6a5Smrg    # no limit to the length of command line arguments.
18881f0ac6a5Smrg    # Libtool will interpret -1 as no limit whatsoever
18891f0ac6a5Smrg    lt_cv_sys_max_cmd_len=-1;
18901f0ac6a5Smrg    ;;
18911f0ac6a5Smrg
18921f0ac6a5Smrg  cygwin* | mingw*)
18931f0ac6a5Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
18941f0ac6a5Smrg    # about 5 minutes as the teststring grows exponentially.
18951f0ac6a5Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
18961f0ac6a5Smrg    # you end up with a "frozen" computer, even though with patience
18971f0ac6a5Smrg    # the test eventually succeeds (with a max line length of 256k).
18981f0ac6a5Smrg    # Instead, let's just punt: use the minimum linelength reported by
18991f0ac6a5Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
19001f0ac6a5Smrg    lt_cv_sys_max_cmd_len=8192;
19011f0ac6a5Smrg    ;;
19021f0ac6a5Smrg
19031f0ac6a5Smrg  amigaos*)
19041f0ac6a5Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
19051f0ac6a5Smrg    # So we just punt and use a minimum line length of 8192.
19061f0ac6a5Smrg    lt_cv_sys_max_cmd_len=8192;
19071f0ac6a5Smrg    ;;
19081f0ac6a5Smrg
19091f0ac6a5Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
19101f0ac6a5Smrg    # This has been around since 386BSD, at least.  Likely further.
19111f0ac6a5Smrg    if test -x /sbin/sysctl; then
19121f0ac6a5Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
19131f0ac6a5Smrg    elif test -x /usr/sbin/sysctl; then
19141f0ac6a5Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
19151f0ac6a5Smrg    else
19161f0ac6a5Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
19171f0ac6a5Smrg    fi
19181f0ac6a5Smrg    # And add a safety zone
19191f0ac6a5Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
19201f0ac6a5Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
19211f0ac6a5Smrg    ;;
19221f0ac6a5Smrg
19231f0ac6a5Smrg  interix*)
19241f0ac6a5Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
19251f0ac6a5Smrg    lt_cv_sys_max_cmd_len=196608
19261f0ac6a5Smrg    ;;
19271f0ac6a5Smrg
19281f0ac6a5Smrg  osf*)
19291f0ac6a5Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
19301f0ac6a5Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
19311f0ac6a5Smrg    # nice to cause kernel panics so lets avoid the loop below.
19321f0ac6a5Smrg    # First set a reasonable default.
19331f0ac6a5Smrg    lt_cv_sys_max_cmd_len=16384
19341f0ac6a5Smrg    #
19351f0ac6a5Smrg    if test -x /sbin/sysconfig; then
19361f0ac6a5Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
19371f0ac6a5Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
19381f0ac6a5Smrg      esac
19391f0ac6a5Smrg    fi
19401f0ac6a5Smrg    ;;
19411f0ac6a5Smrg  sco3.2v5*)
19421f0ac6a5Smrg    lt_cv_sys_max_cmd_len=102400
19431f0ac6a5Smrg    ;;
19441f0ac6a5Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
19451f0ac6a5Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
19461f0ac6a5Smrg    if test -n "$kargmax"; then
19471f0ac6a5Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
19481f0ac6a5Smrg    else
19491f0ac6a5Smrg      lt_cv_sys_max_cmd_len=32768
19501f0ac6a5Smrg    fi
19511f0ac6a5Smrg    ;;
19521f0ac6a5Smrg  *)
19531f0ac6a5Smrg    # If test is not a shell built-in, we'll probably end up computing a
19541f0ac6a5Smrg    # maximum length that is only half of the actual maximum length, but
19551f0ac6a5Smrg    # we can't tell.
19561f0ac6a5Smrg    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
19571f0ac6a5Smrg    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
19581f0ac6a5Smrg	       = "XX$teststring") >/dev/null 2>&1 &&
19591f0ac6a5Smrg	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
19601f0ac6a5Smrg	    lt_cv_sys_max_cmd_len=$new_result &&
19611f0ac6a5Smrg	    test $i != 17 # 1/2 MB should be enough
19621f0ac6a5Smrg    do
19631f0ac6a5Smrg      i=`expr $i + 1`
19641f0ac6a5Smrg      teststring=$teststring$teststring
19651f0ac6a5Smrg    done
19661f0ac6a5Smrg    teststring=
19671f0ac6a5Smrg    # Add a significant safety factor because C++ compilers can tack on massive
19681f0ac6a5Smrg    # amounts of additional arguments before passing them to the linker.
19691f0ac6a5Smrg    # It appears as though 1/2 is a usable value.
19701f0ac6a5Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
19711f0ac6a5Smrg    ;;
19721f0ac6a5Smrg  esac
19731f0ac6a5Smrg])
19741f0ac6a5Smrgif test -n $lt_cv_sys_max_cmd_len ; then
19751f0ac6a5Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
19761f0ac6a5Smrgelse
19771f0ac6a5Smrg  AC_MSG_RESULT(none)
19781f0ac6a5Smrgfi
19791f0ac6a5Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
19801f0ac6a5Smrg
19811f0ac6a5Smrg
19821f0ac6a5Smrg# _LT_AC_CHECK_DLFCN
19831f0ac6a5Smrg# ------------------
19841f0ac6a5SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
19851f0ac6a5Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl
19861f0ac6a5Smrg])# _LT_AC_CHECK_DLFCN
19871f0ac6a5Smrg
19881f0ac6a5Smrg
19891f0ac6a5Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
19901f0ac6a5Smrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
19911f0ac6a5Smrg# ---------------------------------------------------------------------
19921f0ac6a5SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
19931f0ac6a5Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
19941f0ac6a5Smrgif test "$cross_compiling" = yes; then :
19951f0ac6a5Smrg  [$4]
19961f0ac6a5Smrgelse
19971f0ac6a5Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
19981f0ac6a5Smrg  lt_status=$lt_dlunknown
19991f0ac6a5Smrg  cat > conftest.$ac_ext <<EOF
20001f0ac6a5Smrg[#line __oline__ "configure"
20011f0ac6a5Smrg#include "confdefs.h"
20021f0ac6a5Smrg
20031f0ac6a5Smrg#if HAVE_DLFCN_H
20041f0ac6a5Smrg#include <dlfcn.h>
20051f0ac6a5Smrg#endif
20061f0ac6a5Smrg
20071f0ac6a5Smrg#include <stdio.h>
20081f0ac6a5Smrg
20091f0ac6a5Smrg#ifdef RTLD_GLOBAL
20101f0ac6a5Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
20111f0ac6a5Smrg#else
20121f0ac6a5Smrg#  ifdef DL_GLOBAL
20131f0ac6a5Smrg#    define LT_DLGLOBAL		DL_GLOBAL
20141f0ac6a5Smrg#  else
20151f0ac6a5Smrg#    define LT_DLGLOBAL		0
20161f0ac6a5Smrg#  endif
20171f0ac6a5Smrg#endif
20181f0ac6a5Smrg
20191f0ac6a5Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
20201f0ac6a5Smrg   find out it does not work in some platform. */
20211f0ac6a5Smrg#ifndef LT_DLLAZY_OR_NOW
20221f0ac6a5Smrg#  ifdef RTLD_LAZY
20231f0ac6a5Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
20241f0ac6a5Smrg#  else
20251f0ac6a5Smrg#    ifdef DL_LAZY
20261f0ac6a5Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
20271f0ac6a5Smrg#    else
20281f0ac6a5Smrg#      ifdef RTLD_NOW
20291f0ac6a5Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
20301f0ac6a5Smrg#      else
20311f0ac6a5Smrg#        ifdef DL_NOW
20321f0ac6a5Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
20331f0ac6a5Smrg#        else
20341f0ac6a5Smrg#          define LT_DLLAZY_OR_NOW	0
20351f0ac6a5Smrg#        endif
20361f0ac6a5Smrg#      endif
20371f0ac6a5Smrg#    endif
20381f0ac6a5Smrg#  endif
20391f0ac6a5Smrg#endif
20401f0ac6a5Smrg
20411f0ac6a5Smrg#ifdef __cplusplus
20421f0ac6a5Smrgextern "C" void exit (int);
20431f0ac6a5Smrg#endif
20441f0ac6a5Smrg
20451f0ac6a5Smrgvoid fnord() { int i=42;}
20461f0ac6a5Smrgint main ()
20471f0ac6a5Smrg{
20481f0ac6a5Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
20491f0ac6a5Smrg  int status = $lt_dlunknown;
20501f0ac6a5Smrg
20511f0ac6a5Smrg  if (self)
20521f0ac6a5Smrg    {
20531f0ac6a5Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
20541f0ac6a5Smrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
20551f0ac6a5Smrg      /* dlclose (self); */
20561f0ac6a5Smrg    }
20571f0ac6a5Smrg  else
20581f0ac6a5Smrg    puts (dlerror ());
20591f0ac6a5Smrg
20601f0ac6a5Smrg    exit (status);
20611f0ac6a5Smrg}]
20621f0ac6a5SmrgEOF
20631f0ac6a5Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
20641f0ac6a5Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
20651f0ac6a5Smrg    lt_status=$?
20661f0ac6a5Smrg    case x$lt_status in
20671f0ac6a5Smrg      x$lt_dlno_uscore) $1 ;;
20681f0ac6a5Smrg      x$lt_dlneed_uscore) $2 ;;
20691f0ac6a5Smrg      x$lt_dlunknown|x*) $3 ;;
20701f0ac6a5Smrg    esac
20711f0ac6a5Smrg  else :
20721f0ac6a5Smrg    # compilation failed
20731f0ac6a5Smrg    $3
20741f0ac6a5Smrg  fi
20751f0ac6a5Smrgfi
20761f0ac6a5Smrgrm -fr conftest*
20771f0ac6a5Smrg])# _LT_AC_TRY_DLOPEN_SELF
20781f0ac6a5Smrg
20791f0ac6a5Smrg
20801f0ac6a5Smrg# AC_LIBTOOL_DLOPEN_SELF
20811f0ac6a5Smrg# ----------------------
20821f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
20831f0ac6a5Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
20841f0ac6a5Smrgif test "x$enable_dlopen" != xyes; then
20851f0ac6a5Smrg  enable_dlopen=unknown
20861f0ac6a5Smrg  enable_dlopen_self=unknown
20871f0ac6a5Smrg  enable_dlopen_self_static=unknown
20881f0ac6a5Smrgelse
20891f0ac6a5Smrg  lt_cv_dlopen=no
20901f0ac6a5Smrg  lt_cv_dlopen_libs=
20911f0ac6a5Smrg
20921f0ac6a5Smrg  case $host_os in
20931f0ac6a5Smrg  beos*)
20941f0ac6a5Smrg    lt_cv_dlopen="load_add_on"
20951f0ac6a5Smrg    lt_cv_dlopen_libs=
20961f0ac6a5Smrg    lt_cv_dlopen_self=yes
20971f0ac6a5Smrg    ;;
20981f0ac6a5Smrg
20991f0ac6a5Smrg  mingw* | pw32*)
21001f0ac6a5Smrg    lt_cv_dlopen="LoadLibrary"
21011f0ac6a5Smrg    lt_cv_dlopen_libs=
21021f0ac6a5Smrg   ;;
21031f0ac6a5Smrg
21041f0ac6a5Smrg  cygwin*)
21051f0ac6a5Smrg    lt_cv_dlopen="dlopen"
21061f0ac6a5Smrg    lt_cv_dlopen_libs=
21071f0ac6a5Smrg   ;;
21081f0ac6a5Smrg
21091f0ac6a5Smrg  darwin*)
21101f0ac6a5Smrg  # if libdl is installed we need to link against it
21111f0ac6a5Smrg    AC_CHECK_LIB([dl], [dlopen],
21121f0ac6a5Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
21131f0ac6a5Smrg    lt_cv_dlopen="dyld"
21141f0ac6a5Smrg    lt_cv_dlopen_libs=
21151f0ac6a5Smrg    lt_cv_dlopen_self=yes
21161f0ac6a5Smrg    ])
21171f0ac6a5Smrg   ;;
21181f0ac6a5Smrg
21191f0ac6a5Smrg  *)
21201f0ac6a5Smrg    AC_CHECK_FUNC([shl_load],
21211f0ac6a5Smrg	  [lt_cv_dlopen="shl_load"],
21221f0ac6a5Smrg      [AC_CHECK_LIB([dld], [shl_load],
21231f0ac6a5Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
21241f0ac6a5Smrg	[AC_CHECK_FUNC([dlopen],
21251f0ac6a5Smrg	      [lt_cv_dlopen="dlopen"],
21261f0ac6a5Smrg	  [AC_CHECK_LIB([dl], [dlopen],
21271f0ac6a5Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
21281f0ac6a5Smrg	    [AC_CHECK_LIB([svld], [dlopen],
21291f0ac6a5Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
21301f0ac6a5Smrg	      [AC_CHECK_LIB([dld], [dld_link],
21311f0ac6a5Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
21321f0ac6a5Smrg	      ])
21331f0ac6a5Smrg	    ])
21341f0ac6a5Smrg	  ])
21351f0ac6a5Smrg	])
21361f0ac6a5Smrg      ])
21371f0ac6a5Smrg    ;;
21381f0ac6a5Smrg  esac
21391f0ac6a5Smrg
21401f0ac6a5Smrg  if test "x$lt_cv_dlopen" != xno; then
21411f0ac6a5Smrg    enable_dlopen=yes
21421f0ac6a5Smrg  else
21431f0ac6a5Smrg    enable_dlopen=no
21441f0ac6a5Smrg  fi
21451f0ac6a5Smrg
21461f0ac6a5Smrg  case $lt_cv_dlopen in
21471f0ac6a5Smrg  dlopen)
21481f0ac6a5Smrg    save_CPPFLAGS="$CPPFLAGS"
21491f0ac6a5Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
21501f0ac6a5Smrg
21511f0ac6a5Smrg    save_LDFLAGS="$LDFLAGS"
21521f0ac6a5Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
21531f0ac6a5Smrg
21541f0ac6a5Smrg    save_LIBS="$LIBS"
21551f0ac6a5Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
21561f0ac6a5Smrg
21571f0ac6a5Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
21581f0ac6a5Smrg	  lt_cv_dlopen_self, [dnl
21591f0ac6a5Smrg	  _LT_AC_TRY_DLOPEN_SELF(
21601f0ac6a5Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
21611f0ac6a5Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
21621f0ac6a5Smrg    ])
21631f0ac6a5Smrg
21641f0ac6a5Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
21651f0ac6a5Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
21661f0ac6a5Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
21671f0ac6a5Smrg    	  lt_cv_dlopen_self_static, [dnl
21681f0ac6a5Smrg	  _LT_AC_TRY_DLOPEN_SELF(
21691f0ac6a5Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
21701f0ac6a5Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
21711f0ac6a5Smrg      ])
21721f0ac6a5Smrg    fi
21731f0ac6a5Smrg
21741f0ac6a5Smrg    CPPFLAGS="$save_CPPFLAGS"
21751f0ac6a5Smrg    LDFLAGS="$save_LDFLAGS"
21761f0ac6a5Smrg    LIBS="$save_LIBS"
21771f0ac6a5Smrg    ;;
21781f0ac6a5Smrg  esac
21791f0ac6a5Smrg
21801f0ac6a5Smrg  case $lt_cv_dlopen_self in
21811f0ac6a5Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
21821f0ac6a5Smrg  *) enable_dlopen_self=unknown ;;
21831f0ac6a5Smrg  esac
21841f0ac6a5Smrg
21851f0ac6a5Smrg  case $lt_cv_dlopen_self_static in
21861f0ac6a5Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
21871f0ac6a5Smrg  *) enable_dlopen_self_static=unknown ;;
21881f0ac6a5Smrg  esac
21891f0ac6a5Smrgfi
21901f0ac6a5Smrg])# AC_LIBTOOL_DLOPEN_SELF
21911f0ac6a5Smrg
21921f0ac6a5Smrg
21931f0ac6a5Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
21941f0ac6a5Smrg# ---------------------------------
21951f0ac6a5Smrg# Check to see if options -c and -o are simultaneously supported by compiler
21961f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
21971f0ac6a5Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
21981f0ac6a5SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
21991f0ac6a5Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
22001f0ac6a5Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
22011f0ac6a5Smrg   $rm -r conftest 2>/dev/null
22021f0ac6a5Smrg   mkdir conftest
22031f0ac6a5Smrg   cd conftest
22041f0ac6a5Smrg   mkdir out
22051f0ac6a5Smrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
22061f0ac6a5Smrg
22071f0ac6a5Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
22081f0ac6a5Smrg   # Insert the option either (1) after the last *FLAGS variable, or
22091f0ac6a5Smrg   # (2) before a word containing "conftest.", or (3) at the end.
22101f0ac6a5Smrg   # Note that $ac_compile itself does not contain backslashes and begins
22111f0ac6a5Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
22121f0ac6a5Smrg   lt_compile=`echo "$ac_compile" | $SED \
22131f0ac6a5Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
22141f0ac6a5Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
22151f0ac6a5Smrg   -e 's:$: $lt_compiler_flag:'`
22161f0ac6a5Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
22171f0ac6a5Smrg   (eval "$lt_compile" 2>out/conftest.err)
22181f0ac6a5Smrg   ac_status=$?
22191f0ac6a5Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
22201f0ac6a5Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
22211f0ac6a5Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
22221f0ac6a5Smrg   then
22231f0ac6a5Smrg     # The compiler can only warn and ignore the option if not recognized
22241f0ac6a5Smrg     # So say no if there are warnings
22251f0ac6a5Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
22261f0ac6a5Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
22271f0ac6a5Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
22281f0ac6a5Smrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
22291f0ac6a5Smrg     fi
22301f0ac6a5Smrg   fi
22311f0ac6a5Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
22321f0ac6a5Smrg   $rm conftest*
22331f0ac6a5Smrg   # SGI C++ compiler will create directory out/ii_files/ for
22341f0ac6a5Smrg   # template instantiation
22351f0ac6a5Smrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
22361f0ac6a5Smrg   $rm out/* && rmdir out
22371f0ac6a5Smrg   cd ..
22381f0ac6a5Smrg   rmdir conftest
22391f0ac6a5Smrg   $rm conftest*
22401f0ac6a5Smrg])
22411f0ac6a5Smrg])# AC_LIBTOOL_PROG_CC_C_O
22421f0ac6a5Smrg
22431f0ac6a5Smrg
22441f0ac6a5Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
22451f0ac6a5Smrg# -----------------------------------------
22461f0ac6a5Smrg# Check to see if we can do hard links to lock some files if needed
22471f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
22481f0ac6a5Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl
22491f0ac6a5Smrg
22501f0ac6a5Smrghard_links="nottested"
22511f0ac6a5Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
22521f0ac6a5Smrg  # do not overwrite the value of need_locks provided by the user
22531f0ac6a5Smrg  AC_MSG_CHECKING([if we can lock with hard links])
22541f0ac6a5Smrg  hard_links=yes
22551f0ac6a5Smrg  $rm conftest*
22561f0ac6a5Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
22571f0ac6a5Smrg  touch conftest.a
22581f0ac6a5Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
22591f0ac6a5Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
22601f0ac6a5Smrg  AC_MSG_RESULT([$hard_links])
22611f0ac6a5Smrg  if test "$hard_links" = no; then
22621f0ac6a5Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
22631f0ac6a5Smrg    need_locks=warn
22641f0ac6a5Smrg  fi
22651f0ac6a5Smrgelse
22661f0ac6a5Smrg  need_locks=no
22671f0ac6a5Smrgfi
22681f0ac6a5Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
22691f0ac6a5Smrg
22701f0ac6a5Smrg
22711f0ac6a5Smrg# AC_LIBTOOL_OBJDIR
22721f0ac6a5Smrg# -----------------
22731f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
22741f0ac6a5Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
22751f0ac6a5Smrg[rm -f .libs 2>/dev/null
22761f0ac6a5Smrgmkdir .libs 2>/dev/null
22771f0ac6a5Smrgif test -d .libs; then
22781f0ac6a5Smrg  lt_cv_objdir=.libs
22791f0ac6a5Smrgelse
22801f0ac6a5Smrg  # MS-DOS does not allow filenames that begin with a dot.
22811f0ac6a5Smrg  lt_cv_objdir=_libs
22821f0ac6a5Smrgfi
22831f0ac6a5Smrgrmdir .libs 2>/dev/null])
22841f0ac6a5Smrgobjdir=$lt_cv_objdir
22851f0ac6a5Smrg])# AC_LIBTOOL_OBJDIR
22861f0ac6a5Smrg
22871f0ac6a5Smrg
22881f0ac6a5Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
22891f0ac6a5Smrg# ----------------------------------------------
22901f0ac6a5Smrg# Check hardcoding attributes.
22911f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
22921f0ac6a5Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
22931f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_action, $1)=
22941f0ac6a5Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
22951f0ac6a5Smrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
22961f0ac6a5Smrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
22971f0ac6a5Smrg
22981f0ac6a5Smrg  # We can hardcode non-existant directories.
22991f0ac6a5Smrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
23001f0ac6a5Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
23011f0ac6a5Smrg     # have to relink, otherwise we might link with an installed library
23021f0ac6a5Smrg     # when we should be linking with a yet-to-be-installed one
23031f0ac6a5Smrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
23041f0ac6a5Smrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
23051f0ac6a5Smrg    # Linking always hardcodes the temporary library directory.
23061f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
23071f0ac6a5Smrg  else
23081f0ac6a5Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
23091f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
23101f0ac6a5Smrg  fi
23111f0ac6a5Smrgelse
23121f0ac6a5Smrg  # We cannot hardcode anything, or else we can only hardcode existing
23131f0ac6a5Smrg  # directories.
23141f0ac6a5Smrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
23151f0ac6a5Smrgfi
23161f0ac6a5SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
23171f0ac6a5Smrg
23181f0ac6a5Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
23191f0ac6a5Smrg  # Fast installation is not supported
23201f0ac6a5Smrg  enable_fast_install=no
23211f0ac6a5Smrgelif test "$shlibpath_overrides_runpath" = yes ||
23221f0ac6a5Smrg     test "$enable_shared" = no; then
23231f0ac6a5Smrg  # Fast installation is not necessary
23241f0ac6a5Smrg  enable_fast_install=needless
23251f0ac6a5Smrgfi
23261f0ac6a5Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
23271f0ac6a5Smrg
23281f0ac6a5Smrg
23291f0ac6a5Smrg# AC_LIBTOOL_SYS_LIB_STRIP
23301f0ac6a5Smrg# ------------------------
23311f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
23321f0ac6a5Smrg[striplib=
23331f0ac6a5Smrgold_striplib=
23341f0ac6a5SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
23351f0ac6a5Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
23361f0ac6a5Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
23371f0ac6a5Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
23381f0ac6a5Smrg  AC_MSG_RESULT([yes])
23391f0ac6a5Smrgelse
23401f0ac6a5Smrg# FIXME - insert some real tests, host_os isn't really good enough
23411f0ac6a5Smrg  case $host_os in
23421f0ac6a5Smrg   darwin*)
23431f0ac6a5Smrg       if test -n "$STRIP" ; then
23441f0ac6a5Smrg         striplib="$STRIP -x"
23451f0ac6a5Smrg         AC_MSG_RESULT([yes])
23461f0ac6a5Smrg       else
23471f0ac6a5Smrg  AC_MSG_RESULT([no])
23481f0ac6a5Smrgfi
23491f0ac6a5Smrg       ;;
23501f0ac6a5Smrg   *)
23511f0ac6a5Smrg  AC_MSG_RESULT([no])
23521f0ac6a5Smrg    ;;
23531f0ac6a5Smrg  esac
23541f0ac6a5Smrgfi
23551f0ac6a5Smrg])# AC_LIBTOOL_SYS_LIB_STRIP
23561f0ac6a5Smrg
23571f0ac6a5Smrg
23581f0ac6a5Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
23591f0ac6a5Smrg# -----------------------------
23601f0ac6a5Smrg# PORTME Fill in your ld.so characteristics
23611f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
23621f0ac6a5Smrg[AC_MSG_CHECKING([dynamic linker characteristics])
23631f0ac6a5Smrglibrary_names_spec=
23641f0ac6a5Smrglibname_spec='lib$name'
23651f0ac6a5Smrgsoname_spec=
23661f0ac6a5Smrgshrext_cmds=".so"
23671f0ac6a5Smrgpostinstall_cmds=
23681f0ac6a5Smrgpostuninstall_cmds=
23691f0ac6a5Smrgfinish_cmds=
23701f0ac6a5Smrgfinish_eval=
23711f0ac6a5Smrgshlibpath_var=
23721f0ac6a5Smrgshlibpath_overrides_runpath=unknown
23731f0ac6a5Smrgversion_type=none
23741f0ac6a5Smrgdynamic_linker="$host_os ld.so"
23751f0ac6a5Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
23761f0ac6a5Smrgif test "$GCC" = yes; then
23771f0ac6a5Smrg  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
23781f0ac6a5Smrg  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
23791f0ac6a5Smrg    # if the path contains ";" then we assume it to be the separator
23801f0ac6a5Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
23811f0ac6a5Smrg    # assumed that no part of a normal pathname contains ";" but that should
23821f0ac6a5Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
23831f0ac6a5Smrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
23841f0ac6a5Smrg  else
23851f0ac6a5Smrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
23861f0ac6a5Smrg  fi
23871f0ac6a5Smrgelse
23881f0ac6a5Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
23891f0ac6a5Smrgfi
23901f0ac6a5Smrgneed_lib_prefix=unknown
23911f0ac6a5Smrghardcode_into_libs=no
23921f0ac6a5Smrg
23931f0ac6a5Smrg# when you set need_version to no, make sure it does not cause -set_version
23941f0ac6a5Smrg# flags to be left without arguments
23951f0ac6a5Smrgneed_version=unknown
23961f0ac6a5Smrg
23971f0ac6a5Smrgcase $host_os in
23981f0ac6a5Smrgaix3*)
23991f0ac6a5Smrg  version_type=linux
24001f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
24011f0ac6a5Smrg  shlibpath_var=LIBPATH
24021f0ac6a5Smrg
24031f0ac6a5Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
24041f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
24051f0ac6a5Smrg  ;;
24061f0ac6a5Smrg
24071f0ac6a5Smrgaix4* | aix5*)
24081f0ac6a5Smrg  version_type=linux
24091f0ac6a5Smrg  need_lib_prefix=no
24101f0ac6a5Smrg  need_version=no
24111f0ac6a5Smrg  hardcode_into_libs=yes
24121f0ac6a5Smrg  if test "$host_cpu" = ia64; then
24131f0ac6a5Smrg    # AIX 5 supports IA64
24141f0ac6a5Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
24151f0ac6a5Smrg    shlibpath_var=LD_LIBRARY_PATH
24161f0ac6a5Smrg  else
24171f0ac6a5Smrg    # With GCC up to 2.95.x, collect2 would create an import file
24181f0ac6a5Smrg    # for dependence libraries.  The import file would start with
24191f0ac6a5Smrg    # the line `#! .'.  This would cause the generated library to
24201f0ac6a5Smrg    # depend on `.', always an invalid library.  This was fixed in
24211f0ac6a5Smrg    # development snapshots of GCC prior to 3.0.
24221f0ac6a5Smrg    case $host_os in
24231f0ac6a5Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
24241f0ac6a5Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
24251f0ac6a5Smrg	   echo ' yes '
24261f0ac6a5Smrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
24271f0ac6a5Smrg	:
24281f0ac6a5Smrg      else
24291f0ac6a5Smrg	can_build_shared=no
24301f0ac6a5Smrg      fi
24311f0ac6a5Smrg      ;;
24321f0ac6a5Smrg    esac
24331f0ac6a5Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
24341f0ac6a5Smrg    # soname into executable. Probably we can add versioning support to
24351f0ac6a5Smrg    # collect2, so additional links can be useful in future.
24361f0ac6a5Smrg    if test "$aix_use_runtimelinking" = yes; then
24371f0ac6a5Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
24381f0ac6a5Smrg      # instead of lib<name>.a to let people know that these are not
24391f0ac6a5Smrg      # typical AIX shared libraries.
24401f0ac6a5Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24411f0ac6a5Smrg    else
24421f0ac6a5Smrg      # We preserve .a as extension for shared libraries through AIX4.2
24431f0ac6a5Smrg      # and later when we are not doing run time linking.
24441f0ac6a5Smrg      library_names_spec='${libname}${release}.a $libname.a'
24451f0ac6a5Smrg      soname_spec='${libname}${release}${shared_ext}$major'
24461f0ac6a5Smrg    fi
24471f0ac6a5Smrg    shlibpath_var=LIBPATH
24481f0ac6a5Smrg  fi
24491f0ac6a5Smrg  ;;
24501f0ac6a5Smrg
24511f0ac6a5Smrgamigaos*)
24521f0ac6a5Smrg  library_names_spec='$libname.ixlibrary $libname.a'
24531f0ac6a5Smrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
24541f0ac6a5Smrg  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'
24551f0ac6a5Smrg  ;;
24561f0ac6a5Smrg
24571f0ac6a5Smrgbeos*)
24581f0ac6a5Smrg  library_names_spec='${libname}${shared_ext}'
24591f0ac6a5Smrg  dynamic_linker="$host_os ld.so"
24601f0ac6a5Smrg  shlibpath_var=LIBRARY_PATH
24611f0ac6a5Smrg  ;;
24621f0ac6a5Smrg
24631f0ac6a5Smrgbsdi[[45]]*)
24641f0ac6a5Smrg  version_type=linux
24651f0ac6a5Smrg  need_version=no
24661f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24671f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
24681f0ac6a5Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
24691f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
24701f0ac6a5Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
24711f0ac6a5Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
24721f0ac6a5Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
24731f0ac6a5Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
24741f0ac6a5Smrg  # libtool to hard-code these into programs
24751f0ac6a5Smrg  ;;
24761f0ac6a5Smrg
24771f0ac6a5Smrgcygwin* | mingw* | pw32*)
24781f0ac6a5Smrg  version_type=windows
24791f0ac6a5Smrg  shrext_cmds=".dll"
24801f0ac6a5Smrg  need_version=no
24811f0ac6a5Smrg  need_lib_prefix=no
24821f0ac6a5Smrg
24831f0ac6a5Smrg  case $GCC,$host_os in
24841f0ac6a5Smrg  yes,cygwin* | yes,mingw* | yes,pw32*)
24851f0ac6a5Smrg    library_names_spec='$libname.dll.a'
24861f0ac6a5Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
24871f0ac6a5Smrg    postinstall_cmds='base_file=`basename \${file}`~
24881f0ac6a5Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
24891f0ac6a5Smrg      dldir=$destdir/`dirname \$dlpath`~
24901f0ac6a5Smrg      test -d \$dldir || mkdir -p \$dldir~
24911f0ac6a5Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
24921f0ac6a5Smrg      chmod a+x \$dldir/$dlname'
24931f0ac6a5Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
24941f0ac6a5Smrg      dlpath=$dir/\$dldll~
24951f0ac6a5Smrg       $rm \$dlpath'
24961f0ac6a5Smrg    shlibpath_overrides_runpath=yes
24971f0ac6a5Smrg
24981f0ac6a5Smrg    case $host_os in
24991f0ac6a5Smrg    cygwin*)
25001f0ac6a5Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
25011f0ac6a5Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
25021f0ac6a5Smrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
25031f0ac6a5Smrg      ;;
25041f0ac6a5Smrg    mingw*)
25051f0ac6a5Smrg      # MinGW DLLs use traditional 'lib' prefix
25061f0ac6a5Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
25071f0ac6a5Smrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
25081f0ac6a5Smrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
25091f0ac6a5Smrg        # It is most probably a Windows format PATH printed by
25101f0ac6a5Smrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
25111f0ac6a5Smrg        # path with ; separators, and with drive letters. We can handle the
25121f0ac6a5Smrg        # drive letters (cygwin fileutils understands them), so leave them,
25131f0ac6a5Smrg        # especially as we might pass files found there to a mingw objdump,
25141f0ac6a5Smrg        # which wouldn't understand a cygwinified path. Ahh.
25151f0ac6a5Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
25161f0ac6a5Smrg      else
25171f0ac6a5Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
25181f0ac6a5Smrg      fi
25191f0ac6a5Smrg      ;;
25201f0ac6a5Smrg    pw32*)
25211f0ac6a5Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
25221f0ac6a5Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
25231f0ac6a5Smrg      ;;
25241f0ac6a5Smrg    esac
25251f0ac6a5Smrg    ;;
25261f0ac6a5Smrg
25271f0ac6a5Smrg  *)
25281f0ac6a5Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
25291f0ac6a5Smrg    ;;
25301f0ac6a5Smrg  esac
25311f0ac6a5Smrg  dynamic_linker='Win32 ld.exe'
25321f0ac6a5Smrg  # FIXME: first we should search . and the directory the executable is in
25331f0ac6a5Smrg  shlibpath_var=PATH
25341f0ac6a5Smrg  ;;
25351f0ac6a5Smrg
25361f0ac6a5Smrgdarwin* | rhapsody*)
25371f0ac6a5Smrg  dynamic_linker="$host_os dyld"
25381f0ac6a5Smrg  version_type=darwin
25391f0ac6a5Smrg  need_lib_prefix=no
25401f0ac6a5Smrg  need_version=no
25411f0ac6a5Smrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
25421f0ac6a5Smrg  soname_spec='${libname}${release}${major}$shared_ext'
25431f0ac6a5Smrg  shlibpath_overrides_runpath=yes
25441f0ac6a5Smrg  shlibpath_var=DYLD_LIBRARY_PATH
25451f0ac6a5Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
25461f0ac6a5Smrg  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
25471f0ac6a5Smrg  if test "$GCC" = yes; then
25481f0ac6a5Smrg    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
25491f0ac6a5Smrg  else
25501f0ac6a5Smrg    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
25511f0ac6a5Smrg  fi
25521f0ac6a5Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
25531f0ac6a5Smrg  ;;
25541f0ac6a5Smrg
25551f0ac6a5Smrgdgux*)
25561f0ac6a5Smrg  version_type=linux
25571f0ac6a5Smrg  need_lib_prefix=no
25581f0ac6a5Smrg  need_version=no
25591f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
25601f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
25611f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
25621f0ac6a5Smrg  ;;
25631f0ac6a5Smrg
25641f0ac6a5Smrgfreebsd1*)
25651f0ac6a5Smrg  dynamic_linker=no
25661f0ac6a5Smrg  ;;
25671f0ac6a5Smrg
25681f0ac6a5Smrgkfreebsd*-gnu)
25691f0ac6a5Smrg  version_type=linux
25701f0ac6a5Smrg  need_lib_prefix=no
25711f0ac6a5Smrg  need_version=no
25721f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
25731f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
25741f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
25751f0ac6a5Smrg  shlibpath_overrides_runpath=no
25761f0ac6a5Smrg  hardcode_into_libs=yes
25771f0ac6a5Smrg  dynamic_linker='GNU ld.so'
25781f0ac6a5Smrg  ;;
25791f0ac6a5Smrg
25801f0ac6a5Smrgfreebsd* | dragonfly*)
25811f0ac6a5Smrg  # DragonFly does not have aout.  When/if they implement a new
25821f0ac6a5Smrg  # versioning mechanism, adjust this.
25831f0ac6a5Smrg  if test -x /usr/bin/objformat; then
25841f0ac6a5Smrg    objformat=`/usr/bin/objformat`
25851f0ac6a5Smrg  else
25861f0ac6a5Smrg    case $host_os in
25871f0ac6a5Smrg    freebsd[[123]]*) objformat=aout ;;
25881f0ac6a5Smrg    *) objformat=elf ;;
25891f0ac6a5Smrg    esac
25901f0ac6a5Smrg  fi
25911f0ac6a5Smrg  version_type=freebsd-$objformat
25921f0ac6a5Smrg  case $version_type in
25931f0ac6a5Smrg    freebsd-elf*)
25941f0ac6a5Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
25951f0ac6a5Smrg      need_version=no
25961f0ac6a5Smrg      need_lib_prefix=no
25971f0ac6a5Smrg      ;;
25981f0ac6a5Smrg    freebsd-*)
25991f0ac6a5Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
26001f0ac6a5Smrg      need_version=yes
26011f0ac6a5Smrg      ;;
26021f0ac6a5Smrg  esac
26031f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
26041f0ac6a5Smrg  case $host_os in
26051f0ac6a5Smrg  freebsd2*)
26061f0ac6a5Smrg    shlibpath_overrides_runpath=yes
26071f0ac6a5Smrg    ;;
26081f0ac6a5Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
26091f0ac6a5Smrg    shlibpath_overrides_runpath=yes
26101f0ac6a5Smrg    hardcode_into_libs=yes
26111f0ac6a5Smrg    ;;
26121f0ac6a5Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
26131f0ac6a5Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
26141f0ac6a5Smrg    shlibpath_overrides_runpath=no
26151f0ac6a5Smrg    hardcode_into_libs=yes
26161f0ac6a5Smrg    ;;
26171f0ac6a5Smrg  freebsd*) # from 4.6 on
26181f0ac6a5Smrg    shlibpath_overrides_runpath=yes
26191f0ac6a5Smrg    hardcode_into_libs=yes
26201f0ac6a5Smrg    ;;
26211f0ac6a5Smrg  esac
26221f0ac6a5Smrg  ;;
26231f0ac6a5Smrg
26241f0ac6a5Smrggnu*)
26251f0ac6a5Smrg  version_type=linux
26261f0ac6a5Smrg  need_lib_prefix=no
26271f0ac6a5Smrg  need_version=no
26281f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
26291f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
26301f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
26311f0ac6a5Smrg  hardcode_into_libs=yes
26321f0ac6a5Smrg  ;;
26331f0ac6a5Smrg
26341f0ac6a5Smrghpux9* | hpux10* | hpux11*)
26351f0ac6a5Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
26361f0ac6a5Smrg  # link against other versions.
26371f0ac6a5Smrg  version_type=sunos
26381f0ac6a5Smrg  need_lib_prefix=no
26391f0ac6a5Smrg  need_version=no
26401f0ac6a5Smrg  case $host_cpu in
26411f0ac6a5Smrg  ia64*)
26421f0ac6a5Smrg    shrext_cmds='.so'
26431f0ac6a5Smrg    hardcode_into_libs=yes
26441f0ac6a5Smrg    dynamic_linker="$host_os dld.so"
26451f0ac6a5Smrg    shlibpath_var=LD_LIBRARY_PATH
26461f0ac6a5Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
26471f0ac6a5Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26481f0ac6a5Smrg    soname_spec='${libname}${release}${shared_ext}$major'
26491f0ac6a5Smrg    if test "X$HPUX_IA64_MODE" = X32; then
26501f0ac6a5Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
26511f0ac6a5Smrg    else
26521f0ac6a5Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
26531f0ac6a5Smrg    fi
26541f0ac6a5Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
26551f0ac6a5Smrg    ;;
26561f0ac6a5Smrg   hppa*64*)
26571f0ac6a5Smrg     shrext_cmds='.sl'
26581f0ac6a5Smrg     hardcode_into_libs=yes
26591f0ac6a5Smrg     dynamic_linker="$host_os dld.sl"
26601f0ac6a5Smrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
26611f0ac6a5Smrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
26621f0ac6a5Smrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26631f0ac6a5Smrg     soname_spec='${libname}${release}${shared_ext}$major'
26641f0ac6a5Smrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
26651f0ac6a5Smrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
26661f0ac6a5Smrg     ;;
26671f0ac6a5Smrg   *)
26681f0ac6a5Smrg    shrext_cmds='.sl'
26691f0ac6a5Smrg    dynamic_linker="$host_os dld.sl"
26701f0ac6a5Smrg    shlibpath_var=SHLIB_PATH
26711f0ac6a5Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
26721f0ac6a5Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26731f0ac6a5Smrg    soname_spec='${libname}${release}${shared_ext}$major'
26741f0ac6a5Smrg    ;;
26751f0ac6a5Smrg  esac
26761f0ac6a5Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
26771f0ac6a5Smrg  postinstall_cmds='chmod 555 $lib'
26781f0ac6a5Smrg  ;;
26791f0ac6a5Smrg
26801f0ac6a5Smrginterix3*)
26811f0ac6a5Smrg  version_type=linux
26821f0ac6a5Smrg  need_lib_prefix=no
26831f0ac6a5Smrg  need_version=no
26841f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
26851f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
26861f0ac6a5Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
26871f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
26881f0ac6a5Smrg  shlibpath_overrides_runpath=no
26891f0ac6a5Smrg  hardcode_into_libs=yes
26901f0ac6a5Smrg  ;;
26911f0ac6a5Smrg
26921f0ac6a5Smrgirix5* | irix6* | nonstopux*)
26931f0ac6a5Smrg  case $host_os in
26941f0ac6a5Smrg    nonstopux*) version_type=nonstopux ;;
26951f0ac6a5Smrg    *)
26961f0ac6a5Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
26971f0ac6a5Smrg		version_type=linux
26981f0ac6a5Smrg	else
26991f0ac6a5Smrg		version_type=irix
27001f0ac6a5Smrg	fi ;;
27011f0ac6a5Smrg  esac
27021f0ac6a5Smrg  need_lib_prefix=no
27031f0ac6a5Smrg  need_version=no
27041f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
27051f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
27061f0ac6a5Smrg  case $host_os in
27071f0ac6a5Smrg  irix5* | nonstopux*)
27081f0ac6a5Smrg    libsuff= shlibsuff=
27091f0ac6a5Smrg    ;;
27101f0ac6a5Smrg  *)
27111f0ac6a5Smrg    case $LD in # libtool.m4 will add one of these switches to LD
27121f0ac6a5Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
27131f0ac6a5Smrg      libsuff= shlibsuff= libmagic=32-bit;;
27141f0ac6a5Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
27151f0ac6a5Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
27161f0ac6a5Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
27171f0ac6a5Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
27181f0ac6a5Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
27191f0ac6a5Smrg    esac
27201f0ac6a5Smrg    ;;
27211f0ac6a5Smrg  esac
27221f0ac6a5Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
27231f0ac6a5Smrg  shlibpath_overrides_runpath=no
27241f0ac6a5Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
27251f0ac6a5Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
27261f0ac6a5Smrg  hardcode_into_libs=yes
27271f0ac6a5Smrg  ;;
27281f0ac6a5Smrg
27291f0ac6a5Smrg# No shared lib support for Linux oldld, aout, or coff.
27301f0ac6a5Smrglinux*oldld* | linux*aout* | linux*coff*)
27311f0ac6a5Smrg  dynamic_linker=no
27321f0ac6a5Smrg  ;;
27331f0ac6a5Smrg
27341f0ac6a5Smrg# This must be Linux ELF.
27351f0ac6a5Smrglinux*)
27361f0ac6a5Smrg  version_type=linux
27371f0ac6a5Smrg  need_lib_prefix=no
27381f0ac6a5Smrg  need_version=no
27391f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
27401f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
27411f0ac6a5Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
27421f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
27431f0ac6a5Smrg  shlibpath_overrides_runpath=no
27441f0ac6a5Smrg  # This implies no fast_install, which is unacceptable.
27451f0ac6a5Smrg  # Some rework will be needed to allow for fast_install
27461f0ac6a5Smrg  # before this can be enabled.
27471f0ac6a5Smrg  hardcode_into_libs=yes
27481f0ac6a5Smrg
27491f0ac6a5Smrg  # Append ld.so.conf contents to the search path
27501f0ac6a5Smrg  if test -f /etc/ld.so.conf; then
27511f0ac6a5Smrg    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
27521f0ac6a5Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
27531f0ac6a5Smrg  fi
27541f0ac6a5Smrg
27551f0ac6a5Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
27561f0ac6a5Smrg  # powerpc, because MkLinux only supported shared libraries with the
27571f0ac6a5Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
27581f0ac6a5Smrg  # most powerpc-linux boxes support dynamic linking these days and
27591f0ac6a5Smrg  # people can always --disable-shared, the test was removed, and we
27601f0ac6a5Smrg  # assume the GNU/Linux dynamic linker is in use.
27611f0ac6a5Smrg  dynamic_linker='GNU/Linux ld.so'
27621f0ac6a5Smrg  ;;
27631f0ac6a5Smrg
27641f0ac6a5Smrgknetbsd*-gnu)
27651f0ac6a5Smrg  version_type=linux
27661f0ac6a5Smrg  need_lib_prefix=no
27671f0ac6a5Smrg  need_version=no
27681f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
27691f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
27701f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
27711f0ac6a5Smrg  shlibpath_overrides_runpath=no
27721f0ac6a5Smrg  hardcode_into_libs=yes
27731f0ac6a5Smrg  dynamic_linker='GNU ld.so'
27741f0ac6a5Smrg  ;;
27751f0ac6a5Smrg
27761f0ac6a5Smrgnetbsd*)
27771f0ac6a5Smrg  version_type=sunos
27781f0ac6a5Smrg  need_lib_prefix=no
27791f0ac6a5Smrg  need_version=no
27801f0ac6a5Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
27811f0ac6a5Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
27821f0ac6a5Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
27831f0ac6a5Smrg    dynamic_linker='NetBSD (a.out) ld.so'
27841f0ac6a5Smrg  else
27851f0ac6a5Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
27861f0ac6a5Smrg    soname_spec='${libname}${release}${shared_ext}$major'
27871f0ac6a5Smrg    dynamic_linker='NetBSD ld.elf_so'
27881f0ac6a5Smrg  fi
27891f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
27901f0ac6a5Smrg  shlibpath_overrides_runpath=yes
27911f0ac6a5Smrg  hardcode_into_libs=yes
27921f0ac6a5Smrg  ;;
27931f0ac6a5Smrg
27941f0ac6a5Smrgnewsos6)
27951f0ac6a5Smrg  version_type=linux
27961f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
27971f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
27981f0ac6a5Smrg  shlibpath_overrides_runpath=yes
27991f0ac6a5Smrg  ;;
28001f0ac6a5Smrg
28011f0ac6a5Smrgnto-qnx*)
28021f0ac6a5Smrg  version_type=linux
28031f0ac6a5Smrg  need_lib_prefix=no
28041f0ac6a5Smrg  need_version=no
28051f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
28061f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
28071f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
28081f0ac6a5Smrg  shlibpath_overrides_runpath=yes
28091f0ac6a5Smrg  ;;
28101f0ac6a5Smrg
28111f0ac6a5Smrgopenbsd*)
28121f0ac6a5Smrg  version_type=sunos
28131f0ac6a5Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
28141f0ac6a5Smrg  need_lib_prefix=no
28151f0ac6a5Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
28161f0ac6a5Smrg  case $host_os in
28171f0ac6a5Smrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
28181f0ac6a5Smrg    *)                         need_version=no  ;;
28191f0ac6a5Smrg  esac
28201f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
28211f0ac6a5Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
28221f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
28231f0ac6a5Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
28241f0ac6a5Smrg    case $host_os in
28251f0ac6a5Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
28261f0ac6a5Smrg	shlibpath_overrides_runpath=no
28271f0ac6a5Smrg	;;
28281f0ac6a5Smrg      *)
28291f0ac6a5Smrg	shlibpath_overrides_runpath=yes
28301f0ac6a5Smrg	;;
28311f0ac6a5Smrg      esac
28321f0ac6a5Smrg  else
28331f0ac6a5Smrg    shlibpath_overrides_runpath=yes
28341f0ac6a5Smrg  fi
28351f0ac6a5Smrg  ;;
28361f0ac6a5Smrg
28371f0ac6a5Smrgos2*)
28381f0ac6a5Smrg  libname_spec='$name'
28391f0ac6a5Smrg  shrext_cmds=".dll"
28401f0ac6a5Smrg  need_lib_prefix=no
28411f0ac6a5Smrg  library_names_spec='$libname${shared_ext} $libname.a'
28421f0ac6a5Smrg  dynamic_linker='OS/2 ld.exe'
28431f0ac6a5Smrg  shlibpath_var=LIBPATH
28441f0ac6a5Smrg  ;;
28451f0ac6a5Smrg
28461f0ac6a5Smrgosf3* | osf4* | osf5*)
28471f0ac6a5Smrg  version_type=osf
28481f0ac6a5Smrg  need_lib_prefix=no
28491f0ac6a5Smrg  need_version=no
28501f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
28511f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
28521f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
28531f0ac6a5Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
28541f0ac6a5Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
28551f0ac6a5Smrg  ;;
28561f0ac6a5Smrg
28571f0ac6a5Smrgsolaris*)
28581f0ac6a5Smrg  version_type=linux
28591f0ac6a5Smrg  need_lib_prefix=no
28601f0ac6a5Smrg  need_version=no
28611f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
28621f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
28631f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
28641f0ac6a5Smrg  shlibpath_overrides_runpath=yes
28651f0ac6a5Smrg  hardcode_into_libs=yes
28661f0ac6a5Smrg  # ldd complains unless libraries are executable
28671f0ac6a5Smrg  postinstall_cmds='chmod +x $lib'
28681f0ac6a5Smrg  ;;
28691f0ac6a5Smrg
28701f0ac6a5Smrgsunos4*)
28711f0ac6a5Smrg  version_type=sunos
28721f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
28731f0ac6a5Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
28741f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
28751f0ac6a5Smrg  shlibpath_overrides_runpath=yes
28761f0ac6a5Smrg  if test "$with_gnu_ld" = yes; then
28771f0ac6a5Smrg    need_lib_prefix=no
28781f0ac6a5Smrg  fi
28791f0ac6a5Smrg  need_version=yes
28801f0ac6a5Smrg  ;;
28811f0ac6a5Smrg
28821f0ac6a5Smrgsysv4 | sysv4.3*)
28831f0ac6a5Smrg  version_type=linux
28841f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
28851f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
28861f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
28871f0ac6a5Smrg  case $host_vendor in
28881f0ac6a5Smrg    sni)
28891f0ac6a5Smrg      shlibpath_overrides_runpath=no
28901f0ac6a5Smrg      need_lib_prefix=no
28911f0ac6a5Smrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
28921f0ac6a5Smrg      runpath_var=LD_RUN_PATH
28931f0ac6a5Smrg      ;;
28941f0ac6a5Smrg    siemens)
28951f0ac6a5Smrg      need_lib_prefix=no
28961f0ac6a5Smrg      ;;
28971f0ac6a5Smrg    motorola)
28981f0ac6a5Smrg      need_lib_prefix=no
28991f0ac6a5Smrg      need_version=no
29001f0ac6a5Smrg      shlibpath_overrides_runpath=no
29011f0ac6a5Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
29021f0ac6a5Smrg      ;;
29031f0ac6a5Smrg  esac
29041f0ac6a5Smrg  ;;
29051f0ac6a5Smrg
29061f0ac6a5Smrgsysv4*MP*)
29071f0ac6a5Smrg  if test -d /usr/nec ;then
29081f0ac6a5Smrg    version_type=linux
29091f0ac6a5Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
29101f0ac6a5Smrg    soname_spec='$libname${shared_ext}.$major'
29111f0ac6a5Smrg    shlibpath_var=LD_LIBRARY_PATH
29121f0ac6a5Smrg  fi
29131f0ac6a5Smrg  ;;
29141f0ac6a5Smrg
29151f0ac6a5Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
29161f0ac6a5Smrg  version_type=freebsd-elf
29171f0ac6a5Smrg  need_lib_prefix=no
29181f0ac6a5Smrg  need_version=no
29191f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
29201f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
29211f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
29221f0ac6a5Smrg  hardcode_into_libs=yes
29231f0ac6a5Smrg  if test "$with_gnu_ld" = yes; then
29241f0ac6a5Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
29251f0ac6a5Smrg    shlibpath_overrides_runpath=no
29261f0ac6a5Smrg  else
29271f0ac6a5Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
29281f0ac6a5Smrg    shlibpath_overrides_runpath=yes
29291f0ac6a5Smrg    case $host_os in
29301f0ac6a5Smrg      sco3.2v5*)
29311f0ac6a5Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
29321f0ac6a5Smrg	;;
29331f0ac6a5Smrg    esac
29341f0ac6a5Smrg  fi
29351f0ac6a5Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
29361f0ac6a5Smrg  ;;
29371f0ac6a5Smrg
29381f0ac6a5Smrguts4*)
29391f0ac6a5Smrg  version_type=linux
29401f0ac6a5Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29411f0ac6a5Smrg  soname_spec='${libname}${release}${shared_ext}$major'
29421f0ac6a5Smrg  shlibpath_var=LD_LIBRARY_PATH
29431f0ac6a5Smrg  ;;
29441f0ac6a5Smrg
29451f0ac6a5Smrg*)
29461f0ac6a5Smrg  dynamic_linker=no
29471f0ac6a5Smrg  ;;
29481f0ac6a5Smrgesac
29491f0ac6a5SmrgAC_MSG_RESULT([$dynamic_linker])
29501f0ac6a5Smrgtest "$dynamic_linker" = no && can_build_shared=no
29511f0ac6a5Smrg
29521f0ac6a5Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
29531f0ac6a5Smrgif test "$GCC" = yes; then
29541f0ac6a5Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
29551f0ac6a5Smrgfi
29561f0ac6a5Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
29571f0ac6a5Smrg
29581f0ac6a5Smrg
29591f0ac6a5Smrg# _LT_AC_TAGCONFIG
29601f0ac6a5Smrg# ----------------
29611f0ac6a5SmrgAC_DEFUN([_LT_AC_TAGCONFIG],
29621f0ac6a5Smrg[AC_ARG_WITH([tags],
29631f0ac6a5Smrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
29641f0ac6a5Smrg        [include additional configurations @<:@automatic@:>@])],
29651f0ac6a5Smrg    [tagnames="$withval"])
29661f0ac6a5Smrg
29671f0ac6a5Smrgif test -f "$ltmain" && test -n "$tagnames"; then
29681f0ac6a5Smrg  if test ! -f "${ofile}"; then
29691f0ac6a5Smrg    AC_MSG_WARN([output file `$ofile' does not exist])
29701f0ac6a5Smrg  fi
29711f0ac6a5Smrg
29721f0ac6a5Smrg  if test -z "$LTCC"; then
29731f0ac6a5Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
29741f0ac6a5Smrg    if test -z "$LTCC"; then
29751f0ac6a5Smrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
29761f0ac6a5Smrg    else
29771f0ac6a5Smrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
29781f0ac6a5Smrg    fi
29791f0ac6a5Smrg  fi
29801f0ac6a5Smrg  if test -z "$LTCFLAGS"; then
29811f0ac6a5Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
29821f0ac6a5Smrg  fi
29831f0ac6a5Smrg
29841f0ac6a5Smrg  # Extract list of available tagged configurations in $ofile.
29851f0ac6a5Smrg  # Note that this assumes the entire list is on one line.
29861f0ac6a5Smrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
29871f0ac6a5Smrg
29881f0ac6a5Smrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
29891f0ac6a5Smrg  for tagname in $tagnames; do
29901f0ac6a5Smrg    IFS="$lt_save_ifs"
29911f0ac6a5Smrg    # Check whether tagname contains only valid characters
29921f0ac6a5Smrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
29931f0ac6a5Smrg    "") ;;
29941f0ac6a5Smrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
29951f0ac6a5Smrg	;;
29961f0ac6a5Smrg    esac
29971f0ac6a5Smrg
29981f0ac6a5Smrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
29991f0ac6a5Smrg    then
30001f0ac6a5Smrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
30011f0ac6a5Smrg    fi
30021f0ac6a5Smrg
30031f0ac6a5Smrg    # Update the list of available tags.
30041f0ac6a5Smrg    if test -n "$tagname"; then
30051f0ac6a5Smrg      echo appending configuration tag \"$tagname\" to $ofile
30061f0ac6a5Smrg
30071f0ac6a5Smrg      case $tagname in
30081f0ac6a5Smrg      CXX)
30091f0ac6a5Smrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
30101f0ac6a5Smrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
30111f0ac6a5Smrg	    (test "X$CXX" != "Xg++"))) ; then
30121f0ac6a5Smrg	  AC_LIBTOOL_LANG_CXX_CONFIG
30131f0ac6a5Smrg	else
30141f0ac6a5Smrg	  tagname=""
30151f0ac6a5Smrg	fi
30161f0ac6a5Smrg	;;
30171f0ac6a5Smrg
30181f0ac6a5Smrg      F77)
30191f0ac6a5Smrg	if test -n "$F77" && test "X$F77" != "Xno"; then
30201f0ac6a5Smrg	  AC_LIBTOOL_LANG_F77_CONFIG
30211f0ac6a5Smrg	else
30221f0ac6a5Smrg	  tagname=""
30231f0ac6a5Smrg	fi
30241f0ac6a5Smrg	;;
30251f0ac6a5Smrg
30261f0ac6a5Smrg      GCJ)
30271f0ac6a5Smrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
30281f0ac6a5Smrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
30291f0ac6a5Smrg	else
30301f0ac6a5Smrg	  tagname=""
30311f0ac6a5Smrg	fi
30321f0ac6a5Smrg	;;
30331f0ac6a5Smrg
30341f0ac6a5Smrg      RC)
30351f0ac6a5Smrg	AC_LIBTOOL_LANG_RC_CONFIG
30361f0ac6a5Smrg	;;
30371f0ac6a5Smrg
30381f0ac6a5Smrg      *)
30391f0ac6a5Smrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
30401f0ac6a5Smrg	;;
30411f0ac6a5Smrg      esac
30421f0ac6a5Smrg
30431f0ac6a5Smrg      # Append the new tag name to the list of available tags.
30441f0ac6a5Smrg      if test -n "$tagname" ; then
30451f0ac6a5Smrg      available_tags="$available_tags $tagname"
30461f0ac6a5Smrg    fi
30471f0ac6a5Smrg    fi
30481f0ac6a5Smrg  done
30491f0ac6a5Smrg  IFS="$lt_save_ifs"
30501f0ac6a5Smrg
30511f0ac6a5Smrg  # Now substitute the updated list of available tags.
30521f0ac6a5Smrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
30531f0ac6a5Smrg    mv "${ofile}T" "$ofile"
30541f0ac6a5Smrg    chmod +x "$ofile"
30551f0ac6a5Smrg  else
30561f0ac6a5Smrg    rm -f "${ofile}T"
30571f0ac6a5Smrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
30581f0ac6a5Smrg  fi
30591f0ac6a5Smrgfi
30601f0ac6a5Smrg])# _LT_AC_TAGCONFIG
30611f0ac6a5Smrg
30621f0ac6a5Smrg
30631f0ac6a5Smrg# AC_LIBTOOL_DLOPEN
30641f0ac6a5Smrg# -----------------
30651f0ac6a5Smrg# enable checks for dlopen support
30661f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
30671f0ac6a5Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
30681f0ac6a5Smrg])# AC_LIBTOOL_DLOPEN
30691f0ac6a5Smrg
30701f0ac6a5Smrg
30711f0ac6a5Smrg# AC_LIBTOOL_WIN32_DLL
30721f0ac6a5Smrg# --------------------
30731f0ac6a5Smrg# declare package support for building win32 DLLs
30741f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
30751f0ac6a5Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
30761f0ac6a5Smrg])# AC_LIBTOOL_WIN32_DLL
30771f0ac6a5Smrg
30781f0ac6a5Smrg
30791f0ac6a5Smrg# AC_ENABLE_SHARED([DEFAULT])
30801f0ac6a5Smrg# ---------------------------
30811f0ac6a5Smrg# implement the --enable-shared flag
30821f0ac6a5Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
30831f0ac6a5SmrgAC_DEFUN([AC_ENABLE_SHARED],
30841f0ac6a5Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
30851f0ac6a5SmrgAC_ARG_ENABLE([shared],
30861f0ac6a5Smrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
30871f0ac6a5Smrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
30881f0ac6a5Smrg    [p=${PACKAGE-default}
30891f0ac6a5Smrg    case $enableval in
30901f0ac6a5Smrg    yes) enable_shared=yes ;;
30911f0ac6a5Smrg    no) enable_shared=no ;;
30921f0ac6a5Smrg    *)
30931f0ac6a5Smrg      enable_shared=no
30941f0ac6a5Smrg      # Look at the argument we got.  We use all the common list separators.
30951f0ac6a5Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
30961f0ac6a5Smrg      for pkg in $enableval; do
30971f0ac6a5Smrg	IFS="$lt_save_ifs"
30981f0ac6a5Smrg	if test "X$pkg" = "X$p"; then
30991f0ac6a5Smrg	  enable_shared=yes
31001f0ac6a5Smrg	fi
31011f0ac6a5Smrg      done
31021f0ac6a5Smrg      IFS="$lt_save_ifs"
31031f0ac6a5Smrg      ;;
31041f0ac6a5Smrg    esac],
31051f0ac6a5Smrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
31061f0ac6a5Smrg])# AC_ENABLE_SHARED
31071f0ac6a5Smrg
31081f0ac6a5Smrg
31091f0ac6a5Smrg# AC_DISABLE_SHARED
31101f0ac6a5Smrg# -----------------
31111f0ac6a5Smrg# set the default shared flag to --disable-shared
31121f0ac6a5SmrgAC_DEFUN([AC_DISABLE_SHARED],
31131f0ac6a5Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
31141f0ac6a5SmrgAC_ENABLE_SHARED(no)
31151f0ac6a5Smrg])# AC_DISABLE_SHARED
31161f0ac6a5Smrg
31171f0ac6a5Smrg
31181f0ac6a5Smrg# AC_ENABLE_STATIC([DEFAULT])
31191f0ac6a5Smrg# ---------------------------
31201f0ac6a5Smrg# implement the --enable-static flag
31211f0ac6a5Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
31221f0ac6a5SmrgAC_DEFUN([AC_ENABLE_STATIC],
31231f0ac6a5Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
31241f0ac6a5SmrgAC_ARG_ENABLE([static],
31251f0ac6a5Smrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
31261f0ac6a5Smrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
31271f0ac6a5Smrg    [p=${PACKAGE-default}
31281f0ac6a5Smrg    case $enableval in
31291f0ac6a5Smrg    yes) enable_static=yes ;;
31301f0ac6a5Smrg    no) enable_static=no ;;
31311f0ac6a5Smrg    *)
31321f0ac6a5Smrg     enable_static=no
31331f0ac6a5Smrg      # Look at the argument we got.  We use all the common list separators.
31341f0ac6a5Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
31351f0ac6a5Smrg      for pkg in $enableval; do
31361f0ac6a5Smrg	IFS="$lt_save_ifs"
31371f0ac6a5Smrg	if test "X$pkg" = "X$p"; then
31381f0ac6a5Smrg	  enable_static=yes
31391f0ac6a5Smrg	fi
31401f0ac6a5Smrg      done
31411f0ac6a5Smrg      IFS="$lt_save_ifs"
31421f0ac6a5Smrg      ;;
31431f0ac6a5Smrg    esac],
31441f0ac6a5Smrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
31451f0ac6a5Smrg])# AC_ENABLE_STATIC
31461f0ac6a5Smrg
31471f0ac6a5Smrg
31481f0ac6a5Smrg# AC_DISABLE_STATIC
31491f0ac6a5Smrg# -----------------
31501f0ac6a5Smrg# set the default static flag to --disable-static
31511f0ac6a5SmrgAC_DEFUN([AC_DISABLE_STATIC],
31521f0ac6a5Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
31531f0ac6a5SmrgAC_ENABLE_STATIC(no)
31541f0ac6a5Smrg])# AC_DISABLE_STATIC
31551f0ac6a5Smrg
31561f0ac6a5Smrg
31571f0ac6a5Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
31581f0ac6a5Smrg# ---------------------------------
31591f0ac6a5Smrg# implement the --enable-fast-install flag
31601f0ac6a5Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
31611f0ac6a5SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
31621f0ac6a5Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
31631f0ac6a5SmrgAC_ARG_ENABLE([fast-install],
31641f0ac6a5Smrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
31651f0ac6a5Smrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
31661f0ac6a5Smrg    [p=${PACKAGE-default}
31671f0ac6a5Smrg    case $enableval in
31681f0ac6a5Smrg    yes) enable_fast_install=yes ;;
31691f0ac6a5Smrg    no) enable_fast_install=no ;;
31701f0ac6a5Smrg    *)
31711f0ac6a5Smrg      enable_fast_install=no
31721f0ac6a5Smrg      # Look at the argument we got.  We use all the common list separators.
31731f0ac6a5Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
31741f0ac6a5Smrg      for pkg in $enableval; do
31751f0ac6a5Smrg	IFS="$lt_save_ifs"
31761f0ac6a5Smrg	if test "X$pkg" = "X$p"; then
31771f0ac6a5Smrg	  enable_fast_install=yes
31781f0ac6a5Smrg	fi
31791f0ac6a5Smrg      done
31801f0ac6a5Smrg      IFS="$lt_save_ifs"
31811f0ac6a5Smrg      ;;
31821f0ac6a5Smrg    esac],
31831f0ac6a5Smrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
31841f0ac6a5Smrg])# AC_ENABLE_FAST_INSTALL
31851f0ac6a5Smrg
31861f0ac6a5Smrg
31871f0ac6a5Smrg# AC_DISABLE_FAST_INSTALL
31881f0ac6a5Smrg# -----------------------
31891f0ac6a5Smrg# set the default to --disable-fast-install
31901f0ac6a5SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
31911f0ac6a5Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
31921f0ac6a5SmrgAC_ENABLE_FAST_INSTALL(no)
31931f0ac6a5Smrg])# AC_DISABLE_FAST_INSTALL
31941f0ac6a5Smrg
31951f0ac6a5Smrg
31961f0ac6a5Smrg# AC_LIBTOOL_PICMODE([MODE])
31971f0ac6a5Smrg# --------------------------
31981f0ac6a5Smrg# implement the --with-pic flag
31991f0ac6a5Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
32001f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
32011f0ac6a5Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
32021f0ac6a5Smrgpic_mode=ifelse($#,1,$1,default)
32031f0ac6a5Smrg])# AC_LIBTOOL_PICMODE
32041f0ac6a5Smrg
32051f0ac6a5Smrg
32061f0ac6a5Smrg# AC_PROG_EGREP
32071f0ac6a5Smrg# -------------
32081f0ac6a5Smrg# This is predefined starting with Autoconf 2.54, so this conditional
32091f0ac6a5Smrg# definition can be removed once we require Autoconf 2.54 or later.
32101f0ac6a5Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
32111f0ac6a5Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
32121f0ac6a5Smrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
32131f0ac6a5Smrg    then ac_cv_prog_egrep='grep -E'
32141f0ac6a5Smrg    else ac_cv_prog_egrep='egrep'
32151f0ac6a5Smrg    fi])
32161f0ac6a5Smrg EGREP=$ac_cv_prog_egrep
32171f0ac6a5Smrg AC_SUBST([EGREP])
32181f0ac6a5Smrg])])
32191f0ac6a5Smrg
32201f0ac6a5Smrg
32211f0ac6a5Smrg# AC_PATH_TOOL_PREFIX
32221f0ac6a5Smrg# -------------------
32231f0ac6a5Smrg# find a file program which can recognise shared library
32241f0ac6a5SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
32251f0ac6a5Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
32261f0ac6a5SmrgAC_MSG_CHECKING([for $1])
32271f0ac6a5SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
32281f0ac6a5Smrg[case $MAGIC_CMD in
32291f0ac6a5Smrg[[\\/*] |  ?:[\\/]*])
32301f0ac6a5Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
32311f0ac6a5Smrg  ;;
32321f0ac6a5Smrg*)
32331f0ac6a5Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
32341f0ac6a5Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
32351f0ac6a5Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
32361f0ac6a5Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
32371f0ac6a5Smrgdnl not every word.  This closes a longstanding sh security hole.
32381f0ac6a5Smrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
32391f0ac6a5Smrg  for ac_dir in $ac_dummy; do
32401f0ac6a5Smrg    IFS="$lt_save_ifs"
32411f0ac6a5Smrg    test -z "$ac_dir" && ac_dir=.
32421f0ac6a5Smrg    if test -f $ac_dir/$1; then
32431f0ac6a5Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
32441f0ac6a5Smrg      if test -n "$file_magic_test_file"; then
32451f0ac6a5Smrg	case $deplibs_check_method in
32461f0ac6a5Smrg	"file_magic "*)
32471f0ac6a5Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
32481f0ac6a5Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
32491f0ac6a5Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
32501f0ac6a5Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
32511f0ac6a5Smrg	    :
32521f0ac6a5Smrg	  else
32531f0ac6a5Smrg	    cat <<EOF 1>&2
32541f0ac6a5Smrg
32551f0ac6a5Smrg*** Warning: the command libtool uses to detect shared libraries,
32561f0ac6a5Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
32571f0ac6a5Smrg*** The result is that libtool may fail to recognize shared libraries
32581f0ac6a5Smrg*** as such.  This will affect the creation of libtool libraries that
32591f0ac6a5Smrg*** depend on shared libraries, but programs linked with such libtool
32601f0ac6a5Smrg*** libraries will work regardless of this problem.  Nevertheless, you
32611f0ac6a5Smrg*** may want to report the problem to your system manager and/or to
32621f0ac6a5Smrg*** bug-libtool@gnu.org
32631f0ac6a5Smrg
32641f0ac6a5SmrgEOF
32651f0ac6a5Smrg	  fi ;;
32661f0ac6a5Smrg	esac
32671f0ac6a5Smrg      fi
32681f0ac6a5Smrg      break
32691f0ac6a5Smrg    fi
32701f0ac6a5Smrg  done
32711f0ac6a5Smrg  IFS="$lt_save_ifs"
32721f0ac6a5Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
32731f0ac6a5Smrg  ;;
32741f0ac6a5Smrgesac])
32751f0ac6a5SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
32761f0ac6a5Smrgif test -n "$MAGIC_CMD"; then
32771f0ac6a5Smrg  AC_MSG_RESULT($MAGIC_CMD)
32781f0ac6a5Smrgelse
32791f0ac6a5Smrg  AC_MSG_RESULT(no)
32801f0ac6a5Smrgfi
32811f0ac6a5Smrg])# AC_PATH_TOOL_PREFIX
32821f0ac6a5Smrg
32831f0ac6a5Smrg
32841f0ac6a5Smrg# AC_PATH_MAGIC
32851f0ac6a5Smrg# -------------
32861f0ac6a5Smrg# find a file program which can recognise a shared library
32871f0ac6a5SmrgAC_DEFUN([AC_PATH_MAGIC],
32881f0ac6a5Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
32891f0ac6a5Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
32901f0ac6a5Smrg  if test -n "$ac_tool_prefix"; then
32911f0ac6a5Smrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
32921f0ac6a5Smrg  else
32931f0ac6a5Smrg    MAGIC_CMD=:
32941f0ac6a5Smrg  fi
32951f0ac6a5Smrgfi
32961f0ac6a5Smrg])# AC_PATH_MAGIC
32971f0ac6a5Smrg
32981f0ac6a5Smrg
32991f0ac6a5Smrg# AC_PROG_LD
33001f0ac6a5Smrg# ----------
33011f0ac6a5Smrg# find the pathname to the GNU or non-GNU linker
33021f0ac6a5SmrgAC_DEFUN([AC_PROG_LD],
33031f0ac6a5Smrg[AC_ARG_WITH([gnu-ld],
33041f0ac6a5Smrg    [AC_HELP_STRING([--with-gnu-ld],
33051f0ac6a5Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
33061f0ac6a5Smrg    [test "$withval" = no || with_gnu_ld=yes],
33071f0ac6a5Smrg    [with_gnu_ld=no])
33081f0ac6a5SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
33091f0ac6a5SmrgAC_REQUIRE([AC_PROG_CC])dnl
33101f0ac6a5SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
33111f0ac6a5SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
33121f0ac6a5Smrgac_prog=ld
33131f0ac6a5Smrgif test "$GCC" = yes; then
33141f0ac6a5Smrg  # Check if gcc -print-prog-name=ld gives a path.
33151f0ac6a5Smrg  AC_MSG_CHECKING([for ld used by $CC])
33161f0ac6a5Smrg  case $host in
33171f0ac6a5Smrg  *-*-mingw*)
33181f0ac6a5Smrg    # gcc leaves a trailing carriage return which upsets mingw
33191f0ac6a5Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
33201f0ac6a5Smrg  *)
33211f0ac6a5Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
33221f0ac6a5Smrg  esac
33231f0ac6a5Smrg  case $ac_prog in
33241f0ac6a5Smrg    # Accept absolute paths.
33251f0ac6a5Smrg    [[\\/]]* | ?:[[\\/]]*)
33261f0ac6a5Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
33271f0ac6a5Smrg      # Canonicalize the pathname of ld
33281f0ac6a5Smrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
33291f0ac6a5Smrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
33301f0ac6a5Smrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
33311f0ac6a5Smrg      done
33321f0ac6a5Smrg      test -z "$LD" && LD="$ac_prog"
33331f0ac6a5Smrg      ;;
33341f0ac6a5Smrg  "")
33351f0ac6a5Smrg    # If it fails, then pretend we aren't using GCC.
33361f0ac6a5Smrg    ac_prog=ld
33371f0ac6a5Smrg    ;;
33381f0ac6a5Smrg  *)
33391f0ac6a5Smrg    # If it is relative, then search for the first ld in PATH.
33401f0ac6a5Smrg    with_gnu_ld=unknown
33411f0ac6a5Smrg    ;;
33421f0ac6a5Smrg  esac
33431f0ac6a5Smrgelif test "$with_gnu_ld" = yes; then
33441f0ac6a5Smrg  AC_MSG_CHECKING([for GNU ld])
33451f0ac6a5Smrgelse
33461f0ac6a5Smrg  AC_MSG_CHECKING([for non-GNU ld])
33471f0ac6a5Smrgfi
33481f0ac6a5SmrgAC_CACHE_VAL(lt_cv_path_LD,
33491f0ac6a5Smrg[if test -z "$LD"; then
33501f0ac6a5Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
33511f0ac6a5Smrg  for ac_dir in $PATH; do
33521f0ac6a5Smrg    IFS="$lt_save_ifs"
33531f0ac6a5Smrg    test -z "$ac_dir" && ac_dir=.
33541f0ac6a5Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
33551f0ac6a5Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
33561f0ac6a5Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
33571f0ac6a5Smrg      # but apparently some variants of GNU ld only accept -v.
33581f0ac6a5Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
33591f0ac6a5Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
33601f0ac6a5Smrg      *GNU* | *'with BFD'*)
33611f0ac6a5Smrg	test "$with_gnu_ld" != no && break
33621f0ac6a5Smrg	;;
33631f0ac6a5Smrg      *)
33641f0ac6a5Smrg	test "$with_gnu_ld" != yes && break
33651f0ac6a5Smrg	;;
33661f0ac6a5Smrg      esac
33671f0ac6a5Smrg    fi
33681f0ac6a5Smrg  done
33691f0ac6a5Smrg  IFS="$lt_save_ifs"
33701f0ac6a5Smrgelse
33711f0ac6a5Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
33721f0ac6a5Smrgfi])
33731f0ac6a5SmrgLD="$lt_cv_path_LD"
33741f0ac6a5Smrgif test -n "$LD"; then
33751f0ac6a5Smrg  AC_MSG_RESULT($LD)
33761f0ac6a5Smrgelse
33771f0ac6a5Smrg  AC_MSG_RESULT(no)
33781f0ac6a5Smrgfi
33791f0ac6a5Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
33801f0ac6a5SmrgAC_PROG_LD_GNU
33811f0ac6a5Smrg])# AC_PROG_LD
33821f0ac6a5Smrg
33831f0ac6a5Smrg
33841f0ac6a5Smrg# AC_PROG_LD_GNU
33851f0ac6a5Smrg# --------------
33861f0ac6a5SmrgAC_DEFUN([AC_PROG_LD_GNU],
33871f0ac6a5Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
33881f0ac6a5SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
33891f0ac6a5Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
33901f0ac6a5Smrgcase `$LD -v 2>&1 </dev/null` in
33911f0ac6a5Smrg*GNU* | *'with BFD'*)
33921f0ac6a5Smrg  lt_cv_prog_gnu_ld=yes
33931f0ac6a5Smrg  ;;
33941f0ac6a5Smrg*)
33951f0ac6a5Smrg  lt_cv_prog_gnu_ld=no
33961f0ac6a5Smrg  ;;
33971f0ac6a5Smrgesac])
33981f0ac6a5Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
33991f0ac6a5Smrg])# AC_PROG_LD_GNU
34001f0ac6a5Smrg
34011f0ac6a5Smrg
34021f0ac6a5Smrg# AC_PROG_LD_RELOAD_FLAG
34031f0ac6a5Smrg# ----------------------
34041f0ac6a5Smrg# find reload flag for linker
34051f0ac6a5Smrg#   -- PORTME Some linkers may need a different reload flag.
34061f0ac6a5SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
34071f0ac6a5Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
34081f0ac6a5Smrg  lt_cv_ld_reload_flag,
34091f0ac6a5Smrg  [lt_cv_ld_reload_flag='-r'])
34101f0ac6a5Smrgreload_flag=$lt_cv_ld_reload_flag
34111f0ac6a5Smrgcase $reload_flag in
34121f0ac6a5Smrg"" | " "*) ;;
34131f0ac6a5Smrg*) reload_flag=" $reload_flag" ;;
34141f0ac6a5Smrgesac
34151f0ac6a5Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
34161f0ac6a5Smrgcase $host_os in
34171f0ac6a5Smrg  darwin*)
34181f0ac6a5Smrg    if test "$GCC" = yes; then
34191f0ac6a5Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
34201f0ac6a5Smrg    else
34211f0ac6a5Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
34221f0ac6a5Smrg    fi
34231f0ac6a5Smrg    ;;
34241f0ac6a5Smrgesac
34251f0ac6a5Smrg])# AC_PROG_LD_RELOAD_FLAG
34261f0ac6a5Smrg
34271f0ac6a5Smrg
34281f0ac6a5Smrg# AC_DEPLIBS_CHECK_METHOD
34291f0ac6a5Smrg# -----------------------
34301f0ac6a5Smrg# how to check for library dependencies
34311f0ac6a5Smrg#  -- PORTME fill in with the dynamic library characteristics
34321f0ac6a5SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
34331f0ac6a5Smrg[AC_CACHE_CHECK([how to recognise dependent libraries],
34341f0ac6a5Smrglt_cv_deplibs_check_method,
34351f0ac6a5Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
34361f0ac6a5Smrglt_cv_file_magic_test_file=
34371f0ac6a5Smrglt_cv_deplibs_check_method='unknown'
34381f0ac6a5Smrg# Need to set the preceding variable on all platforms that support
34391f0ac6a5Smrg# interlibrary dependencies.
34401f0ac6a5Smrg# 'none' -- dependencies not supported.
34411f0ac6a5Smrg# `unknown' -- same as none, but documents that we really don't know.
34421f0ac6a5Smrg# 'pass_all' -- all dependencies passed with no checks.
34431f0ac6a5Smrg# 'test_compile' -- check by making test program.
34441f0ac6a5Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
34451f0ac6a5Smrg# which responds to the $file_magic_cmd with a given extended regex.
34461f0ac6a5Smrg# If you have `file' or equivalent on your system and you're not sure
34471f0ac6a5Smrg# whether `pass_all' will *always* work, you probably want this one.
34481f0ac6a5Smrg
34491f0ac6a5Smrgcase $host_os in
34501f0ac6a5Smrgaix4* | aix5*)
34511f0ac6a5Smrg  lt_cv_deplibs_check_method=pass_all
34521f0ac6a5Smrg  ;;
34531f0ac6a5Smrg
34541f0ac6a5Smrgbeos*)
34551f0ac6a5Smrg  lt_cv_deplibs_check_method=pass_all
34561f0ac6a5Smrg  ;;
34571f0ac6a5Smrg
34581f0ac6a5Smrgbsdi[[45]]*)
34591f0ac6a5Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
34601f0ac6a5Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
34611f0ac6a5Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
34621f0ac6a5Smrg  ;;
34631f0ac6a5Smrg
34641f0ac6a5Smrgcygwin*)
34651f0ac6a5Smrg  # func_win32_libid is a shell function defined in ltmain.sh
34661f0ac6a5Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
34671f0ac6a5Smrg  lt_cv_file_magic_cmd='func_win32_libid'
34681f0ac6a5Smrg  ;;
34691f0ac6a5Smrg
34701f0ac6a5Smrgmingw* | pw32*)
34711f0ac6a5Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
34721f0ac6a5Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
34731f0ac6a5Smrg  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
34741f0ac6a5Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
34751f0ac6a5Smrg  ;;
34761f0ac6a5Smrg
34771f0ac6a5Smrgdarwin* | rhapsody*)
34781f0ac6a5Smrg  lt_cv_deplibs_check_method=pass_all
34791f0ac6a5Smrg  ;;
34801f0ac6a5Smrg
34811f0ac6a5Smrgfreebsd* | kfreebsd*-gnu | dragonfly*)
34821f0ac6a5Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
34831f0ac6a5Smrg    case $host_cpu in
34841f0ac6a5Smrg    i*86 )
34851f0ac6a5Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
34861f0ac6a5Smrg      # Let's accept both of them until this is cleared up.
34871f0ac6a5Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
34881f0ac6a5Smrg      lt_cv_file_magic_cmd=/usr/bin/file
34891f0ac6a5Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
34901f0ac6a5Smrg      ;;
34911f0ac6a5Smrg    esac
34921f0ac6a5Smrg  else
34931f0ac6a5Smrg    lt_cv_deplibs_check_method=pass_all
34941f0ac6a5Smrg  fi
34951f0ac6a5Smrg  ;;
34961f0ac6a5Smrg
34971f0ac6a5Smrggnu*)
34981f0ac6a5Smrg  lt_cv_deplibs_check_method=pass_all
34991f0ac6a5Smrg  ;;
35001f0ac6a5Smrg
35011f0ac6a5Smrghpux10.20* | hpux11*)
35021f0ac6a5Smrg  lt_cv_file_magic_cmd=/usr/bin/file
35031f0ac6a5Smrg  case $host_cpu in
35041f0ac6a5Smrg  ia64*)
35051f0ac6a5Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
35061f0ac6a5Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
35071f0ac6a5Smrg    ;;
35081f0ac6a5Smrg  hppa*64*)
35091f0ac6a5Smrg    [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]']
35101f0ac6a5Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
35111f0ac6a5Smrg    ;;
35121f0ac6a5Smrg  *)
35131f0ac6a5Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
35141f0ac6a5Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
35151f0ac6a5Smrg    ;;
35161f0ac6a5Smrg  esac
35171f0ac6a5Smrg  ;;
35181f0ac6a5Smrg
35191f0ac6a5Smrginterix3*)
35201f0ac6a5Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
35211f0ac6a5Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
35221f0ac6a5Smrg  ;;
35231f0ac6a5Smrg
35241f0ac6a5Smrgirix5* | irix6* | nonstopux*)
35251f0ac6a5Smrg  case $LD in
35261f0ac6a5Smrg  *-32|*"-32 ") libmagic=32-bit;;
35271f0ac6a5Smrg  *-n32|*"-n32 ") libmagic=N32;;
35281f0ac6a5Smrg  *-64|*"-64 ") libmagic=64-bit;;
35291f0ac6a5Smrg  *) libmagic=never-match;;
35301f0ac6a5Smrg  esac
35311f0ac6a5Smrg  lt_cv_deplibs_check_method=pass_all
35321f0ac6a5Smrg  ;;
35331f0ac6a5Smrg
35341f0ac6a5Smrg# This must be Linux ELF.
35351f0ac6a5Smrglinux*)
35361f0ac6a5Smrg  lt_cv_deplibs_check_method=pass_all
35371f0ac6a5Smrg  ;;
35381f0ac6a5Smrg
35391f0ac6a5Smrgnetbsd*)
35401f0ac6a5Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
35411f0ac6a5Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
35421f0ac6a5Smrg  else
35431f0ac6a5Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
35441f0ac6a5Smrg  fi
35451f0ac6a5Smrg  ;;
35461f0ac6a5Smrg
35471f0ac6a5Smrgnewos6*)
35481f0ac6a5Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
35491f0ac6a5Smrg  lt_cv_file_magic_cmd=/usr/bin/file
35501f0ac6a5Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
35511f0ac6a5Smrg  ;;
35521f0ac6a5Smrg
35531f0ac6a5Smrgnto-qnx*)
35541f0ac6a5Smrg  lt_cv_deplibs_check_method=unknown
35551f0ac6a5Smrg  ;;
35561f0ac6a5Smrg
35571f0ac6a5Smrgopenbsd*)
35581f0ac6a5Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
35591f0ac6a5Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
35601f0ac6a5Smrg  else
35611f0ac6a5Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
35621f0ac6a5Smrg  fi
35631f0ac6a5Smrg  ;;
35641f0ac6a5Smrg
35651f0ac6a5Smrgosf3* | osf4* | osf5*)
35661f0ac6a5Smrg  lt_cv_deplibs_check_method=pass_all
35671f0ac6a5Smrg  ;;
35681f0ac6a5Smrg
35691f0ac6a5Smrgsolaris*)
35701f0ac6a5Smrg  lt_cv_deplibs_check_method=pass_all
35711f0ac6a5Smrg  ;;
35721f0ac6a5Smrg
35731f0ac6a5Smrgsysv4 | sysv4.3*)
35741f0ac6a5Smrg  case $host_vendor in
35751f0ac6a5Smrg  motorola)
35761f0ac6a5Smrg    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]]'
35771f0ac6a5Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
35781f0ac6a5Smrg    ;;
35791f0ac6a5Smrg  ncr)
35801f0ac6a5Smrg    lt_cv_deplibs_check_method=pass_all
35811f0ac6a5Smrg    ;;
35821f0ac6a5Smrg  sequent)
35831f0ac6a5Smrg    lt_cv_file_magic_cmd='/bin/file'
35841f0ac6a5Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
35851f0ac6a5Smrg    ;;
35861f0ac6a5Smrg  sni)
35871f0ac6a5Smrg    lt_cv_file_magic_cmd='/bin/file'
35881f0ac6a5Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
35891f0ac6a5Smrg    lt_cv_file_magic_test_file=/lib/libc.so
35901f0ac6a5Smrg    ;;
35911f0ac6a5Smrg  siemens)
35921f0ac6a5Smrg    lt_cv_deplibs_check_method=pass_all
35931f0ac6a5Smrg    ;;
35941f0ac6a5Smrg  pc)
35951f0ac6a5Smrg    lt_cv_deplibs_check_method=pass_all
35961f0ac6a5Smrg    ;;
35971f0ac6a5Smrg  esac
35981f0ac6a5Smrg  ;;
35991f0ac6a5Smrg
36001f0ac6a5Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
36011f0ac6a5Smrg  lt_cv_deplibs_check_method=pass_all
36021f0ac6a5Smrg  ;;
36031f0ac6a5Smrgesac
36041f0ac6a5Smrg])
36051f0ac6a5Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
36061f0ac6a5Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
36071f0ac6a5Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
36081f0ac6a5Smrg])# AC_DEPLIBS_CHECK_METHOD
36091f0ac6a5Smrg
36101f0ac6a5Smrg
36111f0ac6a5Smrg# AC_PROG_NM
36121f0ac6a5Smrg# ----------
36131f0ac6a5Smrg# find the pathname to a BSD-compatible name lister
36141f0ac6a5SmrgAC_DEFUN([AC_PROG_NM],
36151f0ac6a5Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
36161f0ac6a5Smrg[if test -n "$NM"; then
36171f0ac6a5Smrg  # Let the user override the test.
36181f0ac6a5Smrg  lt_cv_path_NM="$NM"
36191f0ac6a5Smrgelse
36201f0ac6a5Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
36211f0ac6a5Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
36221f0ac6a5Smrg    lt_nm_to_check="$lt_nm_to_check nm"
36231f0ac6a5Smrg  fi
36241f0ac6a5Smrg  for lt_tmp_nm in $lt_nm_to_check; do
36251f0ac6a5Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
36261f0ac6a5Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
36271f0ac6a5Smrg      IFS="$lt_save_ifs"
36281f0ac6a5Smrg      test -z "$ac_dir" && ac_dir=.
36291f0ac6a5Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
36301f0ac6a5Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
36311f0ac6a5Smrg	# Check to see if the nm accepts a BSD-compat flag.
36321f0ac6a5Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
36331f0ac6a5Smrg	#   nm: unknown option "B" ignored
36341f0ac6a5Smrg	# Tru64's nm complains that /dev/null is an invalid object file
36351f0ac6a5Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
36361f0ac6a5Smrg	*/dev/null* | *'Invalid file or object type'*)
36371f0ac6a5Smrg	  lt_cv_path_NM="$tmp_nm -B"
36381f0ac6a5Smrg	  break
36391f0ac6a5Smrg	  ;;
36401f0ac6a5Smrg	*)
36411f0ac6a5Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
36421f0ac6a5Smrg	  */dev/null*)
36431f0ac6a5Smrg	    lt_cv_path_NM="$tmp_nm -p"
36441f0ac6a5Smrg	    break
36451f0ac6a5Smrg	    ;;
36461f0ac6a5Smrg	  *)
36471f0ac6a5Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
36481f0ac6a5Smrg	    continue # so that we can try to find one that supports BSD flags
36491f0ac6a5Smrg	    ;;
36501f0ac6a5Smrg	  esac
36511f0ac6a5Smrg	  ;;
36521f0ac6a5Smrg	esac
36531f0ac6a5Smrg      fi
36541f0ac6a5Smrg    done
36551f0ac6a5Smrg    IFS="$lt_save_ifs"
36561f0ac6a5Smrg  done
36571f0ac6a5Smrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
36581f0ac6a5Smrgfi])
36591f0ac6a5SmrgNM="$lt_cv_path_NM"
36601f0ac6a5Smrg])# AC_PROG_NM
36611f0ac6a5Smrg
36621f0ac6a5Smrg
36631f0ac6a5Smrg# AC_CHECK_LIBM
36641f0ac6a5Smrg# -------------
36651f0ac6a5Smrg# check for math library
36661f0ac6a5SmrgAC_DEFUN([AC_CHECK_LIBM],
36671f0ac6a5Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
36681f0ac6a5SmrgLIBM=
36691f0ac6a5Smrgcase $host in
36701f0ac6a5Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
36711f0ac6a5Smrg  # These system don't have libm, or don't need it
36721f0ac6a5Smrg  ;;
36731f0ac6a5Smrg*-ncr-sysv4.3*)
36741f0ac6a5Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
36751f0ac6a5Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
36761f0ac6a5Smrg  ;;
36771f0ac6a5Smrg*)
36781f0ac6a5Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
36791f0ac6a5Smrg  ;;
36801f0ac6a5Smrgesac
36811f0ac6a5Smrg])# AC_CHECK_LIBM
36821f0ac6a5Smrg
36831f0ac6a5Smrg
36841f0ac6a5Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
36851f0ac6a5Smrg# -----------------------------------
36861f0ac6a5Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and
36871f0ac6a5Smrg# LTDLINCL to the include flags for the libltdl header and adds
36881f0ac6a5Smrg# --enable-ltdl-convenience to the configure arguments.  Note that
36891f0ac6a5Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
36901f0ac6a5Smrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
36911f0ac6a5Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
36921f0ac6a5Smrg# (note the single quotes!).  If your package is not flat and you're not
36931f0ac6a5Smrg# using automake, define top_builddir and top_srcdir appropriately in
36941f0ac6a5Smrg# the Makefiles.
36951f0ac6a5SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
36961f0ac6a5Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
36971f0ac6a5Smrg  case $enable_ltdl_convenience in
36981f0ac6a5Smrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
36991f0ac6a5Smrg  "") enable_ltdl_convenience=yes
37001f0ac6a5Smrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
37011f0ac6a5Smrg  esac
37021f0ac6a5Smrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
37031f0ac6a5Smrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
37041f0ac6a5Smrg  # For backwards non-gettext consistent compatibility...
37051f0ac6a5Smrg  INCLTDL="$LTDLINCL"
37061f0ac6a5Smrg])# AC_LIBLTDL_CONVENIENCE
37071f0ac6a5Smrg
37081f0ac6a5Smrg
37091f0ac6a5Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
37101f0ac6a5Smrg# -----------------------------------
37111f0ac6a5Smrg# sets LIBLTDL to the link flags for the libltdl installable library and
37121f0ac6a5Smrg# LTDLINCL to the include flags for the libltdl header and adds
37131f0ac6a5Smrg# --enable-ltdl-install to the configure arguments.  Note that
37141f0ac6a5Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
37151f0ac6a5Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
37161f0ac6a5Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
37171f0ac6a5Smrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
37181f0ac6a5Smrg# flat and you're not using automake, define top_builddir and top_srcdir
37191f0ac6a5Smrg# appropriately in the Makefiles.
37201f0ac6a5Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
37211f0ac6a5SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
37221f0ac6a5Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
37231f0ac6a5Smrg  AC_CHECK_LIB(ltdl, lt_dlinit,
37241f0ac6a5Smrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
37251f0ac6a5Smrg  [if test x"$enable_ltdl_install" = xno; then
37261f0ac6a5Smrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
37271f0ac6a5Smrg   else
37281f0ac6a5Smrg     enable_ltdl_install=yes
37291f0ac6a5Smrg   fi
37301f0ac6a5Smrg  ])
37311f0ac6a5Smrg  if test x"$enable_ltdl_install" = x"yes"; then
37321f0ac6a5Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
37331f0ac6a5Smrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
37341f0ac6a5Smrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
37351f0ac6a5Smrg  else
37361f0ac6a5Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
37371f0ac6a5Smrg    LIBLTDL="-lltdl"
37381f0ac6a5Smrg    LTDLINCL=
37391f0ac6a5Smrg  fi
37401f0ac6a5Smrg  # For backwards non-gettext consistent compatibility...
37411f0ac6a5Smrg  INCLTDL="$LTDLINCL"
37421f0ac6a5Smrg])# AC_LIBLTDL_INSTALLABLE
37431f0ac6a5Smrg
37441f0ac6a5Smrg
37451f0ac6a5Smrg# AC_LIBTOOL_CXX
37461f0ac6a5Smrg# --------------
37471f0ac6a5Smrg# enable support for C++ libraries
37481f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_CXX],
37491f0ac6a5Smrg[AC_REQUIRE([_LT_AC_LANG_CXX])
37501f0ac6a5Smrg])# AC_LIBTOOL_CXX
37511f0ac6a5Smrg
37521f0ac6a5Smrg
37531f0ac6a5Smrg# _LT_AC_LANG_CXX
37541f0ac6a5Smrg# ---------------
37551f0ac6a5SmrgAC_DEFUN([_LT_AC_LANG_CXX],
37561f0ac6a5Smrg[AC_REQUIRE([AC_PROG_CXX])
37571f0ac6a5SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
37581f0ac6a5Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
37591f0ac6a5Smrg])# _LT_AC_LANG_CXX
37601f0ac6a5Smrg
37611f0ac6a5Smrg# _LT_AC_PROG_CXXCPP
37621f0ac6a5Smrg# ------------------
37631f0ac6a5SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
37641f0ac6a5Smrg[
37651f0ac6a5SmrgAC_REQUIRE([AC_PROG_CXX])
37661f0ac6a5Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
37671f0ac6a5Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
37681f0ac6a5Smrg    (test "X$CXX" != "Xg++"))) ; then
37691f0ac6a5Smrg  AC_PROG_CXXCPP
37701f0ac6a5Smrgfi
37711f0ac6a5Smrg])# _LT_AC_PROG_CXXCPP
37721f0ac6a5Smrg
37731f0ac6a5Smrg# AC_LIBTOOL_F77
37741f0ac6a5Smrg# --------------
37751f0ac6a5Smrg# enable support for Fortran 77 libraries
37761f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_F77],
37771f0ac6a5Smrg[AC_REQUIRE([_LT_AC_LANG_F77])
37781f0ac6a5Smrg])# AC_LIBTOOL_F77
37791f0ac6a5Smrg
37801f0ac6a5Smrg
37811f0ac6a5Smrg# _LT_AC_LANG_F77
37821f0ac6a5Smrg# ---------------
37831f0ac6a5SmrgAC_DEFUN([_LT_AC_LANG_F77],
37841f0ac6a5Smrg[AC_REQUIRE([AC_PROG_F77])
37851f0ac6a5Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
37861f0ac6a5Smrg])# _LT_AC_LANG_F77
37871f0ac6a5Smrg
37881f0ac6a5Smrg
37891f0ac6a5Smrg# AC_LIBTOOL_GCJ
37901f0ac6a5Smrg# --------------
37911f0ac6a5Smrg# enable support for GCJ libraries
37921f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_GCJ],
37931f0ac6a5Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
37941f0ac6a5Smrg])# AC_LIBTOOL_GCJ
37951f0ac6a5Smrg
37961f0ac6a5Smrg
37971f0ac6a5Smrg# _LT_AC_LANG_GCJ
37981f0ac6a5Smrg# ---------------
37991f0ac6a5SmrgAC_DEFUN([_LT_AC_LANG_GCJ],
38001f0ac6a5Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
38011f0ac6a5Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
38021f0ac6a5Smrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
38031f0ac6a5Smrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
38041f0ac6a5Smrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
38051f0ac6a5Smrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
38061f0ac6a5Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
38071f0ac6a5Smrg])# _LT_AC_LANG_GCJ
38081f0ac6a5Smrg
38091f0ac6a5Smrg
38101f0ac6a5Smrg# AC_LIBTOOL_RC
38111f0ac6a5Smrg# -------------
38121f0ac6a5Smrg# enable support for Windows resource files
38131f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_RC],
38141f0ac6a5Smrg[AC_REQUIRE([LT_AC_PROG_RC])
38151f0ac6a5Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
38161f0ac6a5Smrg])# AC_LIBTOOL_RC
38171f0ac6a5Smrg
38181f0ac6a5Smrg
38191f0ac6a5Smrg# AC_LIBTOOL_LANG_C_CONFIG
38201f0ac6a5Smrg# ------------------------
38211f0ac6a5Smrg# Ensure that the configuration vars for the C compiler are
38221f0ac6a5Smrg# suitably defined.  Those variables are subsequently used by
38231f0ac6a5Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
38241f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
38251f0ac6a5SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
38261f0ac6a5Smrg[lt_save_CC="$CC"
38271f0ac6a5SmrgAC_LANG_PUSH(C)
38281f0ac6a5Smrg
38291f0ac6a5Smrg# Source file extension for C test sources.
38301f0ac6a5Smrgac_ext=c
38311f0ac6a5Smrg
38321f0ac6a5Smrg# Object file extension for compiled C test sources.
38331f0ac6a5Smrgobjext=o
38341f0ac6a5Smrg_LT_AC_TAGVAR(objext, $1)=$objext
38351f0ac6a5Smrg
38361f0ac6a5Smrg# Code to be used in simple compile tests
38371f0ac6a5Smrglt_simple_compile_test_code="int some_variable = 0;\n"
38381f0ac6a5Smrg
38391f0ac6a5Smrg# Code to be used in simple link tests
38401f0ac6a5Smrglt_simple_link_test_code='int main(){return(0);}\n'
38411f0ac6a5Smrg
38421f0ac6a5Smrg_LT_AC_SYS_COMPILER
38431f0ac6a5Smrg
38441f0ac6a5Smrg# save warnings/boilerplate of simple test code
38451f0ac6a5Smrg_LT_COMPILER_BOILERPLATE
38461f0ac6a5Smrg_LT_LINKER_BOILERPLATE
38471f0ac6a5Smrg
38481f0ac6a5SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
38491f0ac6a5SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
38501f0ac6a5SmrgAC_LIBTOOL_PROG_CC_C_O($1)
38511f0ac6a5SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
38521f0ac6a5SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
38531f0ac6a5SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
38541f0ac6a5SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
38551f0ac6a5SmrgAC_LIBTOOL_SYS_LIB_STRIP
38561f0ac6a5SmrgAC_LIBTOOL_DLOPEN_SELF
38571f0ac6a5Smrg
38581f0ac6a5Smrg# Report which library types will actually be built
38591f0ac6a5SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
38601f0ac6a5SmrgAC_MSG_RESULT([$can_build_shared])
38611f0ac6a5Smrg
38621f0ac6a5SmrgAC_MSG_CHECKING([whether to build shared libraries])
38631f0ac6a5Smrgtest "$can_build_shared" = "no" && enable_shared=no
38641f0ac6a5Smrg
38651f0ac6a5Smrg# On AIX, shared libraries and static libraries use the same namespace, and
38661f0ac6a5Smrg# are all built from PIC.
38671f0ac6a5Smrgcase $host_os in
38681f0ac6a5Smrgaix3*)
38691f0ac6a5Smrg  test "$enable_shared" = yes && enable_static=no
38701f0ac6a5Smrg  if test -n "$RANLIB"; then
38711f0ac6a5Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
38721f0ac6a5Smrg    postinstall_cmds='$RANLIB $lib'
38731f0ac6a5Smrg  fi
38741f0ac6a5Smrg  ;;
38751f0ac6a5Smrg
38761f0ac6a5Smrgaix4* | aix5*)
38771f0ac6a5Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
38781f0ac6a5Smrg    test "$enable_shared" = yes && enable_static=no
38791f0ac6a5Smrg  fi
38801f0ac6a5Smrg    ;;
38811f0ac6a5Smrgesac
38821f0ac6a5SmrgAC_MSG_RESULT([$enable_shared])
38831f0ac6a5Smrg
38841f0ac6a5SmrgAC_MSG_CHECKING([whether to build static libraries])
38851f0ac6a5Smrg# Make sure either enable_shared or enable_static is yes.
38861f0ac6a5Smrgtest "$enable_shared" = yes || enable_static=yes
38871f0ac6a5SmrgAC_MSG_RESULT([$enable_static])
38881f0ac6a5Smrg
38891f0ac6a5SmrgAC_LIBTOOL_CONFIG($1)
38901f0ac6a5Smrg
38911f0ac6a5SmrgAC_LANG_POP
38921f0ac6a5SmrgCC="$lt_save_CC"
38931f0ac6a5Smrg])# AC_LIBTOOL_LANG_C_CONFIG
38941f0ac6a5Smrg
38951f0ac6a5Smrg
38961f0ac6a5Smrg# AC_LIBTOOL_LANG_CXX_CONFIG
38971f0ac6a5Smrg# --------------------------
38981f0ac6a5Smrg# Ensure that the configuration vars for the C compiler are
38991f0ac6a5Smrg# suitably defined.  Those variables are subsequently used by
39001f0ac6a5Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
39011f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
39021f0ac6a5SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
39031f0ac6a5Smrg[AC_LANG_PUSH(C++)
39041f0ac6a5SmrgAC_REQUIRE([AC_PROG_CXX])
39051f0ac6a5SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
39061f0ac6a5Smrg
39071f0ac6a5Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
39081f0ac6a5Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
39091f0ac6a5Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
39101f0ac6a5Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
39111f0ac6a5Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
39121f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
39131f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
39141f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
39151f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
39161f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
39171f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
39181f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
39191f0ac6a5Smrg_LT_AC_TAGVAR(module_cmds, $1)=
39201f0ac6a5Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
39211f0ac6a5Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
39221f0ac6a5Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
39231f0ac6a5Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
39241f0ac6a5Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
39251f0ac6a5Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
39261f0ac6a5Smrg
39271f0ac6a5Smrg# Dependencies to place before and after the object being linked:
39281f0ac6a5Smrg_LT_AC_TAGVAR(predep_objects, $1)=
39291f0ac6a5Smrg_LT_AC_TAGVAR(postdep_objects, $1)=
39301f0ac6a5Smrg_LT_AC_TAGVAR(predeps, $1)=
39311f0ac6a5Smrg_LT_AC_TAGVAR(postdeps, $1)=
39321f0ac6a5Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
39331f0ac6a5Smrg
39341f0ac6a5Smrg# Source file extension for C++ test sources.
39351f0ac6a5Smrgac_ext=cpp
39361f0ac6a5Smrg
39371f0ac6a5Smrg# Object file extension for compiled C++ test sources.
39381f0ac6a5Smrgobjext=o
39391f0ac6a5Smrg_LT_AC_TAGVAR(objext, $1)=$objext
39401f0ac6a5Smrg
39411f0ac6a5Smrg# Code to be used in simple compile tests
39421f0ac6a5Smrglt_simple_compile_test_code="int some_variable = 0;\n"
39431f0ac6a5Smrg
39441f0ac6a5Smrg# Code to be used in simple link tests
39451f0ac6a5Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
39461f0ac6a5Smrg
39471f0ac6a5Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
39481f0ac6a5Smrg_LT_AC_SYS_COMPILER
39491f0ac6a5Smrg
39501f0ac6a5Smrg# save warnings/boilerplate of simple test code
39511f0ac6a5Smrg_LT_COMPILER_BOILERPLATE
39521f0ac6a5Smrg_LT_LINKER_BOILERPLATE
39531f0ac6a5Smrg
39541f0ac6a5Smrg# Allow CC to be a program name with arguments.
39551f0ac6a5Smrglt_save_CC=$CC
39561f0ac6a5Smrglt_save_LD=$LD
39571f0ac6a5Smrglt_save_GCC=$GCC
39581f0ac6a5SmrgGCC=$GXX
39591f0ac6a5Smrglt_save_with_gnu_ld=$with_gnu_ld
39601f0ac6a5Smrglt_save_path_LD=$lt_cv_path_LD
39611f0ac6a5Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
39621f0ac6a5Smrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
39631f0ac6a5Smrgelse
39641f0ac6a5Smrg  $as_unset lt_cv_prog_gnu_ld
39651f0ac6a5Smrgfi
39661f0ac6a5Smrgif test -n "${lt_cv_path_LDCXX+set}"; then
39671f0ac6a5Smrg  lt_cv_path_LD=$lt_cv_path_LDCXX
39681f0ac6a5Smrgelse
39691f0ac6a5Smrg  $as_unset lt_cv_path_LD
39701f0ac6a5Smrgfi
39711f0ac6a5Smrgtest -z "${LDCXX+set}" || LD=$LDCXX
39721f0ac6a5SmrgCC=${CXX-"c++"}
39731f0ac6a5Smrgcompiler=$CC
39741f0ac6a5Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
39751f0ac6a5Smrg_LT_CC_BASENAME([$compiler])
39761f0ac6a5Smrg
39771f0ac6a5Smrg# We don't want -fno-exception wen compiling C++ code, so set the
39781f0ac6a5Smrg# no_builtin_flag separately
39791f0ac6a5Smrgif test "$GXX" = yes; then
39801f0ac6a5Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
39811f0ac6a5Smrgelse
39821f0ac6a5Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
39831f0ac6a5Smrgfi
39841f0ac6a5Smrg
39851f0ac6a5Smrgif test "$GXX" = yes; then
39861f0ac6a5Smrg  # Set up default GNU C++ configuration
39871f0ac6a5Smrg
39881f0ac6a5Smrg  AC_PROG_LD
39891f0ac6a5Smrg
39901f0ac6a5Smrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
39911f0ac6a5Smrg  # archiving commands below assume that GNU ld is being used.
39921f0ac6a5Smrg  if test "$with_gnu_ld" = yes; then
39931f0ac6a5Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
39941f0ac6a5Smrg    _LT_AC_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'
39951f0ac6a5Smrg
39961f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
39971f0ac6a5Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
39981f0ac6a5Smrg
39991f0ac6a5Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
40001f0ac6a5Smrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
40011f0ac6a5Smrg    #     investigate it a little bit more. (MM)
40021f0ac6a5Smrg    wlarc='${wl}'
40031f0ac6a5Smrg
40041f0ac6a5Smrg    # ancient GNU ld didn't support --whole-archive et. al.
40051f0ac6a5Smrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
40061f0ac6a5Smrg	grep 'no-whole-archive' > /dev/null; then
40071f0ac6a5Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
40081f0ac6a5Smrg    else
40091f0ac6a5Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
40101f0ac6a5Smrg    fi
40111f0ac6a5Smrg  else
40121f0ac6a5Smrg    with_gnu_ld=no
40131f0ac6a5Smrg    wlarc=
40141f0ac6a5Smrg
40151f0ac6a5Smrg    # A generic and very simple default shared library creation
40161f0ac6a5Smrg    # command for GNU C++ for the case where it uses the native
40171f0ac6a5Smrg    # linker, instead of GNU ld.  If possible, this setting should
40181f0ac6a5Smrg    # overridden to take advantage of the native linker features on
40191f0ac6a5Smrg    # the platform it is being used on.
40201f0ac6a5Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
40211f0ac6a5Smrg  fi
40221f0ac6a5Smrg
40231f0ac6a5Smrg  # Commands to make compiler produce verbose output that lists
40241f0ac6a5Smrg  # what "hidden" libraries, object files and flags are used when
40251f0ac6a5Smrg  # linking a shared library.
40261f0ac6a5Smrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
40271f0ac6a5Smrg
40281f0ac6a5Smrgelse
40291f0ac6a5Smrg  GXX=no
40301f0ac6a5Smrg  with_gnu_ld=no
40311f0ac6a5Smrg  wlarc=
40321f0ac6a5Smrgfi
40331f0ac6a5Smrg
40341f0ac6a5Smrg# PORTME: fill in a description of your system's C++ link characteristics
40351f0ac6a5SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
40361f0ac6a5Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
40371f0ac6a5Smrgcase $host_os in
40381f0ac6a5Smrg  aix3*)
40391f0ac6a5Smrg    # FIXME: insert proper C++ library support
40401f0ac6a5Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
40411f0ac6a5Smrg    ;;
40421f0ac6a5Smrg  aix4* | aix5*)
40431f0ac6a5Smrg    if test "$host_cpu" = ia64; then
40441f0ac6a5Smrg      # On IA64, the linker does run time linking by default, so we don't
40451f0ac6a5Smrg      # have to do anything special.
40461f0ac6a5Smrg      aix_use_runtimelinking=no
40471f0ac6a5Smrg      exp_sym_flag='-Bexport'
40481f0ac6a5Smrg      no_entry_flag=""
40491f0ac6a5Smrg    else
40501f0ac6a5Smrg      aix_use_runtimelinking=no
40511f0ac6a5Smrg
40521f0ac6a5Smrg      # Test if we are trying to use run time linking or normal
40531f0ac6a5Smrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
40541f0ac6a5Smrg      # need to do runtime linking.
40551f0ac6a5Smrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
40561f0ac6a5Smrg	for ld_flag in $LDFLAGS; do
40571f0ac6a5Smrg	  case $ld_flag in
40581f0ac6a5Smrg	  *-brtl*)
40591f0ac6a5Smrg	    aix_use_runtimelinking=yes
40601f0ac6a5Smrg	    break
40611f0ac6a5Smrg	    ;;
40621f0ac6a5Smrg	  esac
40631f0ac6a5Smrg	done
40641f0ac6a5Smrg	;;
40651f0ac6a5Smrg      esac
40661f0ac6a5Smrg
40671f0ac6a5Smrg      exp_sym_flag='-bexport'
40681f0ac6a5Smrg      no_entry_flag='-bnoentry'
40691f0ac6a5Smrg    fi
40701f0ac6a5Smrg
40711f0ac6a5Smrg    # When large executables or shared objects are built, AIX ld can
40721f0ac6a5Smrg    # have problems creating the table of contents.  If linking a library
40731f0ac6a5Smrg    # or program results in "error TOC overflow" add -mminimal-toc to
40741f0ac6a5Smrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
40751f0ac6a5Smrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
40761f0ac6a5Smrg
40771f0ac6a5Smrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
40781f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
40791f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
40801f0ac6a5Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
40811f0ac6a5Smrg
40821f0ac6a5Smrg    if test "$GXX" = yes; then
40831f0ac6a5Smrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
40841f0ac6a5Smrg      # We only want to do this on AIX 4.2 and lower, the check
40851f0ac6a5Smrg      # below for broken collect2 doesn't work under 4.3+
40861f0ac6a5Smrg	collect2name=`${CC} -print-prog-name=collect2`
40871f0ac6a5Smrg	if test -f "$collect2name" && \
40881f0ac6a5Smrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
40891f0ac6a5Smrg	then
40901f0ac6a5Smrg	  # We have reworked collect2
40911f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
40921f0ac6a5Smrg	else
40931f0ac6a5Smrg	  # We have old collect2
40941f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
40951f0ac6a5Smrg	  # It fails to find uninstalled libraries when the uninstalled
40961f0ac6a5Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
40971f0ac6a5Smrg	  # to unsupported forces relinking
40981f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
40991f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
41001f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
41011f0ac6a5Smrg	fi
41021f0ac6a5Smrg	;;
41031f0ac6a5Smrg      esac
41041f0ac6a5Smrg      shared_flag='-shared'
41051f0ac6a5Smrg      if test "$aix_use_runtimelinking" = yes; then
41061f0ac6a5Smrg	shared_flag="$shared_flag "'${wl}-G'
41071f0ac6a5Smrg      fi
41081f0ac6a5Smrg    else
41091f0ac6a5Smrg      # not using gcc
41101f0ac6a5Smrg      if test "$host_cpu" = ia64; then
41111f0ac6a5Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
41121f0ac6a5Smrg	# chokes on -Wl,-G. The following line is correct:
41131f0ac6a5Smrg	shared_flag='-G'
41141f0ac6a5Smrg      else
41151f0ac6a5Smrg	if test "$aix_use_runtimelinking" = yes; then
41161f0ac6a5Smrg	  shared_flag='${wl}-G'
41171f0ac6a5Smrg	else
41181f0ac6a5Smrg	  shared_flag='${wl}-bM:SRE'
41191f0ac6a5Smrg	fi
41201f0ac6a5Smrg      fi
41211f0ac6a5Smrg    fi
41221f0ac6a5Smrg
41231f0ac6a5Smrg    # It seems that -bexpall does not export symbols beginning with
41241f0ac6a5Smrg    # underscore (_), so it is better to generate a list of symbols to export.
41251f0ac6a5Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
41261f0ac6a5Smrg    if test "$aix_use_runtimelinking" = yes; then
41271f0ac6a5Smrg      # Warning - without using the other runtime loading flags (-brtl),
41281f0ac6a5Smrg      # -berok will link without error, but may produce a broken library.
41291f0ac6a5Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
41301f0ac6a5Smrg      # Determine the default libpath from the value encoded in an empty executable.
41311f0ac6a5Smrg      _LT_AC_SYS_LIBPATH_AIX
41321f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
41331f0ac6a5Smrg
41341f0ac6a5Smrg      _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
41351f0ac6a5Smrg     else
41361f0ac6a5Smrg      if test "$host_cpu" = ia64; then
41371f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
41381f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
41391f0ac6a5Smrg	_LT_AC_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"
41401f0ac6a5Smrg      else
41411f0ac6a5Smrg	# Determine the default libpath from the value encoded in an empty executable.
41421f0ac6a5Smrg	_LT_AC_SYS_LIBPATH_AIX
41431f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
41441f0ac6a5Smrg	# Warning - without using the other run time loading flags,
41451f0ac6a5Smrg	# -berok will link without error, but may produce a broken library.
41461f0ac6a5Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
41471f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
41481f0ac6a5Smrg	# Exported symbols can be pulled into shared objects from archives
41491f0ac6a5Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
41501f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
41511f0ac6a5Smrg	# This is similar to how AIX traditionally builds its shared libraries.
41521f0ac6a5Smrg	_LT_AC_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'
41531f0ac6a5Smrg      fi
41541f0ac6a5Smrg    fi
41551f0ac6a5Smrg    ;;
41561f0ac6a5Smrg
41571f0ac6a5Smrg  beos*)
41581f0ac6a5Smrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
41591f0ac6a5Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
41601f0ac6a5Smrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
41611f0ac6a5Smrg      # support --undefined.  This deserves some investigation.  FIXME
41621f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
41631f0ac6a5Smrg    else
41641f0ac6a5Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
41651f0ac6a5Smrg    fi
41661f0ac6a5Smrg    ;;
41671f0ac6a5Smrg
41681f0ac6a5Smrg  chorus*)
41691f0ac6a5Smrg    case $cc_basename in
41701f0ac6a5Smrg      *)
41711f0ac6a5Smrg	# FIXME: insert proper C++ library support
41721f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
41731f0ac6a5Smrg	;;
41741f0ac6a5Smrg    esac
41751f0ac6a5Smrg    ;;
41761f0ac6a5Smrg
41771f0ac6a5Smrg  cygwin* | mingw* | pw32*)
41781f0ac6a5Smrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
41791f0ac6a5Smrg    # as there is no search path for DLLs.
41801f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
41811f0ac6a5Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
41821f0ac6a5Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
41831f0ac6a5Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
41841f0ac6a5Smrg
41851f0ac6a5Smrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
41861f0ac6a5Smrg      _LT_AC_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'
41871f0ac6a5Smrg      # If the export-symbols file already is a .def file (1st line
41881f0ac6a5Smrg      # is EXPORTS), use it as is; otherwise, prepend...
41891f0ac6a5Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
41901f0ac6a5Smrg	cp $export_symbols $output_objdir/$soname.def;
41911f0ac6a5Smrg      else
41921f0ac6a5Smrg	echo EXPORTS > $output_objdir/$soname.def;
41931f0ac6a5Smrg	cat $export_symbols >> $output_objdir/$soname.def;
41941f0ac6a5Smrg      fi~
41951f0ac6a5Smrg      $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'
41961f0ac6a5Smrg    else
41971f0ac6a5Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
41981f0ac6a5Smrg    fi
41991f0ac6a5Smrg  ;;
42001f0ac6a5Smrg      darwin* | rhapsody*)
42011f0ac6a5Smrg        case $host_os in
42021f0ac6a5Smrg        rhapsody* | darwin1.[[012]])
42031f0ac6a5Smrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
42041f0ac6a5Smrg         ;;
42051f0ac6a5Smrg       *) # Darwin 1.3 on
42061f0ac6a5Smrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
42071f0ac6a5Smrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
42081f0ac6a5Smrg         else
42091f0ac6a5Smrg           case ${MACOSX_DEPLOYMENT_TARGET} in
42101f0ac6a5Smrg             10.[[012]])
42111f0ac6a5Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
42121f0ac6a5Smrg               ;;
42131f0ac6a5Smrg             10.*)
42141f0ac6a5Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
42151f0ac6a5Smrg               ;;
42161f0ac6a5Smrg           esac
42171f0ac6a5Smrg         fi
42181f0ac6a5Smrg         ;;
42191f0ac6a5Smrg        esac
42201f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
42211f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
42221f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
42231f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
42241f0ac6a5Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
42251f0ac6a5Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
42261f0ac6a5Smrg
42271f0ac6a5Smrg    if test "$GXX" = yes ; then
42281f0ac6a5Smrg      lt_int_apple_cc_single_mod=no
42291f0ac6a5Smrg      output_verbose_link_cmd='echo'
42301f0ac6a5Smrg      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
42311f0ac6a5Smrg       lt_int_apple_cc_single_mod=yes
42321f0ac6a5Smrg      fi
42331f0ac6a5Smrg      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
42341f0ac6a5Smrg       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
42351f0ac6a5Smrg      else
42361f0ac6a5Smrg          _LT_AC_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'
42371f0ac6a5Smrg        fi
42381f0ac6a5Smrg        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
42391f0ac6a5Smrg        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
42401f0ac6a5Smrg          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
42411f0ac6a5Smrg            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
42421f0ac6a5Smrg          else
42431f0ac6a5Smrg            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
42441f0ac6a5Smrg          fi
42451f0ac6a5Smrg            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
42461f0ac6a5Smrg      else
42471f0ac6a5Smrg      case $cc_basename in
42481f0ac6a5Smrg        xlc*)
42491f0ac6a5Smrg         output_verbose_link_cmd='echo'
42501f0ac6a5Smrg          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
42511f0ac6a5Smrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
42521f0ac6a5Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
42531f0ac6a5Smrg          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
42541f0ac6a5Smrg          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
42551f0ac6a5Smrg          ;;
42561f0ac6a5Smrg       *)
42571f0ac6a5Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
42581f0ac6a5Smrg          ;;
42591f0ac6a5Smrg      esac
42601f0ac6a5Smrg      fi
42611f0ac6a5Smrg        ;;
42621f0ac6a5Smrg
42631f0ac6a5Smrg  dgux*)
42641f0ac6a5Smrg    case $cc_basename in
42651f0ac6a5Smrg      ec++*)
42661f0ac6a5Smrg	# FIXME: insert proper C++ library support
42671f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
42681f0ac6a5Smrg	;;
42691f0ac6a5Smrg      ghcx*)
42701f0ac6a5Smrg	# Green Hills C++ Compiler
42711f0ac6a5Smrg	# FIXME: insert proper C++ library support
42721f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
42731f0ac6a5Smrg	;;
42741f0ac6a5Smrg      *)
42751f0ac6a5Smrg	# FIXME: insert proper C++ library support
42761f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
42771f0ac6a5Smrg	;;
42781f0ac6a5Smrg    esac
42791f0ac6a5Smrg    ;;
42801f0ac6a5Smrg  freebsd[[12]]*)
42811f0ac6a5Smrg    # C++ shared libraries reported to be fairly broken before switch to ELF
42821f0ac6a5Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
42831f0ac6a5Smrg    ;;
42841f0ac6a5Smrg  freebsd-elf*)
42851f0ac6a5Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
42861f0ac6a5Smrg    ;;
42871f0ac6a5Smrg  freebsd* | kfreebsd*-gnu | dragonfly*)
42881f0ac6a5Smrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
42891f0ac6a5Smrg    # conventions
42901f0ac6a5Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
42911f0ac6a5Smrg    ;;
42921f0ac6a5Smrg  gnu*)
42931f0ac6a5Smrg    ;;
42941f0ac6a5Smrg  hpux9*)
42951f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
42961f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
42971f0ac6a5Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
42981f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
42991f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
43001f0ac6a5Smrg				# but as the default
43011f0ac6a5Smrg				# location of the library.
43021f0ac6a5Smrg
43031f0ac6a5Smrg    case $cc_basename in
43041f0ac6a5Smrg    CC*)
43051f0ac6a5Smrg      # FIXME: insert proper C++ library support
43061f0ac6a5Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
43071f0ac6a5Smrg      ;;
43081f0ac6a5Smrg    aCC*)
43091f0ac6a5Smrg      _LT_AC_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'
43101f0ac6a5Smrg      # Commands to make compiler produce verbose output that lists
43111f0ac6a5Smrg      # what "hidden" libraries, object files and flags are used when
43121f0ac6a5Smrg      # linking a shared library.
43131f0ac6a5Smrg      #
43141f0ac6a5Smrg      # There doesn't appear to be a way to prevent this compiler from
43151f0ac6a5Smrg      # explicitly linking system object files so we need to strip them
43161f0ac6a5Smrg      # from the output so that they don't get included in the library
43171f0ac6a5Smrg      # dependencies.
43181f0ac6a5Smrg      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 $list'
43191f0ac6a5Smrg      ;;
43201f0ac6a5Smrg    *)
43211f0ac6a5Smrg      if test "$GXX" = yes; then
43221f0ac6a5Smrg        _LT_AC_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'
43231f0ac6a5Smrg      else
43241f0ac6a5Smrg        # FIXME: insert proper C++ library support
43251f0ac6a5Smrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
43261f0ac6a5Smrg      fi
43271f0ac6a5Smrg      ;;
43281f0ac6a5Smrg    esac
43291f0ac6a5Smrg    ;;
43301f0ac6a5Smrg  hpux10*|hpux11*)
43311f0ac6a5Smrg    if test $with_gnu_ld = no; then
43321f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
43331f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
43341f0ac6a5Smrg
43351f0ac6a5Smrg      case $host_cpu in
43361f0ac6a5Smrg      hppa*64*|ia64*)
43371f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
43381f0ac6a5Smrg        ;;
43391f0ac6a5Smrg      *)
43401f0ac6a5Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
43411f0ac6a5Smrg        ;;
43421f0ac6a5Smrg      esac
43431f0ac6a5Smrg    fi
43441f0ac6a5Smrg    case $host_cpu in
43451f0ac6a5Smrg    hppa*64*|ia64*)
43461f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
43471f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
43481f0ac6a5Smrg      ;;
43491f0ac6a5Smrg    *)
43501f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
43511f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
43521f0ac6a5Smrg					      # but as the default
43531f0ac6a5Smrg					      # location of the library.
43541f0ac6a5Smrg      ;;
43551f0ac6a5Smrg    esac
43561f0ac6a5Smrg
43571f0ac6a5Smrg    case $cc_basename in
43581f0ac6a5Smrg      CC*)
43591f0ac6a5Smrg	# FIXME: insert proper C++ library support
43601f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
43611f0ac6a5Smrg	;;
43621f0ac6a5Smrg      aCC*)
43631f0ac6a5Smrg	case $host_cpu in
43641f0ac6a5Smrg	hppa*64*)
43651f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
43661f0ac6a5Smrg	  ;;
43671f0ac6a5Smrg	ia64*)
43681f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
43691f0ac6a5Smrg	  ;;
43701f0ac6a5Smrg	*)
43711f0ac6a5Smrg	  _LT_AC_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'
43721f0ac6a5Smrg	  ;;
43731f0ac6a5Smrg	esac
43741f0ac6a5Smrg	# Commands to make compiler produce verbose output that lists
43751f0ac6a5Smrg	# what "hidden" libraries, object files and flags are used when
43761f0ac6a5Smrg	# linking a shared library.
43771f0ac6a5Smrg	#
43781f0ac6a5Smrg	# There doesn't appear to be a way to prevent this compiler from
43791f0ac6a5Smrg	# explicitly linking system object files so we need to strip them
43801f0ac6a5Smrg	# from the output so that they don't get included in the library
43811f0ac6a5Smrg	# dependencies.
43821f0ac6a5Smrg	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 $list'
43831f0ac6a5Smrg	;;
43841f0ac6a5Smrg      *)
43851f0ac6a5Smrg	if test "$GXX" = yes; then
43861f0ac6a5Smrg	  if test $with_gnu_ld = no; then
43871f0ac6a5Smrg	    case $host_cpu in
43881f0ac6a5Smrg	    hppa*64*)
43891f0ac6a5Smrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
43901f0ac6a5Smrg	      ;;
43911f0ac6a5Smrg	    ia64*)
43921f0ac6a5Smrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
43931f0ac6a5Smrg	      ;;
43941f0ac6a5Smrg	    *)
43951f0ac6a5Smrg	      _LT_AC_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'
43961f0ac6a5Smrg	      ;;
43971f0ac6a5Smrg	    esac
43981f0ac6a5Smrg	  fi
43991f0ac6a5Smrg	else
44001f0ac6a5Smrg	  # FIXME: insert proper C++ library support
44011f0ac6a5Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
44021f0ac6a5Smrg	fi
44031f0ac6a5Smrg	;;
44041f0ac6a5Smrg    esac
44051f0ac6a5Smrg    ;;
44061f0ac6a5Smrg  interix3*)
44071f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
44081f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
44091f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
44101f0ac6a5Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
44111f0ac6a5Smrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
44121f0ac6a5Smrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
44131f0ac6a5Smrg    # default) and relocated if they conflict, which is a slow very memory
44141f0ac6a5Smrg    # consuming and fragmenting process.  To avoid this, we pick a random,
44151f0ac6a5Smrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
44161f0ac6a5Smrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
44171f0ac6a5Smrg    _LT_AC_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'
44181f0ac6a5Smrg    _LT_AC_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'
44191f0ac6a5Smrg    ;;
44201f0ac6a5Smrg  irix5* | irix6*)
44211f0ac6a5Smrg    case $cc_basename in
44221f0ac6a5Smrg      CC*)
44231f0ac6a5Smrg	# SGI C++
44241f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
44251f0ac6a5Smrg
44261f0ac6a5Smrg	# Archives containing C++ object files must be created using
44271f0ac6a5Smrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
44281f0ac6a5Smrg	# necessary to make sure instantiated templates are included
44291f0ac6a5Smrg	# in the archive.
44301f0ac6a5Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
44311f0ac6a5Smrg	;;
44321f0ac6a5Smrg      *)
44331f0ac6a5Smrg	if test "$GXX" = yes; then
44341f0ac6a5Smrg	  if test "$with_gnu_ld" = no; then
44351f0ac6a5Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
44361f0ac6a5Smrg	  else
44371f0ac6a5Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
44381f0ac6a5Smrg	  fi
44391f0ac6a5Smrg	fi
44401f0ac6a5Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
44411f0ac6a5Smrg	;;
44421f0ac6a5Smrg    esac
44431f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
44441f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
44451f0ac6a5Smrg    ;;
44461f0ac6a5Smrg  linux*)
44471f0ac6a5Smrg    case $cc_basename in
44481f0ac6a5Smrg      KCC*)
44491f0ac6a5Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
44501f0ac6a5Smrg
44511f0ac6a5Smrg	# KCC will only create a shared library if the output file
44521f0ac6a5Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
44531f0ac6a5Smrg	# to its proper name (with version) after linking.
44541f0ac6a5Smrg	_LT_AC_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'
44551f0ac6a5Smrg	_LT_AC_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'
44561f0ac6a5Smrg	# Commands to make compiler produce verbose output that lists
44571f0ac6a5Smrg	# what "hidden" libraries, object files and flags are used when
44581f0ac6a5Smrg	# linking a shared library.
44591f0ac6a5Smrg	#
44601f0ac6a5Smrg	# There doesn't appear to be a way to prevent this compiler from
44611f0ac6a5Smrg	# explicitly linking system object files so we need to strip them
44621f0ac6a5Smrg	# from the output so that they don't get included in the library
44631f0ac6a5Smrg	# dependencies.
44641f0ac6a5Smrg	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 $list'
44651f0ac6a5Smrg
44661f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
44671f0ac6a5Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
44681f0ac6a5Smrg
44691f0ac6a5Smrg	# Archives containing C++ object files must be created using
44701f0ac6a5Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
44711f0ac6a5Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
44721f0ac6a5Smrg	;;
44731f0ac6a5Smrg      icpc*)
44741f0ac6a5Smrg	# Intel C++
44751f0ac6a5Smrg	with_gnu_ld=yes
44761f0ac6a5Smrg	# version 8.0 and above of icpc choke on multiply defined symbols
44771f0ac6a5Smrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
44781f0ac6a5Smrg	# earlier do not add the objects themselves.
44791f0ac6a5Smrg	case `$CC -V 2>&1` in
44801f0ac6a5Smrg	*"Version 7."*)
44811f0ac6a5Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
44821f0ac6a5Smrg  	  _LT_AC_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'
44831f0ac6a5Smrg	  ;;
44841f0ac6a5Smrg	*)  # Version 8.0 or newer
44851f0ac6a5Smrg	  tmp_idyn=
44861f0ac6a5Smrg	  case $host_cpu in
44871f0ac6a5Smrg	    ia64*) tmp_idyn=' -i_dynamic';;
44881f0ac6a5Smrg	  esac
44891f0ac6a5Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
44901f0ac6a5Smrg	  _LT_AC_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'
44911f0ac6a5Smrg	  ;;
44921f0ac6a5Smrg	esac
44931f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
44941f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
44951f0ac6a5Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
44961f0ac6a5Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
44971f0ac6a5Smrg	;;
44981f0ac6a5Smrg      pgCC*)
44991f0ac6a5Smrg        # Portland Group C++ compiler
45001f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
45011f0ac6a5Smrg  	_LT_AC_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'
45021f0ac6a5Smrg
45031f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
45041f0ac6a5Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
45051f0ac6a5Smrg	_LT_AC_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'
45061f0ac6a5Smrg        ;;
45071f0ac6a5Smrg      cxx*)
45081f0ac6a5Smrg	# Compaq C++
45091f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
45101f0ac6a5Smrg	_LT_AC_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'
45111f0ac6a5Smrg
45121f0ac6a5Smrg	runpath_var=LD_RUN_PATH
45131f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
45141f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
45151f0ac6a5Smrg
45161f0ac6a5Smrg	# Commands to make compiler produce verbose output that lists
45171f0ac6a5Smrg	# what "hidden" libraries, object files and flags are used when
45181f0ac6a5Smrg	# linking a shared library.
45191f0ac6a5Smrg	#
45201f0ac6a5Smrg	# There doesn't appear to be a way to prevent this compiler from
45211f0ac6a5Smrg	# explicitly linking system object files so we need to strip them
45221f0ac6a5Smrg	# from the output so that they don't get included in the library
45231f0ac6a5Smrg	# dependencies.
45241f0ac6a5Smrg	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "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 $list'
45251f0ac6a5Smrg	;;
45261f0ac6a5Smrg    esac
45271f0ac6a5Smrg    ;;
45281f0ac6a5Smrg  lynxos*)
45291f0ac6a5Smrg    # FIXME: insert proper C++ library support
45301f0ac6a5Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
45311f0ac6a5Smrg    ;;
45321f0ac6a5Smrg  m88k*)
45331f0ac6a5Smrg    # FIXME: insert proper C++ library support
45341f0ac6a5Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
45351f0ac6a5Smrg    ;;
45361f0ac6a5Smrg  mvs*)
45371f0ac6a5Smrg    case $cc_basename in
45381f0ac6a5Smrg      cxx*)
45391f0ac6a5Smrg	# FIXME: insert proper C++ library support
45401f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
45411f0ac6a5Smrg	;;
45421f0ac6a5Smrg      *)
45431f0ac6a5Smrg	# FIXME: insert proper C++ library support
45441f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
45451f0ac6a5Smrg	;;
45461f0ac6a5Smrg    esac
45471f0ac6a5Smrg    ;;
45481f0ac6a5Smrg  netbsd*)
45491f0ac6a5Smrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
45501f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
45511f0ac6a5Smrg      wlarc=
45521f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
45531f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
45541f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
45551f0ac6a5Smrg    fi
45561f0ac6a5Smrg    # Workaround some broken pre-1.5 toolchains
45571f0ac6a5Smrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
45581f0ac6a5Smrg    ;;
45591f0ac6a5Smrg  openbsd2*)
45601f0ac6a5Smrg    # C++ shared libraries are fairly broken
45611f0ac6a5Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
45621f0ac6a5Smrg    ;;
45631f0ac6a5Smrg  openbsd*)
45641f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
45651f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
45661f0ac6a5Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
45671f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
45681f0ac6a5Smrg    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
45691f0ac6a5Smrg      _LT_AC_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'
45701f0ac6a5Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
45711f0ac6a5Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
45721f0ac6a5Smrg    fi
45731f0ac6a5Smrg    output_verbose_link_cmd='echo'
45741f0ac6a5Smrg    ;;
45751f0ac6a5Smrg  osf3*)
45761f0ac6a5Smrg    case $cc_basename in
45771f0ac6a5Smrg      KCC*)
45781f0ac6a5Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
45791f0ac6a5Smrg
45801f0ac6a5Smrg	# KCC will only create a shared library if the output file
45811f0ac6a5Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
45821f0ac6a5Smrg	# to its proper name (with version) after linking.
45831f0ac6a5Smrg	_LT_AC_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'
45841f0ac6a5Smrg
45851f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
45861f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
45871f0ac6a5Smrg
45881f0ac6a5Smrg	# Archives containing C++ object files must be created using
45891f0ac6a5Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
45901f0ac6a5Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
45911f0ac6a5Smrg
45921f0ac6a5Smrg	;;
45931f0ac6a5Smrg      RCC*)
45941f0ac6a5Smrg	# Rational C++ 2.4.1
45951f0ac6a5Smrg	# FIXME: insert proper C++ library support
45961f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
45971f0ac6a5Smrg	;;
45981f0ac6a5Smrg      cxx*)
45991f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
46001f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
46011f0ac6a5Smrg
46021f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
46031f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
46041f0ac6a5Smrg
46051f0ac6a5Smrg	# Commands to make compiler produce verbose output that lists
46061f0ac6a5Smrg	# what "hidden" libraries, object files and flags are used when
46071f0ac6a5Smrg	# linking a shared library.
46081f0ac6a5Smrg	#
46091f0ac6a5Smrg	# There doesn't appear to be a way to prevent this compiler from
46101f0ac6a5Smrg	# explicitly linking system object files so we need to strip them
46111f0ac6a5Smrg	# from the output so that they don't get included in the library
46121f0ac6a5Smrg	# dependencies.
46131f0ac6a5Smrg	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "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 $list'
46141f0ac6a5Smrg	;;
46151f0ac6a5Smrg      *)
46161f0ac6a5Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
46171f0ac6a5Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
46181f0ac6a5Smrg	  _LT_AC_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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
46191f0ac6a5Smrg
46201f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
46211f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
46221f0ac6a5Smrg
46231f0ac6a5Smrg	  # Commands to make compiler produce verbose output that lists
46241f0ac6a5Smrg	  # what "hidden" libraries, object files and flags are used when
46251f0ac6a5Smrg	  # linking a shared library.
46261f0ac6a5Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
46271f0ac6a5Smrg
46281f0ac6a5Smrg	else
46291f0ac6a5Smrg	  # FIXME: insert proper C++ library support
46301f0ac6a5Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
46311f0ac6a5Smrg	fi
46321f0ac6a5Smrg	;;
46331f0ac6a5Smrg    esac
46341f0ac6a5Smrg    ;;
46351f0ac6a5Smrg  osf4* | osf5*)
46361f0ac6a5Smrg    case $cc_basename in
46371f0ac6a5Smrg      KCC*)
46381f0ac6a5Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
46391f0ac6a5Smrg
46401f0ac6a5Smrg	# KCC will only create a shared library if the output file
46411f0ac6a5Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
46421f0ac6a5Smrg	# to its proper name (with version) after linking.
46431f0ac6a5Smrg	_LT_AC_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'
46441f0ac6a5Smrg
46451f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
46461f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
46471f0ac6a5Smrg
46481f0ac6a5Smrg	# Archives containing C++ object files must be created using
46491f0ac6a5Smrg	# the KAI C++ compiler.
46501f0ac6a5Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
46511f0ac6a5Smrg	;;
46521f0ac6a5Smrg      RCC*)
46531f0ac6a5Smrg	# Rational C++ 2.4.1
46541f0ac6a5Smrg	# FIXME: insert proper C++ library support
46551f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
46561f0ac6a5Smrg	;;
46571f0ac6a5Smrg      cxx*)
46581f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
46591f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
46601f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
46611f0ac6a5Smrg	  echo "-hidden">> $lib.exp~
46621f0ac6a5Smrg	  $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 -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
46631f0ac6a5Smrg	  $rm $lib.exp'
46641f0ac6a5Smrg
46651f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
46661f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
46671f0ac6a5Smrg
46681f0ac6a5Smrg	# Commands to make compiler produce verbose output that lists
46691f0ac6a5Smrg	# what "hidden" libraries, object files and flags are used when
46701f0ac6a5Smrg	# linking a shared library.
46711f0ac6a5Smrg	#
46721f0ac6a5Smrg	# There doesn't appear to be a way to prevent this compiler from
46731f0ac6a5Smrg	# explicitly linking system object files so we need to strip them
46741f0ac6a5Smrg	# from the output so that they don't get included in the library
46751f0ac6a5Smrg	# dependencies.
46761f0ac6a5Smrg	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "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 $list'
46771f0ac6a5Smrg	;;
46781f0ac6a5Smrg      *)
46791f0ac6a5Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
46801f0ac6a5Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
46811f0ac6a5Smrg	 _LT_AC_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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
46821f0ac6a5Smrg
46831f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
46841f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
46851f0ac6a5Smrg
46861f0ac6a5Smrg	  # Commands to make compiler produce verbose output that lists
46871f0ac6a5Smrg	  # what "hidden" libraries, object files and flags are used when
46881f0ac6a5Smrg	  # linking a shared library.
46891f0ac6a5Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
46901f0ac6a5Smrg
46911f0ac6a5Smrg	else
46921f0ac6a5Smrg	  # FIXME: insert proper C++ library support
46931f0ac6a5Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
46941f0ac6a5Smrg	fi
46951f0ac6a5Smrg	;;
46961f0ac6a5Smrg    esac
46971f0ac6a5Smrg    ;;
46981f0ac6a5Smrg  psos*)
46991f0ac6a5Smrg    # FIXME: insert proper C++ library support
47001f0ac6a5Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
47011f0ac6a5Smrg    ;;
47021f0ac6a5Smrg  sunos4*)
47031f0ac6a5Smrg    case $cc_basename in
47041f0ac6a5Smrg      CC*)
47051f0ac6a5Smrg	# Sun C++ 4.x
47061f0ac6a5Smrg	# FIXME: insert proper C++ library support
47071f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
47081f0ac6a5Smrg	;;
47091f0ac6a5Smrg      lcc*)
47101f0ac6a5Smrg	# Lucid
47111f0ac6a5Smrg	# FIXME: insert proper C++ library support
47121f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
47131f0ac6a5Smrg	;;
47141f0ac6a5Smrg      *)
47151f0ac6a5Smrg	# FIXME: insert proper C++ library support
47161f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
47171f0ac6a5Smrg	;;
47181f0ac6a5Smrg    esac
47191f0ac6a5Smrg    ;;
47201f0ac6a5Smrg  solaris*)
47211f0ac6a5Smrg    case $cc_basename in
47221f0ac6a5Smrg      CC*)
47231f0ac6a5Smrg	# Sun C++ 4.2, 5.x and Centerline C++
47241f0ac6a5Smrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
47251f0ac6a5Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
47261f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
47271f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
47281f0ac6a5Smrg	$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'
47291f0ac6a5Smrg
47301f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
47311f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
47321f0ac6a5Smrg	case $host_os in
47331f0ac6a5Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
47341f0ac6a5Smrg	  *)
47351f0ac6a5Smrg	    # The C++ compiler is used as linker so we must use $wl
47361f0ac6a5Smrg	    # flag to pass the commands to the underlying system
47371f0ac6a5Smrg	    # linker. We must also pass each convience library through
47381f0ac6a5Smrg	    # to the system linker between allextract/defaultextract.
47391f0ac6a5Smrg	    # The C++ compiler will combine linker options so we
47401f0ac6a5Smrg	    # cannot just pass the convience library names through
47411f0ac6a5Smrg	    # without $wl.
47421f0ac6a5Smrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
47431f0ac6a5Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
47441f0ac6a5Smrg	    ;;
47451f0ac6a5Smrg	esac
47461f0ac6a5Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
47471f0ac6a5Smrg
47481f0ac6a5Smrg	output_verbose_link_cmd='echo'
47491f0ac6a5Smrg
47501f0ac6a5Smrg	# Archives containing C++ object files must be created using
47511f0ac6a5Smrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
47521f0ac6a5Smrg	# necessary to make sure instantiated templates are included
47531f0ac6a5Smrg	# in the archive.
47541f0ac6a5Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
47551f0ac6a5Smrg	;;
47561f0ac6a5Smrg      gcx*)
47571f0ac6a5Smrg	# Green Hills C++ Compiler
47581f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
47591f0ac6a5Smrg
47601f0ac6a5Smrg	# The C++ compiler must be used to create the archive.
47611f0ac6a5Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
47621f0ac6a5Smrg	;;
47631f0ac6a5Smrg      *)
47641f0ac6a5Smrg	# GNU C++ compiler with Solaris linker
47651f0ac6a5Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
47661f0ac6a5Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
47671f0ac6a5Smrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
47681f0ac6a5Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
47691f0ac6a5Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
47701f0ac6a5Smrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
47711f0ac6a5Smrg
47721f0ac6a5Smrg	    # Commands to make compiler produce verbose output that lists
47731f0ac6a5Smrg	    # what "hidden" libraries, object files and flags are used when
47741f0ac6a5Smrg	    # linking a shared library.
47751f0ac6a5Smrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
47761f0ac6a5Smrg	  else
47771f0ac6a5Smrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
47781f0ac6a5Smrg	    # platform.
47791f0ac6a5Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
47801f0ac6a5Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
47811f0ac6a5Smrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
47821f0ac6a5Smrg
47831f0ac6a5Smrg	    # Commands to make compiler produce verbose output that lists
47841f0ac6a5Smrg	    # what "hidden" libraries, object files and flags are used when
47851f0ac6a5Smrg	    # linking a shared library.
47861f0ac6a5Smrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
47871f0ac6a5Smrg	  fi
47881f0ac6a5Smrg
47891f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
47901f0ac6a5Smrg	fi
47911f0ac6a5Smrg	;;
47921f0ac6a5Smrg    esac
47931f0ac6a5Smrg    ;;
47941f0ac6a5Smrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
47951f0ac6a5Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
47961f0ac6a5Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
47971f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
47981f0ac6a5Smrg    runpath_var='LD_RUN_PATH'
47991f0ac6a5Smrg
48001f0ac6a5Smrg    case $cc_basename in
48011f0ac6a5Smrg      CC*)
48021f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
48031f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
48041f0ac6a5Smrg	;;
48051f0ac6a5Smrg      *)
48061f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
48071f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
48081f0ac6a5Smrg	;;
48091f0ac6a5Smrg    esac
48101f0ac6a5Smrg    ;;
48111f0ac6a5Smrg  sysv5* | sco3.2v5* | sco5v6*)
48121f0ac6a5Smrg    # Note: We can NOT use -z defs as we might desire, because we do not
48131f0ac6a5Smrg    # link with -lc, and that would cause any symbols used from libc to
48141f0ac6a5Smrg    # always be unresolved, which means just about no library would
48151f0ac6a5Smrg    # ever link correctly.  If we're not using GNU ld we use -z text
48161f0ac6a5Smrg    # though, which does catch some bad symbols but isn't as heavy-handed
48171f0ac6a5Smrg    # as -z defs.
48181f0ac6a5Smrg    # For security reasons, it is highly recommended that you always
48191f0ac6a5Smrg    # use absolute paths for naming shared libraries, and exclude the
48201f0ac6a5Smrg    # DT_RUNPATH tag from executables and libraries.  But doing so
48211f0ac6a5Smrg    # requires that you compile everything twice, which is a pain.
48221f0ac6a5Smrg    # So that behaviour is only enabled if SCOABSPATH is set to a
48231f0ac6a5Smrg    # non-empty value in the environment.  Most likely only useful for
48241f0ac6a5Smrg    # creating official distributions of packages.
48251f0ac6a5Smrg    # This is a hack until libtool officially supports absolute path
48261f0ac6a5Smrg    # names for shared libraries.
48271f0ac6a5Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
48281f0ac6a5Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
48291f0ac6a5Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
48301f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
48311f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
48321f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
48331f0ac6a5Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
48341f0ac6a5Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
48351f0ac6a5Smrg    runpath_var='LD_RUN_PATH'
48361f0ac6a5Smrg
48371f0ac6a5Smrg    case $cc_basename in
48381f0ac6a5Smrg      CC*)
48391f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
48401f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
48411f0ac6a5Smrg	;;
48421f0ac6a5Smrg      *)
48431f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
48441f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
48451f0ac6a5Smrg	;;
48461f0ac6a5Smrg    esac
48471f0ac6a5Smrg    ;;
48481f0ac6a5Smrg  tandem*)
48491f0ac6a5Smrg    case $cc_basename in
48501f0ac6a5Smrg      NCC*)
48511f0ac6a5Smrg	# NonStop-UX NCC 3.20
48521f0ac6a5Smrg	# FIXME: insert proper C++ library support
48531f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
48541f0ac6a5Smrg	;;
48551f0ac6a5Smrg      *)
48561f0ac6a5Smrg	# FIXME: insert proper C++ library support
48571f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
48581f0ac6a5Smrg	;;
48591f0ac6a5Smrg    esac
48601f0ac6a5Smrg    ;;
48611f0ac6a5Smrg  vxworks*)
48621f0ac6a5Smrg    # FIXME: insert proper C++ library support
48631f0ac6a5Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
48641f0ac6a5Smrg    ;;
48651f0ac6a5Smrg  *)
48661f0ac6a5Smrg    # FIXME: insert proper C++ library support
48671f0ac6a5Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
48681f0ac6a5Smrg    ;;
48691f0ac6a5Smrgesac
48701f0ac6a5SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
48711f0ac6a5Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
48721f0ac6a5Smrg
48731f0ac6a5Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
48741f0ac6a5Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
48751f0ac6a5Smrg
48761f0ac6a5SmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
48771f0ac6a5SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
48781f0ac6a5SmrgAC_LIBTOOL_PROG_CC_C_O($1)
48791f0ac6a5SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
48801f0ac6a5SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
48811f0ac6a5SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
48821f0ac6a5SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
48831f0ac6a5Smrg
48841f0ac6a5SmrgAC_LIBTOOL_CONFIG($1)
48851f0ac6a5Smrg
48861f0ac6a5SmrgAC_LANG_POP
48871f0ac6a5SmrgCC=$lt_save_CC
48881f0ac6a5SmrgLDCXX=$LD
48891f0ac6a5SmrgLD=$lt_save_LD
48901f0ac6a5SmrgGCC=$lt_save_GCC
48911f0ac6a5Smrgwith_gnu_ldcxx=$with_gnu_ld
48921f0ac6a5Smrgwith_gnu_ld=$lt_save_with_gnu_ld
48931f0ac6a5Smrglt_cv_path_LDCXX=$lt_cv_path_LD
48941f0ac6a5Smrglt_cv_path_LD=$lt_save_path_LD
48951f0ac6a5Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
48961f0ac6a5Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
48971f0ac6a5Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG
48981f0ac6a5Smrg
48991f0ac6a5Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
49001f0ac6a5Smrg# ------------------------------------
49011f0ac6a5Smrg# Figure out "hidden" library dependencies from verbose
49021f0ac6a5Smrg# compiler output when linking a shared library.
49031f0ac6a5Smrg# Parse the compiler output and extract the necessary
49041f0ac6a5Smrg# objects, libraries and library flags.
49051f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
49061f0ac6a5Smrgdnl we can't use the lt_simple_compile_test_code here,
49071f0ac6a5Smrgdnl because it contains code intended for an executable,
49081f0ac6a5Smrgdnl not a library.  It's possible we should let each
49091f0ac6a5Smrgdnl tag define a new lt_????_link_test_code variable,
49101f0ac6a5Smrgdnl but it's only used here...
49111f0ac6a5Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
49121f0ac6a5Smrgint a;
49131f0ac6a5Smrgvoid foo (void) { a = 0; }
49141f0ac6a5SmrgEOF
49151f0ac6a5Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
49161f0ac6a5Smrgclass Foo
49171f0ac6a5Smrg{
49181f0ac6a5Smrgpublic:
49191f0ac6a5Smrg  Foo (void) { a = 0; }
49201f0ac6a5Smrgprivate:
49211f0ac6a5Smrg  int a;
49221f0ac6a5Smrg};
49231f0ac6a5SmrgEOF
49241f0ac6a5Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
49251f0ac6a5Smrg      subroutine foo
49261f0ac6a5Smrg      implicit none
49271f0ac6a5Smrg      integer*4 a
49281f0ac6a5Smrg      a=0
49291f0ac6a5Smrg      return
49301f0ac6a5Smrg      end
49311f0ac6a5SmrgEOF
49321f0ac6a5Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
49331f0ac6a5Smrgpublic class foo {
49341f0ac6a5Smrg  private int a;
49351f0ac6a5Smrg  public void bar (void) {
49361f0ac6a5Smrg    a = 0;
49371f0ac6a5Smrg  }
49381f0ac6a5Smrg};
49391f0ac6a5SmrgEOF
49401f0ac6a5Smrg])
49411f0ac6a5Smrgdnl Parse the compiler output and extract the necessary
49421f0ac6a5Smrgdnl objects, libraries and library flags.
49431f0ac6a5Smrgif AC_TRY_EVAL(ac_compile); then
49441f0ac6a5Smrg  # Parse the compiler output and extract the necessary
49451f0ac6a5Smrg  # objects, libraries and library flags.
49461f0ac6a5Smrg
49471f0ac6a5Smrg  # Sentinel used to keep track of whether or not we are before
49481f0ac6a5Smrg  # the conftest object file.
49491f0ac6a5Smrg  pre_test_object_deps_done=no
49501f0ac6a5Smrg
49511f0ac6a5Smrg  # The `*' in the case matches for architectures that use `case' in
49521f0ac6a5Smrg  # $output_verbose_cmd can trigger glob expansion during the loop
49531f0ac6a5Smrg  # eval without this substitution.
49541f0ac6a5Smrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
49551f0ac6a5Smrg
49561f0ac6a5Smrg  for p in `eval $output_verbose_link_cmd`; do
49571f0ac6a5Smrg    case $p in
49581f0ac6a5Smrg
49591f0ac6a5Smrg    -L* | -R* | -l*)
49601f0ac6a5Smrg       # Some compilers place space between "-{L,R}" and the path.
49611f0ac6a5Smrg       # Remove the space.
49621f0ac6a5Smrg       if test $p = "-L" \
49631f0ac6a5Smrg	  || test $p = "-R"; then
49641f0ac6a5Smrg	 prev=$p
49651f0ac6a5Smrg	 continue
49661f0ac6a5Smrg       else
49671f0ac6a5Smrg	 prev=
49681f0ac6a5Smrg       fi
49691f0ac6a5Smrg
49701f0ac6a5Smrg       if test "$pre_test_object_deps_done" = no; then
49711f0ac6a5Smrg	 case $p in
49721f0ac6a5Smrg	 -L* | -R*)
49731f0ac6a5Smrg	   # Internal compiler library paths should come after those
49741f0ac6a5Smrg	   # provided the user.  The postdeps already come after the
49751f0ac6a5Smrg	   # user supplied libs so there is no need to process them.
49761f0ac6a5Smrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
49771f0ac6a5Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
49781f0ac6a5Smrg	   else
49791f0ac6a5Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
49801f0ac6a5Smrg	   fi
49811f0ac6a5Smrg	   ;;
49821f0ac6a5Smrg	 # The "-l" case would never come before the object being
49831f0ac6a5Smrg	 # linked, so don't bother handling this case.
49841f0ac6a5Smrg	 esac
49851f0ac6a5Smrg       else
49861f0ac6a5Smrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
49871f0ac6a5Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
49881f0ac6a5Smrg	 else
49891f0ac6a5Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
49901f0ac6a5Smrg	 fi
49911f0ac6a5Smrg       fi
49921f0ac6a5Smrg       ;;
49931f0ac6a5Smrg
49941f0ac6a5Smrg    *.$objext)
49951f0ac6a5Smrg       # This assumes that the test object file only shows up
49961f0ac6a5Smrg       # once in the compiler output.
49971f0ac6a5Smrg       if test "$p" = "conftest.$objext"; then
49981f0ac6a5Smrg	 pre_test_object_deps_done=yes
49991f0ac6a5Smrg	 continue
50001f0ac6a5Smrg       fi
50011f0ac6a5Smrg
50021f0ac6a5Smrg       if test "$pre_test_object_deps_done" = no; then
50031f0ac6a5Smrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
50041f0ac6a5Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
50051f0ac6a5Smrg	 else
50061f0ac6a5Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
50071f0ac6a5Smrg	 fi
50081f0ac6a5Smrg       else
50091f0ac6a5Smrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
50101f0ac6a5Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
50111f0ac6a5Smrg	 else
50121f0ac6a5Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
50131f0ac6a5Smrg	 fi
50141f0ac6a5Smrg       fi
50151f0ac6a5Smrg       ;;
50161f0ac6a5Smrg
50171f0ac6a5Smrg    *) ;; # Ignore the rest.
50181f0ac6a5Smrg
50191f0ac6a5Smrg    esac
50201f0ac6a5Smrg  done
50211f0ac6a5Smrg
50221f0ac6a5Smrg  # Clean up.
50231f0ac6a5Smrg  rm -f a.out a.exe
50241f0ac6a5Smrgelse
50251f0ac6a5Smrg  echo "libtool.m4: error: problem compiling $1 test program"
50261f0ac6a5Smrgfi
50271f0ac6a5Smrg
50281f0ac6a5Smrg$rm -f confest.$objext
50291f0ac6a5Smrg
50301f0ac6a5Smrg# PORTME: override above test on systems where it is broken
50311f0ac6a5Smrgifelse([$1],[CXX],
50321f0ac6a5Smrg[case $host_os in
50331f0ac6a5Smrginterix3*)
50341f0ac6a5Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
50351f0ac6a5Smrg  # hack all around it, let's just trust "g++" to DTRT.
50361f0ac6a5Smrg  _LT_AC_TAGVAR(predep_objects,$1)=
50371f0ac6a5Smrg  _LT_AC_TAGVAR(postdep_objects,$1)=
50381f0ac6a5Smrg  _LT_AC_TAGVAR(postdeps,$1)=
50391f0ac6a5Smrg  ;;
50401f0ac6a5Smrg
50411f0ac6a5Smrgsolaris*)
50421f0ac6a5Smrg  case $cc_basename in
50431f0ac6a5Smrg  CC*)
50441f0ac6a5Smrg    # Adding this requires a known-good setup of shared libraries for
50451f0ac6a5Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
50461f0ac6a5Smrg    # archive will be linked into the output, leading to subtle bugs.
50471f0ac6a5Smrg    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
50481f0ac6a5Smrg    ;;
50491f0ac6a5Smrg  esac
50501f0ac6a5Smrg  ;;
50511f0ac6a5Smrgesac
50521f0ac6a5Smrg])
50531f0ac6a5Smrg
50541f0ac6a5Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
50551f0ac6a5Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
50561f0ac6a5Smrgesac
50571f0ac6a5Smrg])# AC_LIBTOOL_POSTDEP_PREDEP
50581f0ac6a5Smrg
50591f0ac6a5Smrg# AC_LIBTOOL_LANG_F77_CONFIG
50601f0ac6a5Smrg# --------------------------
50611f0ac6a5Smrg# Ensure that the configuration vars for the C compiler are
50621f0ac6a5Smrg# suitably defined.  Those variables are subsequently used by
50631f0ac6a5Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
50641f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
50651f0ac6a5SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
50661f0ac6a5Smrg[AC_REQUIRE([AC_PROG_F77])
50671f0ac6a5SmrgAC_LANG_PUSH(Fortran 77)
50681f0ac6a5Smrg
50691f0ac6a5Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
50701f0ac6a5Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
50711f0ac6a5Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
50721f0ac6a5Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
50731f0ac6a5Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
50741f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
50751f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
50761f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
50771f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
50781f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
50791f0ac6a5Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
50801f0ac6a5Smrg_LT_AC_TAGVAR(module_cmds, $1)=
50811f0ac6a5Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
50821f0ac6a5Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
50831f0ac6a5Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
50841f0ac6a5Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
50851f0ac6a5Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
50861f0ac6a5Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
50871f0ac6a5Smrg
50881f0ac6a5Smrg# Source file extension for f77 test sources.
50891f0ac6a5Smrgac_ext=f
50901f0ac6a5Smrg
50911f0ac6a5Smrg# Object file extension for compiled f77 test sources.
50921f0ac6a5Smrgobjext=o
50931f0ac6a5Smrg_LT_AC_TAGVAR(objext, $1)=$objext
50941f0ac6a5Smrg
50951f0ac6a5Smrg# Code to be used in simple compile tests
50961f0ac6a5Smrglt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
50971f0ac6a5Smrg
50981f0ac6a5Smrg# Code to be used in simple link tests
50991f0ac6a5Smrglt_simple_link_test_code="      program t\n      end\n"
51001f0ac6a5Smrg
51011f0ac6a5Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
51021f0ac6a5Smrg_LT_AC_SYS_COMPILER
51031f0ac6a5Smrg
51041f0ac6a5Smrg# save warnings/boilerplate of simple test code
51051f0ac6a5Smrg_LT_COMPILER_BOILERPLATE
51061f0ac6a5Smrg_LT_LINKER_BOILERPLATE
51071f0ac6a5Smrg
51081f0ac6a5Smrg# Allow CC to be a program name with arguments.
51091f0ac6a5Smrglt_save_CC="$CC"
51101f0ac6a5SmrgCC=${F77-"f77"}
51111f0ac6a5Smrgcompiler=$CC
51121f0ac6a5Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
51131f0ac6a5Smrg_LT_CC_BASENAME([$compiler])
51141f0ac6a5Smrg
51151f0ac6a5SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
51161f0ac6a5SmrgAC_MSG_RESULT([$can_build_shared])
51171f0ac6a5Smrg
51181f0ac6a5SmrgAC_MSG_CHECKING([whether to build shared libraries])
51191f0ac6a5Smrgtest "$can_build_shared" = "no" && enable_shared=no
51201f0ac6a5Smrg
51211f0ac6a5Smrg# On AIX, shared libraries and static libraries use the same namespace, and
51221f0ac6a5Smrg# are all built from PIC.
51231f0ac6a5Smrgcase $host_os in
51241f0ac6a5Smrgaix3*)
51251f0ac6a5Smrg  test "$enable_shared" = yes && enable_static=no
51261f0ac6a5Smrg  if test -n "$RANLIB"; then
51271f0ac6a5Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
51281f0ac6a5Smrg    postinstall_cmds='$RANLIB $lib'
51291f0ac6a5Smrg  fi
51301f0ac6a5Smrg  ;;
51311f0ac6a5Smrgaix4* | aix5*)
51321f0ac6a5Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
51331f0ac6a5Smrg    test "$enable_shared" = yes && enable_static=no
51341f0ac6a5Smrg  fi
51351f0ac6a5Smrg  ;;
51361f0ac6a5Smrgesac
51371f0ac6a5SmrgAC_MSG_RESULT([$enable_shared])
51381f0ac6a5Smrg
51391f0ac6a5SmrgAC_MSG_CHECKING([whether to build static libraries])
51401f0ac6a5Smrg# Make sure either enable_shared or enable_static is yes.
51411f0ac6a5Smrgtest "$enable_shared" = yes || enable_static=yes
51421f0ac6a5SmrgAC_MSG_RESULT([$enable_static])
51431f0ac6a5Smrg
51441f0ac6a5Smrg_LT_AC_TAGVAR(GCC, $1)="$G77"
51451f0ac6a5Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
51461f0ac6a5Smrg
51471f0ac6a5SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
51481f0ac6a5SmrgAC_LIBTOOL_PROG_CC_C_O($1)
51491f0ac6a5SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
51501f0ac6a5SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
51511f0ac6a5SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
51521f0ac6a5SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
51531f0ac6a5Smrg
51541f0ac6a5SmrgAC_LIBTOOL_CONFIG($1)
51551f0ac6a5Smrg
51561f0ac6a5SmrgAC_LANG_POP
51571f0ac6a5SmrgCC="$lt_save_CC"
51581f0ac6a5Smrg])# AC_LIBTOOL_LANG_F77_CONFIG
51591f0ac6a5Smrg
51601f0ac6a5Smrg
51611f0ac6a5Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG
51621f0ac6a5Smrg# --------------------------
51631f0ac6a5Smrg# Ensure that the configuration vars for the C compiler are
51641f0ac6a5Smrg# suitably defined.  Those variables are subsequently used by
51651f0ac6a5Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
51661f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
51671f0ac6a5SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
51681f0ac6a5Smrg[AC_LANG_SAVE
51691f0ac6a5Smrg
51701f0ac6a5Smrg# Source file extension for Java test sources.
51711f0ac6a5Smrgac_ext=java
51721f0ac6a5Smrg
51731f0ac6a5Smrg# Object file extension for compiled Java test sources.
51741f0ac6a5Smrgobjext=o
51751f0ac6a5Smrg_LT_AC_TAGVAR(objext, $1)=$objext
51761f0ac6a5Smrg
51771f0ac6a5Smrg# Code to be used in simple compile tests
51781f0ac6a5Smrglt_simple_compile_test_code="class foo {}\n"
51791f0ac6a5Smrg
51801f0ac6a5Smrg# Code to be used in simple link tests
51811f0ac6a5Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
51821f0ac6a5Smrg
51831f0ac6a5Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
51841f0ac6a5Smrg_LT_AC_SYS_COMPILER
51851f0ac6a5Smrg
51861f0ac6a5Smrg# save warnings/boilerplate of simple test code
51871f0ac6a5Smrg_LT_COMPILER_BOILERPLATE
51881f0ac6a5Smrg_LT_LINKER_BOILERPLATE
51891f0ac6a5Smrg
51901f0ac6a5Smrg# Allow CC to be a program name with arguments.
51911f0ac6a5Smrglt_save_CC="$CC"
51921f0ac6a5SmrgCC=${GCJ-"gcj"}
51931f0ac6a5Smrgcompiler=$CC
51941f0ac6a5Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
51951f0ac6a5Smrg_LT_CC_BASENAME([$compiler])
51961f0ac6a5Smrg
51971f0ac6a5Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
51981f0ac6a5Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
51991f0ac6a5Smrg
52001f0ac6a5Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
52011f0ac6a5Smrg
52021f0ac6a5SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
52031f0ac6a5SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
52041f0ac6a5SmrgAC_LIBTOOL_PROG_CC_C_O($1)
52051f0ac6a5SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
52061f0ac6a5SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
52071f0ac6a5SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
52081f0ac6a5SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
52091f0ac6a5Smrg
52101f0ac6a5SmrgAC_LIBTOOL_CONFIG($1)
52111f0ac6a5Smrg
52121f0ac6a5SmrgAC_LANG_RESTORE
52131f0ac6a5SmrgCC="$lt_save_CC"
52141f0ac6a5Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
52151f0ac6a5Smrg
52161f0ac6a5Smrg
52171f0ac6a5Smrg# AC_LIBTOOL_LANG_RC_CONFIG
52181f0ac6a5Smrg# -------------------------
52191f0ac6a5Smrg# Ensure that the configuration vars for the Windows resource compiler are
52201f0ac6a5Smrg# suitably defined.  Those variables are subsequently used by
52211f0ac6a5Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
52221f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
52231f0ac6a5SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
52241f0ac6a5Smrg[AC_LANG_SAVE
52251f0ac6a5Smrg
52261f0ac6a5Smrg# Source file extension for RC test sources.
52271f0ac6a5Smrgac_ext=rc
52281f0ac6a5Smrg
52291f0ac6a5Smrg# Object file extension for compiled RC test sources.
52301f0ac6a5Smrgobjext=o
52311f0ac6a5Smrg_LT_AC_TAGVAR(objext, $1)=$objext
52321f0ac6a5Smrg
52331f0ac6a5Smrg# Code to be used in simple compile tests
52341f0ac6a5Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
52351f0ac6a5Smrg
52361f0ac6a5Smrg# Code to be used in simple link tests
52371f0ac6a5Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
52381f0ac6a5Smrg
52391f0ac6a5Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
52401f0ac6a5Smrg_LT_AC_SYS_COMPILER
52411f0ac6a5Smrg
52421f0ac6a5Smrg# save warnings/boilerplate of simple test code
52431f0ac6a5Smrg_LT_COMPILER_BOILERPLATE
52441f0ac6a5Smrg_LT_LINKER_BOILERPLATE
52451f0ac6a5Smrg
52461f0ac6a5Smrg# Allow CC to be a program name with arguments.
52471f0ac6a5Smrglt_save_CC="$CC"
52481f0ac6a5SmrgCC=${RC-"windres"}
52491f0ac6a5Smrgcompiler=$CC
52501f0ac6a5Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
52511f0ac6a5Smrg_LT_CC_BASENAME([$compiler])
52521f0ac6a5Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
52531f0ac6a5Smrg
52541f0ac6a5SmrgAC_LIBTOOL_CONFIG($1)
52551f0ac6a5Smrg
52561f0ac6a5SmrgAC_LANG_RESTORE
52571f0ac6a5SmrgCC="$lt_save_CC"
52581f0ac6a5Smrg])# AC_LIBTOOL_LANG_RC_CONFIG
52591f0ac6a5Smrg
52601f0ac6a5Smrg
52611f0ac6a5Smrg# AC_LIBTOOL_CONFIG([TAGNAME])
52621f0ac6a5Smrg# ----------------------------
52631f0ac6a5Smrg# If TAGNAME is not passed, then create an initial libtool script
52641f0ac6a5Smrg# with a default configuration from the untagged config vars.  Otherwise
52651f0ac6a5Smrg# add code to config.status for appending the configuration named by
52661f0ac6a5Smrg# TAGNAME from the matching tagged config vars.
52671f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
52681f0ac6a5Smrg[# The else clause should only fire when bootstrapping the
52691f0ac6a5Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh
52701f0ac6a5Smrg# with your package, and you will get complaints that there are
52711f0ac6a5Smrg# no rules to generate ltmain.sh.
52721f0ac6a5Smrgif test -f "$ltmain"; then
52731f0ac6a5Smrg  # See if we are running on zsh, and set the options which allow our commands through
52741f0ac6a5Smrg  # without removal of \ escapes.
52751f0ac6a5Smrg  if test -n "${ZSH_VERSION+set}" ; then
52761f0ac6a5Smrg    setopt NO_GLOB_SUBST
52771f0ac6a5Smrg  fi
52781f0ac6a5Smrg  # Now quote all the things that may contain metacharacters while being
52791f0ac6a5Smrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
52801f0ac6a5Smrg  # variables and quote the copies for generation of the libtool script.
52811f0ac6a5Smrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
52821f0ac6a5Smrg    SED SHELL STRIP \
52831f0ac6a5Smrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
52841f0ac6a5Smrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
52851f0ac6a5Smrg    deplibs_check_method reload_flag reload_cmds need_locks \
52861f0ac6a5Smrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
52871f0ac6a5Smrg    lt_cv_sys_global_symbol_to_c_name_address \
52881f0ac6a5Smrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
52891f0ac6a5Smrg    old_postinstall_cmds old_postuninstall_cmds \
52901f0ac6a5Smrg    _LT_AC_TAGVAR(compiler, $1) \
52911f0ac6a5Smrg    _LT_AC_TAGVAR(CC, $1) \
52921f0ac6a5Smrg    _LT_AC_TAGVAR(LD, $1) \
52931f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
52941f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
52951f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
52961f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
52971f0ac6a5Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
52981f0ac6a5Smrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
52991f0ac6a5Smrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
53001f0ac6a5Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
53011f0ac6a5Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
53021f0ac6a5Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
53031f0ac6a5Smrg    _LT_AC_TAGVAR(predep_objects, $1) \
53041f0ac6a5Smrg    _LT_AC_TAGVAR(postdep_objects, $1) \
53051f0ac6a5Smrg    _LT_AC_TAGVAR(predeps, $1) \
53061f0ac6a5Smrg    _LT_AC_TAGVAR(postdeps, $1) \
53071f0ac6a5Smrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
53081f0ac6a5Smrg    _LT_AC_TAGVAR(archive_cmds, $1) \
53091f0ac6a5Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
53101f0ac6a5Smrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
53111f0ac6a5Smrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
53121f0ac6a5Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
53131f0ac6a5Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
53141f0ac6a5Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
53151f0ac6a5Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
53161f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
53171f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
53181f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
53191f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
53201f0ac6a5Smrg    _LT_AC_TAGVAR(module_cmds, $1) \
53211f0ac6a5Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
53221f0ac6a5Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
53231f0ac6a5Smrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
53241f0ac6a5Smrg    _LT_AC_TAGVAR(include_expsyms, $1); do
53251f0ac6a5Smrg
53261f0ac6a5Smrg    case $var in
53271f0ac6a5Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
53281f0ac6a5Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
53291f0ac6a5Smrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
53301f0ac6a5Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
53311f0ac6a5Smrg    _LT_AC_TAGVAR(module_cmds, $1) | \
53321f0ac6a5Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
53331f0ac6a5Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
53341f0ac6a5Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
53351f0ac6a5Smrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
53361f0ac6a5Smrg    postinstall_cmds | postuninstall_cmds | \
53371f0ac6a5Smrg    old_postinstall_cmds | old_postuninstall_cmds | \
53381f0ac6a5Smrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
53391f0ac6a5Smrg      # Double-quote double-evaled strings.
53401f0ac6a5Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
53411f0ac6a5Smrg      ;;
53421f0ac6a5Smrg    *)
53431f0ac6a5Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
53441f0ac6a5Smrg      ;;
53451f0ac6a5Smrg    esac
53461f0ac6a5Smrg  done
53471f0ac6a5Smrg
53481f0ac6a5Smrg  case $lt_echo in
53491f0ac6a5Smrg  *'\[$]0 --fallback-echo"')
53501f0ac6a5Smrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
53511f0ac6a5Smrg    ;;
53521f0ac6a5Smrg  esac
53531f0ac6a5Smrg
53541f0ac6a5Smrgifelse([$1], [],
53551f0ac6a5Smrg  [cfgfile="${ofile}T"
53561f0ac6a5Smrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
53571f0ac6a5Smrg  $rm -f "$cfgfile"
53581f0ac6a5Smrg  AC_MSG_NOTICE([creating $ofile])],
53591f0ac6a5Smrg  [cfgfile="$ofile"])
53601f0ac6a5Smrg
53611f0ac6a5Smrg  cat <<__EOF__ >> "$cfgfile"
53621f0ac6a5Smrgifelse([$1], [],
53631f0ac6a5Smrg[#! $SHELL
53641f0ac6a5Smrg
53651f0ac6a5Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
53661f0ac6a5Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
53671f0ac6a5Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
53681f0ac6a5Smrg#
53691f0ac6a5Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
53701f0ac6a5Smrg# Free Software Foundation, Inc.
53711f0ac6a5Smrg#
53721f0ac6a5Smrg# This file is part of GNU Libtool:
53731f0ac6a5Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
53741f0ac6a5Smrg#
53751f0ac6a5Smrg# This program is free software; you can redistribute it and/or modify
53761f0ac6a5Smrg# it under the terms of the GNU General Public License as published by
53771f0ac6a5Smrg# the Free Software Foundation; either version 2 of the License, or
53781f0ac6a5Smrg# (at your option) any later version.
53791f0ac6a5Smrg#
53801f0ac6a5Smrg# This program is distributed in the hope that it will be useful, but
53811f0ac6a5Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
53821f0ac6a5Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
53831f0ac6a5Smrg# General Public License for more details.
53841f0ac6a5Smrg#
53851f0ac6a5Smrg# You should have received a copy of the GNU General Public License
53861f0ac6a5Smrg# along with this program; if not, write to the Free Software
53871f0ac6a5Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
53881f0ac6a5Smrg#
53891f0ac6a5Smrg# As a special exception to the GNU General Public License, if you
53901f0ac6a5Smrg# distribute this file as part of a program that contains a
53911f0ac6a5Smrg# configuration script generated by Autoconf, you may include it under
53921f0ac6a5Smrg# the same distribution terms that you use for the rest of that program.
53931f0ac6a5Smrg
53941f0ac6a5Smrg# A sed program that does not truncate output.
53951f0ac6a5SmrgSED=$lt_SED
53961f0ac6a5Smrg
53971f0ac6a5Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
53981f0ac6a5SmrgXsed="$SED -e 1s/^X//"
53991f0ac6a5Smrg
54001f0ac6a5Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
54011f0ac6a5Smrg# if CDPATH is set.
54021f0ac6a5Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
54031f0ac6a5Smrg
54041f0ac6a5Smrg# The names of the tagged configurations supported by this script.
54051f0ac6a5Smrgavailable_tags=
54061f0ac6a5Smrg
54071f0ac6a5Smrg# ### BEGIN LIBTOOL CONFIG],
54081f0ac6a5Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
54091f0ac6a5Smrg
54101f0ac6a5Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
54111f0ac6a5Smrg
54121f0ac6a5Smrg# Shell to use when invoking shell scripts.
54131f0ac6a5SmrgSHELL=$lt_SHELL
54141f0ac6a5Smrg
54151f0ac6a5Smrg# Whether or not to build shared libraries.
54161f0ac6a5Smrgbuild_libtool_libs=$enable_shared
54171f0ac6a5Smrg
54181f0ac6a5Smrg# Whether or not to build static libraries.
54191f0ac6a5Smrgbuild_old_libs=$enable_static
54201f0ac6a5Smrg
54211f0ac6a5Smrg# Whether or not to add -lc for building shared libraries.
54221f0ac6a5Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
54231f0ac6a5Smrg
54241f0ac6a5Smrg# Whether or not to disallow shared libs when runtime libs are static
54251f0ac6a5Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
54261f0ac6a5Smrg
54271f0ac6a5Smrg# Whether or not to optimize for fast installation.
54281f0ac6a5Smrgfast_install=$enable_fast_install
54291f0ac6a5Smrg
54301f0ac6a5Smrg# The host system.
54311f0ac6a5Smrghost_alias=$host_alias
54321f0ac6a5Smrghost=$host
54331f0ac6a5Smrghost_os=$host_os
54341f0ac6a5Smrg
54351f0ac6a5Smrg# The build system.
54361f0ac6a5Smrgbuild_alias=$build_alias
54371f0ac6a5Smrgbuild=$build
54381f0ac6a5Smrgbuild_os=$build_os
54391f0ac6a5Smrg
54401f0ac6a5Smrg# An echo program that does not interpret backslashes.
54411f0ac6a5Smrgecho=$lt_echo
54421f0ac6a5Smrg
54431f0ac6a5Smrg# The archiver.
54441f0ac6a5SmrgAR=$lt_AR
54451f0ac6a5SmrgAR_FLAGS=$lt_AR_FLAGS
54461f0ac6a5Smrg
54471f0ac6a5Smrg# A C compiler.
54481f0ac6a5SmrgLTCC=$lt_LTCC
54491f0ac6a5Smrg
54501f0ac6a5Smrg# LTCC compiler flags.
54511f0ac6a5SmrgLTCFLAGS=$lt_LTCFLAGS
54521f0ac6a5Smrg
54531f0ac6a5Smrg# A language-specific compiler.
54541f0ac6a5SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
54551f0ac6a5Smrg
54561f0ac6a5Smrg# Is the compiler the GNU C compiler?
54571f0ac6a5Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
54581f0ac6a5Smrg
54591f0ac6a5Smrg# An ERE matcher.
54601f0ac6a5SmrgEGREP=$lt_EGREP
54611f0ac6a5Smrg
54621f0ac6a5Smrg# The linker used to build libraries.
54631f0ac6a5SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
54641f0ac6a5Smrg
54651f0ac6a5Smrg# Whether we need hard or soft links.
54661f0ac6a5SmrgLN_S=$lt_LN_S
54671f0ac6a5Smrg
54681f0ac6a5Smrg# A BSD-compatible nm program.
54691f0ac6a5SmrgNM=$lt_NM
54701f0ac6a5Smrg
54711f0ac6a5Smrg# A symbol stripping program
54721f0ac6a5SmrgSTRIP=$lt_STRIP
54731f0ac6a5Smrg
54741f0ac6a5Smrg# Used to examine libraries when file_magic_cmd begins "file"
54751f0ac6a5SmrgMAGIC_CMD=$MAGIC_CMD
54761f0ac6a5Smrg
54771f0ac6a5Smrg# Used on cygwin: DLL creation program.
54781f0ac6a5SmrgDLLTOOL="$DLLTOOL"
54791f0ac6a5Smrg
54801f0ac6a5Smrg# Used on cygwin: object dumper.
54811f0ac6a5SmrgOBJDUMP="$OBJDUMP"
54821f0ac6a5Smrg
54831f0ac6a5Smrg# Used on cygwin: assembler.
54841f0ac6a5SmrgAS="$AS"
54851f0ac6a5Smrg
54861f0ac6a5Smrg# The name of the directory that contains temporary libtool files.
54871f0ac6a5Smrgobjdir=$objdir
54881f0ac6a5Smrg
54891f0ac6a5Smrg# How to create reloadable object files.
54901f0ac6a5Smrgreload_flag=$lt_reload_flag
54911f0ac6a5Smrgreload_cmds=$lt_reload_cmds
54921f0ac6a5Smrg
54931f0ac6a5Smrg# How to pass a linker flag through the compiler.
54941f0ac6a5Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
54951f0ac6a5Smrg
54961f0ac6a5Smrg# Object file suffix (normally "o").
54971f0ac6a5Smrgobjext="$ac_objext"
54981f0ac6a5Smrg
54991f0ac6a5Smrg# Old archive suffix (normally "a").
55001f0ac6a5Smrglibext="$libext"
55011f0ac6a5Smrg
55021f0ac6a5Smrg# Shared library suffix (normally ".so").
55031f0ac6a5Smrgshrext_cmds='$shrext_cmds'
55041f0ac6a5Smrg
55051f0ac6a5Smrg# Executable file suffix (normally "").
55061f0ac6a5Smrgexeext="$exeext"
55071f0ac6a5Smrg
55081f0ac6a5Smrg# Additional compiler flags for building library objects.
55091f0ac6a5Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
55101f0ac6a5Smrgpic_mode=$pic_mode
55111f0ac6a5Smrg
55121f0ac6a5Smrg# What is the maximum length of a command?
55131f0ac6a5Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
55141f0ac6a5Smrg
55151f0ac6a5Smrg# Does compiler simultaneously support -c and -o options?
55161f0ac6a5Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
55171f0ac6a5Smrg
55181f0ac6a5Smrg# Must we lock files when doing compilation?
55191f0ac6a5Smrgneed_locks=$lt_need_locks
55201f0ac6a5Smrg
55211f0ac6a5Smrg# Do we need the lib prefix for modules?
55221f0ac6a5Smrgneed_lib_prefix=$need_lib_prefix
55231f0ac6a5Smrg
55241f0ac6a5Smrg# Do we need a version for libraries?
55251f0ac6a5Smrgneed_version=$need_version
55261f0ac6a5Smrg
55271f0ac6a5Smrg# Whether dlopen is supported.
55281f0ac6a5Smrgdlopen_support=$enable_dlopen
55291f0ac6a5Smrg
55301f0ac6a5Smrg# Whether dlopen of programs is supported.
55311f0ac6a5Smrgdlopen_self=$enable_dlopen_self
55321f0ac6a5Smrg
55331f0ac6a5Smrg# Whether dlopen of statically linked programs is supported.
55341f0ac6a5Smrgdlopen_self_static=$enable_dlopen_self_static
55351f0ac6a5Smrg
55361f0ac6a5Smrg# Compiler flag to prevent dynamic linking.
55371f0ac6a5Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
55381f0ac6a5Smrg
55391f0ac6a5Smrg# Compiler flag to turn off builtin functions.
55401f0ac6a5Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
55411f0ac6a5Smrg
55421f0ac6a5Smrg# Compiler flag to allow reflexive dlopens.
55431f0ac6a5Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
55441f0ac6a5Smrg
55451f0ac6a5Smrg# Compiler flag to generate shared objects directly from archives.
55461f0ac6a5Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
55471f0ac6a5Smrg
55481f0ac6a5Smrg# Compiler flag to generate thread-safe objects.
55491f0ac6a5Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
55501f0ac6a5Smrg
55511f0ac6a5Smrg# Library versioning type.
55521f0ac6a5Smrgversion_type=$version_type
55531f0ac6a5Smrg
55541f0ac6a5Smrg# Format of library name prefix.
55551f0ac6a5Smrglibname_spec=$lt_libname_spec
55561f0ac6a5Smrg
55571f0ac6a5Smrg# List of archive names.  First name is the real one, the rest are links.
55581f0ac6a5Smrg# The last name is the one that the linker finds with -lNAME.
55591f0ac6a5Smrglibrary_names_spec=$lt_library_names_spec
55601f0ac6a5Smrg
55611f0ac6a5Smrg# The coded name of the library, if different from the real name.
55621f0ac6a5Smrgsoname_spec=$lt_soname_spec
55631f0ac6a5Smrg
55641f0ac6a5Smrg# Commands used to build and install an old-style archive.
55651f0ac6a5SmrgRANLIB=$lt_RANLIB
55661f0ac6a5Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
55671f0ac6a5Smrgold_postinstall_cmds=$lt_old_postinstall_cmds
55681f0ac6a5Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
55691f0ac6a5Smrg
55701f0ac6a5Smrg# Create an old-style archive from a shared archive.
55711f0ac6a5Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
55721f0ac6a5Smrg
55731f0ac6a5Smrg# Create a temporary old-style archive to link instead of a shared archive.
55741f0ac6a5Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
55751f0ac6a5Smrg
55761f0ac6a5Smrg# Commands used to build and install a shared archive.
55771f0ac6a5Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
55781f0ac6a5Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
55791f0ac6a5Smrgpostinstall_cmds=$lt_postinstall_cmds
55801f0ac6a5Smrgpostuninstall_cmds=$lt_postuninstall_cmds
55811f0ac6a5Smrg
55821f0ac6a5Smrg# Commands used to build a loadable module (assumed same as above if empty)
55831f0ac6a5Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
55841f0ac6a5Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
55851f0ac6a5Smrg
55861f0ac6a5Smrg# Commands to strip libraries.
55871f0ac6a5Smrgold_striplib=$lt_old_striplib
55881f0ac6a5Smrgstriplib=$lt_striplib
55891f0ac6a5Smrg
55901f0ac6a5Smrg# Dependencies to place before the objects being linked to create a
55911f0ac6a5Smrg# shared library.
55921f0ac6a5Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
55931f0ac6a5Smrg
55941f0ac6a5Smrg# Dependencies to place after the objects being linked to create a
55951f0ac6a5Smrg# shared library.
55961f0ac6a5Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
55971f0ac6a5Smrg
55981f0ac6a5Smrg# Dependencies to place before the objects being linked to create a
55991f0ac6a5Smrg# shared library.
56001f0ac6a5Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
56011f0ac6a5Smrg
56021f0ac6a5Smrg# Dependencies to place after the objects being linked to create a
56031f0ac6a5Smrg# shared library.
56041f0ac6a5Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
56051f0ac6a5Smrg
56061f0ac6a5Smrg# The library search path used internally by the compiler when linking
56071f0ac6a5Smrg# a shared library.
56081f0ac6a5Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
56091f0ac6a5Smrg
56101f0ac6a5Smrg# Method to check whether dependent libraries are shared objects.
56111f0ac6a5Smrgdeplibs_check_method=$lt_deplibs_check_method
56121f0ac6a5Smrg
56131f0ac6a5Smrg# Command to use when deplibs_check_method == file_magic.
56141f0ac6a5Smrgfile_magic_cmd=$lt_file_magic_cmd
56151f0ac6a5Smrg
56161f0ac6a5Smrg# Flag that allows shared libraries with undefined symbols to be built.
56171f0ac6a5Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
56181f0ac6a5Smrg
56191f0ac6a5Smrg# Flag that forces no undefined symbols.
56201f0ac6a5Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
56211f0ac6a5Smrg
56221f0ac6a5Smrg# Commands used to finish a libtool library installation in a directory.
56231f0ac6a5Smrgfinish_cmds=$lt_finish_cmds
56241f0ac6a5Smrg
56251f0ac6a5Smrg# Same as above, but a single script fragment to be evaled but not shown.
56261f0ac6a5Smrgfinish_eval=$lt_finish_eval
56271f0ac6a5Smrg
56281f0ac6a5Smrg# Take the output of nm and produce a listing of raw symbols and C names.
56291f0ac6a5Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
56301f0ac6a5Smrg
56311f0ac6a5Smrg# Transform the output of nm in a proper C declaration
56321f0ac6a5Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
56331f0ac6a5Smrg
56341f0ac6a5Smrg# Transform the output of nm in a C name address pair
56351f0ac6a5Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
56361f0ac6a5Smrg
56371f0ac6a5Smrg# This is the shared library runtime path variable.
56381f0ac6a5Smrgrunpath_var=$runpath_var
56391f0ac6a5Smrg
56401f0ac6a5Smrg# This is the shared library path variable.
56411f0ac6a5Smrgshlibpath_var=$shlibpath_var
56421f0ac6a5Smrg
56431f0ac6a5Smrg# Is shlibpath searched before the hard-coded library search path?
56441f0ac6a5Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
56451f0ac6a5Smrg
56461f0ac6a5Smrg# How to hardcode a shared library path into an executable.
56471f0ac6a5Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
56481f0ac6a5Smrg
56491f0ac6a5Smrg# Whether we should hardcode library paths into libraries.
56501f0ac6a5Smrghardcode_into_libs=$hardcode_into_libs
56511f0ac6a5Smrg
56521f0ac6a5Smrg# Flag to hardcode \$libdir into a binary during linking.
56531f0ac6a5Smrg# This must work even if \$libdir does not exist.
56541f0ac6a5Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
56551f0ac6a5Smrg
56561f0ac6a5Smrg# If ld is used when linking, flag to hardcode \$libdir into
56571f0ac6a5Smrg# a binary during linking. This must work even if \$libdir does
56581f0ac6a5Smrg# not exist.
56591f0ac6a5Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
56601f0ac6a5Smrg
56611f0ac6a5Smrg# Whether we need a single -rpath flag with a separated argument.
56621f0ac6a5Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
56631f0ac6a5Smrg
56641f0ac6a5Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
56651f0ac6a5Smrg# resulting binary.
56661f0ac6a5Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
56671f0ac6a5Smrg
56681f0ac6a5Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
56691f0ac6a5Smrg# resulting binary.
56701f0ac6a5Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
56711f0ac6a5Smrg
56721f0ac6a5Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
56731f0ac6a5Smrg# the resulting binary.
56741f0ac6a5Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
56751f0ac6a5Smrg
56761f0ac6a5Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library
56771f0ac6a5Smrg# and all subsequent libraries and executables linked against it.
56781f0ac6a5Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
56791f0ac6a5Smrg
56801f0ac6a5Smrg# Variables whose values should be saved in libtool wrapper scripts and
56811f0ac6a5Smrg# restored at relink time.
56821f0ac6a5Smrgvariables_saved_for_relink="$variables_saved_for_relink"
56831f0ac6a5Smrg
56841f0ac6a5Smrg# Whether libtool must link a program against all its dependency libraries.
56851f0ac6a5Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
56861f0ac6a5Smrg
56871f0ac6a5Smrg# Compile-time system search path for libraries
56881f0ac6a5Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
56891f0ac6a5Smrg
56901f0ac6a5Smrg# Run-time system search path for libraries
56911f0ac6a5Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
56921f0ac6a5Smrg
56931f0ac6a5Smrg# Fix the shell variable \$srcfile for the compiler.
56941f0ac6a5Smrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
56951f0ac6a5Smrg
56961f0ac6a5Smrg# Set to yes if exported symbols are required.
56971f0ac6a5Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
56981f0ac6a5Smrg
56991f0ac6a5Smrg# The commands to list exported symbols.
57001f0ac6a5Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
57011f0ac6a5Smrg
57021f0ac6a5Smrg# The commands to extract the exported symbol list from a shared archive.
57031f0ac6a5Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
57041f0ac6a5Smrg
57051f0ac6a5Smrg# Symbols that should not be listed in the preloaded symbols.
57061f0ac6a5Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
57071f0ac6a5Smrg
57081f0ac6a5Smrg# Symbols that must always be exported.
57091f0ac6a5Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
57101f0ac6a5Smrg
57111f0ac6a5Smrgifelse([$1],[],
57121f0ac6a5Smrg[# ### END LIBTOOL CONFIG],
57131f0ac6a5Smrg[# ### END LIBTOOL TAG CONFIG: $tagname])
57141f0ac6a5Smrg
57151f0ac6a5Smrg__EOF__
57161f0ac6a5Smrg
57171f0ac6a5Smrgifelse([$1],[], [
57181f0ac6a5Smrg  case $host_os in
57191f0ac6a5Smrg  aix3*)
57201f0ac6a5Smrg    cat <<\EOF >> "$cfgfile"
57211f0ac6a5Smrg
57221f0ac6a5Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
57231f0ac6a5Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
57241f0ac6a5Smrg# vanish in a puff of smoke.
57251f0ac6a5Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
57261f0ac6a5Smrg  COLLECT_NAMES=
57271f0ac6a5Smrg  export COLLECT_NAMES
57281f0ac6a5Smrgfi
57291f0ac6a5SmrgEOF
57301f0ac6a5Smrg    ;;
57311f0ac6a5Smrg  esac
57321f0ac6a5Smrg
57331f0ac6a5Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
57341f0ac6a5Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
57351f0ac6a5Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
57361f0ac6a5Smrg  # is reportedly fixed, but why not run on old versions too?
57371f0ac6a5Smrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
57381f0ac6a5Smrg
57391f0ac6a5Smrg  mv -f "$cfgfile" "$ofile" || \
57401f0ac6a5Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
57411f0ac6a5Smrg  chmod +x "$ofile"
57421f0ac6a5Smrg])
57431f0ac6a5Smrgelse
57441f0ac6a5Smrg  # If there is no Makefile yet, we rely on a make rule to execute
57451f0ac6a5Smrg  # `config.status --recheck' to rerun these tests and create the
57461f0ac6a5Smrg  # libtool script then.
57471f0ac6a5Smrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
57481f0ac6a5Smrg  if test -f "$ltmain_in"; then
57491f0ac6a5Smrg    test -f Makefile && make "$ltmain"
57501f0ac6a5Smrg  fi
57511f0ac6a5Smrgfi
57521f0ac6a5Smrg])# AC_LIBTOOL_CONFIG
57531f0ac6a5Smrg
57541f0ac6a5Smrg
57551f0ac6a5Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
57561f0ac6a5Smrg# -------------------------------------------
57571f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
57581f0ac6a5Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
57591f0ac6a5Smrg
57601f0ac6a5Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
57611f0ac6a5Smrg
57621f0ac6a5Smrgif test "$GCC" = yes; then
57631f0ac6a5Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
57641f0ac6a5Smrg
57651f0ac6a5Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
57661f0ac6a5Smrg    lt_cv_prog_compiler_rtti_exceptions,
57671f0ac6a5Smrg    [-fno-rtti -fno-exceptions], [],
57681f0ac6a5Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
57691f0ac6a5Smrgfi
57701f0ac6a5Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
57711f0ac6a5Smrg
57721f0ac6a5Smrg
57731f0ac6a5Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
57741f0ac6a5Smrg# ---------------------------------
57751f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
57761f0ac6a5Smrg[AC_REQUIRE([AC_CANONICAL_HOST])
57771f0ac6a5SmrgAC_REQUIRE([AC_PROG_NM])
57781f0ac6a5SmrgAC_REQUIRE([AC_OBJEXT])
57791f0ac6a5Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
57801f0ac6a5SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
57811f0ac6a5SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
57821f0ac6a5Smrg[
57831f0ac6a5Smrg# These are sane defaults that work on at least a few old systems.
57841f0ac6a5Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
57851f0ac6a5Smrg
57861f0ac6a5Smrg# Character class describing NM global symbol codes.
57871f0ac6a5Smrgsymcode='[[BCDEGRST]]'
57881f0ac6a5Smrg
57891f0ac6a5Smrg# Regexp to match symbols that can be accessed directly from C.
57901f0ac6a5Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
57911f0ac6a5Smrg
57921f0ac6a5Smrg# Transform an extracted symbol line into a proper C declaration
57931f0ac6a5Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
57941f0ac6a5Smrg
57951f0ac6a5Smrg# Transform an extracted symbol line into symbol name and symbol address
57961f0ac6a5Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
57971f0ac6a5Smrg
57981f0ac6a5Smrg# Define system-specific variables.
57991f0ac6a5Smrgcase $host_os in
58001f0ac6a5Smrgaix*)
58011f0ac6a5Smrg  symcode='[[BCDT]]'
58021f0ac6a5Smrg  ;;
58031f0ac6a5Smrgcygwin* | mingw* | pw32*)
58041f0ac6a5Smrg  symcode='[[ABCDGISTW]]'
58051f0ac6a5Smrg  ;;
58061f0ac6a5Smrghpux*) # Its linker distinguishes data from code symbols
58071f0ac6a5Smrg  if test "$host_cpu" = ia64; then
58081f0ac6a5Smrg    symcode='[[ABCDEGRST]]'
58091f0ac6a5Smrg  fi
58101f0ac6a5Smrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
58111f0ac6a5Smrg  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
58121f0ac6a5Smrg  ;;
58131f0ac6a5Smrglinux*)
58141f0ac6a5Smrg  if test "$host_cpu" = ia64; then
58151f0ac6a5Smrg    symcode='[[ABCDGIRSTW]]'
58161f0ac6a5Smrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
58171f0ac6a5Smrg    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
58181f0ac6a5Smrg  fi
58191f0ac6a5Smrg  ;;
58201f0ac6a5Smrgirix* | nonstopux*)
58211f0ac6a5Smrg  symcode='[[BCDEGRST]]'
58221f0ac6a5Smrg  ;;
58231f0ac6a5Smrgosf*)
58241f0ac6a5Smrg  symcode='[[BCDEGQRST]]'
58251f0ac6a5Smrg  ;;
58261f0ac6a5Smrgsolaris*)
58271f0ac6a5Smrg  symcode='[[BDRT]]'
58281f0ac6a5Smrg  ;;
58291f0ac6a5Smrgsco3.2v5*)
58301f0ac6a5Smrg  symcode='[[DT]]'
58311f0ac6a5Smrg  ;;
58321f0ac6a5Smrgsysv4.2uw2*)
58331f0ac6a5Smrg  symcode='[[DT]]'
58341f0ac6a5Smrg  ;;
58351f0ac6a5Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
58361f0ac6a5Smrg  symcode='[[ABDT]]'
58371f0ac6a5Smrg  ;;
58381f0ac6a5Smrgsysv4)
58391f0ac6a5Smrg  symcode='[[DFNSTU]]'
58401f0ac6a5Smrg  ;;
58411f0ac6a5Smrgesac
58421f0ac6a5Smrg
58431f0ac6a5Smrg# Handle CRLF in mingw tool chain
58441f0ac6a5Smrgopt_cr=
58451f0ac6a5Smrgcase $build_os in
58461f0ac6a5Smrgmingw*)
58471f0ac6a5Smrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
58481f0ac6a5Smrg  ;;
58491f0ac6a5Smrgesac
58501f0ac6a5Smrg
58511f0ac6a5Smrg# If we're using GNU nm, then use its standard symbol codes.
58521f0ac6a5Smrgcase `$NM -V 2>&1` in
58531f0ac6a5Smrg*GNU* | *'with BFD'*)
58541f0ac6a5Smrg  symcode='[[ABCDGIRSTW]]' ;;
58551f0ac6a5Smrgesac
58561f0ac6a5Smrg
58571f0ac6a5Smrg# Try without a prefix undercore, then with it.
58581f0ac6a5Smrgfor ac_symprfx in "" "_"; do
58591f0ac6a5Smrg
58601f0ac6a5Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
58611f0ac6a5Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
58621f0ac6a5Smrg
58631f0ac6a5Smrg  # Write the raw and C identifiers.
58641f0ac6a5Smrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
58651f0ac6a5Smrg
58661f0ac6a5Smrg  # Check to see that the pipe works correctly.
58671f0ac6a5Smrg  pipe_works=no
58681f0ac6a5Smrg
58691f0ac6a5Smrg  rm -f conftest*
58701f0ac6a5Smrg  cat > conftest.$ac_ext <<EOF
58711f0ac6a5Smrg#ifdef __cplusplus
58721f0ac6a5Smrgextern "C" {
58731f0ac6a5Smrg#endif
58741f0ac6a5Smrgchar nm_test_var;
58751f0ac6a5Smrgvoid nm_test_func(){}
58761f0ac6a5Smrg#ifdef __cplusplus
58771f0ac6a5Smrg}
58781f0ac6a5Smrg#endif
58791f0ac6a5Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
58801f0ac6a5SmrgEOF
58811f0ac6a5Smrg
58821f0ac6a5Smrg  if AC_TRY_EVAL(ac_compile); then
58831f0ac6a5Smrg    # Now try to grab the symbols.
58841f0ac6a5Smrg    nlist=conftest.nm
58851f0ac6a5Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
58861f0ac6a5Smrg      # Try sorting and uniquifying the output.
58871f0ac6a5Smrg      if sort "$nlist" | uniq > "$nlist"T; then
58881f0ac6a5Smrg	mv -f "$nlist"T "$nlist"
58891f0ac6a5Smrg      else
58901f0ac6a5Smrg	rm -f "$nlist"T
58911f0ac6a5Smrg      fi
58921f0ac6a5Smrg
58931f0ac6a5Smrg      # Make sure that we snagged all the symbols we need.
58941f0ac6a5Smrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
58951f0ac6a5Smrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
58961f0ac6a5Smrg	  cat <<EOF > conftest.$ac_ext
58971f0ac6a5Smrg#ifdef __cplusplus
58981f0ac6a5Smrgextern "C" {
58991f0ac6a5Smrg#endif
59001f0ac6a5Smrg
59011f0ac6a5SmrgEOF
59021f0ac6a5Smrg	  # Now generate the symbol file.
59031f0ac6a5Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
59041f0ac6a5Smrg
59051f0ac6a5Smrg	  cat <<EOF >> conftest.$ac_ext
59061f0ac6a5Smrg#if defined (__STDC__) && __STDC__
59071f0ac6a5Smrg# define lt_ptr_t void *
59081f0ac6a5Smrg#else
59091f0ac6a5Smrg# define lt_ptr_t char *
59101f0ac6a5Smrg# define const
59111f0ac6a5Smrg#endif
59121f0ac6a5Smrg
59131f0ac6a5Smrg/* The mapping between symbol names and symbols. */
59141f0ac6a5Smrgconst struct {
59151f0ac6a5Smrg  const char *name;
59161f0ac6a5Smrg  lt_ptr_t address;
59171f0ac6a5Smrg}
59181f0ac6a5Smrglt_preloaded_symbols[[]] =
59191f0ac6a5Smrg{
59201f0ac6a5SmrgEOF
59211f0ac6a5Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
59221f0ac6a5Smrg	  cat <<\EOF >> conftest.$ac_ext
59231f0ac6a5Smrg  {0, (lt_ptr_t) 0}
59241f0ac6a5Smrg};
59251f0ac6a5Smrg
59261f0ac6a5Smrg#ifdef __cplusplus
59271f0ac6a5Smrg}
59281f0ac6a5Smrg#endif
59291f0ac6a5SmrgEOF
59301f0ac6a5Smrg	  # Now try linking the two files.
59311f0ac6a5Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
59321f0ac6a5Smrg	  lt_save_LIBS="$LIBS"
59331f0ac6a5Smrg	  lt_save_CFLAGS="$CFLAGS"
59341f0ac6a5Smrg	  LIBS="conftstm.$ac_objext"
59351f0ac6a5Smrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
59361f0ac6a5Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
59371f0ac6a5Smrg	    pipe_works=yes
59381f0ac6a5Smrg	  fi
59391f0ac6a5Smrg	  LIBS="$lt_save_LIBS"
59401f0ac6a5Smrg	  CFLAGS="$lt_save_CFLAGS"
59411f0ac6a5Smrg	else
59421f0ac6a5Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
59431f0ac6a5Smrg	fi
59441f0ac6a5Smrg      else
59451f0ac6a5Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
59461f0ac6a5Smrg      fi
59471f0ac6a5Smrg    else
59481f0ac6a5Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
59491f0ac6a5Smrg    fi
59501f0ac6a5Smrg  else
59511f0ac6a5Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
59521f0ac6a5Smrg    cat conftest.$ac_ext >&5
59531f0ac6a5Smrg  fi
59541f0ac6a5Smrg  rm -f conftest* conftst*
59551f0ac6a5Smrg
59561f0ac6a5Smrg  # Do not use the global_symbol_pipe unless it works.
59571f0ac6a5Smrg  if test "$pipe_works" = yes; then
59581f0ac6a5Smrg    break
59591f0ac6a5Smrg  else
59601f0ac6a5Smrg    lt_cv_sys_global_symbol_pipe=
59611f0ac6a5Smrg  fi
59621f0ac6a5Smrgdone
59631f0ac6a5Smrg])
59641f0ac6a5Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
59651f0ac6a5Smrg  lt_cv_sys_global_symbol_to_cdecl=
59661f0ac6a5Smrgfi
59671f0ac6a5Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
59681f0ac6a5Smrg  AC_MSG_RESULT(failed)
59691f0ac6a5Smrgelse
59701f0ac6a5Smrg  AC_MSG_RESULT(ok)
59711f0ac6a5Smrgfi
59721f0ac6a5Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
59731f0ac6a5Smrg
59741f0ac6a5Smrg
59751f0ac6a5Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
59761f0ac6a5Smrg# ---------------------------------------
59771f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
59781f0ac6a5Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
59791f0ac6a5Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
59801f0ac6a5Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
59811f0ac6a5Smrg
59821f0ac6a5SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
59831f0ac6a5Smrg ifelse([$1],[CXX],[
59841f0ac6a5Smrg  # C++ specific cases for pic, static, wl, etc.
59851f0ac6a5Smrg  if test "$GXX" = yes; then
59861f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
59871f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
59881f0ac6a5Smrg
59891f0ac6a5Smrg    case $host_os in
59901f0ac6a5Smrg    aix*)
59911f0ac6a5Smrg      # All AIX code is PIC.
59921f0ac6a5Smrg      if test "$host_cpu" = ia64; then
59931f0ac6a5Smrg	# AIX 5 now supports IA64 processor
59941f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
59951f0ac6a5Smrg      fi
59961f0ac6a5Smrg      ;;
59971f0ac6a5Smrg    amigaos*)
59981f0ac6a5Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
59991f0ac6a5Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
60001f0ac6a5Smrg      # like `-m68040'.
60011f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
60021f0ac6a5Smrg      ;;
60031f0ac6a5Smrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
60041f0ac6a5Smrg      # PIC is the default for these OSes.
60051f0ac6a5Smrg      ;;
60061f0ac6a5Smrg    mingw* | os2* | pw32*)
60071f0ac6a5Smrg      # This hack is so that the source file can tell whether it is being
60081f0ac6a5Smrg      # built for inclusion in a dll (and should export symbols for example).
60091f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
60101f0ac6a5Smrg      ;;
60111f0ac6a5Smrg    darwin* | rhapsody*)
60121f0ac6a5Smrg      # PIC is the default on this platform
60131f0ac6a5Smrg      # Common symbols not allowed in MH_DYLIB files
60141f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
60151f0ac6a5Smrg      ;;
60161f0ac6a5Smrg    *djgpp*)
60171f0ac6a5Smrg      # DJGPP does not support shared libraries at all
60181f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
60191f0ac6a5Smrg      ;;
60201f0ac6a5Smrg    interix3*)
60211f0ac6a5Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
60221f0ac6a5Smrg      # Instead, we relocate shared libraries at runtime.
60231f0ac6a5Smrg      ;;
60241f0ac6a5Smrg    sysv4*MP*)
60251f0ac6a5Smrg      if test -d /usr/nec; then
60261f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
60271f0ac6a5Smrg      fi
60281f0ac6a5Smrg      ;;
60291f0ac6a5Smrg    hpux*)
60301f0ac6a5Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
60311f0ac6a5Smrg      # not for PA HP-UX.
60321f0ac6a5Smrg      case $host_cpu in
60331f0ac6a5Smrg      hppa*64*|ia64*)
60341f0ac6a5Smrg	;;
60351f0ac6a5Smrg      *)
60361f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
60371f0ac6a5Smrg	;;
60381f0ac6a5Smrg      esac
60391f0ac6a5Smrg      ;;
60401f0ac6a5Smrg    *)
60411f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
60421f0ac6a5Smrg      ;;
60431f0ac6a5Smrg    esac
60441f0ac6a5Smrg  else
60451f0ac6a5Smrg    case $host_os in
60461f0ac6a5Smrg      aix4* | aix5*)
60471f0ac6a5Smrg	# All AIX code is PIC.
60481f0ac6a5Smrg	if test "$host_cpu" = ia64; then
60491f0ac6a5Smrg	  # AIX 5 now supports IA64 processor
60501f0ac6a5Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
60511f0ac6a5Smrg	else
60521f0ac6a5Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
60531f0ac6a5Smrg	fi
60541f0ac6a5Smrg	;;
60551f0ac6a5Smrg      chorus*)
60561f0ac6a5Smrg	case $cc_basename in
60571f0ac6a5Smrg	cxch68*)
60581f0ac6a5Smrg	  # Green Hills C++ Compiler
60591f0ac6a5Smrg	  # _LT_AC_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"
60601f0ac6a5Smrg	  ;;
60611f0ac6a5Smrg	esac
60621f0ac6a5Smrg	;;
60631f0ac6a5Smrg       darwin*)
60641f0ac6a5Smrg         # PIC is the default on this platform
60651f0ac6a5Smrg         # Common symbols not allowed in MH_DYLIB files
60661f0ac6a5Smrg         case $cc_basename in
60671f0ac6a5Smrg           xlc*)
60681f0ac6a5Smrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
60691f0ac6a5Smrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
60701f0ac6a5Smrg           ;;
60711f0ac6a5Smrg         esac
60721f0ac6a5Smrg       ;;
60731f0ac6a5Smrg      dgux*)
60741f0ac6a5Smrg	case $cc_basename in
60751f0ac6a5Smrg	  ec++*)
60761f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
60771f0ac6a5Smrg	    ;;
60781f0ac6a5Smrg	  ghcx*)
60791f0ac6a5Smrg	    # Green Hills C++ Compiler
60801f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
60811f0ac6a5Smrg	    ;;
60821f0ac6a5Smrg	  *)
60831f0ac6a5Smrg	    ;;
60841f0ac6a5Smrg	esac
60851f0ac6a5Smrg	;;
60861f0ac6a5Smrg      freebsd* | kfreebsd*-gnu | dragonfly*)
60871f0ac6a5Smrg	# FreeBSD uses GNU C++
60881f0ac6a5Smrg	;;
60891f0ac6a5Smrg      hpux9* | hpux10* | hpux11*)
60901f0ac6a5Smrg	case $cc_basename in
60911f0ac6a5Smrg	  CC*)
60921f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
60931f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
60941f0ac6a5Smrg	    if test "$host_cpu" != ia64; then
60951f0ac6a5Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
60961f0ac6a5Smrg	    fi
60971f0ac6a5Smrg	    ;;
60981f0ac6a5Smrg	  aCC*)
60991f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
61001f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
61011f0ac6a5Smrg	    case $host_cpu in
61021f0ac6a5Smrg	    hppa*64*|ia64*)
61031f0ac6a5Smrg	      # +Z the default
61041f0ac6a5Smrg	      ;;
61051f0ac6a5Smrg	    *)
61061f0ac6a5Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
61071f0ac6a5Smrg	      ;;
61081f0ac6a5Smrg	    esac
61091f0ac6a5Smrg	    ;;
61101f0ac6a5Smrg	  *)
61111f0ac6a5Smrg	    ;;
61121f0ac6a5Smrg	esac
61131f0ac6a5Smrg	;;
61141f0ac6a5Smrg      interix*)
61151f0ac6a5Smrg	# This is c89, which is MS Visual C++ (no shared libs)
61161f0ac6a5Smrg	# Anyone wants to do a port?
61171f0ac6a5Smrg	;;
61181f0ac6a5Smrg      irix5* | irix6* | nonstopux*)
61191f0ac6a5Smrg	case $cc_basename in
61201f0ac6a5Smrg	  CC*)
61211f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
61221f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
61231f0ac6a5Smrg	    # CC pic flag -KPIC is the default.
61241f0ac6a5Smrg	    ;;
61251f0ac6a5Smrg	  *)
61261f0ac6a5Smrg	    ;;
61271f0ac6a5Smrg	esac
61281f0ac6a5Smrg	;;
61291f0ac6a5Smrg      linux*)
61301f0ac6a5Smrg	case $cc_basename in
61311f0ac6a5Smrg	  KCC*)
61321f0ac6a5Smrg	    # KAI C++ Compiler
61331f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
61341f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
61351f0ac6a5Smrg	    ;;
61361f0ac6a5Smrg	  icpc* | ecpc*)
61371f0ac6a5Smrg	    # Intel C++
61381f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
61391f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
61401f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
61411f0ac6a5Smrg	    ;;
61421f0ac6a5Smrg	  pgCC*)
61431f0ac6a5Smrg	    # Portland Group C++ compiler.
61441f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
61451f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
61461f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
61471f0ac6a5Smrg	    ;;
61481f0ac6a5Smrg	  cxx*)
61491f0ac6a5Smrg	    # Compaq C++
61501f0ac6a5Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
61511f0ac6a5Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
61521f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
61531f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
61541f0ac6a5Smrg	    ;;
61551f0ac6a5Smrg	  *)
61561f0ac6a5Smrg	    ;;
61571f0ac6a5Smrg	esac
61581f0ac6a5Smrg	;;
61591f0ac6a5Smrg      lynxos*)
61601f0ac6a5Smrg	;;
61611f0ac6a5Smrg      m88k*)
61621f0ac6a5Smrg	;;
61631f0ac6a5Smrg      mvs*)
61641f0ac6a5Smrg	case $cc_basename in
61651f0ac6a5Smrg	  cxx*)
61661f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
61671f0ac6a5Smrg	    ;;
61681f0ac6a5Smrg	  *)
61691f0ac6a5Smrg	    ;;
61701f0ac6a5Smrg	esac
61711f0ac6a5Smrg	;;
61721f0ac6a5Smrg      netbsd*)
61731f0ac6a5Smrg	;;
61741f0ac6a5Smrg      osf3* | osf4* | osf5*)
61751f0ac6a5Smrg	case $cc_basename in
61761f0ac6a5Smrg	  KCC*)
61771f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
61781f0ac6a5Smrg	    ;;
61791f0ac6a5Smrg	  RCC*)
61801f0ac6a5Smrg	    # Rational C++ 2.4.1
61811f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
61821f0ac6a5Smrg	    ;;
61831f0ac6a5Smrg	  cxx*)
61841f0ac6a5Smrg	    # Digital/Compaq C++
61851f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
61861f0ac6a5Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
61871f0ac6a5Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
61881f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
61891f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
61901f0ac6a5Smrg	    ;;
61911f0ac6a5Smrg	  *)
61921f0ac6a5Smrg	    ;;
61931f0ac6a5Smrg	esac
61941f0ac6a5Smrg	;;
61951f0ac6a5Smrg      psos*)
61961f0ac6a5Smrg	;;
61971f0ac6a5Smrg      solaris*)
61981f0ac6a5Smrg	case $cc_basename in
61991f0ac6a5Smrg	  CC*)
62001f0ac6a5Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
62011f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
62021f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
62031f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
62041f0ac6a5Smrg	    ;;
62051f0ac6a5Smrg	  gcx*)
62061f0ac6a5Smrg	    # Green Hills C++ Compiler
62071f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
62081f0ac6a5Smrg	    ;;
62091f0ac6a5Smrg	  *)
62101f0ac6a5Smrg	    ;;
62111f0ac6a5Smrg	esac
62121f0ac6a5Smrg	;;
62131f0ac6a5Smrg      sunos4*)
62141f0ac6a5Smrg	case $cc_basename in
62151f0ac6a5Smrg	  CC*)
62161f0ac6a5Smrg	    # Sun C++ 4.x
62171f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
62181f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
62191f0ac6a5Smrg	    ;;
62201f0ac6a5Smrg	  lcc*)
62211f0ac6a5Smrg	    # Lucid
62221f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
62231f0ac6a5Smrg	    ;;
62241f0ac6a5Smrg	  *)
62251f0ac6a5Smrg	    ;;
62261f0ac6a5Smrg	esac
62271f0ac6a5Smrg	;;
62281f0ac6a5Smrg      tandem*)
62291f0ac6a5Smrg	case $cc_basename in
62301f0ac6a5Smrg	  NCC*)
62311f0ac6a5Smrg	    # NonStop-UX NCC 3.20
62321f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
62331f0ac6a5Smrg	    ;;
62341f0ac6a5Smrg	  *)
62351f0ac6a5Smrg	    ;;
62361f0ac6a5Smrg	esac
62371f0ac6a5Smrg	;;
62381f0ac6a5Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
62391f0ac6a5Smrg	case $cc_basename in
62401f0ac6a5Smrg	  CC*)
62411f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
62421f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
62431f0ac6a5Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
62441f0ac6a5Smrg	    ;;
62451f0ac6a5Smrg	esac
62461f0ac6a5Smrg	;;
62471f0ac6a5Smrg      vxworks*)
62481f0ac6a5Smrg	;;
62491f0ac6a5Smrg      *)
62501f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
62511f0ac6a5Smrg	;;
62521f0ac6a5Smrg    esac
62531f0ac6a5Smrg  fi
62541f0ac6a5Smrg],
62551f0ac6a5Smrg[
62561f0ac6a5Smrg  if test "$GCC" = yes; then
62571f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
62581f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
62591f0ac6a5Smrg
62601f0ac6a5Smrg    case $host_os in
62611f0ac6a5Smrg      aix*)
62621f0ac6a5Smrg      # All AIX code is PIC.
62631f0ac6a5Smrg      if test "$host_cpu" = ia64; then
62641f0ac6a5Smrg	# AIX 5 now supports IA64 processor
62651f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
62661f0ac6a5Smrg      fi
62671f0ac6a5Smrg      ;;
62681f0ac6a5Smrg
62691f0ac6a5Smrg    amigaos*)
62701f0ac6a5Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
62711f0ac6a5Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
62721f0ac6a5Smrg      # like `-m68040'.
62731f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
62741f0ac6a5Smrg      ;;
62751f0ac6a5Smrg
62761f0ac6a5Smrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
62771f0ac6a5Smrg      # PIC is the default for these OSes.
62781f0ac6a5Smrg      ;;
62791f0ac6a5Smrg
62801f0ac6a5Smrg    mingw* | pw32* | os2*)
62811f0ac6a5Smrg      # This hack is so that the source file can tell whether it is being
62821f0ac6a5Smrg      # built for inclusion in a dll (and should export symbols for example).
62831f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
62841f0ac6a5Smrg      ;;
62851f0ac6a5Smrg
62861f0ac6a5Smrg    darwin* | rhapsody*)
62871f0ac6a5Smrg      # PIC is the default on this platform
62881f0ac6a5Smrg      # Common symbols not allowed in MH_DYLIB files
62891f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
62901f0ac6a5Smrg      ;;
62911f0ac6a5Smrg
62921f0ac6a5Smrg    interix3*)
62931f0ac6a5Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
62941f0ac6a5Smrg      # Instead, we relocate shared libraries at runtime.
62951f0ac6a5Smrg      ;;
62961f0ac6a5Smrg
62971f0ac6a5Smrg    msdosdjgpp*)
62981f0ac6a5Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
62991f0ac6a5Smrg      # on systems that don't support them.
63001f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
63011f0ac6a5Smrg      enable_shared=no
63021f0ac6a5Smrg      ;;
63031f0ac6a5Smrg
63041f0ac6a5Smrg    sysv4*MP*)
63051f0ac6a5Smrg      if test -d /usr/nec; then
63061f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
63071f0ac6a5Smrg      fi
63081f0ac6a5Smrg      ;;
63091f0ac6a5Smrg
63101f0ac6a5Smrg    hpux*)
63111f0ac6a5Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
63121f0ac6a5Smrg      # not for PA HP-UX.
63131f0ac6a5Smrg      case $host_cpu in
63141f0ac6a5Smrg      hppa*64*|ia64*)
63151f0ac6a5Smrg	# +Z the default
63161f0ac6a5Smrg	;;
63171f0ac6a5Smrg      *)
63181f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
63191f0ac6a5Smrg	;;
63201f0ac6a5Smrg      esac
63211f0ac6a5Smrg      ;;
63221f0ac6a5Smrg
63231f0ac6a5Smrg    *)
63241f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
63251f0ac6a5Smrg      ;;
63261f0ac6a5Smrg    esac
63271f0ac6a5Smrg  else
63281f0ac6a5Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
63291f0ac6a5Smrg    case $host_os in
63301f0ac6a5Smrg    aix*)
63311f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
63321f0ac6a5Smrg      if test "$host_cpu" = ia64; then
63331f0ac6a5Smrg	# AIX 5 now supports IA64 processor
63341f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
63351f0ac6a5Smrg      else
63361f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
63371f0ac6a5Smrg      fi
63381f0ac6a5Smrg      ;;
63391f0ac6a5Smrg      darwin*)
63401f0ac6a5Smrg        # PIC is the default on this platform
63411f0ac6a5Smrg        # Common symbols not allowed in MH_DYLIB files
63421f0ac6a5Smrg       case $cc_basename in
63431f0ac6a5Smrg         xlc*)
63441f0ac6a5Smrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
63451f0ac6a5Smrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
63461f0ac6a5Smrg         ;;
63471f0ac6a5Smrg       esac
63481f0ac6a5Smrg       ;;
63491f0ac6a5Smrg
63501f0ac6a5Smrg    mingw* | pw32* | os2*)
63511f0ac6a5Smrg      # This hack is so that the source file can tell whether it is being
63521f0ac6a5Smrg      # built for inclusion in a dll (and should export symbols for example).
63531f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
63541f0ac6a5Smrg      ;;
63551f0ac6a5Smrg
63561f0ac6a5Smrg    hpux9* | hpux10* | hpux11*)
63571f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
63581f0ac6a5Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
63591f0ac6a5Smrg      # not for PA HP-UX.
63601f0ac6a5Smrg      case $host_cpu in
63611f0ac6a5Smrg      hppa*64*|ia64*)
63621f0ac6a5Smrg	# +Z the default
63631f0ac6a5Smrg	;;
63641f0ac6a5Smrg      *)
63651f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
63661f0ac6a5Smrg	;;
63671f0ac6a5Smrg      esac
63681f0ac6a5Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
63691f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
63701f0ac6a5Smrg      ;;
63711f0ac6a5Smrg
63721f0ac6a5Smrg    irix5* | irix6* | nonstopux*)
63731f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
63741f0ac6a5Smrg      # PIC (with -KPIC) is the default.
63751f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
63761f0ac6a5Smrg      ;;
63771f0ac6a5Smrg
63781f0ac6a5Smrg    newsos6)
63791f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
63801f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
63811f0ac6a5Smrg      ;;
63821f0ac6a5Smrg
63831f0ac6a5Smrg    linux*)
63841f0ac6a5Smrg      case $cc_basename in
63851f0ac6a5Smrg      icc* | ecc*)
63861f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
63871f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
63881f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
63891f0ac6a5Smrg        ;;
63901f0ac6a5Smrg      pgcc* | pgf77* | pgf90* | pgf95*)
63911f0ac6a5Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
63921f0ac6a5Smrg	# which looks to be a dead project)
63931f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
63941f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
63951f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
63961f0ac6a5Smrg        ;;
63971f0ac6a5Smrg      ccc*)
63981f0ac6a5Smrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
63991f0ac6a5Smrg        # All Alpha code is PIC.
64001f0ac6a5Smrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
64011f0ac6a5Smrg        ;;
64021f0ac6a5Smrg      esac
64031f0ac6a5Smrg      ;;
64041f0ac6a5Smrg
64051f0ac6a5Smrg    osf3* | osf4* | osf5*)
64061f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
64071f0ac6a5Smrg      # All OSF/1 code is PIC.
64081f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
64091f0ac6a5Smrg      ;;
64101f0ac6a5Smrg
64111f0ac6a5Smrg    solaris*)
64121f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
64131f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
64141f0ac6a5Smrg      case $cc_basename in
64151f0ac6a5Smrg      f77* | f90* | f95*)
64161f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
64171f0ac6a5Smrg      *)
64181f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
64191f0ac6a5Smrg      esac
64201f0ac6a5Smrg      ;;
64211f0ac6a5Smrg
64221f0ac6a5Smrg    sunos4*)
64231f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
64241f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
64251f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
64261f0ac6a5Smrg      ;;
64271f0ac6a5Smrg
64281f0ac6a5Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
64291f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
64301f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
64311f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
64321f0ac6a5Smrg      ;;
64331f0ac6a5Smrg
64341f0ac6a5Smrg    sysv4*MP*)
64351f0ac6a5Smrg      if test -d /usr/nec ;then
64361f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
64371f0ac6a5Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
64381f0ac6a5Smrg      fi
64391f0ac6a5Smrg      ;;
64401f0ac6a5Smrg
64411f0ac6a5Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
64421f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
64431f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
64441f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
64451f0ac6a5Smrg      ;;
64461f0ac6a5Smrg
64471f0ac6a5Smrg    unicos*)
64481f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
64491f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
64501f0ac6a5Smrg      ;;
64511f0ac6a5Smrg
64521f0ac6a5Smrg    uts4*)
64531f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
64541f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
64551f0ac6a5Smrg      ;;
64561f0ac6a5Smrg
64571f0ac6a5Smrg    *)
64581f0ac6a5Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
64591f0ac6a5Smrg      ;;
64601f0ac6a5Smrg    esac
64611f0ac6a5Smrg  fi
64621f0ac6a5Smrg])
64631f0ac6a5SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
64641f0ac6a5Smrg
64651f0ac6a5Smrg#
64661f0ac6a5Smrg# Check to make sure the PIC flag actually works.
64671f0ac6a5Smrg#
64681f0ac6a5Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
64691f0ac6a5Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
64701f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
64711f0ac6a5Smrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
64721f0ac6a5Smrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
64731f0ac6a5Smrg     "" | " "*) ;;
64741f0ac6a5Smrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
64751f0ac6a5Smrg     esac],
64761f0ac6a5Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
64771f0ac6a5Smrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
64781f0ac6a5Smrgfi
64791f0ac6a5Smrgcase $host_os in
64801f0ac6a5Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
64811f0ac6a5Smrg  *djgpp*)
64821f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
64831f0ac6a5Smrg    ;;
64841f0ac6a5Smrg  *)
64851f0ac6a5Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
64861f0ac6a5Smrg    ;;
64871f0ac6a5Smrgesac
64881f0ac6a5Smrg
64891f0ac6a5Smrg#
64901f0ac6a5Smrg# Check to make sure the static flag actually works.
64911f0ac6a5Smrg#
64921f0ac6a5Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
64931f0ac6a5SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
64941f0ac6a5Smrg  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
64951f0ac6a5Smrg  $lt_tmp_static_flag,
64961f0ac6a5Smrg  [],
64971f0ac6a5Smrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
64981f0ac6a5Smrg])
64991f0ac6a5Smrg
65001f0ac6a5Smrg
65011f0ac6a5Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
65021f0ac6a5Smrg# ------------------------------------
65031f0ac6a5Smrg# See if the linker supports building shared libraries.
65041f0ac6a5SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
65051f0ac6a5Smrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
65061f0ac6a5Smrgifelse([$1],[CXX],[
65071f0ac6a5Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
65081f0ac6a5Smrg  case $host_os in
65091f0ac6a5Smrg  aix4* | aix5*)
65101f0ac6a5Smrg    # If we're using GNU nm, then we don't want the "-C" option.
65111f0ac6a5Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
65121f0ac6a5Smrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
65131f0ac6a5Smrg      _LT_AC_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'
65141f0ac6a5Smrg    else
65151f0ac6a5Smrg      _LT_AC_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'
65161f0ac6a5Smrg    fi
65171f0ac6a5Smrg    ;;
65181f0ac6a5Smrg  pw32*)
65191f0ac6a5Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
65201f0ac6a5Smrg  ;;
65211f0ac6a5Smrg  cygwin* | mingw*)
65221f0ac6a5Smrg    _LT_AC_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'
65231f0ac6a5Smrg  ;;
65241f0ac6a5Smrg  *)
65251f0ac6a5Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
65261f0ac6a5Smrg  ;;
65271f0ac6a5Smrg  esac
65281f0ac6a5Smrg],[
65291f0ac6a5Smrg  runpath_var=
65301f0ac6a5Smrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
65311f0ac6a5Smrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
65321f0ac6a5Smrg  _LT_AC_TAGVAR(archive_cmds, $1)=
65331f0ac6a5Smrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
65341f0ac6a5Smrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
65351f0ac6a5Smrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
65361f0ac6a5Smrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
65371f0ac6a5Smrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
65381f0ac6a5Smrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
65391f0ac6a5Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
65401f0ac6a5Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
65411f0ac6a5Smrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
65421f0ac6a5Smrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
65431f0ac6a5Smrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
65441f0ac6a5Smrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
65451f0ac6a5Smrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
65461f0ac6a5Smrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
65471f0ac6a5Smrg  _LT_AC_TAGVAR(module_cmds, $1)=
65481f0ac6a5Smrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
65491f0ac6a5Smrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
65501f0ac6a5Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
65511f0ac6a5Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
65521f0ac6a5Smrg  # included in the symbol list
65531f0ac6a5Smrg  _LT_AC_TAGVAR(include_expsyms, $1)=
65541f0ac6a5Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
65551f0ac6a5Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
65561f0ac6a5Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
65571f0ac6a5Smrg  # as well as any symbol that contains `d'.
65581f0ac6a5Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
65591f0ac6a5Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
65601f0ac6a5Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
65611f0ac6a5Smrg  # the symbol is explicitly referenced.  Since portable code cannot
65621f0ac6a5Smrg  # rely on this symbol name, it's probably fine to never include it in
65631f0ac6a5Smrg  # preloaded symbol tables.
65641f0ac6a5Smrg  extract_expsyms_cmds=
65651f0ac6a5Smrg  # Just being paranoid about ensuring that cc_basename is set.
65661f0ac6a5Smrg  _LT_CC_BASENAME([$compiler])
65671f0ac6a5Smrg  case $host_os in
65681f0ac6a5Smrg  cygwin* | mingw* | pw32*)
65691f0ac6a5Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
65701f0ac6a5Smrg    # When not using gcc, we currently assume that we are using
65711f0ac6a5Smrg    # Microsoft Visual C++.
65721f0ac6a5Smrg    if test "$GCC" != yes; then
65731f0ac6a5Smrg      with_gnu_ld=no
65741f0ac6a5Smrg    fi
65751f0ac6a5Smrg    ;;
65761f0ac6a5Smrg  interix*)
65771f0ac6a5Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
65781f0ac6a5Smrg    with_gnu_ld=yes
65791f0ac6a5Smrg    ;;
65801f0ac6a5Smrg  openbsd*)
65811f0ac6a5Smrg    with_gnu_ld=no
65821f0ac6a5Smrg    ;;
65831f0ac6a5Smrg  esac
65841f0ac6a5Smrg
65851f0ac6a5Smrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
65861f0ac6a5Smrg  if test "$with_gnu_ld" = yes; then
65871f0ac6a5Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
65881f0ac6a5Smrg    wlarc='${wl}'
65891f0ac6a5Smrg
65901f0ac6a5Smrg    # Set some defaults for GNU ld with shared library support. These
65911f0ac6a5Smrg    # are reset later if shared libraries are not supported. Putting them
65921f0ac6a5Smrg    # here allows them to be overridden if necessary.
65931f0ac6a5Smrg    runpath_var=LD_RUN_PATH
65941f0ac6a5Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
65951f0ac6a5Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
65961f0ac6a5Smrg    # ancient GNU ld didn't support --whole-archive et. al.
65971f0ac6a5Smrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
65981f0ac6a5Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
65991f0ac6a5Smrg      else
66001f0ac6a5Smrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
66011f0ac6a5Smrg    fi
66021f0ac6a5Smrg    supports_anon_versioning=no
66031f0ac6a5Smrg    case `$LD -v 2>/dev/null` in
66041f0ac6a5Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
66051f0ac6a5Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
66061f0ac6a5Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
66071f0ac6a5Smrg      *\ 2.11.*) ;; # other 2.11 versions
66081f0ac6a5Smrg      *) supports_anon_versioning=yes ;;
66091f0ac6a5Smrg    esac
66101f0ac6a5Smrg
66111f0ac6a5Smrg    # See if GNU ld supports shared libraries.
66121f0ac6a5Smrg    case $host_os in
66131f0ac6a5Smrg    aix3* | aix4* | aix5*)
66141f0ac6a5Smrg      # On AIX/PPC, the GNU linker is very broken
66151f0ac6a5Smrg      if test "$host_cpu" != ia64; then
66161f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
66171f0ac6a5Smrg	cat <<EOF 1>&2
66181f0ac6a5Smrg
66191f0ac6a5Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
66201f0ac6a5Smrg*** to be unable to reliably create shared libraries on AIX.
66211f0ac6a5Smrg*** Therefore, libtool is disabling shared libraries support.  If you
66221f0ac6a5Smrg*** really care for shared libraries, you may want to modify your PATH
66231f0ac6a5Smrg*** so that a non-GNU linker is found, and then restart.
66241f0ac6a5Smrg
66251f0ac6a5SmrgEOF
66261f0ac6a5Smrg      fi
66271f0ac6a5Smrg      ;;
66281f0ac6a5Smrg
66291f0ac6a5Smrg    amigaos*)
66301f0ac6a5Smrg      _LT_AC_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)'
66311f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
66321f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
66331f0ac6a5Smrg
66341f0ac6a5Smrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
66351f0ac6a5Smrg      # that the semantics of dynamic libraries on AmigaOS, at least up
66361f0ac6a5Smrg      # to version 4, is to share data among multiple programs linked
66371f0ac6a5Smrg      # with the same dynamic library.  Since this doesn't match the
66381f0ac6a5Smrg      # behavior of shared libraries on other platforms, we can't use
66391f0ac6a5Smrg      # them.
66401f0ac6a5Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
66411f0ac6a5Smrg      ;;
66421f0ac6a5Smrg
66431f0ac6a5Smrg    beos*)
66441f0ac6a5Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
66451f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
66461f0ac6a5Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
66471f0ac6a5Smrg	# support --undefined.  This deserves some investigation.  FIXME
66481f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
66491f0ac6a5Smrg      else
66501f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
66511f0ac6a5Smrg      fi
66521f0ac6a5Smrg      ;;
66531f0ac6a5Smrg
66541f0ac6a5Smrg    cygwin* | mingw* | pw32*)
66551f0ac6a5Smrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
66561f0ac6a5Smrg      # as there is no search path for DLLs.
66571f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
66581f0ac6a5Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
66591f0ac6a5Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
66601f0ac6a5Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
66611f0ac6a5Smrg      _LT_AC_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'
66621f0ac6a5Smrg
66631f0ac6a5Smrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
66641f0ac6a5Smrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
66651f0ac6a5Smrg	# If the export-symbols file already is a .def file (1st line
66661f0ac6a5Smrg	# is EXPORTS), use it as is; otherwise, prepend...
66671f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
66681f0ac6a5Smrg	  cp $export_symbols $output_objdir/$soname.def;
66691f0ac6a5Smrg	else
66701f0ac6a5Smrg	  echo EXPORTS > $output_objdir/$soname.def;
66711f0ac6a5Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
66721f0ac6a5Smrg	fi~
66731f0ac6a5Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
66741f0ac6a5Smrg      else
66751f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
66761f0ac6a5Smrg      fi
66771f0ac6a5Smrg      ;;
66781f0ac6a5Smrg
66791f0ac6a5Smrg    interix3*)
66801f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
66811f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
66821f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
66831f0ac6a5Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
66841f0ac6a5Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
66851f0ac6a5Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
66861f0ac6a5Smrg      # default) and relocated if they conflict, which is a slow very memory
66871f0ac6a5Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
66881f0ac6a5Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
66891f0ac6a5Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
66901f0ac6a5Smrg      _LT_AC_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'
66911f0ac6a5Smrg      _LT_AC_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'
66921f0ac6a5Smrg      ;;
66931f0ac6a5Smrg
66941f0ac6a5Smrg    linux*)
66951f0ac6a5Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
66961f0ac6a5Smrg	tmp_addflag=
66971f0ac6a5Smrg	case $cc_basename,$host_cpu in
66981f0ac6a5Smrg	pgcc*)				# Portland Group C compiler
66991f0ac6a5Smrg	  _LT_AC_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'
67001f0ac6a5Smrg	  tmp_addflag=' $pic_flag'
67011f0ac6a5Smrg	  ;;
67021f0ac6a5Smrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
67031f0ac6a5Smrg	  _LT_AC_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'
67041f0ac6a5Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
67051f0ac6a5Smrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
67061f0ac6a5Smrg	  tmp_addflag=' -i_dynamic' ;;
67071f0ac6a5Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
67081f0ac6a5Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
67091f0ac6a5Smrg	ifc* | ifort*)			# Intel Fortran compiler
67101f0ac6a5Smrg	  tmp_addflag=' -nofor_main' ;;
67111f0ac6a5Smrg	esac
67121f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
67131f0ac6a5Smrg
67141f0ac6a5Smrg	if test $supports_anon_versioning = yes; then
67151f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
67161f0ac6a5Smrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
67171f0ac6a5Smrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
67181f0ac6a5Smrg	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
67191f0ac6a5Smrg	fi
67201f0ac6a5Smrg      else
67211f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
67221f0ac6a5Smrg      fi
67231f0ac6a5Smrg      ;;
67241f0ac6a5Smrg
67251f0ac6a5Smrg    netbsd*)
67261f0ac6a5Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
67271f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
67281f0ac6a5Smrg	wlarc=
67291f0ac6a5Smrg      else
67301f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
67311f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
67321f0ac6a5Smrg      fi
67331f0ac6a5Smrg      ;;
67341f0ac6a5Smrg
67351f0ac6a5Smrg    solaris*)
67361f0ac6a5Smrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
67371f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
67381f0ac6a5Smrg	cat <<EOF 1>&2
67391f0ac6a5Smrg
67401f0ac6a5Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
67411f0ac6a5Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
67421f0ac6a5Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
67431f0ac6a5Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
67441f0ac6a5Smrg*** your PATH or compiler configuration so that the native linker is
67451f0ac6a5Smrg*** used, and then restart.
67461f0ac6a5Smrg
67471f0ac6a5SmrgEOF
67481f0ac6a5Smrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
67491f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
67501f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
67511f0ac6a5Smrg      else
67521f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
67531f0ac6a5Smrg      fi
67541f0ac6a5Smrg      ;;
67551f0ac6a5Smrg
67561f0ac6a5Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
67571f0ac6a5Smrg      case `$LD -v 2>&1` in
67581f0ac6a5Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
67591f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
67601f0ac6a5Smrg	cat <<_LT_EOF 1>&2
67611f0ac6a5Smrg
67621f0ac6a5Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
67631f0ac6a5Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
67641f0ac6a5Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
67651f0ac6a5Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
67661f0ac6a5Smrg*** your PATH or compiler configuration so that the native linker is
67671f0ac6a5Smrg*** used, and then restart.
67681f0ac6a5Smrg
67691f0ac6a5Smrg_LT_EOF
67701f0ac6a5Smrg	;;
67711f0ac6a5Smrg	*)
67721f0ac6a5Smrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
67731f0ac6a5Smrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
67741f0ac6a5Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
67751f0ac6a5Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
67761f0ac6a5Smrg	  else
67771f0ac6a5Smrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
67781f0ac6a5Smrg	  fi
67791f0ac6a5Smrg	;;
67801f0ac6a5Smrg      esac
67811f0ac6a5Smrg      ;;
67821f0ac6a5Smrg
67831f0ac6a5Smrg    sunos4*)
67841f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
67851f0ac6a5Smrg      wlarc=
67861f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
67871f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
67881f0ac6a5Smrg      ;;
67891f0ac6a5Smrg
67901f0ac6a5Smrg    *)
67911f0ac6a5Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
67921f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
67931f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
67941f0ac6a5Smrg      else
67951f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
67961f0ac6a5Smrg      fi
67971f0ac6a5Smrg      ;;
67981f0ac6a5Smrg    esac
67991f0ac6a5Smrg
68001f0ac6a5Smrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
68011f0ac6a5Smrg      runpath_var=
68021f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
68031f0ac6a5Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
68041f0ac6a5Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
68051f0ac6a5Smrg    fi
68061f0ac6a5Smrg  else
68071f0ac6a5Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
68081f0ac6a5Smrg    case $host_os in
68091f0ac6a5Smrg    aix3*)
68101f0ac6a5Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
68111f0ac6a5Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
68121f0ac6a5Smrg      _LT_AC_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'
68131f0ac6a5Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
68141f0ac6a5Smrg      # are no directories specified by -L.
68151f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
68161f0ac6a5Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
68171f0ac6a5Smrg	# Neither direct hardcoding nor static linking is supported with a
68181f0ac6a5Smrg	# broken collect2.
68191f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
68201f0ac6a5Smrg      fi
68211f0ac6a5Smrg      ;;
68221f0ac6a5Smrg
68231f0ac6a5Smrg    aix4* | aix5*)
68241f0ac6a5Smrg      if test "$host_cpu" = ia64; then
68251f0ac6a5Smrg	# On IA64, the linker does run time linking by default, so we don't
68261f0ac6a5Smrg	# have to do anything special.
68271f0ac6a5Smrg	aix_use_runtimelinking=no
68281f0ac6a5Smrg	exp_sym_flag='-Bexport'
68291f0ac6a5Smrg	no_entry_flag=""
68301f0ac6a5Smrg      else
68311f0ac6a5Smrg	# If we're using GNU nm, then we don't want the "-C" option.
68321f0ac6a5Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
68331f0ac6a5Smrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
68341f0ac6a5Smrg	  _LT_AC_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'
68351f0ac6a5Smrg	else
68361f0ac6a5Smrg	  _LT_AC_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'
68371f0ac6a5Smrg	fi
68381f0ac6a5Smrg	aix_use_runtimelinking=no
68391f0ac6a5Smrg
68401f0ac6a5Smrg	# Test if we are trying to use run time linking or normal
68411f0ac6a5Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
68421f0ac6a5Smrg	# need to do runtime linking.
68431f0ac6a5Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
68441f0ac6a5Smrg	  for ld_flag in $LDFLAGS; do
68451f0ac6a5Smrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
68461f0ac6a5Smrg  	    aix_use_runtimelinking=yes
68471f0ac6a5Smrg  	    break
68481f0ac6a5Smrg  	  fi
68491f0ac6a5Smrg	  done
68501f0ac6a5Smrg	  ;;
68511f0ac6a5Smrg	esac
68521f0ac6a5Smrg
68531f0ac6a5Smrg	exp_sym_flag='-bexport'
68541f0ac6a5Smrg	no_entry_flag='-bnoentry'
68551f0ac6a5Smrg      fi
68561f0ac6a5Smrg
68571f0ac6a5Smrg      # When large executables or shared objects are built, AIX ld can
68581f0ac6a5Smrg      # have problems creating the table of contents.  If linking a library
68591f0ac6a5Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
68601f0ac6a5Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
68611f0ac6a5Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
68621f0ac6a5Smrg
68631f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
68641f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
68651f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
68661f0ac6a5Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
68671f0ac6a5Smrg
68681f0ac6a5Smrg      if test "$GCC" = yes; then
68691f0ac6a5Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
68701f0ac6a5Smrg	# We only want to do this on AIX 4.2 and lower, the check
68711f0ac6a5Smrg	# below for broken collect2 doesn't work under 4.3+
68721f0ac6a5Smrg	  collect2name=`${CC} -print-prog-name=collect2`
68731f0ac6a5Smrg	  if test -f "$collect2name" && \
68741f0ac6a5Smrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
68751f0ac6a5Smrg	  then
68761f0ac6a5Smrg  	  # We have reworked collect2
68771f0ac6a5Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
68781f0ac6a5Smrg	  else
68791f0ac6a5Smrg  	  # We have old collect2
68801f0ac6a5Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
68811f0ac6a5Smrg  	  # It fails to find uninstalled libraries when the uninstalled
68821f0ac6a5Smrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
68831f0ac6a5Smrg  	  # to unsupported forces relinking
68841f0ac6a5Smrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
68851f0ac6a5Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
68861f0ac6a5Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
68871f0ac6a5Smrg	  fi
68881f0ac6a5Smrg	  ;;
68891f0ac6a5Smrg	esac
68901f0ac6a5Smrg	shared_flag='-shared'
68911f0ac6a5Smrg	if test "$aix_use_runtimelinking" = yes; then
68921f0ac6a5Smrg	  shared_flag="$shared_flag "'${wl}-G'
68931f0ac6a5Smrg	fi
68941f0ac6a5Smrg      else
68951f0ac6a5Smrg	# not using gcc
68961f0ac6a5Smrg	if test "$host_cpu" = ia64; then
68971f0ac6a5Smrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
68981f0ac6a5Smrg  	# chokes on -Wl,-G. The following line is correct:
68991f0ac6a5Smrg	  shared_flag='-G'
69001f0ac6a5Smrg	else
69011f0ac6a5Smrg	  if test "$aix_use_runtimelinking" = yes; then
69021f0ac6a5Smrg	    shared_flag='${wl}-G'
69031f0ac6a5Smrg	  else
69041f0ac6a5Smrg	    shared_flag='${wl}-bM:SRE'
69051f0ac6a5Smrg	  fi
69061f0ac6a5Smrg	fi
69071f0ac6a5Smrg      fi
69081f0ac6a5Smrg
69091f0ac6a5Smrg      # It seems that -bexpall does not export symbols beginning with
69101f0ac6a5Smrg      # underscore (_), so it is better to generate a list of symbols to export.
69111f0ac6a5Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
69121f0ac6a5Smrg      if test "$aix_use_runtimelinking" = yes; then
69131f0ac6a5Smrg	# Warning - without using the other runtime loading flags (-brtl),
69141f0ac6a5Smrg	# -berok will link without error, but may produce a broken library.
69151f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
69161f0ac6a5Smrg       # Determine the default libpath from the value encoded in an empty executable.
69171f0ac6a5Smrg       _LT_AC_SYS_LIBPATH_AIX
69181f0ac6a5Smrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
69191f0ac6a5Smrg	_LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
69201f0ac6a5Smrg       else
69211f0ac6a5Smrg	if test "$host_cpu" = ia64; then
69221f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
69231f0ac6a5Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
69241f0ac6a5Smrg	  _LT_AC_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"
69251f0ac6a5Smrg	else
69261f0ac6a5Smrg	 # Determine the default libpath from the value encoded in an empty executable.
69271f0ac6a5Smrg	 _LT_AC_SYS_LIBPATH_AIX
69281f0ac6a5Smrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
69291f0ac6a5Smrg	  # Warning - without using the other run time loading flags,
69301f0ac6a5Smrg	  # -berok will link without error, but may produce a broken library.
69311f0ac6a5Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
69321f0ac6a5Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
69331f0ac6a5Smrg	  # Exported symbols can be pulled into shared objects from archives
69341f0ac6a5Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
69351f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
69361f0ac6a5Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
69371f0ac6a5Smrg	  _LT_AC_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'
69381f0ac6a5Smrg	fi
69391f0ac6a5Smrg      fi
69401f0ac6a5Smrg      ;;
69411f0ac6a5Smrg
69421f0ac6a5Smrg    amigaos*)
69431f0ac6a5Smrg      _LT_AC_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)'
69441f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
69451f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
69461f0ac6a5Smrg      # see comment about different semantics on the GNU ld section
69471f0ac6a5Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
69481f0ac6a5Smrg      ;;
69491f0ac6a5Smrg
69501f0ac6a5Smrg    bsdi[[45]]*)
69511f0ac6a5Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
69521f0ac6a5Smrg      ;;
69531f0ac6a5Smrg
69541f0ac6a5Smrg    cygwin* | mingw* | pw32*)
69551f0ac6a5Smrg      # When not using gcc, we currently assume that we are using
69561f0ac6a5Smrg      # Microsoft Visual C++.
69571f0ac6a5Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
69581f0ac6a5Smrg      # no search path for DLLs.
69591f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
69601f0ac6a5Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
69611f0ac6a5Smrg      # Tell ltmain to make .lib files, not .a files.
69621f0ac6a5Smrg      libext=lib
69631f0ac6a5Smrg      # Tell ltmain to make .dll files, not .so files.
69641f0ac6a5Smrg      shrext_cmds=".dll"
69651f0ac6a5Smrg      # FIXME: Setting linknames here is a bad hack.
69661f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
69671f0ac6a5Smrg      # The linker will automatically build a .lib file if we build a DLL.
69681f0ac6a5Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
69691f0ac6a5Smrg      # FIXME: Should let the user specify the lib program.
69701f0ac6a5Smrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
69711f0ac6a5Smrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
69721f0ac6a5Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
69731f0ac6a5Smrg      ;;
69741f0ac6a5Smrg
69751f0ac6a5Smrg    darwin* | rhapsody*)
69761f0ac6a5Smrg      case $host_os in
69771f0ac6a5Smrg        rhapsody* | darwin1.[[012]])
69781f0ac6a5Smrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
69791f0ac6a5Smrg         ;;
69801f0ac6a5Smrg       *) # Darwin 1.3 on
69811f0ac6a5Smrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
69821f0ac6a5Smrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
69831f0ac6a5Smrg         else
69841f0ac6a5Smrg           case ${MACOSX_DEPLOYMENT_TARGET} in
69851f0ac6a5Smrg             10.[[012]])
69861f0ac6a5Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
69871f0ac6a5Smrg               ;;
69881f0ac6a5Smrg             10.*)
69891f0ac6a5Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
69901f0ac6a5Smrg               ;;
69911f0ac6a5Smrg           esac
69921f0ac6a5Smrg         fi
69931f0ac6a5Smrg         ;;
69941f0ac6a5Smrg      esac
69951f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
69961f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
69971f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
69981f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
69991f0ac6a5Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
70001f0ac6a5Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
70011f0ac6a5Smrg    if test "$GCC" = yes ; then
70021f0ac6a5Smrg    	output_verbose_link_cmd='echo'
70031f0ac6a5Smrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
70041f0ac6a5Smrg      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
70051f0ac6a5Smrg      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
70061f0ac6a5Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
70071f0ac6a5Smrg      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
70081f0ac6a5Smrg    else
70091f0ac6a5Smrg      case $cc_basename in
70101f0ac6a5Smrg        xlc*)
70111f0ac6a5Smrg         output_verbose_link_cmd='echo'
70121f0ac6a5Smrg         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
70131f0ac6a5Smrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
70141f0ac6a5Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
70151f0ac6a5Smrg         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
70161f0ac6a5Smrg          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
70171f0ac6a5Smrg          ;;
70181f0ac6a5Smrg       *)
70191f0ac6a5Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
70201f0ac6a5Smrg          ;;
70211f0ac6a5Smrg      esac
70221f0ac6a5Smrg    fi
70231f0ac6a5Smrg      ;;
70241f0ac6a5Smrg
70251f0ac6a5Smrg    dgux*)
70261f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
70271f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
70281f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
70291f0ac6a5Smrg      ;;
70301f0ac6a5Smrg
70311f0ac6a5Smrg    freebsd1*)
70321f0ac6a5Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
70331f0ac6a5Smrg      ;;
70341f0ac6a5Smrg
70351f0ac6a5Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
70361f0ac6a5Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
70371f0ac6a5Smrg    # does not break anything, and helps significantly (at the cost of a little
70381f0ac6a5Smrg    # extra space).
70391f0ac6a5Smrg    freebsd2.2*)
70401f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
70411f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
70421f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
70431f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
70441f0ac6a5Smrg      ;;
70451f0ac6a5Smrg
70461f0ac6a5Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
70471f0ac6a5Smrg    freebsd2*)
70481f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
70491f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
70501f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
70511f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
70521f0ac6a5Smrg      ;;
70531f0ac6a5Smrg
70541f0ac6a5Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
70551f0ac6a5Smrg    freebsd* | kfreebsd*-gnu | dragonfly*)
70561f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
70571f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
70581f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
70591f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
70601f0ac6a5Smrg      ;;
70611f0ac6a5Smrg
70621f0ac6a5Smrg    hpux9*)
70631f0ac6a5Smrg      if test "$GCC" = yes; then
70641f0ac6a5Smrg	_LT_AC_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'
70651f0ac6a5Smrg      else
70661f0ac6a5Smrg	_LT_AC_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'
70671f0ac6a5Smrg      fi
70681f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
70691f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
70701f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
70711f0ac6a5Smrg
70721f0ac6a5Smrg      # hardcode_minus_L: Not really in the search PATH,
70731f0ac6a5Smrg      # but as the default location of the library.
70741f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
70751f0ac6a5Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
70761f0ac6a5Smrg      ;;
70771f0ac6a5Smrg
70781f0ac6a5Smrg    hpux10*)
70791f0ac6a5Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
70801f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
70811f0ac6a5Smrg      else
70821f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
70831f0ac6a5Smrg      fi
70841f0ac6a5Smrg      if test "$with_gnu_ld" = no; then
70851f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
70861f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
70871f0ac6a5Smrg
70881f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
70891f0ac6a5Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
70901f0ac6a5Smrg
70911f0ac6a5Smrg	# hardcode_minus_L: Not really in the search PATH,
70921f0ac6a5Smrg	# but as the default location of the library.
70931f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
70941f0ac6a5Smrg      fi
70951f0ac6a5Smrg      ;;
70961f0ac6a5Smrg
70971f0ac6a5Smrg    hpux11*)
70981f0ac6a5Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
70991f0ac6a5Smrg	case $host_cpu in
71001f0ac6a5Smrg	hppa*64*)
71011f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
71021f0ac6a5Smrg	  ;;
71031f0ac6a5Smrg	ia64*)
71041f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
71051f0ac6a5Smrg	  ;;
71061f0ac6a5Smrg	*)
71071f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
71081f0ac6a5Smrg	  ;;
71091f0ac6a5Smrg	esac
71101f0ac6a5Smrg      else
71111f0ac6a5Smrg	case $host_cpu in
71121f0ac6a5Smrg	hppa*64*)
71131f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
71141f0ac6a5Smrg	  ;;
71151f0ac6a5Smrg	ia64*)
71161f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
71171f0ac6a5Smrg	  ;;
71181f0ac6a5Smrg	*)
71191f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
71201f0ac6a5Smrg	  ;;
71211f0ac6a5Smrg	esac
71221f0ac6a5Smrg      fi
71231f0ac6a5Smrg      if test "$with_gnu_ld" = no; then
71241f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
71251f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
71261f0ac6a5Smrg
71271f0ac6a5Smrg	case $host_cpu in
71281f0ac6a5Smrg	hppa*64*|ia64*)
71291f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
71301f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
71311f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
71321f0ac6a5Smrg	  ;;
71331f0ac6a5Smrg	*)
71341f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
71351f0ac6a5Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
71361f0ac6a5Smrg
71371f0ac6a5Smrg	  # hardcode_minus_L: Not really in the search PATH,
71381f0ac6a5Smrg	  # but as the default location of the library.
71391f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
71401f0ac6a5Smrg	  ;;
71411f0ac6a5Smrg	esac
71421f0ac6a5Smrg      fi
71431f0ac6a5Smrg      ;;
71441f0ac6a5Smrg
71451f0ac6a5Smrg    irix5* | irix6* | nonstopux*)
71461f0ac6a5Smrg      if test "$GCC" = yes; then
71471f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
71481f0ac6a5Smrg      else
71491f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
71501f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
71511f0ac6a5Smrg      fi
71521f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
71531f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
71541f0ac6a5Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
71551f0ac6a5Smrg      ;;
71561f0ac6a5Smrg
71571f0ac6a5Smrg    netbsd*)
71581f0ac6a5Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
71591f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
71601f0ac6a5Smrg      else
71611f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
71621f0ac6a5Smrg      fi
71631f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
71641f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
71651f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
71661f0ac6a5Smrg      ;;
71671f0ac6a5Smrg
71681f0ac6a5Smrg    newsos6)
71691f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
71701f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
71711f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
71721f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
71731f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
71741f0ac6a5Smrg      ;;
71751f0ac6a5Smrg
71761f0ac6a5Smrg    openbsd*)
71771f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
71781f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
71791f0ac6a5Smrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
71801f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
71811f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
71821f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
71831f0ac6a5Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
71841f0ac6a5Smrg      else
71851f0ac6a5Smrg       case $host_os in
71861f0ac6a5Smrg	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
71871f0ac6a5Smrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
71881f0ac6a5Smrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
71891f0ac6a5Smrg	   ;;
71901f0ac6a5Smrg	 *)
71911f0ac6a5Smrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
71921f0ac6a5Smrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
71931f0ac6a5Smrg	   ;;
71941f0ac6a5Smrg       esac
71951f0ac6a5Smrg      fi
71961f0ac6a5Smrg      ;;
71971f0ac6a5Smrg
71981f0ac6a5Smrg    os2*)
71991f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
72001f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
72011f0ac6a5Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
72021f0ac6a5Smrg      _LT_AC_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'
72031f0ac6a5Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
72041f0ac6a5Smrg      ;;
72051f0ac6a5Smrg
72061f0ac6a5Smrg    osf3*)
72071f0ac6a5Smrg      if test "$GCC" = yes; then
72081f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
72091f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
72101f0ac6a5Smrg      else
72111f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
72121f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
72131f0ac6a5Smrg      fi
72141f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
72151f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
72161f0ac6a5Smrg      ;;
72171f0ac6a5Smrg
72181f0ac6a5Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
72191f0ac6a5Smrg      if test "$GCC" = yes; then
72201f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
72211f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
72221f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
72231f0ac6a5Smrg      else
72241f0ac6a5Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
72251f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
72261f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
72271f0ac6a5Smrg	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
72281f0ac6a5Smrg
72291f0ac6a5Smrg	# Both c and cxx compiler support -rpath directly
72301f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
72311f0ac6a5Smrg      fi
72321f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
72331f0ac6a5Smrg      ;;
72341f0ac6a5Smrg
72351f0ac6a5Smrg    solaris*)
72361f0ac6a5Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
72371f0ac6a5Smrg      if test "$GCC" = yes; then
72381f0ac6a5Smrg	wlarc='${wl}'
72391f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
72401f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
72411f0ac6a5Smrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
72421f0ac6a5Smrg      else
72431f0ac6a5Smrg	wlarc=''
72441f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
72451f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
72461f0ac6a5Smrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
72471f0ac6a5Smrg      fi
72481f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
72491f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
72501f0ac6a5Smrg      case $host_os in
72511f0ac6a5Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
72521f0ac6a5Smrg      *)
72531f0ac6a5Smrg 	# The compiler driver will combine linker options so we
72541f0ac6a5Smrg 	# cannot just pass the convience library names through
72551f0ac6a5Smrg 	# without $wl, iff we do not link with $LD.
72561f0ac6a5Smrg 	# Luckily, gcc supports the same syntax we need for Sun Studio.
72571f0ac6a5Smrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
72581f0ac6a5Smrg 	case $wlarc in
72591f0ac6a5Smrg 	'')
72601f0ac6a5Smrg 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
72611f0ac6a5Smrg 	*)
72621f0ac6a5Smrg 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
72631f0ac6a5Smrg 	esac ;;
72641f0ac6a5Smrg      esac
72651f0ac6a5Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
72661f0ac6a5Smrg      ;;
72671f0ac6a5Smrg
72681f0ac6a5Smrg    sunos4*)
72691f0ac6a5Smrg      if test "x$host_vendor" = xsequent; then
72701f0ac6a5Smrg	# Use $CC to link under sequent, because it throws in some extra .o
72711f0ac6a5Smrg	# files that make .init and .fini sections work.
72721f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
72731f0ac6a5Smrg      else
72741f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
72751f0ac6a5Smrg      fi
72761f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
72771f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
72781f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
72791f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
72801f0ac6a5Smrg      ;;
72811f0ac6a5Smrg
72821f0ac6a5Smrg    sysv4)
72831f0ac6a5Smrg      case $host_vendor in
72841f0ac6a5Smrg	sni)
72851f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
72861f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
72871f0ac6a5Smrg	;;
72881f0ac6a5Smrg	siemens)
72891f0ac6a5Smrg	  ## LD is ld it makes a PLAMLIB
72901f0ac6a5Smrg	  ## CC just makes a GrossModule.
72911f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
72921f0ac6a5Smrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
72931f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
72941f0ac6a5Smrg        ;;
72951f0ac6a5Smrg	motorola)
72961f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
72971f0ac6a5Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
72981f0ac6a5Smrg	;;
72991f0ac6a5Smrg      esac
73001f0ac6a5Smrg      runpath_var='LD_RUN_PATH'
73011f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
73021f0ac6a5Smrg      ;;
73031f0ac6a5Smrg
73041f0ac6a5Smrg    sysv4.3*)
73051f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
73061f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
73071f0ac6a5Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
73081f0ac6a5Smrg      ;;
73091f0ac6a5Smrg
73101f0ac6a5Smrg    sysv4*MP*)
73111f0ac6a5Smrg      if test -d /usr/nec; then
73121f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
73131f0ac6a5Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
73141f0ac6a5Smrg	runpath_var=LD_RUN_PATH
73151f0ac6a5Smrg	hardcode_runpath_var=yes
73161f0ac6a5Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
73171f0ac6a5Smrg      fi
73181f0ac6a5Smrg      ;;
73191f0ac6a5Smrg
73201f0ac6a5Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
73211f0ac6a5Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
73221f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
73231f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
73241f0ac6a5Smrg      runpath_var='LD_RUN_PATH'
73251f0ac6a5Smrg
73261f0ac6a5Smrg      if test "$GCC" = yes; then
73271f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73281f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73291f0ac6a5Smrg      else
73301f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73311f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73321f0ac6a5Smrg      fi
73331f0ac6a5Smrg      ;;
73341f0ac6a5Smrg
73351f0ac6a5Smrg    sysv5* | sco3.2v5* | sco5v6*)
73361f0ac6a5Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
73371f0ac6a5Smrg      # link with -lc, and that would cause any symbols used from libc to
73381f0ac6a5Smrg      # always be unresolved, which means just about no library would
73391f0ac6a5Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
73401f0ac6a5Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
73411f0ac6a5Smrg      # as -z defs.
73421f0ac6a5Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
73431f0ac6a5Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
73441f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
73451f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
73461f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
73471f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
73481f0ac6a5Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
73491f0ac6a5Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
73501f0ac6a5Smrg      runpath_var='LD_RUN_PATH'
73511f0ac6a5Smrg
73521f0ac6a5Smrg      if test "$GCC" = yes; then
73531f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
73541f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
73551f0ac6a5Smrg      else
73561f0ac6a5Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
73571f0ac6a5Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
73581f0ac6a5Smrg      fi
73591f0ac6a5Smrg      ;;
73601f0ac6a5Smrg
73611f0ac6a5Smrg    uts4*)
73621f0ac6a5Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
73631f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
73641f0ac6a5Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
73651f0ac6a5Smrg      ;;
73661f0ac6a5Smrg
73671f0ac6a5Smrg    *)
73681f0ac6a5Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
73691f0ac6a5Smrg      ;;
73701f0ac6a5Smrg    esac
73711f0ac6a5Smrg  fi
73721f0ac6a5Smrg])
73731f0ac6a5SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
73741f0ac6a5Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
73751f0ac6a5Smrg
73761f0ac6a5Smrg#
73771f0ac6a5Smrg# Do we need to explicitly link libc?
73781f0ac6a5Smrg#
73791f0ac6a5Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
73801f0ac6a5Smrgx|xyes)
73811f0ac6a5Smrg  # Assume -lc should be added
73821f0ac6a5Smrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
73831f0ac6a5Smrg
73841f0ac6a5Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
73851f0ac6a5Smrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
73861f0ac6a5Smrg    *'~'*)
73871f0ac6a5Smrg      # FIXME: we may have to deal with multi-command sequences.
73881f0ac6a5Smrg      ;;
73891f0ac6a5Smrg    '$CC '*)
73901f0ac6a5Smrg      # Test whether the compiler implicitly links with -lc since on some
73911f0ac6a5Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
73921f0ac6a5Smrg      # to ld, don't add -lc before -lgcc.
73931f0ac6a5Smrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
73941f0ac6a5Smrg      $rm conftest*
73951f0ac6a5Smrg      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
73961f0ac6a5Smrg
73971f0ac6a5Smrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
73981f0ac6a5Smrg        soname=conftest
73991f0ac6a5Smrg        lib=conftest
74001f0ac6a5Smrg        libobjs=conftest.$ac_objext
74011f0ac6a5Smrg        deplibs=
74021f0ac6a5Smrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
74031f0ac6a5Smrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
74041f0ac6a5Smrg        compiler_flags=-v
74051f0ac6a5Smrg        linker_flags=-v
74061f0ac6a5Smrg        verstring=
74071f0ac6a5Smrg        output_objdir=.
74081f0ac6a5Smrg        libname=conftest
74091f0ac6a5Smrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
74101f0ac6a5Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
74111f0ac6a5Smrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
74121f0ac6a5Smrg        then
74131f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
74141f0ac6a5Smrg        else
74151f0ac6a5Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
74161f0ac6a5Smrg        fi
74171f0ac6a5Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
74181f0ac6a5Smrg      else
74191f0ac6a5Smrg        cat conftest.err 1>&5
74201f0ac6a5Smrg      fi
74211f0ac6a5Smrg      $rm conftest*
74221f0ac6a5Smrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
74231f0ac6a5Smrg      ;;
74241f0ac6a5Smrg    esac
74251f0ac6a5Smrg  fi
74261f0ac6a5Smrg  ;;
74271f0ac6a5Smrgesac
74281f0ac6a5Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS
74291f0ac6a5Smrg
74301f0ac6a5Smrg
74311f0ac6a5Smrg# _LT_AC_FILE_LTDLL_C
74321f0ac6a5Smrg# -------------------
74331f0ac6a5Smrg# Be careful that the start marker always follows a newline.
74341f0ac6a5SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
74351f0ac6a5Smrg# /* ltdll.c starts here */
74361f0ac6a5Smrg# #define WIN32_LEAN_AND_MEAN
74371f0ac6a5Smrg# #include <windows.h>
74381f0ac6a5Smrg# #undef WIN32_LEAN_AND_MEAN
74391f0ac6a5Smrg# #include <stdio.h>
74401f0ac6a5Smrg#
74411f0ac6a5Smrg# #ifndef __CYGWIN__
74421f0ac6a5Smrg# #  ifdef __CYGWIN32__
74431f0ac6a5Smrg# #    define __CYGWIN__ __CYGWIN32__
74441f0ac6a5Smrg# #  endif
74451f0ac6a5Smrg# #endif
74461f0ac6a5Smrg#
74471f0ac6a5Smrg# #ifdef __cplusplus
74481f0ac6a5Smrg# extern "C" {
74491f0ac6a5Smrg# #endif
74501f0ac6a5Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
74511f0ac6a5Smrg# #ifdef __cplusplus
74521f0ac6a5Smrg# }
74531f0ac6a5Smrg# #endif
74541f0ac6a5Smrg#
74551f0ac6a5Smrg# #ifdef __CYGWIN__
74561f0ac6a5Smrg# #include <cygwin/cygwin_dll.h>
74571f0ac6a5Smrg# DECLARE_CYGWIN_DLL( DllMain );
74581f0ac6a5Smrg# #endif
74591f0ac6a5Smrg# HINSTANCE __hDllInstance_base;
74601f0ac6a5Smrg#
74611f0ac6a5Smrg# BOOL APIENTRY
74621f0ac6a5Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
74631f0ac6a5Smrg# {
74641f0ac6a5Smrg#   __hDllInstance_base = hInst;
74651f0ac6a5Smrg#   return TRUE;
74661f0ac6a5Smrg# }
74671f0ac6a5Smrg# /* ltdll.c ends here */
74681f0ac6a5Smrg])# _LT_AC_FILE_LTDLL_C
74691f0ac6a5Smrg
74701f0ac6a5Smrg
74711f0ac6a5Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
74721f0ac6a5Smrg# ---------------------------------
74731f0ac6a5SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
74741f0ac6a5Smrg
74751f0ac6a5Smrg
74761f0ac6a5Smrg# old names
74771f0ac6a5SmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
74781f0ac6a5SmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
74791f0ac6a5SmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
74801f0ac6a5SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
74811f0ac6a5SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
74821f0ac6a5SmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
74831f0ac6a5SmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
74841f0ac6a5Smrg
74851f0ac6a5Smrg# This is just to silence aclocal about the macro not being used
74861f0ac6a5Smrgifelse([AC_DISABLE_FAST_INSTALL])
74871f0ac6a5Smrg
74881f0ac6a5SmrgAC_DEFUN([LT_AC_PROG_GCJ],
74891f0ac6a5Smrg[AC_CHECK_TOOL(GCJ, gcj, no)
74901f0ac6a5Smrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
74911f0ac6a5Smrg  AC_SUBST(GCJFLAGS)
74921f0ac6a5Smrg])
74931f0ac6a5Smrg
74941f0ac6a5SmrgAC_DEFUN([LT_AC_PROG_RC],
74951f0ac6a5Smrg[AC_CHECK_TOOL(RC, windres, no)
74961f0ac6a5Smrg])
74971f0ac6a5Smrg
74981f0ac6a5Smrg# NOTE: This macro has been submitted for inclusion into   #
74991f0ac6a5Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
75001f0ac6a5Smrg#  a released version of Autoconf we should remove this    #
75011f0ac6a5Smrg#  macro and use it instead.                               #
75021f0ac6a5Smrg# LT_AC_PROG_SED
75031f0ac6a5Smrg# --------------
75041f0ac6a5Smrg# Check for a fully-functional sed program, that truncates
75051f0ac6a5Smrg# as few characters as possible.  Prefer GNU sed if found.
75061f0ac6a5SmrgAC_DEFUN([LT_AC_PROG_SED],
75071f0ac6a5Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
75081f0ac6a5SmrgAC_CACHE_VAL(lt_cv_path_SED,
75091f0ac6a5Smrg[# Loop through the user's path and test for sed and gsed.
75101f0ac6a5Smrg# Then use that list of sed's as ones to test for truncation.
75111f0ac6a5Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
75121f0ac6a5Smrgfor as_dir in $PATH
75131f0ac6a5Smrgdo
75141f0ac6a5Smrg  IFS=$as_save_IFS
75151f0ac6a5Smrg  test -z "$as_dir" && as_dir=.
75161f0ac6a5Smrg  for lt_ac_prog in sed gsed; do
75171f0ac6a5Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
75181f0ac6a5Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
75191f0ac6a5Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
75201f0ac6a5Smrg      fi
75211f0ac6a5Smrg    done
75221f0ac6a5Smrg  done
75231f0ac6a5Smrgdone
75241f0ac6a5Smrglt_ac_max=0
75251f0ac6a5Smrglt_ac_count=0
75261f0ac6a5Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
75271f0ac6a5Smrg# along with /bin/sed that truncates output.
75281f0ac6a5Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
75291f0ac6a5Smrg  test ! -f $lt_ac_sed && continue
75301f0ac6a5Smrg  cat /dev/null > conftest.in
75311f0ac6a5Smrg  lt_ac_count=0
75321f0ac6a5Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
75331f0ac6a5Smrg  # Check for GNU sed and select it if it is found.
75341f0ac6a5Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
75351f0ac6a5Smrg    lt_cv_path_SED=$lt_ac_sed
75361f0ac6a5Smrg    break
75371f0ac6a5Smrg  fi
75381f0ac6a5Smrg  while true; do
75391f0ac6a5Smrg    cat conftest.in conftest.in >conftest.tmp
75401f0ac6a5Smrg    mv conftest.tmp conftest.in
75411f0ac6a5Smrg    cp conftest.in conftest.nl
75421f0ac6a5Smrg    echo >>conftest.nl
75431f0ac6a5Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
75441f0ac6a5Smrg    cmp -s conftest.out conftest.nl || break
75451f0ac6a5Smrg    # 10000 chars as input seems more than enough
75461f0ac6a5Smrg    test $lt_ac_count -gt 10 && break
75471f0ac6a5Smrg    lt_ac_count=`expr $lt_ac_count + 1`
75481f0ac6a5Smrg    if test $lt_ac_count -gt $lt_ac_max; then
75491f0ac6a5Smrg      lt_ac_max=$lt_ac_count
75501f0ac6a5Smrg      lt_cv_path_SED=$lt_ac_sed
75511f0ac6a5Smrg    fi
75521f0ac6a5Smrg  done
75531f0ac6a5Smrgdone
75541f0ac6a5Smrg])
75551f0ac6a5SmrgSED=$lt_cv_path_SED
75561f0ac6a5SmrgAC_MSG_RESULT([$SED])
75571f0ac6a5Smrg])
75581f0ac6a5Smrg
75591f0ac6a5Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
75601f0ac6a5Smrg# From Jim Meyering
75611f0ac6a5Smrg
75621f0ac6a5Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
75631f0ac6a5Smrg# Free Software Foundation, Inc.
75641f0ac6a5Smrg#
75651f0ac6a5Smrg# This file is free software; the Free Software Foundation
75661f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
75671f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
75681f0ac6a5Smrg
75691f0ac6a5Smrg# serial 4
75701f0ac6a5Smrg
75711f0ac6a5SmrgAC_DEFUN([AM_MAINTAINER_MODE],
75721f0ac6a5Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
75731f0ac6a5Smrg  dnl maintainer-mode is disabled by default
75741f0ac6a5Smrg  AC_ARG_ENABLE(maintainer-mode,
75751f0ac6a5Smrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
75761f0ac6a5Smrg			  (and sometimes confusing) to the casual installer],
75771f0ac6a5Smrg      USE_MAINTAINER_MODE=$enableval,
75781f0ac6a5Smrg      USE_MAINTAINER_MODE=no)
75791f0ac6a5Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
75801f0ac6a5Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
75811f0ac6a5Smrg  MAINT=$MAINTAINER_MODE_TRUE
75821f0ac6a5Smrg  AC_SUBST(MAINT)dnl
75831f0ac6a5Smrg]
75841f0ac6a5Smrg)
75851f0ac6a5Smrg
75861f0ac6a5SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
75871f0ac6a5Smrg
75881f0ac6a5Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
75891f0ac6a5Smrg
75901f0ac6a5Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
75911f0ac6a5Smrg#
75921f0ac6a5Smrg# This file is free software; the Free Software Foundation
75931f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
75941f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
75951f0ac6a5Smrg
75961f0ac6a5Smrg# serial 3
75971f0ac6a5Smrg
75981f0ac6a5Smrg# AM_MAKE_INCLUDE()
75991f0ac6a5Smrg# -----------------
76001f0ac6a5Smrg# Check to see how make treats includes.
76011f0ac6a5SmrgAC_DEFUN([AM_MAKE_INCLUDE],
76021f0ac6a5Smrg[am_make=${MAKE-make}
76031f0ac6a5Smrgcat > confinc << 'END'
76041f0ac6a5Smrgam__doit:
76051f0ac6a5Smrg	@echo done
76061f0ac6a5Smrg.PHONY: am__doit
76071f0ac6a5SmrgEND
76081f0ac6a5Smrg# If we don't find an include directive, just comment out the code.
76091f0ac6a5SmrgAC_MSG_CHECKING([for style of include used by $am_make])
76101f0ac6a5Smrgam__include="#"
76111f0ac6a5Smrgam__quote=
76121f0ac6a5Smrg_am_result=none
76131f0ac6a5Smrg# First try GNU make style include.
76141f0ac6a5Smrgecho "include confinc" > confmf
76151f0ac6a5Smrg# We grep out `Entering directory' and `Leaving directory'
76161f0ac6a5Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
76171f0ac6a5Smrg# In particular we don't look at `^make:' because GNU make might
76181f0ac6a5Smrg# be invoked under some other name (usually "gmake"), in which
76191f0ac6a5Smrg# case it prints its new name instead of `make'.
76201f0ac6a5Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
76211f0ac6a5Smrg   am__include=include
76221f0ac6a5Smrg   am__quote=
76231f0ac6a5Smrg   _am_result=GNU
76241f0ac6a5Smrgfi
76251f0ac6a5Smrg# Now try BSD make style include.
76261f0ac6a5Smrgif test "$am__include" = "#"; then
76271f0ac6a5Smrg   echo '.include "confinc"' > confmf
76281f0ac6a5Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
76291f0ac6a5Smrg      am__include=.include
76301f0ac6a5Smrg      am__quote="\""
76311f0ac6a5Smrg      _am_result=BSD
76321f0ac6a5Smrg   fi
76331f0ac6a5Smrgfi
76341f0ac6a5SmrgAC_SUBST([am__include])
76351f0ac6a5SmrgAC_SUBST([am__quote])
76361f0ac6a5SmrgAC_MSG_RESULT([$_am_result])
76371f0ac6a5Smrgrm -f confinc confmf
76381f0ac6a5Smrg])
76391f0ac6a5Smrg
76401f0ac6a5Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
76411f0ac6a5Smrg
76421f0ac6a5Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
76431f0ac6a5Smrg# Free Software Foundation, Inc.
76441f0ac6a5Smrg#
76451f0ac6a5Smrg# This file is free software; the Free Software Foundation
76461f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
76471f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
76481f0ac6a5Smrg
76491f0ac6a5Smrg# serial 5
76501f0ac6a5Smrg
76511f0ac6a5Smrg# AM_MISSING_PROG(NAME, PROGRAM)
76521f0ac6a5Smrg# ------------------------------
76531f0ac6a5SmrgAC_DEFUN([AM_MISSING_PROG],
76541f0ac6a5Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
76551f0ac6a5Smrg$1=${$1-"${am_missing_run}$2"}
76561f0ac6a5SmrgAC_SUBST($1)])
76571f0ac6a5Smrg
76581f0ac6a5Smrg
76591f0ac6a5Smrg# AM_MISSING_HAS_RUN
76601f0ac6a5Smrg# ------------------
76611f0ac6a5Smrg# Define MISSING if not defined so far and test if it supports --run.
76621f0ac6a5Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
76631f0ac6a5SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
76641f0ac6a5Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
76651f0ac6a5SmrgAC_REQUIRE_AUX_FILE([missing])dnl
76661f0ac6a5Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
76671f0ac6a5Smrg# Use eval to expand $SHELL
76681f0ac6a5Smrgif eval "$MISSING --run true"; then
76691f0ac6a5Smrg  am_missing_run="$MISSING --run "
76701f0ac6a5Smrgelse
76711f0ac6a5Smrg  am_missing_run=
76721f0ac6a5Smrg  AC_MSG_WARN([`missing' script is too old or missing])
76731f0ac6a5Smrgfi
76741f0ac6a5Smrg])
76751f0ac6a5Smrg
76761f0ac6a5Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
76771f0ac6a5Smrg#
76781f0ac6a5Smrg# This file is free software; the Free Software Foundation
76791f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
76801f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
76811f0ac6a5Smrg
76821f0ac6a5Smrg# AM_PROG_MKDIR_P
76831f0ac6a5Smrg# ---------------
76841f0ac6a5Smrg# Check for `mkdir -p'.
76851f0ac6a5SmrgAC_DEFUN([AM_PROG_MKDIR_P],
76861f0ac6a5Smrg[AC_PREREQ([2.60])dnl
76871f0ac6a5SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
76881f0ac6a5Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
76891f0ac6a5Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
76901f0ac6a5Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
76911f0ac6a5Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
76921f0ac6a5Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
76931f0ac6a5Smrgdnl adjustment using top_builddir (which is defined more often than
76941f0ac6a5Smrgdnl MKDIR_P).
76951f0ac6a5SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
76961f0ac6a5Smrgcase $mkdir_p in
76971f0ac6a5Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
76981f0ac6a5Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
76991f0ac6a5Smrgesac
77001f0ac6a5Smrg])
77011f0ac6a5Smrg
77021f0ac6a5Smrg# Helper functions for option handling.                     -*- Autoconf -*-
77031f0ac6a5Smrg
77041f0ac6a5Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
77051f0ac6a5Smrg#
77061f0ac6a5Smrg# This file is free software; the Free Software Foundation
77071f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
77081f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
77091f0ac6a5Smrg
77101f0ac6a5Smrg# serial 3
77111f0ac6a5Smrg
77121f0ac6a5Smrg# _AM_MANGLE_OPTION(NAME)
77131f0ac6a5Smrg# -----------------------
77141f0ac6a5SmrgAC_DEFUN([_AM_MANGLE_OPTION],
77151f0ac6a5Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
77161f0ac6a5Smrg
77171f0ac6a5Smrg# _AM_SET_OPTION(NAME)
77181f0ac6a5Smrg# ------------------------------
77191f0ac6a5Smrg# Set option NAME.  Presently that only means defining a flag for this option.
77201f0ac6a5SmrgAC_DEFUN([_AM_SET_OPTION],
77211f0ac6a5Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
77221f0ac6a5Smrg
77231f0ac6a5Smrg# _AM_SET_OPTIONS(OPTIONS)
77241f0ac6a5Smrg# ----------------------------------
77251f0ac6a5Smrg# OPTIONS is a space-separated list of Automake options.
77261f0ac6a5SmrgAC_DEFUN([_AM_SET_OPTIONS],
77271f0ac6a5Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
77281f0ac6a5Smrg
77291f0ac6a5Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
77301f0ac6a5Smrg# -------------------------------------------
77311f0ac6a5Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
77321f0ac6a5SmrgAC_DEFUN([_AM_IF_OPTION],
77331f0ac6a5Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
77341f0ac6a5Smrg
77351f0ac6a5Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
77361f0ac6a5Smrg
77371f0ac6a5Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
77381f0ac6a5Smrg# Free Software Foundation, Inc.
77391f0ac6a5Smrg#
77401f0ac6a5Smrg# This file is free software; the Free Software Foundation
77411f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
77421f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
77431f0ac6a5Smrg
77441f0ac6a5Smrg# serial 4
77451f0ac6a5Smrg
77461f0ac6a5Smrg# AM_SANITY_CHECK
77471f0ac6a5Smrg# ---------------
77481f0ac6a5SmrgAC_DEFUN([AM_SANITY_CHECK],
77491f0ac6a5Smrg[AC_MSG_CHECKING([whether build environment is sane])
77501f0ac6a5Smrg# Just in case
77511f0ac6a5Smrgsleep 1
77521f0ac6a5Smrgecho timestamp > conftest.file
77531f0ac6a5Smrg# Do `set' in a subshell so we don't clobber the current shell's
77541f0ac6a5Smrg# arguments.  Must try -L first in case configure is actually a
77551f0ac6a5Smrg# symlink; some systems play weird games with the mod time of symlinks
77561f0ac6a5Smrg# (eg FreeBSD returns the mod time of the symlink's containing
77571f0ac6a5Smrg# directory).
77581f0ac6a5Smrgif (
77591f0ac6a5Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
77601f0ac6a5Smrg   if test "$[*]" = "X"; then
77611f0ac6a5Smrg      # -L didn't work.
77621f0ac6a5Smrg      set X `ls -t $srcdir/configure conftest.file`
77631f0ac6a5Smrg   fi
77641f0ac6a5Smrg   rm -f conftest.file
77651f0ac6a5Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
77661f0ac6a5Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
77671f0ac6a5Smrg
77681f0ac6a5Smrg      # If neither matched, then we have a broken ls.  This can happen
77691f0ac6a5Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
77701f0ac6a5Smrg      # broken ls alias from the environment.  This has actually
77711f0ac6a5Smrg      # happened.  Such a system could not be considered "sane".
77721f0ac6a5Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
77731f0ac6a5Smrgalias in your environment])
77741f0ac6a5Smrg   fi
77751f0ac6a5Smrg
77761f0ac6a5Smrg   test "$[2]" = conftest.file
77771f0ac6a5Smrg   )
77781f0ac6a5Smrgthen
77791f0ac6a5Smrg   # Ok.
77801f0ac6a5Smrg   :
77811f0ac6a5Smrgelse
77821f0ac6a5Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
77831f0ac6a5SmrgCheck your system clock])
77841f0ac6a5Smrgfi
77851f0ac6a5SmrgAC_MSG_RESULT(yes)])
77861f0ac6a5Smrg
77871f0ac6a5Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
77881f0ac6a5Smrg#
77891f0ac6a5Smrg# This file is free software; the Free Software Foundation
77901f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
77911f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
77921f0ac6a5Smrg
77931f0ac6a5Smrg# AM_PROG_INSTALL_STRIP
77941f0ac6a5Smrg# ---------------------
77951f0ac6a5Smrg# One issue with vendor `install' (even GNU) is that you can't
77961f0ac6a5Smrg# specify the program used to strip binaries.  This is especially
77971f0ac6a5Smrg# annoying in cross-compiling environments, where the build's strip
77981f0ac6a5Smrg# is unlikely to handle the host's binaries.
77991f0ac6a5Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
78001f0ac6a5Smrg# always use install-sh in `make install-strip', and initialize
78011f0ac6a5Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
78021f0ac6a5SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
78031f0ac6a5Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
78041f0ac6a5Smrg# Installed binaries are usually stripped using `strip' when the user
78051f0ac6a5Smrg# run `make install-strip'.  However `strip' might not be the right
78061f0ac6a5Smrg# tool to use in cross-compilation environments, therefore Automake
78071f0ac6a5Smrg# will honor the `STRIP' environment variable to overrule this program.
78081f0ac6a5Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
78091f0ac6a5Smrgif test "$cross_compiling" != no; then
78101f0ac6a5Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
78111f0ac6a5Smrgfi
78121f0ac6a5SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
78131f0ac6a5SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
78141f0ac6a5Smrg
78151f0ac6a5Smrg# Copyright (C) 2006  Free Software Foundation, Inc.
78161f0ac6a5Smrg#
78171f0ac6a5Smrg# This file is free software; the Free Software Foundation
78181f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
78191f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
78201f0ac6a5Smrg
78211f0ac6a5Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
78221f0ac6a5Smrg# ---------------------------
78231f0ac6a5Smrg# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
78241f0ac6a5Smrg# This macro is traced by Automake.
78251f0ac6a5SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
78261f0ac6a5Smrg
78271f0ac6a5Smrg# Check how to create a tarball.                            -*- Autoconf -*-
78281f0ac6a5Smrg
78291f0ac6a5Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
78301f0ac6a5Smrg#
78311f0ac6a5Smrg# This file is free software; the Free Software Foundation
78321f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it,
78331f0ac6a5Smrg# with or without modifications, as long as this notice is preserved.
78341f0ac6a5Smrg
78351f0ac6a5Smrg# serial 2
78361f0ac6a5Smrg
78371f0ac6a5Smrg# _AM_PROG_TAR(FORMAT)
78381f0ac6a5Smrg# --------------------
78391f0ac6a5Smrg# Check how to create a tarball in format FORMAT.
78401f0ac6a5Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
78411f0ac6a5Smrg#
78421f0ac6a5Smrg# Substitute a variable $(am__tar) that is a command
78431f0ac6a5Smrg# writing to stdout a FORMAT-tarball containing the directory
78441f0ac6a5Smrg# $tardir.
78451f0ac6a5Smrg#     tardir=directory && $(am__tar) > result.tar
78461f0ac6a5Smrg#
78471f0ac6a5Smrg# Substitute a variable $(am__untar) that extract such
78481f0ac6a5Smrg# a tarball read from stdin.
78491f0ac6a5Smrg#     $(am__untar) < result.tar
78501f0ac6a5SmrgAC_DEFUN([_AM_PROG_TAR],
78511f0ac6a5Smrg[# Always define AMTAR for backward compatibility.
78521f0ac6a5SmrgAM_MISSING_PROG([AMTAR], [tar])
78531f0ac6a5Smrgm4_if([$1], [v7],
78541f0ac6a5Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
78551f0ac6a5Smrg     [m4_case([$1], [ustar],, [pax],,
78561f0ac6a5Smrg              [m4_fatal([Unknown tar format])])
78571f0ac6a5SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
78581f0ac6a5Smrg# Loop over all known methods to create a tar archive until one works.
78591f0ac6a5Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
78601f0ac6a5Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
78611f0ac6a5Smrg# Do not fold the above two line into one, because Tru64 sh and
78621f0ac6a5Smrg# Solaris sh will not grok spaces in the rhs of `-'.
78631f0ac6a5Smrgfor _am_tool in $_am_tools
78641f0ac6a5Smrgdo
78651f0ac6a5Smrg  case $_am_tool in
78661f0ac6a5Smrg  gnutar)
78671f0ac6a5Smrg    for _am_tar in tar gnutar gtar;
78681f0ac6a5Smrg    do
78691f0ac6a5Smrg      AM_RUN_LOG([$_am_tar --version]) && break
78701f0ac6a5Smrg    done
78711f0ac6a5Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
78721f0ac6a5Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
78731f0ac6a5Smrg    am__untar="$_am_tar -xf -"
78741f0ac6a5Smrg    ;;
78751f0ac6a5Smrg  plaintar)
78761f0ac6a5Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
78771f0ac6a5Smrg    # ustar tarball either.
78781f0ac6a5Smrg    (tar --version) >/dev/null 2>&1 && continue
78791f0ac6a5Smrg    am__tar='tar chf - "$$tardir"'
78801f0ac6a5Smrg    am__tar_='tar chf - "$tardir"'
78811f0ac6a5Smrg    am__untar='tar xf -'
78821f0ac6a5Smrg    ;;
78831f0ac6a5Smrg  pax)
78841f0ac6a5Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
78851f0ac6a5Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
78861f0ac6a5Smrg    am__untar='pax -r'
78871f0ac6a5Smrg    ;;
78881f0ac6a5Smrg  cpio)
78891f0ac6a5Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
78901f0ac6a5Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
78911f0ac6a5Smrg    am__untar='cpio -i -H $1 -d'
78921f0ac6a5Smrg    ;;
78931f0ac6a5Smrg  none)
78941f0ac6a5Smrg    am__tar=false
78951f0ac6a5Smrg    am__tar_=false
78961f0ac6a5Smrg    am__untar=false
78971f0ac6a5Smrg    ;;
78981f0ac6a5Smrg  esac
78991f0ac6a5Smrg
79001f0ac6a5Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
79011f0ac6a5Smrg  # and am__untar set.
79021f0ac6a5Smrg  test -n "${am_cv_prog_tar_$1}" && break
79031f0ac6a5Smrg
79041f0ac6a5Smrg  # tar/untar a dummy directory, and stop if the command works
79051f0ac6a5Smrg  rm -rf conftest.dir
79061f0ac6a5Smrg  mkdir conftest.dir
79071f0ac6a5Smrg  echo GrepMe > conftest.dir/file
79081f0ac6a5Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
79091f0ac6a5Smrg  rm -rf conftest.dir
79101f0ac6a5Smrg  if test -s conftest.tar; then
79111f0ac6a5Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
79121f0ac6a5Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
79131f0ac6a5Smrg  fi
79141f0ac6a5Smrgdone
79151f0ac6a5Smrgrm -rf conftest.dir
79161f0ac6a5Smrg
79171f0ac6a5SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
79181f0ac6a5SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
79191f0ac6a5SmrgAC_SUBST([am__tar])
79201f0ac6a5SmrgAC_SUBST([am__untar])
79211f0ac6a5Smrg]) # _AM_PROG_TAR
79221f0ac6a5Smrg
7923