aclocal.m4 revision b042e37f
1b042e37fSmrg# generated automatically by aclocal 1.10 -*- Autoconf -*- 2b042e37fSmrg 3b042e37fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4b042e37fSmrg# 2005, 2006 Free Software Foundation, Inc. 5b042e37fSmrg# This file is free software; the Free Software Foundation 6b042e37fSmrg# gives unlimited permission to copy and/or distribute it, 7b042e37fSmrg# with or without modifications, as long as this notice is preserved. 8b042e37fSmrg 9b042e37fSmrg# This program is distributed in the hope that it will be useful, 10b042e37fSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11b042e37fSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12b042e37fSmrg# PARTICULAR PURPOSE. 13b042e37fSmrg 14b042e37fSmrgm4_if(m4_PACKAGE_VERSION, [2.61],, 15b042e37fSmrg[m4_fatal([this file was generated for autoconf 2.61. 16b042e37fSmrgYou have another version of autoconf. If you want to use that, 17b042e37fSmrgyou should regenerate the build system entirely.], [63])]) 18b042e37fSmrg 19b042e37fSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 20b042e37fSmrg# 21b042e37fSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 22b042e37fSmrg# 23b042e37fSmrg# This program is free software; you can redistribute it and/or modify 24b042e37fSmrg# it under the terms of the GNU General Public License as published by 25b042e37fSmrg# the Free Software Foundation; either version 2 of the License, or 26b042e37fSmrg# (at your option) any later version. 27b042e37fSmrg# 28b042e37fSmrg# This program is distributed in the hope that it will be useful, but 29b042e37fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 30b042e37fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 31b042e37fSmrg# General Public License for more details. 32b042e37fSmrg# 33b042e37fSmrg# You should have received a copy of the GNU General Public License 34b042e37fSmrg# along with this program; if not, write to the Free Software 35b042e37fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 36b042e37fSmrg# 37b042e37fSmrg# As a special exception to the GNU General Public License, if you 38b042e37fSmrg# distribute this file as part of a program that contains a 39b042e37fSmrg# configuration script generated by Autoconf, you may include it under 40b042e37fSmrg# the same distribution terms that you use for the rest of that program. 41b042e37fSmrg 42b042e37fSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 43b042e37fSmrg# ---------------------------------- 44b042e37fSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 45b042e37fSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 46b042e37fSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 47b042e37fSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 48b042e37fSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 49b042e37fSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 50b042e37fSmrgfi 51b042e37fSmrgif test -n "$PKG_CONFIG"; then 52b042e37fSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 53b042e37fSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 54b042e37fSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 55b042e37fSmrg AC_MSG_RESULT([yes]) 56b042e37fSmrg else 57b042e37fSmrg AC_MSG_RESULT([no]) 58b042e37fSmrg PKG_CONFIG="" 59b042e37fSmrg fi 60b042e37fSmrg 61b042e37fSmrgfi[]dnl 62b042e37fSmrg])# PKG_PROG_PKG_CONFIG 63b042e37fSmrg 64b042e37fSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 65b042e37fSmrg# 66b042e37fSmrg# Check to see whether a particular set of modules exists. Similar 67b042e37fSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 68b042e37fSmrg# 69b042e37fSmrg# 70b042e37fSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 71b042e37fSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 72b042e37fSmrg# PKG_CHECK_EXISTS manually 73b042e37fSmrg# -------------------------------------------------------------- 74b042e37fSmrgAC_DEFUN([PKG_CHECK_EXISTS], 75b042e37fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 76b042e37fSmrgif test -n "$PKG_CONFIG" && \ 77b042e37fSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 78b042e37fSmrg m4_ifval([$2], [$2], [:]) 79b042e37fSmrgm4_ifvaln([$3], [else 80b042e37fSmrg $3])dnl 81b042e37fSmrgfi]) 82b042e37fSmrg 83b042e37fSmrg 84b042e37fSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 85b042e37fSmrg# --------------------------------------------- 86b042e37fSmrgm4_define([_PKG_CONFIG], 87b042e37fSmrg[if test -n "$PKG_CONFIG"; then 88b042e37fSmrg if test -n "$$1"; then 89b042e37fSmrg pkg_cv_[]$1="$$1" 90b042e37fSmrg else 91b042e37fSmrg PKG_CHECK_EXISTS([$3], 92b042e37fSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 93b042e37fSmrg [pkg_failed=yes]) 94b042e37fSmrg fi 95b042e37fSmrgelse 96b042e37fSmrg pkg_failed=untried 97b042e37fSmrgfi[]dnl 98b042e37fSmrg])# _PKG_CONFIG 99b042e37fSmrg 100b042e37fSmrg# _PKG_SHORT_ERRORS_SUPPORTED 101b042e37fSmrg# ----------------------------- 102b042e37fSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 103b042e37fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 104b042e37fSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 105b042e37fSmrg _pkg_short_errors_supported=yes 106b042e37fSmrgelse 107b042e37fSmrg _pkg_short_errors_supported=no 108b042e37fSmrgfi[]dnl 109b042e37fSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 110b042e37fSmrg 111b042e37fSmrg 112b042e37fSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 113b042e37fSmrg# [ACTION-IF-NOT-FOUND]) 114b042e37fSmrg# 115b042e37fSmrg# 116b042e37fSmrg# Note that if there is a possibility the first call to 117b042e37fSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 118b042e37fSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 119b042e37fSmrg# 120b042e37fSmrg# 121b042e37fSmrg# -------------------------------------------------------------- 122b042e37fSmrgAC_DEFUN([PKG_CHECK_MODULES], 123b042e37fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 124b042e37fSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 125b042e37fSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 126b042e37fSmrg 127b042e37fSmrgpkg_failed=no 128b042e37fSmrgAC_MSG_CHECKING([for $1]) 129b042e37fSmrg 130b042e37fSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 131b042e37fSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 132b042e37fSmrg 133b042e37fSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 134b042e37fSmrgand $1[]_LIBS to avoid the need to call pkg-config. 135b042e37fSmrgSee the pkg-config man page for more details.]) 136b042e37fSmrg 137b042e37fSmrgif test $pkg_failed = yes; then 138b042e37fSmrg _PKG_SHORT_ERRORS_SUPPORTED 139b042e37fSmrg if test $_pkg_short_errors_supported = yes; then 140b042e37fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 141b042e37fSmrg else 142b042e37fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 143b042e37fSmrg fi 144b042e37fSmrg # Put the nasty error message in config.log where it belongs 145b042e37fSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 146b042e37fSmrg 147b042e37fSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 148b042e37fSmrg[Package requirements ($2) were not met: 149b042e37fSmrg 150b042e37fSmrg$$1_PKG_ERRORS 151b042e37fSmrg 152b042e37fSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 153b042e37fSmrginstalled software in a non-standard prefix. 154b042e37fSmrg 155b042e37fSmrg_PKG_TEXT 156b042e37fSmrg])], 157b042e37fSmrg [AC_MSG_RESULT([no]) 158b042e37fSmrg $4]) 159b042e37fSmrgelif test $pkg_failed = untried; then 160b042e37fSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 161b042e37fSmrg[The pkg-config script could not be found or is too old. Make sure it 162b042e37fSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 163b042e37fSmrgpath to pkg-config. 164b042e37fSmrg 165b042e37fSmrg_PKG_TEXT 166b042e37fSmrg 167b042e37fSmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 168b042e37fSmrg [$4]) 169b042e37fSmrgelse 170b042e37fSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 171b042e37fSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 172b042e37fSmrg AC_MSG_RESULT([yes]) 173b042e37fSmrg ifelse([$3], , :, [$3]) 174b042e37fSmrgfi[]dnl 175b042e37fSmrg])# PKG_CHECK_MODULES 176b042e37fSmrg 177b042e37fSmrgdnl 178b042e37fSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 179b042e37fSmrgdnl 180b042e37fSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 181b042e37fSmrgdnl copy of this software and associated documentation files (the 182b042e37fSmrgdnl "Software"), to deal in the Software without restriction, including 183b042e37fSmrgdnl without limitation the rights to use, copy, modify, merge, publish, 184b042e37fSmrgdnl distribute, and/or sell copies of the Software, and to permit persons 185b042e37fSmrgdnl to whom the Software is furnished to do so, provided that the above 186b042e37fSmrgdnl copyright notice(s) and this permission notice appear in all copies of 187b042e37fSmrgdnl the Software and that both the above copyright notice(s) and this 188b042e37fSmrgdnl permission notice appear in supporting documentation. 189b042e37fSmrgdnl 190b042e37fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 191b042e37fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 192b042e37fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 193b042e37fSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 194b042e37fSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 195b042e37fSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 196b042e37fSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 197b042e37fSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 198b042e37fSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 199b042e37fSmrgdnl 200b042e37fSmrgdnl Except as contained in this notice, the name of a copyright holder 201b042e37fSmrgdnl shall not be used in advertising or otherwise to promote the sale, use 202b042e37fSmrgdnl or other dealings in this Software without prior written authorization 203b042e37fSmrgdnl of the copyright holder. 204b042e37fSmrg 205b042e37fSmrg# XORG_MACROS_VERSION(required-version) 206b042e37fSmrg# ------------------------------------- 207b042e37fSmrg# Minimum version: 1.1.0 208b042e37fSmrg# 209b042e37fSmrg# If you're using a macro added in Version 1.1 or newer, include this in 210b042e37fSmrg# your configure.ac with the minimum required version, such as: 211b042e37fSmrg# XORG_MACROS_VERSION(1.1) 212b042e37fSmrg# 213b042e37fSmrg# To force at least a version with this macro defined, also add: 214b042e37fSmrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 215b042e37fSmrg# 216b042e37fSmrg# 217b042e37fSmrg# See the "minimum version" comment for each macro you use to see what 218b042e37fSmrg# version you require. 219b042e37fSmrgAC_DEFUN([XORG_MACROS_VERSION],[ 220b042e37fSmrg [XORG_MACROS_needed_version=$1 221b042e37fSmrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 222b042e37fSmrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 223b042e37fSmrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 224b042e37fSmrg [XORG_MACROS_version=1.1.5 225b042e37fSmrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 226b042e37fSmrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 227b042e37fSmrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 228b042e37fSmrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 229b042e37fSmrg fi 230b042e37fSmrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 231b042e37fSmrg 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]) 232b042e37fSmrg fi 233b042e37fSmrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 234b042e37fSmrg]) # XORG_MACROS_VERSION 235b042e37fSmrg 236b042e37fSmrg# XORG_PROG_RAWCPP() 237b042e37fSmrg# ------------------ 238b042e37fSmrg# Minimum version: 1.0.0 239b042e37fSmrg# 240b042e37fSmrg# Find cpp program and necessary flags for use in pre-processing text files 241b042e37fSmrg# such as man pages and config files 242b042e37fSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 243b042e37fSmrgAC_REQUIRE([AC_PROG_CPP]) 244b042e37fSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 245b042e37fSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 246b042e37fSmrg 247b042e37fSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 248b042e37fSmrg# which is not the best choice for supporting other OS'es, but covers most 249b042e37fSmrg# of the ones we need for now. 250b042e37fSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 251b042e37fSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 252b042e37fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 253b042e37fSmrg AC_MSG_RESULT([no]) 254b042e37fSmrgelse 255b042e37fSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 256b042e37fSmrg RAWCPPFLAGS=-undef 257b042e37fSmrg AC_MSG_RESULT([yes]) 258b042e37fSmrg else 259b042e37fSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 260b042e37fSmrg fi 261b042e37fSmrgfi 262b042e37fSmrgrm -f conftest.$ac_ext 263b042e37fSmrg 264b042e37fSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 265b042e37fSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 266b042e37fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 267b042e37fSmrg AC_MSG_RESULT([no]) 268b042e37fSmrgelse 269b042e37fSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 270b042e37fSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 271b042e37fSmrg AC_MSG_RESULT([yes]) 272b042e37fSmrg else 273b042e37fSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 274b042e37fSmrg fi 275b042e37fSmrgfi 276b042e37fSmrgrm -f conftest.$ac_ext 277b042e37fSmrgAC_SUBST(RAWCPPFLAGS) 278b042e37fSmrg]) # XORG_PROG_RAWCPP 279b042e37fSmrg 280b042e37fSmrg# XORG_MANPAGE_SECTIONS() 281b042e37fSmrg# ----------------------- 282b042e37fSmrg# Minimum version: 1.0.0 283b042e37fSmrg# 284b042e37fSmrg# Determine which sections man pages go in for the different man page types 285b042e37fSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 286b042e37fSmrg# Not sure if there's any better way than just hardcoding by OS name. 287b042e37fSmrg# Override default settings by setting environment variables 288b042e37fSmrg 289b042e37fSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 290b042e37fSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 291b042e37fSmrg 292b042e37fSmrgif test x$APP_MAN_SUFFIX = x ; then 293b042e37fSmrg APP_MAN_SUFFIX=1 294b042e37fSmrgfi 295b042e37fSmrgif test x$APP_MAN_DIR = x ; then 296b042e37fSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 297b042e37fSmrgfi 298b042e37fSmrg 299b042e37fSmrgif test x$LIB_MAN_SUFFIX = x ; then 300b042e37fSmrg LIB_MAN_SUFFIX=3 301b042e37fSmrgfi 302b042e37fSmrgif test x$LIB_MAN_DIR = x ; then 303b042e37fSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 304b042e37fSmrgfi 305b042e37fSmrg 306b042e37fSmrgif test x$FILE_MAN_SUFFIX = x ; then 307b042e37fSmrg case $host_os in 308b042e37fSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 309b042e37fSmrg *) FILE_MAN_SUFFIX=5 ;; 310b042e37fSmrg esac 311b042e37fSmrgfi 312b042e37fSmrgif test x$FILE_MAN_DIR = x ; then 313b042e37fSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 314b042e37fSmrgfi 315b042e37fSmrg 316b042e37fSmrgif test x$MISC_MAN_SUFFIX = x ; then 317b042e37fSmrg case $host_os in 318b042e37fSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 319b042e37fSmrg *) MISC_MAN_SUFFIX=7 ;; 320b042e37fSmrg esac 321b042e37fSmrgfi 322b042e37fSmrgif test x$MISC_MAN_DIR = x ; then 323b042e37fSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 324b042e37fSmrgfi 325b042e37fSmrg 326b042e37fSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 327b042e37fSmrg case $host_os in 328b042e37fSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 329b042e37fSmrg *) DRIVER_MAN_SUFFIX=4 ;; 330b042e37fSmrg esac 331b042e37fSmrgfi 332b042e37fSmrgif test x$DRIVER_MAN_DIR = x ; then 333b042e37fSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 334b042e37fSmrgfi 335b042e37fSmrg 336b042e37fSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 337b042e37fSmrg case $host_os in 338b042e37fSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 339b042e37fSmrg *) ADMIN_MAN_SUFFIX=8 ;; 340b042e37fSmrg esac 341b042e37fSmrgfi 342b042e37fSmrgif test x$ADMIN_MAN_DIR = x ; then 343b042e37fSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 344b042e37fSmrgfi 345b042e37fSmrg 346b042e37fSmrg 347b042e37fSmrgAC_SUBST([APP_MAN_SUFFIX]) 348b042e37fSmrgAC_SUBST([LIB_MAN_SUFFIX]) 349b042e37fSmrgAC_SUBST([FILE_MAN_SUFFIX]) 350b042e37fSmrgAC_SUBST([MISC_MAN_SUFFIX]) 351b042e37fSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 352b042e37fSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 353b042e37fSmrgAC_SUBST([APP_MAN_DIR]) 354b042e37fSmrgAC_SUBST([LIB_MAN_DIR]) 355b042e37fSmrgAC_SUBST([FILE_MAN_DIR]) 356b042e37fSmrgAC_SUBST([MISC_MAN_DIR]) 357b042e37fSmrgAC_SUBST([DRIVER_MAN_DIR]) 358b042e37fSmrgAC_SUBST([ADMIN_MAN_DIR]) 359b042e37fSmrg]) # XORG_MANPAGE_SECTIONS 360b042e37fSmrg 361b042e37fSmrg# XORG_CHECK_LINUXDOC 362b042e37fSmrg# ------------------- 363b042e37fSmrg# Minimum version: 1.0.0 364b042e37fSmrg# 365b042e37fSmrg# Defines the variable MAKE_TEXT if the necessary tools and 366b042e37fSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 367b042e37fSmrg# Whether or not the necessary tools and files are found can be checked 368b042e37fSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 369b042e37fSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 370b042e37fSmrgXORG_SGML_PATH=$prefix/share/sgml 371b042e37fSmrgHAVE_DEFS_ENT= 372b042e37fSmrg 373b042e37fSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 374b042e37fSmrg 375b042e37fSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 376b042e37fSmrgAC_PATH_PROG(PS2PDF, ps2pdf) 377b042e37fSmrg 378b042e37fSmrgAC_MSG_CHECKING([Whether to build documentation]) 379b042e37fSmrg 380b042e37fSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 381b042e37fSmrg BUILDDOC=yes 382b042e37fSmrgelse 383b042e37fSmrg BUILDDOC=no 384b042e37fSmrgfi 385b042e37fSmrg 386b042e37fSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 387b042e37fSmrg 388b042e37fSmrgAC_MSG_RESULT([$BUILDDOC]) 389b042e37fSmrg 390b042e37fSmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 391b042e37fSmrg 392b042e37fSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 393b042e37fSmrg BUILDPDFDOC=yes 394b042e37fSmrgelse 395b042e37fSmrg BUILDPDFDOC=no 396b042e37fSmrgfi 397b042e37fSmrg 398b042e37fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 399b042e37fSmrg 400b042e37fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 401b042e37fSmrg 402b042e37fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 403b042e37fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 404b042e37fSmrgMAKE_PDF="$PS2PDF" 405b042e37fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 406b042e37fSmrg 407b042e37fSmrgAC_SUBST(MAKE_TEXT) 408b042e37fSmrgAC_SUBST(MAKE_PS) 409b042e37fSmrgAC_SUBST(MAKE_PDF) 410b042e37fSmrgAC_SUBST(MAKE_HTML) 411b042e37fSmrg]) # XORG_CHECK_LINUXDOC 412b042e37fSmrg 413b042e37fSmrg# XORG_CHECK_DOCBOOK 414b042e37fSmrg# ------------------- 415b042e37fSmrg# Minimum version: 1.0.0 416b042e37fSmrg# 417b042e37fSmrg# Checks for the ability to build output formats from SGML DocBook source. 418b042e37fSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 419b042e37fSmrg# indicates whether the necessary tools and files are found and, if set, 420b042e37fSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 421b042e37fSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 422b042e37fSmrgXORG_SGML_PATH=$prefix/share/sgml 423b042e37fSmrgHAVE_DEFS_ENT= 424b042e37fSmrgBUILDTXTDOC=no 425b042e37fSmrgBUILDPDFDOC=no 426b042e37fSmrgBUILDPSDOC=no 427b042e37fSmrgBUILDHTMLDOC=no 428b042e37fSmrg 429b042e37fSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 430b042e37fSmrg 431b042e37fSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 432b042e37fSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 433b042e37fSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 434b042e37fSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 435b042e37fSmrg 436b042e37fSmrgAC_MSG_CHECKING([Whether to build text documentation]) 437b042e37fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 438b042e37fSmrg test x$BUILD_TXTDOC != xno; then 439b042e37fSmrg BUILDTXTDOC=yes 440b042e37fSmrgfi 441b042e37fSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 442b042e37fSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 443b042e37fSmrg 444b042e37fSmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 445b042e37fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 446b042e37fSmrg test x$BUILD_PDFDOC != xno; then 447b042e37fSmrg BUILDPDFDOC=yes 448b042e37fSmrgfi 449b042e37fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 450b042e37fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 451b042e37fSmrg 452b042e37fSmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 453b042e37fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 454b042e37fSmrg test x$BUILD_PSDOC != xno; then 455b042e37fSmrg BUILDPSDOC=yes 456b042e37fSmrgfi 457b042e37fSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 458b042e37fSmrgAC_MSG_RESULT([$BUILDPSDOC]) 459b042e37fSmrg 460b042e37fSmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 461b042e37fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 462b042e37fSmrg test x$BUILD_HTMLDOC != xno; then 463b042e37fSmrg BUILDHTMLDOC=yes 464b042e37fSmrgfi 465b042e37fSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 466b042e37fSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 467b042e37fSmrg 468b042e37fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 469b042e37fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 470b042e37fSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 471b042e37fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 472b042e37fSmrg 473b042e37fSmrgAC_SUBST(MAKE_TEXT) 474b042e37fSmrgAC_SUBST(MAKE_PS) 475b042e37fSmrgAC_SUBST(MAKE_PDF) 476b042e37fSmrgAC_SUBST(MAKE_HTML) 477b042e37fSmrg]) # XORG_CHECK_DOCBOOK 478b042e37fSmrg 479b042e37fSmrg# XORG_CHECK_MALLOC_ZERO 480b042e37fSmrg# ---------------------- 481b042e37fSmrg# Minimum version: 1.0.0 482b042e37fSmrg# 483b042e37fSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 484b042e37fSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 485b042e37fSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 486b042e37fSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 487b042e37fSmrgAC_ARG_ENABLE(malloc0returnsnull, 488b042e37fSmrg AC_HELP_STRING([--enable-malloc0returnsnull], 489b042e37fSmrg [malloc(0) returns NULL (default: auto)]), 490b042e37fSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 491b042e37fSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 492b042e37fSmrg 493b042e37fSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 494b042e37fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 495b042e37fSmrg AC_RUN_IFELSE([ 496b042e37fSmrgchar *malloc(); 497b042e37fSmrgchar *realloc(); 498b042e37fSmrgchar *calloc(); 499b042e37fSmrgmain() { 500b042e37fSmrg char *m0, *r0, *c0, *p; 501b042e37fSmrg m0 = malloc(0); 502b042e37fSmrg p = malloc(10); 503b042e37fSmrg r0 = realloc(p,0); 504b042e37fSmrg c0 = calloc(0); 505b042e37fSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 506b042e37fSmrg}], 507b042e37fSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 508b042e37fSmrg [MALLOC_ZERO_RETURNS_NULL=no]) 509b042e37fSmrgfi 510b042e37fSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 511b042e37fSmrg 512b042e37fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 513b042e37fSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 514b042e37fSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 515b042e37fSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 516b042e37fSmrgelse 517b042e37fSmrg MALLOC_ZERO_CFLAGS="" 518b042e37fSmrg XMALLOC_ZERO_CFLAGS="" 519b042e37fSmrg XTMALLOC_ZERO_CFLAGS="" 520b042e37fSmrgfi 521b042e37fSmrg 522b042e37fSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 523b042e37fSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 524b042e37fSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 525b042e37fSmrg]) # XORG_CHECK_MALLOC_ZERO 526b042e37fSmrg 527b042e37fSmrg# XORG_WITH_LINT() 528b042e37fSmrg# ---------------- 529b042e37fSmrg# Minimum version: 1.1.0 530b042e37fSmrg# 531b042e37fSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 532b042e37fSmrg# is specified. (Use --with-lint=sparse for sparse.) 533b042e37fSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 534b042e37fSmrg# Sets $LINT_FLAGS to flags to pass to source checker 535b042e37fSmrg# Sets LINT automake conditional if enabled (default: disabled) 536b042e37fSmrg# 537b042e37fSmrgAC_DEFUN([XORG_WITH_LINT],[ 538b042e37fSmrg 539b042e37fSmrg# Allow checking code with lint, sparse, etc. 540b042e37fSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 541b042e37fSmrg [Use a lint-style source code checker (default: disabled)])], 542b042e37fSmrg [use_lint=$withval], [use_lint=no]) 543b042e37fSmrgif test "x$use_lint" = "xyes" ; then 544b042e37fSmrg LINT="lint" 545b042e37fSmrgelse 546b042e37fSmrg LINT="$use_lint" 547b042e37fSmrgfi 548b042e37fSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 549b042e37fSmrg case $LINT in 550b042e37fSmrg lint|*/lint) 551b042e37fSmrg case $host_os in 552b042e37fSmrg solaris*) 553b042e37fSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 554b042e37fSmrg ;; 555b042e37fSmrg esac 556b042e37fSmrg ;; 557b042e37fSmrg esac 558b042e37fSmrgfi 559b042e37fSmrg 560b042e37fSmrgAC_SUBST(LINT) 561b042e37fSmrgAC_SUBST(LINT_FLAGS) 562b042e37fSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 563b042e37fSmrg 564b042e37fSmrg]) # XORG_WITH_LINT 565b042e37fSmrg 566b042e37fSmrg# XORG_LINT_LIBRARY(LIBNAME) 567b042e37fSmrg# -------------------------- 568b042e37fSmrg# Minimum version: 1.1.0 569b042e37fSmrg# 570b042e37fSmrg# Sets up flags for building lint libraries for checking programs that call 571b042e37fSmrg# functions in the library. 572b042e37fSmrg# Disabled by default, enable with --enable-lint-library 573b042e37fSmrg# Sets: 574b042e37fSmrg# @LINTLIB@ - name of lint library file to make 575b042e37fSmrg# MAKE_LINT_LIB - automake conditional 576b042e37fSmrg# 577b042e37fSmrg 578b042e37fSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 579b042e37fSmrgAC_REQUIRE([XORG_WITH_LINT]) 580b042e37fSmrg# Build lint "library" for more indepth checks of programs calling this library 581b042e37fSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 582b042e37fSmrg [Create lint library (default: disabled)])], 583b042e37fSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 584b042e37fSmrgif test "x$make_lint_lib" != "xno" ; then 585b042e37fSmrg if test "x$LINT" = "xno" ; then 586b042e37fSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 587b042e37fSmrg fi 588b042e37fSmrg if test "x$make_lint_lib" = "xyes" ; then 589b042e37fSmrg LINTLIB=llib-l$1.ln 590b042e37fSmrg else 591b042e37fSmrg LINTLIB=$make_lint_lib 592b042e37fSmrg fi 593b042e37fSmrgfi 594b042e37fSmrgAC_SUBST(LINTLIB) 595b042e37fSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 596b042e37fSmrg 597b042e37fSmrg]) # XORG_LINT_LIBRARY 598b042e37fSmrg 599b042e37fSmrgdnl Copyright 2005 Red Hat, Inc 600b042e37fSmrgdnl 601b042e37fSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 602b042e37fSmrgdnl documentation for any purpose is hereby granted without fee, provided that 603b042e37fSmrgdnl the above copyright notice appear in all copies and that both that 604b042e37fSmrgdnl copyright notice and this permission notice appear in supporting 605b042e37fSmrgdnl documentation. 606b042e37fSmrgdnl 607b042e37fSmrgdnl The above copyright notice and this permission notice shall be included 608b042e37fSmrgdnl in all copies or substantial portions of the Software. 609b042e37fSmrgdnl 610b042e37fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 611b042e37fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 612b042e37fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 613b042e37fSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 614b042e37fSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 615b042e37fSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 616b042e37fSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 617b042e37fSmrgdnl 618b042e37fSmrgdnl Except as contained in this notice, the name of the copyright holders shall 619b042e37fSmrgdnl not be used in advertising or otherwise to promote the sale, use or 620b042e37fSmrgdnl other dealings in this Software without prior written authorization 621b042e37fSmrgdnl from the copyright holders. 622b042e37fSmrgdnl 623b042e37fSmrg 624b042e37fSmrg# XORG_RELEASE_VERSION 625b042e37fSmrg# -------------------- 626b042e37fSmrg# Adds --with/without-release-string and changes the PACKAGE and 627b042e37fSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 628b042e37fSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 629b042e37fSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 630b042e37fSmrg 631b042e37fSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 632b042e37fSmrg AC_ARG_WITH(release-version, 633b042e37fSmrg AC_HELP_STRING([--with-release-version=STRING], 634b042e37fSmrg [Use release version string in package name]), 635b042e37fSmrg [RELEASE_VERSION="$withval"], 636b042e37fSmrg [RELEASE_VERSION=""]) 637b042e37fSmrg if test "x$RELEASE_VERSION" != "x"; then 638b042e37fSmrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 639b042e37fSmrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 640b042e37fSmrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 641b042e37fSmrg fi 642b042e37fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 643b042e37fSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 644b042e37fSmrg [Major version of this package]) 645b042e37fSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2` 646b042e37fSmrg if test "x$PVM" = "x"; then 647b042e37fSmrg PVM="0" 648b042e37fSmrg fi 649b042e37fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 650b042e37fSmrg [$PVM], 651b042e37fSmrg [Minor version of this package]) 652b042e37fSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3` 653b042e37fSmrg if test "x$PVP" = "x"; then 654b042e37fSmrg PVP="0" 655b042e37fSmrg fi 656b042e37fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 657b042e37fSmrg [$PVP], 658b042e37fSmrg [Patch version of this package]) 659b042e37fSmrg]) 660b042e37fSmrg 661b042e37fSmrg# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. 662b042e37fSmrg# 663b042e37fSmrg# This file is free software; the Free Software Foundation 664b042e37fSmrg# gives unlimited permission to copy and/or distribute it, 665b042e37fSmrg# with or without modifications, as long as this notice is preserved. 666b042e37fSmrg 667b042e37fSmrg# AM_AUTOMAKE_VERSION(VERSION) 668b042e37fSmrg# ---------------------------- 669b042e37fSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 670b042e37fSmrg# generated from the m4 files accompanying Automake X.Y. 671b042e37fSmrg# (This private macro should not be called outside this file.) 672b042e37fSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 673b042e37fSmrg[am__api_version='1.10' 674b042e37fSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 675b042e37fSmrgdnl require some minimum version. Point them to the right macro. 676b042e37fSmrgm4_if([$1], [1.10], [], 677b042e37fSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 678b042e37fSmrg]) 679b042e37fSmrg 680b042e37fSmrg# _AM_AUTOCONF_VERSION(VERSION) 681b042e37fSmrg# ----------------------------- 682b042e37fSmrg# aclocal traces this macro to find the Autoconf version. 683b042e37fSmrg# This is a private macro too. Using m4_define simplifies 684b042e37fSmrg# the logic in aclocal, which can simply ignore this definition. 685b042e37fSmrgm4_define([_AM_AUTOCONF_VERSION], []) 686b042e37fSmrg 687b042e37fSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 688b042e37fSmrg# ------------------------------- 689b042e37fSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 690b042e37fSmrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 691b042e37fSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 692b042e37fSmrg[AM_AUTOMAKE_VERSION([1.10])dnl 693b042e37fSmrg_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) 694b042e37fSmrg 695b042e37fSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 696b042e37fSmrg 697b042e37fSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 698b042e37fSmrg# 699b042e37fSmrg# This file is free software; the Free Software Foundation 700b042e37fSmrg# gives unlimited permission to copy and/or distribute it, 701b042e37fSmrg# with or without modifications, as long as this notice is preserved. 702b042e37fSmrg 703b042e37fSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 704b042e37fSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 705b042e37fSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 706b042e37fSmrg# 707b042e37fSmrg# Of course, Automake must honor this variable whenever it calls a 708b042e37fSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 709b042e37fSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 710b042e37fSmrg# depending on how configure is run. This is pretty annoying, since 711b042e37fSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 712b042e37fSmrg# source directory, any form will work fine, but in subdirectories a 713b042e37fSmrg# relative path needs to be adjusted first. 714b042e37fSmrg# 715b042e37fSmrg# $ac_aux_dir/missing 716b042e37fSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 717b042e37fSmrg# $top_srcdir/$ac_aux_dir/missing 718b042e37fSmrg# fails if $ac_aux_dir is absolute, 719b042e37fSmrg# fails when called from a subdirectory in a VPATH build with 720b042e37fSmrg# a relative $ac_aux_dir 721b042e37fSmrg# 722b042e37fSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 723b042e37fSmrg# are both prefixed by $srcdir. In an in-source build this is usually 724b042e37fSmrg# harmless because $srcdir is `.', but things will broke when you 725b042e37fSmrg# start a VPATH build or use an absolute $srcdir. 726b042e37fSmrg# 727b042e37fSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 728b042e37fSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 729b042e37fSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 730b042e37fSmrg# and then we would define $MISSING as 731b042e37fSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 732b042e37fSmrg# This will work as long as MISSING is not called from configure, because 733b042e37fSmrg# unfortunately $(top_srcdir) has no meaning in configure. 734b042e37fSmrg# However there are other variables, like CC, which are often used in 735b042e37fSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 736b042e37fSmrg# 737b042e37fSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 738b042e37fSmrg# absolute PATH. The drawback is that using absolute paths prevent a 739b042e37fSmrg# configured tree to be moved without reconfiguration. 740b042e37fSmrg 741b042e37fSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 742b042e37fSmrg[dnl Rely on autoconf to set up CDPATH properly. 743b042e37fSmrgAC_PREREQ([2.50])dnl 744b042e37fSmrg# expand $ac_aux_dir to an absolute path 745b042e37fSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 746b042e37fSmrg]) 747b042e37fSmrg 748b042e37fSmrg# AM_CONDITIONAL -*- Autoconf -*- 749b042e37fSmrg 750b042e37fSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 751b042e37fSmrg# Free Software Foundation, Inc. 752b042e37fSmrg# 753b042e37fSmrg# This file is free software; the Free Software Foundation 754b042e37fSmrg# gives unlimited permission to copy and/or distribute it, 755b042e37fSmrg# with or without modifications, as long as this notice is preserved. 756b042e37fSmrg 757b042e37fSmrg# serial 8 758b042e37fSmrg 759b042e37fSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 760b042e37fSmrg# ------------------------------------- 761b042e37fSmrg# Define a conditional. 762b042e37fSmrgAC_DEFUN([AM_CONDITIONAL], 763b042e37fSmrg[AC_PREREQ(2.52)dnl 764b042e37fSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 765b042e37fSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 766b042e37fSmrgAC_SUBST([$1_TRUE])dnl 767b042e37fSmrgAC_SUBST([$1_FALSE])dnl 768b042e37fSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 769b042e37fSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 770b042e37fSmrgif $2; then 771b042e37fSmrg $1_TRUE= 772b042e37fSmrg $1_FALSE='#' 773b042e37fSmrgelse 774b042e37fSmrg $1_TRUE='#' 775b042e37fSmrg $1_FALSE= 776b042e37fSmrgfi 777b042e37fSmrgAC_CONFIG_COMMANDS_PRE( 778b042e37fSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 779b042e37fSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 780b042e37fSmrgUsually this means the macro was only invoked conditionally.]]) 781b042e37fSmrgfi])]) 782b042e37fSmrg 783b042e37fSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 784b042e37fSmrg# Free Software Foundation, Inc. 785b042e37fSmrg# 786b042e37fSmrg# This file is free software; the Free Software Foundation 787b042e37fSmrg# gives unlimited permission to copy and/or distribute it, 788b042e37fSmrg# with or without modifications, as long as this notice is preserved. 789b042e37fSmrg 790b042e37fSmrg# serial 9 791b042e37fSmrg 792b042e37fSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 793b042e37fSmrg# written in clear, in which case automake, when reading aclocal.m4, 794b042e37fSmrg# will think it sees a *use*, and therefore will trigger all it's 795b042e37fSmrg# C support machinery. Also note that it means that autoscan, seeing 796b042e37fSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 797b042e37fSmrg 798b042e37fSmrg 799b042e37fSmrg# _AM_DEPENDENCIES(NAME) 800b042e37fSmrg# ---------------------- 801b042e37fSmrg# See how the compiler implements dependency checking. 802b042e37fSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 803b042e37fSmrg# We try a few techniques and use that to set a single cache variable. 804b042e37fSmrg# 805b042e37fSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 806b042e37fSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 807b042e37fSmrg# dependency, and given that the user is not expected to run this macro, 808b042e37fSmrg# just rely on AC_PROG_CC. 809b042e37fSmrgAC_DEFUN([_AM_DEPENDENCIES], 810b042e37fSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 811b042e37fSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 812b042e37fSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 813b042e37fSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 814b042e37fSmrg 815b042e37fSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 816b042e37fSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 817b042e37fSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 818b042e37fSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 819b042e37fSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 820b042e37fSmrg [depcc="$$1" am_compiler_list=]) 821b042e37fSmrg 822b042e37fSmrgAC_CACHE_CHECK([dependency style of $depcc], 823b042e37fSmrg [am_cv_$1_dependencies_compiler_type], 824b042e37fSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 825b042e37fSmrg # We make a subdir and do the tests there. Otherwise we can end up 826b042e37fSmrg # making bogus files that we don't know about and never remove. For 827b042e37fSmrg # instance it was reported that on HP-UX the gcc test will end up 828b042e37fSmrg # making a dummy file named `D' -- because `-MD' means `put the output 829b042e37fSmrg # in D'. 830b042e37fSmrg mkdir conftest.dir 831b042e37fSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 832b042e37fSmrg # using a relative directory. 833b042e37fSmrg cp "$am_depcomp" conftest.dir 834b042e37fSmrg cd conftest.dir 835b042e37fSmrg # We will build objects and dependencies in a subdirectory because 836b042e37fSmrg # it helps to detect inapplicable dependency modes. For instance 837b042e37fSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 838b042e37fSmrg # side effect of compilation, but ICC will put the dependencies in 839b042e37fSmrg # the current directory while Tru64 will put them in the object 840b042e37fSmrg # directory. 841b042e37fSmrg mkdir sub 842b042e37fSmrg 843b042e37fSmrg am_cv_$1_dependencies_compiler_type=none 844b042e37fSmrg if test "$am_compiler_list" = ""; then 845b042e37fSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 846b042e37fSmrg fi 847b042e37fSmrg for depmode in $am_compiler_list; do 848b042e37fSmrg # Setup a source with many dependencies, because some compilers 849b042e37fSmrg # like to wrap large dependency lists on column 80 (with \), and 850b042e37fSmrg # we should not choose a depcomp mode which is confused by this. 851b042e37fSmrg # 852b042e37fSmrg # We need to recreate these files for each test, as the compiler may 853b042e37fSmrg # overwrite some of them when testing with obscure command lines. 854b042e37fSmrg # This happens at least with the AIX C compiler. 855b042e37fSmrg : > sub/conftest.c 856b042e37fSmrg for i in 1 2 3 4 5 6; do 857b042e37fSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 858b042e37fSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 859b042e37fSmrg # Solaris 8's {/usr,}/bin/sh. 860b042e37fSmrg touch sub/conftst$i.h 861b042e37fSmrg done 862b042e37fSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 863b042e37fSmrg 864b042e37fSmrg case $depmode in 865b042e37fSmrg nosideeffect) 866b042e37fSmrg # after this tag, mechanisms are not by side-effect, so they'll 867b042e37fSmrg # only be used when explicitly requested 868b042e37fSmrg if test "x$enable_dependency_tracking" = xyes; then 869b042e37fSmrg continue 870b042e37fSmrg else 871b042e37fSmrg break 872b042e37fSmrg fi 873b042e37fSmrg ;; 874b042e37fSmrg none) break ;; 875b042e37fSmrg esac 876b042e37fSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 877b042e37fSmrg # mode. It turns out that the SunPro C++ compiler does not properly 878b042e37fSmrg # handle `-M -o', and we need to detect this. 879b042e37fSmrg if depmode=$depmode \ 880b042e37fSmrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 881b042e37fSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 882b042e37fSmrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 883b042e37fSmrg >/dev/null 2>conftest.err && 884b042e37fSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 885b042e37fSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 886b042e37fSmrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 887b042e37fSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 888b042e37fSmrg # icc doesn't choke on unknown options, it will just issue warnings 889b042e37fSmrg # or remarks (even with -Werror). So we grep stderr for any message 890b042e37fSmrg # that says an option was ignored or not supported. 891b042e37fSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 892b042e37fSmrg # icc: Command line warning: ignoring option '-M'; no argument required 893b042e37fSmrg # The diagnosis changed in icc 8.0: 894b042e37fSmrg # icc: Command line remark: option '-MP' not supported 895b042e37fSmrg if (grep 'ignoring option' conftest.err || 896b042e37fSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 897b042e37fSmrg am_cv_$1_dependencies_compiler_type=$depmode 898b042e37fSmrg break 899b042e37fSmrg fi 900b042e37fSmrg fi 901b042e37fSmrg done 902b042e37fSmrg 903b042e37fSmrg cd .. 904b042e37fSmrg rm -rf conftest.dir 905b042e37fSmrgelse 906b042e37fSmrg am_cv_$1_dependencies_compiler_type=none 907b042e37fSmrgfi 908b042e37fSmrg]) 909b042e37fSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 910b042e37fSmrgAM_CONDITIONAL([am__fastdep$1], [ 911b042e37fSmrg test "x$enable_dependency_tracking" != xno \ 912b042e37fSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 913b042e37fSmrg]) 914b042e37fSmrg 915b042e37fSmrg 916b042e37fSmrg# AM_SET_DEPDIR 917b042e37fSmrg# ------------- 918b042e37fSmrg# Choose a directory name for dependency files. 919b042e37fSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 920b042e37fSmrgAC_DEFUN([AM_SET_DEPDIR], 921b042e37fSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 922b042e37fSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 923b042e37fSmrg]) 924b042e37fSmrg 925b042e37fSmrg 926b042e37fSmrg# AM_DEP_TRACK 927b042e37fSmrg# ------------ 928b042e37fSmrgAC_DEFUN([AM_DEP_TRACK], 929b042e37fSmrg[AC_ARG_ENABLE(dependency-tracking, 930b042e37fSmrg[ --disable-dependency-tracking speeds up one-time build 931b042e37fSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 932b042e37fSmrgif test "x$enable_dependency_tracking" != xno; then 933b042e37fSmrg am_depcomp="$ac_aux_dir/depcomp" 934b042e37fSmrg AMDEPBACKSLASH='\' 935b042e37fSmrgfi 936b042e37fSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 937b042e37fSmrgAC_SUBST([AMDEPBACKSLASH])dnl 938b042e37fSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 939b042e37fSmrg]) 940b042e37fSmrg 941b042e37fSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 942b042e37fSmrg 943b042e37fSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 944b042e37fSmrg# Free Software Foundation, Inc. 945b042e37fSmrg# 946b042e37fSmrg# This file is free software; the Free Software Foundation 947b042e37fSmrg# gives unlimited permission to copy and/or distribute it, 948b042e37fSmrg# with or without modifications, as long as this notice is preserved. 949b042e37fSmrg 950b042e37fSmrg#serial 3 951b042e37fSmrg 952b042e37fSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 953b042e37fSmrg# ------------------------------ 954b042e37fSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 955b042e37fSmrg[for mf in $CONFIG_FILES; do 956b042e37fSmrg # Strip MF so we end up with the name of the file. 957b042e37fSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 958b042e37fSmrg # Check whether this is an Automake generated Makefile or not. 959b042e37fSmrg # We used to match only the files named `Makefile.in', but 960b042e37fSmrg # some people rename them; so instead we look at the file content. 961b042e37fSmrg # Grep'ing the first line is not enough: some people post-process 962b042e37fSmrg # each Makefile.in and add a new line on top of each file to say so. 963b042e37fSmrg # Grep'ing the whole file is not good either: AIX grep has a line 964b042e37fSmrg # limit of 2048, but all sed's we know have understand at least 4000. 965b042e37fSmrg if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then 966b042e37fSmrg dirpart=`AS_DIRNAME("$mf")` 967b042e37fSmrg else 968b042e37fSmrg continue 969b042e37fSmrg fi 970b042e37fSmrg # Extract the definition of DEPDIR, am__include, and am__quote 971b042e37fSmrg # from the Makefile without running `make'. 972b042e37fSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 973b042e37fSmrg test -z "$DEPDIR" && continue 974b042e37fSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 975b042e37fSmrg test -z "am__include" && continue 976b042e37fSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 977b042e37fSmrg # When using ansi2knr, U may be empty or an underscore; expand it 978b042e37fSmrg U=`sed -n 's/^U = //p' < "$mf"` 979b042e37fSmrg # Find all dependency output files, they are included files with 980b042e37fSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 981b042e37fSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 982b042e37fSmrg # expansion. 983b042e37fSmrg for file in `sed -n " 984b042e37fSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 985b042e37fSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 986b042e37fSmrg # Make sure the directory exists. 987b042e37fSmrg test -f "$dirpart/$file" && continue 988b042e37fSmrg fdir=`AS_DIRNAME(["$file"])` 989b042e37fSmrg AS_MKDIR_P([$dirpart/$fdir]) 990b042e37fSmrg # echo "creating $dirpart/$file" 991b042e37fSmrg echo '# dummy' > "$dirpart/$file" 992b042e37fSmrg done 993b042e37fSmrgdone 994b042e37fSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 995b042e37fSmrg 996b042e37fSmrg 997b042e37fSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 998b042e37fSmrg# ----------------------------- 999b042e37fSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 1000b042e37fSmrg# 1001b042e37fSmrg# This code is only required when automatic dependency tracking 1002b042e37fSmrg# is enabled. FIXME. This creates each `.P' file that we will 1003b042e37fSmrg# need in order to bootstrap the dependency handling code. 1004b042e37fSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 1005b042e37fSmrg[AC_CONFIG_COMMANDS([depfiles], 1006b042e37fSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 1007b042e37fSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 1008b042e37fSmrg]) 1009b042e37fSmrg 1010b042e37fSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 1011b042e37fSmrg# Free Software Foundation, Inc. 1012b042e37fSmrg# 1013b042e37fSmrg# This file is free software; the Free Software Foundation 1014b042e37fSmrg# gives unlimited permission to copy and/or distribute it, 1015b042e37fSmrg# with or without modifications, as long as this notice is preserved. 1016b042e37fSmrg 1017b042e37fSmrg# serial 8 1018b042e37fSmrg 1019b042e37fSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 1020b042e37fSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 1021b042e37fSmrg 1022b042e37fSmrg# Do all the work for Automake. -*- Autoconf -*- 1023b042e37fSmrg 1024b042e37fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 1025b042e37fSmrg# 2005, 2006 Free Software Foundation, Inc. 1026b042e37fSmrg# 1027b042e37fSmrg# This file is free software; the Free Software Foundation 1028b042e37fSmrg# gives unlimited permission to copy and/or distribute it, 1029b042e37fSmrg# with or without modifications, as long as this notice is preserved. 1030b042e37fSmrg 1031b042e37fSmrg# serial 12 1032b042e37fSmrg 1033b042e37fSmrg# This macro actually does too much. Some checks are only needed if 1034b042e37fSmrg# your package does certain things. But this isn't really a big deal. 1035b042e37fSmrg 1036b042e37fSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 1037b042e37fSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 1038b042e37fSmrg# ----------------------------------------------- 1039b042e37fSmrg# The call with PACKAGE and VERSION arguments is the old style 1040b042e37fSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 1041b042e37fSmrg# and VERSION should now be passed to AC_INIT and removed from 1042b042e37fSmrg# the call to AM_INIT_AUTOMAKE. 1043b042e37fSmrg# We support both call styles for the transition. After 1044b042e37fSmrg# the next Automake release, Autoconf can make the AC_INIT 1045b042e37fSmrg# arguments mandatory, and then we can depend on a new Autoconf 1046b042e37fSmrg# release and drop the old call support. 1047b042e37fSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 1048b042e37fSmrg[AC_PREREQ([2.60])dnl 1049b042e37fSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 1050b042e37fSmrgdnl the ones we care about. 1051b042e37fSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 1052b042e37fSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 1053b042e37fSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 1054b042e37fSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 1055b042e37fSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 1056b042e37fSmrg # is not polluted with repeated "-I." 1057b042e37fSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 1058b042e37fSmrg # test to see if srcdir already configured 1059b042e37fSmrg if test -f $srcdir/config.status; then 1060b042e37fSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 1061b042e37fSmrg fi 1062b042e37fSmrgfi 1063b042e37fSmrg 1064b042e37fSmrg# test whether we have cygpath 1065b042e37fSmrgif test -z "$CYGPATH_W"; then 1066b042e37fSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 1067b042e37fSmrg CYGPATH_W='cygpath -w' 1068b042e37fSmrg else 1069b042e37fSmrg CYGPATH_W=echo 1070b042e37fSmrg fi 1071b042e37fSmrgfi 1072b042e37fSmrgAC_SUBST([CYGPATH_W]) 1073b042e37fSmrg 1074b042e37fSmrg# Define the identity of the package. 1075b042e37fSmrgdnl Distinguish between old-style and new-style calls. 1076b042e37fSmrgm4_ifval([$2], 1077b042e37fSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 1078b042e37fSmrg AC_SUBST([PACKAGE], [$1])dnl 1079b042e37fSmrg AC_SUBST([VERSION], [$2])], 1080b042e37fSmrg[_AM_SET_OPTIONS([$1])dnl 1081b042e37fSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 1082b042e37fSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 1083b042e37fSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 1084b042e37fSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 1085b042e37fSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 1086b042e37fSmrg 1087b042e37fSmrg_AM_IF_OPTION([no-define],, 1088b042e37fSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 1089b042e37fSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 1090b042e37fSmrg 1091b042e37fSmrg# Some tools Automake needs. 1092b042e37fSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 1093b042e37fSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 1094b042e37fSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 1095b042e37fSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 1096b042e37fSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 1097b042e37fSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 1098b042e37fSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 1099b042e37fSmrgAM_PROG_INSTALL_SH 1100b042e37fSmrgAM_PROG_INSTALL_STRIP 1101b042e37fSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 1102b042e37fSmrg# We need awk for the "check" target. The system "awk" is bad on 1103b042e37fSmrg# some platforms. 1104b042e37fSmrgAC_REQUIRE([AC_PROG_AWK])dnl 1105b042e37fSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 1106b042e37fSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 1107b042e37fSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 1108b042e37fSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 1109b042e37fSmrg [_AM_PROG_TAR([v7])])]) 1110b042e37fSmrg_AM_IF_OPTION([no-dependencies],, 1111b042e37fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 1112b042e37fSmrg [_AM_DEPENDENCIES(CC)], 1113b042e37fSmrg [define([AC_PROG_CC], 1114b042e37fSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 1115b042e37fSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 1116b042e37fSmrg [_AM_DEPENDENCIES(CXX)], 1117b042e37fSmrg [define([AC_PROG_CXX], 1118b042e37fSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 1119b042e37fSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 1120b042e37fSmrg [_AM_DEPENDENCIES(OBJC)], 1121b042e37fSmrg [define([AC_PROG_OBJC], 1122b042e37fSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 1123b042e37fSmrg]) 1124b042e37fSmrg]) 1125b042e37fSmrg 1126b042e37fSmrg 1127b042e37fSmrg# When config.status generates a header, we must update the stamp-h file. 1128b042e37fSmrg# This file resides in the same directory as the config header 1129b042e37fSmrg# that is generated. The stamp files are numbered to have different names. 1130b042e37fSmrg 1131b042e37fSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1132b042e37fSmrg# loop where config.status creates the headers, so we can generate 1133b042e37fSmrg# our stamp files there. 1134b042e37fSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1135b042e37fSmrg[# Compute $1's index in $config_headers. 1136b042e37fSmrg_am_stamp_count=1 1137b042e37fSmrgfor _am_header in $config_headers :; do 1138b042e37fSmrg case $_am_header in 1139b042e37fSmrg $1 | $1:* ) 1140b042e37fSmrg break ;; 1141b042e37fSmrg * ) 1142b042e37fSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1143b042e37fSmrg esac 1144b042e37fSmrgdone 1145b042e37fSmrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 1146b042e37fSmrg 1147b042e37fSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 1148b042e37fSmrg# 1149b042e37fSmrg# This file is free software; the Free Software Foundation 1150b042e37fSmrg# gives unlimited permission to copy and/or distribute it, 1151b042e37fSmrg# with or without modifications, as long as this notice is preserved. 1152b042e37fSmrg 1153b042e37fSmrg# AM_PROG_INSTALL_SH 1154b042e37fSmrg# ------------------ 1155b042e37fSmrg# Define $install_sh. 1156b042e37fSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 1157b042e37fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1158b042e37fSmrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 1159b042e37fSmrgAC_SUBST(install_sh)]) 1160b042e37fSmrg 1161b042e37fSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 1162b042e37fSmrg# 1163b042e37fSmrg# This file is free software; the Free Software Foundation 1164b042e37fSmrg# gives unlimited permission to copy and/or distribute it, 1165b042e37fSmrg# with or without modifications, as long as this notice is preserved. 1166b042e37fSmrg 1167b042e37fSmrg# serial 2 1168b042e37fSmrg 1169b042e37fSmrg# Check whether the underlying file-system supports filenames 1170b042e37fSmrg# with a leading dot. For instance MS-DOS doesn't. 1171b042e37fSmrgAC_DEFUN([AM_SET_LEADING_DOT], 1172b042e37fSmrg[rm -rf .tst 2>/dev/null 1173b042e37fSmrgmkdir .tst 2>/dev/null 1174b042e37fSmrgif test -d .tst; then 1175b042e37fSmrg am__leading_dot=. 1176b042e37fSmrgelse 1177b042e37fSmrg am__leading_dot=_ 1178b042e37fSmrgfi 1179b042e37fSmrgrmdir .tst 2>/dev/null 1180b042e37fSmrgAC_SUBST([am__leading_dot])]) 1181b042e37fSmrg 1182b042e37fSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1183b042e37fSmrg 1184b042e37fSmrg# serial 48 AC_PROG_LIBTOOL 1185b042e37fSmrg 1186b042e37fSmrg 1187b042e37fSmrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 1188b042e37fSmrg# ----------------------------------------------------------- 1189b042e37fSmrg# If this macro is not defined by Autoconf, define it here. 1190b042e37fSmrgm4_ifdef([AC_PROVIDE_IFELSE], 1191b042e37fSmrg [], 1192b042e37fSmrg [m4_define([AC_PROVIDE_IFELSE], 1193b042e37fSmrg [m4_ifdef([AC_PROVIDE_$1], 1194b042e37fSmrg [$2], [$3])])]) 1195b042e37fSmrg 1196b042e37fSmrg 1197b042e37fSmrg# AC_PROG_LIBTOOL 1198b042e37fSmrg# --------------- 1199b042e37fSmrgAC_DEFUN([AC_PROG_LIBTOOL], 1200b042e37fSmrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 1201b042e37fSmrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 1202b042e37fSmrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 1203b042e37fSmrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 1204b042e37fSmrg [AC_LIBTOOL_CXX], 1205b042e37fSmrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 1206b042e37fSmrg ])]) 1207b042e37fSmrgdnl And a similar setup for Fortran 77 support 1208b042e37fSmrg AC_PROVIDE_IFELSE([AC_PROG_F77], 1209b042e37fSmrg [AC_LIBTOOL_F77], 1210b042e37fSmrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 1211b042e37fSmrg])]) 1212b042e37fSmrg 1213b042e37fSmrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 1214b042e37fSmrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 1215b042e37fSmrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 1216b042e37fSmrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 1217b042e37fSmrg [AC_LIBTOOL_GCJ], 1218b042e37fSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 1219b042e37fSmrg [AC_LIBTOOL_GCJ], 1220b042e37fSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 1221b042e37fSmrg [AC_LIBTOOL_GCJ], 1222b042e37fSmrg [ifdef([AC_PROG_GCJ], 1223b042e37fSmrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 1224b042e37fSmrg ifdef([A][M_PROG_GCJ], 1225b042e37fSmrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 1226b042e37fSmrg ifdef([LT_AC_PROG_GCJ], 1227b042e37fSmrg [define([LT_AC_PROG_GCJ], 1228b042e37fSmrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 1229b042e37fSmrg])])# AC_PROG_LIBTOOL 1230b042e37fSmrg 1231b042e37fSmrg 1232b042e37fSmrg# _AC_PROG_LIBTOOL 1233b042e37fSmrg# ---------------- 1234b042e37fSmrgAC_DEFUN([_AC_PROG_LIBTOOL], 1235b042e37fSmrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 1236b042e37fSmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 1237b042e37fSmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 1238b042e37fSmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 1239b042e37fSmrg 1240b042e37fSmrg# This can be used to rebuild libtool when needed 1241b042e37fSmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 1242b042e37fSmrg 1243b042e37fSmrg# Always use our own libtool. 1244b042e37fSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1245b042e37fSmrgAC_SUBST(LIBTOOL)dnl 1246b042e37fSmrg 1247b042e37fSmrg# Prevent multiple expansion 1248b042e37fSmrgdefine([AC_PROG_LIBTOOL], []) 1249b042e37fSmrg])# _AC_PROG_LIBTOOL 1250b042e37fSmrg 1251b042e37fSmrg 1252b042e37fSmrg# AC_LIBTOOL_SETUP 1253b042e37fSmrg# ---------------- 1254b042e37fSmrgAC_DEFUN([AC_LIBTOOL_SETUP], 1255b042e37fSmrg[AC_PREREQ(2.50)dnl 1256b042e37fSmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 1257b042e37fSmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 1258b042e37fSmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 1259b042e37fSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 1260b042e37fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1261b042e37fSmrgAC_REQUIRE([AC_PROG_CC])dnl 1262b042e37fSmrgAC_REQUIRE([AC_PROG_LD])dnl 1263b042e37fSmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 1264b042e37fSmrgAC_REQUIRE([AC_PROG_NM])dnl 1265b042e37fSmrg 1266b042e37fSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1267b042e37fSmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 1268b042e37fSmrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 1269b042e37fSmrgAC_REQUIRE([AC_OBJEXT])dnl 1270b042e37fSmrgAC_REQUIRE([AC_EXEEXT])dnl 1271b042e37fSmrgdnl 1272b042e37fSmrg 1273b042e37fSmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 1274b042e37fSmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 1275b042e37fSmrgAC_LIBTOOL_OBJDIR 1276b042e37fSmrg 1277b042e37fSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1278b042e37fSmrg_LT_AC_PROG_ECHO_BACKSLASH 1279b042e37fSmrg 1280b042e37fSmrgcase $host_os in 1281b042e37fSmrgaix3*) 1282b042e37fSmrg # AIX sometimes has problems with the GCC collect2 program. For some 1283b042e37fSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 1284b042e37fSmrg # vanish in a puff of smoke. 1285b042e37fSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 1286b042e37fSmrg COLLECT_NAMES= 1287b042e37fSmrg export COLLECT_NAMES 1288b042e37fSmrg fi 1289b042e37fSmrg ;; 1290b042e37fSmrgesac 1291b042e37fSmrg 1292b042e37fSmrg# Sed substitution that helps us do robust quoting. It backslashifies 1293b042e37fSmrg# metacharacters that are still active within double-quoted strings. 1294b042e37fSmrgXsed='sed -e 1s/^X//' 1295b042e37fSmrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 1296b042e37fSmrg 1297b042e37fSmrg# Same as above, but do not quote variable references. 1298b042e37fSmrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 1299b042e37fSmrg 1300b042e37fSmrg# Sed substitution to delay expansion of an escaped shell variable in a 1301b042e37fSmrg# double_quote_subst'ed string. 1302b042e37fSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1303b042e37fSmrg 1304b042e37fSmrg# Sed substitution to avoid accidental globbing in evaled expressions 1305b042e37fSmrgno_glob_subst='s/\*/\\\*/g' 1306b042e37fSmrg 1307b042e37fSmrg# Constants: 1308b042e37fSmrgrm="rm -f" 1309b042e37fSmrg 1310b042e37fSmrg# Global variables: 1311b042e37fSmrgdefault_ofile=libtool 1312b042e37fSmrgcan_build_shared=yes 1313b042e37fSmrg 1314b042e37fSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 1315b042e37fSmrg# which needs '.lib'). 1316b042e37fSmrglibext=a 1317b042e37fSmrgltmain="$ac_aux_dir/ltmain.sh" 1318b042e37fSmrgofile="$default_ofile" 1319b042e37fSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 1320b042e37fSmrg 1321b042e37fSmrgAC_CHECK_TOOL(AR, ar, false) 1322b042e37fSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1323b042e37fSmrgAC_CHECK_TOOL(STRIP, strip, :) 1324b042e37fSmrg 1325b042e37fSmrgold_CC="$CC" 1326b042e37fSmrgold_CFLAGS="$CFLAGS" 1327b042e37fSmrg 1328b042e37fSmrg# Set sane defaults for various variables 1329b042e37fSmrgtest -z "$AR" && AR=ar 1330b042e37fSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 1331b042e37fSmrgtest -z "$AS" && AS=as 1332b042e37fSmrgtest -z "$CC" && CC=cc 1333b042e37fSmrgtest -z "$LTCC" && LTCC=$CC 1334b042e37fSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 1335b042e37fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 1336b042e37fSmrgtest -z "$LD" && LD=ld 1337b042e37fSmrgtest -z "$LN_S" && LN_S="ln -s" 1338b042e37fSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 1339b042e37fSmrgtest -z "$NM" && NM=nm 1340b042e37fSmrgtest -z "$SED" && SED=sed 1341b042e37fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 1342b042e37fSmrgtest -z "$RANLIB" && RANLIB=: 1343b042e37fSmrgtest -z "$STRIP" && STRIP=: 1344b042e37fSmrgtest -z "$ac_objext" && ac_objext=o 1345b042e37fSmrg 1346b042e37fSmrg# Determine commands to create old-style static archives. 1347b042e37fSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 1348b042e37fSmrgold_postinstall_cmds='chmod 644 $oldlib' 1349b042e37fSmrgold_postuninstall_cmds= 1350b042e37fSmrg 1351b042e37fSmrgif test -n "$RANLIB"; then 1352b042e37fSmrg case $host_os in 1353b042e37fSmrg openbsd*) 1354b042e37fSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1355b042e37fSmrg ;; 1356b042e37fSmrg *) 1357b042e37fSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1358b042e37fSmrg ;; 1359b042e37fSmrg esac 1360b042e37fSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1361b042e37fSmrgfi 1362b042e37fSmrg 1363b042e37fSmrg_LT_CC_BASENAME([$compiler]) 1364b042e37fSmrg 1365b042e37fSmrg# Only perform the check for file, if the check method requires it 1366b042e37fSmrgcase $deplibs_check_method in 1367b042e37fSmrgfile_magic*) 1368b042e37fSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 1369b042e37fSmrg AC_PATH_MAGIC 1370b042e37fSmrg fi 1371b042e37fSmrg ;; 1372b042e37fSmrgesac 1373b042e37fSmrg 1374b042e37fSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 1375b042e37fSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 1376b042e37fSmrgenable_win32_dll=yes, enable_win32_dll=no) 1377b042e37fSmrg 1378b042e37fSmrgAC_ARG_ENABLE([libtool-lock], 1379b042e37fSmrg [AC_HELP_STRING([--disable-libtool-lock], 1380b042e37fSmrg [avoid locking (might break parallel builds)])]) 1381b042e37fSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1382b042e37fSmrg 1383b042e37fSmrgAC_ARG_WITH([pic], 1384b042e37fSmrg [AC_HELP_STRING([--with-pic], 1385b042e37fSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 1386b042e37fSmrg [pic_mode="$withval"], 1387b042e37fSmrg [pic_mode=default]) 1388b042e37fSmrgtest -z "$pic_mode" && pic_mode=default 1389b042e37fSmrg 1390b042e37fSmrg# Use C for the default configuration in the libtool script 1391b042e37fSmrgtagname= 1392b042e37fSmrgAC_LIBTOOL_LANG_C_CONFIG 1393b042e37fSmrg_LT_AC_TAGCONFIG 1394b042e37fSmrg])# AC_LIBTOOL_SETUP 1395b042e37fSmrg 1396b042e37fSmrg 1397b042e37fSmrg# _LT_AC_SYS_COMPILER 1398b042e37fSmrg# ------------------- 1399b042e37fSmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 1400b042e37fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 1401b042e37fSmrg 1402b042e37fSmrg# If no C compiler was specified, use CC. 1403b042e37fSmrgLTCC=${LTCC-"$CC"} 1404b042e37fSmrg 1405b042e37fSmrg# If no C compiler flags were specified, use CFLAGS. 1406b042e37fSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 1407b042e37fSmrg 1408b042e37fSmrg# Allow CC to be a program name with arguments. 1409b042e37fSmrgcompiler=$CC 1410b042e37fSmrg])# _LT_AC_SYS_COMPILER 1411b042e37fSmrg 1412b042e37fSmrg 1413b042e37fSmrg# _LT_CC_BASENAME(CC) 1414b042e37fSmrg# ------------------- 1415b042e37fSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1416b042e37fSmrgAC_DEFUN([_LT_CC_BASENAME], 1417b042e37fSmrg[for cc_temp in $1""; do 1418b042e37fSmrg case $cc_temp in 1419b042e37fSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1420b042e37fSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1421b042e37fSmrg \-*) ;; 1422b042e37fSmrg *) break;; 1423b042e37fSmrg esac 1424b042e37fSmrgdone 1425b042e37fSmrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 1426b042e37fSmrg]) 1427b042e37fSmrg 1428b042e37fSmrg 1429b042e37fSmrg# _LT_COMPILER_BOILERPLATE 1430b042e37fSmrg# ------------------------ 1431b042e37fSmrg# Check for compiler boilerplate output or warnings with 1432b042e37fSmrg# the simple compiler test code. 1433b042e37fSmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 1434b042e37fSmrg[ac_outfile=conftest.$ac_objext 1435b042e37fSmrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext 1436b042e37fSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 1437b042e37fSmrg_lt_compiler_boilerplate=`cat conftest.err` 1438b042e37fSmrg$rm conftest* 1439b042e37fSmrg])# _LT_COMPILER_BOILERPLATE 1440b042e37fSmrg 1441b042e37fSmrg 1442b042e37fSmrg# _LT_LINKER_BOILERPLATE 1443b042e37fSmrg# ---------------------- 1444b042e37fSmrg# Check for linker boilerplate output or warnings with 1445b042e37fSmrg# the simple link test code. 1446b042e37fSmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 1447b042e37fSmrg[ac_outfile=conftest.$ac_objext 1448b042e37fSmrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext 1449b042e37fSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 1450b042e37fSmrg_lt_linker_boilerplate=`cat conftest.err` 1451b042e37fSmrg$rm conftest* 1452b042e37fSmrg])# _LT_LINKER_BOILERPLATE 1453b042e37fSmrg 1454b042e37fSmrg 1455b042e37fSmrg# _LT_AC_SYS_LIBPATH_AIX 1456b042e37fSmrg# ---------------------- 1457b042e37fSmrg# Links a minimal program and checks the executable 1458b042e37fSmrg# for the system default hardcoded library path. In most cases, 1459b042e37fSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 1460b042e37fSmrg# the location of the communication and MPI libs are included too. 1461b042e37fSmrg# If we don't find anything, use the default library path according 1462b042e37fSmrg# to the aix ld manual. 1463b042e37fSmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 1464b042e37fSmrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 1465b042e37fSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 1466b042e37fSmrg}'` 1467b042e37fSmrg# Check for a 64-bit object if we didn't find anything. 1468b042e37fSmrgif 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; } 1469b042e37fSmrg}'`; fi],[]) 1470b042e37fSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 1471b042e37fSmrg])# _LT_AC_SYS_LIBPATH_AIX 1472b042e37fSmrg 1473b042e37fSmrg 1474b042e37fSmrg# _LT_AC_SHELL_INIT(ARG) 1475b042e37fSmrg# ---------------------- 1476b042e37fSmrgAC_DEFUN([_LT_AC_SHELL_INIT], 1477b042e37fSmrg[ifdef([AC_DIVERSION_NOTICE], 1478b042e37fSmrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 1479b042e37fSmrg [AC_DIVERT_PUSH(NOTICE)]) 1480b042e37fSmrg$1 1481b042e37fSmrgAC_DIVERT_POP 1482b042e37fSmrg])# _LT_AC_SHELL_INIT 1483b042e37fSmrg 1484b042e37fSmrg 1485b042e37fSmrg# _LT_AC_PROG_ECHO_BACKSLASH 1486b042e37fSmrg# -------------------------- 1487b042e37fSmrg# Add some code to the start of the generated configure script which 1488b042e37fSmrg# will find an echo command which doesn't interpret backslashes. 1489b042e37fSmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 1490b042e37fSmrg[_LT_AC_SHELL_INIT([ 1491b042e37fSmrg# Check that we are running under the correct shell. 1492b042e37fSmrgSHELL=${CONFIG_SHELL-/bin/sh} 1493b042e37fSmrg 1494b042e37fSmrgcase X$ECHO in 1495b042e37fSmrgX*--fallback-echo) 1496b042e37fSmrg # Remove one level of quotation (which was required for Make). 1497b042e37fSmrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 1498b042e37fSmrg ;; 1499b042e37fSmrgesac 1500b042e37fSmrg 1501b042e37fSmrgecho=${ECHO-echo} 1502b042e37fSmrgif test "X[$]1" = X--no-reexec; then 1503b042e37fSmrg # Discard the --no-reexec flag, and continue. 1504b042e37fSmrg shift 1505b042e37fSmrgelif test "X[$]1" = X--fallback-echo; then 1506b042e37fSmrg # Avoid inline document here, it may be left over 1507b042e37fSmrg : 1508b042e37fSmrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 1509b042e37fSmrg # Yippee, $echo works! 1510b042e37fSmrg : 1511b042e37fSmrgelse 1512b042e37fSmrg # Restart under the correct shell. 1513b042e37fSmrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 1514b042e37fSmrgfi 1515b042e37fSmrg 1516b042e37fSmrgif test "X[$]1" = X--fallback-echo; then 1517b042e37fSmrg # used as fallback echo 1518b042e37fSmrg shift 1519b042e37fSmrg cat <<EOF 1520b042e37fSmrg[$]* 1521b042e37fSmrgEOF 1522b042e37fSmrg exit 0 1523b042e37fSmrgfi 1524b042e37fSmrg 1525b042e37fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 1526b042e37fSmrg# if CDPATH is set. 1527b042e37fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1528b042e37fSmrg 1529b042e37fSmrgif test -z "$ECHO"; then 1530b042e37fSmrgif test "X${echo_test_string+set}" != Xset; then 1531b042e37fSmrg# find a string as large as possible, as long as the shell can cope with it 1532b042e37fSmrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 1533b042e37fSmrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 1534b042e37fSmrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 1535b042e37fSmrg echo_test_string=`eval $cmd` && 1536b042e37fSmrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 1537b042e37fSmrg then 1538b042e37fSmrg break 1539b042e37fSmrg fi 1540b042e37fSmrg done 1541b042e37fSmrgfi 1542b042e37fSmrg 1543b042e37fSmrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 1544b042e37fSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 1545b042e37fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1546b042e37fSmrg : 1547b042e37fSmrgelse 1548b042e37fSmrg # The Solaris, AIX, and Digital Unix default echo programs unquote 1549b042e37fSmrg # backslashes. This makes it impossible to quote backslashes using 1550b042e37fSmrg # echo "$something" | sed 's/\\/\\\\/g' 1551b042e37fSmrg # 1552b042e37fSmrg # So, first we look for a working echo in the user's PATH. 1553b042e37fSmrg 1554b042e37fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 1555b042e37fSmrg for dir in $PATH /usr/ucb; do 1556b042e37fSmrg IFS="$lt_save_ifs" 1557b042e37fSmrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 1558b042e37fSmrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 1559b042e37fSmrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 1560b042e37fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1561b042e37fSmrg echo="$dir/echo" 1562b042e37fSmrg break 1563b042e37fSmrg fi 1564b042e37fSmrg done 1565b042e37fSmrg IFS="$lt_save_ifs" 1566b042e37fSmrg 1567b042e37fSmrg if test "X$echo" = Xecho; then 1568b042e37fSmrg # We didn't find a better echo, so look for alternatives. 1569b042e37fSmrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 1570b042e37fSmrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 1571b042e37fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1572b042e37fSmrg # This shell has a builtin print -r that does the trick. 1573b042e37fSmrg echo='print -r' 1574b042e37fSmrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 1575b042e37fSmrg test "X$CONFIG_SHELL" != X/bin/ksh; then 1576b042e37fSmrg # If we have ksh, try running configure again with it. 1577b042e37fSmrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 1578b042e37fSmrg export ORIGINAL_CONFIG_SHELL 1579b042e37fSmrg CONFIG_SHELL=/bin/ksh 1580b042e37fSmrg export CONFIG_SHELL 1581b042e37fSmrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 1582b042e37fSmrg else 1583b042e37fSmrg # Try using printf. 1584b042e37fSmrg echo='printf %s\n' 1585b042e37fSmrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 1586b042e37fSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 1587b042e37fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1588b042e37fSmrg # Cool, printf works 1589b042e37fSmrg : 1590b042e37fSmrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1591b042e37fSmrg test "X$echo_testing_string" = 'X\t' && 1592b042e37fSmrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1593b042e37fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1594b042e37fSmrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 1595b042e37fSmrg export CONFIG_SHELL 1596b042e37fSmrg SHELL="$CONFIG_SHELL" 1597b042e37fSmrg export SHELL 1598b042e37fSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 1599b042e37fSmrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1600b042e37fSmrg test "X$echo_testing_string" = 'X\t' && 1601b042e37fSmrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1602b042e37fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1603b042e37fSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 1604b042e37fSmrg else 1605b042e37fSmrg # maybe with a smaller string... 1606b042e37fSmrg prev=: 1607b042e37fSmrg 1608b042e37fSmrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 1609b042e37fSmrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 1610b042e37fSmrg then 1611b042e37fSmrg break 1612b042e37fSmrg fi 1613b042e37fSmrg prev="$cmd" 1614b042e37fSmrg done 1615b042e37fSmrg 1616b042e37fSmrg if test "$prev" != 'sed 50q "[$]0"'; then 1617b042e37fSmrg echo_test_string=`eval $prev` 1618b042e37fSmrg export echo_test_string 1619b042e37fSmrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 1620b042e37fSmrg else 1621b042e37fSmrg # Oops. We lost completely, so just stick with echo. 1622b042e37fSmrg echo=echo 1623b042e37fSmrg fi 1624b042e37fSmrg fi 1625b042e37fSmrg fi 1626b042e37fSmrg fi 1627b042e37fSmrgfi 1628b042e37fSmrgfi 1629b042e37fSmrg 1630b042e37fSmrg# Copy echo and quote the copy suitably for passing to libtool from 1631b042e37fSmrg# the Makefile, instead of quoting the original, which is used later. 1632b042e37fSmrgECHO=$echo 1633b042e37fSmrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 1634b042e37fSmrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 1635b042e37fSmrgfi 1636b042e37fSmrg 1637b042e37fSmrgAC_SUBST(ECHO) 1638b042e37fSmrg])])# _LT_AC_PROG_ECHO_BACKSLASH 1639b042e37fSmrg 1640b042e37fSmrg 1641b042e37fSmrg# _LT_AC_LOCK 1642b042e37fSmrg# ----------- 1643b042e37fSmrgAC_DEFUN([_LT_AC_LOCK], 1644b042e37fSmrg[AC_ARG_ENABLE([libtool-lock], 1645b042e37fSmrg [AC_HELP_STRING([--disable-libtool-lock], 1646b042e37fSmrg [avoid locking (might break parallel builds)])]) 1647b042e37fSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1648b042e37fSmrg 1649b042e37fSmrg# Some flags need to be propagated to the compiler or linker for good 1650b042e37fSmrg# libtool support. 1651b042e37fSmrgcase $host in 1652b042e37fSmrgia64-*-hpux*) 1653b042e37fSmrg # Find out which ABI we are using. 1654b042e37fSmrg echo 'int i;' > conftest.$ac_ext 1655b042e37fSmrg if AC_TRY_EVAL(ac_compile); then 1656b042e37fSmrg case `/usr/bin/file conftest.$ac_objext` in 1657b042e37fSmrg *ELF-32*) 1658b042e37fSmrg HPUX_IA64_MODE="32" 1659b042e37fSmrg ;; 1660b042e37fSmrg *ELF-64*) 1661b042e37fSmrg HPUX_IA64_MODE="64" 1662b042e37fSmrg ;; 1663b042e37fSmrg esac 1664b042e37fSmrg fi 1665b042e37fSmrg rm -rf conftest* 1666b042e37fSmrg ;; 1667b042e37fSmrg*-*-irix6*) 1668b042e37fSmrg # Find out which ABI we are using. 1669b042e37fSmrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 1670b042e37fSmrg if AC_TRY_EVAL(ac_compile); then 1671b042e37fSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 1672b042e37fSmrg case `/usr/bin/file conftest.$ac_objext` in 1673b042e37fSmrg *32-bit*) 1674b042e37fSmrg LD="${LD-ld} -melf32bsmip" 1675b042e37fSmrg ;; 1676b042e37fSmrg *N32*) 1677b042e37fSmrg LD="${LD-ld} -melf32bmipn32" 1678b042e37fSmrg ;; 1679b042e37fSmrg *64-bit*) 1680b042e37fSmrg LD="${LD-ld} -melf64bmip" 1681b042e37fSmrg ;; 1682b042e37fSmrg esac 1683b042e37fSmrg else 1684b042e37fSmrg case `/usr/bin/file conftest.$ac_objext` in 1685b042e37fSmrg *32-bit*) 1686b042e37fSmrg LD="${LD-ld} -32" 1687b042e37fSmrg ;; 1688b042e37fSmrg *N32*) 1689b042e37fSmrg LD="${LD-ld} -n32" 1690b042e37fSmrg ;; 1691b042e37fSmrg *64-bit*) 1692b042e37fSmrg LD="${LD-ld} -64" 1693b042e37fSmrg ;; 1694b042e37fSmrg esac 1695b042e37fSmrg fi 1696b042e37fSmrg fi 1697b042e37fSmrg rm -rf conftest* 1698b042e37fSmrg ;; 1699b042e37fSmrg 1700b042e37fSmrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 1701b042e37fSmrg # Find out which ABI we are using. 1702b042e37fSmrg echo 'int i;' > conftest.$ac_ext 1703b042e37fSmrg if AC_TRY_EVAL(ac_compile); then 1704b042e37fSmrg case `/usr/bin/file conftest.o` in 1705b042e37fSmrg *32-bit*) 1706b042e37fSmrg case $host in 1707b042e37fSmrg x86_64-*linux*) 1708b042e37fSmrg LD="${LD-ld} -m elf_i386" 1709b042e37fSmrg ;; 1710b042e37fSmrg ppc64-*linux*|powerpc64-*linux*) 1711b042e37fSmrg LD="${LD-ld} -m elf32ppclinux" 1712b042e37fSmrg ;; 1713b042e37fSmrg s390x-*linux*) 1714b042e37fSmrg LD="${LD-ld} -m elf_s390" 1715b042e37fSmrg ;; 1716b042e37fSmrg sparc64-*linux*) 1717b042e37fSmrg LD="${LD-ld} -m elf32_sparc" 1718b042e37fSmrg ;; 1719b042e37fSmrg esac 1720b042e37fSmrg ;; 1721b042e37fSmrg *64-bit*) 1722b042e37fSmrg case $host in 1723b042e37fSmrg x86_64-*linux*) 1724b042e37fSmrg LD="${LD-ld} -m elf_x86_64" 1725b042e37fSmrg ;; 1726b042e37fSmrg ppc*-*linux*|powerpc*-*linux*) 1727b042e37fSmrg LD="${LD-ld} -m elf64ppc" 1728b042e37fSmrg ;; 1729b042e37fSmrg s390*-*linux*) 1730b042e37fSmrg LD="${LD-ld} -m elf64_s390" 1731b042e37fSmrg ;; 1732b042e37fSmrg sparc*-*linux*) 1733b042e37fSmrg LD="${LD-ld} -m elf64_sparc" 1734b042e37fSmrg ;; 1735b042e37fSmrg esac 1736b042e37fSmrg ;; 1737b042e37fSmrg esac 1738b042e37fSmrg fi 1739b042e37fSmrg rm -rf conftest* 1740b042e37fSmrg ;; 1741b042e37fSmrg 1742b042e37fSmrg*-*-sco3.2v5*) 1743b042e37fSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1744b042e37fSmrg SAVE_CFLAGS="$CFLAGS" 1745b042e37fSmrg CFLAGS="$CFLAGS -belf" 1746b042e37fSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1747b042e37fSmrg [AC_LANG_PUSH(C) 1748b042e37fSmrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1749b042e37fSmrg AC_LANG_POP]) 1750b042e37fSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1751b042e37fSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1752b042e37fSmrg CFLAGS="$SAVE_CFLAGS" 1753b042e37fSmrg fi 1754b042e37fSmrg ;; 1755b042e37fSmrgsparc*-*solaris*) 1756b042e37fSmrg # Find out which ABI we are using. 1757b042e37fSmrg echo 'int i;' > conftest.$ac_ext 1758b042e37fSmrg if AC_TRY_EVAL(ac_compile); then 1759b042e37fSmrg case `/usr/bin/file conftest.o` in 1760b042e37fSmrg *64-bit*) 1761b042e37fSmrg case $lt_cv_prog_gnu_ld in 1762b042e37fSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 1763b042e37fSmrg *) LD="${LD-ld} -64" ;; 1764b042e37fSmrg esac 1765b042e37fSmrg ;; 1766b042e37fSmrg esac 1767b042e37fSmrg fi 1768b042e37fSmrg rm -rf conftest* 1769b042e37fSmrg ;; 1770b042e37fSmrg 1771b042e37fSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 1772b042e37fSmrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 1773b042e37fSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 1774b042e37fSmrg AC_CHECK_TOOL(AS, as, false) 1775b042e37fSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 1776b042e37fSmrg ;; 1777b042e37fSmrg ]) 1778b042e37fSmrgesac 1779b042e37fSmrg 1780b042e37fSmrgneed_locks="$enable_libtool_lock" 1781b042e37fSmrg 1782b042e37fSmrg])# _LT_AC_LOCK 1783b042e37fSmrg 1784b042e37fSmrg 1785b042e37fSmrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1786b042e37fSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1787b042e37fSmrg# ---------------------------------------------------------------- 1788b042e37fSmrg# Check whether the given compiler option works 1789b042e37fSmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 1790b042e37fSmrg[AC_REQUIRE([LT_AC_PROG_SED]) 1791b042e37fSmrgAC_CACHE_CHECK([$1], [$2], 1792b042e37fSmrg [$2=no 1793b042e37fSmrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1794b042e37fSmrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 1795b042e37fSmrg lt_compiler_flag="$3" 1796b042e37fSmrg # Insert the option either (1) after the last *FLAGS variable, or 1797b042e37fSmrg # (2) before a word containing "conftest.", or (3) at the end. 1798b042e37fSmrg # Note that $ac_compile itself does not contain backslashes and begins 1799b042e37fSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1800b042e37fSmrg # The option is referenced via a variable to avoid confusing sed. 1801b042e37fSmrg lt_compile=`echo "$ac_compile" | $SED \ 1802b042e37fSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1803b042e37fSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1804b042e37fSmrg -e 's:$: $lt_compiler_flag:'` 1805b042e37fSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1806b042e37fSmrg (eval "$lt_compile" 2>conftest.err) 1807b042e37fSmrg ac_status=$? 1808b042e37fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1809b042e37fSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1810b042e37fSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 1811b042e37fSmrg # The compiler can only warn and ignore the option if not recognized 1812b042e37fSmrg # So say no if there are warnings other than the usual output. 1813b042e37fSmrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 1814b042e37fSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1815b042e37fSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1816b042e37fSmrg $2=yes 1817b042e37fSmrg fi 1818b042e37fSmrg fi 1819b042e37fSmrg $rm conftest* 1820b042e37fSmrg]) 1821b042e37fSmrg 1822b042e37fSmrgif test x"[$]$2" = xyes; then 1823b042e37fSmrg ifelse([$5], , :, [$5]) 1824b042e37fSmrgelse 1825b042e37fSmrg ifelse([$6], , :, [$6]) 1826b042e37fSmrgfi 1827b042e37fSmrg])# AC_LIBTOOL_COMPILER_OPTION 1828b042e37fSmrg 1829b042e37fSmrg 1830b042e37fSmrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1831b042e37fSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1832b042e37fSmrg# ------------------------------------------------------------ 1833b042e37fSmrg# Check whether the given compiler option works 1834b042e37fSmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 1835b042e37fSmrg[AC_CACHE_CHECK([$1], [$2], 1836b042e37fSmrg [$2=no 1837b042e37fSmrg save_LDFLAGS="$LDFLAGS" 1838b042e37fSmrg LDFLAGS="$LDFLAGS $3" 1839b042e37fSmrg printf "$lt_simple_link_test_code" > conftest.$ac_ext 1840b042e37fSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1841b042e37fSmrg # The linker can only warn and ignore the option if not recognized 1842b042e37fSmrg # So say no if there are warnings 1843b042e37fSmrg if test -s conftest.err; then 1844b042e37fSmrg # Append any errors to the config.log. 1845b042e37fSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1846b042e37fSmrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 1847b042e37fSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1848b042e37fSmrg if diff conftest.exp conftest.er2 >/dev/null; then 1849b042e37fSmrg $2=yes 1850b042e37fSmrg fi 1851b042e37fSmrg else 1852b042e37fSmrg $2=yes 1853b042e37fSmrg fi 1854b042e37fSmrg fi 1855b042e37fSmrg $rm conftest* 1856b042e37fSmrg LDFLAGS="$save_LDFLAGS" 1857b042e37fSmrg]) 1858b042e37fSmrg 1859b042e37fSmrgif test x"[$]$2" = xyes; then 1860b042e37fSmrg ifelse([$4], , :, [$4]) 1861b042e37fSmrgelse 1862b042e37fSmrg ifelse([$5], , :, [$5]) 1863b042e37fSmrgfi 1864b042e37fSmrg])# AC_LIBTOOL_LINKER_OPTION 1865b042e37fSmrg 1866b042e37fSmrg 1867b042e37fSmrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 1868b042e37fSmrg# -------------------------- 1869b042e37fSmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 1870b042e37fSmrg[# find the maximum length of command line arguments 1871b042e37fSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1872b042e37fSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1873b042e37fSmrg i=0 1874b042e37fSmrg teststring="ABCD" 1875b042e37fSmrg 1876b042e37fSmrg case $build_os in 1877b042e37fSmrg msdosdjgpp*) 1878b042e37fSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1879b042e37fSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1880b042e37fSmrg # during glob expansion). Even if it were fixed, the result of this 1881b042e37fSmrg # check would be larger than it should be. 1882b042e37fSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1883b042e37fSmrg ;; 1884b042e37fSmrg 1885b042e37fSmrg gnu*) 1886b042e37fSmrg # Under GNU Hurd, this test is not required because there is 1887b042e37fSmrg # no limit to the length of command line arguments. 1888b042e37fSmrg # Libtool will interpret -1 as no limit whatsoever 1889b042e37fSmrg lt_cv_sys_max_cmd_len=-1; 1890b042e37fSmrg ;; 1891b042e37fSmrg 1892b042e37fSmrg cygwin* | mingw*) 1893b042e37fSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1894b042e37fSmrg # about 5 minutes as the teststring grows exponentially. 1895b042e37fSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 1896b042e37fSmrg # you end up with a "frozen" computer, even though with patience 1897b042e37fSmrg # the test eventually succeeds (with a max line length of 256k). 1898b042e37fSmrg # Instead, let's just punt: use the minimum linelength reported by 1899b042e37fSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 1900b042e37fSmrg lt_cv_sys_max_cmd_len=8192; 1901b042e37fSmrg ;; 1902b042e37fSmrg 1903b042e37fSmrg amigaos*) 1904b042e37fSmrg # On AmigaOS with pdksh, this test takes hours, literally. 1905b042e37fSmrg # So we just punt and use a minimum line length of 8192. 1906b042e37fSmrg lt_cv_sys_max_cmd_len=8192; 1907b042e37fSmrg ;; 1908b042e37fSmrg 1909b042e37fSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1910b042e37fSmrg # This has been around since 386BSD, at least. Likely further. 1911b042e37fSmrg if test -x /sbin/sysctl; then 1912b042e37fSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1913b042e37fSmrg elif test -x /usr/sbin/sysctl; then 1914b042e37fSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1915b042e37fSmrg else 1916b042e37fSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1917b042e37fSmrg fi 1918b042e37fSmrg # And add a safety zone 1919b042e37fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1920b042e37fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1921b042e37fSmrg ;; 1922b042e37fSmrg 1923b042e37fSmrg interix*) 1924b042e37fSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1925b042e37fSmrg lt_cv_sys_max_cmd_len=196608 1926b042e37fSmrg ;; 1927b042e37fSmrg 1928b042e37fSmrg osf*) 1929b042e37fSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1930b042e37fSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1931b042e37fSmrg # nice to cause kernel panics so lets avoid the loop below. 1932b042e37fSmrg # First set a reasonable default. 1933b042e37fSmrg lt_cv_sys_max_cmd_len=16384 1934b042e37fSmrg # 1935b042e37fSmrg if test -x /sbin/sysconfig; then 1936b042e37fSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1937b042e37fSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1938b042e37fSmrg esac 1939b042e37fSmrg fi 1940b042e37fSmrg ;; 1941b042e37fSmrg sco3.2v5*) 1942b042e37fSmrg lt_cv_sys_max_cmd_len=102400 1943b042e37fSmrg ;; 1944b042e37fSmrg sysv5* | sco5v6* | sysv4.2uw2*) 1945b042e37fSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1946b042e37fSmrg if test -n "$kargmax"; then 1947b042e37fSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1948b042e37fSmrg else 1949b042e37fSmrg lt_cv_sys_max_cmd_len=32768 1950b042e37fSmrg fi 1951b042e37fSmrg ;; 1952b042e37fSmrg *) 1953b042e37fSmrg # If test is not a shell built-in, we'll probably end up computing a 1954b042e37fSmrg # maximum length that is only half of the actual maximum length, but 1955b042e37fSmrg # we can't tell. 1956b042e37fSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1957b042e37fSmrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 1958b042e37fSmrg = "XX$teststring") >/dev/null 2>&1 && 1959b042e37fSmrg new_result=`expr "X$teststring" : ".*" 2>&1` && 1960b042e37fSmrg lt_cv_sys_max_cmd_len=$new_result && 1961b042e37fSmrg test $i != 17 # 1/2 MB should be enough 1962b042e37fSmrg do 1963b042e37fSmrg i=`expr $i + 1` 1964b042e37fSmrg teststring=$teststring$teststring 1965b042e37fSmrg done 1966b042e37fSmrg teststring= 1967b042e37fSmrg # Add a significant safety factor because C++ compilers can tack on massive 1968b042e37fSmrg # amounts of additional arguments before passing them to the linker. 1969b042e37fSmrg # It appears as though 1/2 is a usable value. 1970b042e37fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1971b042e37fSmrg ;; 1972b042e37fSmrg esac 1973b042e37fSmrg]) 1974b042e37fSmrgif test -n $lt_cv_sys_max_cmd_len ; then 1975b042e37fSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1976b042e37fSmrgelse 1977b042e37fSmrg AC_MSG_RESULT(none) 1978b042e37fSmrgfi 1979b042e37fSmrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 1980b042e37fSmrg 1981b042e37fSmrg 1982b042e37fSmrg# _LT_AC_CHECK_DLFCN 1983b042e37fSmrg# ------------------ 1984b042e37fSmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 1985b042e37fSmrg[AC_CHECK_HEADERS(dlfcn.h)dnl 1986b042e37fSmrg])# _LT_AC_CHECK_DLFCN 1987b042e37fSmrg 1988b042e37fSmrg 1989b042e37fSmrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1990b042e37fSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1991b042e37fSmrg# --------------------------------------------------------------------- 1992b042e37fSmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 1993b042e37fSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 1994b042e37fSmrgif test "$cross_compiling" = yes; then : 1995b042e37fSmrg [$4] 1996b042e37fSmrgelse 1997b042e37fSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1998b042e37fSmrg lt_status=$lt_dlunknown 1999b042e37fSmrg cat > conftest.$ac_ext <<EOF 2000b042e37fSmrg[#line __oline__ "configure" 2001b042e37fSmrg#include "confdefs.h" 2002b042e37fSmrg 2003b042e37fSmrg#if HAVE_DLFCN_H 2004b042e37fSmrg#include <dlfcn.h> 2005b042e37fSmrg#endif 2006b042e37fSmrg 2007b042e37fSmrg#include <stdio.h> 2008b042e37fSmrg 2009b042e37fSmrg#ifdef RTLD_GLOBAL 2010b042e37fSmrg# define LT_DLGLOBAL RTLD_GLOBAL 2011b042e37fSmrg#else 2012b042e37fSmrg# ifdef DL_GLOBAL 2013b042e37fSmrg# define LT_DLGLOBAL DL_GLOBAL 2014b042e37fSmrg# else 2015b042e37fSmrg# define LT_DLGLOBAL 0 2016b042e37fSmrg# endif 2017b042e37fSmrg#endif 2018b042e37fSmrg 2019b042e37fSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 2020b042e37fSmrg find out it does not work in some platform. */ 2021b042e37fSmrg#ifndef LT_DLLAZY_OR_NOW 2022b042e37fSmrg# ifdef RTLD_LAZY 2023b042e37fSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 2024b042e37fSmrg# else 2025b042e37fSmrg# ifdef DL_LAZY 2026b042e37fSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 2027b042e37fSmrg# else 2028b042e37fSmrg# ifdef RTLD_NOW 2029b042e37fSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 2030b042e37fSmrg# else 2031b042e37fSmrg# ifdef DL_NOW 2032b042e37fSmrg# define LT_DLLAZY_OR_NOW DL_NOW 2033b042e37fSmrg# else 2034b042e37fSmrg# define LT_DLLAZY_OR_NOW 0 2035b042e37fSmrg# endif 2036b042e37fSmrg# endif 2037b042e37fSmrg# endif 2038b042e37fSmrg# endif 2039b042e37fSmrg#endif 2040b042e37fSmrg 2041b042e37fSmrg#ifdef __cplusplus 2042b042e37fSmrgextern "C" void exit (int); 2043b042e37fSmrg#endif 2044b042e37fSmrg 2045b042e37fSmrgvoid fnord() { int i=42;} 2046b042e37fSmrgint main () 2047b042e37fSmrg{ 2048b042e37fSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 2049b042e37fSmrg int status = $lt_dlunknown; 2050b042e37fSmrg 2051b042e37fSmrg if (self) 2052b042e37fSmrg { 2053b042e37fSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 2054b042e37fSmrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 2055b042e37fSmrg /* dlclose (self); */ 2056b042e37fSmrg } 2057b042e37fSmrg else 2058b042e37fSmrg puts (dlerror ()); 2059b042e37fSmrg 2060b042e37fSmrg exit (status); 2061b042e37fSmrg}] 2062b042e37fSmrgEOF 2063b042e37fSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 2064b042e37fSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 2065b042e37fSmrg lt_status=$? 2066b042e37fSmrg case x$lt_status in 2067b042e37fSmrg x$lt_dlno_uscore) $1 ;; 2068b042e37fSmrg x$lt_dlneed_uscore) $2 ;; 2069b042e37fSmrg x$lt_dlunknown|x*) $3 ;; 2070b042e37fSmrg esac 2071b042e37fSmrg else : 2072b042e37fSmrg # compilation failed 2073b042e37fSmrg $3 2074b042e37fSmrg fi 2075b042e37fSmrgfi 2076b042e37fSmrgrm -fr conftest* 2077b042e37fSmrg])# _LT_AC_TRY_DLOPEN_SELF 2078b042e37fSmrg 2079b042e37fSmrg 2080b042e37fSmrg# AC_LIBTOOL_DLOPEN_SELF 2081b042e37fSmrg# ---------------------- 2082b042e37fSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 2083b042e37fSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 2084b042e37fSmrgif test "x$enable_dlopen" != xyes; then 2085b042e37fSmrg enable_dlopen=unknown 2086b042e37fSmrg enable_dlopen_self=unknown 2087b042e37fSmrg enable_dlopen_self_static=unknown 2088b042e37fSmrgelse 2089b042e37fSmrg lt_cv_dlopen=no 2090b042e37fSmrg lt_cv_dlopen_libs= 2091b042e37fSmrg 2092b042e37fSmrg case $host_os in 2093b042e37fSmrg beos*) 2094b042e37fSmrg lt_cv_dlopen="load_add_on" 2095b042e37fSmrg lt_cv_dlopen_libs= 2096b042e37fSmrg lt_cv_dlopen_self=yes 2097b042e37fSmrg ;; 2098b042e37fSmrg 2099b042e37fSmrg mingw* | pw32*) 2100b042e37fSmrg lt_cv_dlopen="LoadLibrary" 2101b042e37fSmrg lt_cv_dlopen_libs= 2102b042e37fSmrg ;; 2103b042e37fSmrg 2104b042e37fSmrg cygwin*) 2105b042e37fSmrg lt_cv_dlopen="dlopen" 2106b042e37fSmrg lt_cv_dlopen_libs= 2107b042e37fSmrg ;; 2108b042e37fSmrg 2109b042e37fSmrg darwin*) 2110b042e37fSmrg # if libdl is installed we need to link against it 2111b042e37fSmrg AC_CHECK_LIB([dl], [dlopen], 2112b042e37fSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 2113b042e37fSmrg lt_cv_dlopen="dyld" 2114b042e37fSmrg lt_cv_dlopen_libs= 2115b042e37fSmrg lt_cv_dlopen_self=yes 2116b042e37fSmrg ]) 2117b042e37fSmrg ;; 2118b042e37fSmrg 2119b042e37fSmrg *) 2120b042e37fSmrg AC_CHECK_FUNC([shl_load], 2121b042e37fSmrg [lt_cv_dlopen="shl_load"], 2122b042e37fSmrg [AC_CHECK_LIB([dld], [shl_load], 2123b042e37fSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 2124b042e37fSmrg [AC_CHECK_FUNC([dlopen], 2125b042e37fSmrg [lt_cv_dlopen="dlopen"], 2126b042e37fSmrg [AC_CHECK_LIB([dl], [dlopen], 2127b042e37fSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 2128b042e37fSmrg [AC_CHECK_LIB([svld], [dlopen], 2129b042e37fSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 2130b042e37fSmrg [AC_CHECK_LIB([dld], [dld_link], 2131b042e37fSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 2132b042e37fSmrg ]) 2133b042e37fSmrg ]) 2134b042e37fSmrg ]) 2135b042e37fSmrg ]) 2136b042e37fSmrg ]) 2137b042e37fSmrg ;; 2138b042e37fSmrg esac 2139b042e37fSmrg 2140b042e37fSmrg if test "x$lt_cv_dlopen" != xno; then 2141b042e37fSmrg enable_dlopen=yes 2142b042e37fSmrg else 2143b042e37fSmrg enable_dlopen=no 2144b042e37fSmrg fi 2145b042e37fSmrg 2146b042e37fSmrg case $lt_cv_dlopen in 2147b042e37fSmrg dlopen) 2148b042e37fSmrg save_CPPFLAGS="$CPPFLAGS" 2149b042e37fSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2150b042e37fSmrg 2151b042e37fSmrg save_LDFLAGS="$LDFLAGS" 2152b042e37fSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2153b042e37fSmrg 2154b042e37fSmrg save_LIBS="$LIBS" 2155b042e37fSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 2156b042e37fSmrg 2157b042e37fSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 2158b042e37fSmrg lt_cv_dlopen_self, [dnl 2159b042e37fSmrg _LT_AC_TRY_DLOPEN_SELF( 2160b042e37fSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2161b042e37fSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2162b042e37fSmrg ]) 2163b042e37fSmrg 2164b042e37fSmrg if test "x$lt_cv_dlopen_self" = xyes; then 2165b042e37fSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2166b042e37fSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2167b042e37fSmrg lt_cv_dlopen_self_static, [dnl 2168b042e37fSmrg _LT_AC_TRY_DLOPEN_SELF( 2169b042e37fSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2170b042e37fSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2171b042e37fSmrg ]) 2172b042e37fSmrg fi 2173b042e37fSmrg 2174b042e37fSmrg CPPFLAGS="$save_CPPFLAGS" 2175b042e37fSmrg LDFLAGS="$save_LDFLAGS" 2176b042e37fSmrg LIBS="$save_LIBS" 2177b042e37fSmrg ;; 2178b042e37fSmrg esac 2179b042e37fSmrg 2180b042e37fSmrg case $lt_cv_dlopen_self in 2181b042e37fSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2182b042e37fSmrg *) enable_dlopen_self=unknown ;; 2183b042e37fSmrg esac 2184b042e37fSmrg 2185b042e37fSmrg case $lt_cv_dlopen_self_static in 2186b042e37fSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2187b042e37fSmrg *) enable_dlopen_self_static=unknown ;; 2188b042e37fSmrg esac 2189b042e37fSmrgfi 2190b042e37fSmrg])# AC_LIBTOOL_DLOPEN_SELF 2191b042e37fSmrg 2192b042e37fSmrg 2193b042e37fSmrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 2194b042e37fSmrg# --------------------------------- 2195b042e37fSmrg# Check to see if options -c and -o are simultaneously supported by compiler 2196b042e37fSmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 2197b042e37fSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 2198b042e37fSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2199b042e37fSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2200b042e37fSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2201b042e37fSmrg $rm -r conftest 2>/dev/null 2202b042e37fSmrg mkdir conftest 2203b042e37fSmrg cd conftest 2204b042e37fSmrg mkdir out 2205b042e37fSmrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 2206b042e37fSmrg 2207b042e37fSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 2208b042e37fSmrg # Insert the option either (1) after the last *FLAGS variable, or 2209b042e37fSmrg # (2) before a word containing "conftest.", or (3) at the end. 2210b042e37fSmrg # Note that $ac_compile itself does not contain backslashes and begins 2211b042e37fSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2212b042e37fSmrg lt_compile=`echo "$ac_compile" | $SED \ 2213b042e37fSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2214b042e37fSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2215b042e37fSmrg -e 's:$: $lt_compiler_flag:'` 2216b042e37fSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2217b042e37fSmrg (eval "$lt_compile" 2>out/conftest.err) 2218b042e37fSmrg ac_status=$? 2219b042e37fSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2220b042e37fSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2221b042e37fSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2222b042e37fSmrg then 2223b042e37fSmrg # The compiler can only warn and ignore the option if not recognized 2224b042e37fSmrg # So say no if there are warnings 2225b042e37fSmrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 2226b042e37fSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2227b042e37fSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2228b042e37fSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2229b042e37fSmrg fi 2230b042e37fSmrg fi 2231b042e37fSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2232b042e37fSmrg $rm conftest* 2233b042e37fSmrg # SGI C++ compiler will create directory out/ii_files/ for 2234b042e37fSmrg # template instantiation 2235b042e37fSmrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 2236b042e37fSmrg $rm out/* && rmdir out 2237b042e37fSmrg cd .. 2238b042e37fSmrg rmdir conftest 2239b042e37fSmrg $rm conftest* 2240b042e37fSmrg]) 2241b042e37fSmrg])# AC_LIBTOOL_PROG_CC_C_O 2242b042e37fSmrg 2243b042e37fSmrg 2244b042e37fSmrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 2245b042e37fSmrg# ----------------------------------------- 2246b042e37fSmrg# Check to see if we can do hard links to lock some files if needed 2247b042e37fSmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 2248b042e37fSmrg[AC_REQUIRE([_LT_AC_LOCK])dnl 2249b042e37fSmrg 2250b042e37fSmrghard_links="nottested" 2251b042e37fSmrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 2252b042e37fSmrg # do not overwrite the value of need_locks provided by the user 2253b042e37fSmrg AC_MSG_CHECKING([if we can lock with hard links]) 2254b042e37fSmrg hard_links=yes 2255b042e37fSmrg $rm conftest* 2256b042e37fSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2257b042e37fSmrg touch conftest.a 2258b042e37fSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 2259b042e37fSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2260b042e37fSmrg AC_MSG_RESULT([$hard_links]) 2261b042e37fSmrg if test "$hard_links" = no; then 2262b042e37fSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 2263b042e37fSmrg need_locks=warn 2264b042e37fSmrg fi 2265b042e37fSmrgelse 2266b042e37fSmrg need_locks=no 2267b042e37fSmrgfi 2268b042e37fSmrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 2269b042e37fSmrg 2270b042e37fSmrg 2271b042e37fSmrg# AC_LIBTOOL_OBJDIR 2272b042e37fSmrg# ----------------- 2273b042e37fSmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 2274b042e37fSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2275b042e37fSmrg[rm -f .libs 2>/dev/null 2276b042e37fSmrgmkdir .libs 2>/dev/null 2277b042e37fSmrgif test -d .libs; then 2278b042e37fSmrg lt_cv_objdir=.libs 2279b042e37fSmrgelse 2280b042e37fSmrg # MS-DOS does not allow filenames that begin with a dot. 2281b042e37fSmrg lt_cv_objdir=_libs 2282b042e37fSmrgfi 2283b042e37fSmrgrmdir .libs 2>/dev/null]) 2284b042e37fSmrgobjdir=$lt_cv_objdir 2285b042e37fSmrg])# AC_LIBTOOL_OBJDIR 2286b042e37fSmrg 2287b042e37fSmrg 2288b042e37fSmrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 2289b042e37fSmrg# ---------------------------------------------- 2290b042e37fSmrg# Check hardcoding attributes. 2291b042e37fSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 2292b042e37fSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2293b042e37fSmrg_LT_AC_TAGVAR(hardcode_action, $1)= 2294b042e37fSmrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 2295b042e37fSmrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 2296b042e37fSmrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2297b042e37fSmrg 2298b042e37fSmrg # We can hardcode non-existant directories. 2299b042e37fSmrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 2300b042e37fSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2301b042e37fSmrg # have to relink, otherwise we might link with an installed library 2302b042e37fSmrg # when we should be linking with a yet-to-be-installed one 2303b042e37fSmrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2304b042e37fSmrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 2305b042e37fSmrg # Linking always hardcodes the temporary library directory. 2306b042e37fSmrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 2307b042e37fSmrg else 2308b042e37fSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2309b042e37fSmrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 2310b042e37fSmrg fi 2311b042e37fSmrgelse 2312b042e37fSmrg # We cannot hardcode anything, or else we can only hardcode existing 2313b042e37fSmrg # directories. 2314b042e37fSmrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 2315b042e37fSmrgfi 2316b042e37fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 2317b042e37fSmrg 2318b042e37fSmrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 2319b042e37fSmrg # Fast installation is not supported 2320b042e37fSmrg enable_fast_install=no 2321b042e37fSmrgelif test "$shlibpath_overrides_runpath" = yes || 2322b042e37fSmrg test "$enable_shared" = no; then 2323b042e37fSmrg # Fast installation is not necessary 2324b042e37fSmrg enable_fast_install=needless 2325b042e37fSmrgfi 2326b042e37fSmrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 2327b042e37fSmrg 2328b042e37fSmrg 2329b042e37fSmrg# AC_LIBTOOL_SYS_LIB_STRIP 2330b042e37fSmrg# ------------------------ 2331b042e37fSmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 2332b042e37fSmrg[striplib= 2333b042e37fSmrgold_striplib= 2334b042e37fSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2335b042e37fSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 2336b042e37fSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2337b042e37fSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2338b042e37fSmrg AC_MSG_RESULT([yes]) 2339b042e37fSmrgelse 2340b042e37fSmrg# FIXME - insert some real tests, host_os isn't really good enough 2341b042e37fSmrg case $host_os in 2342b042e37fSmrg darwin*) 2343b042e37fSmrg if test -n "$STRIP" ; then 2344b042e37fSmrg striplib="$STRIP -x" 2345b042e37fSmrg AC_MSG_RESULT([yes]) 2346b042e37fSmrg else 2347b042e37fSmrg AC_MSG_RESULT([no]) 2348b042e37fSmrgfi 2349b042e37fSmrg ;; 2350b042e37fSmrg *) 2351b042e37fSmrg AC_MSG_RESULT([no]) 2352b042e37fSmrg ;; 2353b042e37fSmrg esac 2354b042e37fSmrgfi 2355b042e37fSmrg])# AC_LIBTOOL_SYS_LIB_STRIP 2356b042e37fSmrg 2357b042e37fSmrg 2358b042e37fSmrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 2359b042e37fSmrg# ----------------------------- 2360b042e37fSmrg# PORTME Fill in your ld.so characteristics 2361b042e37fSmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 2362b042e37fSmrg[AC_MSG_CHECKING([dynamic linker characteristics]) 2363b042e37fSmrglibrary_names_spec= 2364b042e37fSmrglibname_spec='lib$name' 2365b042e37fSmrgsoname_spec= 2366b042e37fSmrgshrext_cmds=".so" 2367b042e37fSmrgpostinstall_cmds= 2368b042e37fSmrgpostuninstall_cmds= 2369b042e37fSmrgfinish_cmds= 2370b042e37fSmrgfinish_eval= 2371b042e37fSmrgshlibpath_var= 2372b042e37fSmrgshlibpath_overrides_runpath=unknown 2373b042e37fSmrgversion_type=none 2374b042e37fSmrgdynamic_linker="$host_os ld.so" 2375b042e37fSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2376b042e37fSmrgif test "$GCC" = yes; then 2377b042e37fSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2378b042e37fSmrg if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 2379b042e37fSmrg # if the path contains ";" then we assume it to be the separator 2380b042e37fSmrg # otherwise default to the standard path separator (i.e. ":") - it is 2381b042e37fSmrg # assumed that no part of a normal pathname contains ";" but that should 2382b042e37fSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2383b042e37fSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2384b042e37fSmrg else 2385b042e37fSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2386b042e37fSmrg fi 2387b042e37fSmrgelse 2388b042e37fSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2389b042e37fSmrgfi 2390b042e37fSmrgneed_lib_prefix=unknown 2391b042e37fSmrghardcode_into_libs=no 2392b042e37fSmrg 2393b042e37fSmrg# when you set need_version to no, make sure it does not cause -set_version 2394b042e37fSmrg# flags to be left without arguments 2395b042e37fSmrgneed_version=unknown 2396b042e37fSmrg 2397b042e37fSmrgcase $host_os in 2398b042e37fSmrgaix3*) 2399b042e37fSmrg version_type=linux 2400b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2401b042e37fSmrg shlibpath_var=LIBPATH 2402b042e37fSmrg 2403b042e37fSmrg # AIX 3 has no versioning support, so we append a major version to the name. 2404b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2405b042e37fSmrg ;; 2406b042e37fSmrg 2407b042e37fSmrgaix4* | aix5*) 2408b042e37fSmrg version_type=linux 2409b042e37fSmrg need_lib_prefix=no 2410b042e37fSmrg need_version=no 2411b042e37fSmrg hardcode_into_libs=yes 2412b042e37fSmrg if test "$host_cpu" = ia64; then 2413b042e37fSmrg # AIX 5 supports IA64 2414b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2415b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2416b042e37fSmrg else 2417b042e37fSmrg # With GCC up to 2.95.x, collect2 would create an import file 2418b042e37fSmrg # for dependence libraries. The import file would start with 2419b042e37fSmrg # the line `#! .'. This would cause the generated library to 2420b042e37fSmrg # depend on `.', always an invalid library. This was fixed in 2421b042e37fSmrg # development snapshots of GCC prior to 3.0. 2422b042e37fSmrg case $host_os in 2423b042e37fSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2424b042e37fSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2425b042e37fSmrg echo ' yes ' 2426b042e37fSmrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 2427b042e37fSmrg : 2428b042e37fSmrg else 2429b042e37fSmrg can_build_shared=no 2430b042e37fSmrg fi 2431b042e37fSmrg ;; 2432b042e37fSmrg esac 2433b042e37fSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2434b042e37fSmrg # soname into executable. Probably we can add versioning support to 2435b042e37fSmrg # collect2, so additional links can be useful in future. 2436b042e37fSmrg if test "$aix_use_runtimelinking" = yes; then 2437b042e37fSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2438b042e37fSmrg # instead of lib<name>.a to let people know that these are not 2439b042e37fSmrg # typical AIX shared libraries. 2440b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2441b042e37fSmrg else 2442b042e37fSmrg # We preserve .a as extension for shared libraries through AIX4.2 2443b042e37fSmrg # and later when we are not doing run time linking. 2444b042e37fSmrg library_names_spec='${libname}${release}.a $libname.a' 2445b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2446b042e37fSmrg fi 2447b042e37fSmrg shlibpath_var=LIBPATH 2448b042e37fSmrg fi 2449b042e37fSmrg ;; 2450b042e37fSmrg 2451b042e37fSmrgamigaos*) 2452b042e37fSmrg library_names_spec='$libname.ixlibrary $libname.a' 2453b042e37fSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2454b042e37fSmrg 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' 2455b042e37fSmrg ;; 2456b042e37fSmrg 2457b042e37fSmrgbeos*) 2458b042e37fSmrg library_names_spec='${libname}${shared_ext}' 2459b042e37fSmrg dynamic_linker="$host_os ld.so" 2460b042e37fSmrg shlibpath_var=LIBRARY_PATH 2461b042e37fSmrg ;; 2462b042e37fSmrg 2463b042e37fSmrgbsdi[[45]]*) 2464b042e37fSmrg version_type=linux 2465b042e37fSmrg need_version=no 2466b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2467b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2468b042e37fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2469b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2470b042e37fSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2471b042e37fSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2472b042e37fSmrg # the default ld.so.conf also contains /usr/contrib/lib and 2473b042e37fSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2474b042e37fSmrg # libtool to hard-code these into programs 2475b042e37fSmrg ;; 2476b042e37fSmrg 2477b042e37fSmrgcygwin* | mingw* | pw32*) 2478b042e37fSmrg version_type=windows 2479b042e37fSmrg shrext_cmds=".dll" 2480b042e37fSmrg need_version=no 2481b042e37fSmrg need_lib_prefix=no 2482b042e37fSmrg 2483b042e37fSmrg case $GCC,$host_os in 2484b042e37fSmrg yes,cygwin* | yes,mingw* | yes,pw32*) 2485b042e37fSmrg library_names_spec='$libname.dll.a' 2486b042e37fSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2487b042e37fSmrg postinstall_cmds='base_file=`basename \${file}`~ 2488b042e37fSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 2489b042e37fSmrg dldir=$destdir/`dirname \$dlpath`~ 2490b042e37fSmrg test -d \$dldir || mkdir -p \$dldir~ 2491b042e37fSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2492b042e37fSmrg chmod a+x \$dldir/$dlname' 2493b042e37fSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2494b042e37fSmrg dlpath=$dir/\$dldll~ 2495b042e37fSmrg $rm \$dlpath' 2496b042e37fSmrg shlibpath_overrides_runpath=yes 2497b042e37fSmrg 2498b042e37fSmrg case $host_os in 2499b042e37fSmrg cygwin*) 2500b042e37fSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2501b042e37fSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2502b042e37fSmrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 2503b042e37fSmrg ;; 2504b042e37fSmrg mingw*) 2505b042e37fSmrg # MinGW DLLs use traditional 'lib' prefix 2506b042e37fSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2507b042e37fSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2508b042e37fSmrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 2509b042e37fSmrg # It is most probably a Windows format PATH printed by 2510b042e37fSmrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 2511b042e37fSmrg # path with ; separators, and with drive letters. We can handle the 2512b042e37fSmrg # drive letters (cygwin fileutils understands them), so leave them, 2513b042e37fSmrg # especially as we might pass files found there to a mingw objdump, 2514b042e37fSmrg # which wouldn't understand a cygwinified path. Ahh. 2515b042e37fSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2516b042e37fSmrg else 2517b042e37fSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2518b042e37fSmrg fi 2519b042e37fSmrg ;; 2520b042e37fSmrg pw32*) 2521b042e37fSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2522b042e37fSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2523b042e37fSmrg ;; 2524b042e37fSmrg esac 2525b042e37fSmrg ;; 2526b042e37fSmrg 2527b042e37fSmrg *) 2528b042e37fSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2529b042e37fSmrg ;; 2530b042e37fSmrg esac 2531b042e37fSmrg dynamic_linker='Win32 ld.exe' 2532b042e37fSmrg # FIXME: first we should search . and the directory the executable is in 2533b042e37fSmrg shlibpath_var=PATH 2534b042e37fSmrg ;; 2535b042e37fSmrg 2536b042e37fSmrgdarwin* | rhapsody*) 2537b042e37fSmrg dynamic_linker="$host_os dyld" 2538b042e37fSmrg version_type=darwin 2539b042e37fSmrg need_lib_prefix=no 2540b042e37fSmrg need_version=no 2541b042e37fSmrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2542b042e37fSmrg soname_spec='${libname}${release}${major}$shared_ext' 2543b042e37fSmrg shlibpath_overrides_runpath=yes 2544b042e37fSmrg shlibpath_var=DYLD_LIBRARY_PATH 2545b042e37fSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2546b042e37fSmrg # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 2547b042e37fSmrg if test "$GCC" = yes; then 2548b042e37fSmrg 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"` 2549b042e37fSmrg else 2550b042e37fSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 2551b042e37fSmrg fi 2552b042e37fSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2553b042e37fSmrg ;; 2554b042e37fSmrg 2555b042e37fSmrgdgux*) 2556b042e37fSmrg version_type=linux 2557b042e37fSmrg need_lib_prefix=no 2558b042e37fSmrg need_version=no 2559b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2560b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2561b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2562b042e37fSmrg ;; 2563b042e37fSmrg 2564b042e37fSmrgfreebsd1*) 2565b042e37fSmrg dynamic_linker=no 2566b042e37fSmrg ;; 2567b042e37fSmrg 2568b042e37fSmrgkfreebsd*-gnu) 2569b042e37fSmrg version_type=linux 2570b042e37fSmrg need_lib_prefix=no 2571b042e37fSmrg need_version=no 2572b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2573b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2574b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2575b042e37fSmrg shlibpath_overrides_runpath=no 2576b042e37fSmrg hardcode_into_libs=yes 2577b042e37fSmrg dynamic_linker='GNU ld.so' 2578b042e37fSmrg ;; 2579b042e37fSmrg 2580b042e37fSmrgfreebsd* | dragonfly*) 2581b042e37fSmrg # DragonFly does not have aout. When/if they implement a new 2582b042e37fSmrg # versioning mechanism, adjust this. 2583b042e37fSmrg if test -x /usr/bin/objformat; then 2584b042e37fSmrg objformat=`/usr/bin/objformat` 2585b042e37fSmrg else 2586b042e37fSmrg case $host_os in 2587b042e37fSmrg freebsd[[123]]*) objformat=aout ;; 2588b042e37fSmrg *) objformat=elf ;; 2589b042e37fSmrg esac 2590b042e37fSmrg fi 2591b042e37fSmrg version_type=freebsd-$objformat 2592b042e37fSmrg case $version_type in 2593b042e37fSmrg freebsd-elf*) 2594b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2595b042e37fSmrg need_version=no 2596b042e37fSmrg need_lib_prefix=no 2597b042e37fSmrg ;; 2598b042e37fSmrg freebsd-*) 2599b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2600b042e37fSmrg need_version=yes 2601b042e37fSmrg ;; 2602b042e37fSmrg esac 2603b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2604b042e37fSmrg case $host_os in 2605b042e37fSmrg freebsd2*) 2606b042e37fSmrg shlibpath_overrides_runpath=yes 2607b042e37fSmrg ;; 2608b042e37fSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2609b042e37fSmrg shlibpath_overrides_runpath=yes 2610b042e37fSmrg hardcode_into_libs=yes 2611b042e37fSmrg ;; 2612b042e37fSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2613b042e37fSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2614b042e37fSmrg shlibpath_overrides_runpath=no 2615b042e37fSmrg hardcode_into_libs=yes 2616b042e37fSmrg ;; 2617b042e37fSmrg freebsd*) # from 4.6 on 2618b042e37fSmrg shlibpath_overrides_runpath=yes 2619b042e37fSmrg hardcode_into_libs=yes 2620b042e37fSmrg ;; 2621b042e37fSmrg esac 2622b042e37fSmrg ;; 2623b042e37fSmrg 2624b042e37fSmrggnu*) 2625b042e37fSmrg version_type=linux 2626b042e37fSmrg need_lib_prefix=no 2627b042e37fSmrg need_version=no 2628b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2629b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2630b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2631b042e37fSmrg hardcode_into_libs=yes 2632b042e37fSmrg ;; 2633b042e37fSmrg 2634b042e37fSmrghpux9* | hpux10* | hpux11*) 2635b042e37fSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 2636b042e37fSmrg # link against other versions. 2637b042e37fSmrg version_type=sunos 2638b042e37fSmrg need_lib_prefix=no 2639b042e37fSmrg need_version=no 2640b042e37fSmrg case $host_cpu in 2641b042e37fSmrg ia64*) 2642b042e37fSmrg shrext_cmds='.so' 2643b042e37fSmrg hardcode_into_libs=yes 2644b042e37fSmrg dynamic_linker="$host_os dld.so" 2645b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2646b042e37fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2647b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2648b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2649b042e37fSmrg if test "X$HPUX_IA64_MODE" = X32; then 2650b042e37fSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2651b042e37fSmrg else 2652b042e37fSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2653b042e37fSmrg fi 2654b042e37fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2655b042e37fSmrg ;; 2656b042e37fSmrg hppa*64*) 2657b042e37fSmrg shrext_cmds='.sl' 2658b042e37fSmrg hardcode_into_libs=yes 2659b042e37fSmrg dynamic_linker="$host_os dld.sl" 2660b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2661b042e37fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2662b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2663b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2664b042e37fSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2665b042e37fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2666b042e37fSmrg ;; 2667b042e37fSmrg *) 2668b042e37fSmrg shrext_cmds='.sl' 2669b042e37fSmrg dynamic_linker="$host_os dld.sl" 2670b042e37fSmrg shlibpath_var=SHLIB_PATH 2671b042e37fSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2672b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2673b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2674b042e37fSmrg ;; 2675b042e37fSmrg esac 2676b042e37fSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 2677b042e37fSmrg postinstall_cmds='chmod 555 $lib' 2678b042e37fSmrg ;; 2679b042e37fSmrg 2680b042e37fSmrginterix3*) 2681b042e37fSmrg version_type=linux 2682b042e37fSmrg need_lib_prefix=no 2683b042e37fSmrg need_version=no 2684b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2685b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2686b042e37fSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2687b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2688b042e37fSmrg shlibpath_overrides_runpath=no 2689b042e37fSmrg hardcode_into_libs=yes 2690b042e37fSmrg ;; 2691b042e37fSmrg 2692b042e37fSmrgirix5* | irix6* | nonstopux*) 2693b042e37fSmrg case $host_os in 2694b042e37fSmrg nonstopux*) version_type=nonstopux ;; 2695b042e37fSmrg *) 2696b042e37fSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 2697b042e37fSmrg version_type=linux 2698b042e37fSmrg else 2699b042e37fSmrg version_type=irix 2700b042e37fSmrg fi ;; 2701b042e37fSmrg esac 2702b042e37fSmrg need_lib_prefix=no 2703b042e37fSmrg need_version=no 2704b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2705b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2706b042e37fSmrg case $host_os in 2707b042e37fSmrg irix5* | nonstopux*) 2708b042e37fSmrg libsuff= shlibsuff= 2709b042e37fSmrg ;; 2710b042e37fSmrg *) 2711b042e37fSmrg case $LD in # libtool.m4 will add one of these switches to LD 2712b042e37fSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2713b042e37fSmrg libsuff= shlibsuff= libmagic=32-bit;; 2714b042e37fSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2715b042e37fSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2716b042e37fSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2717b042e37fSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2718b042e37fSmrg *) libsuff= shlibsuff= libmagic=never-match;; 2719b042e37fSmrg esac 2720b042e37fSmrg ;; 2721b042e37fSmrg esac 2722b042e37fSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2723b042e37fSmrg shlibpath_overrides_runpath=no 2724b042e37fSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2725b042e37fSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2726b042e37fSmrg hardcode_into_libs=yes 2727b042e37fSmrg ;; 2728b042e37fSmrg 2729b042e37fSmrg# No shared lib support for Linux oldld, aout, or coff. 2730b042e37fSmrglinux*oldld* | linux*aout* | linux*coff*) 2731b042e37fSmrg dynamic_linker=no 2732b042e37fSmrg ;; 2733b042e37fSmrg 2734b042e37fSmrg# This must be Linux ELF. 2735b042e37fSmrglinux*) 2736b042e37fSmrg version_type=linux 2737b042e37fSmrg need_lib_prefix=no 2738b042e37fSmrg need_version=no 2739b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2740b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2741b042e37fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2742b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2743b042e37fSmrg shlibpath_overrides_runpath=no 2744b042e37fSmrg # This implies no fast_install, which is unacceptable. 2745b042e37fSmrg # Some rework will be needed to allow for fast_install 2746b042e37fSmrg # before this can be enabled. 2747b042e37fSmrg hardcode_into_libs=yes 2748b042e37fSmrg 2749b042e37fSmrg # Append ld.so.conf contents to the search path 2750b042e37fSmrg if test -f /etc/ld.so.conf; then 2751b042e37fSmrg 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' ' '` 2752b042e37fSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2753b042e37fSmrg fi 2754b042e37fSmrg 2755b042e37fSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2756b042e37fSmrg # powerpc, because MkLinux only supported shared libraries with the 2757b042e37fSmrg # GNU dynamic linker. Since this was broken with cross compilers, 2758b042e37fSmrg # most powerpc-linux boxes support dynamic linking these days and 2759b042e37fSmrg # people can always --disable-shared, the test was removed, and we 2760b042e37fSmrg # assume the GNU/Linux dynamic linker is in use. 2761b042e37fSmrg dynamic_linker='GNU/Linux ld.so' 2762b042e37fSmrg ;; 2763b042e37fSmrg 2764b042e37fSmrgknetbsd*-gnu) 2765b042e37fSmrg version_type=linux 2766b042e37fSmrg need_lib_prefix=no 2767b042e37fSmrg need_version=no 2768b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2769b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2770b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2771b042e37fSmrg shlibpath_overrides_runpath=no 2772b042e37fSmrg hardcode_into_libs=yes 2773b042e37fSmrg dynamic_linker='GNU ld.so' 2774b042e37fSmrg ;; 2775b042e37fSmrg 2776b042e37fSmrgnetbsd*) 2777b042e37fSmrg version_type=sunos 2778b042e37fSmrg need_lib_prefix=no 2779b042e37fSmrg need_version=no 2780b042e37fSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 2781b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2782b042e37fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2783b042e37fSmrg dynamic_linker='NetBSD (a.out) ld.so' 2784b042e37fSmrg else 2785b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2786b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2787b042e37fSmrg dynamic_linker='NetBSD ld.elf_so' 2788b042e37fSmrg fi 2789b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2790b042e37fSmrg shlibpath_overrides_runpath=yes 2791b042e37fSmrg hardcode_into_libs=yes 2792b042e37fSmrg ;; 2793b042e37fSmrg 2794b042e37fSmrgnewsos6) 2795b042e37fSmrg version_type=linux 2796b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2797b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2798b042e37fSmrg shlibpath_overrides_runpath=yes 2799b042e37fSmrg ;; 2800b042e37fSmrg 2801b042e37fSmrgnto-qnx*) 2802b042e37fSmrg version_type=linux 2803b042e37fSmrg need_lib_prefix=no 2804b042e37fSmrg need_version=no 2805b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2806b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2807b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2808b042e37fSmrg shlibpath_overrides_runpath=yes 2809b042e37fSmrg ;; 2810b042e37fSmrg 2811b042e37fSmrgopenbsd*) 2812b042e37fSmrg version_type=sunos 2813b042e37fSmrg sys_lib_dlsearch_path_spec="/usr/lib" 2814b042e37fSmrg need_lib_prefix=no 2815b042e37fSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2816b042e37fSmrg case $host_os in 2817b042e37fSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2818b042e37fSmrg *) need_version=no ;; 2819b042e37fSmrg esac 2820b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2821b042e37fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2822b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2823b042e37fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2824b042e37fSmrg case $host_os in 2825b042e37fSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 2826b042e37fSmrg shlibpath_overrides_runpath=no 2827b042e37fSmrg ;; 2828b042e37fSmrg *) 2829b042e37fSmrg shlibpath_overrides_runpath=yes 2830b042e37fSmrg ;; 2831b042e37fSmrg esac 2832b042e37fSmrg else 2833b042e37fSmrg shlibpath_overrides_runpath=yes 2834b042e37fSmrg fi 2835b042e37fSmrg ;; 2836b042e37fSmrg 2837b042e37fSmrgos2*) 2838b042e37fSmrg libname_spec='$name' 2839b042e37fSmrg shrext_cmds=".dll" 2840b042e37fSmrg need_lib_prefix=no 2841b042e37fSmrg library_names_spec='$libname${shared_ext} $libname.a' 2842b042e37fSmrg dynamic_linker='OS/2 ld.exe' 2843b042e37fSmrg shlibpath_var=LIBPATH 2844b042e37fSmrg ;; 2845b042e37fSmrg 2846b042e37fSmrgosf3* | osf4* | osf5*) 2847b042e37fSmrg version_type=osf 2848b042e37fSmrg need_lib_prefix=no 2849b042e37fSmrg need_version=no 2850b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2851b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2852b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2853b042e37fSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2854b042e37fSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2855b042e37fSmrg ;; 2856b042e37fSmrg 2857b042e37fSmrgsolaris*) 2858b042e37fSmrg version_type=linux 2859b042e37fSmrg need_lib_prefix=no 2860b042e37fSmrg need_version=no 2861b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2862b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2863b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2864b042e37fSmrg shlibpath_overrides_runpath=yes 2865b042e37fSmrg hardcode_into_libs=yes 2866b042e37fSmrg # ldd complains unless libraries are executable 2867b042e37fSmrg postinstall_cmds='chmod +x $lib' 2868b042e37fSmrg ;; 2869b042e37fSmrg 2870b042e37fSmrgsunos4*) 2871b042e37fSmrg version_type=sunos 2872b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2873b042e37fSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2874b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2875b042e37fSmrg shlibpath_overrides_runpath=yes 2876b042e37fSmrg if test "$with_gnu_ld" = yes; then 2877b042e37fSmrg need_lib_prefix=no 2878b042e37fSmrg fi 2879b042e37fSmrg need_version=yes 2880b042e37fSmrg ;; 2881b042e37fSmrg 2882b042e37fSmrgsysv4 | sysv4.3*) 2883b042e37fSmrg version_type=linux 2884b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2885b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2886b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2887b042e37fSmrg case $host_vendor in 2888b042e37fSmrg sni) 2889b042e37fSmrg shlibpath_overrides_runpath=no 2890b042e37fSmrg need_lib_prefix=no 2891b042e37fSmrg export_dynamic_flag_spec='${wl}-Blargedynsym' 2892b042e37fSmrg runpath_var=LD_RUN_PATH 2893b042e37fSmrg ;; 2894b042e37fSmrg siemens) 2895b042e37fSmrg need_lib_prefix=no 2896b042e37fSmrg ;; 2897b042e37fSmrg motorola) 2898b042e37fSmrg need_lib_prefix=no 2899b042e37fSmrg need_version=no 2900b042e37fSmrg shlibpath_overrides_runpath=no 2901b042e37fSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2902b042e37fSmrg ;; 2903b042e37fSmrg esac 2904b042e37fSmrg ;; 2905b042e37fSmrg 2906b042e37fSmrgsysv4*MP*) 2907b042e37fSmrg if test -d /usr/nec ;then 2908b042e37fSmrg version_type=linux 2909b042e37fSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2910b042e37fSmrg soname_spec='$libname${shared_ext}.$major' 2911b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2912b042e37fSmrg fi 2913b042e37fSmrg ;; 2914b042e37fSmrg 2915b042e37fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2916b042e37fSmrg version_type=freebsd-elf 2917b042e37fSmrg need_lib_prefix=no 2918b042e37fSmrg need_version=no 2919b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2920b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2921b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2922b042e37fSmrg hardcode_into_libs=yes 2923b042e37fSmrg if test "$with_gnu_ld" = yes; then 2924b042e37fSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2925b042e37fSmrg shlibpath_overrides_runpath=no 2926b042e37fSmrg else 2927b042e37fSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2928b042e37fSmrg shlibpath_overrides_runpath=yes 2929b042e37fSmrg case $host_os in 2930b042e37fSmrg sco3.2v5*) 2931b042e37fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2932b042e37fSmrg ;; 2933b042e37fSmrg esac 2934b042e37fSmrg fi 2935b042e37fSmrg sys_lib_dlsearch_path_spec='/usr/lib' 2936b042e37fSmrg ;; 2937b042e37fSmrg 2938b042e37fSmrguts4*) 2939b042e37fSmrg version_type=linux 2940b042e37fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2941b042e37fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2942b042e37fSmrg shlibpath_var=LD_LIBRARY_PATH 2943b042e37fSmrg ;; 2944b042e37fSmrg 2945b042e37fSmrg*) 2946b042e37fSmrg dynamic_linker=no 2947b042e37fSmrg ;; 2948b042e37fSmrgesac 2949b042e37fSmrgAC_MSG_RESULT([$dynamic_linker]) 2950b042e37fSmrgtest "$dynamic_linker" = no && can_build_shared=no 2951b042e37fSmrg 2952b042e37fSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2953b042e37fSmrgif test "$GCC" = yes; then 2954b042e37fSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2955b042e37fSmrgfi 2956b042e37fSmrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 2957b042e37fSmrg 2958b042e37fSmrg 2959b042e37fSmrg# _LT_AC_TAGCONFIG 2960b042e37fSmrg# ---------------- 2961b042e37fSmrgAC_DEFUN([_LT_AC_TAGCONFIG], 2962b042e37fSmrg[AC_ARG_WITH([tags], 2963b042e37fSmrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 2964b042e37fSmrg [include additional configurations @<:@automatic@:>@])], 2965b042e37fSmrg [tagnames="$withval"]) 2966b042e37fSmrg 2967b042e37fSmrgif test -f "$ltmain" && test -n "$tagnames"; then 2968b042e37fSmrg if test ! -f "${ofile}"; then 2969b042e37fSmrg AC_MSG_WARN([output file `$ofile' does not exist]) 2970b042e37fSmrg fi 2971b042e37fSmrg 2972b042e37fSmrg if test -z "$LTCC"; then 2973b042e37fSmrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 2974b042e37fSmrg if test -z "$LTCC"; then 2975b042e37fSmrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 2976b042e37fSmrg else 2977b042e37fSmrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 2978b042e37fSmrg fi 2979b042e37fSmrg fi 2980b042e37fSmrg if test -z "$LTCFLAGS"; then 2981b042e37fSmrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 2982b042e37fSmrg fi 2983b042e37fSmrg 2984b042e37fSmrg # Extract list of available tagged configurations in $ofile. 2985b042e37fSmrg # Note that this assumes the entire list is on one line. 2986b042e37fSmrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 2987b042e37fSmrg 2988b042e37fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2989b042e37fSmrg for tagname in $tagnames; do 2990b042e37fSmrg IFS="$lt_save_ifs" 2991b042e37fSmrg # Check whether tagname contains only valid characters 2992b042e37fSmrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 2993b042e37fSmrg "") ;; 2994b042e37fSmrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 2995b042e37fSmrg ;; 2996b042e37fSmrg esac 2997b042e37fSmrg 2998b042e37fSmrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 2999b042e37fSmrg then 3000b042e37fSmrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 3001b042e37fSmrg fi 3002b042e37fSmrg 3003b042e37fSmrg # Update the list of available tags. 3004b042e37fSmrg if test -n "$tagname"; then 3005b042e37fSmrg echo appending configuration tag \"$tagname\" to $ofile 3006b042e37fSmrg 3007b042e37fSmrg case $tagname in 3008b042e37fSmrg CXX) 3009b042e37fSmrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 3010b042e37fSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 3011b042e37fSmrg (test "X$CXX" != "Xg++"))) ; then 3012b042e37fSmrg AC_LIBTOOL_LANG_CXX_CONFIG 3013b042e37fSmrg else 3014b042e37fSmrg tagname="" 3015b042e37fSmrg fi 3016b042e37fSmrg ;; 3017b042e37fSmrg 3018b042e37fSmrg F77) 3019b042e37fSmrg if test -n "$F77" && test "X$F77" != "Xno"; then 3020b042e37fSmrg AC_LIBTOOL_LANG_F77_CONFIG 3021b042e37fSmrg else 3022b042e37fSmrg tagname="" 3023b042e37fSmrg fi 3024b042e37fSmrg ;; 3025b042e37fSmrg 3026b042e37fSmrg GCJ) 3027b042e37fSmrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 3028b042e37fSmrg AC_LIBTOOL_LANG_GCJ_CONFIG 3029b042e37fSmrg else 3030b042e37fSmrg tagname="" 3031b042e37fSmrg fi 3032b042e37fSmrg ;; 3033b042e37fSmrg 3034b042e37fSmrg RC) 3035b042e37fSmrg AC_LIBTOOL_LANG_RC_CONFIG 3036b042e37fSmrg ;; 3037b042e37fSmrg 3038b042e37fSmrg *) 3039b042e37fSmrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 3040b042e37fSmrg ;; 3041b042e37fSmrg esac 3042b042e37fSmrg 3043b042e37fSmrg # Append the new tag name to the list of available tags. 3044b042e37fSmrg if test -n "$tagname" ; then 3045b042e37fSmrg available_tags="$available_tags $tagname" 3046b042e37fSmrg fi 3047b042e37fSmrg fi 3048b042e37fSmrg done 3049b042e37fSmrg IFS="$lt_save_ifs" 3050b042e37fSmrg 3051b042e37fSmrg # Now substitute the updated list of available tags. 3052b042e37fSmrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 3053b042e37fSmrg mv "${ofile}T" "$ofile" 3054b042e37fSmrg chmod +x "$ofile" 3055b042e37fSmrg else 3056b042e37fSmrg rm -f "${ofile}T" 3057b042e37fSmrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 3058b042e37fSmrg fi 3059b042e37fSmrgfi 3060b042e37fSmrg])# _LT_AC_TAGCONFIG 3061b042e37fSmrg 3062b042e37fSmrg 3063b042e37fSmrg# AC_LIBTOOL_DLOPEN 3064b042e37fSmrg# ----------------- 3065b042e37fSmrg# enable checks for dlopen support 3066b042e37fSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 3067b042e37fSmrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 3068b042e37fSmrg])# AC_LIBTOOL_DLOPEN 3069b042e37fSmrg 3070b042e37fSmrg 3071b042e37fSmrg# AC_LIBTOOL_WIN32_DLL 3072b042e37fSmrg# -------------------- 3073b042e37fSmrg# declare package support for building win32 DLLs 3074b042e37fSmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 3075b042e37fSmrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 3076b042e37fSmrg])# AC_LIBTOOL_WIN32_DLL 3077b042e37fSmrg 3078b042e37fSmrg 3079b042e37fSmrg# AC_ENABLE_SHARED([DEFAULT]) 3080b042e37fSmrg# --------------------------- 3081b042e37fSmrg# implement the --enable-shared flag 3082b042e37fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 3083b042e37fSmrgAC_DEFUN([AC_ENABLE_SHARED], 3084b042e37fSmrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 3085b042e37fSmrgAC_ARG_ENABLE([shared], 3086b042e37fSmrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 3087b042e37fSmrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 3088b042e37fSmrg [p=${PACKAGE-default} 3089b042e37fSmrg case $enableval in 3090b042e37fSmrg yes) enable_shared=yes ;; 3091b042e37fSmrg no) enable_shared=no ;; 3092b042e37fSmrg *) 3093b042e37fSmrg enable_shared=no 3094b042e37fSmrg # Look at the argument we got. We use all the common list separators. 3095b042e37fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 3096b042e37fSmrg for pkg in $enableval; do 3097b042e37fSmrg IFS="$lt_save_ifs" 3098b042e37fSmrg if test "X$pkg" = "X$p"; then 3099b042e37fSmrg enable_shared=yes 3100b042e37fSmrg fi 3101b042e37fSmrg done 3102b042e37fSmrg IFS="$lt_save_ifs" 3103b042e37fSmrg ;; 3104b042e37fSmrg esac], 3105b042e37fSmrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 3106b042e37fSmrg])# AC_ENABLE_SHARED 3107b042e37fSmrg 3108b042e37fSmrg 3109b042e37fSmrg# AC_DISABLE_SHARED 3110b042e37fSmrg# ----------------- 3111b042e37fSmrg# set the default shared flag to --disable-shared 3112b042e37fSmrgAC_DEFUN([AC_DISABLE_SHARED], 3113b042e37fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3114b042e37fSmrgAC_ENABLE_SHARED(no) 3115b042e37fSmrg])# AC_DISABLE_SHARED 3116b042e37fSmrg 3117b042e37fSmrg 3118b042e37fSmrg# AC_ENABLE_STATIC([DEFAULT]) 3119b042e37fSmrg# --------------------------- 3120b042e37fSmrg# implement the --enable-static flag 3121b042e37fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 3122b042e37fSmrgAC_DEFUN([AC_ENABLE_STATIC], 3123b042e37fSmrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 3124b042e37fSmrgAC_ARG_ENABLE([static], 3125b042e37fSmrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 3126b042e37fSmrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 3127b042e37fSmrg [p=${PACKAGE-default} 3128b042e37fSmrg case $enableval in 3129b042e37fSmrg yes) enable_static=yes ;; 3130b042e37fSmrg no) enable_static=no ;; 3131b042e37fSmrg *) 3132b042e37fSmrg enable_static=no 3133b042e37fSmrg # Look at the argument we got. We use all the common list separators. 3134b042e37fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 3135b042e37fSmrg for pkg in $enableval; do 3136b042e37fSmrg IFS="$lt_save_ifs" 3137b042e37fSmrg if test "X$pkg" = "X$p"; then 3138b042e37fSmrg enable_static=yes 3139b042e37fSmrg fi 3140b042e37fSmrg done 3141b042e37fSmrg IFS="$lt_save_ifs" 3142b042e37fSmrg ;; 3143b042e37fSmrg esac], 3144b042e37fSmrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 3145b042e37fSmrg])# AC_ENABLE_STATIC 3146b042e37fSmrg 3147b042e37fSmrg 3148b042e37fSmrg# AC_DISABLE_STATIC 3149b042e37fSmrg# ----------------- 3150b042e37fSmrg# set the default static flag to --disable-static 3151b042e37fSmrgAC_DEFUN([AC_DISABLE_STATIC], 3152b042e37fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3153b042e37fSmrgAC_ENABLE_STATIC(no) 3154b042e37fSmrg])# AC_DISABLE_STATIC 3155b042e37fSmrg 3156b042e37fSmrg 3157b042e37fSmrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 3158b042e37fSmrg# --------------------------------- 3159b042e37fSmrg# implement the --enable-fast-install flag 3160b042e37fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 3161b042e37fSmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 3162b042e37fSmrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 3163b042e37fSmrgAC_ARG_ENABLE([fast-install], 3164b042e37fSmrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 3165b042e37fSmrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 3166b042e37fSmrg [p=${PACKAGE-default} 3167b042e37fSmrg case $enableval in 3168b042e37fSmrg yes) enable_fast_install=yes ;; 3169b042e37fSmrg no) enable_fast_install=no ;; 3170b042e37fSmrg *) 3171b042e37fSmrg enable_fast_install=no 3172b042e37fSmrg # Look at the argument we got. We use all the common list separators. 3173b042e37fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 3174b042e37fSmrg for pkg in $enableval; do 3175b042e37fSmrg IFS="$lt_save_ifs" 3176b042e37fSmrg if test "X$pkg" = "X$p"; then 3177b042e37fSmrg enable_fast_install=yes 3178b042e37fSmrg fi 3179b042e37fSmrg done 3180b042e37fSmrg IFS="$lt_save_ifs" 3181b042e37fSmrg ;; 3182b042e37fSmrg esac], 3183b042e37fSmrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 3184b042e37fSmrg])# AC_ENABLE_FAST_INSTALL 3185b042e37fSmrg 3186b042e37fSmrg 3187b042e37fSmrg# AC_DISABLE_FAST_INSTALL 3188b042e37fSmrg# ----------------------- 3189b042e37fSmrg# set the default to --disable-fast-install 3190b042e37fSmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 3191b042e37fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3192b042e37fSmrgAC_ENABLE_FAST_INSTALL(no) 3193b042e37fSmrg])# AC_DISABLE_FAST_INSTALL 3194b042e37fSmrg 3195b042e37fSmrg 3196b042e37fSmrg# AC_LIBTOOL_PICMODE([MODE]) 3197b042e37fSmrg# -------------------------- 3198b042e37fSmrg# implement the --with-pic flag 3199b042e37fSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 3200b042e37fSmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 3201b042e37fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3202b042e37fSmrgpic_mode=ifelse($#,1,$1,default) 3203b042e37fSmrg])# AC_LIBTOOL_PICMODE 3204b042e37fSmrg 3205b042e37fSmrg 3206b042e37fSmrg# AC_PROG_EGREP 3207b042e37fSmrg# ------------- 3208b042e37fSmrg# This is predefined starting with Autoconf 2.54, so this conditional 3209b042e37fSmrg# definition can be removed once we require Autoconf 2.54 or later. 3210b042e37fSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 3211b042e37fSmrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 3212b042e37fSmrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 3213b042e37fSmrg then ac_cv_prog_egrep='grep -E' 3214b042e37fSmrg else ac_cv_prog_egrep='egrep' 3215b042e37fSmrg fi]) 3216b042e37fSmrg EGREP=$ac_cv_prog_egrep 3217b042e37fSmrg AC_SUBST([EGREP]) 3218b042e37fSmrg])]) 3219b042e37fSmrg 3220b042e37fSmrg 3221b042e37fSmrg# AC_PATH_TOOL_PREFIX 3222b042e37fSmrg# ------------------- 3223b042e37fSmrg# find a file program which can recognise shared library 3224b042e37fSmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 3225b042e37fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 3226b042e37fSmrgAC_MSG_CHECKING([for $1]) 3227b042e37fSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3228b042e37fSmrg[case $MAGIC_CMD in 3229b042e37fSmrg[[\\/*] | ?:[\\/]*]) 3230b042e37fSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 3231b042e37fSmrg ;; 3232b042e37fSmrg*) 3233b042e37fSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 3234b042e37fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3235b042e37fSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 3236b042e37fSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 3237b042e37fSmrgdnl not every word. This closes a longstanding sh security hole. 3238b042e37fSmrg ac_dummy="ifelse([$2], , $PATH, [$2])" 3239b042e37fSmrg for ac_dir in $ac_dummy; do 3240b042e37fSmrg IFS="$lt_save_ifs" 3241b042e37fSmrg test -z "$ac_dir" && ac_dir=. 3242b042e37fSmrg if test -f $ac_dir/$1; then 3243b042e37fSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 3244b042e37fSmrg if test -n "$file_magic_test_file"; then 3245b042e37fSmrg case $deplibs_check_method in 3246b042e37fSmrg "file_magic "*) 3247b042e37fSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3248b042e37fSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 3249b042e37fSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3250b042e37fSmrg $EGREP "$file_magic_regex" > /dev/null; then 3251b042e37fSmrg : 3252b042e37fSmrg else 3253b042e37fSmrg cat <<EOF 1>&2 3254b042e37fSmrg 3255b042e37fSmrg*** Warning: the command libtool uses to detect shared libraries, 3256b042e37fSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 3257b042e37fSmrg*** The result is that libtool may fail to recognize shared libraries 3258b042e37fSmrg*** as such. This will affect the creation of libtool libraries that 3259b042e37fSmrg*** depend on shared libraries, but programs linked with such libtool 3260b042e37fSmrg*** libraries will work regardless of this problem. Nevertheless, you 3261b042e37fSmrg*** may want to report the problem to your system manager and/or to 3262b042e37fSmrg*** bug-libtool@gnu.org 3263b042e37fSmrg 3264b042e37fSmrgEOF 3265b042e37fSmrg fi ;; 3266b042e37fSmrg esac 3267b042e37fSmrg fi 3268b042e37fSmrg break 3269b042e37fSmrg fi 3270b042e37fSmrg done 3271b042e37fSmrg IFS="$lt_save_ifs" 3272b042e37fSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 3273b042e37fSmrg ;; 3274b042e37fSmrgesac]) 3275b042e37fSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 3276b042e37fSmrgif test -n "$MAGIC_CMD"; then 3277b042e37fSmrg AC_MSG_RESULT($MAGIC_CMD) 3278b042e37fSmrgelse 3279b042e37fSmrg AC_MSG_RESULT(no) 3280b042e37fSmrgfi 3281b042e37fSmrg])# AC_PATH_TOOL_PREFIX 3282b042e37fSmrg 3283b042e37fSmrg 3284b042e37fSmrg# AC_PATH_MAGIC 3285b042e37fSmrg# ------------- 3286b042e37fSmrg# find a file program which can recognise a shared library 3287b042e37fSmrgAC_DEFUN([AC_PATH_MAGIC], 3288b042e37fSmrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3289b042e37fSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3290b042e37fSmrg if test -n "$ac_tool_prefix"; then 3291b042e37fSmrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3292b042e37fSmrg else 3293b042e37fSmrg MAGIC_CMD=: 3294b042e37fSmrg fi 3295b042e37fSmrgfi 3296b042e37fSmrg])# AC_PATH_MAGIC 3297b042e37fSmrg 3298b042e37fSmrg 3299b042e37fSmrg# AC_PROG_LD 3300b042e37fSmrg# ---------- 3301b042e37fSmrg# find the pathname to the GNU or non-GNU linker 3302b042e37fSmrgAC_DEFUN([AC_PROG_LD], 3303b042e37fSmrg[AC_ARG_WITH([gnu-ld], 3304b042e37fSmrg [AC_HELP_STRING([--with-gnu-ld], 3305b042e37fSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3306b042e37fSmrg [test "$withval" = no || with_gnu_ld=yes], 3307b042e37fSmrg [with_gnu_ld=no]) 3308b042e37fSmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 3309b042e37fSmrgAC_REQUIRE([AC_PROG_CC])dnl 3310b042e37fSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3311b042e37fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3312b042e37fSmrgac_prog=ld 3313b042e37fSmrgif test "$GCC" = yes; then 3314b042e37fSmrg # Check if gcc -print-prog-name=ld gives a path. 3315b042e37fSmrg AC_MSG_CHECKING([for ld used by $CC]) 3316b042e37fSmrg case $host in 3317b042e37fSmrg *-*-mingw*) 3318b042e37fSmrg # gcc leaves a trailing carriage return which upsets mingw 3319b042e37fSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3320b042e37fSmrg *) 3321b042e37fSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3322b042e37fSmrg esac 3323b042e37fSmrg case $ac_prog in 3324b042e37fSmrg # Accept absolute paths. 3325b042e37fSmrg [[\\/]]* | ?:[[\\/]]*) 3326b042e37fSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 3327b042e37fSmrg # Canonicalize the pathname of ld 3328b042e37fSmrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 3329b042e37fSmrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 3330b042e37fSmrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 3331b042e37fSmrg done 3332b042e37fSmrg test -z "$LD" && LD="$ac_prog" 3333b042e37fSmrg ;; 3334b042e37fSmrg "") 3335b042e37fSmrg # If it fails, then pretend we aren't using GCC. 3336b042e37fSmrg ac_prog=ld 3337b042e37fSmrg ;; 3338b042e37fSmrg *) 3339b042e37fSmrg # If it is relative, then search for the first ld in PATH. 3340b042e37fSmrg with_gnu_ld=unknown 3341b042e37fSmrg ;; 3342b042e37fSmrg esac 3343b042e37fSmrgelif test "$with_gnu_ld" = yes; then 3344b042e37fSmrg AC_MSG_CHECKING([for GNU ld]) 3345b042e37fSmrgelse 3346b042e37fSmrg AC_MSG_CHECKING([for non-GNU ld]) 3347b042e37fSmrgfi 3348b042e37fSmrgAC_CACHE_VAL(lt_cv_path_LD, 3349b042e37fSmrg[if test -z "$LD"; then 3350b042e37fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3351b042e37fSmrg for ac_dir in $PATH; do 3352b042e37fSmrg IFS="$lt_save_ifs" 3353b042e37fSmrg test -z "$ac_dir" && ac_dir=. 3354b042e37fSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3355b042e37fSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 3356b042e37fSmrg # Check to see if the program is GNU ld. I'd rather use --version, 3357b042e37fSmrg # but apparently some variants of GNU ld only accept -v. 3358b042e37fSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 3359b042e37fSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3360b042e37fSmrg *GNU* | *'with BFD'*) 3361b042e37fSmrg test "$with_gnu_ld" != no && break 3362b042e37fSmrg ;; 3363b042e37fSmrg *) 3364b042e37fSmrg test "$with_gnu_ld" != yes && break 3365b042e37fSmrg ;; 3366b042e37fSmrg esac 3367b042e37fSmrg fi 3368b042e37fSmrg done 3369b042e37fSmrg IFS="$lt_save_ifs" 3370b042e37fSmrgelse 3371b042e37fSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 3372b042e37fSmrgfi]) 3373b042e37fSmrgLD="$lt_cv_path_LD" 3374b042e37fSmrgif test -n "$LD"; then 3375b042e37fSmrg AC_MSG_RESULT($LD) 3376b042e37fSmrgelse 3377b042e37fSmrg AC_MSG_RESULT(no) 3378b042e37fSmrgfi 3379b042e37fSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3380b042e37fSmrgAC_PROG_LD_GNU 3381b042e37fSmrg])# AC_PROG_LD 3382b042e37fSmrg 3383b042e37fSmrg 3384b042e37fSmrg# AC_PROG_LD_GNU 3385b042e37fSmrg# -------------- 3386b042e37fSmrgAC_DEFUN([AC_PROG_LD_GNU], 3387b042e37fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 3388b042e37fSmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3389b042e37fSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3390b042e37fSmrgcase `$LD -v 2>&1 </dev/null` in 3391b042e37fSmrg*GNU* | *'with BFD'*) 3392b042e37fSmrg lt_cv_prog_gnu_ld=yes 3393b042e37fSmrg ;; 3394b042e37fSmrg*) 3395b042e37fSmrg lt_cv_prog_gnu_ld=no 3396b042e37fSmrg ;; 3397b042e37fSmrgesac]) 3398b042e37fSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3399b042e37fSmrg])# AC_PROG_LD_GNU 3400b042e37fSmrg 3401b042e37fSmrg 3402b042e37fSmrg# AC_PROG_LD_RELOAD_FLAG 3403b042e37fSmrg# ---------------------- 3404b042e37fSmrg# find reload flag for linker 3405b042e37fSmrg# -- PORTME Some linkers may need a different reload flag. 3406b042e37fSmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 3407b042e37fSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 3408b042e37fSmrg lt_cv_ld_reload_flag, 3409b042e37fSmrg [lt_cv_ld_reload_flag='-r']) 3410b042e37fSmrgreload_flag=$lt_cv_ld_reload_flag 3411b042e37fSmrgcase $reload_flag in 3412b042e37fSmrg"" | " "*) ;; 3413b042e37fSmrg*) reload_flag=" $reload_flag" ;; 3414b042e37fSmrgesac 3415b042e37fSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3416b042e37fSmrgcase $host_os in 3417b042e37fSmrg darwin*) 3418b042e37fSmrg if test "$GCC" = yes; then 3419b042e37fSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 3420b042e37fSmrg else 3421b042e37fSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3422b042e37fSmrg fi 3423b042e37fSmrg ;; 3424b042e37fSmrgesac 3425b042e37fSmrg])# AC_PROG_LD_RELOAD_FLAG 3426b042e37fSmrg 3427b042e37fSmrg 3428b042e37fSmrg# AC_DEPLIBS_CHECK_METHOD 3429b042e37fSmrg# ----------------------- 3430b042e37fSmrg# how to check for library dependencies 3431b042e37fSmrg# -- PORTME fill in with the dynamic library characteristics 3432b042e37fSmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 3433b042e37fSmrg[AC_CACHE_CHECK([how to recognise dependent libraries], 3434b042e37fSmrglt_cv_deplibs_check_method, 3435b042e37fSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3436b042e37fSmrglt_cv_file_magic_test_file= 3437b042e37fSmrglt_cv_deplibs_check_method='unknown' 3438b042e37fSmrg# Need to set the preceding variable on all platforms that support 3439b042e37fSmrg# interlibrary dependencies. 3440b042e37fSmrg# 'none' -- dependencies not supported. 3441b042e37fSmrg# `unknown' -- same as none, but documents that we really don't know. 3442b042e37fSmrg# 'pass_all' -- all dependencies passed with no checks. 3443b042e37fSmrg# 'test_compile' -- check by making test program. 3444b042e37fSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 3445b042e37fSmrg# which responds to the $file_magic_cmd with a given extended regex. 3446b042e37fSmrg# If you have `file' or equivalent on your system and you're not sure 3447b042e37fSmrg# whether `pass_all' will *always* work, you probably want this one. 3448b042e37fSmrg 3449b042e37fSmrgcase $host_os in 3450b042e37fSmrgaix4* | aix5*) 3451b042e37fSmrg lt_cv_deplibs_check_method=pass_all 3452b042e37fSmrg ;; 3453b042e37fSmrg 3454b042e37fSmrgbeos*) 3455b042e37fSmrg lt_cv_deplibs_check_method=pass_all 3456b042e37fSmrg ;; 3457b042e37fSmrg 3458b042e37fSmrgbsdi[[45]]*) 3459b042e37fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3460b042e37fSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3461b042e37fSmrg lt_cv_file_magic_test_file=/shlib/libc.so 3462b042e37fSmrg ;; 3463b042e37fSmrg 3464b042e37fSmrgcygwin*) 3465b042e37fSmrg # func_win32_libid is a shell function defined in ltmain.sh 3466b042e37fSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3467b042e37fSmrg lt_cv_file_magic_cmd='func_win32_libid' 3468b042e37fSmrg ;; 3469b042e37fSmrg 3470b042e37fSmrgmingw* | pw32*) 3471b042e37fSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3472b042e37fSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump'. 3473b042e37fSmrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 3474b042e37fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3475b042e37fSmrg ;; 3476b042e37fSmrg 3477b042e37fSmrgdarwin* | rhapsody*) 3478b042e37fSmrg lt_cv_deplibs_check_method=pass_all 3479b042e37fSmrg ;; 3480b042e37fSmrg 3481b042e37fSmrgfreebsd* | kfreebsd*-gnu | dragonfly*) 3482b042e37fSmrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 3483b042e37fSmrg case $host_cpu in 3484b042e37fSmrg i*86 ) 3485b042e37fSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3486b042e37fSmrg # Let's accept both of them until this is cleared up. 3487b042e37fSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3488b042e37fSmrg lt_cv_file_magic_cmd=/usr/bin/file 3489b042e37fSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3490b042e37fSmrg ;; 3491b042e37fSmrg esac 3492b042e37fSmrg else 3493b042e37fSmrg lt_cv_deplibs_check_method=pass_all 3494b042e37fSmrg fi 3495b042e37fSmrg ;; 3496b042e37fSmrg 3497b042e37fSmrggnu*) 3498b042e37fSmrg lt_cv_deplibs_check_method=pass_all 3499b042e37fSmrg ;; 3500b042e37fSmrg 3501b042e37fSmrghpux10.20* | hpux11*) 3502b042e37fSmrg lt_cv_file_magic_cmd=/usr/bin/file 3503b042e37fSmrg case $host_cpu in 3504b042e37fSmrg ia64*) 3505b042e37fSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3506b042e37fSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3507b042e37fSmrg ;; 3508b042e37fSmrg hppa*64*) 3509b042e37fSmrg [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]'] 3510b042e37fSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3511b042e37fSmrg ;; 3512b042e37fSmrg *) 3513b042e37fSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 3514b042e37fSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3515b042e37fSmrg ;; 3516b042e37fSmrg esac 3517b042e37fSmrg ;; 3518b042e37fSmrg 3519b042e37fSmrginterix3*) 3520b042e37fSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3521b042e37fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3522b042e37fSmrg ;; 3523b042e37fSmrg 3524b042e37fSmrgirix5* | irix6* | nonstopux*) 3525b042e37fSmrg case $LD in 3526b042e37fSmrg *-32|*"-32 ") libmagic=32-bit;; 3527b042e37fSmrg *-n32|*"-n32 ") libmagic=N32;; 3528b042e37fSmrg *-64|*"-64 ") libmagic=64-bit;; 3529b042e37fSmrg *) libmagic=never-match;; 3530b042e37fSmrg esac 3531b042e37fSmrg lt_cv_deplibs_check_method=pass_all 3532b042e37fSmrg ;; 3533b042e37fSmrg 3534b042e37fSmrg# This must be Linux ELF. 3535b042e37fSmrglinux*) 3536b042e37fSmrg lt_cv_deplibs_check_method=pass_all 3537b042e37fSmrg ;; 3538b042e37fSmrg 3539b042e37fSmrgnetbsd*) 3540b042e37fSmrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 3541b042e37fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3542b042e37fSmrg else 3543b042e37fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3544b042e37fSmrg fi 3545b042e37fSmrg ;; 3546b042e37fSmrg 3547b042e37fSmrgnewos6*) 3548b042e37fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3549b042e37fSmrg lt_cv_file_magic_cmd=/usr/bin/file 3550b042e37fSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3551b042e37fSmrg ;; 3552b042e37fSmrg 3553b042e37fSmrgnto-qnx*) 3554b042e37fSmrg lt_cv_deplibs_check_method=unknown 3555b042e37fSmrg ;; 3556b042e37fSmrg 3557b042e37fSmrgopenbsd*) 3558b042e37fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3559b042e37fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3560b042e37fSmrg else 3561b042e37fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3562b042e37fSmrg fi 3563b042e37fSmrg ;; 3564b042e37fSmrg 3565b042e37fSmrgosf3* | osf4* | osf5*) 3566b042e37fSmrg lt_cv_deplibs_check_method=pass_all 3567b042e37fSmrg ;; 3568b042e37fSmrg 3569b042e37fSmrgsolaris*) 3570b042e37fSmrg lt_cv_deplibs_check_method=pass_all 3571b042e37fSmrg ;; 3572b042e37fSmrg 3573b042e37fSmrgsysv4 | sysv4.3*) 3574b042e37fSmrg case $host_vendor in 3575b042e37fSmrg motorola) 3576b042e37fSmrg 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]]' 3577b042e37fSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3578b042e37fSmrg ;; 3579b042e37fSmrg ncr) 3580b042e37fSmrg lt_cv_deplibs_check_method=pass_all 3581b042e37fSmrg ;; 3582b042e37fSmrg sequent) 3583b042e37fSmrg lt_cv_file_magic_cmd='/bin/file' 3584b042e37fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3585b042e37fSmrg ;; 3586b042e37fSmrg sni) 3587b042e37fSmrg lt_cv_file_magic_cmd='/bin/file' 3588b042e37fSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3589b042e37fSmrg lt_cv_file_magic_test_file=/lib/libc.so 3590b042e37fSmrg ;; 3591b042e37fSmrg siemens) 3592b042e37fSmrg lt_cv_deplibs_check_method=pass_all 3593b042e37fSmrg ;; 3594b042e37fSmrg pc) 3595b042e37fSmrg lt_cv_deplibs_check_method=pass_all 3596b042e37fSmrg ;; 3597b042e37fSmrg esac 3598b042e37fSmrg ;; 3599b042e37fSmrg 3600b042e37fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3601b042e37fSmrg lt_cv_deplibs_check_method=pass_all 3602b042e37fSmrg ;; 3603b042e37fSmrgesac 3604b042e37fSmrg]) 3605b042e37fSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 3606b042e37fSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 3607b042e37fSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3608b042e37fSmrg])# AC_DEPLIBS_CHECK_METHOD 3609b042e37fSmrg 3610b042e37fSmrg 3611b042e37fSmrg# AC_PROG_NM 3612b042e37fSmrg# ---------- 3613b042e37fSmrg# find the pathname to a BSD-compatible name lister 3614b042e37fSmrgAC_DEFUN([AC_PROG_NM], 3615b042e37fSmrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 3616b042e37fSmrg[if test -n "$NM"; then 3617b042e37fSmrg # Let the user override the test. 3618b042e37fSmrg lt_cv_path_NM="$NM" 3619b042e37fSmrgelse 3620b042e37fSmrg lt_nm_to_check="${ac_tool_prefix}nm" 3621b042e37fSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3622b042e37fSmrg lt_nm_to_check="$lt_nm_to_check nm" 3623b042e37fSmrg fi 3624b042e37fSmrg for lt_tmp_nm in $lt_nm_to_check; do 3625b042e37fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3626b042e37fSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3627b042e37fSmrg IFS="$lt_save_ifs" 3628b042e37fSmrg test -z "$ac_dir" && ac_dir=. 3629b042e37fSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 3630b042e37fSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3631b042e37fSmrg # Check to see if the nm accepts a BSD-compat flag. 3632b042e37fSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3633b042e37fSmrg # nm: unknown option "B" ignored 3634b042e37fSmrg # Tru64's nm complains that /dev/null is an invalid object file 3635b042e37fSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3636b042e37fSmrg */dev/null* | *'Invalid file or object type'*) 3637b042e37fSmrg lt_cv_path_NM="$tmp_nm -B" 3638b042e37fSmrg break 3639b042e37fSmrg ;; 3640b042e37fSmrg *) 3641b042e37fSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3642b042e37fSmrg */dev/null*) 3643b042e37fSmrg lt_cv_path_NM="$tmp_nm -p" 3644b042e37fSmrg break 3645b042e37fSmrg ;; 3646b042e37fSmrg *) 3647b042e37fSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3648b042e37fSmrg continue # so that we can try to find one that supports BSD flags 3649b042e37fSmrg ;; 3650b042e37fSmrg esac 3651b042e37fSmrg ;; 3652b042e37fSmrg esac 3653b042e37fSmrg fi 3654b042e37fSmrg done 3655b042e37fSmrg IFS="$lt_save_ifs" 3656b042e37fSmrg done 3657b042e37fSmrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 3658b042e37fSmrgfi]) 3659b042e37fSmrgNM="$lt_cv_path_NM" 3660b042e37fSmrg])# AC_PROG_NM 3661b042e37fSmrg 3662b042e37fSmrg 3663b042e37fSmrg# AC_CHECK_LIBM 3664b042e37fSmrg# ------------- 3665b042e37fSmrg# check for math library 3666b042e37fSmrgAC_DEFUN([AC_CHECK_LIBM], 3667b042e37fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3668b042e37fSmrgLIBM= 3669b042e37fSmrgcase $host in 3670b042e37fSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 3671b042e37fSmrg # These system don't have libm, or don't need it 3672b042e37fSmrg ;; 3673b042e37fSmrg*-ncr-sysv4.3*) 3674b042e37fSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3675b042e37fSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3676b042e37fSmrg ;; 3677b042e37fSmrg*) 3678b042e37fSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3679b042e37fSmrg ;; 3680b042e37fSmrgesac 3681b042e37fSmrg])# AC_CHECK_LIBM 3682b042e37fSmrg 3683b042e37fSmrg 3684b042e37fSmrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 3685b042e37fSmrg# ----------------------------------- 3686b042e37fSmrg# sets LIBLTDL to the link flags for the libltdl convenience library and 3687b042e37fSmrg# LTDLINCL to the include flags for the libltdl header and adds 3688b042e37fSmrg# --enable-ltdl-convenience to the configure arguments. Note that 3689b042e37fSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 3690b042e37fSmrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 3691b042e37fSmrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 3692b042e37fSmrg# (note the single quotes!). If your package is not flat and you're not 3693b042e37fSmrg# using automake, define top_builddir and top_srcdir appropriately in 3694b042e37fSmrg# the Makefiles. 3695b042e37fSmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 3696b042e37fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3697b042e37fSmrg case $enable_ltdl_convenience in 3698b042e37fSmrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 3699b042e37fSmrg "") enable_ltdl_convenience=yes 3700b042e37fSmrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 3701b042e37fSmrg esac 3702b042e37fSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 3703b042e37fSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 3704b042e37fSmrg # For backwards non-gettext consistent compatibility... 3705b042e37fSmrg INCLTDL="$LTDLINCL" 3706b042e37fSmrg])# AC_LIBLTDL_CONVENIENCE 3707b042e37fSmrg 3708b042e37fSmrg 3709b042e37fSmrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 3710b042e37fSmrg# ----------------------------------- 3711b042e37fSmrg# sets LIBLTDL to the link flags for the libltdl installable library and 3712b042e37fSmrg# LTDLINCL to the include flags for the libltdl header and adds 3713b042e37fSmrg# --enable-ltdl-install to the configure arguments. Note that 3714b042e37fSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 3715b042e37fSmrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 3716b042e37fSmrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 3717b042e37fSmrg# '${top_srcdir}/' (note the single quotes!). If your package is not 3718b042e37fSmrg# flat and you're not using automake, define top_builddir and top_srcdir 3719b042e37fSmrg# appropriately in the Makefiles. 3720b042e37fSmrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 3721b042e37fSmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 3722b042e37fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3723b042e37fSmrg AC_CHECK_LIB(ltdl, lt_dlinit, 3724b042e37fSmrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 3725b042e37fSmrg [if test x"$enable_ltdl_install" = xno; then 3726b042e37fSmrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 3727b042e37fSmrg else 3728b042e37fSmrg enable_ltdl_install=yes 3729b042e37fSmrg fi 3730b042e37fSmrg ]) 3731b042e37fSmrg if test x"$enable_ltdl_install" = x"yes"; then 3732b042e37fSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 3733b042e37fSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 3734b042e37fSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 3735b042e37fSmrg else 3736b042e37fSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 3737b042e37fSmrg LIBLTDL="-lltdl" 3738b042e37fSmrg LTDLINCL= 3739b042e37fSmrg fi 3740b042e37fSmrg # For backwards non-gettext consistent compatibility... 3741b042e37fSmrg INCLTDL="$LTDLINCL" 3742b042e37fSmrg])# AC_LIBLTDL_INSTALLABLE 3743b042e37fSmrg 3744b042e37fSmrg 3745b042e37fSmrg# AC_LIBTOOL_CXX 3746b042e37fSmrg# -------------- 3747b042e37fSmrg# enable support for C++ libraries 3748b042e37fSmrgAC_DEFUN([AC_LIBTOOL_CXX], 3749b042e37fSmrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 3750b042e37fSmrg])# AC_LIBTOOL_CXX 3751b042e37fSmrg 3752b042e37fSmrg 3753b042e37fSmrg# _LT_AC_LANG_CXX 3754b042e37fSmrg# --------------- 3755b042e37fSmrgAC_DEFUN([_LT_AC_LANG_CXX], 3756b042e37fSmrg[AC_REQUIRE([AC_PROG_CXX]) 3757b042e37fSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 3758b042e37fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 3759b042e37fSmrg])# _LT_AC_LANG_CXX 3760b042e37fSmrg 3761b042e37fSmrg# _LT_AC_PROG_CXXCPP 3762b042e37fSmrg# ------------------ 3763b042e37fSmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 3764b042e37fSmrg[ 3765b042e37fSmrgAC_REQUIRE([AC_PROG_CXX]) 3766b042e37fSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 3767b042e37fSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 3768b042e37fSmrg (test "X$CXX" != "Xg++"))) ; then 3769b042e37fSmrg AC_PROG_CXXCPP 3770b042e37fSmrgfi 3771b042e37fSmrg])# _LT_AC_PROG_CXXCPP 3772b042e37fSmrg 3773b042e37fSmrg# AC_LIBTOOL_F77 3774b042e37fSmrg# -------------- 3775b042e37fSmrg# enable support for Fortran 77 libraries 3776b042e37fSmrgAC_DEFUN([AC_LIBTOOL_F77], 3777b042e37fSmrg[AC_REQUIRE([_LT_AC_LANG_F77]) 3778b042e37fSmrg])# AC_LIBTOOL_F77 3779b042e37fSmrg 3780b042e37fSmrg 3781b042e37fSmrg# _LT_AC_LANG_F77 3782b042e37fSmrg# --------------- 3783b042e37fSmrgAC_DEFUN([_LT_AC_LANG_F77], 3784b042e37fSmrg[AC_REQUIRE([AC_PROG_F77]) 3785b042e37fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 3786b042e37fSmrg])# _LT_AC_LANG_F77 3787b042e37fSmrg 3788b042e37fSmrg 3789b042e37fSmrg# AC_LIBTOOL_GCJ 3790b042e37fSmrg# -------------- 3791b042e37fSmrg# enable support for GCJ libraries 3792b042e37fSmrgAC_DEFUN([AC_LIBTOOL_GCJ], 3793b042e37fSmrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 3794b042e37fSmrg])# AC_LIBTOOL_GCJ 3795b042e37fSmrg 3796b042e37fSmrg 3797b042e37fSmrg# _LT_AC_LANG_GCJ 3798b042e37fSmrg# --------------- 3799b042e37fSmrgAC_DEFUN([_LT_AC_LANG_GCJ], 3800b042e37fSmrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 3801b042e37fSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 3802b042e37fSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 3803b042e37fSmrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 3804b042e37fSmrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 3805b042e37fSmrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 3806b042e37fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 3807b042e37fSmrg])# _LT_AC_LANG_GCJ 3808b042e37fSmrg 3809b042e37fSmrg 3810b042e37fSmrg# AC_LIBTOOL_RC 3811b042e37fSmrg# ------------- 3812b042e37fSmrg# enable support for Windows resource files 3813b042e37fSmrgAC_DEFUN([AC_LIBTOOL_RC], 3814b042e37fSmrg[AC_REQUIRE([LT_AC_PROG_RC]) 3815b042e37fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 3816b042e37fSmrg])# AC_LIBTOOL_RC 3817b042e37fSmrg 3818b042e37fSmrg 3819b042e37fSmrg# AC_LIBTOOL_LANG_C_CONFIG 3820b042e37fSmrg# ------------------------ 3821b042e37fSmrg# Ensure that the configuration vars for the C compiler are 3822b042e37fSmrg# suitably defined. Those variables are subsequently used by 3823b042e37fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 3824b042e37fSmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 3825b042e37fSmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 3826b042e37fSmrg[lt_save_CC="$CC" 3827b042e37fSmrgAC_LANG_PUSH(C) 3828b042e37fSmrg 3829b042e37fSmrg# Source file extension for C test sources. 3830b042e37fSmrgac_ext=c 3831b042e37fSmrg 3832b042e37fSmrg# Object file extension for compiled C test sources. 3833b042e37fSmrgobjext=o 3834b042e37fSmrg_LT_AC_TAGVAR(objext, $1)=$objext 3835b042e37fSmrg 3836b042e37fSmrg# Code to be used in simple compile tests 3837b042e37fSmrglt_simple_compile_test_code="int some_variable = 0;\n" 3838b042e37fSmrg 3839b042e37fSmrg# Code to be used in simple link tests 3840b042e37fSmrglt_simple_link_test_code='int main(){return(0);}\n' 3841b042e37fSmrg 3842b042e37fSmrg_LT_AC_SYS_COMPILER 3843b042e37fSmrg 3844b042e37fSmrg# save warnings/boilerplate of simple test code 3845b042e37fSmrg_LT_COMPILER_BOILERPLATE 3846b042e37fSmrg_LT_LINKER_BOILERPLATE 3847b042e37fSmrg 3848b042e37fSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 3849b042e37fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 3850b042e37fSmrgAC_LIBTOOL_PROG_CC_C_O($1) 3851b042e37fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3852b042e37fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 3853b042e37fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3854b042e37fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3855b042e37fSmrgAC_LIBTOOL_SYS_LIB_STRIP 3856b042e37fSmrgAC_LIBTOOL_DLOPEN_SELF 3857b042e37fSmrg 3858b042e37fSmrg# Report which library types will actually be built 3859b042e37fSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 3860b042e37fSmrgAC_MSG_RESULT([$can_build_shared]) 3861b042e37fSmrg 3862b042e37fSmrgAC_MSG_CHECKING([whether to build shared libraries]) 3863b042e37fSmrgtest "$can_build_shared" = "no" && enable_shared=no 3864b042e37fSmrg 3865b042e37fSmrg# On AIX, shared libraries and static libraries use the same namespace, and 3866b042e37fSmrg# are all built from PIC. 3867b042e37fSmrgcase $host_os in 3868b042e37fSmrgaix3*) 3869b042e37fSmrg test "$enable_shared" = yes && enable_static=no 3870b042e37fSmrg if test -n "$RANLIB"; then 3871b042e37fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 3872b042e37fSmrg postinstall_cmds='$RANLIB $lib' 3873b042e37fSmrg fi 3874b042e37fSmrg ;; 3875b042e37fSmrg 3876b042e37fSmrgaix4* | aix5*) 3877b042e37fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 3878b042e37fSmrg test "$enable_shared" = yes && enable_static=no 3879b042e37fSmrg fi 3880b042e37fSmrg ;; 3881b042e37fSmrgesac 3882b042e37fSmrgAC_MSG_RESULT([$enable_shared]) 3883b042e37fSmrg 3884b042e37fSmrgAC_MSG_CHECKING([whether to build static libraries]) 3885b042e37fSmrg# Make sure either enable_shared or enable_static is yes. 3886b042e37fSmrgtest "$enable_shared" = yes || enable_static=yes 3887b042e37fSmrgAC_MSG_RESULT([$enable_static]) 3888b042e37fSmrg 3889b042e37fSmrgAC_LIBTOOL_CONFIG($1) 3890b042e37fSmrg 3891b042e37fSmrgAC_LANG_POP 3892b042e37fSmrgCC="$lt_save_CC" 3893b042e37fSmrg])# AC_LIBTOOL_LANG_C_CONFIG 3894b042e37fSmrg 3895b042e37fSmrg 3896b042e37fSmrg# AC_LIBTOOL_LANG_CXX_CONFIG 3897b042e37fSmrg# -------------------------- 3898b042e37fSmrg# Ensure that the configuration vars for the C compiler are 3899b042e37fSmrg# suitably defined. Those variables are subsequently used by 3900b042e37fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 3901b042e37fSmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 3902b042e37fSmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 3903b042e37fSmrg[AC_LANG_PUSH(C++) 3904b042e37fSmrgAC_REQUIRE([AC_PROG_CXX]) 3905b042e37fSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 3906b042e37fSmrg 3907b042e37fSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3908b042e37fSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 3909b042e37fSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 3910b042e37fSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 3911b042e37fSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 3912b042e37fSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 3913b042e37fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 3914b042e37fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 3915b042e37fSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 3916b042e37fSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 3917b042e37fSmrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3918b042e37fSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 3919b042e37fSmrg_LT_AC_TAGVAR(module_cmds, $1)= 3920b042e37fSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 3921b042e37fSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 3922b042e37fSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 3923b042e37fSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 3924b042e37fSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 3925b042e37fSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 3926b042e37fSmrg 3927b042e37fSmrg# Dependencies to place before and after the object being linked: 3928b042e37fSmrg_LT_AC_TAGVAR(predep_objects, $1)= 3929b042e37fSmrg_LT_AC_TAGVAR(postdep_objects, $1)= 3930b042e37fSmrg_LT_AC_TAGVAR(predeps, $1)= 3931b042e37fSmrg_LT_AC_TAGVAR(postdeps, $1)= 3932b042e37fSmrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 3933b042e37fSmrg 3934b042e37fSmrg# Source file extension for C++ test sources. 3935b042e37fSmrgac_ext=cpp 3936b042e37fSmrg 3937b042e37fSmrg# Object file extension for compiled C++ test sources. 3938b042e37fSmrgobjext=o 3939b042e37fSmrg_LT_AC_TAGVAR(objext, $1)=$objext 3940b042e37fSmrg 3941b042e37fSmrg# Code to be used in simple compile tests 3942b042e37fSmrglt_simple_compile_test_code="int some_variable = 0;\n" 3943b042e37fSmrg 3944b042e37fSmrg# Code to be used in simple link tests 3945b042e37fSmrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' 3946b042e37fSmrg 3947b042e37fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 3948b042e37fSmrg_LT_AC_SYS_COMPILER 3949b042e37fSmrg 3950b042e37fSmrg# save warnings/boilerplate of simple test code 3951b042e37fSmrg_LT_COMPILER_BOILERPLATE 3952b042e37fSmrg_LT_LINKER_BOILERPLATE 3953b042e37fSmrg 3954b042e37fSmrg# Allow CC to be a program name with arguments. 3955b042e37fSmrglt_save_CC=$CC 3956b042e37fSmrglt_save_LD=$LD 3957b042e37fSmrglt_save_GCC=$GCC 3958b042e37fSmrgGCC=$GXX 3959b042e37fSmrglt_save_with_gnu_ld=$with_gnu_ld 3960b042e37fSmrglt_save_path_LD=$lt_cv_path_LD 3961b042e37fSmrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 3962b042e37fSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 3963b042e37fSmrgelse 3964b042e37fSmrg $as_unset lt_cv_prog_gnu_ld 3965b042e37fSmrgfi 3966b042e37fSmrgif test -n "${lt_cv_path_LDCXX+set}"; then 3967b042e37fSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 3968b042e37fSmrgelse 3969b042e37fSmrg $as_unset lt_cv_path_LD 3970b042e37fSmrgfi 3971b042e37fSmrgtest -z "${LDCXX+set}" || LD=$LDCXX 3972b042e37fSmrgCC=${CXX-"c++"} 3973b042e37fSmrgcompiler=$CC 3974b042e37fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 3975b042e37fSmrg_LT_CC_BASENAME([$compiler]) 3976b042e37fSmrg 3977b042e37fSmrg# We don't want -fno-exception wen compiling C++ code, so set the 3978b042e37fSmrg# no_builtin_flag separately 3979b042e37fSmrgif test "$GXX" = yes; then 3980b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 3981b042e37fSmrgelse 3982b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3983b042e37fSmrgfi 3984b042e37fSmrg 3985b042e37fSmrgif test "$GXX" = yes; then 3986b042e37fSmrg # Set up default GNU C++ configuration 3987b042e37fSmrg 3988b042e37fSmrg AC_PROG_LD 3989b042e37fSmrg 3990b042e37fSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 3991b042e37fSmrg # archiving commands below assume that GNU ld is being used. 3992b042e37fSmrg if test "$with_gnu_ld" = yes; then 3993b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3994b042e37fSmrg _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' 3995b042e37fSmrg 3996b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 3997b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3998b042e37fSmrg 3999b042e37fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 4000b042e37fSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 4001b042e37fSmrg # investigate it a little bit more. (MM) 4002b042e37fSmrg wlarc='${wl}' 4003b042e37fSmrg 4004b042e37fSmrg # ancient GNU ld didn't support --whole-archive et. al. 4005b042e37fSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 4006b042e37fSmrg grep 'no-whole-archive' > /dev/null; then 4007b042e37fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4008b042e37fSmrg else 4009b042e37fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4010b042e37fSmrg fi 4011b042e37fSmrg else 4012b042e37fSmrg with_gnu_ld=no 4013b042e37fSmrg wlarc= 4014b042e37fSmrg 4015b042e37fSmrg # A generic and very simple default shared library creation 4016b042e37fSmrg # command for GNU C++ for the case where it uses the native 4017b042e37fSmrg # linker, instead of GNU ld. If possible, this setting should 4018b042e37fSmrg # overridden to take advantage of the native linker features on 4019b042e37fSmrg # the platform it is being used on. 4020b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 4021b042e37fSmrg fi 4022b042e37fSmrg 4023b042e37fSmrg # Commands to make compiler produce verbose output that lists 4024b042e37fSmrg # what "hidden" libraries, object files and flags are used when 4025b042e37fSmrg # linking a shared library. 4026b042e37fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 4027b042e37fSmrg 4028b042e37fSmrgelse 4029b042e37fSmrg GXX=no 4030b042e37fSmrg with_gnu_ld=no 4031b042e37fSmrg wlarc= 4032b042e37fSmrgfi 4033b042e37fSmrg 4034b042e37fSmrg# PORTME: fill in a description of your system's C++ link characteristics 4035b042e37fSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4036b042e37fSmrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 4037b042e37fSmrgcase $host_os in 4038b042e37fSmrg aix3*) 4039b042e37fSmrg # FIXME: insert proper C++ library support 4040b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4041b042e37fSmrg ;; 4042b042e37fSmrg aix4* | aix5*) 4043b042e37fSmrg if test "$host_cpu" = ia64; then 4044b042e37fSmrg # On IA64, the linker does run time linking by default, so we don't 4045b042e37fSmrg # have to do anything special. 4046b042e37fSmrg aix_use_runtimelinking=no 4047b042e37fSmrg exp_sym_flag='-Bexport' 4048b042e37fSmrg no_entry_flag="" 4049b042e37fSmrg else 4050b042e37fSmrg aix_use_runtimelinking=no 4051b042e37fSmrg 4052b042e37fSmrg # Test if we are trying to use run time linking or normal 4053b042e37fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4054b042e37fSmrg # need to do runtime linking. 4055b042e37fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 4056b042e37fSmrg for ld_flag in $LDFLAGS; do 4057b042e37fSmrg case $ld_flag in 4058b042e37fSmrg *-brtl*) 4059b042e37fSmrg aix_use_runtimelinking=yes 4060b042e37fSmrg break 4061b042e37fSmrg ;; 4062b042e37fSmrg esac 4063b042e37fSmrg done 4064b042e37fSmrg ;; 4065b042e37fSmrg esac 4066b042e37fSmrg 4067b042e37fSmrg exp_sym_flag='-bexport' 4068b042e37fSmrg no_entry_flag='-bnoentry' 4069b042e37fSmrg fi 4070b042e37fSmrg 4071b042e37fSmrg # When large executables or shared objects are built, AIX ld can 4072b042e37fSmrg # have problems creating the table of contents. If linking a library 4073b042e37fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 4074b042e37fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 4075b042e37fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4076b042e37fSmrg 4077b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 4078b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4079b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 4080b042e37fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 4081b042e37fSmrg 4082b042e37fSmrg if test "$GXX" = yes; then 4083b042e37fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 4084b042e37fSmrg # We only want to do this on AIX 4.2 and lower, the check 4085b042e37fSmrg # below for broken collect2 doesn't work under 4.3+ 4086b042e37fSmrg collect2name=`${CC} -print-prog-name=collect2` 4087b042e37fSmrg if test -f "$collect2name" && \ 4088b042e37fSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 4089b042e37fSmrg then 4090b042e37fSmrg # We have reworked collect2 4091b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4092b042e37fSmrg else 4093b042e37fSmrg # We have old collect2 4094b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 4095b042e37fSmrg # It fails to find uninstalled libraries when the uninstalled 4096b042e37fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 4097b042e37fSmrg # to unsupported forces relinking 4098b042e37fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 4099b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4100b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 4101b042e37fSmrg fi 4102b042e37fSmrg ;; 4103b042e37fSmrg esac 4104b042e37fSmrg shared_flag='-shared' 4105b042e37fSmrg if test "$aix_use_runtimelinking" = yes; then 4106b042e37fSmrg shared_flag="$shared_flag "'${wl}-G' 4107b042e37fSmrg fi 4108b042e37fSmrg else 4109b042e37fSmrg # not using gcc 4110b042e37fSmrg if test "$host_cpu" = ia64; then 4111b042e37fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 4112b042e37fSmrg # chokes on -Wl,-G. The following line is correct: 4113b042e37fSmrg shared_flag='-G' 4114b042e37fSmrg else 4115b042e37fSmrg if test "$aix_use_runtimelinking" = yes; then 4116b042e37fSmrg shared_flag='${wl}-G' 4117b042e37fSmrg else 4118b042e37fSmrg shared_flag='${wl}-bM:SRE' 4119b042e37fSmrg fi 4120b042e37fSmrg fi 4121b042e37fSmrg fi 4122b042e37fSmrg 4123b042e37fSmrg # It seems that -bexpall does not export symbols beginning with 4124b042e37fSmrg # underscore (_), so it is better to generate a list of symbols to export. 4125b042e37fSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 4126b042e37fSmrg if test "$aix_use_runtimelinking" = yes; then 4127b042e37fSmrg # Warning - without using the other runtime loading flags (-brtl), 4128b042e37fSmrg # -berok will link without error, but may produce a broken library. 4129b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 4130b042e37fSmrg # Determine the default libpath from the value encoded in an empty executable. 4131b042e37fSmrg _LT_AC_SYS_LIBPATH_AIX 4132b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4133b042e37fSmrg 4134b042e37fSmrg _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" 4135b042e37fSmrg else 4136b042e37fSmrg if test "$host_cpu" = ia64; then 4137b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 4138b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 4139b042e37fSmrg _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" 4140b042e37fSmrg else 4141b042e37fSmrg # Determine the default libpath from the value encoded in an empty executable. 4142b042e37fSmrg _LT_AC_SYS_LIBPATH_AIX 4143b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4144b042e37fSmrg # Warning - without using the other run time loading flags, 4145b042e37fSmrg # -berok will link without error, but may produce a broken library. 4146b042e37fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 4147b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 4148b042e37fSmrg # Exported symbols can be pulled into shared objects from archives 4149b042e37fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 4150b042e37fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 4151b042e37fSmrg # This is similar to how AIX traditionally builds its shared libraries. 4152b042e37fSmrg _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' 4153b042e37fSmrg fi 4154b042e37fSmrg fi 4155b042e37fSmrg ;; 4156b042e37fSmrg 4157b042e37fSmrg beos*) 4158b042e37fSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 4159b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 4160b042e37fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4161b042e37fSmrg # support --undefined. This deserves some investigation. FIXME 4162b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4163b042e37fSmrg else 4164b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4165b042e37fSmrg fi 4166b042e37fSmrg ;; 4167b042e37fSmrg 4168b042e37fSmrg chorus*) 4169b042e37fSmrg case $cc_basename in 4170b042e37fSmrg *) 4171b042e37fSmrg # FIXME: insert proper C++ library support 4172b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4173b042e37fSmrg ;; 4174b042e37fSmrg esac 4175b042e37fSmrg ;; 4176b042e37fSmrg 4177b042e37fSmrg cygwin* | mingw* | pw32*) 4178b042e37fSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4179b042e37fSmrg # as there is no search path for DLLs. 4180b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4181b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 4182b042e37fSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 4183b042e37fSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4184b042e37fSmrg 4185b042e37fSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 4186b042e37fSmrg _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' 4187b042e37fSmrg # If the export-symbols file already is a .def file (1st line 4188b042e37fSmrg # is EXPORTS), use it as is; otherwise, prepend... 4189b042e37fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4190b042e37fSmrg cp $export_symbols $output_objdir/$soname.def; 4191b042e37fSmrg else 4192b042e37fSmrg echo EXPORTS > $output_objdir/$soname.def; 4193b042e37fSmrg cat $export_symbols >> $output_objdir/$soname.def; 4194b042e37fSmrg fi~ 4195b042e37fSmrg $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' 4196b042e37fSmrg else 4197b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4198b042e37fSmrg fi 4199b042e37fSmrg ;; 4200b042e37fSmrg darwin* | rhapsody*) 4201b042e37fSmrg case $host_os in 4202b042e37fSmrg rhapsody* | darwin1.[[012]]) 4203b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 4204b042e37fSmrg ;; 4205b042e37fSmrg *) # Darwin 1.3 on 4206b042e37fSmrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 4207b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 4208b042e37fSmrg else 4209b042e37fSmrg case ${MACOSX_DEPLOYMENT_TARGET} in 4210b042e37fSmrg 10.[[012]]) 4211b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 4212b042e37fSmrg ;; 4213b042e37fSmrg 10.*) 4214b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 4215b042e37fSmrg ;; 4216b042e37fSmrg esac 4217b042e37fSmrg fi 4218b042e37fSmrg ;; 4219b042e37fSmrg esac 4220b042e37fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4221b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 4222b042e37fSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 4223b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4224b042e37fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 4225b042e37fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 4226b042e37fSmrg 4227b042e37fSmrg if test "$GXX" = yes ; then 4228b042e37fSmrg lt_int_apple_cc_single_mod=no 4229b042e37fSmrg output_verbose_link_cmd='echo' 4230b042e37fSmrg if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 4231b042e37fSmrg lt_int_apple_cc_single_mod=yes 4232b042e37fSmrg fi 4233b042e37fSmrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 4234b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 4235b042e37fSmrg else 4236b042e37fSmrg _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' 4237b042e37fSmrg fi 4238b042e37fSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 4239b042e37fSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 4240b042e37fSmrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 4241b042e37fSmrg _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}' 4242b042e37fSmrg else 4243b042e37fSmrg _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}' 4244b042e37fSmrg fi 4245b042e37fSmrg _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}' 4246b042e37fSmrg else 4247b042e37fSmrg case $cc_basename in 4248b042e37fSmrg xlc*) 4249b042e37fSmrg output_verbose_link_cmd='echo' 4250b042e37fSmrg _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' 4251b042e37fSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 4252b042e37fSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 4253b042e37fSmrg _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}' 4254b042e37fSmrg _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}' 4255b042e37fSmrg ;; 4256b042e37fSmrg *) 4257b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4258b042e37fSmrg ;; 4259b042e37fSmrg esac 4260b042e37fSmrg fi 4261b042e37fSmrg ;; 4262b042e37fSmrg 4263b042e37fSmrg dgux*) 4264b042e37fSmrg case $cc_basename in 4265b042e37fSmrg ec++*) 4266b042e37fSmrg # FIXME: insert proper C++ library support 4267b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4268b042e37fSmrg ;; 4269b042e37fSmrg ghcx*) 4270b042e37fSmrg # Green Hills C++ Compiler 4271b042e37fSmrg # FIXME: insert proper C++ library support 4272b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4273b042e37fSmrg ;; 4274b042e37fSmrg *) 4275b042e37fSmrg # FIXME: insert proper C++ library support 4276b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4277b042e37fSmrg ;; 4278b042e37fSmrg esac 4279b042e37fSmrg ;; 4280b042e37fSmrg freebsd[[12]]*) 4281b042e37fSmrg # C++ shared libraries reported to be fairly broken before switch to ELF 4282b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4283b042e37fSmrg ;; 4284b042e37fSmrg freebsd-elf*) 4285b042e37fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4286b042e37fSmrg ;; 4287b042e37fSmrg freebsd* | kfreebsd*-gnu | dragonfly*) 4288b042e37fSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 4289b042e37fSmrg # conventions 4290b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 4291b042e37fSmrg ;; 4292b042e37fSmrg gnu*) 4293b042e37fSmrg ;; 4294b042e37fSmrg hpux9*) 4295b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4296b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4297b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4298b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4299b042e37fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 4300b042e37fSmrg # but as the default 4301b042e37fSmrg # location of the library. 4302b042e37fSmrg 4303b042e37fSmrg case $cc_basename in 4304b042e37fSmrg CC*) 4305b042e37fSmrg # FIXME: insert proper C++ library support 4306b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4307b042e37fSmrg ;; 4308b042e37fSmrg aCC*) 4309b042e37fSmrg _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' 4310b042e37fSmrg # Commands to make compiler produce verbose output that lists 4311b042e37fSmrg # what "hidden" libraries, object files and flags are used when 4312b042e37fSmrg # linking a shared library. 4313b042e37fSmrg # 4314b042e37fSmrg # There doesn't appear to be a way to prevent this compiler from 4315b042e37fSmrg # explicitly linking system object files so we need to strip them 4316b042e37fSmrg # from the output so that they don't get included in the library 4317b042e37fSmrg # dependencies. 4318b042e37fSmrg 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' 4319b042e37fSmrg ;; 4320b042e37fSmrg *) 4321b042e37fSmrg if test "$GXX" = yes; then 4322b042e37fSmrg _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' 4323b042e37fSmrg else 4324b042e37fSmrg # FIXME: insert proper C++ library support 4325b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4326b042e37fSmrg fi 4327b042e37fSmrg ;; 4328b042e37fSmrg esac 4329b042e37fSmrg ;; 4330b042e37fSmrg hpux10*|hpux11*) 4331b042e37fSmrg if test $with_gnu_ld = no; then 4332b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4333b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4334b042e37fSmrg 4335b042e37fSmrg case $host_cpu in 4336b042e37fSmrg hppa*64*|ia64*) 4337b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 4338b042e37fSmrg ;; 4339b042e37fSmrg *) 4340b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4341b042e37fSmrg ;; 4342b042e37fSmrg esac 4343b042e37fSmrg fi 4344b042e37fSmrg case $host_cpu in 4345b042e37fSmrg hppa*64*|ia64*) 4346b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 4347b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4348b042e37fSmrg ;; 4349b042e37fSmrg *) 4350b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4351b042e37fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 4352b042e37fSmrg # but as the default 4353b042e37fSmrg # location of the library. 4354b042e37fSmrg ;; 4355b042e37fSmrg esac 4356b042e37fSmrg 4357b042e37fSmrg case $cc_basename in 4358b042e37fSmrg CC*) 4359b042e37fSmrg # FIXME: insert proper C++ library support 4360b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4361b042e37fSmrg ;; 4362b042e37fSmrg aCC*) 4363b042e37fSmrg case $host_cpu in 4364b042e37fSmrg hppa*64*) 4365b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 4366b042e37fSmrg ;; 4367b042e37fSmrg ia64*) 4368b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 4369b042e37fSmrg ;; 4370b042e37fSmrg *) 4371b042e37fSmrg _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' 4372b042e37fSmrg ;; 4373b042e37fSmrg esac 4374b042e37fSmrg # Commands to make compiler produce verbose output that lists 4375b042e37fSmrg # what "hidden" libraries, object files and flags are used when 4376b042e37fSmrg # linking a shared library. 4377b042e37fSmrg # 4378b042e37fSmrg # There doesn't appear to be a way to prevent this compiler from 4379b042e37fSmrg # explicitly linking system object files so we need to strip them 4380b042e37fSmrg # from the output so that they don't get included in the library 4381b042e37fSmrg # dependencies. 4382b042e37fSmrg 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' 4383b042e37fSmrg ;; 4384b042e37fSmrg *) 4385b042e37fSmrg if test "$GXX" = yes; then 4386b042e37fSmrg if test $with_gnu_ld = no; then 4387b042e37fSmrg case $host_cpu in 4388b042e37fSmrg hppa*64*) 4389b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 4390b042e37fSmrg ;; 4391b042e37fSmrg ia64*) 4392b042e37fSmrg _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' 4393b042e37fSmrg ;; 4394b042e37fSmrg *) 4395b042e37fSmrg _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' 4396b042e37fSmrg ;; 4397b042e37fSmrg esac 4398b042e37fSmrg fi 4399b042e37fSmrg else 4400b042e37fSmrg # FIXME: insert proper C++ library support 4401b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4402b042e37fSmrg fi 4403b042e37fSmrg ;; 4404b042e37fSmrg esac 4405b042e37fSmrg ;; 4406b042e37fSmrg interix3*) 4407b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 4408b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4409b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4410b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4411b042e37fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4412b042e37fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4413b042e37fSmrg # default) and relocated if they conflict, which is a slow very memory 4414b042e37fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 4415b042e37fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4416b042e37fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4417b042e37fSmrg _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' 4418b042e37fSmrg _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' 4419b042e37fSmrg ;; 4420b042e37fSmrg irix5* | irix6*) 4421b042e37fSmrg case $cc_basename in 4422b042e37fSmrg CC*) 4423b042e37fSmrg # SGI C++ 4424b042e37fSmrg _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' 4425b042e37fSmrg 4426b042e37fSmrg # Archives containing C++ object files must be created using 4427b042e37fSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 4428b042e37fSmrg # necessary to make sure instantiated templates are included 4429b042e37fSmrg # in the archive. 4430b042e37fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 4431b042e37fSmrg ;; 4432b042e37fSmrg *) 4433b042e37fSmrg if test "$GXX" = yes; then 4434b042e37fSmrg if test "$with_gnu_ld" = no; then 4435b042e37fSmrg _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' 4436b042e37fSmrg else 4437b042e37fSmrg _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' 4438b042e37fSmrg fi 4439b042e37fSmrg fi 4440b042e37fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 4441b042e37fSmrg ;; 4442b042e37fSmrg esac 4443b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4444b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4445b042e37fSmrg ;; 4446b042e37fSmrg linux*) 4447b042e37fSmrg case $cc_basename in 4448b042e37fSmrg KCC*) 4449b042e37fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 4450b042e37fSmrg 4451b042e37fSmrg # KCC will only create a shared library if the output file 4452b042e37fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 4453b042e37fSmrg # to its proper name (with version) after linking. 4454b042e37fSmrg _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' 4455b042e37fSmrg _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' 4456b042e37fSmrg # Commands to make compiler produce verbose output that lists 4457b042e37fSmrg # what "hidden" libraries, object files and flags are used when 4458b042e37fSmrg # linking a shared library. 4459b042e37fSmrg # 4460b042e37fSmrg # There doesn't appear to be a way to prevent this compiler from 4461b042e37fSmrg # explicitly linking system object files so we need to strip them 4462b042e37fSmrg # from the output so that they don't get included in the library 4463b042e37fSmrg # dependencies. 4464b042e37fSmrg 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' 4465b042e37fSmrg 4466b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 4467b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4468b042e37fSmrg 4469b042e37fSmrg # Archives containing C++ object files must be created using 4470b042e37fSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 4471b042e37fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 4472b042e37fSmrg ;; 4473b042e37fSmrg icpc*) 4474b042e37fSmrg # Intel C++ 4475b042e37fSmrg with_gnu_ld=yes 4476b042e37fSmrg # version 8.0 and above of icpc choke on multiply defined symbols 4477b042e37fSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 4478b042e37fSmrg # earlier do not add the objects themselves. 4479b042e37fSmrg case `$CC -V 2>&1` in 4480b042e37fSmrg *"Version 7."*) 4481b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 4482b042e37fSmrg _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' 4483b042e37fSmrg ;; 4484b042e37fSmrg *) # Version 8.0 or newer 4485b042e37fSmrg tmp_idyn= 4486b042e37fSmrg case $host_cpu in 4487b042e37fSmrg ia64*) tmp_idyn=' -i_dynamic';; 4488b042e37fSmrg esac 4489b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4490b042e37fSmrg _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' 4491b042e37fSmrg ;; 4492b042e37fSmrg esac 4493b042e37fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4494b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4495b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4496b042e37fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 4497b042e37fSmrg ;; 4498b042e37fSmrg pgCC*) 4499b042e37fSmrg # Portland Group C++ compiler 4500b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 4501b042e37fSmrg _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' 4502b042e37fSmrg 4503b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 4504b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4505b042e37fSmrg _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' 4506b042e37fSmrg ;; 4507b042e37fSmrg cxx*) 4508b042e37fSmrg # Compaq C++ 4509b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 4510b042e37fSmrg _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' 4511b042e37fSmrg 4512b042e37fSmrg runpath_var=LD_RUN_PATH 4513b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 4514b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4515b042e37fSmrg 4516b042e37fSmrg # Commands to make compiler produce verbose output that lists 4517b042e37fSmrg # what "hidden" libraries, object files and flags are used when 4518b042e37fSmrg # linking a shared library. 4519b042e37fSmrg # 4520b042e37fSmrg # There doesn't appear to be a way to prevent this compiler from 4521b042e37fSmrg # explicitly linking system object files so we need to strip them 4522b042e37fSmrg # from the output so that they don't get included in the library 4523b042e37fSmrg # dependencies. 4524b042e37fSmrg 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' 4525b042e37fSmrg ;; 4526b042e37fSmrg esac 4527b042e37fSmrg ;; 4528b042e37fSmrg lynxos*) 4529b042e37fSmrg # FIXME: insert proper C++ library support 4530b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4531b042e37fSmrg ;; 4532b042e37fSmrg m88k*) 4533b042e37fSmrg # FIXME: insert proper C++ library support 4534b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4535b042e37fSmrg ;; 4536b042e37fSmrg mvs*) 4537b042e37fSmrg case $cc_basename in 4538b042e37fSmrg cxx*) 4539b042e37fSmrg # FIXME: insert proper C++ library support 4540b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4541b042e37fSmrg ;; 4542b042e37fSmrg *) 4543b042e37fSmrg # FIXME: insert proper C++ library support 4544b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4545b042e37fSmrg ;; 4546b042e37fSmrg esac 4547b042e37fSmrg ;; 4548b042e37fSmrg netbsd*) 4549b042e37fSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 4550b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 4551b042e37fSmrg wlarc= 4552b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4553b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4554b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4555b042e37fSmrg fi 4556b042e37fSmrg # Workaround some broken pre-1.5 toolchains 4557b042e37fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 4558b042e37fSmrg ;; 4559b042e37fSmrg openbsd2*) 4560b042e37fSmrg # C++ shared libraries are fairly broken 4561b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4562b042e37fSmrg ;; 4563b042e37fSmrg openbsd*) 4564b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4565b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4566b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 4567b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4568b042e37fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4569b042e37fSmrg _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' 4570b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4571b042e37fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4572b042e37fSmrg fi 4573b042e37fSmrg output_verbose_link_cmd='echo' 4574b042e37fSmrg ;; 4575b042e37fSmrg osf3*) 4576b042e37fSmrg case $cc_basename in 4577b042e37fSmrg KCC*) 4578b042e37fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 4579b042e37fSmrg 4580b042e37fSmrg # KCC will only create a shared library if the output file 4581b042e37fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 4582b042e37fSmrg # to its proper name (with version) after linking. 4583b042e37fSmrg _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' 4584b042e37fSmrg 4585b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4586b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4587b042e37fSmrg 4588b042e37fSmrg # Archives containing C++ object files must be created using 4589b042e37fSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 4590b042e37fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 4591b042e37fSmrg 4592b042e37fSmrg ;; 4593b042e37fSmrg RCC*) 4594b042e37fSmrg # Rational C++ 2.4.1 4595b042e37fSmrg # FIXME: insert proper C++ library support 4596b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4597b042e37fSmrg ;; 4598b042e37fSmrg cxx*) 4599b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4600b042e37fSmrg _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' 4601b042e37fSmrg 4602b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4603b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4604b042e37fSmrg 4605b042e37fSmrg # Commands to make compiler produce verbose output that lists 4606b042e37fSmrg # what "hidden" libraries, object files and flags are used when 4607b042e37fSmrg # linking a shared library. 4608b042e37fSmrg # 4609b042e37fSmrg # There doesn't appear to be a way to prevent this compiler from 4610b042e37fSmrg # explicitly linking system object files so we need to strip them 4611b042e37fSmrg # from the output so that they don't get included in the library 4612b042e37fSmrg # dependencies. 4613b042e37fSmrg 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' 4614b042e37fSmrg ;; 4615b042e37fSmrg *) 4616b042e37fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 4617b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4618b042e37fSmrg _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' 4619b042e37fSmrg 4620b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4621b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4622b042e37fSmrg 4623b042e37fSmrg # Commands to make compiler produce verbose output that lists 4624b042e37fSmrg # what "hidden" libraries, object files and flags are used when 4625b042e37fSmrg # linking a shared library. 4626b042e37fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 4627b042e37fSmrg 4628b042e37fSmrg else 4629b042e37fSmrg # FIXME: insert proper C++ library support 4630b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4631b042e37fSmrg fi 4632b042e37fSmrg ;; 4633b042e37fSmrg esac 4634b042e37fSmrg ;; 4635b042e37fSmrg osf4* | osf5*) 4636b042e37fSmrg case $cc_basename in 4637b042e37fSmrg KCC*) 4638b042e37fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 4639b042e37fSmrg 4640b042e37fSmrg # KCC will only create a shared library if the output file 4641b042e37fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 4642b042e37fSmrg # to its proper name (with version) after linking. 4643b042e37fSmrg _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' 4644b042e37fSmrg 4645b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4646b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4647b042e37fSmrg 4648b042e37fSmrg # Archives containing C++ object files must be created using 4649b042e37fSmrg # the KAI C++ compiler. 4650b042e37fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 4651b042e37fSmrg ;; 4652b042e37fSmrg RCC*) 4653b042e37fSmrg # Rational C++ 2.4.1 4654b042e37fSmrg # FIXME: insert proper C++ library support 4655b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4656b042e37fSmrg ;; 4657b042e37fSmrg cxx*) 4658b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 4659b042e37fSmrg _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' 4660b042e37fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 4661b042e37fSmrg echo "-hidden">> $lib.exp~ 4662b042e37fSmrg $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~ 4663b042e37fSmrg $rm $lib.exp' 4664b042e37fSmrg 4665b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 4666b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4667b042e37fSmrg 4668b042e37fSmrg # Commands to make compiler produce verbose output that lists 4669b042e37fSmrg # what "hidden" libraries, object files and flags are used when 4670b042e37fSmrg # linking a shared library. 4671b042e37fSmrg # 4672b042e37fSmrg # There doesn't appear to be a way to prevent this compiler from 4673b042e37fSmrg # explicitly linking system object files so we need to strip them 4674b042e37fSmrg # from the output so that they don't get included in the library 4675b042e37fSmrg # dependencies. 4676b042e37fSmrg 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' 4677b042e37fSmrg ;; 4678b042e37fSmrg *) 4679b042e37fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 4680b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4681b042e37fSmrg _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' 4682b042e37fSmrg 4683b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4684b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4685b042e37fSmrg 4686b042e37fSmrg # Commands to make compiler produce verbose output that lists 4687b042e37fSmrg # what "hidden" libraries, object files and flags are used when 4688b042e37fSmrg # linking a shared library. 4689b042e37fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 4690b042e37fSmrg 4691b042e37fSmrg else 4692b042e37fSmrg # FIXME: insert proper C++ library support 4693b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4694b042e37fSmrg fi 4695b042e37fSmrg ;; 4696b042e37fSmrg esac 4697b042e37fSmrg ;; 4698b042e37fSmrg psos*) 4699b042e37fSmrg # FIXME: insert proper C++ library support 4700b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4701b042e37fSmrg ;; 4702b042e37fSmrg sunos4*) 4703b042e37fSmrg case $cc_basename in 4704b042e37fSmrg CC*) 4705b042e37fSmrg # Sun C++ 4.x 4706b042e37fSmrg # FIXME: insert proper C++ library support 4707b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4708b042e37fSmrg ;; 4709b042e37fSmrg lcc*) 4710b042e37fSmrg # Lucid 4711b042e37fSmrg # FIXME: insert proper C++ library support 4712b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4713b042e37fSmrg ;; 4714b042e37fSmrg *) 4715b042e37fSmrg # FIXME: insert proper C++ library support 4716b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4717b042e37fSmrg ;; 4718b042e37fSmrg esac 4719b042e37fSmrg ;; 4720b042e37fSmrg solaris*) 4721b042e37fSmrg case $cc_basename in 4722b042e37fSmrg CC*) 4723b042e37fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 4724b042e37fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 4725b042e37fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 4726b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 4727b042e37fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 4728b042e37fSmrg $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' 4729b042e37fSmrg 4730b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4731b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4732b042e37fSmrg case $host_os in 4733b042e37fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 4734b042e37fSmrg *) 4735b042e37fSmrg # The C++ compiler is used as linker so we must use $wl 4736b042e37fSmrg # flag to pass the commands to the underlying system 4737b042e37fSmrg # linker. We must also pass each convience library through 4738b042e37fSmrg # to the system linker between allextract/defaultextract. 4739b042e37fSmrg # The C++ compiler will combine linker options so we 4740b042e37fSmrg # cannot just pass the convience library names through 4741b042e37fSmrg # without $wl. 4742b042e37fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 4743b042e37fSmrg _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' 4744b042e37fSmrg ;; 4745b042e37fSmrg esac 4746b042e37fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 4747b042e37fSmrg 4748b042e37fSmrg output_verbose_link_cmd='echo' 4749b042e37fSmrg 4750b042e37fSmrg # Archives containing C++ object files must be created using 4751b042e37fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 4752b042e37fSmrg # necessary to make sure instantiated templates are included 4753b042e37fSmrg # in the archive. 4754b042e37fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 4755b042e37fSmrg ;; 4756b042e37fSmrg gcx*) 4757b042e37fSmrg # Green Hills C++ Compiler 4758b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 4759b042e37fSmrg 4760b042e37fSmrg # The C++ compiler must be used to create the archive. 4761b042e37fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 4762b042e37fSmrg ;; 4763b042e37fSmrg *) 4764b042e37fSmrg # GNU C++ compiler with Solaris linker 4765b042e37fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 4766b042e37fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 4767b042e37fSmrg if $CC --version | grep -v '^2\.7' > /dev/null; then 4768b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 4769b042e37fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 4770b042e37fSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 4771b042e37fSmrg 4772b042e37fSmrg # Commands to make compiler produce verbose output that lists 4773b042e37fSmrg # what "hidden" libraries, object files and flags are used when 4774b042e37fSmrg # linking a shared library. 4775b042e37fSmrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 4776b042e37fSmrg else 4777b042e37fSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 4778b042e37fSmrg # platform. 4779b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 4780b042e37fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 4781b042e37fSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 4782b042e37fSmrg 4783b042e37fSmrg # Commands to make compiler produce verbose output that lists 4784b042e37fSmrg # what "hidden" libraries, object files and flags are used when 4785b042e37fSmrg # linking a shared library. 4786b042e37fSmrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 4787b042e37fSmrg fi 4788b042e37fSmrg 4789b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 4790b042e37fSmrg fi 4791b042e37fSmrg ;; 4792b042e37fSmrg esac 4793b042e37fSmrg ;; 4794b042e37fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 4795b042e37fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 4796b042e37fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4797b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4798b042e37fSmrg runpath_var='LD_RUN_PATH' 4799b042e37fSmrg 4800b042e37fSmrg case $cc_basename in 4801b042e37fSmrg CC*) 4802b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 4803b042e37fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 4804b042e37fSmrg ;; 4805b042e37fSmrg *) 4806b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 4807b042e37fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 4808b042e37fSmrg ;; 4809b042e37fSmrg esac 4810b042e37fSmrg ;; 4811b042e37fSmrg sysv5* | sco3.2v5* | sco5v6*) 4812b042e37fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 4813b042e37fSmrg # link with -lc, and that would cause any symbols used from libc to 4814b042e37fSmrg # always be unresolved, which means just about no library would 4815b042e37fSmrg # ever link correctly. If we're not using GNU ld we use -z text 4816b042e37fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 4817b042e37fSmrg # as -z defs. 4818b042e37fSmrg # For security reasons, it is highly recommended that you always 4819b042e37fSmrg # use absolute paths for naming shared libraries, and exclude the 4820b042e37fSmrg # DT_RUNPATH tag from executables and libraries. But doing so 4821b042e37fSmrg # requires that you compile everything twice, which is a pain. 4822b042e37fSmrg # So that behaviour is only enabled if SCOABSPATH is set to a 4823b042e37fSmrg # non-empty value in the environment. Most likely only useful for 4824b042e37fSmrg # creating official distributions of packages. 4825b042e37fSmrg # This is a hack until libtool officially supports absolute path 4826b042e37fSmrg # names for shared libraries. 4827b042e37fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 4828b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 4829b042e37fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4830b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4831b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 4832b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 4833b042e37fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 4834b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 4835b042e37fSmrg runpath_var='LD_RUN_PATH' 4836b042e37fSmrg 4837b042e37fSmrg case $cc_basename in 4838b042e37fSmrg CC*) 4839b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 4840b042e37fSmrg _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' 4841b042e37fSmrg ;; 4842b042e37fSmrg *) 4843b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 4844b042e37fSmrg _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' 4845b042e37fSmrg ;; 4846b042e37fSmrg esac 4847b042e37fSmrg ;; 4848b042e37fSmrg tandem*) 4849b042e37fSmrg case $cc_basename in 4850b042e37fSmrg NCC*) 4851b042e37fSmrg # NonStop-UX NCC 3.20 4852b042e37fSmrg # FIXME: insert proper C++ library support 4853b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4854b042e37fSmrg ;; 4855b042e37fSmrg *) 4856b042e37fSmrg # FIXME: insert proper C++ library support 4857b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4858b042e37fSmrg ;; 4859b042e37fSmrg esac 4860b042e37fSmrg ;; 4861b042e37fSmrg vxworks*) 4862b042e37fSmrg # FIXME: insert proper C++ library support 4863b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4864b042e37fSmrg ;; 4865b042e37fSmrg *) 4866b042e37fSmrg # FIXME: insert proper C++ library support 4867b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4868b042e37fSmrg ;; 4869b042e37fSmrgesac 4870b042e37fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 4871b042e37fSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 4872b042e37fSmrg 4873b042e37fSmrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 4874b042e37fSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 4875b042e37fSmrg 4876b042e37fSmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 4877b042e37fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 4878b042e37fSmrgAC_LIBTOOL_PROG_CC_C_O($1) 4879b042e37fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4880b042e37fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4881b042e37fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4882b042e37fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4883b042e37fSmrg 4884b042e37fSmrgAC_LIBTOOL_CONFIG($1) 4885b042e37fSmrg 4886b042e37fSmrgAC_LANG_POP 4887b042e37fSmrgCC=$lt_save_CC 4888b042e37fSmrgLDCXX=$LD 4889b042e37fSmrgLD=$lt_save_LD 4890b042e37fSmrgGCC=$lt_save_GCC 4891b042e37fSmrgwith_gnu_ldcxx=$with_gnu_ld 4892b042e37fSmrgwith_gnu_ld=$lt_save_with_gnu_ld 4893b042e37fSmrglt_cv_path_LDCXX=$lt_cv_path_LD 4894b042e37fSmrglt_cv_path_LD=$lt_save_path_LD 4895b042e37fSmrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 4896b042e37fSmrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 4897b042e37fSmrg])# AC_LIBTOOL_LANG_CXX_CONFIG 4898b042e37fSmrg 4899b042e37fSmrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 4900b042e37fSmrg# ------------------------------------ 4901b042e37fSmrg# Figure out "hidden" library dependencies from verbose 4902b042e37fSmrg# compiler output when linking a shared library. 4903b042e37fSmrg# Parse the compiler output and extract the necessary 4904b042e37fSmrg# objects, libraries and library flags. 4905b042e37fSmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 4906b042e37fSmrgdnl we can't use the lt_simple_compile_test_code here, 4907b042e37fSmrgdnl because it contains code intended for an executable, 4908b042e37fSmrgdnl not a library. It's possible we should let each 4909b042e37fSmrgdnl tag define a new lt_????_link_test_code variable, 4910b042e37fSmrgdnl but it's only used here... 4911b042e37fSmrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 4912b042e37fSmrgint a; 4913b042e37fSmrgvoid foo (void) { a = 0; } 4914b042e37fSmrgEOF 4915b042e37fSmrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 4916b042e37fSmrgclass Foo 4917b042e37fSmrg{ 4918b042e37fSmrgpublic: 4919b042e37fSmrg Foo (void) { a = 0; } 4920b042e37fSmrgprivate: 4921b042e37fSmrg int a; 4922b042e37fSmrg}; 4923b042e37fSmrgEOF 4924b042e37fSmrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 4925b042e37fSmrg subroutine foo 4926b042e37fSmrg implicit none 4927b042e37fSmrg integer*4 a 4928b042e37fSmrg a=0 4929b042e37fSmrg return 4930b042e37fSmrg end 4931b042e37fSmrgEOF 4932b042e37fSmrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 4933b042e37fSmrgpublic class foo { 4934b042e37fSmrg private int a; 4935b042e37fSmrg public void bar (void) { 4936b042e37fSmrg a = 0; 4937b042e37fSmrg } 4938b042e37fSmrg}; 4939b042e37fSmrgEOF 4940b042e37fSmrg]) 4941b042e37fSmrgdnl Parse the compiler output and extract the necessary 4942b042e37fSmrgdnl objects, libraries and library flags. 4943b042e37fSmrgif AC_TRY_EVAL(ac_compile); then 4944b042e37fSmrg # Parse the compiler output and extract the necessary 4945b042e37fSmrg # objects, libraries and library flags. 4946b042e37fSmrg 4947b042e37fSmrg # Sentinel used to keep track of whether or not we are before 4948b042e37fSmrg # the conftest object file. 4949b042e37fSmrg pre_test_object_deps_done=no 4950b042e37fSmrg 4951b042e37fSmrg # The `*' in the case matches for architectures that use `case' in 4952b042e37fSmrg # $output_verbose_cmd can trigger glob expansion during the loop 4953b042e37fSmrg # eval without this substitution. 4954b042e37fSmrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 4955b042e37fSmrg 4956b042e37fSmrg for p in `eval $output_verbose_link_cmd`; do 4957b042e37fSmrg case $p in 4958b042e37fSmrg 4959b042e37fSmrg -L* | -R* | -l*) 4960b042e37fSmrg # Some compilers place space between "-{L,R}" and the path. 4961b042e37fSmrg # Remove the space. 4962b042e37fSmrg if test $p = "-L" \ 4963b042e37fSmrg || test $p = "-R"; then 4964b042e37fSmrg prev=$p 4965b042e37fSmrg continue 4966b042e37fSmrg else 4967b042e37fSmrg prev= 4968b042e37fSmrg fi 4969b042e37fSmrg 4970b042e37fSmrg if test "$pre_test_object_deps_done" = no; then 4971b042e37fSmrg case $p in 4972b042e37fSmrg -L* | -R*) 4973b042e37fSmrg # Internal compiler library paths should come after those 4974b042e37fSmrg # provided the user. The postdeps already come after the 4975b042e37fSmrg # user supplied libs so there is no need to process them. 4976b042e37fSmrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 4977b042e37fSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 4978b042e37fSmrg else 4979b042e37fSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 4980b042e37fSmrg fi 4981b042e37fSmrg ;; 4982b042e37fSmrg # The "-l" case would never come before the object being 4983b042e37fSmrg # linked, so don't bother handling this case. 4984b042e37fSmrg esac 4985b042e37fSmrg else 4986b042e37fSmrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 4987b042e37fSmrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 4988b042e37fSmrg else 4989b042e37fSmrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 4990b042e37fSmrg fi 4991b042e37fSmrg fi 4992b042e37fSmrg ;; 4993b042e37fSmrg 4994b042e37fSmrg *.$objext) 4995b042e37fSmrg # This assumes that the test object file only shows up 4996b042e37fSmrg # once in the compiler output. 4997b042e37fSmrg if test "$p" = "conftest.$objext"; then 4998b042e37fSmrg pre_test_object_deps_done=yes 4999b042e37fSmrg continue 5000b042e37fSmrg fi 5001b042e37fSmrg 5002b042e37fSmrg if test "$pre_test_object_deps_done" = no; then 5003b042e37fSmrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 5004b042e37fSmrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 5005b042e37fSmrg else 5006b042e37fSmrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 5007b042e37fSmrg fi 5008b042e37fSmrg else 5009b042e37fSmrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 5010b042e37fSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 5011b042e37fSmrg else 5012b042e37fSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 5013b042e37fSmrg fi 5014b042e37fSmrg fi 5015b042e37fSmrg ;; 5016b042e37fSmrg 5017b042e37fSmrg *) ;; # Ignore the rest. 5018b042e37fSmrg 5019b042e37fSmrg esac 5020b042e37fSmrg done 5021b042e37fSmrg 5022b042e37fSmrg # Clean up. 5023b042e37fSmrg rm -f a.out a.exe 5024b042e37fSmrgelse 5025b042e37fSmrg echo "libtool.m4: error: problem compiling $1 test program" 5026b042e37fSmrgfi 5027b042e37fSmrg 5028b042e37fSmrg$rm -f confest.$objext 5029b042e37fSmrg 5030b042e37fSmrg# PORTME: override above test on systems where it is broken 5031b042e37fSmrgifelse([$1],[CXX], 5032b042e37fSmrg[case $host_os in 5033b042e37fSmrginterix3*) 5034b042e37fSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 5035b042e37fSmrg # hack all around it, let's just trust "g++" to DTRT. 5036b042e37fSmrg _LT_AC_TAGVAR(predep_objects,$1)= 5037b042e37fSmrg _LT_AC_TAGVAR(postdep_objects,$1)= 5038b042e37fSmrg _LT_AC_TAGVAR(postdeps,$1)= 5039b042e37fSmrg ;; 5040b042e37fSmrg 5041b042e37fSmrgsolaris*) 5042b042e37fSmrg case $cc_basename in 5043b042e37fSmrg CC*) 5044b042e37fSmrg # Adding this requires a known-good setup of shared libraries for 5045b042e37fSmrg # Sun compiler versions before 5.6, else PIC objects from an old 5046b042e37fSmrg # archive will be linked into the output, leading to subtle bugs. 5047b042e37fSmrg _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' 5048b042e37fSmrg ;; 5049b042e37fSmrg esac 5050b042e37fSmrg ;; 5051b042e37fSmrgesac 5052b042e37fSmrg]) 5053b042e37fSmrg 5054b042e37fSmrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 5055b042e37fSmrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 5056b042e37fSmrgesac 5057b042e37fSmrg])# AC_LIBTOOL_POSTDEP_PREDEP 5058b042e37fSmrg 5059b042e37fSmrg# AC_LIBTOOL_LANG_F77_CONFIG 5060b042e37fSmrg# -------------------------- 5061b042e37fSmrg# Ensure that the configuration vars for the C compiler are 5062b042e37fSmrg# suitably defined. Those variables are subsequently used by 5063b042e37fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 5064b042e37fSmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 5065b042e37fSmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 5066b042e37fSmrg[AC_REQUIRE([AC_PROG_F77]) 5067b042e37fSmrgAC_LANG_PUSH(Fortran 77) 5068b042e37fSmrg 5069b042e37fSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5070b042e37fSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 5071b042e37fSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 5072b042e37fSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 5073b042e37fSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5074b042e37fSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 5075b042e37fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5076b042e37fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5077b042e37fSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5078b042e37fSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5079b042e37fSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 5080b042e37fSmrg_LT_AC_TAGVAR(module_cmds, $1)= 5081b042e37fSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 5082b042e37fSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 5083b042e37fSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5084b042e37fSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 5085b042e37fSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5086b042e37fSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5087b042e37fSmrg 5088b042e37fSmrg# Source file extension for f77 test sources. 5089b042e37fSmrgac_ext=f 5090b042e37fSmrg 5091b042e37fSmrg# Object file extension for compiled f77 test sources. 5092b042e37fSmrgobjext=o 5093b042e37fSmrg_LT_AC_TAGVAR(objext, $1)=$objext 5094b042e37fSmrg 5095b042e37fSmrg# Code to be used in simple compile tests 5096b042e37fSmrglt_simple_compile_test_code=" subroutine t\n return\n end\n" 5097b042e37fSmrg 5098b042e37fSmrg# Code to be used in simple link tests 5099b042e37fSmrglt_simple_link_test_code=" program t\n end\n" 5100b042e37fSmrg 5101b042e37fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 5102b042e37fSmrg_LT_AC_SYS_COMPILER 5103b042e37fSmrg 5104b042e37fSmrg# save warnings/boilerplate of simple test code 5105b042e37fSmrg_LT_COMPILER_BOILERPLATE 5106b042e37fSmrg_LT_LINKER_BOILERPLATE 5107b042e37fSmrg 5108b042e37fSmrg# Allow CC to be a program name with arguments. 5109b042e37fSmrglt_save_CC="$CC" 5110b042e37fSmrgCC=${F77-"f77"} 5111b042e37fSmrgcompiler=$CC 5112b042e37fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 5113b042e37fSmrg_LT_CC_BASENAME([$compiler]) 5114b042e37fSmrg 5115b042e37fSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 5116b042e37fSmrgAC_MSG_RESULT([$can_build_shared]) 5117b042e37fSmrg 5118b042e37fSmrgAC_MSG_CHECKING([whether to build shared libraries]) 5119b042e37fSmrgtest "$can_build_shared" = "no" && enable_shared=no 5120b042e37fSmrg 5121b042e37fSmrg# On AIX, shared libraries and static libraries use the same namespace, and 5122b042e37fSmrg# are all built from PIC. 5123b042e37fSmrgcase $host_os in 5124b042e37fSmrgaix3*) 5125b042e37fSmrg test "$enable_shared" = yes && enable_static=no 5126b042e37fSmrg if test -n "$RANLIB"; then 5127b042e37fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5128b042e37fSmrg postinstall_cmds='$RANLIB $lib' 5129b042e37fSmrg fi 5130b042e37fSmrg ;; 5131b042e37fSmrgaix4* | aix5*) 5132b042e37fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5133b042e37fSmrg test "$enable_shared" = yes && enable_static=no 5134b042e37fSmrg fi 5135b042e37fSmrg ;; 5136b042e37fSmrgesac 5137b042e37fSmrgAC_MSG_RESULT([$enable_shared]) 5138b042e37fSmrg 5139b042e37fSmrgAC_MSG_CHECKING([whether to build static libraries]) 5140b042e37fSmrg# Make sure either enable_shared or enable_static is yes. 5141b042e37fSmrgtest "$enable_shared" = yes || enable_static=yes 5142b042e37fSmrgAC_MSG_RESULT([$enable_static]) 5143b042e37fSmrg 5144b042e37fSmrg_LT_AC_TAGVAR(GCC, $1)="$G77" 5145b042e37fSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 5146b042e37fSmrg 5147b042e37fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 5148b042e37fSmrgAC_LIBTOOL_PROG_CC_C_O($1) 5149b042e37fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 5150b042e37fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 5151b042e37fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 5152b042e37fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 5153b042e37fSmrg 5154b042e37fSmrgAC_LIBTOOL_CONFIG($1) 5155b042e37fSmrg 5156b042e37fSmrgAC_LANG_POP 5157b042e37fSmrgCC="$lt_save_CC" 5158b042e37fSmrg])# AC_LIBTOOL_LANG_F77_CONFIG 5159b042e37fSmrg 5160b042e37fSmrg 5161b042e37fSmrg# AC_LIBTOOL_LANG_GCJ_CONFIG 5162b042e37fSmrg# -------------------------- 5163b042e37fSmrg# Ensure that the configuration vars for the C compiler are 5164b042e37fSmrg# suitably defined. Those variables are subsequently used by 5165b042e37fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 5166b042e37fSmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 5167b042e37fSmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 5168b042e37fSmrg[AC_LANG_SAVE 5169b042e37fSmrg 5170b042e37fSmrg# Source file extension for Java test sources. 5171b042e37fSmrgac_ext=java 5172b042e37fSmrg 5173b042e37fSmrg# Object file extension for compiled Java test sources. 5174b042e37fSmrgobjext=o 5175b042e37fSmrg_LT_AC_TAGVAR(objext, $1)=$objext 5176b042e37fSmrg 5177b042e37fSmrg# Code to be used in simple compile tests 5178b042e37fSmrglt_simple_compile_test_code="class foo {}\n" 5179b042e37fSmrg 5180b042e37fSmrg# Code to be used in simple link tests 5181b042e37fSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' 5182b042e37fSmrg 5183b042e37fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 5184b042e37fSmrg_LT_AC_SYS_COMPILER 5185b042e37fSmrg 5186b042e37fSmrg# save warnings/boilerplate of simple test code 5187b042e37fSmrg_LT_COMPILER_BOILERPLATE 5188b042e37fSmrg_LT_LINKER_BOILERPLATE 5189b042e37fSmrg 5190b042e37fSmrg# Allow CC to be a program name with arguments. 5191b042e37fSmrglt_save_CC="$CC" 5192b042e37fSmrgCC=${GCJ-"gcj"} 5193b042e37fSmrgcompiler=$CC 5194b042e37fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 5195b042e37fSmrg_LT_CC_BASENAME([$compiler]) 5196b042e37fSmrg 5197b042e37fSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 5198b042e37fSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5199b042e37fSmrg 5200b042e37fSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5201b042e37fSmrg 5202b042e37fSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 5203b042e37fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 5204b042e37fSmrgAC_LIBTOOL_PROG_CC_C_O($1) 5205b042e37fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 5206b042e37fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 5207b042e37fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 5208b042e37fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 5209b042e37fSmrg 5210b042e37fSmrgAC_LIBTOOL_CONFIG($1) 5211b042e37fSmrg 5212b042e37fSmrgAC_LANG_RESTORE 5213b042e37fSmrgCC="$lt_save_CC" 5214b042e37fSmrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 5215b042e37fSmrg 5216b042e37fSmrg 5217b042e37fSmrg# AC_LIBTOOL_LANG_RC_CONFIG 5218b042e37fSmrg# ------------------------- 5219b042e37fSmrg# Ensure that the configuration vars for the Windows resource compiler are 5220b042e37fSmrg# suitably defined. Those variables are subsequently used by 5221b042e37fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 5222b042e37fSmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 5223b042e37fSmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 5224b042e37fSmrg[AC_LANG_SAVE 5225b042e37fSmrg 5226b042e37fSmrg# Source file extension for RC test sources. 5227b042e37fSmrgac_ext=rc 5228b042e37fSmrg 5229b042e37fSmrg# Object file extension for compiled RC test sources. 5230b042e37fSmrgobjext=o 5231b042e37fSmrg_LT_AC_TAGVAR(objext, $1)=$objext 5232b042e37fSmrg 5233b042e37fSmrg# Code to be used in simple compile tests 5234b042e37fSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' 5235b042e37fSmrg 5236b042e37fSmrg# Code to be used in simple link tests 5237b042e37fSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 5238b042e37fSmrg 5239b042e37fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 5240b042e37fSmrg_LT_AC_SYS_COMPILER 5241b042e37fSmrg 5242b042e37fSmrg# save warnings/boilerplate of simple test code 5243b042e37fSmrg_LT_COMPILER_BOILERPLATE 5244b042e37fSmrg_LT_LINKER_BOILERPLATE 5245b042e37fSmrg 5246b042e37fSmrg# Allow CC to be a program name with arguments. 5247b042e37fSmrglt_save_CC="$CC" 5248b042e37fSmrgCC=${RC-"windres"} 5249b042e37fSmrgcompiler=$CC 5250b042e37fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 5251b042e37fSmrg_LT_CC_BASENAME([$compiler]) 5252b042e37fSmrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 5253b042e37fSmrg 5254b042e37fSmrgAC_LIBTOOL_CONFIG($1) 5255b042e37fSmrg 5256b042e37fSmrgAC_LANG_RESTORE 5257b042e37fSmrgCC="$lt_save_CC" 5258b042e37fSmrg])# AC_LIBTOOL_LANG_RC_CONFIG 5259b042e37fSmrg 5260b042e37fSmrg 5261b042e37fSmrg# AC_LIBTOOL_CONFIG([TAGNAME]) 5262b042e37fSmrg# ---------------------------- 5263b042e37fSmrg# If TAGNAME is not passed, then create an initial libtool script 5264b042e37fSmrg# with a default configuration from the untagged config vars. Otherwise 5265b042e37fSmrg# add code to config.status for appending the configuration named by 5266b042e37fSmrg# TAGNAME from the matching tagged config vars. 5267b042e37fSmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 5268b042e37fSmrg[# The else clause should only fire when bootstrapping the 5269b042e37fSmrg# libtool distribution, otherwise you forgot to ship ltmain.sh 5270b042e37fSmrg# with your package, and you will get complaints that there are 5271b042e37fSmrg# no rules to generate ltmain.sh. 5272b042e37fSmrgif test -f "$ltmain"; then 5273b042e37fSmrg # See if we are running on zsh, and set the options which allow our commands through 5274b042e37fSmrg # without removal of \ escapes. 5275b042e37fSmrg if test -n "${ZSH_VERSION+set}" ; then 5276b042e37fSmrg setopt NO_GLOB_SUBST 5277b042e37fSmrg fi 5278b042e37fSmrg # Now quote all the things that may contain metacharacters while being 5279b042e37fSmrg # careful not to overquote the AC_SUBSTed values. We take copies of the 5280b042e37fSmrg # variables and quote the copies for generation of the libtool script. 5281b042e37fSmrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 5282b042e37fSmrg SED SHELL STRIP \ 5283b042e37fSmrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 5284b042e37fSmrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 5285b042e37fSmrg deplibs_check_method reload_flag reload_cmds need_locks \ 5286b042e37fSmrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 5287b042e37fSmrg lt_cv_sys_global_symbol_to_c_name_address \ 5288b042e37fSmrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 5289b042e37fSmrg old_postinstall_cmds old_postuninstall_cmds \ 5290b042e37fSmrg _LT_AC_TAGVAR(compiler, $1) \ 5291b042e37fSmrg _LT_AC_TAGVAR(CC, $1) \ 5292b042e37fSmrg _LT_AC_TAGVAR(LD, $1) \ 5293b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 5294b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 5295b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 5296b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 5297b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 5298b042e37fSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 5299b042e37fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 5300b042e37fSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 5301b042e37fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 5302b042e37fSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 5303b042e37fSmrg _LT_AC_TAGVAR(predep_objects, $1) \ 5304b042e37fSmrg _LT_AC_TAGVAR(postdep_objects, $1) \ 5305b042e37fSmrg _LT_AC_TAGVAR(predeps, $1) \ 5306b042e37fSmrg _LT_AC_TAGVAR(postdeps, $1) \ 5307b042e37fSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 5308b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1) \ 5309b042e37fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 5310b042e37fSmrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 5311b042e37fSmrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 5312b042e37fSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 5313b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 5314b042e37fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 5315b042e37fSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 5316b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 5317b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 5318b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 5319b042e37fSmrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 5320b042e37fSmrg _LT_AC_TAGVAR(module_cmds, $1) \ 5321b042e37fSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 5322b042e37fSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 5323b042e37fSmrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 5324b042e37fSmrg _LT_AC_TAGVAR(include_expsyms, $1); do 5325b042e37fSmrg 5326b042e37fSmrg case $var in 5327b042e37fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 5328b042e37fSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 5329b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 5330b042e37fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 5331b042e37fSmrg _LT_AC_TAGVAR(module_cmds, $1) | \ 5332b042e37fSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 5333b042e37fSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 5334b042e37fSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 5335b042e37fSmrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 5336b042e37fSmrg postinstall_cmds | postuninstall_cmds | \ 5337b042e37fSmrg old_postinstall_cmds | old_postuninstall_cmds | \ 5338b042e37fSmrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 5339b042e37fSmrg # Double-quote double-evaled strings. 5340b042e37fSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 5341b042e37fSmrg ;; 5342b042e37fSmrg *) 5343b042e37fSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 5344b042e37fSmrg ;; 5345b042e37fSmrg esac 5346b042e37fSmrg done 5347b042e37fSmrg 5348b042e37fSmrg case $lt_echo in 5349b042e37fSmrg *'\[$]0 --fallback-echo"') 5350b042e37fSmrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 5351b042e37fSmrg ;; 5352b042e37fSmrg esac 5353b042e37fSmrg 5354b042e37fSmrgifelse([$1], [], 5355b042e37fSmrg [cfgfile="${ofile}T" 5356b042e37fSmrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 5357b042e37fSmrg $rm -f "$cfgfile" 5358b042e37fSmrg AC_MSG_NOTICE([creating $ofile])], 5359b042e37fSmrg [cfgfile="$ofile"]) 5360b042e37fSmrg 5361b042e37fSmrg cat <<__EOF__ >> "$cfgfile" 5362b042e37fSmrgifelse([$1], [], 5363b042e37fSmrg[#! $SHELL 5364b042e37fSmrg 5365b042e37fSmrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 5366b042e37fSmrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 5367b042e37fSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 5368b042e37fSmrg# 5369b042e37fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 5370b042e37fSmrg# Free Software Foundation, Inc. 5371b042e37fSmrg# 5372b042e37fSmrg# This file is part of GNU Libtool: 5373b042e37fSmrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 5374b042e37fSmrg# 5375b042e37fSmrg# This program is free software; you can redistribute it and/or modify 5376b042e37fSmrg# it under the terms of the GNU General Public License as published by 5377b042e37fSmrg# the Free Software Foundation; either version 2 of the License, or 5378b042e37fSmrg# (at your option) any later version. 5379b042e37fSmrg# 5380b042e37fSmrg# This program is distributed in the hope that it will be useful, but 5381b042e37fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 5382b042e37fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5383b042e37fSmrg# General Public License for more details. 5384b042e37fSmrg# 5385b042e37fSmrg# You should have received a copy of the GNU General Public License 5386b042e37fSmrg# along with this program; if not, write to the Free Software 5387b042e37fSmrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 5388b042e37fSmrg# 5389b042e37fSmrg# As a special exception to the GNU General Public License, if you 5390b042e37fSmrg# distribute this file as part of a program that contains a 5391b042e37fSmrg# configuration script generated by Autoconf, you may include it under 5392b042e37fSmrg# the same distribution terms that you use for the rest of that program. 5393b042e37fSmrg 5394b042e37fSmrg# A sed program that does not truncate output. 5395b042e37fSmrgSED=$lt_SED 5396b042e37fSmrg 5397b042e37fSmrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 5398b042e37fSmrgXsed="$SED -e 1s/^X//" 5399b042e37fSmrg 5400b042e37fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5401b042e37fSmrg# if CDPATH is set. 5402b042e37fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5403b042e37fSmrg 5404b042e37fSmrg# The names of the tagged configurations supported by this script. 5405b042e37fSmrgavailable_tags= 5406b042e37fSmrg 5407b042e37fSmrg# ### BEGIN LIBTOOL CONFIG], 5408b042e37fSmrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 5409b042e37fSmrg 5410b042e37fSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 5411b042e37fSmrg 5412b042e37fSmrg# Shell to use when invoking shell scripts. 5413b042e37fSmrgSHELL=$lt_SHELL 5414b042e37fSmrg 5415b042e37fSmrg# Whether or not to build shared libraries. 5416b042e37fSmrgbuild_libtool_libs=$enable_shared 5417b042e37fSmrg 5418b042e37fSmrg# Whether or not to build static libraries. 5419b042e37fSmrgbuild_old_libs=$enable_static 5420b042e37fSmrg 5421b042e37fSmrg# Whether or not to add -lc for building shared libraries. 5422b042e37fSmrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 5423b042e37fSmrg 5424b042e37fSmrg# Whether or not to disallow shared libs when runtime libs are static 5425b042e37fSmrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 5426b042e37fSmrg 5427b042e37fSmrg# Whether or not to optimize for fast installation. 5428b042e37fSmrgfast_install=$enable_fast_install 5429b042e37fSmrg 5430b042e37fSmrg# The host system. 5431b042e37fSmrghost_alias=$host_alias 5432b042e37fSmrghost=$host 5433b042e37fSmrghost_os=$host_os 5434b042e37fSmrg 5435b042e37fSmrg# The build system. 5436b042e37fSmrgbuild_alias=$build_alias 5437b042e37fSmrgbuild=$build 5438b042e37fSmrgbuild_os=$build_os 5439b042e37fSmrg 5440b042e37fSmrg# An echo program that does not interpret backslashes. 5441b042e37fSmrgecho=$lt_echo 5442b042e37fSmrg 5443b042e37fSmrg# The archiver. 5444b042e37fSmrgAR=$lt_AR 5445b042e37fSmrgAR_FLAGS=$lt_AR_FLAGS 5446b042e37fSmrg 5447b042e37fSmrg# A C compiler. 5448b042e37fSmrgLTCC=$lt_LTCC 5449b042e37fSmrg 5450b042e37fSmrg# LTCC compiler flags. 5451b042e37fSmrgLTCFLAGS=$lt_LTCFLAGS 5452b042e37fSmrg 5453b042e37fSmrg# A language-specific compiler. 5454b042e37fSmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 5455b042e37fSmrg 5456b042e37fSmrg# Is the compiler the GNU C compiler? 5457b042e37fSmrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 5458b042e37fSmrg 5459b042e37fSmrg# An ERE matcher. 5460b042e37fSmrgEGREP=$lt_EGREP 5461b042e37fSmrg 5462b042e37fSmrg# The linker used to build libraries. 5463b042e37fSmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 5464b042e37fSmrg 5465b042e37fSmrg# Whether we need hard or soft links. 5466b042e37fSmrgLN_S=$lt_LN_S 5467b042e37fSmrg 5468b042e37fSmrg# A BSD-compatible nm program. 5469b042e37fSmrgNM=$lt_NM 5470b042e37fSmrg 5471b042e37fSmrg# A symbol stripping program 5472b042e37fSmrgSTRIP=$lt_STRIP 5473b042e37fSmrg 5474b042e37fSmrg# Used to examine libraries when file_magic_cmd begins "file" 5475b042e37fSmrgMAGIC_CMD=$MAGIC_CMD 5476b042e37fSmrg 5477b042e37fSmrg# Used on cygwin: DLL creation program. 5478b042e37fSmrgDLLTOOL="$DLLTOOL" 5479b042e37fSmrg 5480b042e37fSmrg# Used on cygwin: object dumper. 5481b042e37fSmrgOBJDUMP="$OBJDUMP" 5482b042e37fSmrg 5483b042e37fSmrg# Used on cygwin: assembler. 5484b042e37fSmrgAS="$AS" 5485b042e37fSmrg 5486b042e37fSmrg# The name of the directory that contains temporary libtool files. 5487b042e37fSmrgobjdir=$objdir 5488b042e37fSmrg 5489b042e37fSmrg# How to create reloadable object files. 5490b042e37fSmrgreload_flag=$lt_reload_flag 5491b042e37fSmrgreload_cmds=$lt_reload_cmds 5492b042e37fSmrg 5493b042e37fSmrg# How to pass a linker flag through the compiler. 5494b042e37fSmrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 5495b042e37fSmrg 5496b042e37fSmrg# Object file suffix (normally "o"). 5497b042e37fSmrgobjext="$ac_objext" 5498b042e37fSmrg 5499b042e37fSmrg# Old archive suffix (normally "a"). 5500b042e37fSmrglibext="$libext" 5501b042e37fSmrg 5502b042e37fSmrg# Shared library suffix (normally ".so"). 5503b042e37fSmrgshrext_cmds='$shrext_cmds' 5504b042e37fSmrg 5505b042e37fSmrg# Executable file suffix (normally ""). 5506b042e37fSmrgexeext="$exeext" 5507b042e37fSmrg 5508b042e37fSmrg# Additional compiler flags for building library objects. 5509b042e37fSmrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 5510b042e37fSmrgpic_mode=$pic_mode 5511b042e37fSmrg 5512b042e37fSmrg# What is the maximum length of a command? 5513b042e37fSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 5514b042e37fSmrg 5515b042e37fSmrg# Does compiler simultaneously support -c and -o options? 5516b042e37fSmrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 5517b042e37fSmrg 5518b042e37fSmrg# Must we lock files when doing compilation? 5519b042e37fSmrgneed_locks=$lt_need_locks 5520b042e37fSmrg 5521b042e37fSmrg# Do we need the lib prefix for modules? 5522b042e37fSmrgneed_lib_prefix=$need_lib_prefix 5523b042e37fSmrg 5524b042e37fSmrg# Do we need a version for libraries? 5525b042e37fSmrgneed_version=$need_version 5526b042e37fSmrg 5527b042e37fSmrg# Whether dlopen is supported. 5528b042e37fSmrgdlopen_support=$enable_dlopen 5529b042e37fSmrg 5530b042e37fSmrg# Whether dlopen of programs is supported. 5531b042e37fSmrgdlopen_self=$enable_dlopen_self 5532b042e37fSmrg 5533b042e37fSmrg# Whether dlopen of statically linked programs is supported. 5534b042e37fSmrgdlopen_self_static=$enable_dlopen_self_static 5535b042e37fSmrg 5536b042e37fSmrg# Compiler flag to prevent dynamic linking. 5537b042e37fSmrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 5538b042e37fSmrg 5539b042e37fSmrg# Compiler flag to turn off builtin functions. 5540b042e37fSmrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 5541b042e37fSmrg 5542b042e37fSmrg# Compiler flag to allow reflexive dlopens. 5543b042e37fSmrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 5544b042e37fSmrg 5545b042e37fSmrg# Compiler flag to generate shared objects directly from archives. 5546b042e37fSmrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 5547b042e37fSmrg 5548b042e37fSmrg# Compiler flag to generate thread-safe objects. 5549b042e37fSmrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 5550b042e37fSmrg 5551b042e37fSmrg# Library versioning type. 5552b042e37fSmrgversion_type=$version_type 5553b042e37fSmrg 5554b042e37fSmrg# Format of library name prefix. 5555b042e37fSmrglibname_spec=$lt_libname_spec 5556b042e37fSmrg 5557b042e37fSmrg# List of archive names. First name is the real one, the rest are links. 5558b042e37fSmrg# The last name is the one that the linker finds with -lNAME. 5559b042e37fSmrglibrary_names_spec=$lt_library_names_spec 5560b042e37fSmrg 5561b042e37fSmrg# The coded name of the library, if different from the real name. 5562b042e37fSmrgsoname_spec=$lt_soname_spec 5563b042e37fSmrg 5564b042e37fSmrg# Commands used to build and install an old-style archive. 5565b042e37fSmrgRANLIB=$lt_RANLIB 5566b042e37fSmrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 5567b042e37fSmrgold_postinstall_cmds=$lt_old_postinstall_cmds 5568b042e37fSmrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 5569b042e37fSmrg 5570b042e37fSmrg# Create an old-style archive from a shared archive. 5571b042e37fSmrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 5572b042e37fSmrg 5573b042e37fSmrg# Create a temporary old-style archive to link instead of a shared archive. 5574b042e37fSmrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 5575b042e37fSmrg 5576b042e37fSmrg# Commands used to build and install a shared archive. 5577b042e37fSmrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 5578b042e37fSmrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 5579b042e37fSmrgpostinstall_cmds=$lt_postinstall_cmds 5580b042e37fSmrgpostuninstall_cmds=$lt_postuninstall_cmds 5581b042e37fSmrg 5582b042e37fSmrg# Commands used to build a loadable module (assumed same as above if empty) 5583b042e37fSmrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 5584b042e37fSmrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 5585b042e37fSmrg 5586b042e37fSmrg# Commands to strip libraries. 5587b042e37fSmrgold_striplib=$lt_old_striplib 5588b042e37fSmrgstriplib=$lt_striplib 5589b042e37fSmrg 5590b042e37fSmrg# Dependencies to place before the objects being linked to create a 5591b042e37fSmrg# shared library. 5592b042e37fSmrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 5593b042e37fSmrg 5594b042e37fSmrg# Dependencies to place after the objects being linked to create a 5595b042e37fSmrg# shared library. 5596b042e37fSmrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 5597b042e37fSmrg 5598b042e37fSmrg# Dependencies to place before the objects being linked to create a 5599b042e37fSmrg# shared library. 5600b042e37fSmrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 5601b042e37fSmrg 5602b042e37fSmrg# Dependencies to place after the objects being linked to create a 5603b042e37fSmrg# shared library. 5604b042e37fSmrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 5605b042e37fSmrg 5606b042e37fSmrg# The library search path used internally by the compiler when linking 5607b042e37fSmrg# a shared library. 5608b042e37fSmrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 5609b042e37fSmrg 5610b042e37fSmrg# Method to check whether dependent libraries are shared objects. 5611b042e37fSmrgdeplibs_check_method=$lt_deplibs_check_method 5612b042e37fSmrg 5613b042e37fSmrg# Command to use when deplibs_check_method == file_magic. 5614b042e37fSmrgfile_magic_cmd=$lt_file_magic_cmd 5615b042e37fSmrg 5616b042e37fSmrg# Flag that allows shared libraries with undefined symbols to be built. 5617b042e37fSmrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 5618b042e37fSmrg 5619b042e37fSmrg# Flag that forces no undefined symbols. 5620b042e37fSmrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 5621b042e37fSmrg 5622b042e37fSmrg# Commands used to finish a libtool library installation in a directory. 5623b042e37fSmrgfinish_cmds=$lt_finish_cmds 5624b042e37fSmrg 5625b042e37fSmrg# Same as above, but a single script fragment to be evaled but not shown. 5626b042e37fSmrgfinish_eval=$lt_finish_eval 5627b042e37fSmrg 5628b042e37fSmrg# Take the output of nm and produce a listing of raw symbols and C names. 5629b042e37fSmrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 5630b042e37fSmrg 5631b042e37fSmrg# Transform the output of nm in a proper C declaration 5632b042e37fSmrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 5633b042e37fSmrg 5634b042e37fSmrg# Transform the output of nm in a C name address pair 5635b042e37fSmrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 5636b042e37fSmrg 5637b042e37fSmrg# This is the shared library runtime path variable. 5638b042e37fSmrgrunpath_var=$runpath_var 5639b042e37fSmrg 5640b042e37fSmrg# This is the shared library path variable. 5641b042e37fSmrgshlibpath_var=$shlibpath_var 5642b042e37fSmrg 5643b042e37fSmrg# Is shlibpath searched before the hard-coded library search path? 5644b042e37fSmrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 5645b042e37fSmrg 5646b042e37fSmrg# How to hardcode a shared library path into an executable. 5647b042e37fSmrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 5648b042e37fSmrg 5649b042e37fSmrg# Whether we should hardcode library paths into libraries. 5650b042e37fSmrghardcode_into_libs=$hardcode_into_libs 5651b042e37fSmrg 5652b042e37fSmrg# Flag to hardcode \$libdir into a binary during linking. 5653b042e37fSmrg# This must work even if \$libdir does not exist. 5654b042e37fSmrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 5655b042e37fSmrg 5656b042e37fSmrg# If ld is used when linking, flag to hardcode \$libdir into 5657b042e37fSmrg# a binary during linking. This must work even if \$libdir does 5658b042e37fSmrg# not exist. 5659b042e37fSmrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 5660b042e37fSmrg 5661b042e37fSmrg# Whether we need a single -rpath flag with a separated argument. 5662b042e37fSmrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 5663b042e37fSmrg 5664b042e37fSmrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 5665b042e37fSmrg# resulting binary. 5666b042e37fSmrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 5667b042e37fSmrg 5668b042e37fSmrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 5669b042e37fSmrg# resulting binary. 5670b042e37fSmrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 5671b042e37fSmrg 5672b042e37fSmrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 5673b042e37fSmrg# the resulting binary. 5674b042e37fSmrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 5675b042e37fSmrg 5676b042e37fSmrg# Set to yes if building a shared library automatically hardcodes DIR into the library 5677b042e37fSmrg# and all subsequent libraries and executables linked against it. 5678b042e37fSmrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 5679b042e37fSmrg 5680b042e37fSmrg# Variables whose values should be saved in libtool wrapper scripts and 5681b042e37fSmrg# restored at relink time. 5682b042e37fSmrgvariables_saved_for_relink="$variables_saved_for_relink" 5683b042e37fSmrg 5684b042e37fSmrg# Whether libtool must link a program against all its dependency libraries. 5685b042e37fSmrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 5686b042e37fSmrg 5687b042e37fSmrg# Compile-time system search path for libraries 5688b042e37fSmrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 5689b042e37fSmrg 5690b042e37fSmrg# Run-time system search path for libraries 5691b042e37fSmrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 5692b042e37fSmrg 5693b042e37fSmrg# Fix the shell variable \$srcfile for the compiler. 5694b042e37fSmrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 5695b042e37fSmrg 5696b042e37fSmrg# Set to yes if exported symbols are required. 5697b042e37fSmrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 5698b042e37fSmrg 5699b042e37fSmrg# The commands to list exported symbols. 5700b042e37fSmrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 5701b042e37fSmrg 5702b042e37fSmrg# The commands to extract the exported symbol list from a shared archive. 5703b042e37fSmrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 5704b042e37fSmrg 5705b042e37fSmrg# Symbols that should not be listed in the preloaded symbols. 5706b042e37fSmrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 5707b042e37fSmrg 5708b042e37fSmrg# Symbols that must always be exported. 5709b042e37fSmrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 5710b042e37fSmrg 5711b042e37fSmrgifelse([$1],[], 5712b042e37fSmrg[# ### END LIBTOOL CONFIG], 5713b042e37fSmrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 5714b042e37fSmrg 5715b042e37fSmrg__EOF__ 5716b042e37fSmrg 5717b042e37fSmrgifelse([$1],[], [ 5718b042e37fSmrg case $host_os in 5719b042e37fSmrg aix3*) 5720b042e37fSmrg cat <<\EOF >> "$cfgfile" 5721b042e37fSmrg 5722b042e37fSmrg# AIX sometimes has problems with the GCC collect2 program. For some 5723b042e37fSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 5724b042e37fSmrg# vanish in a puff of smoke. 5725b042e37fSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 5726b042e37fSmrg COLLECT_NAMES= 5727b042e37fSmrg export COLLECT_NAMES 5728b042e37fSmrgfi 5729b042e37fSmrgEOF 5730b042e37fSmrg ;; 5731b042e37fSmrg esac 5732b042e37fSmrg 5733b042e37fSmrg # We use sed instead of cat because bash on DJGPP gets confused if 5734b042e37fSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 5735b042e37fSmrg # text mode, it properly converts lines to CR/LF. This bash problem 5736b042e37fSmrg # is reportedly fixed, but why not run on old versions too? 5737b042e37fSmrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 5738b042e37fSmrg 5739b042e37fSmrg mv -f "$cfgfile" "$ofile" || \ 5740b042e37fSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 5741b042e37fSmrg chmod +x "$ofile" 5742b042e37fSmrg]) 5743b042e37fSmrgelse 5744b042e37fSmrg # If there is no Makefile yet, we rely on a make rule to execute 5745b042e37fSmrg # `config.status --recheck' to rerun these tests and create the 5746b042e37fSmrg # libtool script then. 5747b042e37fSmrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 5748b042e37fSmrg if test -f "$ltmain_in"; then 5749b042e37fSmrg test -f Makefile && make "$ltmain" 5750b042e37fSmrg fi 5751b042e37fSmrgfi 5752b042e37fSmrg])# AC_LIBTOOL_CONFIG 5753b042e37fSmrg 5754b042e37fSmrg 5755b042e37fSmrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 5756b042e37fSmrg# ------------------------------------------- 5757b042e37fSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 5758b042e37fSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 5759b042e37fSmrg 5760b042e37fSmrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5761b042e37fSmrg 5762b042e37fSmrgif test "$GCC" = yes; then 5763b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5764b042e37fSmrg 5765b042e37fSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 5766b042e37fSmrg lt_cv_prog_compiler_rtti_exceptions, 5767b042e37fSmrg [-fno-rtti -fno-exceptions], [], 5768b042e37fSmrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 5769b042e37fSmrgfi 5770b042e37fSmrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 5771b042e37fSmrg 5772b042e37fSmrg 5773b042e37fSmrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 5774b042e37fSmrg# --------------------------------- 5775b042e37fSmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 5776b042e37fSmrg[AC_REQUIRE([AC_CANONICAL_HOST]) 5777b042e37fSmrgAC_REQUIRE([AC_PROG_NM]) 5778b042e37fSmrgAC_REQUIRE([AC_OBJEXT]) 5779b042e37fSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 5780b042e37fSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 5781b042e37fSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 5782b042e37fSmrg[ 5783b042e37fSmrg# These are sane defaults that work on at least a few old systems. 5784b042e37fSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 5785b042e37fSmrg 5786b042e37fSmrg# Character class describing NM global symbol codes. 5787b042e37fSmrgsymcode='[[BCDEGRST]]' 5788b042e37fSmrg 5789b042e37fSmrg# Regexp to match symbols that can be accessed directly from C. 5790b042e37fSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 5791b042e37fSmrg 5792b042e37fSmrg# Transform an extracted symbol line into a proper C declaration 5793b042e37fSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 5794b042e37fSmrg 5795b042e37fSmrg# Transform an extracted symbol line into symbol name and symbol address 5796b042e37fSmrglt_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'" 5797b042e37fSmrg 5798b042e37fSmrg# Define system-specific variables. 5799b042e37fSmrgcase $host_os in 5800b042e37fSmrgaix*) 5801b042e37fSmrg symcode='[[BCDT]]' 5802b042e37fSmrg ;; 5803b042e37fSmrgcygwin* | mingw* | pw32*) 5804b042e37fSmrg symcode='[[ABCDGISTW]]' 5805b042e37fSmrg ;; 5806b042e37fSmrghpux*) # Its linker distinguishes data from code symbols 5807b042e37fSmrg if test "$host_cpu" = ia64; then 5808b042e37fSmrg symcode='[[ABCDEGRST]]' 5809b042e37fSmrg fi 5810b042e37fSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 5811b042e37fSmrg 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'" 5812b042e37fSmrg ;; 5813b042e37fSmrglinux*) 5814b042e37fSmrg if test "$host_cpu" = ia64; then 5815b042e37fSmrg symcode='[[ABCDGIRSTW]]' 5816b042e37fSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 5817b042e37fSmrg 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'" 5818b042e37fSmrg fi 5819b042e37fSmrg ;; 5820b042e37fSmrgirix* | nonstopux*) 5821b042e37fSmrg symcode='[[BCDEGRST]]' 5822b042e37fSmrg ;; 5823b042e37fSmrgosf*) 5824b042e37fSmrg symcode='[[BCDEGQRST]]' 5825b042e37fSmrg ;; 5826b042e37fSmrgsolaris*) 5827b042e37fSmrg symcode='[[BDRT]]' 5828b042e37fSmrg ;; 5829b042e37fSmrgsco3.2v5*) 5830b042e37fSmrg symcode='[[DT]]' 5831b042e37fSmrg ;; 5832b042e37fSmrgsysv4.2uw2*) 5833b042e37fSmrg symcode='[[DT]]' 5834b042e37fSmrg ;; 5835b042e37fSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 5836b042e37fSmrg symcode='[[ABDT]]' 5837b042e37fSmrg ;; 5838b042e37fSmrgsysv4) 5839b042e37fSmrg symcode='[[DFNSTU]]' 5840b042e37fSmrg ;; 5841b042e37fSmrgesac 5842b042e37fSmrg 5843b042e37fSmrg# Handle CRLF in mingw tool chain 5844b042e37fSmrgopt_cr= 5845b042e37fSmrgcase $build_os in 5846b042e37fSmrgmingw*) 5847b042e37fSmrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 5848b042e37fSmrg ;; 5849b042e37fSmrgesac 5850b042e37fSmrg 5851b042e37fSmrg# If we're using GNU nm, then use its standard symbol codes. 5852b042e37fSmrgcase `$NM -V 2>&1` in 5853b042e37fSmrg*GNU* | *'with BFD'*) 5854b042e37fSmrg symcode='[[ABCDGIRSTW]]' ;; 5855b042e37fSmrgesac 5856b042e37fSmrg 5857b042e37fSmrg# Try without a prefix undercore, then with it. 5858b042e37fSmrgfor ac_symprfx in "" "_"; do 5859b042e37fSmrg 5860b042e37fSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 5861b042e37fSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 5862b042e37fSmrg 5863b042e37fSmrg # Write the raw and C identifiers. 5864b042e37fSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 5865b042e37fSmrg 5866b042e37fSmrg # Check to see that the pipe works correctly. 5867b042e37fSmrg pipe_works=no 5868b042e37fSmrg 5869b042e37fSmrg rm -f conftest* 5870b042e37fSmrg cat > conftest.$ac_ext <<EOF 5871b042e37fSmrg#ifdef __cplusplus 5872b042e37fSmrgextern "C" { 5873b042e37fSmrg#endif 5874b042e37fSmrgchar nm_test_var; 5875b042e37fSmrgvoid nm_test_func(){} 5876b042e37fSmrg#ifdef __cplusplus 5877b042e37fSmrg} 5878b042e37fSmrg#endif 5879b042e37fSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 5880b042e37fSmrgEOF 5881b042e37fSmrg 5882b042e37fSmrg if AC_TRY_EVAL(ac_compile); then 5883b042e37fSmrg # Now try to grab the symbols. 5884b042e37fSmrg nlist=conftest.nm 5885b042e37fSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 5886b042e37fSmrg # Try sorting and uniquifying the output. 5887b042e37fSmrg if sort "$nlist" | uniq > "$nlist"T; then 5888b042e37fSmrg mv -f "$nlist"T "$nlist" 5889b042e37fSmrg else 5890b042e37fSmrg rm -f "$nlist"T 5891b042e37fSmrg fi 5892b042e37fSmrg 5893b042e37fSmrg # Make sure that we snagged all the symbols we need. 5894b042e37fSmrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 5895b042e37fSmrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 5896b042e37fSmrg cat <<EOF > conftest.$ac_ext 5897b042e37fSmrg#ifdef __cplusplus 5898b042e37fSmrgextern "C" { 5899b042e37fSmrg#endif 5900b042e37fSmrg 5901b042e37fSmrgEOF 5902b042e37fSmrg # Now generate the symbol file. 5903b042e37fSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 5904b042e37fSmrg 5905b042e37fSmrg cat <<EOF >> conftest.$ac_ext 5906b042e37fSmrg#if defined (__STDC__) && __STDC__ 5907b042e37fSmrg# define lt_ptr_t void * 5908b042e37fSmrg#else 5909b042e37fSmrg# define lt_ptr_t char * 5910b042e37fSmrg# define const 5911b042e37fSmrg#endif 5912b042e37fSmrg 5913b042e37fSmrg/* The mapping between symbol names and symbols. */ 5914b042e37fSmrgconst struct { 5915b042e37fSmrg const char *name; 5916b042e37fSmrg lt_ptr_t address; 5917b042e37fSmrg} 5918b042e37fSmrglt_preloaded_symbols[[]] = 5919b042e37fSmrg{ 5920b042e37fSmrgEOF 5921b042e37fSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 5922b042e37fSmrg cat <<\EOF >> conftest.$ac_ext 5923b042e37fSmrg {0, (lt_ptr_t) 0} 5924b042e37fSmrg}; 5925b042e37fSmrg 5926b042e37fSmrg#ifdef __cplusplus 5927b042e37fSmrg} 5928b042e37fSmrg#endif 5929b042e37fSmrgEOF 5930b042e37fSmrg # Now try linking the two files. 5931b042e37fSmrg mv conftest.$ac_objext conftstm.$ac_objext 5932b042e37fSmrg lt_save_LIBS="$LIBS" 5933b042e37fSmrg lt_save_CFLAGS="$CFLAGS" 5934b042e37fSmrg LIBS="conftstm.$ac_objext" 5935b042e37fSmrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 5936b042e37fSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 5937b042e37fSmrg pipe_works=yes 5938b042e37fSmrg fi 5939b042e37fSmrg LIBS="$lt_save_LIBS" 5940b042e37fSmrg CFLAGS="$lt_save_CFLAGS" 5941b042e37fSmrg else 5942b042e37fSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 5943b042e37fSmrg fi 5944b042e37fSmrg else 5945b042e37fSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 5946b042e37fSmrg fi 5947b042e37fSmrg else 5948b042e37fSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 5949b042e37fSmrg fi 5950b042e37fSmrg else 5951b042e37fSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 5952b042e37fSmrg cat conftest.$ac_ext >&5 5953b042e37fSmrg fi 5954b042e37fSmrg rm -f conftest* conftst* 5955b042e37fSmrg 5956b042e37fSmrg # Do not use the global_symbol_pipe unless it works. 5957b042e37fSmrg if test "$pipe_works" = yes; then 5958b042e37fSmrg break 5959b042e37fSmrg else 5960b042e37fSmrg lt_cv_sys_global_symbol_pipe= 5961b042e37fSmrg fi 5962b042e37fSmrgdone 5963b042e37fSmrg]) 5964b042e37fSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 5965b042e37fSmrg lt_cv_sys_global_symbol_to_cdecl= 5966b042e37fSmrgfi 5967b042e37fSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 5968b042e37fSmrg AC_MSG_RESULT(failed) 5969b042e37fSmrgelse 5970b042e37fSmrg AC_MSG_RESULT(ok) 5971b042e37fSmrgfi 5972b042e37fSmrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 5973b042e37fSmrg 5974b042e37fSmrg 5975b042e37fSmrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 5976b042e37fSmrg# --------------------------------------- 5977b042e37fSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 5978b042e37fSmrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 5979b042e37fSmrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5980b042e37fSmrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 5981b042e37fSmrg 5982b042e37fSmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 5983b042e37fSmrg ifelse([$1],[CXX],[ 5984b042e37fSmrg # C++ specific cases for pic, static, wl, etc. 5985b042e37fSmrg if test "$GXX" = yes; then 5986b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5987b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5988b042e37fSmrg 5989b042e37fSmrg case $host_os in 5990b042e37fSmrg aix*) 5991b042e37fSmrg # All AIX code is PIC. 5992b042e37fSmrg if test "$host_cpu" = ia64; then 5993b042e37fSmrg # AIX 5 now supports IA64 processor 5994b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5995b042e37fSmrg fi 5996b042e37fSmrg ;; 5997b042e37fSmrg amigaos*) 5998b042e37fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 5999b042e37fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 6000b042e37fSmrg # like `-m68040'. 6001b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6002b042e37fSmrg ;; 6003b042e37fSmrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6004b042e37fSmrg # PIC is the default for these OSes. 6005b042e37fSmrg ;; 6006b042e37fSmrg mingw* | os2* | pw32*) 6007b042e37fSmrg # This hack is so that the source file can tell whether it is being 6008b042e37fSmrg # built for inclusion in a dll (and should export symbols for example). 6009b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 6010b042e37fSmrg ;; 6011b042e37fSmrg darwin* | rhapsody*) 6012b042e37fSmrg # PIC is the default on this platform 6013b042e37fSmrg # Common symbols not allowed in MH_DYLIB files 6014b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6015b042e37fSmrg ;; 6016b042e37fSmrg *djgpp*) 6017b042e37fSmrg # DJGPP does not support shared libraries at all 6018b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6019b042e37fSmrg ;; 6020b042e37fSmrg interix3*) 6021b042e37fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6022b042e37fSmrg # Instead, we relocate shared libraries at runtime. 6023b042e37fSmrg ;; 6024b042e37fSmrg sysv4*MP*) 6025b042e37fSmrg if test -d /usr/nec; then 6026b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6027b042e37fSmrg fi 6028b042e37fSmrg ;; 6029b042e37fSmrg hpux*) 6030b042e37fSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6031b042e37fSmrg # not for PA HP-UX. 6032b042e37fSmrg case $host_cpu in 6033b042e37fSmrg hppa*64*|ia64*) 6034b042e37fSmrg ;; 6035b042e37fSmrg *) 6036b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6037b042e37fSmrg ;; 6038b042e37fSmrg esac 6039b042e37fSmrg ;; 6040b042e37fSmrg *) 6041b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6042b042e37fSmrg ;; 6043b042e37fSmrg esac 6044b042e37fSmrg else 6045b042e37fSmrg case $host_os in 6046b042e37fSmrg aix4* | aix5*) 6047b042e37fSmrg # All AIX code is PIC. 6048b042e37fSmrg if test "$host_cpu" = ia64; then 6049b042e37fSmrg # AIX 5 now supports IA64 processor 6050b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6051b042e37fSmrg else 6052b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6053b042e37fSmrg fi 6054b042e37fSmrg ;; 6055b042e37fSmrg chorus*) 6056b042e37fSmrg case $cc_basename in 6057b042e37fSmrg cxch68*) 6058b042e37fSmrg # Green Hills C++ Compiler 6059b042e37fSmrg # _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" 6060b042e37fSmrg ;; 6061b042e37fSmrg esac 6062b042e37fSmrg ;; 6063b042e37fSmrg darwin*) 6064b042e37fSmrg # PIC is the default on this platform 6065b042e37fSmrg # Common symbols not allowed in MH_DYLIB files 6066b042e37fSmrg case $cc_basename in 6067b042e37fSmrg xlc*) 6068b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 6069b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6070b042e37fSmrg ;; 6071b042e37fSmrg esac 6072b042e37fSmrg ;; 6073b042e37fSmrg dgux*) 6074b042e37fSmrg case $cc_basename in 6075b042e37fSmrg ec++*) 6076b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6077b042e37fSmrg ;; 6078b042e37fSmrg ghcx*) 6079b042e37fSmrg # Green Hills C++ Compiler 6080b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6081b042e37fSmrg ;; 6082b042e37fSmrg *) 6083b042e37fSmrg ;; 6084b042e37fSmrg esac 6085b042e37fSmrg ;; 6086b042e37fSmrg freebsd* | kfreebsd*-gnu | dragonfly*) 6087b042e37fSmrg # FreeBSD uses GNU C++ 6088b042e37fSmrg ;; 6089b042e37fSmrg hpux9* | hpux10* | hpux11*) 6090b042e37fSmrg case $cc_basename in 6091b042e37fSmrg CC*) 6092b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6093b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6094b042e37fSmrg if test "$host_cpu" != ia64; then 6095b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6096b042e37fSmrg fi 6097b042e37fSmrg ;; 6098b042e37fSmrg aCC*) 6099b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6100b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6101b042e37fSmrg case $host_cpu in 6102b042e37fSmrg hppa*64*|ia64*) 6103b042e37fSmrg # +Z the default 6104b042e37fSmrg ;; 6105b042e37fSmrg *) 6106b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6107b042e37fSmrg ;; 6108b042e37fSmrg esac 6109b042e37fSmrg ;; 6110b042e37fSmrg *) 6111b042e37fSmrg ;; 6112b042e37fSmrg esac 6113b042e37fSmrg ;; 6114b042e37fSmrg interix*) 6115b042e37fSmrg # This is c89, which is MS Visual C++ (no shared libs) 6116b042e37fSmrg # Anyone wants to do a port? 6117b042e37fSmrg ;; 6118b042e37fSmrg irix5* | irix6* | nonstopux*) 6119b042e37fSmrg case $cc_basename in 6120b042e37fSmrg CC*) 6121b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6122b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6123b042e37fSmrg # CC pic flag -KPIC is the default. 6124b042e37fSmrg ;; 6125b042e37fSmrg *) 6126b042e37fSmrg ;; 6127b042e37fSmrg esac 6128b042e37fSmrg ;; 6129b042e37fSmrg linux*) 6130b042e37fSmrg case $cc_basename in 6131b042e37fSmrg KCC*) 6132b042e37fSmrg # KAI C++ Compiler 6133b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6134b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6135b042e37fSmrg ;; 6136b042e37fSmrg icpc* | ecpc*) 6137b042e37fSmrg # Intel C++ 6138b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6139b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6140b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 6141b042e37fSmrg ;; 6142b042e37fSmrg pgCC*) 6143b042e37fSmrg # Portland Group C++ compiler. 6144b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6145b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6146b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6147b042e37fSmrg ;; 6148b042e37fSmrg cxx*) 6149b042e37fSmrg # Compaq C++ 6150b042e37fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 6151b042e37fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 6152b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6153b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6154b042e37fSmrg ;; 6155b042e37fSmrg *) 6156b042e37fSmrg ;; 6157b042e37fSmrg esac 6158b042e37fSmrg ;; 6159b042e37fSmrg lynxos*) 6160b042e37fSmrg ;; 6161b042e37fSmrg m88k*) 6162b042e37fSmrg ;; 6163b042e37fSmrg mvs*) 6164b042e37fSmrg case $cc_basename in 6165b042e37fSmrg cxx*) 6166b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 6167b042e37fSmrg ;; 6168b042e37fSmrg *) 6169b042e37fSmrg ;; 6170b042e37fSmrg esac 6171b042e37fSmrg ;; 6172b042e37fSmrg netbsd*) 6173b042e37fSmrg ;; 6174b042e37fSmrg osf3* | osf4* | osf5*) 6175b042e37fSmrg case $cc_basename in 6176b042e37fSmrg KCC*) 6177b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6178b042e37fSmrg ;; 6179b042e37fSmrg RCC*) 6180b042e37fSmrg # Rational C++ 2.4.1 6181b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6182b042e37fSmrg ;; 6183b042e37fSmrg cxx*) 6184b042e37fSmrg # Digital/Compaq C++ 6185b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6186b042e37fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 6187b042e37fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 6188b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6189b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6190b042e37fSmrg ;; 6191b042e37fSmrg *) 6192b042e37fSmrg ;; 6193b042e37fSmrg esac 6194b042e37fSmrg ;; 6195b042e37fSmrg psos*) 6196b042e37fSmrg ;; 6197b042e37fSmrg solaris*) 6198b042e37fSmrg case $cc_basename in 6199b042e37fSmrg CC*) 6200b042e37fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 6201b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6202b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6203b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6204b042e37fSmrg ;; 6205b042e37fSmrg gcx*) 6206b042e37fSmrg # Green Hills C++ Compiler 6207b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6208b042e37fSmrg ;; 6209b042e37fSmrg *) 6210b042e37fSmrg ;; 6211b042e37fSmrg esac 6212b042e37fSmrg ;; 6213b042e37fSmrg sunos4*) 6214b042e37fSmrg case $cc_basename in 6215b042e37fSmrg CC*) 6216b042e37fSmrg # Sun C++ 4.x 6217b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6218b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6219b042e37fSmrg ;; 6220b042e37fSmrg lcc*) 6221b042e37fSmrg # Lucid 6222b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6223b042e37fSmrg ;; 6224b042e37fSmrg *) 6225b042e37fSmrg ;; 6226b042e37fSmrg esac 6227b042e37fSmrg ;; 6228b042e37fSmrg tandem*) 6229b042e37fSmrg case $cc_basename in 6230b042e37fSmrg NCC*) 6231b042e37fSmrg # NonStop-UX NCC 3.20 6232b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6233b042e37fSmrg ;; 6234b042e37fSmrg *) 6235b042e37fSmrg ;; 6236b042e37fSmrg esac 6237b042e37fSmrg ;; 6238b042e37fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6239b042e37fSmrg case $cc_basename in 6240b042e37fSmrg CC*) 6241b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6242b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6243b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6244b042e37fSmrg ;; 6245b042e37fSmrg esac 6246b042e37fSmrg ;; 6247b042e37fSmrg vxworks*) 6248b042e37fSmrg ;; 6249b042e37fSmrg *) 6250b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6251b042e37fSmrg ;; 6252b042e37fSmrg esac 6253b042e37fSmrg fi 6254b042e37fSmrg], 6255b042e37fSmrg[ 6256b042e37fSmrg if test "$GCC" = yes; then 6257b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6258b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 6259b042e37fSmrg 6260b042e37fSmrg case $host_os in 6261b042e37fSmrg aix*) 6262b042e37fSmrg # All AIX code is PIC. 6263b042e37fSmrg if test "$host_cpu" = ia64; then 6264b042e37fSmrg # AIX 5 now supports IA64 processor 6265b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6266b042e37fSmrg fi 6267b042e37fSmrg ;; 6268b042e37fSmrg 6269b042e37fSmrg amigaos*) 6270b042e37fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 6271b042e37fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 6272b042e37fSmrg # like `-m68040'. 6273b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6274b042e37fSmrg ;; 6275b042e37fSmrg 6276b042e37fSmrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6277b042e37fSmrg # PIC is the default for these OSes. 6278b042e37fSmrg ;; 6279b042e37fSmrg 6280b042e37fSmrg mingw* | pw32* | os2*) 6281b042e37fSmrg # This hack is so that the source file can tell whether it is being 6282b042e37fSmrg # built for inclusion in a dll (and should export symbols for example). 6283b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 6284b042e37fSmrg ;; 6285b042e37fSmrg 6286b042e37fSmrg darwin* | rhapsody*) 6287b042e37fSmrg # PIC is the default on this platform 6288b042e37fSmrg # Common symbols not allowed in MH_DYLIB files 6289b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6290b042e37fSmrg ;; 6291b042e37fSmrg 6292b042e37fSmrg interix3*) 6293b042e37fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6294b042e37fSmrg # Instead, we relocate shared libraries at runtime. 6295b042e37fSmrg ;; 6296b042e37fSmrg 6297b042e37fSmrg msdosdjgpp*) 6298b042e37fSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 6299b042e37fSmrg # on systems that don't support them. 6300b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6301b042e37fSmrg enable_shared=no 6302b042e37fSmrg ;; 6303b042e37fSmrg 6304b042e37fSmrg sysv4*MP*) 6305b042e37fSmrg if test -d /usr/nec; then 6306b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6307b042e37fSmrg fi 6308b042e37fSmrg ;; 6309b042e37fSmrg 6310b042e37fSmrg hpux*) 6311b042e37fSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6312b042e37fSmrg # not for PA HP-UX. 6313b042e37fSmrg case $host_cpu in 6314b042e37fSmrg hppa*64*|ia64*) 6315b042e37fSmrg # +Z the default 6316b042e37fSmrg ;; 6317b042e37fSmrg *) 6318b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6319b042e37fSmrg ;; 6320b042e37fSmrg esac 6321b042e37fSmrg ;; 6322b042e37fSmrg 6323b042e37fSmrg *) 6324b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6325b042e37fSmrg ;; 6326b042e37fSmrg esac 6327b042e37fSmrg else 6328b042e37fSmrg # PORTME Check for flag to pass linker flags through the system compiler. 6329b042e37fSmrg case $host_os in 6330b042e37fSmrg aix*) 6331b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6332b042e37fSmrg if test "$host_cpu" = ia64; then 6333b042e37fSmrg # AIX 5 now supports IA64 processor 6334b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6335b042e37fSmrg else 6336b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6337b042e37fSmrg fi 6338b042e37fSmrg ;; 6339b042e37fSmrg darwin*) 6340b042e37fSmrg # PIC is the default on this platform 6341b042e37fSmrg # Common symbols not allowed in MH_DYLIB files 6342b042e37fSmrg case $cc_basename in 6343b042e37fSmrg xlc*) 6344b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 6345b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6346b042e37fSmrg ;; 6347b042e37fSmrg esac 6348b042e37fSmrg ;; 6349b042e37fSmrg 6350b042e37fSmrg mingw* | pw32* | os2*) 6351b042e37fSmrg # This hack is so that the source file can tell whether it is being 6352b042e37fSmrg # built for inclusion in a dll (and should export symbols for example). 6353b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 6354b042e37fSmrg ;; 6355b042e37fSmrg 6356b042e37fSmrg hpux9* | hpux10* | hpux11*) 6357b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6358b042e37fSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6359b042e37fSmrg # not for PA HP-UX. 6360b042e37fSmrg case $host_cpu in 6361b042e37fSmrg hppa*64*|ia64*) 6362b042e37fSmrg # +Z the default 6363b042e37fSmrg ;; 6364b042e37fSmrg *) 6365b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6366b042e37fSmrg ;; 6367b042e37fSmrg esac 6368b042e37fSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 6369b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6370b042e37fSmrg ;; 6371b042e37fSmrg 6372b042e37fSmrg irix5* | irix6* | nonstopux*) 6373b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6374b042e37fSmrg # PIC (with -KPIC) is the default. 6375b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6376b042e37fSmrg ;; 6377b042e37fSmrg 6378b042e37fSmrg newsos6) 6379b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6380b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6381b042e37fSmrg ;; 6382b042e37fSmrg 6383b042e37fSmrg linux*) 6384b042e37fSmrg case $cc_basename in 6385b042e37fSmrg icc* | ecc*) 6386b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6387b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6388b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 6389b042e37fSmrg ;; 6390b042e37fSmrg pgcc* | pgf77* | pgf90* | pgf95*) 6391b042e37fSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 6392b042e37fSmrg # which looks to be a dead project) 6393b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6394b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6395b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6396b042e37fSmrg ;; 6397b042e37fSmrg ccc*) 6398b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6399b042e37fSmrg # All Alpha code is PIC. 6400b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6401b042e37fSmrg ;; 6402b042e37fSmrg esac 6403b042e37fSmrg ;; 6404b042e37fSmrg 6405b042e37fSmrg osf3* | osf4* | osf5*) 6406b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6407b042e37fSmrg # All OSF/1 code is PIC. 6408b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6409b042e37fSmrg ;; 6410b042e37fSmrg 6411b042e37fSmrg solaris*) 6412b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6413b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6414b042e37fSmrg case $cc_basename in 6415b042e37fSmrg f77* | f90* | f95*) 6416b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 6417b042e37fSmrg *) 6418b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 6419b042e37fSmrg esac 6420b042e37fSmrg ;; 6421b042e37fSmrg 6422b042e37fSmrg sunos4*) 6423b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6424b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6425b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6426b042e37fSmrg ;; 6427b042e37fSmrg 6428b042e37fSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 6429b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6430b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6431b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6432b042e37fSmrg ;; 6433b042e37fSmrg 6434b042e37fSmrg sysv4*MP*) 6435b042e37fSmrg if test -d /usr/nec ;then 6436b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 6437b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6438b042e37fSmrg fi 6439b042e37fSmrg ;; 6440b042e37fSmrg 6441b042e37fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6442b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6443b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6444b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6445b042e37fSmrg ;; 6446b042e37fSmrg 6447b042e37fSmrg unicos*) 6448b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6449b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6450b042e37fSmrg ;; 6451b042e37fSmrg 6452b042e37fSmrg uts4*) 6453b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6454b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6455b042e37fSmrg ;; 6456b042e37fSmrg 6457b042e37fSmrg *) 6458b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6459b042e37fSmrg ;; 6460b042e37fSmrg esac 6461b042e37fSmrg fi 6462b042e37fSmrg]) 6463b042e37fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 6464b042e37fSmrg 6465b042e37fSmrg# 6466b042e37fSmrg# Check to make sure the PIC flag actually works. 6467b042e37fSmrg# 6468b042e37fSmrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 6469b042e37fSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 6470b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 6471b042e37fSmrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 6472b042e37fSmrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 6473b042e37fSmrg "" | " "*) ;; 6474b042e37fSmrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 6475b042e37fSmrg esac], 6476b042e37fSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6477b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 6478b042e37fSmrgfi 6479b042e37fSmrgcase $host_os in 6480b042e37fSmrg # For platforms which do not support PIC, -DPIC is meaningless: 6481b042e37fSmrg *djgpp*) 6482b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6483b042e37fSmrg ;; 6484b042e37fSmrg *) 6485b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 6486b042e37fSmrg ;; 6487b042e37fSmrgesac 6488b042e37fSmrg 6489b042e37fSmrg# 6490b042e37fSmrg# Check to make sure the static flag actually works. 6491b042e37fSmrg# 6492b042e37fSmrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 6493b042e37fSmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 6494b042e37fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 6495b042e37fSmrg $lt_tmp_static_flag, 6496b042e37fSmrg [], 6497b042e37fSmrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 6498b042e37fSmrg]) 6499b042e37fSmrg 6500b042e37fSmrg 6501b042e37fSmrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 6502b042e37fSmrg# ------------------------------------ 6503b042e37fSmrg# See if the linker supports building shared libraries. 6504b042e37fSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 6505b042e37fSmrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6506b042e37fSmrgifelse([$1],[CXX],[ 6507b042e37fSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6508b042e37fSmrg case $host_os in 6509b042e37fSmrg aix4* | aix5*) 6510b042e37fSmrg # If we're using GNU nm, then we don't want the "-C" option. 6511b042e37fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 6512b042e37fSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 6513b042e37fSmrg _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' 6514b042e37fSmrg else 6515b042e37fSmrg _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' 6516b042e37fSmrg fi 6517b042e37fSmrg ;; 6518b042e37fSmrg pw32*) 6519b042e37fSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 6520b042e37fSmrg ;; 6521b042e37fSmrg cygwin* | mingw*) 6522b042e37fSmrg _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' 6523b042e37fSmrg ;; 6524b042e37fSmrg *) 6525b042e37fSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6526b042e37fSmrg ;; 6527b042e37fSmrg esac 6528b042e37fSmrg],[ 6529b042e37fSmrg runpath_var= 6530b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 6531b042e37fSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6532b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)= 6533b042e37fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 6534b042e37fSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 6535b042e37fSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 6536b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 6537b042e37fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 6538b042e37fSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 6539b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 6540b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6541b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 6542b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6543b042e37fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 6544b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6545b042e37fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 6546b042e37fSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 6547b042e37fSmrg _LT_AC_TAGVAR(module_cmds, $1)= 6548b042e37fSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 6549b042e37fSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 6550b042e37fSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6551b042e37fSmrg # include_expsyms should be a list of space-separated symbols to be *always* 6552b042e37fSmrg # included in the symbol list 6553b042e37fSmrg _LT_AC_TAGVAR(include_expsyms, $1)= 6554b042e37fSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 6555b042e37fSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 6556b042e37fSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 6557b042e37fSmrg # as well as any symbol that contains `d'. 6558b042e37fSmrg _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 6559b042e37fSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 6560b042e37fSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 6561b042e37fSmrg # the symbol is explicitly referenced. Since portable code cannot 6562b042e37fSmrg # rely on this symbol name, it's probably fine to never include it in 6563b042e37fSmrg # preloaded symbol tables. 6564b042e37fSmrg extract_expsyms_cmds= 6565b042e37fSmrg # Just being paranoid about ensuring that cc_basename is set. 6566b042e37fSmrg _LT_CC_BASENAME([$compiler]) 6567b042e37fSmrg case $host_os in 6568b042e37fSmrg cygwin* | mingw* | pw32*) 6569b042e37fSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 6570b042e37fSmrg # When not using gcc, we currently assume that we are using 6571b042e37fSmrg # Microsoft Visual C++. 6572b042e37fSmrg if test "$GCC" != yes; then 6573b042e37fSmrg with_gnu_ld=no 6574b042e37fSmrg fi 6575b042e37fSmrg ;; 6576b042e37fSmrg interix*) 6577b042e37fSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 6578b042e37fSmrg with_gnu_ld=yes 6579b042e37fSmrg ;; 6580b042e37fSmrg openbsd*) 6581b042e37fSmrg with_gnu_ld=no 6582b042e37fSmrg ;; 6583b042e37fSmrg esac 6584b042e37fSmrg 6585b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 6586b042e37fSmrg if test "$with_gnu_ld" = yes; then 6587b042e37fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 6588b042e37fSmrg wlarc='${wl}' 6589b042e37fSmrg 6590b042e37fSmrg # Set some defaults for GNU ld with shared library support. These 6591b042e37fSmrg # are reset later if shared libraries are not supported. Putting them 6592b042e37fSmrg # here allows them to be overridden if necessary. 6593b042e37fSmrg runpath_var=LD_RUN_PATH 6594b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6595b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6596b042e37fSmrg # ancient GNU ld didn't support --whole-archive et. al. 6597b042e37fSmrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 6598b042e37fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6599b042e37fSmrg else 6600b042e37fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 6601b042e37fSmrg fi 6602b042e37fSmrg supports_anon_versioning=no 6603b042e37fSmrg case `$LD -v 2>/dev/null` in 6604b042e37fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 6605b042e37fSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 6606b042e37fSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 6607b042e37fSmrg *\ 2.11.*) ;; # other 2.11 versions 6608b042e37fSmrg *) supports_anon_versioning=yes ;; 6609b042e37fSmrg esac 6610b042e37fSmrg 6611b042e37fSmrg # See if GNU ld supports shared libraries. 6612b042e37fSmrg case $host_os in 6613b042e37fSmrg aix3* | aix4* | aix5*) 6614b042e37fSmrg # On AIX/PPC, the GNU linker is very broken 6615b042e37fSmrg if test "$host_cpu" != ia64; then 6616b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6617b042e37fSmrg cat <<EOF 1>&2 6618b042e37fSmrg 6619b042e37fSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 6620b042e37fSmrg*** to be unable to reliably create shared libraries on AIX. 6621b042e37fSmrg*** Therefore, libtool is disabling shared libraries support. If you 6622b042e37fSmrg*** really care for shared libraries, you may want to modify your PATH 6623b042e37fSmrg*** so that a non-GNU linker is found, and then restart. 6624b042e37fSmrg 6625b042e37fSmrgEOF 6626b042e37fSmrg fi 6627b042e37fSmrg ;; 6628b042e37fSmrg 6629b042e37fSmrg amigaos*) 6630b042e37fSmrg _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)' 6631b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6632b042e37fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6633b042e37fSmrg 6634b042e37fSmrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 6635b042e37fSmrg # that the semantics of dynamic libraries on AmigaOS, at least up 6636b042e37fSmrg # to version 4, is to share data among multiple programs linked 6637b042e37fSmrg # with the same dynamic library. Since this doesn't match the 6638b042e37fSmrg # behavior of shared libraries on other platforms, we can't use 6639b042e37fSmrg # them. 6640b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6641b042e37fSmrg ;; 6642b042e37fSmrg 6643b042e37fSmrg beos*) 6644b042e37fSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 6645b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6646b042e37fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6647b042e37fSmrg # support --undefined. This deserves some investigation. FIXME 6648b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6649b042e37fSmrg else 6650b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6651b042e37fSmrg fi 6652b042e37fSmrg ;; 6653b042e37fSmrg 6654b042e37fSmrg cygwin* | mingw* | pw32*) 6655b042e37fSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6656b042e37fSmrg # as there is no search path for DLLs. 6657b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6658b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6659b042e37fSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 6660b042e37fSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6661b042e37fSmrg _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' 6662b042e37fSmrg 6663b042e37fSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 6664b042e37fSmrg _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' 6665b042e37fSmrg # If the export-symbols file already is a .def file (1st line 6666b042e37fSmrg # is EXPORTS), use it as is; otherwise, prepend... 6667b042e37fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6668b042e37fSmrg cp $export_symbols $output_objdir/$soname.def; 6669b042e37fSmrg else 6670b042e37fSmrg echo EXPORTS > $output_objdir/$soname.def; 6671b042e37fSmrg cat $export_symbols >> $output_objdir/$soname.def; 6672b042e37fSmrg fi~ 6673b042e37fSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 6674b042e37fSmrg else 6675b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6676b042e37fSmrg fi 6677b042e37fSmrg ;; 6678b042e37fSmrg 6679b042e37fSmrg interix3*) 6680b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6681b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6682b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6683b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6684b042e37fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6685b042e37fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6686b042e37fSmrg # default) and relocated if they conflict, which is a slow very memory 6687b042e37fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 6688b042e37fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6689b042e37fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6690b042e37fSmrg _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' 6691b042e37fSmrg _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' 6692b042e37fSmrg ;; 6693b042e37fSmrg 6694b042e37fSmrg linux*) 6695b042e37fSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 6696b042e37fSmrg tmp_addflag= 6697b042e37fSmrg case $cc_basename,$host_cpu in 6698b042e37fSmrg pgcc*) # Portland Group C compiler 6699b042e37fSmrg _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' 6700b042e37fSmrg tmp_addflag=' $pic_flag' 6701b042e37fSmrg ;; 6702b042e37fSmrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 6703b042e37fSmrg _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' 6704b042e37fSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 6705b042e37fSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 6706b042e37fSmrg tmp_addflag=' -i_dynamic' ;; 6707b042e37fSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 6708b042e37fSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 6709b042e37fSmrg ifc* | ifort*) # Intel Fortran compiler 6710b042e37fSmrg tmp_addflag=' -nofor_main' ;; 6711b042e37fSmrg esac 6712b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6713b042e37fSmrg 6714b042e37fSmrg if test $supports_anon_versioning = yes; then 6715b042e37fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 6716b042e37fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6717b042e37fSmrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 6718b042e37fSmrg $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6719b042e37fSmrg fi 6720b042e37fSmrg else 6721b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6722b042e37fSmrg fi 6723b042e37fSmrg ;; 6724b042e37fSmrg 6725b042e37fSmrg netbsd*) 6726b042e37fSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 6727b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 6728b042e37fSmrg wlarc= 6729b042e37fSmrg else 6730b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6731b042e37fSmrg _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' 6732b042e37fSmrg fi 6733b042e37fSmrg ;; 6734b042e37fSmrg 6735b042e37fSmrg solaris*) 6736b042e37fSmrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 6737b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6738b042e37fSmrg cat <<EOF 1>&2 6739b042e37fSmrg 6740b042e37fSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 6741b042e37fSmrg*** create shared libraries on Solaris systems. Therefore, libtool 6742b042e37fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 6743b042e37fSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 6744b042e37fSmrg*** your PATH or compiler configuration so that the native linker is 6745b042e37fSmrg*** used, and then restart. 6746b042e37fSmrg 6747b042e37fSmrgEOF 6748b042e37fSmrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 6749b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6750b042e37fSmrg _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' 6751b042e37fSmrg else 6752b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6753b042e37fSmrg fi 6754b042e37fSmrg ;; 6755b042e37fSmrg 6756b042e37fSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 6757b042e37fSmrg case `$LD -v 2>&1` in 6758b042e37fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 6759b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6760b042e37fSmrg cat <<_LT_EOF 1>&2 6761b042e37fSmrg 6762b042e37fSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 6763b042e37fSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 6764b042e37fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 6765b042e37fSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 6766b042e37fSmrg*** your PATH or compiler configuration so that the native linker is 6767b042e37fSmrg*** used, and then restart. 6768b042e37fSmrg 6769b042e37fSmrg_LT_EOF 6770b042e37fSmrg ;; 6771b042e37fSmrg *) 6772b042e37fSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 6773b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 6774b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 6775b042e37fSmrg _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' 6776b042e37fSmrg else 6777b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6778b042e37fSmrg fi 6779b042e37fSmrg ;; 6780b042e37fSmrg esac 6781b042e37fSmrg ;; 6782b042e37fSmrg 6783b042e37fSmrg sunos4*) 6784b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6785b042e37fSmrg wlarc= 6786b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6787b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6788b042e37fSmrg ;; 6789b042e37fSmrg 6790b042e37fSmrg *) 6791b042e37fSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 6792b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6793b042e37fSmrg _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' 6794b042e37fSmrg else 6795b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6796b042e37fSmrg fi 6797b042e37fSmrg ;; 6798b042e37fSmrg esac 6799b042e37fSmrg 6800b042e37fSmrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 6801b042e37fSmrg runpath_var= 6802b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 6803b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 6804b042e37fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 6805b042e37fSmrg fi 6806b042e37fSmrg else 6807b042e37fSmrg # PORTME fill in a description of your system's linker (not GNU ld) 6808b042e37fSmrg case $host_os in 6809b042e37fSmrg aix3*) 6810b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6811b042e37fSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 6812b042e37fSmrg _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' 6813b042e37fSmrg # Note: this linker hardcodes the directories in LIBPATH if there 6814b042e37fSmrg # are no directories specified by -L. 6815b042e37fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6816b042e37fSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 6817b042e37fSmrg # Neither direct hardcoding nor static linking is supported with a 6818b042e37fSmrg # broken collect2. 6819b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 6820b042e37fSmrg fi 6821b042e37fSmrg ;; 6822b042e37fSmrg 6823b042e37fSmrg aix4* | aix5*) 6824b042e37fSmrg if test "$host_cpu" = ia64; then 6825b042e37fSmrg # On IA64, the linker does run time linking by default, so we don't 6826b042e37fSmrg # have to do anything special. 6827b042e37fSmrg aix_use_runtimelinking=no 6828b042e37fSmrg exp_sym_flag='-Bexport' 6829b042e37fSmrg no_entry_flag="" 6830b042e37fSmrg else 6831b042e37fSmrg # If we're using GNU nm, then we don't want the "-C" option. 6832b042e37fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 6833b042e37fSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 6834b042e37fSmrg _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' 6835b042e37fSmrg else 6836b042e37fSmrg _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' 6837b042e37fSmrg fi 6838b042e37fSmrg aix_use_runtimelinking=no 6839b042e37fSmrg 6840b042e37fSmrg # Test if we are trying to use run time linking or normal 6841b042e37fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6842b042e37fSmrg # need to do runtime linking. 6843b042e37fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 6844b042e37fSmrg for ld_flag in $LDFLAGS; do 6845b042e37fSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 6846b042e37fSmrg aix_use_runtimelinking=yes 6847b042e37fSmrg break 6848b042e37fSmrg fi 6849b042e37fSmrg done 6850b042e37fSmrg ;; 6851b042e37fSmrg esac 6852b042e37fSmrg 6853b042e37fSmrg exp_sym_flag='-bexport' 6854b042e37fSmrg no_entry_flag='-bnoentry' 6855b042e37fSmrg fi 6856b042e37fSmrg 6857b042e37fSmrg # When large executables or shared objects are built, AIX ld can 6858b042e37fSmrg # have problems creating the table of contents. If linking a library 6859b042e37fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 6860b042e37fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6861b042e37fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6862b042e37fSmrg 6863b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 6864b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6865b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 6866b042e37fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6867b042e37fSmrg 6868b042e37fSmrg if test "$GCC" = yes; then 6869b042e37fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6870b042e37fSmrg # We only want to do this on AIX 4.2 and lower, the check 6871b042e37fSmrg # below for broken collect2 doesn't work under 4.3+ 6872b042e37fSmrg collect2name=`${CC} -print-prog-name=collect2` 6873b042e37fSmrg if test -f "$collect2name" && \ 6874b042e37fSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 6875b042e37fSmrg then 6876b042e37fSmrg # We have reworked collect2 6877b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6878b042e37fSmrg else 6879b042e37fSmrg # We have old collect2 6880b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 6881b042e37fSmrg # It fails to find uninstalled libraries when the uninstalled 6882b042e37fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 6883b042e37fSmrg # to unsupported forces relinking 6884b042e37fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6885b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6886b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 6887b042e37fSmrg fi 6888b042e37fSmrg ;; 6889b042e37fSmrg esac 6890b042e37fSmrg shared_flag='-shared' 6891b042e37fSmrg if test "$aix_use_runtimelinking" = yes; then 6892b042e37fSmrg shared_flag="$shared_flag "'${wl}-G' 6893b042e37fSmrg fi 6894b042e37fSmrg else 6895b042e37fSmrg # not using gcc 6896b042e37fSmrg if test "$host_cpu" = ia64; then 6897b042e37fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6898b042e37fSmrg # chokes on -Wl,-G. The following line is correct: 6899b042e37fSmrg shared_flag='-G' 6900b042e37fSmrg else 6901b042e37fSmrg if test "$aix_use_runtimelinking" = yes; then 6902b042e37fSmrg shared_flag='${wl}-G' 6903b042e37fSmrg else 6904b042e37fSmrg shared_flag='${wl}-bM:SRE' 6905b042e37fSmrg fi 6906b042e37fSmrg fi 6907b042e37fSmrg fi 6908b042e37fSmrg 6909b042e37fSmrg # It seems that -bexpall does not export symbols beginning with 6910b042e37fSmrg # underscore (_), so it is better to generate a list of symbols to export. 6911b042e37fSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 6912b042e37fSmrg if test "$aix_use_runtimelinking" = yes; then 6913b042e37fSmrg # Warning - without using the other runtime loading flags (-brtl), 6914b042e37fSmrg # -berok will link without error, but may produce a broken library. 6915b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 6916b042e37fSmrg # Determine the default libpath from the value encoded in an empty executable. 6917b042e37fSmrg _LT_AC_SYS_LIBPATH_AIX 6918b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6919b042e37fSmrg _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" 6920b042e37fSmrg else 6921b042e37fSmrg if test "$host_cpu" = ia64; then 6922b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6923b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6924b042e37fSmrg _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" 6925b042e37fSmrg else 6926b042e37fSmrg # Determine the default libpath from the value encoded in an empty executable. 6927b042e37fSmrg _LT_AC_SYS_LIBPATH_AIX 6928b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6929b042e37fSmrg # Warning - without using the other run time loading flags, 6930b042e37fSmrg # -berok will link without error, but may produce a broken library. 6931b042e37fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6932b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6933b042e37fSmrg # Exported symbols can be pulled into shared objects from archives 6934b042e37fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6935b042e37fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6936b042e37fSmrg # This is similar to how AIX traditionally builds its shared libraries. 6937b042e37fSmrg _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' 6938b042e37fSmrg fi 6939b042e37fSmrg fi 6940b042e37fSmrg ;; 6941b042e37fSmrg 6942b042e37fSmrg amigaos*) 6943b042e37fSmrg _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)' 6944b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6945b042e37fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6946b042e37fSmrg # see comment about different semantics on the GNU ld section 6947b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6948b042e37fSmrg ;; 6949b042e37fSmrg 6950b042e37fSmrg bsdi[[45]]*) 6951b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6952b042e37fSmrg ;; 6953b042e37fSmrg 6954b042e37fSmrg cygwin* | mingw* | pw32*) 6955b042e37fSmrg # When not using gcc, we currently assume that we are using 6956b042e37fSmrg # Microsoft Visual C++. 6957b042e37fSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6958b042e37fSmrg # no search path for DLLs. 6959b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6960b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6961b042e37fSmrg # Tell ltmain to make .lib files, not .a files. 6962b042e37fSmrg libext=lib 6963b042e37fSmrg # Tell ltmain to make .dll files, not .so files. 6964b042e37fSmrg shrext_cmds=".dll" 6965b042e37fSmrg # FIXME: Setting linknames here is a bad hack. 6966b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 6967b042e37fSmrg # The linker will automatically build a .lib file if we build a DLL. 6968b042e37fSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 6969b042e37fSmrg # FIXME: Should let the user specify the lib program. 6970b042e37fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 6971b042e37fSmrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 6972b042e37fSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6973b042e37fSmrg ;; 6974b042e37fSmrg 6975b042e37fSmrg darwin* | rhapsody*) 6976b042e37fSmrg case $host_os in 6977b042e37fSmrg rhapsody* | darwin1.[[012]]) 6978b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 6979b042e37fSmrg ;; 6980b042e37fSmrg *) # Darwin 1.3 on 6981b042e37fSmrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 6982b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6983b042e37fSmrg else 6984b042e37fSmrg case ${MACOSX_DEPLOYMENT_TARGET} in 6985b042e37fSmrg 10.[[012]]) 6986b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6987b042e37fSmrg ;; 6988b042e37fSmrg 10.*) 6989b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 6990b042e37fSmrg ;; 6991b042e37fSmrg esac 6992b042e37fSmrg fi 6993b042e37fSmrg ;; 6994b042e37fSmrg esac 6995b042e37fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6996b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6997b042e37fSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 6998b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6999b042e37fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 7000b042e37fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 7001b042e37fSmrg if test "$GCC" = yes ; then 7002b042e37fSmrg output_verbose_link_cmd='echo' 7003b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 7004b042e37fSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 7005b042e37fSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 7006b042e37fSmrg _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}' 7007b042e37fSmrg _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}' 7008b042e37fSmrg else 7009b042e37fSmrg case $cc_basename in 7010b042e37fSmrg xlc*) 7011b042e37fSmrg output_verbose_link_cmd='echo' 7012b042e37fSmrg _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' 7013b042e37fSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 7014b042e37fSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 7015b042e37fSmrg _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}' 7016b042e37fSmrg _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}' 7017b042e37fSmrg ;; 7018b042e37fSmrg *) 7019b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7020b042e37fSmrg ;; 7021b042e37fSmrg esac 7022b042e37fSmrg fi 7023b042e37fSmrg ;; 7024b042e37fSmrg 7025b042e37fSmrg dgux*) 7026b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7027b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7028b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7029b042e37fSmrg ;; 7030b042e37fSmrg 7031b042e37fSmrg freebsd1*) 7032b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7033b042e37fSmrg ;; 7034b042e37fSmrg 7035b042e37fSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 7036b042e37fSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 7037b042e37fSmrg # does not break anything, and helps significantly (at the cost of a little 7038b042e37fSmrg # extra space). 7039b042e37fSmrg freebsd2.2*) 7040b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 7041b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7042b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7043b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7044b042e37fSmrg ;; 7045b042e37fSmrg 7046b042e37fSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 7047b042e37fSmrg freebsd2*) 7048b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7049b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7050b042e37fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7051b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7052b042e37fSmrg ;; 7053b042e37fSmrg 7054b042e37fSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 7055b042e37fSmrg freebsd* | kfreebsd*-gnu | dragonfly*) 7056b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 7057b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7058b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7059b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7060b042e37fSmrg ;; 7061b042e37fSmrg 7062b042e37fSmrg hpux9*) 7063b042e37fSmrg if test "$GCC" = yes; then 7064b042e37fSmrg _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' 7065b042e37fSmrg else 7066b042e37fSmrg _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' 7067b042e37fSmrg fi 7068b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7069b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7070b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7071b042e37fSmrg 7072b042e37fSmrg # hardcode_minus_L: Not really in the search PATH, 7073b042e37fSmrg # but as the default location of the library. 7074b042e37fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7075b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7076b042e37fSmrg ;; 7077b042e37fSmrg 7078b042e37fSmrg hpux10*) 7079b042e37fSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 7080b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7081b042e37fSmrg else 7082b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 7083b042e37fSmrg fi 7084b042e37fSmrg if test "$with_gnu_ld" = no; then 7085b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7086b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7087b042e37fSmrg 7088b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7089b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7090b042e37fSmrg 7091b042e37fSmrg # hardcode_minus_L: Not really in the search PATH, 7092b042e37fSmrg # but as the default location of the library. 7093b042e37fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7094b042e37fSmrg fi 7095b042e37fSmrg ;; 7096b042e37fSmrg 7097b042e37fSmrg hpux11*) 7098b042e37fSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 7099b042e37fSmrg case $host_cpu in 7100b042e37fSmrg hppa*64*) 7101b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7102b042e37fSmrg ;; 7103b042e37fSmrg ia64*) 7104b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7105b042e37fSmrg ;; 7106b042e37fSmrg *) 7107b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7108b042e37fSmrg ;; 7109b042e37fSmrg esac 7110b042e37fSmrg else 7111b042e37fSmrg case $host_cpu in 7112b042e37fSmrg hppa*64*) 7113b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7114b042e37fSmrg ;; 7115b042e37fSmrg ia64*) 7116b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7117b042e37fSmrg ;; 7118b042e37fSmrg *) 7119b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7120b042e37fSmrg ;; 7121b042e37fSmrg esac 7122b042e37fSmrg fi 7123b042e37fSmrg if test "$with_gnu_ld" = no; then 7124b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7125b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7126b042e37fSmrg 7127b042e37fSmrg case $host_cpu in 7128b042e37fSmrg hppa*64*|ia64*) 7129b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 7130b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 7131b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7132b042e37fSmrg ;; 7133b042e37fSmrg *) 7134b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7135b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7136b042e37fSmrg 7137b042e37fSmrg # hardcode_minus_L: Not really in the search PATH, 7138b042e37fSmrg # but as the default location of the library. 7139b042e37fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7140b042e37fSmrg ;; 7141b042e37fSmrg esac 7142b042e37fSmrg fi 7143b042e37fSmrg ;; 7144b042e37fSmrg 7145b042e37fSmrg irix5* | irix6* | nonstopux*) 7146b042e37fSmrg if test "$GCC" = yes; then 7147b042e37fSmrg _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' 7148b042e37fSmrg else 7149b042e37fSmrg _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' 7150b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 7151b042e37fSmrg fi 7152b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7153b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7154b042e37fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 7155b042e37fSmrg ;; 7156b042e37fSmrg 7157b042e37fSmrg netbsd*) 7158b042e37fSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 7159b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 7160b042e37fSmrg else 7161b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 7162b042e37fSmrg fi 7163b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7164b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7165b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7166b042e37fSmrg ;; 7167b042e37fSmrg 7168b042e37fSmrg newsos6) 7169b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7170b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7171b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7172b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7173b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7174b042e37fSmrg ;; 7175b042e37fSmrg 7176b042e37fSmrg openbsd*) 7177b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7178b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7179b042e37fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7180b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7181b042e37fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 7182b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7183b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7184b042e37fSmrg else 7185b042e37fSmrg case $host_os in 7186b042e37fSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 7187b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7188b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7189b042e37fSmrg ;; 7190b042e37fSmrg *) 7191b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7192b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7193b042e37fSmrg ;; 7194b042e37fSmrg esac 7195b042e37fSmrg fi 7196b042e37fSmrg ;; 7197b042e37fSmrg 7198b042e37fSmrg os2*) 7199b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7200b042e37fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7201b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 7202b042e37fSmrg _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' 7203b042e37fSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 7204b042e37fSmrg ;; 7205b042e37fSmrg 7206b042e37fSmrg osf3*) 7207b042e37fSmrg if test "$GCC" = yes; then 7208b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7209b042e37fSmrg _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' 7210b042e37fSmrg else 7211b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7212b042e37fSmrg _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' 7213b042e37fSmrg fi 7214b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7215b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7216b042e37fSmrg ;; 7217b042e37fSmrg 7218b042e37fSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 7219b042e37fSmrg if test "$GCC" = yes; then 7220b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7221b042e37fSmrg _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' 7222b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7223b042e37fSmrg else 7224b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7225b042e37fSmrg _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' 7226b042e37fSmrg _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~ 7227b042e37fSmrg $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' 7228b042e37fSmrg 7229b042e37fSmrg # Both c and cxx compiler support -rpath directly 7230b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7231b042e37fSmrg fi 7232b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7233b042e37fSmrg ;; 7234b042e37fSmrg 7235b042e37fSmrg solaris*) 7236b042e37fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 7237b042e37fSmrg if test "$GCC" = yes; then 7238b042e37fSmrg wlarc='${wl}' 7239b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7240b042e37fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 7241b042e37fSmrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 7242b042e37fSmrg else 7243b042e37fSmrg wlarc='' 7244b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 7245b042e37fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 7246b042e37fSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 7247b042e37fSmrg fi 7248b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7249b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7250b042e37fSmrg case $host_os in 7251b042e37fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7252b042e37fSmrg *) 7253b042e37fSmrg # The compiler driver will combine linker options so we 7254b042e37fSmrg # cannot just pass the convience library names through 7255b042e37fSmrg # without $wl, iff we do not link with $LD. 7256b042e37fSmrg # Luckily, gcc supports the same syntax we need for Sun Studio. 7257b042e37fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7258b042e37fSmrg case $wlarc in 7259b042e37fSmrg '') 7260b042e37fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 7261b042e37fSmrg *) 7262b042e37fSmrg _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' ;; 7263b042e37fSmrg esac ;; 7264b042e37fSmrg esac 7265b042e37fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 7266b042e37fSmrg ;; 7267b042e37fSmrg 7268b042e37fSmrg sunos4*) 7269b042e37fSmrg if test "x$host_vendor" = xsequent; then 7270b042e37fSmrg # Use $CC to link under sequent, because it throws in some extra .o 7271b042e37fSmrg # files that make .init and .fini sections work. 7272b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 7273b042e37fSmrg else 7274b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 7275b042e37fSmrg fi 7276b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7277b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7278b042e37fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7279b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7280b042e37fSmrg ;; 7281b042e37fSmrg 7282b042e37fSmrg sysv4) 7283b042e37fSmrg case $host_vendor in 7284b042e37fSmrg sni) 7285b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7286b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 7287b042e37fSmrg ;; 7288b042e37fSmrg siemens) 7289b042e37fSmrg ## LD is ld it makes a PLAMLIB 7290b042e37fSmrg ## CC just makes a GrossModule. 7291b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 7292b042e37fSmrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 7293b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 7294b042e37fSmrg ;; 7295b042e37fSmrg motorola) 7296b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7297b042e37fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 7298b042e37fSmrg ;; 7299b042e37fSmrg esac 7300b042e37fSmrg runpath_var='LD_RUN_PATH' 7301b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7302b042e37fSmrg ;; 7303b042e37fSmrg 7304b042e37fSmrg sysv4.3*) 7305b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7306b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7307b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 7308b042e37fSmrg ;; 7309b042e37fSmrg 7310b042e37fSmrg sysv4*MP*) 7311b042e37fSmrg if test -d /usr/nec; then 7312b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7313b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7314b042e37fSmrg runpath_var=LD_RUN_PATH 7315b042e37fSmrg hardcode_runpath_var=yes 7316b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 7317b042e37fSmrg fi 7318b042e37fSmrg ;; 7319b042e37fSmrg 7320b042e37fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) 7321b042e37fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7322b042e37fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 7323b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7324b042e37fSmrg runpath_var='LD_RUN_PATH' 7325b042e37fSmrg 7326b042e37fSmrg if test "$GCC" = yes; then 7327b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7328b042e37fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7329b042e37fSmrg else 7330b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7331b042e37fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7332b042e37fSmrg fi 7333b042e37fSmrg ;; 7334b042e37fSmrg 7335b042e37fSmrg sysv5* | sco3.2v5* | sco5v6*) 7336b042e37fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 7337b042e37fSmrg # link with -lc, and that would cause any symbols used from libc to 7338b042e37fSmrg # always be unresolved, which means just about no library would 7339b042e37fSmrg # ever link correctly. If we're not using GNU ld we use -z text 7340b042e37fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 7341b042e37fSmrg # as -z defs. 7342b042e37fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7343b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7344b042e37fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 7345b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7346b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 7347b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 7348b042e37fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 7349b042e37fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7350b042e37fSmrg runpath_var='LD_RUN_PATH' 7351b042e37fSmrg 7352b042e37fSmrg if test "$GCC" = yes; then 7353b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 7354b042e37fSmrg _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' 7355b042e37fSmrg else 7356b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 7357b042e37fSmrg _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' 7358b042e37fSmrg fi 7359b042e37fSmrg ;; 7360b042e37fSmrg 7361b042e37fSmrg uts4*) 7362b042e37fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7363b042e37fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7364b042e37fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7365b042e37fSmrg ;; 7366b042e37fSmrg 7367b042e37fSmrg *) 7368b042e37fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7369b042e37fSmrg ;; 7370b042e37fSmrg esac 7371b042e37fSmrg fi 7372b042e37fSmrg]) 7373b042e37fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 7374b042e37fSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7375b042e37fSmrg 7376b042e37fSmrg# 7377b042e37fSmrg# Do we need to explicitly link libc? 7378b042e37fSmrg# 7379b042e37fSmrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 7380b042e37fSmrgx|xyes) 7381b042e37fSmrg # Assume -lc should be added 7382b042e37fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 7383b042e37fSmrg 7384b042e37fSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 7385b042e37fSmrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 7386b042e37fSmrg *'~'*) 7387b042e37fSmrg # FIXME: we may have to deal with multi-command sequences. 7388b042e37fSmrg ;; 7389b042e37fSmrg '$CC '*) 7390b042e37fSmrg # Test whether the compiler implicitly links with -lc since on some 7391b042e37fSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 7392b042e37fSmrg # to ld, don't add -lc before -lgcc. 7393b042e37fSmrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 7394b042e37fSmrg $rm conftest* 7395b042e37fSmrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 7396b042e37fSmrg 7397b042e37fSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 7398b042e37fSmrg soname=conftest 7399b042e37fSmrg lib=conftest 7400b042e37fSmrg libobjs=conftest.$ac_objext 7401b042e37fSmrg deplibs= 7402b042e37fSmrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 7403b042e37fSmrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 7404b042e37fSmrg compiler_flags=-v 7405b042e37fSmrg linker_flags=-v 7406b042e37fSmrg verstring= 7407b042e37fSmrg output_objdir=. 7408b042e37fSmrg libname=conftest 7409b042e37fSmrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 7410b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 7411b042e37fSmrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 7412b042e37fSmrg then 7413b042e37fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 7414b042e37fSmrg else 7415b042e37fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 7416b042e37fSmrg fi 7417b042e37fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 7418b042e37fSmrg else 7419b042e37fSmrg cat conftest.err 1>&5 7420b042e37fSmrg fi 7421b042e37fSmrg $rm conftest* 7422b042e37fSmrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 7423b042e37fSmrg ;; 7424b042e37fSmrg esac 7425b042e37fSmrg fi 7426b042e37fSmrg ;; 7427b042e37fSmrgesac 7428b042e37fSmrg])# AC_LIBTOOL_PROG_LD_SHLIBS 7429b042e37fSmrg 7430b042e37fSmrg 7431b042e37fSmrg# _LT_AC_FILE_LTDLL_C 7432b042e37fSmrg# ------------------- 7433b042e37fSmrg# Be careful that the start marker always follows a newline. 7434b042e37fSmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 7435b042e37fSmrg# /* ltdll.c starts here */ 7436b042e37fSmrg# #define WIN32_LEAN_AND_MEAN 7437b042e37fSmrg# #include <windows.h> 7438b042e37fSmrg# #undef WIN32_LEAN_AND_MEAN 7439b042e37fSmrg# #include <stdio.h> 7440b042e37fSmrg# 7441b042e37fSmrg# #ifndef __CYGWIN__ 7442b042e37fSmrg# # ifdef __CYGWIN32__ 7443b042e37fSmrg# # define __CYGWIN__ __CYGWIN32__ 7444b042e37fSmrg# # endif 7445b042e37fSmrg# #endif 7446b042e37fSmrg# 7447b042e37fSmrg# #ifdef __cplusplus 7448b042e37fSmrg# extern "C" { 7449b042e37fSmrg# #endif 7450b042e37fSmrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 7451b042e37fSmrg# #ifdef __cplusplus 7452b042e37fSmrg# } 7453b042e37fSmrg# #endif 7454b042e37fSmrg# 7455b042e37fSmrg# #ifdef __CYGWIN__ 7456b042e37fSmrg# #include <cygwin/cygwin_dll.h> 7457b042e37fSmrg# DECLARE_CYGWIN_DLL( DllMain ); 7458b042e37fSmrg# #endif 7459b042e37fSmrg# HINSTANCE __hDllInstance_base; 7460b042e37fSmrg# 7461b042e37fSmrg# BOOL APIENTRY 7462b042e37fSmrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 7463b042e37fSmrg# { 7464b042e37fSmrg# __hDllInstance_base = hInst; 7465b042e37fSmrg# return TRUE; 7466b042e37fSmrg# } 7467b042e37fSmrg# /* ltdll.c ends here */ 7468b042e37fSmrg])# _LT_AC_FILE_LTDLL_C 7469b042e37fSmrg 7470b042e37fSmrg 7471b042e37fSmrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 7472b042e37fSmrg# --------------------------------- 7473b042e37fSmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 7474b042e37fSmrg 7475b042e37fSmrg 7476b042e37fSmrg# old names 7477b042e37fSmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 7478b042e37fSmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 7479b042e37fSmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 7480b042e37fSmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 7481b042e37fSmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 7482b042e37fSmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 7483b042e37fSmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 7484b042e37fSmrg 7485b042e37fSmrg# This is just to silence aclocal about the macro not being used 7486b042e37fSmrgifelse([AC_DISABLE_FAST_INSTALL]) 7487b042e37fSmrg 7488b042e37fSmrgAC_DEFUN([LT_AC_PROG_GCJ], 7489b042e37fSmrg[AC_CHECK_TOOL(GCJ, gcj, no) 7490b042e37fSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7491b042e37fSmrg AC_SUBST(GCJFLAGS) 7492b042e37fSmrg]) 7493b042e37fSmrg 7494b042e37fSmrgAC_DEFUN([LT_AC_PROG_RC], 7495b042e37fSmrg[AC_CHECK_TOOL(RC, windres, no) 7496b042e37fSmrg]) 7497b042e37fSmrg 7498b042e37fSmrg# NOTE: This macro has been submitted for inclusion into # 7499b042e37fSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7500b042e37fSmrg# a released version of Autoconf we should remove this # 7501b042e37fSmrg# macro and use it instead. # 7502b042e37fSmrg# LT_AC_PROG_SED 7503b042e37fSmrg# -------------- 7504b042e37fSmrg# Check for a fully-functional sed program, that truncates 7505b042e37fSmrg# as few characters as possible. Prefer GNU sed if found. 7506b042e37fSmrgAC_DEFUN([LT_AC_PROG_SED], 7507b042e37fSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7508b042e37fSmrgAC_CACHE_VAL(lt_cv_path_SED, 7509b042e37fSmrg[# Loop through the user's path and test for sed and gsed. 7510b042e37fSmrg# Then use that list of sed's as ones to test for truncation. 7511b042e37fSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7512b042e37fSmrgfor as_dir in $PATH 7513b042e37fSmrgdo 7514b042e37fSmrg IFS=$as_save_IFS 7515b042e37fSmrg test -z "$as_dir" && as_dir=. 7516b042e37fSmrg for lt_ac_prog in sed gsed; do 7517b042e37fSmrg for ac_exec_ext in '' $ac_executable_extensions; do 7518b042e37fSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7519b042e37fSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7520b042e37fSmrg fi 7521b042e37fSmrg done 7522b042e37fSmrg done 7523b042e37fSmrgdone 7524b042e37fSmrglt_ac_max=0 7525b042e37fSmrglt_ac_count=0 7526b042e37fSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7527b042e37fSmrg# along with /bin/sed that truncates output. 7528b042e37fSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7529b042e37fSmrg test ! -f $lt_ac_sed && continue 7530b042e37fSmrg cat /dev/null > conftest.in 7531b042e37fSmrg lt_ac_count=0 7532b042e37fSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7533b042e37fSmrg # Check for GNU sed and select it if it is found. 7534b042e37fSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7535b042e37fSmrg lt_cv_path_SED=$lt_ac_sed 7536b042e37fSmrg break 7537b042e37fSmrg fi 7538b042e37fSmrg while true; do 7539b042e37fSmrg cat conftest.in conftest.in >conftest.tmp 7540b042e37fSmrg mv conftest.tmp conftest.in 7541b042e37fSmrg cp conftest.in conftest.nl 7542b042e37fSmrg echo >>conftest.nl 7543b042e37fSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7544b042e37fSmrg cmp -s conftest.out conftest.nl || break 7545b042e37fSmrg # 10000 chars as input seems more than enough 7546b042e37fSmrg test $lt_ac_count -gt 10 && break 7547b042e37fSmrg lt_ac_count=`expr $lt_ac_count + 1` 7548b042e37fSmrg if test $lt_ac_count -gt $lt_ac_max; then 7549b042e37fSmrg lt_ac_max=$lt_ac_count 7550b042e37fSmrg lt_cv_path_SED=$lt_ac_sed 7551b042e37fSmrg fi 7552b042e37fSmrg done 7553b042e37fSmrgdone 7554b042e37fSmrg]) 7555b042e37fSmrgSED=$lt_cv_path_SED 7556b042e37fSmrgAC_MSG_RESULT([$SED]) 7557b042e37fSmrg]) 7558b042e37fSmrg 7559b042e37fSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 7560b042e37fSmrg# From Jim Meyering 7561b042e37fSmrg 7562b042e37fSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 7563b042e37fSmrg# Free Software Foundation, Inc. 7564b042e37fSmrg# 7565b042e37fSmrg# This file is free software; the Free Software Foundation 7566b042e37fSmrg# gives unlimited permission to copy and/or distribute it, 7567b042e37fSmrg# with or without modifications, as long as this notice is preserved. 7568b042e37fSmrg 7569b042e37fSmrg# serial 4 7570b042e37fSmrg 7571b042e37fSmrgAC_DEFUN([AM_MAINTAINER_MODE], 7572b042e37fSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 7573b042e37fSmrg dnl maintainer-mode is disabled by default 7574b042e37fSmrg AC_ARG_ENABLE(maintainer-mode, 7575b042e37fSmrg[ --enable-maintainer-mode enable make rules and dependencies not useful 7576b042e37fSmrg (and sometimes confusing) to the casual installer], 7577b042e37fSmrg USE_MAINTAINER_MODE=$enableval, 7578b042e37fSmrg USE_MAINTAINER_MODE=no) 7579b042e37fSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 7580b042e37fSmrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 7581b042e37fSmrg MAINT=$MAINTAINER_MODE_TRUE 7582b042e37fSmrg AC_SUBST(MAINT)dnl 7583b042e37fSmrg] 7584b042e37fSmrg) 7585b042e37fSmrg 7586b042e37fSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 7587b042e37fSmrg 7588b042e37fSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 7589b042e37fSmrg 7590b042e37fSmrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 7591b042e37fSmrg# 7592b042e37fSmrg# This file is free software; the Free Software Foundation 7593b042e37fSmrg# gives unlimited permission to copy and/or distribute it, 7594b042e37fSmrg# with or without modifications, as long as this notice is preserved. 7595b042e37fSmrg 7596b042e37fSmrg# serial 3 7597b042e37fSmrg 7598b042e37fSmrg# AM_MAKE_INCLUDE() 7599b042e37fSmrg# ----------------- 7600b042e37fSmrg# Check to see how make treats includes. 7601b042e37fSmrgAC_DEFUN([AM_MAKE_INCLUDE], 7602b042e37fSmrg[am_make=${MAKE-make} 7603b042e37fSmrgcat > confinc << 'END' 7604b042e37fSmrgam__doit: 7605b042e37fSmrg @echo done 7606b042e37fSmrg.PHONY: am__doit 7607b042e37fSmrgEND 7608b042e37fSmrg# If we don't find an include directive, just comment out the code. 7609b042e37fSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 7610b042e37fSmrgam__include="#" 7611b042e37fSmrgam__quote= 7612b042e37fSmrg_am_result=none 7613b042e37fSmrg# First try GNU make style include. 7614b042e37fSmrgecho "include confinc" > confmf 7615b042e37fSmrg# We grep out `Entering directory' and `Leaving directory' 7616b042e37fSmrg# messages which can occur if `w' ends up in MAKEFLAGS. 7617b042e37fSmrg# In particular we don't look at `^make:' because GNU make might 7618b042e37fSmrg# be invoked under some other name (usually "gmake"), in which 7619b042e37fSmrg# case it prints its new name instead of `make'. 7620b042e37fSmrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 7621b042e37fSmrg am__include=include 7622b042e37fSmrg am__quote= 7623b042e37fSmrg _am_result=GNU 7624b042e37fSmrgfi 7625b042e37fSmrg# Now try BSD make style include. 7626b042e37fSmrgif test "$am__include" = "#"; then 7627b042e37fSmrg echo '.include "confinc"' > confmf 7628b042e37fSmrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 7629b042e37fSmrg am__include=.include 7630b042e37fSmrg am__quote="\"" 7631b042e37fSmrg _am_result=BSD 7632b042e37fSmrg fi 7633b042e37fSmrgfi 7634b042e37fSmrgAC_SUBST([am__include]) 7635b042e37fSmrgAC_SUBST([am__quote]) 7636b042e37fSmrgAC_MSG_RESULT([$_am_result]) 7637b042e37fSmrgrm -f confinc confmf 7638b042e37fSmrg]) 7639b042e37fSmrg 7640b042e37fSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 7641b042e37fSmrg 7642b042e37fSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 7643b042e37fSmrg# Free Software Foundation, Inc. 7644b042e37fSmrg# 7645b042e37fSmrg# This file is free software; the Free Software Foundation 7646b042e37fSmrg# gives unlimited permission to copy and/or distribute it, 7647b042e37fSmrg# with or without modifications, as long as this notice is preserved. 7648b042e37fSmrg 7649b042e37fSmrg# serial 5 7650b042e37fSmrg 7651b042e37fSmrg# AM_MISSING_PROG(NAME, PROGRAM) 7652b042e37fSmrg# ------------------------------ 7653b042e37fSmrgAC_DEFUN([AM_MISSING_PROG], 7654b042e37fSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7655b042e37fSmrg$1=${$1-"${am_missing_run}$2"} 7656b042e37fSmrgAC_SUBST($1)]) 7657b042e37fSmrg 7658b042e37fSmrg 7659b042e37fSmrg# AM_MISSING_HAS_RUN 7660b042e37fSmrg# ------------------ 7661b042e37fSmrg# Define MISSING if not defined so far and test if it supports --run. 7662b042e37fSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 7663b042e37fSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 7664b042e37fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7665b042e37fSmrgAC_REQUIRE_AUX_FILE([missing])dnl 7666b042e37fSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 7667b042e37fSmrg# Use eval to expand $SHELL 7668b042e37fSmrgif eval "$MISSING --run true"; then 7669b042e37fSmrg am_missing_run="$MISSING --run " 7670b042e37fSmrgelse 7671b042e37fSmrg am_missing_run= 7672b042e37fSmrg AC_MSG_WARN([`missing' script is too old or missing]) 7673b042e37fSmrgfi 7674b042e37fSmrg]) 7675b042e37fSmrg 7676b042e37fSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 7677b042e37fSmrg# 7678b042e37fSmrg# This file is free software; the Free Software Foundation 7679b042e37fSmrg# gives unlimited permission to copy and/or distribute it, 7680b042e37fSmrg# with or without modifications, as long as this notice is preserved. 7681b042e37fSmrg 7682b042e37fSmrg# AM_PROG_MKDIR_P 7683b042e37fSmrg# --------------- 7684b042e37fSmrg# Check for `mkdir -p'. 7685b042e37fSmrgAC_DEFUN([AM_PROG_MKDIR_P], 7686b042e37fSmrg[AC_PREREQ([2.60])dnl 7687b042e37fSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 7688b042e37fSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 7689b042e37fSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 7690b042e37fSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 7691b042e37fSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 7692b042e37fSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 7693b042e37fSmrgdnl adjustment using top_builddir (which is defined more often than 7694b042e37fSmrgdnl MKDIR_P). 7695b042e37fSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 7696b042e37fSmrgcase $mkdir_p in 7697b042e37fSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 7698b042e37fSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 7699b042e37fSmrgesac 7700b042e37fSmrg]) 7701b042e37fSmrg 7702b042e37fSmrg# Helper functions for option handling. -*- Autoconf -*- 7703b042e37fSmrg 7704b042e37fSmrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 7705b042e37fSmrg# 7706b042e37fSmrg# This file is free software; the Free Software Foundation 7707b042e37fSmrg# gives unlimited permission to copy and/or distribute it, 7708b042e37fSmrg# with or without modifications, as long as this notice is preserved. 7709b042e37fSmrg 7710b042e37fSmrg# serial 3 7711b042e37fSmrg 7712b042e37fSmrg# _AM_MANGLE_OPTION(NAME) 7713b042e37fSmrg# ----------------------- 7714b042e37fSmrgAC_DEFUN([_AM_MANGLE_OPTION], 7715b042e37fSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7716b042e37fSmrg 7717b042e37fSmrg# _AM_SET_OPTION(NAME) 7718b042e37fSmrg# ------------------------------ 7719b042e37fSmrg# Set option NAME. Presently that only means defining a flag for this option. 7720b042e37fSmrgAC_DEFUN([_AM_SET_OPTION], 7721b042e37fSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 7722b042e37fSmrg 7723b042e37fSmrg# _AM_SET_OPTIONS(OPTIONS) 7724b042e37fSmrg# ---------------------------------- 7725b042e37fSmrg# OPTIONS is a space-separated list of Automake options. 7726b042e37fSmrgAC_DEFUN([_AM_SET_OPTIONS], 7727b042e37fSmrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7728b042e37fSmrg 7729b042e37fSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7730b042e37fSmrg# ------------------------------------------- 7731b042e37fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7732b042e37fSmrgAC_DEFUN([_AM_IF_OPTION], 7733b042e37fSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7734b042e37fSmrg 7735b042e37fSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 7736b042e37fSmrg 7737b042e37fSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 7738b042e37fSmrg# Free Software Foundation, Inc. 7739b042e37fSmrg# 7740b042e37fSmrg# This file is free software; the Free Software Foundation 7741b042e37fSmrg# gives unlimited permission to copy and/or distribute it, 7742b042e37fSmrg# with or without modifications, as long as this notice is preserved. 7743b042e37fSmrg 7744b042e37fSmrg# serial 4 7745b042e37fSmrg 7746b042e37fSmrg# AM_SANITY_CHECK 7747b042e37fSmrg# --------------- 7748b042e37fSmrgAC_DEFUN([AM_SANITY_CHECK], 7749b042e37fSmrg[AC_MSG_CHECKING([whether build environment is sane]) 7750b042e37fSmrg# Just in case 7751b042e37fSmrgsleep 1 7752b042e37fSmrgecho timestamp > conftest.file 7753b042e37fSmrg# Do `set' in a subshell so we don't clobber the current shell's 7754b042e37fSmrg# arguments. Must try -L first in case configure is actually a 7755b042e37fSmrg# symlink; some systems play weird games with the mod time of symlinks 7756b042e37fSmrg# (eg FreeBSD returns the mod time of the symlink's containing 7757b042e37fSmrg# directory). 7758b042e37fSmrgif ( 7759b042e37fSmrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 7760b042e37fSmrg if test "$[*]" = "X"; then 7761b042e37fSmrg # -L didn't work. 7762b042e37fSmrg set X `ls -t $srcdir/configure conftest.file` 7763b042e37fSmrg fi 7764b042e37fSmrg rm -f conftest.file 7765b042e37fSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 7766b042e37fSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 7767b042e37fSmrg 7768b042e37fSmrg # If neither matched, then we have a broken ls. This can happen 7769b042e37fSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 7770b042e37fSmrg # broken ls alias from the environment. This has actually 7771b042e37fSmrg # happened. Such a system could not be considered "sane". 7772b042e37fSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 7773b042e37fSmrgalias in your environment]) 7774b042e37fSmrg fi 7775b042e37fSmrg 7776b042e37fSmrg test "$[2]" = conftest.file 7777b042e37fSmrg ) 7778b042e37fSmrgthen 7779b042e37fSmrg # Ok. 7780b042e37fSmrg : 7781b042e37fSmrgelse 7782b042e37fSmrg AC_MSG_ERROR([newly created file is older than distributed files! 7783b042e37fSmrgCheck your system clock]) 7784b042e37fSmrgfi 7785b042e37fSmrgAC_MSG_RESULT(yes)]) 7786b042e37fSmrg 7787b042e37fSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 7788b042e37fSmrg# 7789b042e37fSmrg# This file is free software; the Free Software Foundation 7790b042e37fSmrg# gives unlimited permission to copy and/or distribute it, 7791b042e37fSmrg# with or without modifications, as long as this notice is preserved. 7792b042e37fSmrg 7793b042e37fSmrg# AM_PROG_INSTALL_STRIP 7794b042e37fSmrg# --------------------- 7795b042e37fSmrg# One issue with vendor `install' (even GNU) is that you can't 7796b042e37fSmrg# specify the program used to strip binaries. This is especially 7797b042e37fSmrg# annoying in cross-compiling environments, where the build's strip 7798b042e37fSmrg# is unlikely to handle the host's binaries. 7799b042e37fSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 7800b042e37fSmrg# always use install-sh in `make install-strip', and initialize 7801b042e37fSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 7802b042e37fSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 7803b042e37fSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 7804b042e37fSmrg# Installed binaries are usually stripped using `strip' when the user 7805b042e37fSmrg# run `make install-strip'. However `strip' might not be the right 7806b042e37fSmrg# tool to use in cross-compilation environments, therefore Automake 7807b042e37fSmrg# will honor the `STRIP' environment variable to overrule this program. 7808b042e37fSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 7809b042e37fSmrgif test "$cross_compiling" != no; then 7810b042e37fSmrg AC_CHECK_TOOL([STRIP], [strip], :) 7811b042e37fSmrgfi 7812b042e37fSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 7813b042e37fSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 7814b042e37fSmrg 7815b042e37fSmrg# Copyright (C) 2006 Free Software Foundation, Inc. 7816b042e37fSmrg# 7817b042e37fSmrg# This file is free software; the Free Software Foundation 7818b042e37fSmrg# gives unlimited permission to copy and/or distribute it, 7819b042e37fSmrg# with or without modifications, as long as this notice is preserved. 7820b042e37fSmrg 7821b042e37fSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 7822b042e37fSmrg# --------------------------- 7823b042e37fSmrg# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. 7824b042e37fSmrg# This macro is traced by Automake. 7825b042e37fSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 7826b042e37fSmrg 7827b042e37fSmrg# Check how to create a tarball. -*- Autoconf -*- 7828b042e37fSmrg 7829b042e37fSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 7830b042e37fSmrg# 7831b042e37fSmrg# This file is free software; the Free Software Foundation 7832b042e37fSmrg# gives unlimited permission to copy and/or distribute it, 7833b042e37fSmrg# with or without modifications, as long as this notice is preserved. 7834b042e37fSmrg 7835b042e37fSmrg# serial 2 7836b042e37fSmrg 7837b042e37fSmrg# _AM_PROG_TAR(FORMAT) 7838b042e37fSmrg# -------------------- 7839b042e37fSmrg# Check how to create a tarball in format FORMAT. 7840b042e37fSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 7841b042e37fSmrg# 7842b042e37fSmrg# Substitute a variable $(am__tar) that is a command 7843b042e37fSmrg# writing to stdout a FORMAT-tarball containing the directory 7844b042e37fSmrg# $tardir. 7845b042e37fSmrg# tardir=directory && $(am__tar) > result.tar 7846b042e37fSmrg# 7847b042e37fSmrg# Substitute a variable $(am__untar) that extract such 7848b042e37fSmrg# a tarball read from stdin. 7849b042e37fSmrg# $(am__untar) < result.tar 7850b042e37fSmrgAC_DEFUN([_AM_PROG_TAR], 7851b042e37fSmrg[# Always define AMTAR for backward compatibility. 7852b042e37fSmrgAM_MISSING_PROG([AMTAR], [tar]) 7853b042e37fSmrgm4_if([$1], [v7], 7854b042e37fSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 7855b042e37fSmrg [m4_case([$1], [ustar],, [pax],, 7856b042e37fSmrg [m4_fatal([Unknown tar format])]) 7857b042e37fSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 7858b042e37fSmrg# Loop over all known methods to create a tar archive until one works. 7859b042e37fSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 7860b042e37fSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 7861b042e37fSmrg# Do not fold the above two line into one, because Tru64 sh and 7862b042e37fSmrg# Solaris sh will not grok spaces in the rhs of `-'. 7863b042e37fSmrgfor _am_tool in $_am_tools 7864b042e37fSmrgdo 7865b042e37fSmrg case $_am_tool in 7866b042e37fSmrg gnutar) 7867b042e37fSmrg for _am_tar in tar gnutar gtar; 7868b042e37fSmrg do 7869b042e37fSmrg AM_RUN_LOG([$_am_tar --version]) && break 7870b042e37fSmrg done 7871b042e37fSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 7872b042e37fSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 7873b042e37fSmrg am__untar="$_am_tar -xf -" 7874b042e37fSmrg ;; 7875b042e37fSmrg plaintar) 7876b042e37fSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 7877b042e37fSmrg # ustar tarball either. 7878b042e37fSmrg (tar --version) >/dev/null 2>&1 && continue 7879b042e37fSmrg am__tar='tar chf - "$$tardir"' 7880b042e37fSmrg am__tar_='tar chf - "$tardir"' 7881b042e37fSmrg am__untar='tar xf -' 7882b042e37fSmrg ;; 7883b042e37fSmrg pax) 7884b042e37fSmrg am__tar='pax -L -x $1 -w "$$tardir"' 7885b042e37fSmrg am__tar_='pax -L -x $1 -w "$tardir"' 7886b042e37fSmrg am__untar='pax -r' 7887b042e37fSmrg ;; 7888b042e37fSmrg cpio) 7889b042e37fSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 7890b042e37fSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 7891b042e37fSmrg am__untar='cpio -i -H $1 -d' 7892b042e37fSmrg ;; 7893b042e37fSmrg none) 7894b042e37fSmrg am__tar=false 7895b042e37fSmrg am__tar_=false 7896b042e37fSmrg am__untar=false 7897b042e37fSmrg ;; 7898b042e37fSmrg esac 7899b042e37fSmrg 7900b042e37fSmrg # If the value was cached, stop now. We just wanted to have am__tar 7901b042e37fSmrg # and am__untar set. 7902b042e37fSmrg test -n "${am_cv_prog_tar_$1}" && break 7903b042e37fSmrg 7904b042e37fSmrg # tar/untar a dummy directory, and stop if the command works 7905b042e37fSmrg rm -rf conftest.dir 7906b042e37fSmrg mkdir conftest.dir 7907b042e37fSmrg echo GrepMe > conftest.dir/file 7908b042e37fSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 7909b042e37fSmrg rm -rf conftest.dir 7910b042e37fSmrg if test -s conftest.tar; then 7911b042e37fSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 7912b042e37fSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 7913b042e37fSmrg fi 7914b042e37fSmrgdone 7915b042e37fSmrgrm -rf conftest.dir 7916b042e37fSmrg 7917b042e37fSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 7918b042e37fSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 7919b042e37fSmrgAC_SUBST([am__tar]) 7920b042e37fSmrgAC_SUBST([am__untar]) 7921b042e37fSmrg]) # _AM_PROG_TAR 7922b042e37fSmrg 7923