aclocal.m4 revision c82838c1
1c82838c1Smrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 235c4bbdfSmrg 3c82838c1Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 405b261ecSmrg 505b261ecSmrg# This file is free software; the Free Software Foundation 605b261ecSmrg# gives unlimited permission to copy and/or distribute it, 705b261ecSmrg# with or without modifications, as long as this notice is preserved. 805b261ecSmrg 905b261ecSmrg# This program is distributed in the hope that it will be useful, 1005b261ecSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1105b261ecSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1205b261ecSmrg# PARTICULAR PURPOSE. 1305b261ecSmrg 1435c4bbdfSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 1535c4bbdfSmrgm4_ifndef([AC_AUTOCONF_VERSION], 1635c4bbdfSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17c82838c1Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, 18c82838c1Smrg[m4_warning([this file was generated for autoconf 2.71. 1935c4bbdfSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 2035c4bbdfSmrgIf you have problems, you may need to regenerate the build system entirely. 2135c4bbdfSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 2235c4bbdfSmrg 2335c4bbdfSmrgdnl fontutil.m4. Generated from fontutil.m4.in by configure. 2435c4bbdfSmrgdnl 25ed6184dfSmrgdnl This file comes from X.Org's font-util 1.3.1 2635c4bbdfSmrgdnl 2735c4bbdfSmrgdnl Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. 2835c4bbdfSmrgdnl 2935c4bbdfSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 3035c4bbdfSmrgdnl copy of this software and associated documentation files (the "Software"), 3135c4bbdfSmrgdnl to deal in the Software without restriction, including without limitation 3235c4bbdfSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 3335c4bbdfSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 3435c4bbdfSmrgdnl Software is furnished to do so, subject to the following conditions: 3535c4bbdfSmrgdnl 3635c4bbdfSmrgdnl The above copyright notice and this permission notice (including the next 3735c4bbdfSmrgdnl paragraph) shall be included in all copies or substantial portions of the 3835c4bbdfSmrgdnl Software. 3935c4bbdfSmrgdnl 4035c4bbdfSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 4135c4bbdfSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 4235c4bbdfSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 4335c4bbdfSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 4435c4bbdfSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 4535c4bbdfSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 4635c4bbdfSmrgdnl DEALINGS IN THE SOFTWARE. 4735c4bbdfSmrgdnl 4835c4bbdfSmrgdnl -------------------------------------------------------------------- 4935c4bbdfSmrgdnl 5035c4bbdfSmrgdnl Copyright 2005 Red Hat, Inc 5135c4bbdfSmrgdnl 5235c4bbdfSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 5335c4bbdfSmrgdnl documentation for any purpose is hereby granted without fee, provided that 5435c4bbdfSmrgdnl the above copyright notice appear in all copies and that both that 5535c4bbdfSmrgdnl copyright notice and this permission notice appear in supporting 5635c4bbdfSmrgdnl documentation. 5735c4bbdfSmrgdnl 5835c4bbdfSmrgdnl The above copyright notice and this permission notice shall be included 5935c4bbdfSmrgdnl in all copies or substantial portions of the Software. 6035c4bbdfSmrgdnl 6135c4bbdfSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 6235c4bbdfSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 6335c4bbdfSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 6435c4bbdfSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 6535c4bbdfSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 6635c4bbdfSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 6735c4bbdfSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 6835c4bbdfSmrgdnl 6935c4bbdfSmrgdnl Except as contained in this notice, the name of the copyright holders shall 7035c4bbdfSmrgdnl not be used in advertising or otherwise to promote the sale, use or 7135c4bbdfSmrgdnl other dealings in this Software without prior written authorization 7235c4bbdfSmrgdnl from the copyright holders. 7305b261ecSmrg 7435c4bbdfSmrg# XORG_FONT_MACROS_VERSION(required-version) 7535c4bbdfSmrg# ------------------------------------------ 7635c4bbdfSmrg# Minimum version: 1.1.0 774642e01fSmrg# 7835c4bbdfSmrg# If you're using a macro added in Version 1.1 or newer, include this in 7935c4bbdfSmrg# your configure.ac with the minimum required version, such as: 8035c4bbdfSmrg# XORG_FONT_MACROS_VERSION(1.1) 8135c4bbdfSmrg# 8235c4bbdfSmrg# To ensure that this macro is defined, also add: 8335c4bbdfSmrg# m4_ifndef([XORG_FONT_MACROS_VERSION], 8435c4bbdfSmrg# [m4_fatal([must install X.Org font-util 1.1 or later before running autoconf/autogen])]) 8535c4bbdfSmrg# 8635c4bbdfSmrg# 8735c4bbdfSmrg# See the "minimum version" comment for each macro you use to see what 8835c4bbdfSmrg# version you require. 8935c4bbdfSmrgm4_defun([XORG_FONT_MACROS_VERSION],[ 90ed6184dfSmrgm4_define([vers_have], [1.3.1]) 9135c4bbdfSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9235c4bbdfSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9335c4bbdfSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9435c4bbdfSmrg [m4_fatal([font-util major version ]maj_needed[ is required but ]vers_have[ found])]) 9535c4bbdfSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9635c4bbdfSmrg [m4_fatal([font-util version $1 or higher is required but ]vers_have[ found])]) 9735c4bbdfSmrgm4_undefine([vers_have]) 9835c4bbdfSmrgm4_undefine([maj_have]) 9935c4bbdfSmrgm4_undefine([maj_needed]) 10035c4bbdfSmrg]) # XORG_FONT_MACROS_VERSION 1014642e01fSmrg 10235c4bbdfSmrg# XORG_FONT_CHECK_{maps}() 10335c4bbdfSmrg# ------------------------ 10435c4bbdfSmrg# Minimum version: 1.0.0 10535c4bbdfSmrg# These macros add --enable/disable-{maps} where {maps} are ISO8859-*, 10635c4bbdfSmrg# JISX0201 or KOI8_R. By default, they are all enabled. 10705b261ecSmrg 10835c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_1], [XORG_FONT_CHECK_ENCODING(ISO8859-1)]) 10935c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_2], [XORG_FONT_CHECK_ENCODING(ISO8859-2)]) 11035c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_3], [XORG_FONT_CHECK_ENCODING(ISO8859-3)]) 11135c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_4], [XORG_FONT_CHECK_ENCODING(ISO8859-4)]) 11235c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_5], [XORG_FONT_CHECK_ENCODING(ISO8859-5)]) 11335c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_6], [XORG_FONT_CHECK_ENCODING(ISO8859-6)]) 11435c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_7], [XORG_FONT_CHECK_ENCODING(ISO8859-7)]) 11535c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_8], [XORG_FONT_CHECK_ENCODING(ISO8859-8)]) 11635c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_9], [XORG_FONT_CHECK_ENCODING(ISO8859-9)]) 11735c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_10],[XORG_FONT_CHECK_ENCODING(ISO8859-10)]) 11835c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_11],[XORG_FONT_CHECK_ENCODING(ISO8859-11)]) 11935c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_12],[XORG_FONT_CHECK_ENCODING(ISO8859-12)]) 12035c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_13],[XORG_FONT_CHECK_ENCODING(ISO8859-13)]) 12135c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_14],[XORG_FONT_CHECK_ENCODING(ISO8859-14)]) 12235c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_15],[XORG_FONT_CHECK_ENCODING(ISO8859-15)]) 12335c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_16],[XORG_FONT_CHECK_ENCODING(ISO8859-16)]) 12435c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_JISX0201], [XORG_FONT_CHECK_ENCODING(JISX0201)]) 12535c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_KOI8_R], [XORG_FONT_CHECK_ENCODING(KOI8-R)]) 12605b261ecSmrg 12735c4bbdfSmrg# XORG_FONT_CHECK_ENCODING(encoding) 12835c4bbdfSmrg# ---------------------------------- 12935c4bbdfSmrg# Minimum version: 1.1.0 13035c4bbdfSmrg# This macro adds --enable/disable-<encoding>, enabled by default. 13135c4bbdfSmrg# It replaced individual copies of this code in the above macros in 1.1. 13235c4bbdfSmrg# Currently assumes encoding names will be all upper-case - add m4_toupper 13335c4bbdfSmrg# calls if this is not true in the future. 13405b261ecSmrg 13535c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_ENCODING],[ 13635c4bbdfSmrg AC_ARG_ENABLE(m4_tolower($1), 13735c4bbdfSmrg AS_HELP_STRING(m4_join([-], [--disable], m4_tolower($1)), 13835c4bbdfSmrg [Build $1 fonts (default: yes)]), 13935c4bbdfSmrg [AS_TR_SH($1)=$enableval]) 14035c4bbdfSmrg AC_MSG_CHECKING([whether to build $1 fonts]) 14135c4bbdfSmrg AC_MSG_RESULT($[AS_TR_SH($1)]) 14235c4bbdfSmrg AM_CONDITIONAL(AS_TR_SH($1), [test "x$AS_TR_SH($1)" = xyes]) 14335c4bbdfSmrg]) # XORG_FONT_CHECK_ENCODING 14405b261ecSmrg 14535c4bbdfSmrg# XORG_FONT_CHECK_ENCODING_LIST(encoding1 encoding2....) 14635c4bbdfSmrg# ----------------------------------------------------- 14735c4bbdfSmrg# Minimum version: 1.1.0 14835c4bbdfSmrg# Call XORG_FONT_CHECK_ENCODING for multiple encodings at once. 14935c4bbdfSmrg# Add a shorthand --enable/disable-all-encodings option. 15035c4bbdfSmrg 15135c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_ENCODING_LIST],[ 15235c4bbdfSmrg AC_ARG_ENABLE([all-encodings], 15335c4bbdfSmrg AS_HELP_STRING([--disable-all-encodings], 15435c4bbdfSmrg [Disable building of all font encodings]), 15535c4bbdfSmrg [m4_foreach_w([enc], [$1], [ 15635c4bbdfSmrg AS_TR_SH(enc)=$enableval 15735c4bbdfSmrg ])], 15835c4bbdfSmrg [m4_foreach_w([enc], [$1], [ 15935c4bbdfSmrg AS_TR_SH(enc)=yes 16035c4bbdfSmrg ])]) 16135c4bbdfSmrg m4_foreach_w([enc], [$1], [XORG_FONT_CHECK_ENCODING(enc)]) 16235c4bbdfSmrg]) # XORG_FONT_CHECK_ENCODING_LIST 16305b261ecSmrg 16435c4bbdfSmrg# XORG_FONT_REQUIRED_PROG(VARNAME, progname) 16535c4bbdfSmrg# ------------------------------------------ 16635c4bbdfSmrg# Minimum version: 1.1.0 16735c4bbdfSmrg# 16835c4bbdfSmrg# Simple wrapper around AC_PATH_PROG that errors if not found 16935c4bbdfSmrg# 1706747b715Smrg 17135c4bbdfSmrgAC_DEFUN([XORG_FONT_REQUIRED_PROG],[ 17235c4bbdfSmrg AC_PATH_PROG($1, $2) 17335c4bbdfSmrg if test x"$$1" = x; then 17435c4bbdfSmrg AC_MSG_ERROR([$2 is required to build $PACKAGE_NAME.]) 17535c4bbdfSmrg fi 1764642e01fSmrg]) 1774642e01fSmrg 1784642e01fSmrg 17935c4bbdfSmrg# XORG_FONT_FCCACHE() 18035c4bbdfSmrg# ------------------- 18135c4bbdfSmrg# Minimum version: 1.1.0 1826747b715Smrg# 18335c4bbdfSmrg# Set FCCACHE to path to fc-cache (fontconfig cache builder) if found 18435c4bbdfSmrg# Set RUN_FCCACHE to a rule suitable for substituting into a makefile 18535c4bbdfSmrg# to run fc-cache if found and not installing to $DESTDIR and not 18635c4bbdfSmrg# cross-compiling 1876747b715Smrg# 18835c4bbdfSmrg# fc-cache is optional, not required, and should be skipped when making 18935c4bbdfSmrg# packages (installing to $DESTDIR) or cross-compiling 1906747b715Smrg# 19135c4bbdfSmrgAC_DEFUN([XORG_FONT_FCCACHE],[ 19235c4bbdfSmrg AC_PATH_PROG(FCCACHE, fc-cache) 19335c4bbdfSmrg FCCACHE_WARN='echo "** Warning: fonts.cache not built" ; echo "** Generate this file manually on host system using fc-cache"' 19435c4bbdfSmrg if test x"$FCCACHE" = x || test x"$cross_compiling" != x"no" ; then 19535c4bbdfSmrg RUN_FCCACHE="${FCCACHE_WARN}" 19635c4bbdfSmrg else 19735c4bbdfSmrg RUN_FCCACHE='@(if test -z "$(DESTDIR)"; then echo $(FCCACHE) $(fontdir); $(FCCACHE) $(fontdir); else' 19835c4bbdfSmrg RUN_FCCACHE="${RUN_FCCACHE} ${FCCACHE_WARN} ; fi)" 19935c4bbdfSmrg fi 20035c4bbdfSmrg AC_SUBST([RUN_FCCACHE]) 20135c4bbdfSmrg]) 20235c4bbdfSmrg 20335c4bbdfSmrg# XORG_FONT_MKFONTDIR() 20435c4bbdfSmrg# ------------------- 20535c4bbdfSmrg# Minimum version: 1.3.0 2066747b715Smrg# 20735c4bbdfSmrg# Set MKFONTDIR to path to mkfontdir. 2086747b715Smrg# 20935c4bbdfSmrg# If cross-compiling, and if mkdir is not found, use a shell command 21035c4bbdfSmrg# which warns mkfontdir needs to be run on the target 2116747b715Smrg# 21235c4bbdfSmrg# If not cross-compiling, mkfontdir must be found 21335c4bbdfSmrg# 21435c4bbdfSmrgAC_DEFUN([XORG_FONT_MKFONTDIR],[ 21535c4bbdfSmrg if test x"$cross_compiling" != x"no" ; then 21635c4bbdfSmrg AC_PATH_PROG(MKFONTDIR, mkfontdir, "") 21735c4bbdfSmrg MKFONTDIR_WARN='echo "** Warning: mkfontdir not run" ; echo "** Run mkfontdir manually on host system"' 2184642e01fSmrg 21935c4bbdfSmrg if test x"$MKFONTDIR" = x; then 22035c4bbdfSmrg MKFONTDIR="${MKFONTDIR_WARN} ; echo '** mkfontdir'" 22135c4bbdfSmrg fi 22235c4bbdfSmrg else 22335c4bbdfSmrg XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir) 22435c4bbdfSmrg fi 22505b261ecSmrg 22635c4bbdfSmrg AC_SUBST([MKFONTDIR]) 22735c4bbdfSmrg]) 22805b261ecSmrg 22935c4bbdfSmrg# XORG_FONT_COMMON_UTILS() 23035c4bbdfSmrg# ------------------------ 23135c4bbdfSmrg# Minimum version: 1.1.0 2326747b715Smrg# 23335c4bbdfSmrg# Call XORG_FONT_REQUIRED_PROG for programs needed for all font types 23405b261ecSmrg 23535c4bbdfSmrgAC_DEFUN([XORG_FONT_COMMON_UTILS],[ 23635c4bbdfSmrg XORG_FONT_FCCACHE 23735c4bbdfSmrg XORG_FONT_MKFONTDIR 23835c4bbdfSmrg]) 23905b261ecSmrg 24035c4bbdfSmrg# XORG_FONT_SCALED_UTILS() 24135c4bbdfSmrg# ------------------------ 24235c4bbdfSmrg# Minimum version: 1.1.0 2436747b715Smrg# 24435c4bbdfSmrg# Call XORG_FONT_REQUIRED_PROG for programs needed for scalable fonts 24535c4bbdfSmrg# (TrueType, OpenType, Type1) 2464642e01fSmrg 24735c4bbdfSmrgAC_DEFUN([XORG_FONT_SCALED_UTILS],[ 24835c4bbdfSmrg XORG_FONT_COMMON_UTILS 24935c4bbdfSmrg XORG_FONT_REQUIRED_PROG(MKFONTSCALE, mkfontscale) 25035c4bbdfSmrg]) 2514642e01fSmrg 25235c4bbdfSmrg# XORG_FONT_BDF_UTILS() 25335c4bbdfSmrg# --------------------- 25435c4bbdfSmrg# Minimum version: 1.1.0 2556747b715Smrg# 25635c4bbdfSmrg# Call XORG_FONT_REQUIRED_PROG for programs needed for BDF format bitmap fonts 25735c4bbdfSmrg# Also call XORG_FONT_CHECK_COMPRESSION to determine how to compress the 25835c4bbdfSmrg# PCF output files created by bdftopcf 25905b261ecSmrg 26035c4bbdfSmrgAC_DEFUN([XORG_FONT_BDF_UTILS],[ 26135c4bbdfSmrg XORG_FONT_COMMON_UTILS 26235c4bbdfSmrg XORG_FONT_REQUIRED_PROG(BDFTOPCF, bdftopcf) 26335c4bbdfSmrg XORG_FONT_CHECK_COMPRESSION 2646747b715Smrg]) 26505b261ecSmrg 26635c4bbdfSmrg# XORG_FONT_CHECK_COMPRESSION() 26735c4bbdfSmrg# ----------------------------- 26835c4bbdfSmrg# Minimum version: 1.1.0 26935c4bbdfSmrg# 27035c4bbdfSmrg# Offer a --with-compression flag to control what compression method is 27135c4bbdfSmrg# used for pcf font files. Offers all the methods currently supported 27235c4bbdfSmrg# by libXfont, including no compression. 27305b261ecSmrg 27435c4bbdfSmrgAC_DEFUN([XORG_FONT_CHECK_COMPRESSION],[ 27535c4bbdfSmrg AC_MSG_CHECKING([font compression method]) 27635c4bbdfSmrg AC_ARG_WITH(compression, 27735c4bbdfSmrg [AS_HELP_STRING([--with-compression=<no|compress|gzip|bzip2>], 27835c4bbdfSmrg [compression method to use on pcf fonts])], 27935c4bbdfSmrg [compression="$withval"], [compression="yes"]) 28035c4bbdfSmrg if test x"$compression" = "xyes" ; then 28135c4bbdfSmrg compression="gzip" 28235c4bbdfSmrg fi 28335c4bbdfSmrg AC_MSG_RESULT([${compression}]) 28435c4bbdfSmrg case ${compression} in 28535c4bbdfSmrg *compress) COMPRESS_SUFFIX=".Z" ;; 28635c4bbdfSmrg *gzip) COMPRESS_SUFFIX=".gz" ;; 28735c4bbdfSmrg *bzip2) COMPRESS_SUFFIX=".bz2" ;; 28835c4bbdfSmrg no|none) COMPRESS_SUFFIX="" ; COMPRESS="cat" ;; 28935c4bbdfSmrg *) AC_MSG_ERROR([${compression} is not a supported compression method]) ;; 29035c4bbdfSmrg esac 29135c4bbdfSmrg if test x"$COMPRESS_SUFFIX" != "x" ; then 29235c4bbdfSmrg XORG_FONT_REQUIRED_PROG(COMPRESS, ${compression}) 29335c4bbdfSmrg fi 29435c4bbdfSmrg AC_SUBST([COMPRESS_SUFFIX]) 2956747b715Smrg]) 29605b261ecSmrg 29735c4bbdfSmrg# XORG_FONT_UCS2ANY() 29835c4bbdfSmrg# ------------------- 29935c4bbdfSmrg# Minimum version: 1.1.0 30035c4bbdfSmrg# 30135c4bbdfSmrg# Call XORG_FONT_REQUIRED_PROG for ucs2any program needed for splitting 30235c4bbdfSmrg# Unicode-encoded BDF format bitmap fonts into subsets for older encodings. 30335c4bbdfSmrg# Also call pkg-config to find the directory with the encoding files needed 30435c4bbdfSmrg# by ucs2any, and export it as MAPFILES_PATH to the Makefiles 30505b261ecSmrg 30635c4bbdfSmrgAC_DEFUN([XORG_FONT_UCS2ANY],[ 30735c4bbdfSmrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 30835c4bbdfSmrg XORG_FONT_REQUIRED_PROG(UCS2ANY, ucs2any) 30935c4bbdfSmrg PKG_CHECK_MODULES(MAPS, [fontutil]) 31035c4bbdfSmrg AC_MSG_CHECKING([for ucs2any encoding data files]) 31135c4bbdfSmrg MAPFILES_PATH=`$PKG_CONFIG --variable=mapdir fontutil` 31235c4bbdfSmrg AC_SUBST(MAPFILES_PATH) 31335c4bbdfSmrg AC_MSG_RESULT([${MAPFILES_PATH}]) 3146747b715Smrg]) 31505b261ecSmrg 31605b261ecSmrg 31705b261ecSmrg 31835c4bbdfSmrg# XORG_FONT_FC_CONFDIR() 31935c4bbdfSmrg# -------------------- 32035c4bbdfSmrg# Minimum version: 1.2.0 32135c4bbdfSmrg# 32235c4bbdfSmrg# Sets FC_CONFDIR to the fontconfig config directory 32335c4bbdfSmrg# (which should be --with-confdir=... when building fontconfig) 32435c4bbdfSmrg# found from: 32535c4bbdfSmrg# --with-fc-confdir=... 32635c4bbdfSmrg# pkg-config --variable=confdir fontconfig 32735c4bbdfSmrg# ${sysconfdir}/fonts 32805b261ecSmrg 32935c4bbdfSmrgAC_DEFUN([XORG_FONT_FC_CONFDIR],[ 33035c4bbdfSmrg dnl Ensure $PKG_CONFIG is set first 33135c4bbdfSmrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 33205b261ecSmrg 33335c4bbdfSmrg AC_MSG_CHECKING([for fontconfig's configuration directory]) 33435c4bbdfSmrg AC_ARG_WITH(fc-confdir, 33535c4bbdfSmrg AS_HELP_STRING([--with-fc-confdir=DIR], 33635c4bbdfSmrg [Path to fontconfig's configuration directory]), 33735c4bbdfSmrg [FC_CONFDIR="$withval"]) 33835c4bbdfSmrg # if --with-fc-confdir was not specified 33935c4bbdfSmrg if test "x${FC_CONFDIR}" = "x"; then 34035c4bbdfSmrg FC_CONFDIR=`$PKG_CONFIG --variable=confdir fontconfig` 34135c4bbdfSmrg fi 34235c4bbdfSmrg # ...and if pkg-config didn't find confdir in fontconfig.pc... 34335c4bbdfSmrg if test "x${FC_CONFDIR}" = "x"; then 34435c4bbdfSmrg FC_CONFDIR="${sysconfdir}/fonts" 34535c4bbdfSmrg fi 34635c4bbdfSmrg AC_SUBST(FC_CONFDIR) 34735c4bbdfSmrg AC_MSG_RESULT([${FC_CONFDIR}]) 3486747b715Smrg]) 3494642e01fSmrg 3504642e01fSmrg 3514642e01fSmrg 35235c4bbdfSmrg# XORG_FONTROOTDIR() 35335c4bbdfSmrg# -------------------- 35435c4bbdfSmrg# Minimum version: 1.1.0 35535c4bbdfSmrg# 35635c4bbdfSmrg# Sets FONTROOTDIR to the root directory for font files. Uses the first 35735c4bbdfSmrg# found from: 35835c4bbdfSmrg# --with-fontrootdir 35935c4bbdfSmrg# pkg-config --variable=fontrootdir fontutil 36035c4bbdfSmrg# ${datadir}/fonts/X11 3614642e01fSmrg 36235c4bbdfSmrgAC_DEFUN([XORG_FONTROOTDIR],[ 36335c4bbdfSmrg dnl Ensure $PKG_CONFIG is set first 36435c4bbdfSmrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 3654642e01fSmrg 36635c4bbdfSmrg AC_MSG_CHECKING([for root directory for font files]) 36735c4bbdfSmrg AC_ARG_WITH(fontrootdir, 36835c4bbdfSmrg AS_HELP_STRING([--with-fontrootdir=DIR], 36935c4bbdfSmrg [Path to root directory for font files]), 37035c4bbdfSmrg [FONTROOTDIR="$withval"]) 37135c4bbdfSmrg # if --with-fontrootdir not specified... 37235c4bbdfSmrg if test "x${FONTROOTDIR}" = "x"; then 37335c4bbdfSmrg FONTROOTDIR=`$PKG_CONFIG --variable=fontrootdir fontutil` 37435c4bbdfSmrg fi 37535c4bbdfSmrg # ...and if pkg-config didn't find fontdir in fontutil.pc... 37635c4bbdfSmrg if test "x${FONTROOTDIR}" = "x"; then 37735c4bbdfSmrg FONTROOTDIR="${datadir}/fonts/X11" 37835c4bbdfSmrg fi 37935c4bbdfSmrg AC_SUBST(FONTROOTDIR) 38035c4bbdfSmrg AC_MSG_RESULT([${FONTROOTDIR}]) 3814642e01fSmrg]) 3824642e01fSmrg 38335c4bbdfSmrg# XORG_FONTSUBDIR(variable, flag, subdir) 38435c4bbdfSmrg# --------------------------------------- 38535c4bbdfSmrg# Minimum version: 1.1.0 38635c4bbdfSmrg# 38735c4bbdfSmrg# Offer a --with-<flag> flag to control directory for font installation 38835c4bbdfSmrg# Default is the specified <subdir> of the font root directory. 38935c4bbdfSmrg# Sets <variable> to the selected directory 3904642e01fSmrg 39135c4bbdfSmrgAC_DEFUN([XORG_FONTSUBDIR],[ 39235c4bbdfSmrg AC_REQUIRE([XORG_FONTROOTDIR]) 3934642e01fSmrg 39435c4bbdfSmrg AC_MSG_CHECKING([for directory for $3 files]) 39535c4bbdfSmrg AC_ARG_WITH($2, 39635c4bbdfSmrg [AS_HELP_STRING([--with-$2=DIR], 39735c4bbdfSmrg [Path to $3 files [FONTROOTDIR/$3]])], 39835c4bbdfSmrg [$1="${withval}"], [$1='${FONTROOTDIR}/$3']) 39935c4bbdfSmrg AC_SUBST($1) 40035c4bbdfSmrg AC_MSG_RESULT([${$1}]) 40135c4bbdfSmrg]) # XORG_FONTSUBDIR 4024642e01fSmrg 40335c4bbdfSmrg# XORG_FONTDIR(subdir) 40435c4bbdfSmrg# -------------------- 40535c4bbdfSmrg# Minimum version: 1.1.0 4066747b715Smrg# 40735c4bbdfSmrg# Offer a --with-fontdir flag to control directory for font installation 40835c4bbdfSmrg# Default is the specified subdir of the font root directory. 40935c4bbdfSmrg# Sets FONTDIR to the selected directory 4104642e01fSmrg 41135c4bbdfSmrgAC_DEFUN([XORG_FONTDIR],[XORG_FONTSUBDIR([FONTDIR], [fontdir], [$1])]) 4124642e01fSmrg 4131b5d61b8Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 4141b5d61b8Smrg# serial 11 (pkg-config-0.29.1) 4151b5d61b8Smrg 41635c4bbdfSmrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 41735c4bbdfSmrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 41835c4bbdfSmrgdnl 41935c4bbdfSmrgdnl This program is free software; you can redistribute it and/or modify 42035c4bbdfSmrgdnl it under the terms of the GNU General Public License as published by 42135c4bbdfSmrgdnl the Free Software Foundation; either version 2 of the License, or 42235c4bbdfSmrgdnl (at your option) any later version. 42335c4bbdfSmrgdnl 42435c4bbdfSmrgdnl This program is distributed in the hope that it will be useful, but 42535c4bbdfSmrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 42635c4bbdfSmrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 42735c4bbdfSmrgdnl General Public License for more details. 42835c4bbdfSmrgdnl 42935c4bbdfSmrgdnl You should have received a copy of the GNU General Public License 43035c4bbdfSmrgdnl along with this program; if not, write to the Free Software 43135c4bbdfSmrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 43235c4bbdfSmrgdnl 02111-1307, USA. 43335c4bbdfSmrgdnl 43435c4bbdfSmrgdnl As a special exception to the GNU General Public License, if you 43535c4bbdfSmrgdnl distribute this file as part of a program that contains a 43635c4bbdfSmrgdnl configuration script generated by Autoconf, you may include it under 43735c4bbdfSmrgdnl the same distribution terms that you use for the rest of that 43835c4bbdfSmrgdnl program. 43935c4bbdfSmrg 44035c4bbdfSmrgdnl PKG_PREREQ(MIN-VERSION) 44135c4bbdfSmrgdnl ----------------------- 44235c4bbdfSmrgdnl Since: 0.29 44335c4bbdfSmrgdnl 44435c4bbdfSmrgdnl Verify that the version of the pkg-config macros are at least 44535c4bbdfSmrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 44635c4bbdfSmrgdnl installed version of pkg-config, this checks the developer's version 44735c4bbdfSmrgdnl of pkg.m4 when generating configure. 44835c4bbdfSmrgdnl 44935c4bbdfSmrgdnl To ensure that this macro is defined, also add: 45035c4bbdfSmrgdnl m4_ifndef([PKG_PREREQ], 45135c4bbdfSmrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 45235c4bbdfSmrgdnl 45335c4bbdfSmrgdnl See the "Since" comment for each macro you use to see what version 45435c4bbdfSmrgdnl of the macros you require. 45535c4bbdfSmrgm4_defun([PKG_PREREQ], 4561b5d61b8Smrg[m4_define([PKG_MACROS_VERSION], [0.29.1]) 45735c4bbdfSmrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 45835c4bbdfSmrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 45935c4bbdfSmrg])dnl PKG_PREREQ 46035c4bbdfSmrg 46135c4bbdfSmrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 46235c4bbdfSmrgdnl ---------------------------------- 46335c4bbdfSmrgdnl Since: 0.16 46435c4bbdfSmrgdnl 46535c4bbdfSmrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 46635c4bbdfSmrgdnl first found in the path. Checks that the version of pkg-config found 46735c4bbdfSmrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 46835c4bbdfSmrgdnl used since that's the first version where most current features of 46935c4bbdfSmrgdnl pkg-config existed. 47035c4bbdfSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 47135c4bbdfSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 47235c4bbdfSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 47335c4bbdfSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 47435c4bbdfSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 47535c4bbdfSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 47635c4bbdfSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 4774642e01fSmrg 47835c4bbdfSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 47935c4bbdfSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 4806747b715Smrgfi 48135c4bbdfSmrgif test -n "$PKG_CONFIG"; then 48235c4bbdfSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 48335c4bbdfSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 48435c4bbdfSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 48535c4bbdfSmrg AC_MSG_RESULT([yes]) 48635c4bbdfSmrg else 48735c4bbdfSmrg AC_MSG_RESULT([no]) 48835c4bbdfSmrg PKG_CONFIG="" 48935c4bbdfSmrg fi 49035c4bbdfSmrgfi[]dnl 49135c4bbdfSmrg])dnl PKG_PROG_PKG_CONFIG 4924642e01fSmrg 49335c4bbdfSmrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 49435c4bbdfSmrgdnl ------------------------------------------------------------------- 49535c4bbdfSmrgdnl Since: 0.18 49635c4bbdfSmrgdnl 49735c4bbdfSmrgdnl Check to see whether a particular set of modules exists. Similar to 49835c4bbdfSmrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 49935c4bbdfSmrgdnl 50035c4bbdfSmrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 50135c4bbdfSmrgdnl only at the first occurence in configure.ac, so if the first place 50235c4bbdfSmrgdnl it's called might be skipped (such as if it is within an "if", you 50335c4bbdfSmrgdnl have to call PKG_CHECK_EXISTS manually 50435c4bbdfSmrgAC_DEFUN([PKG_CHECK_EXISTS], 50535c4bbdfSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 50635c4bbdfSmrgif test -n "$PKG_CONFIG" && \ 50735c4bbdfSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 50835c4bbdfSmrg m4_default([$2], [:]) 50935c4bbdfSmrgm4_ifvaln([$3], [else 51035c4bbdfSmrg $3])dnl 51135c4bbdfSmrgfi]) 5124642e01fSmrg 51335c4bbdfSmrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 51435c4bbdfSmrgdnl --------------------------------------------- 51535c4bbdfSmrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 51635c4bbdfSmrgdnl pkg_failed based on the result. 51735c4bbdfSmrgm4_define([_PKG_CONFIG], 51835c4bbdfSmrg[if test -n "$$1"; then 51935c4bbdfSmrg pkg_cv_[]$1="$$1" 52035c4bbdfSmrg elif test -n "$PKG_CONFIG"; then 52135c4bbdfSmrg PKG_CHECK_EXISTS([$3], 52235c4bbdfSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 52335c4bbdfSmrg test "x$?" != "x0" && pkg_failed=yes ], 52435c4bbdfSmrg [pkg_failed=yes]) 52535c4bbdfSmrg else 52635c4bbdfSmrg pkg_failed=untried 52735c4bbdfSmrgfi[]dnl 52835c4bbdfSmrg])dnl _PKG_CONFIG 5294642e01fSmrg 53035c4bbdfSmrgdnl _PKG_SHORT_ERRORS_SUPPORTED 53135c4bbdfSmrgdnl --------------------------- 53235c4bbdfSmrgdnl Internal check to see if pkg-config supports short errors. 53335c4bbdfSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 53435c4bbdfSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 53535c4bbdfSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 53635c4bbdfSmrg _pkg_short_errors_supported=yes 53735c4bbdfSmrgelse 53835c4bbdfSmrg _pkg_short_errors_supported=no 53935c4bbdfSmrgfi[]dnl 54035c4bbdfSmrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 5414642e01fSmrg 5424642e01fSmrg 54335c4bbdfSmrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 54435c4bbdfSmrgdnl [ACTION-IF-NOT-FOUND]) 54535c4bbdfSmrgdnl -------------------------------------------------------------- 54635c4bbdfSmrgdnl Since: 0.4.0 54735c4bbdfSmrgdnl 54835c4bbdfSmrgdnl Note that if there is a possibility the first call to 54935c4bbdfSmrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 55035c4bbdfSmrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 55135c4bbdfSmrgAC_DEFUN([PKG_CHECK_MODULES], 55235c4bbdfSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 55335c4bbdfSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 55435c4bbdfSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 5554642e01fSmrg 55635c4bbdfSmrgpkg_failed=no 55735c4bbdfSmrgAC_MSG_CHECKING([for $1]) 5584642e01fSmrg 55935c4bbdfSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 56035c4bbdfSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 5614642e01fSmrg 56235c4bbdfSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 56335c4bbdfSmrgand $1[]_LIBS to avoid the need to call pkg-config. 56435c4bbdfSmrgSee the pkg-config man page for more details.]) 565475c125cSmrg 566475c125cSmrgif test $pkg_failed = yes; then 567475c125cSmrg AC_MSG_RESULT([no]) 568475c125cSmrg _PKG_SHORT_ERRORS_SUPPORTED 569475c125cSmrg if test $_pkg_short_errors_supported = yes; then 57035c4bbdfSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 571475c125cSmrg else 57235c4bbdfSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 573475c125cSmrg fi 574475c125cSmrg # Put the nasty error message in config.log where it belongs 575475c125cSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 576475c125cSmrg 577475c125cSmrg m4_default([$4], [AC_MSG_ERROR( 578475c125cSmrg[Package requirements ($2) were not met: 579475c125cSmrg 580475c125cSmrg$$1_PKG_ERRORS 581475c125cSmrg 582475c125cSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 583475c125cSmrginstalled software in a non-standard prefix. 584475c125cSmrg 585475c125cSmrg_PKG_TEXT])[]dnl 586475c125cSmrg ]) 587475c125cSmrgelif test $pkg_failed = untried; then 588475c125cSmrg AC_MSG_RESULT([no]) 589475c125cSmrg m4_default([$4], [AC_MSG_FAILURE( 590475c125cSmrg[The pkg-config script could not be found or is too old. Make sure it 591475c125cSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 592475c125cSmrgpath to pkg-config. 593475c125cSmrg 594475c125cSmrg_PKG_TEXT 595475c125cSmrg 59635c4bbdfSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 597475c125cSmrg ]) 598475c125cSmrgelse 599475c125cSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 600475c125cSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 601475c125cSmrg AC_MSG_RESULT([yes]) 602475c125cSmrg $3 603475c125cSmrgfi[]dnl 60435c4bbdfSmrg])dnl PKG_CHECK_MODULES 605475c125cSmrg 60635c4bbdfSmrg 60735c4bbdfSmrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 60835c4bbdfSmrgdnl [ACTION-IF-NOT-FOUND]) 60935c4bbdfSmrgdnl --------------------------------------------------------------------- 61035c4bbdfSmrgdnl Since: 0.29 6116747b715Smrgdnl 61235c4bbdfSmrgdnl Checks for existence of MODULES and gathers its build flags with 61335c4bbdfSmrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 61435c4bbdfSmrgdnl and VARIABLE-PREFIX_LIBS from --libs. 6156747b715Smrgdnl 61635c4bbdfSmrgdnl Note that if there is a possibility the first call to 61735c4bbdfSmrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 61835c4bbdfSmrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 61935c4bbdfSmrgdnl configure.ac. 62035c4bbdfSmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 62135c4bbdfSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 62235c4bbdfSmrg_save_PKG_CONFIG=$PKG_CONFIG 62335c4bbdfSmrgPKG_CONFIG="$PKG_CONFIG --static" 62435c4bbdfSmrgPKG_CHECK_MODULES($@) 62535c4bbdfSmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 62635c4bbdfSmrg])dnl PKG_CHECK_MODULES_STATIC 62735c4bbdfSmrg 62835c4bbdfSmrg 62935c4bbdfSmrgdnl PKG_INSTALLDIR([DIRECTORY]) 63035c4bbdfSmrgdnl ------------------------- 63135c4bbdfSmrgdnl Since: 0.27 63235c4bbdfSmrgdnl 63335c4bbdfSmrgdnl Substitutes the variable pkgconfigdir as the location where a module 63435c4bbdfSmrgdnl should install pkg-config .pc files. By default the directory is 63535c4bbdfSmrgdnl $libdir/pkgconfig, but the default can be changed by passing 63635c4bbdfSmrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 63735c4bbdfSmrgdnl parameter. 63835c4bbdfSmrgAC_DEFUN([PKG_INSTALLDIR], 63935c4bbdfSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 64035c4bbdfSmrgm4_pushdef([pkg_description], 64135c4bbdfSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 64235c4bbdfSmrgAC_ARG_WITH([pkgconfigdir], 64335c4bbdfSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 64435c4bbdfSmrg [with_pkgconfigdir=]pkg_default) 64535c4bbdfSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 64635c4bbdfSmrgm4_popdef([pkg_default]) 64735c4bbdfSmrgm4_popdef([pkg_description]) 64835c4bbdfSmrg])dnl PKG_INSTALLDIR 64935c4bbdfSmrg 65035c4bbdfSmrg 65135c4bbdfSmrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 65235c4bbdfSmrgdnl -------------------------------- 65335c4bbdfSmrgdnl Since: 0.27 65435c4bbdfSmrgdnl 65535c4bbdfSmrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 65635c4bbdfSmrgdnl module should install arch-independent pkg-config .pc files. By 65735c4bbdfSmrgdnl default the directory is $datadir/pkgconfig, but the default can be 65835c4bbdfSmrgdnl changed by passing DIRECTORY. The user can override through the 65935c4bbdfSmrgdnl --with-noarch-pkgconfigdir parameter. 66035c4bbdfSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 66135c4bbdfSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 66235c4bbdfSmrgm4_pushdef([pkg_description], 66335c4bbdfSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 66435c4bbdfSmrgAC_ARG_WITH([noarch-pkgconfigdir], 66535c4bbdfSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 66635c4bbdfSmrg [with_noarch_pkgconfigdir=]pkg_default) 66735c4bbdfSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 66835c4bbdfSmrgm4_popdef([pkg_default]) 66935c4bbdfSmrgm4_popdef([pkg_description]) 67035c4bbdfSmrg])dnl PKG_NOARCH_INSTALLDIR 67135c4bbdfSmrg 67235c4bbdfSmrg 67335c4bbdfSmrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 67435c4bbdfSmrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 67535c4bbdfSmrgdnl ------------------------------------------- 67635c4bbdfSmrgdnl Since: 0.28 67735c4bbdfSmrgdnl 67835c4bbdfSmrgdnl Retrieves the value of the pkg-config variable for the given module. 67935c4bbdfSmrgAC_DEFUN([PKG_CHECK_VAR], 68035c4bbdfSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 68135c4bbdfSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 68235c4bbdfSmrg 68335c4bbdfSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 68435c4bbdfSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 68535c4bbdfSmrg 68635c4bbdfSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 68735c4bbdfSmrg])dnl PKG_CHECK_VAR 68835c4bbdfSmrg 6891b5d61b8Smrgdnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, 6901b5d61b8Smrgdnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], 6911b5d61b8Smrgdnl [DESCRIPTION], [DEFAULT]) 6921b5d61b8Smrgdnl ------------------------------------------ 6931b5d61b8Smrgdnl 6941b5d61b8Smrgdnl Prepare a "--with-" configure option using the lowercase 6951b5d61b8Smrgdnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and 6961b5d61b8Smrgdnl PKG_CHECK_MODULES in a single macro. 6971b5d61b8SmrgAC_DEFUN([PKG_WITH_MODULES], 6981b5d61b8Smrg[ 6991b5d61b8Smrgm4_pushdef([with_arg], m4_tolower([$1])) 7001b5d61b8Smrg 7011b5d61b8Smrgm4_pushdef([description], 7021b5d61b8Smrg [m4_default([$5], [build with ]with_arg[ support])]) 7031b5d61b8Smrg 7041b5d61b8Smrgm4_pushdef([def_arg], [m4_default([$6], [auto])]) 7051b5d61b8Smrgm4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) 7061b5d61b8Smrgm4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) 7071b5d61b8Smrg 7081b5d61b8Smrgm4_case(def_arg, 7091b5d61b8Smrg [yes],[m4_pushdef([with_without], [--without-]with_arg)], 7101b5d61b8Smrg [m4_pushdef([with_without],[--with-]with_arg)]) 7111b5d61b8Smrg 7121b5d61b8SmrgAC_ARG_WITH(with_arg, 7131b5d61b8Smrg AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, 7141b5d61b8Smrg [AS_TR_SH([with_]with_arg)=def_arg]) 7151b5d61b8Smrg 7161b5d61b8SmrgAS_CASE([$AS_TR_SH([with_]with_arg)], 7171b5d61b8Smrg [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], 7181b5d61b8Smrg [auto],[PKG_CHECK_MODULES([$1],[$2], 7191b5d61b8Smrg [m4_n([def_action_if_found]) $3], 7201b5d61b8Smrg [m4_n([def_action_if_not_found]) $4])]) 7211b5d61b8Smrg 7221b5d61b8Smrgm4_popdef([with_arg]) 7231b5d61b8Smrgm4_popdef([description]) 7241b5d61b8Smrgm4_popdef([def_arg]) 7251b5d61b8Smrg 7261b5d61b8Smrg])dnl PKG_WITH_MODULES 7271b5d61b8Smrg 7281b5d61b8Smrgdnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 7291b5d61b8Smrgdnl [DESCRIPTION], [DEFAULT]) 7301b5d61b8Smrgdnl ----------------------------------------------- 7311b5d61b8Smrgdnl 7321b5d61b8Smrgdnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES 7331b5d61b8Smrgdnl check._[VARIABLE-PREFIX] is exported as make variable. 7341b5d61b8SmrgAC_DEFUN([PKG_HAVE_WITH_MODULES], 7351b5d61b8Smrg[ 7361b5d61b8SmrgPKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) 7371b5d61b8Smrg 7381b5d61b8SmrgAM_CONDITIONAL([HAVE_][$1], 7391b5d61b8Smrg [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) 7401b5d61b8Smrg])dnl PKG_HAVE_WITH_MODULES 7411b5d61b8Smrg 7421b5d61b8Smrgdnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 7431b5d61b8Smrgdnl [DESCRIPTION], [DEFAULT]) 7441b5d61b8Smrgdnl ------------------------------------------------------ 7451b5d61b8Smrgdnl 7461b5d61b8Smrgdnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after 7471b5d61b8Smrgdnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make 7481b5d61b8Smrgdnl and preprocessor variable. 7491b5d61b8SmrgAC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], 7501b5d61b8Smrg[ 7511b5d61b8SmrgPKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) 7521b5d61b8Smrg 7531b5d61b8SmrgAS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], 7541b5d61b8Smrg [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) 7551b5d61b8Smrg])dnl PKG_HAVE_DEFINE_WITH_MODULES 7561b5d61b8Smrg 75735c4bbdfSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 75835c4bbdfSmrgdnl 759c82838c1Smrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 7606747b715Smrgdnl 7616747b715Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 7626747b715Smrgdnl copy of this software and associated documentation files (the "Software"), 7636747b715Smrgdnl to deal in the Software without restriction, including without limitation 7646747b715Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 7656747b715Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 7666747b715Smrgdnl Software is furnished to do so, subject to the following conditions: 7676747b715Smrgdnl 7686747b715Smrgdnl The above copyright notice and this permission notice (including the next 7696747b715Smrgdnl paragraph) shall be included in all copies or substantial portions of the 7706747b715Smrgdnl Software. 7716747b715Smrgdnl 7726747b715Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 7736747b715Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 7746747b715Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 7756747b715Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 7766747b715Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 7776747b715Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 7786747b715Smrgdnl DEALINGS IN THE SOFTWARE. 7794642e01fSmrg 78035c4bbdfSmrg# XORG_MACROS_VERSION(required-version) 78135c4bbdfSmrg# ------------------------------------- 7826747b715Smrg# Minimum version: 1.1.0 7836747b715Smrg# 7846747b715Smrg# If you're using a macro added in Version 1.1 or newer, include this in 7856747b715Smrg# your configure.ac with the minimum required version, such as: 78635c4bbdfSmrg# XORG_MACROS_VERSION(1.1) 7876747b715Smrg# 7886747b715Smrg# To ensure that this macro is defined, also add: 78935c4bbdfSmrg# m4_ifndef([XORG_MACROS_VERSION], 79035c4bbdfSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 7916747b715Smrg# 7926747b715Smrg# 7936747b715Smrg# See the "minimum version" comment for each macro you use to see what 7946747b715Smrg# version you require. 79535c4bbdfSmrgm4_defun([XORG_MACROS_VERSION],[ 796c82838c1Smrgm4_define([vers_have], [1.19.3]) 7976747b715Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 7986747b715Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 7996747b715Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 80035c4bbdfSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 8016747b715Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 80235c4bbdfSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 8036747b715Smrgm4_undefine([vers_have]) 8046747b715Smrgm4_undefine([maj_have]) 8056747b715Smrgm4_undefine([maj_needed]) 80635c4bbdfSmrg]) # XORG_MACROS_VERSION 8074642e01fSmrg 80835c4bbdfSmrg# XORG_PROG_RAWCPP() 80935c4bbdfSmrg# ------------------ 8106747b715Smrg# Minimum version: 1.0.0 8116747b715Smrg# 81235c4bbdfSmrg# Find cpp program and necessary flags for use in pre-processing text files 81335c4bbdfSmrg# such as man pages and config files 81435c4bbdfSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 81535c4bbdfSmrgAC_REQUIRE([AC_PROG_CPP]) 816c82838c1SmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 81735c4bbdfSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 8184642e01fSmrg 81935c4bbdfSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 82035c4bbdfSmrg# which is not the best choice for supporting other OS'es, but covers most 82135c4bbdfSmrg# of the ones we need for now. 82235c4bbdfSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 82335c4bbdfSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 82435c4bbdfSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 82535c4bbdfSmrg AC_MSG_RESULT([no]) 82635c4bbdfSmrgelse 82735c4bbdfSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 82835c4bbdfSmrg RAWCPPFLAGS=-undef 82935c4bbdfSmrg AC_MSG_RESULT([yes]) 83035c4bbdfSmrg # under Cygwin unix is still defined even with -undef 83135c4bbdfSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 83235c4bbdfSmrg RAWCPPFLAGS="-undef -ansi" 83335c4bbdfSmrg AC_MSG_RESULT([yes, with -ansi]) 83435c4bbdfSmrg else 83535c4bbdfSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 8366747b715Smrg fi 83735c4bbdfSmrgfi 83835c4bbdfSmrgrm -f conftest.$ac_ext 8394642e01fSmrg 84035c4bbdfSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 84135c4bbdfSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 84235c4bbdfSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 84335c4bbdfSmrg AC_MSG_RESULT([no]) 84435c4bbdfSmrgelse 84535c4bbdfSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 84635c4bbdfSmrg TRADITIONALCPPFLAGS="-traditional" 84735c4bbdfSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 84835c4bbdfSmrg AC_MSG_RESULT([yes]) 8496747b715Smrg else 85035c4bbdfSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 8516747b715Smrg fi 85235c4bbdfSmrgfi 85335c4bbdfSmrgrm -f conftest.$ac_ext 85435c4bbdfSmrgAC_SUBST(RAWCPPFLAGS) 85535c4bbdfSmrgAC_SUBST(TRADITIONALCPPFLAGS) 85635c4bbdfSmrg]) # XORG_PROG_RAWCPP 8574642e01fSmrg 85835c4bbdfSmrg# XORG_MANPAGE_SECTIONS() 85935c4bbdfSmrg# ----------------------- 86035c4bbdfSmrg# Minimum version: 1.0.0 8614642e01fSmrg# 86235c4bbdfSmrg# Determine which sections man pages go in for the different man page types 86335c4bbdfSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 86435c4bbdfSmrg# Not sure if there's any better way than just hardcoding by OS name. 86535c4bbdfSmrg# Override default settings by setting environment variables 86635c4bbdfSmrg# Added MAN_SUBSTS in version 1.8 86735c4bbdfSmrg# Added AC_PROG_SED in version 1.8 8684642e01fSmrg 86935c4bbdfSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 87035c4bbdfSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 87135c4bbdfSmrgAC_REQUIRE([AC_PROG_SED]) 8724642e01fSmrg 873c82838c1Smrgcase $host_os in 874c82838c1Smrg solaris*) 875c82838c1Smrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 876c82838c1Smrg # check for a man page file found in later versions that use 877c82838c1Smrg # traditional section numbers instead 878c82838c1Smrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 879c82838c1Smrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 880c82838c1Smrg ;; 881c82838c1Smrg *) SYSV_MAN_SECTIONS=false ;; 882c82838c1Smrgesac 883c82838c1Smrg 88435c4bbdfSmrgif test x$APP_MAN_SUFFIX = x ; then 88535c4bbdfSmrg APP_MAN_SUFFIX=1 88635c4bbdfSmrgfi 88735c4bbdfSmrgif test x$APP_MAN_DIR = x ; then 88835c4bbdfSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 88935c4bbdfSmrgfi 8904642e01fSmrg 89135c4bbdfSmrgif test x$LIB_MAN_SUFFIX = x ; then 89235c4bbdfSmrg LIB_MAN_SUFFIX=3 89335c4bbdfSmrgfi 89435c4bbdfSmrgif test x$LIB_MAN_DIR = x ; then 89535c4bbdfSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 89635c4bbdfSmrgfi 8976747b715Smrg 89835c4bbdfSmrgif test x$FILE_MAN_SUFFIX = x ; then 899c82838c1Smrg case $SYSV_MAN_SECTIONS in 900c82838c1Smrg true) FILE_MAN_SUFFIX=4 ;; 901c82838c1Smrg *) FILE_MAN_SUFFIX=5 ;; 90235c4bbdfSmrg esac 90335c4bbdfSmrgfi 90435c4bbdfSmrgif test x$FILE_MAN_DIR = x ; then 90535c4bbdfSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 90635c4bbdfSmrgfi 9074642e01fSmrg 90835c4bbdfSmrgif test x$MISC_MAN_SUFFIX = x ; then 909c82838c1Smrg case $SYSV_MAN_SECTIONS in 910c82838c1Smrg true) MISC_MAN_SUFFIX=5 ;; 911c82838c1Smrg *) MISC_MAN_SUFFIX=7 ;; 91235c4bbdfSmrg esac 91335c4bbdfSmrgfi 91435c4bbdfSmrgif test x$MISC_MAN_DIR = x ; then 91535c4bbdfSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 91635c4bbdfSmrgfi 9176747b715Smrg 91835c4bbdfSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 919c82838c1Smrg case $SYSV_MAN_SECTIONS in 920c82838c1Smrg true) DRIVER_MAN_SUFFIX=7 ;; 921c82838c1Smrg *) DRIVER_MAN_SUFFIX=4 ;; 92235c4bbdfSmrg esac 92335c4bbdfSmrgfi 92435c4bbdfSmrgif test x$DRIVER_MAN_DIR = x ; then 92535c4bbdfSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 92635c4bbdfSmrgfi 9274642e01fSmrg 92835c4bbdfSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 929c82838c1Smrg case $SYSV_MAN_SECTIONS in 930c82838c1Smrg true) ADMIN_MAN_SUFFIX=1m ;; 931c82838c1Smrg *) ADMIN_MAN_SUFFIX=8 ;; 93235c4bbdfSmrg esac 93335c4bbdfSmrgfi 93435c4bbdfSmrgif test x$ADMIN_MAN_DIR = x ; then 93535c4bbdfSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 93635c4bbdfSmrgfi 93705b261ecSmrg 93805b261ecSmrg 93935c4bbdfSmrgAC_SUBST([APP_MAN_SUFFIX]) 94035c4bbdfSmrgAC_SUBST([LIB_MAN_SUFFIX]) 94135c4bbdfSmrgAC_SUBST([FILE_MAN_SUFFIX]) 94235c4bbdfSmrgAC_SUBST([MISC_MAN_SUFFIX]) 94335c4bbdfSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 94435c4bbdfSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 94535c4bbdfSmrgAC_SUBST([APP_MAN_DIR]) 94635c4bbdfSmrgAC_SUBST([LIB_MAN_DIR]) 94735c4bbdfSmrgAC_SUBST([FILE_MAN_DIR]) 94835c4bbdfSmrgAC_SUBST([MISC_MAN_DIR]) 94935c4bbdfSmrgAC_SUBST([DRIVER_MAN_DIR]) 95035c4bbdfSmrgAC_SUBST([ADMIN_MAN_DIR]) 95135c4bbdfSmrg 95235c4bbdfSmrgXORG_MAN_PAGE="X Version 11" 95335c4bbdfSmrgAC_SUBST([XORG_MAN_PAGE]) 95435c4bbdfSmrgMAN_SUBSTS="\ 95535c4bbdfSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 95635c4bbdfSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 95735c4bbdfSmrg -e 's|__xservername__|Xorg|g' \ 95835c4bbdfSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 95935c4bbdfSmrg -e 's|__projectroot__|\$(prefix)|g' \ 96035c4bbdfSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 96135c4bbdfSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 96235c4bbdfSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 96335c4bbdfSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 96435c4bbdfSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 96535c4bbdfSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 96635c4bbdfSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 96735c4bbdfSmrgAC_SUBST([MAN_SUBSTS]) 96805b261ecSmrg 96935c4bbdfSmrg]) # XORG_MANPAGE_SECTIONS 97005b261ecSmrg 97135c4bbdfSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 97235c4bbdfSmrg# ------------------------ 97335c4bbdfSmrg# Minimum version: 1.7.0 9746747b715Smrg# 97535c4bbdfSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 97635c4bbdfSmrg# provided by xorg-sgml-doctools, if installed. 97735c4bbdfSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 97835c4bbdfSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 97935c4bbdfSmrgXORG_SGML_PATH= 98035c4bbdfSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 98135c4bbdfSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 98235c4bbdfSmrg [m4_ifval([$1],[:], 98335c4bbdfSmrg [if test x"$cross_compiling" != x"yes" ; then 98435c4bbdfSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 98535c4bbdfSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 98635c4bbdfSmrg fi]) 98735c4bbdfSmrg ]) 98805b261ecSmrg 98935c4bbdfSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 99035c4bbdfSmrg# the path and the name of the doc stylesheet 99135c4bbdfSmrgif test "x$XORG_SGML_PATH" != "x" ; then 99235c4bbdfSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 99335c4bbdfSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 99435c4bbdfSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 99535c4bbdfSmrgelse 99635c4bbdfSmrg AC_MSG_RESULT([no]) 99735c4bbdfSmrgfi 998b1d344b3Smrg 99935c4bbdfSmrgAC_SUBST(XORG_SGML_PATH) 100035c4bbdfSmrgAC_SUBST(STYLESHEET_SRCDIR) 100135c4bbdfSmrgAC_SUBST(XSL_STYLESHEET) 100235c4bbdfSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 100335c4bbdfSmrg]) # XORG_CHECK_SGML_DOCTOOLS 100405b261ecSmrg 100535c4bbdfSmrg# XORG_CHECK_LINUXDOC 100635c4bbdfSmrg# ------------------- 100735c4bbdfSmrg# Minimum version: 1.0.0 100835c4bbdfSmrg# 100935c4bbdfSmrg# Defines the variable MAKE_TEXT if the necessary tools and 101035c4bbdfSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 101135c4bbdfSmrg# Whether or not the necessary tools and files are found can be checked 101235c4bbdfSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 101335c4bbdfSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 101435c4bbdfSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 101535c4bbdfSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1016b1d344b3Smrg 101735c4bbdfSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 101805b261ecSmrg 101935c4bbdfSmrgAC_MSG_CHECKING([whether to build documentation]) 102005b261ecSmrg 102135c4bbdfSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 102235c4bbdfSmrg BUILDDOC=yes 102335c4bbdfSmrgelse 102435c4bbdfSmrg BUILDDOC=no 102535c4bbdfSmrgfi 102605b261ecSmrg 102735c4bbdfSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 102805b261ecSmrg 102935c4bbdfSmrgAC_MSG_RESULT([$BUILDDOC]) 103005b261ecSmrg 103135c4bbdfSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 103205b261ecSmrg 103335c4bbdfSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 103435c4bbdfSmrg BUILDPDFDOC=yes 103535c4bbdfSmrgelse 103635c4bbdfSmrg BUILDPDFDOC=no 103735c4bbdfSmrgfi 1038475c125cSmrg 103935c4bbdfSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1040475c125cSmrg 104135c4bbdfSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 104205b261ecSmrg 104335c4bbdfSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 104435c4bbdfSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 104535c4bbdfSmrgMAKE_PDF="$PS2PDF" 104635c4bbdfSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10474642e01fSmrg 10484642e01fSmrgAC_SUBST(MAKE_TEXT) 10494642e01fSmrgAC_SUBST(MAKE_PS) 10504642e01fSmrgAC_SUBST(MAKE_PDF) 10514642e01fSmrgAC_SUBST(MAKE_HTML) 10524642e01fSmrg]) # XORG_CHECK_LINUXDOC 10534642e01fSmrg 10544642e01fSmrg# XORG_CHECK_DOCBOOK 10554642e01fSmrg# ------------------- 10564642e01fSmrg# Minimum version: 1.0.0 10574642e01fSmrg# 10584642e01fSmrg# Checks for the ability to build output formats from SGML DocBook source. 10594642e01fSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 10604642e01fSmrg# indicates whether the necessary tools and files are found and, if set, 10614642e01fSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 10624642e01fSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 10636747b715SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10646747b715Smrg 10654642e01fSmrgBUILDTXTDOC=no 10664642e01fSmrgBUILDPDFDOC=no 10674642e01fSmrgBUILDPSDOC=no 10684642e01fSmrgBUILDHTMLDOC=no 10694642e01fSmrg 10704642e01fSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 10714642e01fSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 10724642e01fSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 10734642e01fSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 10744642e01fSmrg 10756747b715SmrgAC_MSG_CHECKING([whether to build text documentation]) 10766747b715Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 10774642e01fSmrg test x$BUILD_TXTDOC != xno; then 10784642e01fSmrg BUILDTXTDOC=yes 10794642e01fSmrgfi 10804642e01fSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 10814642e01fSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 10824642e01fSmrg 10836747b715SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 10846747b715Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 10854642e01fSmrg test x$BUILD_PDFDOC != xno; then 10864642e01fSmrg BUILDPDFDOC=yes 10874642e01fSmrgfi 10884642e01fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10894642e01fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10904642e01fSmrg 10916747b715SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 10926747b715Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 10934642e01fSmrg test x$BUILD_PSDOC != xno; then 10944642e01fSmrg BUILDPSDOC=yes 10954642e01fSmrgfi 10964642e01fSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 10974642e01fSmrgAC_MSG_RESULT([$BUILDPSDOC]) 10984642e01fSmrg 10996747b715SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 11006747b715Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 11014642e01fSmrg test x$BUILD_HTMLDOC != xno; then 11024642e01fSmrg BUILDHTMLDOC=yes 11034642e01fSmrgfi 11044642e01fSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 11054642e01fSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 11064642e01fSmrg 11074642e01fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 11084642e01fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 11094642e01fSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 11104642e01fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 11114642e01fSmrg 11124642e01fSmrgAC_SUBST(MAKE_TEXT) 11134642e01fSmrgAC_SUBST(MAKE_PS) 11144642e01fSmrgAC_SUBST(MAKE_PDF) 11154642e01fSmrgAC_SUBST(MAKE_HTML) 11164642e01fSmrg]) # XORG_CHECK_DOCBOOK 11174642e01fSmrg 11186747b715Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 11196747b715Smrg# ---------------- 11206747b715Smrg# Minimum version: 1.5.0 11216747b715Smrg# Minimum version for optional DEFAULT argument: 1.11.0 11226747b715Smrg# 11236747b715Smrg# Documentation tools are not always available on all platforms and sometimes 11246747b715Smrg# not at the appropriate level. This macro enables a module to test for the 11256747b715Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 11266747b715Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 11276747b715Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 11286747b715Smrg# --with-xmlto assumes 'auto'. 11296747b715Smrg# 11306747b715Smrg# Interface to module: 11316747b715Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 11326747b715Smrg# XMLTO: returns the path of the xmlto program found 11336747b715Smrg# returns the path set by the user in the environment 11346747b715Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 11356747b715Smrg# 'no' user instructs the module not to use xmlto 11366747b715Smrg# 11376747b715Smrg# Added in version 1.10.0 11386747b715Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 11396747b715Smrg# xmlto for text output requires either lynx, links, or w3m browsers 11406747b715Smrg# 11416747b715Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 11426747b715Smrg# 11436747b715SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 11446747b715SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 11456747b715Smrgm4_define([_defopt], m4_default([$2], [auto])) 11466747b715SmrgAC_ARG_WITH(xmlto, 11476747b715Smrg AS_HELP_STRING([--with-xmlto], 11486747b715Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 11496747b715Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 11506747b715Smrgm4_undefine([_defopt]) 11516747b715Smrg 11526747b715Smrgif test "x$use_xmlto" = x"auto"; then 11536747b715Smrg AC_PATH_PROG([XMLTO], [xmlto]) 11546747b715Smrg if test "x$XMLTO" = "x"; then 11556747b715Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 11566747b715Smrg have_xmlto=no 11576747b715Smrg else 11586747b715Smrg have_xmlto=yes 11596747b715Smrg fi 11606747b715Smrgelif test "x$use_xmlto" = x"yes" ; then 11616747b715Smrg AC_PATH_PROG([XMLTO], [xmlto]) 11626747b715Smrg if test "x$XMLTO" = "x"; then 11636747b715Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 11646747b715Smrg fi 11656747b715Smrg have_xmlto=yes 11666747b715Smrgelif test "x$use_xmlto" = x"no" ; then 11676747b715Smrg if test "x$XMLTO" != "x"; then 11686747b715Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 11696747b715Smrg fi 11706747b715Smrg have_xmlto=no 11716747b715Smrgelse 11726747b715Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 11736747b715Smrgfi 11746747b715Smrg 11756747b715Smrg# Test for a minimum version of xmlto, if provided. 11766747b715Smrgm4_ifval([$1], 11776747b715Smrg[if test "$have_xmlto" = yes; then 11786747b715Smrg # scrape the xmlto version 11796747b715Smrg AC_MSG_CHECKING([the xmlto version]) 11806747b715Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 11816747b715Smrg AC_MSG_RESULT([$xmlto_version]) 11826747b715Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 11836747b715Smrg [if test "x$use_xmlto" = xauto; then 11846747b715Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 11856747b715Smrg have_xmlto=no 11866747b715Smrg else 11876747b715Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 11886747b715Smrg fi]) 11896747b715Smrgfi]) 11906747b715Smrg 11916747b715Smrg# Test for the ability of xmlto to generate a text target 1192e23ec014Smrg# 1193e23ec014Smrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 1194e23ec014Smrg# following test for empty XML docbook files. 1195e23ec014Smrg# For compatibility reasons use the following empty XML docbook file and if 1196e23ec014Smrg# it fails try it again with a non-empty XML file. 11976747b715Smrghave_xmlto_text=no 11986747b715Smrgcat > conftest.xml << "EOF" 11996747b715SmrgEOF 12006747b715SmrgAS_IF([test "$have_xmlto" = yes], 12016747b715Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 12026747b715Smrg [have_xmlto_text=yes], 1203e23ec014Smrg [# Try it again with a non-empty XML file. 1204e23ec014Smrg cat > conftest.xml << "EOF" 1205e23ec014Smrg<x></x> 1206e23ec014SmrgEOF 1207e23ec014Smrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1208e23ec014Smrg [have_xmlto_text=yes], 1209e23ec014Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 12106747b715Smrgrm -f conftest.xml 12116747b715SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 12126747b715SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 12136747b715Smrg]) # XORG_WITH_XMLTO 12146747b715Smrg 12158223e2f2Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 12168223e2f2Smrg# -------------------------------------------- 12178223e2f2Smrg# Minimum version: 1.12.0 12188223e2f2Smrg# Minimum version for optional DEFAULT argument: 1.12.0 12198223e2f2Smrg# 12208223e2f2Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 12218223e2f2Smrg# XML-based language used for the transformation of XML documents. 12228223e2f2Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 12238223e2f2Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 12248223e2f2Smrg# The XSLT processor is often used as a standalone tool for transformations. 12258223e2f2Smrg# It should not be assumed that this tool is used only to work with documnetation. 12268223e2f2Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 12278223e2f2Smrg# 12288223e2f2Smrg# Interface to module: 12298223e2f2Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 12308223e2f2Smrg# XSLTPROC: returns the path of the xsltproc program found 12318223e2f2Smrg# returns the path set by the user in the environment 12328223e2f2Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 12338223e2f2Smrg# 'no' user instructs the module not to use xsltproc 12348223e2f2Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 12358223e2f2Smrg# 12368223e2f2Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 12378223e2f2Smrg# 12388223e2f2SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 12398223e2f2SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1240475c125cSmrg# Preserves the interface, should it be implemented later 1241475c125cSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 12428223e2f2Smrgm4_define([_defopt], m4_default([$2], [auto])) 12438223e2f2SmrgAC_ARG_WITH(xsltproc, 12448223e2f2Smrg AS_HELP_STRING([--with-xsltproc], 12458223e2f2Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 12468223e2f2Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 12478223e2f2Smrgm4_undefine([_defopt]) 12488223e2f2Smrg 12498223e2f2Smrgif test "x$use_xsltproc" = x"auto"; then 12508223e2f2Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 12518223e2f2Smrg if test "x$XSLTPROC" = "x"; then 12528223e2f2Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 12538223e2f2Smrg have_xsltproc=no 12548223e2f2Smrg else 12558223e2f2Smrg have_xsltproc=yes 12568223e2f2Smrg fi 12578223e2f2Smrgelif test "x$use_xsltproc" = x"yes" ; then 12588223e2f2Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 12598223e2f2Smrg if test "x$XSLTPROC" = "x"; then 12608223e2f2Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 12618223e2f2Smrg fi 12628223e2f2Smrg have_xsltproc=yes 12638223e2f2Smrgelif test "x$use_xsltproc" = x"no" ; then 12648223e2f2Smrg if test "x$XSLTPROC" != "x"; then 12658223e2f2Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 12668223e2f2Smrg fi 12678223e2f2Smrg have_xsltproc=no 12688223e2f2Smrgelse 12698223e2f2Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 12708223e2f2Smrgfi 12718223e2f2Smrg 12728223e2f2SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 12738223e2f2Smrg]) # XORG_WITH_XSLTPROC 12748223e2f2Smrg 1275475c125cSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1276475c125cSmrg# ---------------------------------------- 1277475c125cSmrg# Minimum version: 1.15.0 1278475c125cSmrg# 1279475c125cSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 1280475c125cSmrg# scanning arbitrary text files, extracting information from those text files, 1281475c125cSmrg# and printing reports based on that information. 1282475c125cSmrg# 1283475c125cSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 1284475c125cSmrg# 1285475c125cSmrg# Interface to module: 1286475c125cSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 1287475c125cSmrg# PERL: returns the path of the perl program found 1288475c125cSmrg# returns the path set by the user in the environment 1289475c125cSmrg# --with-perl: 'yes' user instructs the module to use perl 1290475c125cSmrg# 'no' user instructs the module not to use perl 1291475c125cSmrg# have_perl: returns yes if perl found in PATH or no 1292475c125cSmrg# 1293475c125cSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1294475c125cSmrg# 1295475c125cSmrgAC_DEFUN([XORG_WITH_PERL],[ 1296475c125cSmrgAC_ARG_VAR([PERL], [Path to perl command]) 1297475c125cSmrg# Preserves the interface, should it be implemented later 1298475c125cSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1299475c125cSmrgm4_define([_defopt], m4_default([$2], [auto])) 1300475c125cSmrgAC_ARG_WITH(perl, 1301475c125cSmrg AS_HELP_STRING([--with-perl], 1302475c125cSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 1303475c125cSmrg [use_perl=$withval], [use_perl=]_defopt) 1304475c125cSmrgm4_undefine([_defopt]) 1305475c125cSmrg 1306475c125cSmrgif test "x$use_perl" = x"auto"; then 1307475c125cSmrg AC_PATH_PROG([PERL], [perl]) 1308475c125cSmrg if test "x$PERL" = "x"; then 1309475c125cSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1310475c125cSmrg have_perl=no 1311475c125cSmrg else 1312475c125cSmrg have_perl=yes 1313475c125cSmrg fi 1314475c125cSmrgelif test "x$use_perl" = x"yes" ; then 1315475c125cSmrg AC_PATH_PROG([PERL], [perl]) 1316475c125cSmrg if test "x$PERL" = "x"; then 1317475c125cSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1318475c125cSmrg fi 1319475c125cSmrg have_perl=yes 1320475c125cSmrgelif test "x$use_perl" = x"no" ; then 1321475c125cSmrg if test "x$PERL" != "x"; then 1322475c125cSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1323475c125cSmrg fi 1324475c125cSmrg have_perl=no 1325475c125cSmrgelse 1326475c125cSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 1327475c125cSmrgfi 1328475c125cSmrg 1329475c125cSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 1330475c125cSmrg]) # XORG_WITH_PERL 13318223e2f2Smrg 13326747b715Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 13336747b715Smrg# ---------------- 13346747b715Smrg# Minimum version: 1.5.0 13356747b715Smrg# Minimum version for optional DEFAULT argument: 1.11.0 13366747b715Smrg# 13376747b715Smrg# Documentation tools are not always available on all platforms and sometimes 13386747b715Smrg# not at the appropriate level. This macro enables a module to test for the 13396747b715Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 13406747b715Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 13416747b715Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 13426747b715Smrg# --with-asciidoc assumes 'auto'. 13436747b715Smrg# 13446747b715Smrg# Interface to module: 13456747b715Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 13466747b715Smrg# ASCIIDOC: returns the path of the asciidoc program found 13476747b715Smrg# returns the path set by the user in the environment 13486747b715Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 13496747b715Smrg# 'no' user instructs the module not to use asciidoc 13506747b715Smrg# 13516747b715Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 13526747b715Smrg# 13536747b715SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 13546747b715SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 13556747b715Smrgm4_define([_defopt], m4_default([$2], [auto])) 13566747b715SmrgAC_ARG_WITH(asciidoc, 13576747b715Smrg AS_HELP_STRING([--with-asciidoc], 13586747b715Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 13596747b715Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 13606747b715Smrgm4_undefine([_defopt]) 13616747b715Smrg 13626747b715Smrgif test "x$use_asciidoc" = x"auto"; then 13636747b715Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 13646747b715Smrg if test "x$ASCIIDOC" = "x"; then 13656747b715Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 13666747b715Smrg have_asciidoc=no 13676747b715Smrg else 13686747b715Smrg have_asciidoc=yes 13696747b715Smrg fi 13706747b715Smrgelif test "x$use_asciidoc" = x"yes" ; then 13716747b715Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 13726747b715Smrg if test "x$ASCIIDOC" = "x"; then 13736747b715Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 13746747b715Smrg fi 13756747b715Smrg have_asciidoc=yes 13766747b715Smrgelif test "x$use_asciidoc" = x"no" ; then 13776747b715Smrg if test "x$ASCIIDOC" != "x"; then 13786747b715Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 13796747b715Smrg fi 13806747b715Smrg have_asciidoc=no 13816747b715Smrgelse 13826747b715Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 13836747b715Smrgfi 13846747b715Smrgm4_ifval([$1], 13856747b715Smrg[if test "$have_asciidoc" = yes; then 13866747b715Smrg # scrape the asciidoc version 13876747b715Smrg AC_MSG_CHECKING([the asciidoc version]) 13886747b715Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 13896747b715Smrg AC_MSG_RESULT([$asciidoc_version]) 13906747b715Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 13916747b715Smrg [if test "x$use_asciidoc" = xauto; then 13926747b715Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 13936747b715Smrg have_asciidoc=no 13946747b715Smrg else 13956747b715Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 13966747b715Smrg fi]) 13976747b715Smrgfi]) 13986747b715SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 13996747b715Smrg]) # XORG_WITH_ASCIIDOC 14006747b715Smrg 14016747b715Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 140235c4bbdfSmrg# ------------------------------------------- 14036747b715Smrg# Minimum version: 1.5.0 14046747b715Smrg# Minimum version for optional DEFAULT argument: 1.11.0 140535c4bbdfSmrg# Minimum version for optional DOT checking: 1.18.0 14066747b715Smrg# 14076747b715Smrg# Documentation tools are not always available on all platforms and sometimes 14086747b715Smrg# not at the appropriate level. This macro enables a module to test for the 14096747b715Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 14106747b715Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 14116747b715Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 14126747b715Smrg# --with-doxygen assumes 'auto'. 14136747b715Smrg# 14146747b715Smrg# Interface to module: 14156747b715Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 14166747b715Smrg# DOXYGEN: returns the path of the doxygen program found 14176747b715Smrg# returns the path set by the user in the environment 14186747b715Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 14196747b715Smrg# 'no' user instructs the module not to use doxygen 14206747b715Smrg# 14216747b715Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 14226747b715Smrg# 14236747b715SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 14246747b715SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 142535c4bbdfSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 14266747b715Smrgm4_define([_defopt], m4_default([$2], [auto])) 14276747b715SmrgAC_ARG_WITH(doxygen, 14286747b715Smrg AS_HELP_STRING([--with-doxygen], 14296747b715Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 14306747b715Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 14316747b715Smrgm4_undefine([_defopt]) 14326747b715Smrg 14336747b715Smrgif test "x$use_doxygen" = x"auto"; then 14346747b715Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 14356747b715Smrg if test "x$DOXYGEN" = "x"; then 14366747b715Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 14376747b715Smrg have_doxygen=no 14386747b715Smrg else 14396747b715Smrg have_doxygen=yes 14406747b715Smrg fi 14416747b715Smrgelif test "x$use_doxygen" = x"yes" ; then 14426747b715Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 14436747b715Smrg if test "x$DOXYGEN" = "x"; then 14446747b715Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 14456747b715Smrg fi 14466747b715Smrg have_doxygen=yes 14476747b715Smrgelif test "x$use_doxygen" = x"no" ; then 14486747b715Smrg if test "x$DOXYGEN" != "x"; then 14496747b715Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 14506747b715Smrg fi 14516747b715Smrg have_doxygen=no 14526747b715Smrgelse 14536747b715Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 14546747b715Smrgfi 14556747b715Smrgm4_ifval([$1], 14566747b715Smrg[if test "$have_doxygen" = yes; then 14576747b715Smrg # scrape the doxygen version 14586747b715Smrg AC_MSG_CHECKING([the doxygen version]) 14596747b715Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 14606747b715Smrg AC_MSG_RESULT([$doxygen_version]) 14616747b715Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 14626747b715Smrg [if test "x$use_doxygen" = xauto; then 14636747b715Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 14646747b715Smrg have_doxygen=no 14656747b715Smrg else 14666747b715Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 14676747b715Smrg fi]) 14686747b715Smrgfi]) 146935c4bbdfSmrg 147035c4bbdfSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 147135c4bbdfSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 147235c4bbdfSmrgdnl HAVE_DOT = @HAVE_DOT@ 147335c4bbdfSmrgHAVE_DOT=no 147435c4bbdfSmrgif test "x$have_doxygen" = "xyes"; then 147535c4bbdfSmrg AC_PATH_PROG([DOT], [dot]) 147635c4bbdfSmrg if test "x$DOT" != "x"; then 147735c4bbdfSmrg HAVE_DOT=yes 147835c4bbdfSmrg fi 147935c4bbdfSmrgfi 148035c4bbdfSmrg 148135c4bbdfSmrgAC_SUBST([HAVE_DOT]) 148235c4bbdfSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 14836747b715SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 14846747b715Smrg]) # XORG_WITH_DOXYGEN 14856747b715Smrg 14866747b715Smrg# XORG_WITH_GROFF([DEFAULT]) 14876747b715Smrg# ---------------- 14886747b715Smrg# Minimum version: 1.6.0 14896747b715Smrg# Minimum version for optional DEFAULT argument: 1.11.0 14906747b715Smrg# 14916747b715Smrg# Documentation tools are not always available on all platforms and sometimes 14926747b715Smrg# not at the appropriate level. This macro enables a module to test for the 14936747b715Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 14946747b715Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 14956747b715Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 14966747b715Smrg# --with-groff assumes 'auto'. 14976747b715Smrg# 14986747b715Smrg# Interface to module: 14996747b715Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 15006747b715Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 15016747b715Smrg# HAVE_GROFF_MS: the -ms macros package 15026747b715Smrg# GROFF: returns the path of the groff program found 15036747b715Smrg# returns the path set by the user in the environment 15046747b715Smrg# --with-groff: 'yes' user instructs the module to use groff 15056747b715Smrg# 'no' user instructs the module not to use groff 15066747b715Smrg# 15076747b715Smrg# Added in version 1.9.0: 15086747b715Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 15096747b715Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 15106747b715Smrg# psselect from the psutils package. 15116747b715Smrg# the ghostcript package. Refer to the grohtml man pages 15126747b715Smrg# 15136747b715Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 15146747b715Smrg# 15156747b715Smrg# OS and distros often splits groff in a basic and full package, the former 15166747b715Smrg# having the groff program and the later having devices, fonts and macros 15176747b715Smrg# Checking for the groff executable is not enough. 15186747b715Smrg# 15196747b715Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 15206747b715Smrg# unset HAVE_GROFF or GROFF env variables. 15216747b715Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 15226747b715Smrg# 15236747b715SmrgAC_DEFUN([XORG_WITH_GROFF],[ 15246747b715SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 15256747b715Smrgm4_define([_defopt], m4_default([$1], [auto])) 15266747b715SmrgAC_ARG_WITH(groff, 15276747b715Smrg AS_HELP_STRING([--with-groff], 15286747b715Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 15296747b715Smrg [use_groff=$withval], [use_groff=]_defopt) 15306747b715Smrgm4_undefine([_defopt]) 15316747b715Smrg 15326747b715Smrgif test "x$use_groff" = x"auto"; then 15336747b715Smrg AC_PATH_PROG([GROFF], [groff]) 15346747b715Smrg if test "x$GROFF" = "x"; then 15356747b715Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 15366747b715Smrg have_groff=no 15376747b715Smrg else 15386747b715Smrg have_groff=yes 15396747b715Smrg fi 15406747b715Smrgelif test "x$use_groff" = x"yes" ; then 15416747b715Smrg AC_PATH_PROG([GROFF], [groff]) 15426747b715Smrg if test "x$GROFF" = "x"; then 15436747b715Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 15446747b715Smrg fi 15456747b715Smrg have_groff=yes 15466747b715Smrgelif test "x$use_groff" = x"no" ; then 15476747b715Smrg if test "x$GROFF" != "x"; then 15486747b715Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 15496747b715Smrg fi 15506747b715Smrg have_groff=no 15516747b715Smrgelse 15526747b715Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 15536747b715Smrgfi 15546747b715Smrg 15556747b715Smrg# We have groff, test for the presence of the macro packages 15566747b715Smrgif test "x$have_groff" = x"yes"; then 15576747b715Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 15586747b715Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 15596747b715Smrg groff_ms_works=yes 15606747b715Smrg else 15616747b715Smrg groff_ms_works=no 15626747b715Smrg fi 15636747b715Smrg AC_MSG_RESULT([$groff_ms_works]) 15646747b715Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 15656747b715Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 15666747b715Smrg groff_mm_works=yes 15676747b715Smrg else 15686747b715Smrg groff_mm_works=no 15696747b715Smrg fi 15706747b715Smrg AC_MSG_RESULT([$groff_mm_works]) 15716747b715Smrgfi 15726747b715Smrg 15736747b715Smrg# We have groff, test for HTML dependencies, one command per package 15746747b715Smrgif test "x$have_groff" = x"yes"; then 15756747b715Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 15766747b715Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 15776747b715Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 15786747b715Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 15796747b715Smrg have_groff_html=yes 15806747b715Smrg else 15816747b715Smrg have_groff_html=no 15826747b715Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 15836747b715Smrg fi 15846747b715Smrgfi 15856747b715Smrg 15866747b715Smrg# Set Automake conditionals for Makefiles 15876747b715SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 15886747b715SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 15896747b715SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 15906747b715SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 15916747b715Smrg]) # XORG_WITH_GROFF 15926747b715Smrg 1593475c125cSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 1594475c125cSmrg# --------------------------------------- 15956747b715Smrg# Minimum version: 1.6.0 15966747b715Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1597475c125cSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 15986747b715Smrg# 15996747b715Smrg# Documentation tools are not always available on all platforms and sometimes 16006747b715Smrg# not at the appropriate level. This macro enables a module to test for the 16016747b715Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 16026747b715Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 16036747b715Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 16046747b715Smrg# --with-fop assumes 'auto'. 16056747b715Smrg# 16066747b715Smrg# Interface to module: 16076747b715Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 16086747b715Smrg# FOP: returns the path of the fop program found 16096747b715Smrg# returns the path set by the user in the environment 16106747b715Smrg# --with-fop: 'yes' user instructs the module to use fop 16116747b715Smrg# 'no' user instructs the module not to use fop 16126747b715Smrg# 16136747b715Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 16146747b715Smrg# 16156747b715SmrgAC_DEFUN([XORG_WITH_FOP],[ 16166747b715SmrgAC_ARG_VAR([FOP], [Path to fop command]) 1617475c125cSmrgm4_define([_defopt], m4_default([$2], [auto])) 16186747b715SmrgAC_ARG_WITH(fop, 16196747b715Smrg AS_HELP_STRING([--with-fop], 16206747b715Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 16216747b715Smrg [use_fop=$withval], [use_fop=]_defopt) 16226747b715Smrgm4_undefine([_defopt]) 16236747b715Smrg 16246747b715Smrgif test "x$use_fop" = x"auto"; then 16256747b715Smrg AC_PATH_PROG([FOP], [fop]) 16266747b715Smrg if test "x$FOP" = "x"; then 16276747b715Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 16286747b715Smrg have_fop=no 16296747b715Smrg else 16306747b715Smrg have_fop=yes 16316747b715Smrg fi 16326747b715Smrgelif test "x$use_fop" = x"yes" ; then 16336747b715Smrg AC_PATH_PROG([FOP], [fop]) 16346747b715Smrg if test "x$FOP" = "x"; then 16356747b715Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 16366747b715Smrg fi 16376747b715Smrg have_fop=yes 16386747b715Smrgelif test "x$use_fop" = x"no" ; then 16396747b715Smrg if test "x$FOP" != "x"; then 16406747b715Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 16416747b715Smrg fi 16426747b715Smrg have_fop=no 16436747b715Smrgelse 16446747b715Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 16456747b715Smrgfi 1646475c125cSmrg 1647475c125cSmrg# Test for a minimum version of fop, if provided. 1648475c125cSmrgm4_ifval([$1], 1649475c125cSmrg[if test "$have_fop" = yes; then 1650475c125cSmrg # scrape the fop version 1651475c125cSmrg AC_MSG_CHECKING([for fop minimum version]) 1652475c125cSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 1653475c125cSmrg AC_MSG_RESULT([$fop_version]) 1654475c125cSmrg AS_VERSION_COMPARE([$fop_version], [$1], 1655475c125cSmrg [if test "x$use_fop" = xauto; then 1656475c125cSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 1657475c125cSmrg have_fop=no 1658475c125cSmrg else 1659475c125cSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 1660475c125cSmrg fi]) 1661475c125cSmrgfi]) 16626747b715SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 16636747b715Smrg]) # XORG_WITH_FOP 16646747b715Smrg 166535c4bbdfSmrg# XORG_WITH_M4([MIN-VERSION]) 166635c4bbdfSmrg# --------------------------- 166735c4bbdfSmrg# Minimum version: 1.19.0 166835c4bbdfSmrg# 166935c4bbdfSmrg# This macro attempts to locate an m4 macro processor which supports 167035c4bbdfSmrg# -I option and is only useful for modules relying on M4 in order to 167135c4bbdfSmrg# expand macros in source code files. 167235c4bbdfSmrg# 167335c4bbdfSmrg# Interface to module: 167435c4bbdfSmrg# M4: returns the path of the m4 program found 167535c4bbdfSmrg# returns the path set by the user in the environment 167635c4bbdfSmrg# 167735c4bbdfSmrgAC_DEFUN([XORG_WITH_M4], [ 167835c4bbdfSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 167935c4bbdfSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 168035c4bbdfSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 168135c4bbdfSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 168235c4bbdfSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 168335c4bbdfSmrg [$PATH:/usr/gnu/bin])]) 168435c4bbdfSmrg 168535c4bbdfSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 168635c4bbdfSmrg]) # XORG_WITH_M4 168735c4bbdfSmrg 16886747b715Smrg# XORG_WITH_PS2PDF([DEFAULT]) 16896747b715Smrg# ---------------- 16906747b715Smrg# Minimum version: 1.6.0 16916747b715Smrg# Minimum version for optional DEFAULT argument: 1.11.0 16926747b715Smrg# 16936747b715Smrg# Documentation tools are not always available on all platforms and sometimes 16946747b715Smrg# not at the appropriate level. This macro enables a module to test for the 16956747b715Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 16966747b715Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 16976747b715Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 16986747b715Smrg# --with-ps2pdf assumes 'auto'. 16996747b715Smrg# 17006747b715Smrg# Interface to module: 17016747b715Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 17026747b715Smrg# PS2PDF: returns the path of the ps2pdf program found 17036747b715Smrg# returns the path set by the user in the environment 17046747b715Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 17056747b715Smrg# 'no' user instructs the module not to use ps2pdf 17066747b715Smrg# 17076747b715Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 17086747b715Smrg# 17096747b715SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 17106747b715SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 17116747b715Smrgm4_define([_defopt], m4_default([$1], [auto])) 17126747b715SmrgAC_ARG_WITH(ps2pdf, 17136747b715Smrg AS_HELP_STRING([--with-ps2pdf], 17146747b715Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 17156747b715Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 17166747b715Smrgm4_undefine([_defopt]) 17176747b715Smrg 17186747b715Smrgif test "x$use_ps2pdf" = x"auto"; then 17196747b715Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 17206747b715Smrg if test "x$PS2PDF" = "x"; then 17216747b715Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 17226747b715Smrg have_ps2pdf=no 17236747b715Smrg else 17246747b715Smrg have_ps2pdf=yes 17256747b715Smrg fi 17266747b715Smrgelif test "x$use_ps2pdf" = x"yes" ; then 17276747b715Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 17286747b715Smrg if test "x$PS2PDF" = "x"; then 17296747b715Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 17306747b715Smrg fi 17316747b715Smrg have_ps2pdf=yes 17326747b715Smrgelif test "x$use_ps2pdf" = x"no" ; then 17336747b715Smrg if test "x$PS2PDF" != "x"; then 17346747b715Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 17356747b715Smrg fi 17366747b715Smrg have_ps2pdf=no 17376747b715Smrgelse 17386747b715Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 17396747b715Smrgfi 17406747b715SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 17416747b715Smrg]) # XORG_WITH_PS2PDF 17426747b715Smrg 17436747b715Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 17446747b715Smrg# ---------------- 17456747b715Smrg# Minimum version: 1.6.0 17466747b715Smrg# 17476747b715Smrg# Documentation tools are not always available on all platforms and sometimes 17486747b715Smrg# not at the appropriate level. This macro enables a builder to skip all 17496747b715Smrg# documentation targets except traditional man pages. 17506747b715Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 17516747b715Smrg# maximum flexibilty in controlling documentation building. 17526747b715Smrg# Refer to: 17536747b715Smrg# XORG_WITH_XMLTO --with-xmlto 17546747b715Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 17556747b715Smrg# XORG_WITH_DOXYGEN --with-doxygen 17566747b715Smrg# XORG_WITH_FOP --with-fop 17576747b715Smrg# XORG_WITH_GROFF --with-groff 17586747b715Smrg# XORG_WITH_PS2PDF --with-ps2pdf 17596747b715Smrg# 17606747b715Smrg# Interface to module: 17616747b715Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 17626747b715Smrg# --enable-docs: 'yes' user instructs the module to generate docs 17636747b715Smrg# 'no' user instructs the module not to generate docs 17646747b715Smrg# parm1: specify the default value, yes or no. 17656747b715Smrg# 17666747b715SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 17678223e2f2Smrgm4_define([docs_default], m4_default([$1], [yes])) 17686747b715SmrgAC_ARG_ENABLE(docs, 17696747b715Smrg AS_HELP_STRING([--enable-docs], 17708223e2f2Smrg [Enable building the documentation (default: ]docs_default[)]), 17718223e2f2Smrg [build_docs=$enableval], [build_docs=]docs_default) 17728223e2f2Smrgm4_undefine([docs_default]) 17736747b715SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 17746747b715SmrgAC_MSG_CHECKING([whether to build documentation]) 17756747b715SmrgAC_MSG_RESULT([$build_docs]) 17766747b715Smrg]) # XORG_ENABLE_DOCS 17776747b715Smrg 17786747b715Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 17796747b715Smrg# ---------------- 17806747b715Smrg# Minimum version: 1.6.0 17816747b715Smrg# 17826747b715Smrg# This macro enables a builder to skip all developer documentation. 17836747b715Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 17846747b715Smrg# maximum flexibilty in controlling documentation building. 17856747b715Smrg# Refer to: 17866747b715Smrg# XORG_WITH_XMLTO --with-xmlto 17876747b715Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 17886747b715Smrg# XORG_WITH_DOXYGEN --with-doxygen 17896747b715Smrg# XORG_WITH_FOP --with-fop 17906747b715Smrg# XORG_WITH_GROFF --with-groff 17916747b715Smrg# XORG_WITH_PS2PDF --with-ps2pdf 17926747b715Smrg# 17936747b715Smrg# Interface to module: 17946747b715Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 17956747b715Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 17966747b715Smrg# 'no' user instructs the module not to generate developer docs 17976747b715Smrg# parm1: specify the default value, yes or no. 17986747b715Smrg# 17996747b715SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 18006747b715Smrgm4_define([devel_default], m4_default([$1], [yes])) 18016747b715SmrgAC_ARG_ENABLE(devel-docs, 18026747b715Smrg AS_HELP_STRING([--enable-devel-docs], 18036747b715Smrg [Enable building the developer documentation (default: ]devel_default[)]), 18046747b715Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 18056747b715Smrgm4_undefine([devel_default]) 18066747b715SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 18076747b715SmrgAC_MSG_CHECKING([whether to build developer documentation]) 18086747b715SmrgAC_MSG_RESULT([$build_devel_docs]) 18096747b715Smrg]) # XORG_ENABLE_DEVEL_DOCS 18106747b715Smrg 18116747b715Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 18126747b715Smrg# ---------------- 18136747b715Smrg# Minimum version: 1.6.0 18146747b715Smrg# 18156747b715Smrg# This macro enables a builder to skip all functional specification targets. 18166747b715Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 18176747b715Smrg# maximum flexibilty in controlling documentation building. 18186747b715Smrg# Refer to: 18196747b715Smrg# XORG_WITH_XMLTO --with-xmlto 18206747b715Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 18216747b715Smrg# XORG_WITH_DOXYGEN --with-doxygen 18226747b715Smrg# XORG_WITH_FOP --with-fop 18236747b715Smrg# XORG_WITH_GROFF --with-groff 18246747b715Smrg# XORG_WITH_PS2PDF --with-ps2pdf 18256747b715Smrg# 18266747b715Smrg# Interface to module: 18276747b715Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 18286747b715Smrg# --enable-specs: 'yes' user instructs the module to generate specs 18296747b715Smrg# 'no' user instructs the module not to generate specs 18306747b715Smrg# parm1: specify the default value, yes or no. 18316747b715Smrg# 18326747b715SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 18336747b715Smrgm4_define([spec_default], m4_default([$1], [yes])) 18346747b715SmrgAC_ARG_ENABLE(specs, 18356747b715Smrg AS_HELP_STRING([--enable-specs], 18366747b715Smrg [Enable building the specs (default: ]spec_default[)]), 18376747b715Smrg [build_specs=$enableval], [build_specs=]spec_default) 18386747b715Smrgm4_undefine([spec_default]) 18396747b715SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 18406747b715SmrgAC_MSG_CHECKING([whether to build functional specifications]) 18416747b715SmrgAC_MSG_RESULT([$build_specs]) 18426747b715Smrg]) # XORG_ENABLE_SPECS 18436747b715Smrg 18449ace9065Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 18459ace9065Smrg# ---------------------------------------------- 18469ace9065Smrg# Minimum version: 1.13.0 18479ace9065Smrg# 18489ace9065Smrg# This macro enables a builder to enable/disable unit testing 18499ace9065Smrg# It makes no assumption about the test cases implementation 18509ace9065Smrg# Test cases may or may not use Automake "Support for test suites" 18519ace9065Smrg# They may or may not use the software utility library GLib 18529ace9065Smrg# 18539ace9065Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 18549ace9065Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 18559ace9065Smrg# The variable enable_unit_tests is used by other macros in this file. 18569ace9065Smrg# 18579ace9065Smrg# Interface to module: 18589ace9065Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 18599ace9065Smrg# enable_unit_tests: used in configure.ac for additional configuration 18609ace9065Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 18619ace9065Smrg# 'no' user instructs the module not to build tests 18629ace9065Smrg# parm1: specify the default value, yes or no. 18639ace9065Smrg# 18649ace9065SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 18659ace9065SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 18669ace9065SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 1867475c125cSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 18689ace9065Smrgm4_define([_defopt], m4_default([$1], [auto])) 18699ace9065SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 18709ace9065Smrg [Enable building unit test cases (default: ]_defopt[)]), 18719ace9065Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 18729ace9065Smrgm4_undefine([_defopt]) 18739ace9065SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 18749ace9065SmrgAC_MSG_CHECKING([whether to build unit test cases]) 18759ace9065SmrgAC_MSG_RESULT([$enable_unit_tests]) 18769ace9065Smrg]) # XORG_ENABLE_UNIT_TESTS 18779ace9065Smrg 187835c4bbdfSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 187935c4bbdfSmrg# ------------------------------------------------------ 188035c4bbdfSmrg# Minimum version: 1.17.0 188135c4bbdfSmrg# 188235c4bbdfSmrg# This macro enables a builder to enable/disable integration testing 188335c4bbdfSmrg# It makes no assumption about the test cases' implementation 188435c4bbdfSmrg# Test cases may or may not use Automake "Support for test suites" 188535c4bbdfSmrg# 188635c4bbdfSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 188735c4bbdfSmrg# usually requires less dependencies and may be built and run under less 188835c4bbdfSmrg# stringent environments than integration tests. 188935c4bbdfSmrg# 189035c4bbdfSmrg# Interface to module: 189135c4bbdfSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 189235c4bbdfSmrg# enable_integration_tests: used in configure.ac for additional configuration 189335c4bbdfSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 189435c4bbdfSmrg# 'no' user instructs the module not to build tests 189535c4bbdfSmrg# parm1: specify the default value, yes or no. 189635c4bbdfSmrg# 189735c4bbdfSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 189835c4bbdfSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 189935c4bbdfSmrgm4_define([_defopt], m4_default([$1], [auto])) 190035c4bbdfSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 190135c4bbdfSmrg [Enable building integration test cases (default: ]_defopt[)]), 190235c4bbdfSmrg [enable_integration_tests=$enableval], 190335c4bbdfSmrg [enable_integration_tests=]_defopt) 190435c4bbdfSmrgm4_undefine([_defopt]) 190535c4bbdfSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 190635c4bbdfSmrg [test "x$enable_integration_tests" != xno]) 190735c4bbdfSmrgAC_MSG_CHECKING([whether to build unit test cases]) 190835c4bbdfSmrgAC_MSG_RESULT([$enable_integration_tests]) 190935c4bbdfSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 191035c4bbdfSmrg 191135c4bbdfSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 191235c4bbdfSmrg# ---------------------------------------- 19139ace9065Smrg# Minimum version: 1.13.0 19149ace9065Smrg# 19159ace9065Smrg# GLib is a library which provides advanced data structures and functions. 19169ace9065Smrg# This macro enables a module to test for the presence of Glib. 19179ace9065Smrg# 19189ace9065Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 19199ace9065Smrg# Otherwise the value of $enable_unit_tests is blank. 19209ace9065Smrg# 192135c4bbdfSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 192235c4bbdfSmrg# test support usually requires less dependencies and may be built and run under 192335c4bbdfSmrg# less stringent environments than integration tests. 192435c4bbdfSmrg# 19259ace9065Smrg# Interface to module: 19269ace9065Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 19279ace9065Smrg# with_glib: used in configure.ac to know if GLib has been found 19289ace9065Smrg# --with-glib: 'yes' user instructs the module to use glib 19299ace9065Smrg# 'no' user instructs the module not to use glib 19309ace9065Smrg# 19319ace9065SmrgAC_DEFUN([XORG_WITH_GLIB],[ 19329ace9065SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 19339ace9065Smrgm4_define([_defopt], m4_default([$2], [auto])) 19349ace9065SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 19359ace9065Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 19369ace9065Smrg [with_glib=$withval], [with_glib=]_defopt) 19379ace9065Smrgm4_undefine([_defopt]) 19389ace9065Smrg 19399ace9065Smrghave_glib=no 19409ace9065Smrg# Do not probe GLib if user explicitly disabled unit testing 19419ace9065Smrgif test "x$enable_unit_tests" != x"no"; then 19429ace9065Smrg # Do not probe GLib if user explicitly disabled it 19439ace9065Smrg if test "x$with_glib" != x"no"; then 19449ace9065Smrg m4_ifval( 19459ace9065Smrg [$1], 19469ace9065Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 19479ace9065Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 19489ace9065Smrg ) 19499ace9065Smrg fi 19509ace9065Smrgfi 19519ace9065Smrg 19529ace9065Smrg# Not having GLib when unit testing has been explicitly requested is an error 19539ace9065Smrgif test "x$enable_unit_tests" = x"yes"; then 19549ace9065Smrg if test "x$have_glib" = x"no"; then 19559ace9065Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 19569ace9065Smrg fi 19579ace9065Smrgfi 19589ace9065Smrg 19599ace9065Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 19609ace9065Smrgif test "x$enable_unit_tests" = x"no"; then 19619ace9065Smrg if test "x$with_glib" = x"yes"; then 19629ace9065Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 19639ace9065Smrg fi 19649ace9065Smrgfi 19659ace9065Smrg 19669ace9065Smrg# Not having GLib when it has been explicitly requested is an error 19679ace9065Smrgif test "x$with_glib" = x"yes"; then 19689ace9065Smrg if test "x$have_glib" = x"no"; then 19699ace9065Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 19709ace9065Smrg fi 19719ace9065Smrgfi 19729ace9065Smrg 19739ace9065SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 19749ace9065Smrg]) # XORG_WITH_GLIB 19759ace9065Smrg 1976475c125cSmrg# XORG_LD_WRAP([required|optional]) 1977475c125cSmrg# --------------------------------- 19789ace9065Smrg# Minimum version: 1.13.0 19799ace9065Smrg# 19809ace9065Smrg# Check if linker supports -wrap, passed via compiler flags 19819ace9065Smrg# 19829ace9065Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 19839ace9065Smrg# Otherwise the value of $enable_unit_tests is blank. 19849ace9065Smrg# 1985475c125cSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 1986475c125cSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 1987475c125cSmrg# available, an argument of "optional" allows use when some unit tests require 1988475c125cSmrg# ld -wrap and others do not. 1989475c125cSmrg# 19909ace9065SmrgAC_DEFUN([XORG_LD_WRAP],[ 1991475c125cSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 1992475c125cSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 1993475c125cSmrg void __wrap_exit(int status) { return; }], 1994475c125cSmrg [exit(0);])]) 19959ace9065Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 1996475c125cSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 19979ace9065Smrg if test "x$have_ld_wrap" = x"no"; then 19989ace9065Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 19999ace9065Smrg fi 20009ace9065Smrgfi 20019ace9065SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 20029ace9065Smrg# 20039ace9065Smrg]) # XORG_LD_WRAP 20049ace9065Smrg 20059ace9065Smrg# XORG_CHECK_LINKER_FLAGS 20069ace9065Smrg# ----------------------- 20079ace9065Smrg# SYNOPSIS 20089ace9065Smrg# 2009475c125cSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 20109ace9065Smrg# 20119ace9065Smrg# DESCRIPTION 20129ace9065Smrg# 20139ace9065Smrg# Check whether the given linker FLAGS work with the current language's 20149ace9065Smrg# linker, or whether they give an error. 20159ace9065Smrg# 20169ace9065Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 20179ace9065Smrg# success/failure. 20189ace9065Smrg# 2019475c125cSmrg# PROGRAM-SOURCE is the program source to link with, if needed 2020475c125cSmrg# 20219ace9065Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 20229ace9065Smrg# 20239ace9065Smrg# LICENSE 20249ace9065Smrg# 20259ace9065Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 20269ace9065Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 20279ace9065Smrg# Copyright (c) 2009 Matteo Frigo 20289ace9065Smrg# 20299ace9065Smrg# This program is free software: you can redistribute it and/or modify it 20309ace9065Smrg# under the terms of the GNU General Public License as published by the 20319ace9065Smrg# Free Software Foundation, either version 3 of the License, or (at your 20329ace9065Smrg# option) any later version. 20339ace9065Smrg# 20349ace9065Smrg# This program is distributed in the hope that it will be useful, but 20359ace9065Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 20369ace9065Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 20379ace9065Smrg# Public License for more details. 20389ace9065Smrg# 20399ace9065Smrg# You should have received a copy of the GNU General Public License along 20409ace9065Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 20419ace9065Smrg# 20429ace9065Smrg# As a special exception, the respective Autoconf Macro's copyright owner 20439ace9065Smrg# gives unlimited permission to copy, distribute and modify the configure 20449ace9065Smrg# scripts that are the output of Autoconf when processing the Macro. You 20459ace9065Smrg# need not follow the terms of the GNU General Public License when using 20469ace9065Smrg# or distributing such scripts, even though portions of the text of the 20479ace9065Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 20489ace9065Smrg# all other use of the material that constitutes the Autoconf Macro. 20499ace9065Smrg# 20509ace9065Smrg# This special exception to the GPL applies to versions of the Autoconf 20519ace9065Smrg# Macro released by the Autoconf Archive. When you make and distribute a 20529ace9065Smrg# modified version of the Autoconf Macro, you may extend this special 20539ace9065Smrg# exception to the GPL to apply to your modified version as well.# 20549ace9065SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 20559ace9065Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 20569ace9065Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 20579ace9065SmrgAS_LITERAL_IF([$1], 20589ace9065Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 20599ace9065Smrg ax_save_FLAGS=$LDFLAGS 20609ace9065Smrg LDFLAGS="$1" 2061475c125cSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 20629ace9065Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 20639ace9065Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 20649ace9065Smrg LDFLAGS=$ax_save_FLAGS])], 20659ace9065Smrg [ax_save_FLAGS=$LDFLAGS 20669ace9065Smrg LDFLAGS="$1" 20679ace9065Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 20689ace9065Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 20699ace9065Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 20709ace9065Smrg LDFLAGS=$ax_save_FLAGS]) 20719ace9065Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 20729ace9065SmrgAC_MSG_RESULT($xorg_check_linker_flags) 20739ace9065Smrgif test "x$xorg_check_linker_flags" = xyes; then 20749ace9065Smrg m4_default([$2], :) 20759ace9065Smrgelse 20769ace9065Smrg m4_default([$3], :) 20779ace9065Smrgfi 20789ace9065Smrg]) # XORG_CHECK_LINKER_FLAGS 20799ace9065Smrg 2080475c125cSmrg# XORG_MEMORY_CHECK_FLAGS 2081475c125cSmrg# ----------------------- 2082475c125cSmrg# Minimum version: 1.16.0 2083475c125cSmrg# 2084475c125cSmrg# This macro attempts to find appropriate memory checking functionality 2085475c125cSmrg# for various platforms which unit testing code may use to catch various 2086475c125cSmrg# forms of memory allocation and access errors in testing. 2087475c125cSmrg# 2088475c125cSmrg# Interface to module: 2089475c125cSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 2090475c125cSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 2091475c125cSmrg# 2092475c125cSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 2093475c125cSmrg# 2094475c125cSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 2095475c125cSmrg 2096475c125cSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 2097475c125cSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 2098475c125cSmrg [Environment variables to enable memory checking in tests]) 2099475c125cSmrg 2100475c125cSmrg# Check for different types of support on different platforms 2101475c125cSmrgcase $host_os in 2102475c125cSmrg solaris*) 2103475c125cSmrg AC_CHECK_LIB([umem], [umem_alloc], 2104475c125cSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 2105475c125cSmrg ;; 2106475c125cSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 2107475c125cSmrg # both directly and inverted, so should not be 0 or 255. 2108475c125cSmrg malloc_debug_env='MALLOC_PERTURB_=15' 2109475c125cSmrg ;; 2110475c125cSmrg darwin*) 2111475c125cSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 2112475c125cSmrg ;; 2113475c125cSmrg *bsd*) 2114475c125cSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 2115475c125cSmrg ;; 2116475c125cSmrgesac 2117475c125cSmrg 2118475c125cSmrg# User supplied flags override default flags 2119475c125cSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 2120475c125cSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 2121475c125cSmrgfi 2122475c125cSmrg 2123475c125cSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 2124475c125cSmrg]) # XORG_WITH_LINT 2125475c125cSmrg 21264642e01fSmrg# XORG_CHECK_MALLOC_ZERO 21274642e01fSmrg# ---------------------- 21284642e01fSmrg# Minimum version: 1.0.0 21294642e01fSmrg# 21304642e01fSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 21314642e01fSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 21324642e01fSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 21334642e01fSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 21344642e01fSmrgAC_ARG_ENABLE(malloc0returnsnull, 2135b1d344b3Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 21364642e01fSmrg [malloc(0) returns NULL (default: auto)]), 21374642e01fSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 21384642e01fSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 21394642e01fSmrg 21404642e01fSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 21414642e01fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 214235c4bbdfSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 214335c4bbdfSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 21448223e2f2Smrg#include <stdlib.h> 21458223e2f2Smrg],[ 21464642e01fSmrg char *m0, *r0, *c0, *p; 21474642e01fSmrg m0 = malloc(0); 21484642e01fSmrg p = malloc(10); 21494642e01fSmrg r0 = realloc(p,0); 21508223e2f2Smrg c0 = calloc(0,10); 21518223e2f2Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 21528223e2f2Smrg])], 215335c4bbdfSmrg [xorg_cv_malloc0_returns_null=yes], 215435c4bbdfSmrg [xorg_cv_malloc0_returns_null=no])]) 215535c4bbdfSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 21564642e01fSmrgfi 21574642e01fSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 21584642e01fSmrg 21594642e01fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 21604642e01fSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 21614642e01fSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 21624642e01fSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 21634642e01fSmrgelse 21644642e01fSmrg MALLOC_ZERO_CFLAGS="" 21654642e01fSmrg XMALLOC_ZERO_CFLAGS="" 21664642e01fSmrg XTMALLOC_ZERO_CFLAGS="" 21674642e01fSmrgfi 21684642e01fSmrg 21694642e01fSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 21704642e01fSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 21714642e01fSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 21724642e01fSmrg]) # XORG_CHECK_MALLOC_ZERO 21734642e01fSmrg 21744642e01fSmrg# XORG_WITH_LINT() 21754642e01fSmrg# ---------------- 21764642e01fSmrg# Minimum version: 1.1.0 21774642e01fSmrg# 21786747b715Smrg# This macro enables the use of a tool that flags some suspicious and 21796747b715Smrg# non-portable constructs (likely to be bugs) in C language source code. 21806747b715Smrg# It will attempt to locate the tool and use appropriate options. 21816747b715Smrg# There are various lint type tools on different platforms. 21826747b715Smrg# 21836747b715Smrg# Interface to module: 21846747b715Smrg# LINT: returns the path to the tool found on the platform 21856747b715Smrg# or the value set to LINT on the configure cmd line 21866747b715Smrg# also an Automake conditional 21876747b715Smrg# LINT_FLAGS: an Automake variable with appropriate flags 21886747b715Smrg# 21896747b715Smrg# --with-lint: 'yes' user instructs the module to use lint 21906747b715Smrg# 'no' user instructs the module not to use lint (default) 21916747b715Smrg# 21926747b715Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 21936747b715Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 21944642e01fSmrg# 21954642e01fSmrgAC_DEFUN([XORG_WITH_LINT],[ 21964642e01fSmrg 21976747b715SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 21986747b715SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 2199b1d344b3SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 22004642e01fSmrg [Use a lint-style source code checker (default: disabled)])], 22014642e01fSmrg [use_lint=$withval], [use_lint=no]) 22026747b715Smrg 22036747b715Smrg# Obtain platform specific info like program name and options 22046747b715Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 22056747b715Smrgcase $host_os in 22066747b715Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 22076747b715Smrg lint_name=splint 22086747b715Smrg lint_options="-badflag" 22096747b715Smrg ;; 22106747b715Smrg *freebsd* | *netbsd*) 22116747b715Smrg lint_name=lint 22126747b715Smrg lint_options="-u -b" 22136747b715Smrg ;; 22146747b715Smrg *solaris*) 22156747b715Smrg lint_name=lint 22166747b715Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 22176747b715Smrg ;; 22186747b715Smrgesac 22196747b715Smrg 22206747b715Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 22216747b715Smrgif test "x$use_lint" = x"yes" ; then 22226747b715Smrg AC_PATH_PROG([LINT], [$lint_name]) 22236747b715Smrg if test "x$LINT" = "x"; then 22246747b715Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 22256747b715Smrg fi 22266747b715Smrgelif test "x$use_lint" = x"no" ; then 22276747b715Smrg if test "x$LINT" != "x"; then 22286747b715Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 22296747b715Smrg fi 22304642e01fSmrgelse 22316747b715Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 22324642e01fSmrgfi 22336747b715Smrg 22346747b715Smrg# User supplied flags override default flags 22356747b715Smrgif test "x$LINT_FLAGS" != "x"; then 22366747b715Smrg lint_options=$LINT_FLAGS 22374642e01fSmrgfi 22384642e01fSmrg 22396747b715SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 22406747b715SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 22414642e01fSmrg 22424642e01fSmrg]) # XORG_WITH_LINT 22434642e01fSmrg 22444642e01fSmrg# XORG_LINT_LIBRARY(LIBNAME) 22454642e01fSmrg# -------------------------- 22464642e01fSmrg# Minimum version: 1.1.0 22474642e01fSmrg# 22484642e01fSmrg# Sets up flags for building lint libraries for checking programs that call 22494642e01fSmrg# functions in the library. 22504642e01fSmrg# 22516747b715Smrg# Interface to module: 22526747b715Smrg# LINTLIB - Automake variable with the name of lint library file to make 22536747b715Smrg# MAKE_LINT_LIB - Automake conditional 22546747b715Smrg# 22556747b715Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 22566747b715Smrg# - 'no' user instructs the module not to create a lint library (default) 22574642e01fSmrg 22584642e01fSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 22594642e01fSmrgAC_REQUIRE([XORG_WITH_LINT]) 2260b1d344b3SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 22614642e01fSmrg [Create lint library (default: disabled)])], 22624642e01fSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 22636747b715Smrg 22646747b715Smrgif test "x$make_lint_lib" = x"yes" ; then 22656747b715Smrg LINTLIB=llib-l$1.ln 22666747b715Smrg if test "x$LINT" = "x"; then 22676747b715Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 22686747b715Smrg fi 22696747b715Smrgelif test "x$make_lint_lib" != x"no" ; then 22706747b715Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 22714642e01fSmrgfi 22726747b715Smrg 22734642e01fSmrgAC_SUBST(LINTLIB) 22744642e01fSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 22754642e01fSmrg 22764642e01fSmrg]) # XORG_LINT_LIBRARY 22774642e01fSmrg 22789ace9065Smrg# XORG_COMPILER_BRAND 22799ace9065Smrg# ------------------- 22809ace9065Smrg# Minimum version: 1.14.0 22819ace9065Smrg# 22829ace9065Smrg# Checks for various brands of compilers and sets flags as appropriate: 22839ace9065Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 228435c4bbdfSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 22859ace9065Smrg# clang compiler - sets CLANGCC to "yes" 22869ace9065Smrg# Intel compiler - sets INTELCC to "yes" 22879ace9065Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 22889ace9065Smrg# 22899ace9065SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 229035c4bbdfSmrgAC_LANG_CASE( 229135c4bbdfSmrg [C], [ 229235c4bbdfSmrg AC_REQUIRE([AC_PROG_CC_C99]) 229335c4bbdfSmrg ], 229435c4bbdfSmrg [C++], [ 229535c4bbdfSmrg AC_REQUIRE([AC_PROG_CXX]) 229635c4bbdfSmrg ] 229735c4bbdfSmrg) 22989ace9065SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 22999ace9065SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 23009ace9065SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 23019ace9065Smrg]) # XORG_COMPILER_BRAND 23029ace9065Smrg 2303475c125cSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 2304475c125cSmrg# --------------- 2305475c125cSmrg# Minimum version: 1.16.0 2306475c125cSmrg# 2307475c125cSmrg# Test if the compiler works when passed the given flag as a command line argument. 2308475c125cSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 2309475c125cSmrg# next flag in the list until there are no more options. 2310475c125cSmrg# 2311475c125cSmrg# Note that this does not guarantee that the compiler supports the flag as some 2312475c125cSmrg# compilers will simply ignore arguments that they do not understand, but we do 2313475c125cSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 2314475c125cSmrg# -Werror=unused-command-line-argument 2315475c125cSmrg# 2316475c125cSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 2317475c125cSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2318475c125cSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2319475c125cSmrg 232035c4bbdfSmrgAC_LANG_COMPILER_REQUIRE 232135c4bbdfSmrg 232235c4bbdfSmrgAC_LANG_CASE( 232335c4bbdfSmrg [C], [ 232435c4bbdfSmrg AC_REQUIRE([AC_PROG_CC_C99]) 232535c4bbdfSmrg define([PREFIX], [C]) 232635c4bbdfSmrg define([CACHE_PREFIX], [cc]) 232735c4bbdfSmrg define([COMPILER], [$CC]) 232835c4bbdfSmrg ], 232935c4bbdfSmrg [C++], [ 233035c4bbdfSmrg define([PREFIX], [CXX]) 233135c4bbdfSmrg define([CACHE_PREFIX], [cxx]) 233235c4bbdfSmrg define([COMPILER], [$CXX]) 233335c4bbdfSmrg ] 233435c4bbdfSmrg) 2335475c125cSmrg 233635c4bbdfSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 233735c4bbdfSmrg 233835c4bbdfSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 233935c4bbdfSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 234035c4bbdfSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 234135c4bbdfSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 234235c4bbdfSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 234335c4bbdfSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 234435c4bbdfSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 234535c4bbdfSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 234635c4bbdfSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 2347475c125cSmrgfi 2348475c125cSmrg 234935c4bbdfSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 235035c4bbdfSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 235135c4bbdfSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 2352475c125cSmrg fi 235335c4bbdfSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 235435c4bbdfSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 235535c4bbdfSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 235635c4bbdfSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 235735c4bbdfSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 235835c4bbdfSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 235935c4bbdfSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 236035c4bbdfSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 2361475c125cSmrgfi 2362475c125cSmrg 2363475c125cSmrgfound="no" 2364475c125cSmrgm4_foreach([flag], m4_cdr($@), [ 2365475c125cSmrg if test $found = "no" ; then 236635c4bbdfSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 236735c4bbdfSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 2368475c125cSmrg fi 2369475c125cSmrg 237035c4bbdfSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 237135c4bbdfSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 2372475c125cSmrg fi 2373475c125cSmrg 237435c4bbdfSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 2375475c125cSmrg 237635c4bbdfSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 237735c4bbdfSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 237835c4bbdfSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 237935c4bbdfSmrg AC_CACHE_VAL($cacheid, 238035c4bbdfSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 238135c4bbdfSmrg [eval $cacheid=yes], 238235c4bbdfSmrg [eval $cacheid=no])]) 238335c4bbdfSmrg 238435c4bbdfSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 2385475c125cSmrg 238635c4bbdfSmrg eval supported=\$$cacheid 238735c4bbdfSmrg AC_MSG_RESULT([$supported]) 2388475c125cSmrg if test "$supported" = "yes" ; then 2389475c125cSmrg $1="$$1 ]flag[" 2390475c125cSmrg found="yes" 2391475c125cSmrg fi 2392475c125cSmrg fi 2393475c125cSmrg]) 2394475c125cSmrg]) # XORG_TESTSET_CFLAG 2395475c125cSmrg 2396475c125cSmrg# XORG_COMPILER_FLAGS 2397475c125cSmrg# --------------- 2398475c125cSmrg# Minimum version: 1.16.0 2399475c125cSmrg# 240035c4bbdfSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 240135c4bbdfSmrg# arguments supported by the selected compiler which do NOT alter the generated 240235c4bbdfSmrg# code. These arguments will cause the compiler to print various warnings 240335c4bbdfSmrg# during compilation AND turn a conservative set of warnings into errors. 2404475c125cSmrg# 240535c4bbdfSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 240635c4bbdfSmrg# future versions of util-macros as options are added to new compilers. 2407475c125cSmrg# 2408475c125cSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 2409475c125cSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 2410475c125cSmrg 2411475c125cSmrgAC_ARG_ENABLE(selective-werror, 2412475c125cSmrg AS_HELP_STRING([--disable-selective-werror], 2413475c125cSmrg [Turn off selective compiler errors. (default: enabled)]), 2414475c125cSmrg [SELECTIVE_WERROR=$enableval], 2415475c125cSmrg [SELECTIVE_WERROR=yes]) 2416475c125cSmrg 241735c4bbdfSmrgAC_LANG_CASE( 241835c4bbdfSmrg [C], [ 241935c4bbdfSmrg define([PREFIX], [C]) 242035c4bbdfSmrg ], 242135c4bbdfSmrg [C++], [ 242235c4bbdfSmrg define([PREFIX], [CXX]) 242335c4bbdfSmrg ] 242435c4bbdfSmrg) 2425475c125cSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 2426475c125cSmrgif test "x$SUNCC" = "xyes"; then 242735c4bbdfSmrg [BASE_]PREFIX[FLAGS]="-v" 2428475c125cSmrgelse 242935c4bbdfSmrg [BASE_]PREFIX[FLAGS]="" 2430475c125cSmrgfi 2431475c125cSmrg 2432475c125cSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 243335c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 243435c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 243535c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 243635c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 243735c4bbdfSmrg 243835c4bbdfSmrgAC_LANG_CASE( 243935c4bbdfSmrg [C], [ 244035c4bbdfSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 244135c4bbdfSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 244235c4bbdfSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 244335c4bbdfSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 244435c4bbdfSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 244535c4bbdfSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 244635c4bbdfSmrg ] 244735c4bbdfSmrg) 2448475c125cSmrg 2449475c125cSmrg# This chunk adds additional warnings that could catch undesired effects. 245035c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 245135c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 245235c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 245335c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 245435c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 245535c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 245635c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 2457475c125cSmrg 2458475c125cSmrg# These are currently disabled because they are noisy. They will be enabled 2459475c125cSmrg# in the future once the codebase is sufficiently modernized to silence 2460475c125cSmrg# them. For now, I don't want them to drown out the other warnings. 246135c4bbdfSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 246235c4bbdfSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 246335c4bbdfSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 2464475c125cSmrg 2465475c125cSmrg# Turn some warnings into errors, so we don't accidently get successful builds 2466475c125cSmrg# when there are problems that should be fixed. 2467475c125cSmrg 2468475c125cSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 246935c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 247035c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 247135c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 247235c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 247335c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 247435c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 247535c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 247635c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 247735c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 247835c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 247935c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 248035c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 248135c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 2482475c125cSmrgelse 2483475c125cSmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) 248435c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 248535c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 248635c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 248735c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 248835c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 248935c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 249035c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 249135c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 249235c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 249335c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 249435c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 249535c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 249635c4bbdfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 249735c4bbdfSmrgfi 249835c4bbdfSmrg 249935c4bbdfSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 2500475c125cSmrg]) # XORG_COMPILER_FLAGS 2501475c125cSmrg 25024642e01fSmrg# XORG_CWARNFLAGS 25034642e01fSmrg# --------------- 25044642e01fSmrg# Minimum version: 1.2.0 2505475c125cSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 25064642e01fSmrg# 25074642e01fSmrg# Defines CWARNFLAGS to enable C compiler warnings. 25084642e01fSmrg# 2509475c125cSmrg# This function is deprecated because it defines -fno-strict-aliasing 2510475c125cSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 2511475c125cSmrg# is needed, then it should be added explicitly in the module when 2512475c125cSmrg# it is updated to use BASE_CFLAGS. 2513475c125cSmrg# 25144642e01fSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 2515475c125cSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 25169ace9065SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 251735c4bbdfSmrgAC_LANG_CASE( 251835c4bbdfSmrg [C], [ 251935c4bbdfSmrg CWARNFLAGS="$BASE_CFLAGS" 252035c4bbdfSmrg if test "x$GCC" = xyes ; then 252135c4bbdfSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 252235c4bbdfSmrg fi 252335c4bbdfSmrg AC_SUBST(CWARNFLAGS) 252435c4bbdfSmrg ] 252535c4bbdfSmrg) 25264642e01fSmrg]) # XORG_CWARNFLAGS 2527b1d344b3Smrg 2528b1d344b3Smrg# XORG_STRICT_OPTION 2529b1d344b3Smrg# ----------------------- 2530b1d344b3Smrg# Minimum version: 1.3.0 2531b1d344b3Smrg# 25329ace9065Smrg# Add configure option to enable strict compilation flags, such as treating 25339ace9065Smrg# warnings as fatal errors. 25349ace9065Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 253535c4bbdfSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 25369ace9065Smrg# 25379ace9065Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 25389ace9065Smrg# when strict compilation is unconditionally desired. 2539b1d344b3SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 2540b1d344b3SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 2541475c125cSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 2542b1d344b3Smrg 2543b1d344b3SmrgAC_ARG_ENABLE(strict-compilation, 2544b1d344b3Smrg AS_HELP_STRING([--enable-strict-compilation], 2545b1d344b3Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 2546b1d344b3Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 2547475c125cSmrg 254835c4bbdfSmrgAC_LANG_CASE( 254935c4bbdfSmrg [C], [ 255035c4bbdfSmrg define([PREFIX], [C]) 255135c4bbdfSmrg ], 255235c4bbdfSmrg [C++], [ 255335c4bbdfSmrg define([PREFIX], [CXX]) 255435c4bbdfSmrg ] 255535c4bbdfSmrg) 255635c4bbdfSmrg 255735c4bbdfSmrg[STRICT_]PREFIX[FLAGS]="" 255835c4bbdfSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 255935c4bbdfSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 2560475c125cSmrg 2561475c125cSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 2562475c125cSmrg# activate it with -Werror, so we add it here explicitly. 256335c4bbdfSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 2564475c125cSmrg 2565b1d344b3Smrgif test "x$STRICT_COMPILE" = "xyes"; then 256635c4bbdfSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 256735c4bbdfSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 2568b1d344b3Smrgfi 256935c4bbdfSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 257035c4bbdfSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 257135c4bbdfSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 2572b1d344b3Smrg]) # XORG_STRICT_OPTION 2573b1d344b3Smrg 2574b1d344b3Smrg# XORG_DEFAULT_OPTIONS 2575b1d344b3Smrg# -------------------- 2576b1d344b3Smrg# Minimum version: 1.3.0 2577b1d344b3Smrg# 2578b1d344b3Smrg# Defines default options for X.Org modules. 2579b1d344b3Smrg# 2580b1d344b3SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 25816747b715SmrgAC_REQUIRE([AC_PROG_INSTALL]) 2582475c125cSmrgXORG_COMPILER_FLAGS 2583b1d344b3SmrgXORG_CWARNFLAGS 2584b1d344b3SmrgXORG_STRICT_OPTION 2585b1d344b3SmrgXORG_RELEASE_VERSION 2586b1d344b3SmrgXORG_CHANGELOG 25876747b715SmrgXORG_INSTALL 2588b1d344b3SmrgXORG_MANPAGE_SECTIONS 25896747b715Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 25906747b715Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 2591b1d344b3Smrg]) # XORG_DEFAULT_OPTIONS 25926747b715Smrg 25936747b715Smrg# XORG_INSTALL() 25946747b715Smrg# ---------------- 25956747b715Smrg# Minimum version: 1.4.0 25966747b715Smrg# 25976747b715Smrg# Defines the variable INSTALL_CMD as the command to copy 25986747b715Smrg# INSTALL from $prefix/share/util-macros. 25996747b715Smrg# 26006747b715SmrgAC_DEFUN([XORG_INSTALL], [ 26016747b715SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 26026747b715Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 26036747b715SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 26046747b715Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 2605c82838c1Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 2606c82838c1Smrgtouch \$(top_srcdir)/INSTALL; \ 2607c82838c1Smrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 26086747b715SmrgAC_SUBST([INSTALL_CMD]) 26096747b715Smrg]) # XORG_INSTALL 26104642e01fSmrgdnl Copyright 2005 Red Hat, Inc 26114642e01fSmrgdnl 26124642e01fSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 26134642e01fSmrgdnl documentation for any purpose is hereby granted without fee, provided that 26144642e01fSmrgdnl the above copyright notice appear in all copies and that both that 26154642e01fSmrgdnl copyright notice and this permission notice appear in supporting 26164642e01fSmrgdnl documentation. 26174642e01fSmrgdnl 26184642e01fSmrgdnl The above copyright notice and this permission notice shall be included 26194642e01fSmrgdnl in all copies or substantial portions of the Software. 26204642e01fSmrgdnl 26214642e01fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 26224642e01fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26234642e01fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 26244642e01fSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 26254642e01fSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 26264642e01fSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26274642e01fSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 26284642e01fSmrgdnl 26294642e01fSmrgdnl Except as contained in this notice, the name of the copyright holders shall 26304642e01fSmrgdnl not be used in advertising or otherwise to promote the sale, use or 26314642e01fSmrgdnl other dealings in this Software without prior written authorization 26324642e01fSmrgdnl from the copyright holders. 26334642e01fSmrgdnl 26344642e01fSmrg 26354642e01fSmrg# XORG_RELEASE_VERSION 26364642e01fSmrg# -------------------- 26376747b715Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 263835c4bbdfSmrg 26394642e01fSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 26404642e01fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 26414642e01fSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 26424642e01fSmrg [Major version of this package]) 26434642e01fSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 26444642e01fSmrg if test "x$PVM" = "x"; then 26454642e01fSmrg PVM="0" 26464642e01fSmrg fi 26474642e01fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 26484642e01fSmrg [$PVM], 26494642e01fSmrg [Minor version of this package]) 26504642e01fSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 26514642e01fSmrg if test "x$PVP" = "x"; then 26524642e01fSmrg PVP="0" 26534642e01fSmrg fi 26544642e01fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 26554642e01fSmrg [$PVP], 26564642e01fSmrg [Patch version of this package]) 26574642e01fSmrg]) 26584642e01fSmrg 26594642e01fSmrg# XORG_CHANGELOG() 26604642e01fSmrg# ---------------- 26614642e01fSmrg# Minimum version: 1.2.0 26624642e01fSmrg# 26634642e01fSmrg# Defines the variable CHANGELOG_CMD as the command to generate 26644642e01fSmrg# ChangeLog from git. 26654642e01fSmrg# 266652397711Smrg# 26674642e01fSmrgAC_DEFUN([XORG_CHANGELOG], [ 2668c82838c1SmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 26696747b715Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 2670c82838c1Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 2671c82838c1Smrgtouch \$(top_srcdir)/ChangeLog; \ 2672c82838c1Smrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 26734642e01fSmrgAC_SUBST([CHANGELOG_CMD]) 26744642e01fSmrg]) # XORG_CHANGELOG 26754642e01fSmrg 26764642e01fSmrgdnl 26778223e2f2Smrgdnl Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 26788223e2f2Smrgdnl 26798223e2f2Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 26808223e2f2Smrgdnl copy of this software and associated documentation files (the "Software"), 26818223e2f2Smrgdnl to deal in the Software without restriction, including without limitation 26828223e2f2Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 26838223e2f2Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 26848223e2f2Smrgdnl Software is furnished to do so, subject to the following conditions: 26858223e2f2Smrgdnl 26868223e2f2Smrgdnl The above copyright notice and this permission notice (including the next 26878223e2f2Smrgdnl paragraph) shall be included in all copies or substantial portions of the 26888223e2f2Smrgdnl Software. 26898223e2f2Smrgdnl 26908223e2f2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26918223e2f2Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26928223e2f2Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 26938223e2f2Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 26948223e2f2Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26958223e2f2Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26968223e2f2Smrgdnl DEALINGS IN THE SOFTWARE. 26978223e2f2Smrgdnl 26984642e01fSmrg 26994642e01fSmrg# XTRANS_TCP_FLAGS() 27004642e01fSmrg# ------------------ 27014642e01fSmrg# Find needed libraries for TCP sockets, and check for IPv6 support 27024642e01fSmrgAC_DEFUN([XTRANS_TCP_FLAGS],[ 27034642e01fSmrg # SVR4 hides these in libraries other than libc 27044642e01fSmrg AC_SEARCH_LIBS(socket, [socket]) 27054642e01fSmrg AC_SEARCH_LIBS(gethostbyname, [nsl]) 27066747b715Smrg if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then 270735c4bbdfSmrg AC_CHECK_LIB([ws2_32],[main]) 27086747b715Smrg fi 27094642e01fSmrg 27104642e01fSmrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems 271135c4bbdfSmrg AC_ARG_ENABLE(ipv6, 271235c4bbdfSmrg AS_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), 271335c4bbdfSmrg [IPV6CONN=$enableval], 27144642e01fSmrg [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) 27154642e01fSmrg AC_MSG_CHECKING([if IPv6 support should be built]) 27164642e01fSmrg if test "$IPV6CONN" = "yes"; then 27174642e01fSmrg AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) 27184642e01fSmrg fi 27194642e01fSmrg AC_MSG_RESULT($IPV6CONN) 27204642e01fSmrg 27214642e01fSmrg # 4.3BSD-Reno added a new member to struct sockaddr_in 272235c4bbdfSmrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 27234642e01fSmrg AC_DEFINE([BSD44SOCKETS],1, 27244642e01fSmrg [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ 27254642e01fSmrg#include <sys/types.h> 27264642e01fSmrg#include <sys/socket.h> 27274642e01fSmrg#include <netinet/in.h> 27284642e01fSmrg ]) 27294642e01fSmrg 27304642e01fSmrg # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. 27314642e01fSmrg AC_CHECK_TYPES([socklen_t], [], [], [ 27324642e01fSmrgAC_INCLUDES_DEFAULT 27334642e01fSmrg#include <sys/socket.h>]) 273435c4bbdfSmrg 273535c4bbdfSmrg # XPG4v2/UNIX95 added msg_control - check to see if we need to define 273635c4bbdfSmrg # _XOPEN_SOURCE to get it (such as on Solaris) 273735c4bbdfSmrg AC_CHECK_MEMBER([struct msghdr.msg_control], [], [], 273835c4bbdfSmrg [ 273935c4bbdfSmrgAC_INCLUDES_DEFAULT 274035c4bbdfSmrg#include <sys/socket.h> 274135c4bbdfSmrg ]) 274235c4bbdfSmrg # First try for Solaris in C99 compliant mode, which requires XPG6/UNIX03 274335c4bbdfSmrg if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then 274435c4bbdfSmrg unset ac_cv_member_struct_msghdr_msg_control 274535c4bbdfSmrg AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=600]) 274635c4bbdfSmrg AC_CHECK_MEMBER([struct msghdr.msg_control], 274735c4bbdfSmrg [AC_DEFINE([_XOPEN_SOURCE], [600], 274835c4bbdfSmrg [Defined if needed to expose struct msghdr.msg_control]) 274935c4bbdfSmrg ], [], [ 275035c4bbdfSmrg#define _XOPEN_SOURCE 600 275135c4bbdfSmrgAC_INCLUDES_DEFAULT 275235c4bbdfSmrg#include <sys/socket.h> 275335c4bbdfSmrg ]) 275435c4bbdfSmrg fi 275535c4bbdfSmrg # If that didn't work, fall back to XPG5/UNIX98 with C89 275635c4bbdfSmrg if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then 275735c4bbdfSmrg unset ac_cv_member_struct_msghdr_msg_control 275835c4bbdfSmrg AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=500]) 275935c4bbdfSmrg AC_CHECK_MEMBER([struct msghdr.msg_control], 276035c4bbdfSmrg [AC_DEFINE([_XOPEN_SOURCE], [500], 276135c4bbdfSmrg [Defined if needed to expose struct msghdr.msg_control]) 276235c4bbdfSmrg ], [], [ 276335c4bbdfSmrg#define _XOPEN_SOURCE 500 276435c4bbdfSmrgAC_INCLUDES_DEFAULT 276535c4bbdfSmrg#include <sys/socket.h> 276635c4bbdfSmrg ]) 276735c4bbdfSmrg fi 276835c4bbdfSmrg 276935c4bbdfSmrg 27704642e01fSmrg]) # XTRANS_TCP_FLAGS 27714642e01fSmrg 27724642e01fSmrg# XTRANS_CONNECTION_FLAGS() 27734642e01fSmrg# ------------------------- 27744642e01fSmrg# Standard checks for which Xtrans transports to use by the Xorg packages 27754642e01fSmrg# that use Xtrans functions 27764642e01fSmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],[ 27774642e01fSmrg AC_REQUIRE([AC_CANONICAL_HOST]) 27784642e01fSmrg [case $host_os in 27794642e01fSmrg mingw*) unixdef="no" ;; 27804642e01fSmrg *) unixdef="yes" ;; 27814642e01fSmrg esac] 27824642e01fSmrg AC_ARG_ENABLE(unix-transport, 278335c4bbdfSmrg AS_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), 27844642e01fSmrg [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) 27854642e01fSmrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) 27864642e01fSmrg if test "$UNIXCONN" = "yes"; then 27874642e01fSmrg AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) 27884642e01fSmrg fi 27894642e01fSmrg AC_MSG_RESULT($UNIXCONN) 279035c4bbdfSmrg AC_ARG_ENABLE(tcp-transport, 279135c4bbdfSmrg AS_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), 27924642e01fSmrg [TCPCONN=$enableval], [TCPCONN=yes]) 27934642e01fSmrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) 27944642e01fSmrg AC_MSG_RESULT($TCPCONN) 27954642e01fSmrg if test "$TCPCONN" = "yes"; then 27964642e01fSmrg AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) 27974642e01fSmrg XTRANS_TCP_FLAGS 27984642e01fSmrg fi 27994642e01fSmrg [case $host_os in 28004642e01fSmrg solaris*|sco*|sysv4*) localdef="yes" ;; 28014642e01fSmrg *) localdef="no" ;; 28024642e01fSmrg esac] 28034642e01fSmrg AC_ARG_ENABLE(local-transport, 280435c4bbdfSmrg AS_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), 28054642e01fSmrg [LOCALCONN=$enableval], [LOCALCONN=$localdef]) 28064642e01fSmrg AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) 28074642e01fSmrg AC_MSG_RESULT($LOCALCONN) 28084642e01fSmrg if test "$LOCALCONN" = "yes"; then 28094642e01fSmrg AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) 28104642e01fSmrg fi 281135c4bbdfSmrg 281225da500fSmrg # Other functions Xtrans may need 281325da500fSmrg AC_CHECK_FUNCS([strcasecmp strlcpy]) 281425da500fSmrg 28154642e01fSmrg]) # XTRANS_CONNECTION_FLAGS 28164642e01fSmrg 28174642e01fSmrg 28184642e01fSmrg# XTRANS_SECURE_RPC_FLAGS() 28194642e01fSmrg# ------------------------- 28204642e01fSmrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS 28214642e01fSmrg# so that any necessary networking libraries are already found 28224642e01fSmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS], 28234642e01fSmrg[AC_REQUIRE([XTRANS_TCP_FLAGS]) 282435c4bbdfSmrg AC_ARG_ENABLE(secure-rpc, 282535c4bbdfSmrg AS_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), 28264642e01fSmrg [SECURE_RPC=$enableval], [SECURE_RPC="try"]) 28274642e01fSmrg 28284642e01fSmrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then 28294642e01fSmrg FOUND_SECURE_RPC="no" 28304642e01fSmrg AC_CHECK_FUNCS([authdes_seccreate authdes_create], 28314642e01fSmrg [FOUND_SECURE_RPC="yes"]) 28324642e01fSmrg if test "x$FOUND_SECURE_RPC" = "xno" ; then 28334642e01fSmrg if test "x$SECURE_RPC" = "xyes" ; then 28344642e01fSmrg AC_MSG_ERROR([Secure RPC requested, but required functions not found]) 283535c4bbdfSmrg fi 28364642e01fSmrg SECURE_RPC="no" 28374642e01fSmrg else 28384642e01fSmrg dnl FreeBSD keeps getsecretkey in librpcsvc 28394642e01fSmrg AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) 28404642e01fSmrg SECURE_RPC="yes" 28414642e01fSmrg fi 28424642e01fSmrg fi 28434642e01fSmrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) 28444642e01fSmrg if test "x$SECURE_RPC" = "xyes" ; then 28454642e01fSmrg AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) 28464642e01fSmrg fi 28474642e01fSmrg AC_MSG_RESULT($SECURE_RPC) 28484642e01fSmrg]) # XTRANS_SECURE_RPC_FLAGS 28494642e01fSmrg 28504642e01fSmrg 2851c82838c1Smrg# Copyright (C) 2002-2021 Free Software Foundation, Inc. 285235c4bbdfSmrg# 285335c4bbdfSmrg# This file is free software; the Free Software Foundation 285435c4bbdfSmrg# gives unlimited permission to copy and/or distribute it, 285535c4bbdfSmrg# with or without modifications, as long as this notice is preserved. 285635c4bbdfSmrg 285735c4bbdfSmrg# AM_AUTOMAKE_VERSION(VERSION) 285835c4bbdfSmrg# ---------------------------- 285935c4bbdfSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 286035c4bbdfSmrg# generated from the m4 files accompanying Automake X.Y. 286135c4bbdfSmrg# (This private macro should not be called outside this file.) 286235c4bbdfSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 2863e23ec014Smrg[am__api_version='1.16' 286435c4bbdfSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 286535c4bbdfSmrgdnl require some minimum version. Point them to the right macro. 2866c82838c1Smrgm4_if([$1], [1.16.5], [], 286735c4bbdfSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 286835c4bbdfSmrg]) 286935c4bbdfSmrg 287035c4bbdfSmrg# _AM_AUTOCONF_VERSION(VERSION) 287135c4bbdfSmrg# ----------------------------- 287235c4bbdfSmrg# aclocal traces this macro to find the Autoconf version. 287335c4bbdfSmrg# This is a private macro too. Using m4_define simplifies 287435c4bbdfSmrg# the logic in aclocal, which can simply ignore this definition. 287535c4bbdfSmrgm4_define([_AM_AUTOCONF_VERSION], []) 287635c4bbdfSmrg 287735c4bbdfSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 287835c4bbdfSmrg# ------------------------------- 287935c4bbdfSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 288035c4bbdfSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 288135c4bbdfSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 2882c82838c1Smrg[AM_AUTOMAKE_VERSION([1.16.5])dnl 288335c4bbdfSmrgm4_ifndef([AC_AUTOCONF_VERSION], 288435c4bbdfSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 288535c4bbdfSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 288635c4bbdfSmrg 288735c4bbdfSmrg# Figure out how to run the assembler. -*- Autoconf -*- 288835c4bbdfSmrg 2889c82838c1Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 289035c4bbdfSmrg# 289135c4bbdfSmrg# This file is free software; the Free Software Foundation 289235c4bbdfSmrg# gives unlimited permission to copy and/or distribute it, 289335c4bbdfSmrg# with or without modifications, as long as this notice is preserved. 289435c4bbdfSmrg 289535c4bbdfSmrg# AM_PROG_AS 289635c4bbdfSmrg# ---------- 289735c4bbdfSmrgAC_DEFUN([AM_PROG_AS], 289835c4bbdfSmrg[# By default we simply use the C compiler to build assembly code. 289935c4bbdfSmrgAC_REQUIRE([AC_PROG_CC]) 290035c4bbdfSmrgtest "${CCAS+set}" = set || CCAS=$CC 290135c4bbdfSmrgtest "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS 290235c4bbdfSmrgAC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) 290335c4bbdfSmrgAC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) 290435c4bbdfSmrg_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl 290535c4bbdfSmrg]) 290635c4bbdfSmrg 290735c4bbdfSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 290835c4bbdfSmrg 2909c82838c1Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 291035c4bbdfSmrg# 291135c4bbdfSmrg# This file is free software; the Free Software Foundation 291235c4bbdfSmrg# gives unlimited permission to copy and/or distribute it, 291335c4bbdfSmrg# with or without modifications, as long as this notice is preserved. 291435c4bbdfSmrg 291535c4bbdfSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 291635c4bbdfSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 291735c4bbdfSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 291835c4bbdfSmrg# 291935c4bbdfSmrg# Of course, Automake must honor this variable whenever it calls a 292035c4bbdfSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 292135c4bbdfSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 292235c4bbdfSmrg# depending on how configure is run. This is pretty annoying, since 292335c4bbdfSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 292435c4bbdfSmrg# source directory, any form will work fine, but in subdirectories a 292535c4bbdfSmrg# relative path needs to be adjusted first. 292635c4bbdfSmrg# 292735c4bbdfSmrg# $ac_aux_dir/missing 292835c4bbdfSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 292935c4bbdfSmrg# $top_srcdir/$ac_aux_dir/missing 293035c4bbdfSmrg# fails if $ac_aux_dir is absolute, 293135c4bbdfSmrg# fails when called from a subdirectory in a VPATH build with 293235c4bbdfSmrg# a relative $ac_aux_dir 293335c4bbdfSmrg# 293435c4bbdfSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 293535c4bbdfSmrg# are both prefixed by $srcdir. In an in-source build this is usually 293635c4bbdfSmrg# harmless because $srcdir is '.', but things will broke when you 293735c4bbdfSmrg# start a VPATH build or use an absolute $srcdir. 293835c4bbdfSmrg# 293935c4bbdfSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 294035c4bbdfSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 294135c4bbdfSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 294235c4bbdfSmrg# and then we would define $MISSING as 294335c4bbdfSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 294435c4bbdfSmrg# This will work as long as MISSING is not called from configure, because 294535c4bbdfSmrg# unfortunately $(top_srcdir) has no meaning in configure. 294635c4bbdfSmrg# However there are other variables, like CC, which are often used in 294735c4bbdfSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 294835c4bbdfSmrg# 294935c4bbdfSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 295035c4bbdfSmrg# absolute PATH. The drawback is that using absolute paths prevent a 295135c4bbdfSmrg# configured tree to be moved without reconfiguration. 295235c4bbdfSmrg 295335c4bbdfSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 295435c4bbdfSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 295535c4bbdfSmrg# Expand $ac_aux_dir to an absolute path. 295635c4bbdfSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 295735c4bbdfSmrg]) 295835c4bbdfSmrg 295935c4bbdfSmrg# AM_CONDITIONAL -*- Autoconf -*- 296035c4bbdfSmrg 2961c82838c1Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 296235c4bbdfSmrg# 296335c4bbdfSmrg# This file is free software; the Free Software Foundation 296435c4bbdfSmrg# gives unlimited permission to copy and/or distribute it, 296535c4bbdfSmrg# with or without modifications, as long as this notice is preserved. 296635c4bbdfSmrg 296735c4bbdfSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 296835c4bbdfSmrg# ------------------------------------- 296935c4bbdfSmrg# Define a conditional. 297035c4bbdfSmrgAC_DEFUN([AM_CONDITIONAL], 297135c4bbdfSmrg[AC_PREREQ([2.52])dnl 297235c4bbdfSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 297335c4bbdfSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 297435c4bbdfSmrgAC_SUBST([$1_TRUE])dnl 297535c4bbdfSmrgAC_SUBST([$1_FALSE])dnl 297635c4bbdfSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 297735c4bbdfSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 297835c4bbdfSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 297935c4bbdfSmrgif $2; then 298035c4bbdfSmrg $1_TRUE= 298135c4bbdfSmrg $1_FALSE='#' 298235c4bbdfSmrgelse 298335c4bbdfSmrg $1_TRUE='#' 298435c4bbdfSmrg $1_FALSE= 298535c4bbdfSmrgfi 298635c4bbdfSmrgAC_CONFIG_COMMANDS_PRE( 298735c4bbdfSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 298835c4bbdfSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 298935c4bbdfSmrgUsually this means the macro was only invoked conditionally.]]) 299035c4bbdfSmrgfi])]) 299135c4bbdfSmrg 2992c82838c1Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 299335c4bbdfSmrg# 299435c4bbdfSmrg# This file is free software; the Free Software Foundation 299535c4bbdfSmrg# gives unlimited permission to copy and/or distribute it, 299635c4bbdfSmrg# with or without modifications, as long as this notice is preserved. 299735c4bbdfSmrg 299835c4bbdfSmrg 299935c4bbdfSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 300035c4bbdfSmrg# written in clear, in which case automake, when reading aclocal.m4, 300135c4bbdfSmrg# will think it sees a *use*, and therefore will trigger all it's 300235c4bbdfSmrg# C support machinery. Also note that it means that autoscan, seeing 300335c4bbdfSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 300435c4bbdfSmrg 300535c4bbdfSmrg 300635c4bbdfSmrg# _AM_DEPENDENCIES(NAME) 300735c4bbdfSmrg# ---------------------- 300835c4bbdfSmrg# See how the compiler implements dependency checking. 300935c4bbdfSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 301035c4bbdfSmrg# We try a few techniques and use that to set a single cache variable. 301135c4bbdfSmrg# 301235c4bbdfSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 301335c4bbdfSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 301435c4bbdfSmrg# dependency, and given that the user is not expected to run this macro, 301535c4bbdfSmrg# just rely on AC_PROG_CC. 301635c4bbdfSmrgAC_DEFUN([_AM_DEPENDENCIES], 301735c4bbdfSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 301835c4bbdfSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 301935c4bbdfSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 302035c4bbdfSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 302135c4bbdfSmrg 302235c4bbdfSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 302335c4bbdfSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 302435c4bbdfSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 302535c4bbdfSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 302635c4bbdfSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 302735c4bbdfSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 302835c4bbdfSmrg [depcc="$$1" am_compiler_list=]) 302935c4bbdfSmrg 303035c4bbdfSmrgAC_CACHE_CHECK([dependency style of $depcc], 303135c4bbdfSmrg [am_cv_$1_dependencies_compiler_type], 303235c4bbdfSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 303335c4bbdfSmrg # We make a subdir and do the tests there. Otherwise we can end up 303435c4bbdfSmrg # making bogus files that we don't know about and never remove. For 303535c4bbdfSmrg # instance it was reported that on HP-UX the gcc test will end up 303635c4bbdfSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 303735c4bbdfSmrg # in D". 303835c4bbdfSmrg rm -rf conftest.dir 303935c4bbdfSmrg mkdir conftest.dir 304035c4bbdfSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 304135c4bbdfSmrg # using a relative directory. 304235c4bbdfSmrg cp "$am_depcomp" conftest.dir 304335c4bbdfSmrg cd conftest.dir 304435c4bbdfSmrg # We will build objects and dependencies in a subdirectory because 304535c4bbdfSmrg # it helps to detect inapplicable dependency modes. For instance 304635c4bbdfSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 304735c4bbdfSmrg # side effect of compilation, but ICC will put the dependencies in 304835c4bbdfSmrg # the current directory while Tru64 will put them in the object 304935c4bbdfSmrg # directory. 305035c4bbdfSmrg mkdir sub 305135c4bbdfSmrg 305235c4bbdfSmrg am_cv_$1_dependencies_compiler_type=none 305335c4bbdfSmrg if test "$am_compiler_list" = ""; then 305435c4bbdfSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 305535c4bbdfSmrg fi 305635c4bbdfSmrg am__universal=false 305735c4bbdfSmrg m4_case([$1], [CC], 305835c4bbdfSmrg [case " $depcc " in #( 305935c4bbdfSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 306035c4bbdfSmrg esac], 306135c4bbdfSmrg [CXX], 306235c4bbdfSmrg [case " $depcc " in #( 306335c4bbdfSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 306435c4bbdfSmrg esac]) 306535c4bbdfSmrg 306635c4bbdfSmrg for depmode in $am_compiler_list; do 306735c4bbdfSmrg # Setup a source with many dependencies, because some compilers 306835c4bbdfSmrg # like to wrap large dependency lists on column 80 (with \), and 306935c4bbdfSmrg # we should not choose a depcomp mode which is confused by this. 307035c4bbdfSmrg # 307135c4bbdfSmrg # We need to recreate these files for each test, as the compiler may 307235c4bbdfSmrg # overwrite some of them when testing with obscure command lines. 307335c4bbdfSmrg # This happens at least with the AIX C compiler. 307435c4bbdfSmrg : > sub/conftest.c 307535c4bbdfSmrg for i in 1 2 3 4 5 6; do 307635c4bbdfSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 307735c4bbdfSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 307835c4bbdfSmrg # Solaris 10 /bin/sh. 307935c4bbdfSmrg echo '/* dummy */' > sub/conftst$i.h 308035c4bbdfSmrg done 308135c4bbdfSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 308235c4bbdfSmrg 308335c4bbdfSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 308435c4bbdfSmrg # mode. It turns out that the SunPro C++ compiler does not properly 308535c4bbdfSmrg # handle '-M -o', and we need to detect this. Also, some Intel 308635c4bbdfSmrg # versions had trouble with output in subdirs. 308735c4bbdfSmrg am__obj=sub/conftest.${OBJEXT-o} 308835c4bbdfSmrg am__minus_obj="-o $am__obj" 308935c4bbdfSmrg case $depmode in 309035c4bbdfSmrg gcc) 309135c4bbdfSmrg # This depmode causes a compiler race in universal mode. 309235c4bbdfSmrg test "$am__universal" = false || continue 309335c4bbdfSmrg ;; 309435c4bbdfSmrg nosideeffect) 309535c4bbdfSmrg # After this tag, mechanisms are not by side-effect, so they'll 309635c4bbdfSmrg # only be used when explicitly requested. 309735c4bbdfSmrg if test "x$enable_dependency_tracking" = xyes; then 309835c4bbdfSmrg continue 309935c4bbdfSmrg else 310035c4bbdfSmrg break 310135c4bbdfSmrg fi 310235c4bbdfSmrg ;; 310335c4bbdfSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 310435c4bbdfSmrg # This compiler won't grok '-c -o', but also, the minuso test has 310535c4bbdfSmrg # not run yet. These depmodes are late enough in the game, and 310635c4bbdfSmrg # so weak that their functioning should not be impacted. 310735c4bbdfSmrg am__obj=conftest.${OBJEXT-o} 310835c4bbdfSmrg am__minus_obj= 310935c4bbdfSmrg ;; 311035c4bbdfSmrg none) break ;; 311135c4bbdfSmrg esac 311235c4bbdfSmrg if depmode=$depmode \ 311335c4bbdfSmrg source=sub/conftest.c object=$am__obj \ 311435c4bbdfSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 311535c4bbdfSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 311635c4bbdfSmrg >/dev/null 2>conftest.err && 311735c4bbdfSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 311835c4bbdfSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 311935c4bbdfSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 312035c4bbdfSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 312135c4bbdfSmrg # icc doesn't choke on unknown options, it will just issue warnings 312235c4bbdfSmrg # or remarks (even with -Werror). So we grep stderr for any message 312335c4bbdfSmrg # that says an option was ignored or not supported. 312435c4bbdfSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 312535c4bbdfSmrg # icc: Command line warning: ignoring option '-M'; no argument required 312635c4bbdfSmrg # The diagnosis changed in icc 8.0: 312735c4bbdfSmrg # icc: Command line remark: option '-MP' not supported 312835c4bbdfSmrg if (grep 'ignoring option' conftest.err || 312935c4bbdfSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 313035c4bbdfSmrg am_cv_$1_dependencies_compiler_type=$depmode 313135c4bbdfSmrg break 313235c4bbdfSmrg fi 313335c4bbdfSmrg fi 313435c4bbdfSmrg done 313535c4bbdfSmrg 313635c4bbdfSmrg cd .. 313735c4bbdfSmrg rm -rf conftest.dir 313835c4bbdfSmrgelse 313935c4bbdfSmrg am_cv_$1_dependencies_compiler_type=none 314035c4bbdfSmrgfi 314135c4bbdfSmrg]) 314235c4bbdfSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 314335c4bbdfSmrgAM_CONDITIONAL([am__fastdep$1], [ 314435c4bbdfSmrg test "x$enable_dependency_tracking" != xno \ 314535c4bbdfSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 314635c4bbdfSmrg]) 314735c4bbdfSmrg 314835c4bbdfSmrg 314935c4bbdfSmrg# AM_SET_DEPDIR 315035c4bbdfSmrg# ------------- 315135c4bbdfSmrg# Choose a directory name for dependency files. 315235c4bbdfSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 315335c4bbdfSmrgAC_DEFUN([AM_SET_DEPDIR], 315435c4bbdfSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 315535c4bbdfSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 315635c4bbdfSmrg]) 315735c4bbdfSmrg 315835c4bbdfSmrg 315935c4bbdfSmrg# AM_DEP_TRACK 316035c4bbdfSmrg# ------------ 316135c4bbdfSmrgAC_DEFUN([AM_DEP_TRACK], 316235c4bbdfSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 316335c4bbdfSmrgAS_HELP_STRING( 316435c4bbdfSmrg [--enable-dependency-tracking], 316535c4bbdfSmrg [do not reject slow dependency extractors]) 316635c4bbdfSmrgAS_HELP_STRING( 316735c4bbdfSmrg [--disable-dependency-tracking], 316835c4bbdfSmrg [speeds up one-time build])]) 316935c4bbdfSmrgif test "x$enable_dependency_tracking" != xno; then 317035c4bbdfSmrg am_depcomp="$ac_aux_dir/depcomp" 317135c4bbdfSmrg AMDEPBACKSLASH='\' 317235c4bbdfSmrg am__nodep='_no' 317335c4bbdfSmrgfi 317435c4bbdfSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 317535c4bbdfSmrgAC_SUBST([AMDEPBACKSLASH])dnl 317635c4bbdfSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 317735c4bbdfSmrgAC_SUBST([am__nodep])dnl 317835c4bbdfSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 317935c4bbdfSmrg]) 318035c4bbdfSmrg 318135c4bbdfSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 318235c4bbdfSmrg 3183c82838c1Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 318435c4bbdfSmrg# 318535c4bbdfSmrg# This file is free software; the Free Software Foundation 318635c4bbdfSmrg# gives unlimited permission to copy and/or distribute it, 318735c4bbdfSmrg# with or without modifications, as long as this notice is preserved. 318835c4bbdfSmrg 318935c4bbdfSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 319035c4bbdfSmrg# ------------------------------ 319135c4bbdfSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 319235c4bbdfSmrg[{ 319335c4bbdfSmrg # Older Autoconf quotes --file arguments for eval, but not when files 319435c4bbdfSmrg # are listed without --file. Let's play safe and only enable the eval 319535c4bbdfSmrg # if we detect the quoting. 3196e23ec014Smrg # TODO: see whether this extra hack can be removed once we start 3197e23ec014Smrg # requiring Autoconf 2.70 or later. 3198e23ec014Smrg AS_CASE([$CONFIG_FILES], 3199e23ec014Smrg [*\'*], [eval set x "$CONFIG_FILES"], 3200e23ec014Smrg [*], [set x $CONFIG_FILES]) 320135c4bbdfSmrg shift 3202e23ec014Smrg # Used to flag and report bootstrapping failures. 3203e23ec014Smrg am_rc=0 3204e23ec014Smrg for am_mf 320535c4bbdfSmrg do 320635c4bbdfSmrg # Strip MF so we end up with the name of the file. 3207e23ec014Smrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 3208e23ec014Smrg # Check whether this is an Automake generated Makefile which includes 3209e23ec014Smrg # dependency-tracking related rules and includes. 3210e23ec014Smrg # Grep'ing the whole file directly is not great: AIX grep has a line 321135c4bbdfSmrg # limit of 2048, but all sed's we know have understand at least 4000. 3212e23ec014Smrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 3213e23ec014Smrg || continue 3214e23ec014Smrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 3215e23ec014Smrg am_filepart=`AS_BASENAME(["$am_mf"])` 3216e23ec014Smrg AM_RUN_LOG([cd "$am_dirpart" \ 3217e23ec014Smrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 3218e23ec014Smrg | $MAKE -f - am--depfiles]) || am_rc=$? 321935c4bbdfSmrg done 3220e23ec014Smrg if test $am_rc -ne 0; then 3221e23ec014Smrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 3222dc61d50dSmrg for automatic dependency tracking. If GNU make was not used, consider 3223dc61d50dSmrg re-running the configure script with MAKE="gmake" (or whatever is 3224dc61d50dSmrg necessary). You can also try re-running configure with the 3225e23ec014Smrg '--disable-dependency-tracking' option to at least be able to build 3226e23ec014Smrg the package (albeit without support for automatic dependency tracking).]) 3227e23ec014Smrg fi 3228e23ec014Smrg AS_UNSET([am_dirpart]) 3229e23ec014Smrg AS_UNSET([am_filepart]) 3230e23ec014Smrg AS_UNSET([am_mf]) 3231e23ec014Smrg AS_UNSET([am_rc]) 3232e23ec014Smrg rm -f conftest-deps.mk 323335c4bbdfSmrg} 323435c4bbdfSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 323535c4bbdfSmrg 323635c4bbdfSmrg 323735c4bbdfSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 323835c4bbdfSmrg# ----------------------------- 323935c4bbdfSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 324035c4bbdfSmrg# 3241e23ec014Smrg# This code is only required when automatic dependency tracking is enabled. 3242e23ec014Smrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 3243e23ec014Smrg# order to bootstrap the dependency handling code. 324435c4bbdfSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 324535c4bbdfSmrg[AC_CONFIG_COMMANDS([depfiles], 324635c4bbdfSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 3247e23ec014Smrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 324835c4bbdfSmrg 324935c4bbdfSmrg# Do all the work for Automake. -*- Autoconf -*- 325035c4bbdfSmrg 3251c82838c1Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 325235c4bbdfSmrg# 325335c4bbdfSmrg# This file is free software; the Free Software Foundation 325435c4bbdfSmrg# gives unlimited permission to copy and/or distribute it, 325535c4bbdfSmrg# with or without modifications, as long as this notice is preserved. 325635c4bbdfSmrg 325735c4bbdfSmrg# This macro actually does too much. Some checks are only needed if 325835c4bbdfSmrg# your package does certain things. But this isn't really a big deal. 325935c4bbdfSmrg 326035c4bbdfSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 326135c4bbdfSmrgm4_define([AC_PROG_CC], 326235c4bbdfSmrgm4_defn([AC_PROG_CC]) 326335c4bbdfSmrg[_AM_PROG_CC_C_O 326435c4bbdfSmrg]) 326535c4bbdfSmrg 326635c4bbdfSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 326735c4bbdfSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 326835c4bbdfSmrg# ----------------------------------------------- 326935c4bbdfSmrg# The call with PACKAGE and VERSION arguments is the old style 327035c4bbdfSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 327135c4bbdfSmrg# and VERSION should now be passed to AC_INIT and removed from 327235c4bbdfSmrg# the call to AM_INIT_AUTOMAKE. 327335c4bbdfSmrg# We support both call styles for the transition. After 327435c4bbdfSmrg# the next Automake release, Autoconf can make the AC_INIT 327535c4bbdfSmrg# arguments mandatory, and then we can depend on a new Autoconf 327635c4bbdfSmrg# release and drop the old call support. 327735c4bbdfSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 327835c4bbdfSmrg[AC_PREREQ([2.65])dnl 3279c82838c1Smrgm4_ifdef([_$0_ALREADY_INIT], 3280c82838c1Smrg [m4_fatal([$0 expanded multiple times 3281c82838c1Smrg]m4_defn([_$0_ALREADY_INIT]))], 3282c82838c1Smrg [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 328335c4bbdfSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 328435c4bbdfSmrgdnl the ones we care about. 328535c4bbdfSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 328635c4bbdfSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 328735c4bbdfSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 328835c4bbdfSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 328935c4bbdfSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 329035c4bbdfSmrg # is not polluted with repeated "-I." 329135c4bbdfSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 329235c4bbdfSmrg # test to see if srcdir already configured 329335c4bbdfSmrg if test -f $srcdir/config.status; then 329435c4bbdfSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 329535c4bbdfSmrg fi 329635c4bbdfSmrgfi 329735c4bbdfSmrg 329835c4bbdfSmrg# test whether we have cygpath 329935c4bbdfSmrgif test -z "$CYGPATH_W"; then 330035c4bbdfSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 330135c4bbdfSmrg CYGPATH_W='cygpath -w' 330235c4bbdfSmrg else 330335c4bbdfSmrg CYGPATH_W=echo 330435c4bbdfSmrg fi 330535c4bbdfSmrgfi 330635c4bbdfSmrgAC_SUBST([CYGPATH_W]) 330735c4bbdfSmrg 330835c4bbdfSmrg# Define the identity of the package. 330935c4bbdfSmrgdnl Distinguish between old-style and new-style calls. 331035c4bbdfSmrgm4_ifval([$2], 331135c4bbdfSmrg[AC_DIAGNOSE([obsolete], 331235c4bbdfSmrg [$0: two- and three-arguments forms are deprecated.]) 331335c4bbdfSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 331435c4bbdfSmrg AC_SUBST([PACKAGE], [$1])dnl 331535c4bbdfSmrg AC_SUBST([VERSION], [$2])], 331635c4bbdfSmrg[_AM_SET_OPTIONS([$1])dnl 331735c4bbdfSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 331835c4bbdfSmrgm4_if( 3319c82838c1Smrg m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 332035c4bbdfSmrg [ok:ok],, 332135c4bbdfSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 332235c4bbdfSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 332335c4bbdfSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 332435c4bbdfSmrg 332535c4bbdfSmrg_AM_IF_OPTION([no-define],, 332635c4bbdfSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 332735c4bbdfSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 332835c4bbdfSmrg 332935c4bbdfSmrg# Some tools Automake needs. 333035c4bbdfSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 333135c4bbdfSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 333235c4bbdfSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 333335c4bbdfSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 333435c4bbdfSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 333535c4bbdfSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 333635c4bbdfSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 333735c4bbdfSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 333835c4bbdfSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 333935c4bbdfSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 334035c4bbdfSmrg# For better backward compatibility. To be removed once Automake 1.9.x 334135c4bbdfSmrg# dies out for good. For more background, see: 3342e23ec014Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 3343e23ec014Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 334435c4bbdfSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 334535c4bbdfSmrg# We need awk for the "check" target (and possibly the TAP driver). The 334635c4bbdfSmrg# system "awk" is bad on some platforms. 334735c4bbdfSmrgAC_REQUIRE([AC_PROG_AWK])dnl 334835c4bbdfSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 334935c4bbdfSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 335035c4bbdfSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 335135c4bbdfSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 335235c4bbdfSmrg [_AM_PROG_TAR([v7])])]) 335335c4bbdfSmrg_AM_IF_OPTION([no-dependencies],, 335435c4bbdfSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 335535c4bbdfSmrg [_AM_DEPENDENCIES([CC])], 335635c4bbdfSmrg [m4_define([AC_PROG_CC], 335735c4bbdfSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 335835c4bbdfSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 335935c4bbdfSmrg [_AM_DEPENDENCIES([CXX])], 336035c4bbdfSmrg [m4_define([AC_PROG_CXX], 336135c4bbdfSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 336235c4bbdfSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 336335c4bbdfSmrg [_AM_DEPENDENCIES([OBJC])], 336435c4bbdfSmrg [m4_define([AC_PROG_OBJC], 336535c4bbdfSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 336635c4bbdfSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 336735c4bbdfSmrg [_AM_DEPENDENCIES([OBJCXX])], 336835c4bbdfSmrg [m4_define([AC_PROG_OBJCXX], 336935c4bbdfSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 337035c4bbdfSmrg]) 3371c82838c1Smrg# Variables for tags utilities; see am/tags.am 3372c82838c1Smrgif test -z "$CTAGS"; then 3373c82838c1Smrg CTAGS=ctags 3374c82838c1Smrgfi 3375c82838c1SmrgAC_SUBST([CTAGS]) 3376c82838c1Smrgif test -z "$ETAGS"; then 3377c82838c1Smrg ETAGS=etags 3378c82838c1Smrgfi 3379c82838c1SmrgAC_SUBST([ETAGS]) 3380c82838c1Smrgif test -z "$CSCOPE"; then 3381c82838c1Smrg CSCOPE=cscope 3382c82838c1Smrgfi 3383c82838c1SmrgAC_SUBST([CSCOPE]) 3384c82838c1Smrg 338535c4bbdfSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 338635c4bbdfSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 338735c4bbdfSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 338835c4bbdfSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 338935c4bbdfSmrgAC_CONFIG_COMMANDS_PRE(dnl 339035c4bbdfSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 339135c4bbdfSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 339235c4bbdfSmrg 339335c4bbdfSmrg# POSIX will say in a future version that running "rm -f" with no argument 339435c4bbdfSmrg# is OK; and we want to be able to make that assumption in our Makefile 339535c4bbdfSmrg# recipes. So use an aggressive probe to check that the usage we want is 339635c4bbdfSmrg# actually supported "in the wild" to an acceptable degree. 339735c4bbdfSmrg# See automake bug#10828. 339835c4bbdfSmrg# To make any issue more visible, cause the running configure to be aborted 339935c4bbdfSmrg# by default if the 'rm' program in use doesn't match our expectations; the 340035c4bbdfSmrg# user can still override this though. 340135c4bbdfSmrgif rm -f && rm -fr && rm -rf; then : OK; else 340235c4bbdfSmrg cat >&2 <<'END' 340335c4bbdfSmrgOops! 340435c4bbdfSmrg 340535c4bbdfSmrgYour 'rm' program seems unable to run without file operands specified 340635c4bbdfSmrgon the command line, even when the '-f' option is present. This is contrary 340735c4bbdfSmrgto the behaviour of most rm programs out there, and not conforming with 340835c4bbdfSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 340935c4bbdfSmrg 341035c4bbdfSmrgPlease tell bug-automake@gnu.org about your system, including the value 341135c4bbdfSmrgof your $PATH and any error possibly output before this message. This 341235c4bbdfSmrgcan help us improve future automake versions. 341335c4bbdfSmrg 341435c4bbdfSmrgEND 341535c4bbdfSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 341635c4bbdfSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 341735c4bbdfSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 341835c4bbdfSmrg echo >&2 341935c4bbdfSmrg else 342035c4bbdfSmrg cat >&2 <<'END' 342135c4bbdfSmrgAborting the configuration process, to ensure you take notice of the issue. 342235c4bbdfSmrg 342335c4bbdfSmrgYou can download and install GNU coreutils to get an 'rm' implementation 3424e23ec014Smrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 342535c4bbdfSmrg 342635c4bbdfSmrgIf you want to complete the configuration process using your problematic 342735c4bbdfSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 342835c4bbdfSmrgto "yes", and re-run configure. 342935c4bbdfSmrg 343035c4bbdfSmrgEND 343135c4bbdfSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 343235c4bbdfSmrg fi 343335c4bbdfSmrgfi 343435c4bbdfSmrgdnl The trailing newline in this macro's definition is deliberate, for 343535c4bbdfSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 343635c4bbdfSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 343735c4bbdfSmrg]) 343835c4bbdfSmrg 343935c4bbdfSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 344035c4bbdfSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 344135c4bbdfSmrgdnl mangled by Autoconf and run in a shell conditional statement. 344235c4bbdfSmrgm4_define([_AC_COMPILER_EXEEXT], 344335c4bbdfSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 344435c4bbdfSmrg 344535c4bbdfSmrg# When config.status generates a header, we must update the stamp-h file. 344635c4bbdfSmrg# This file resides in the same directory as the config header 344735c4bbdfSmrg# that is generated. The stamp files are numbered to have different names. 344835c4bbdfSmrg 344935c4bbdfSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 345035c4bbdfSmrg# loop where config.status creates the headers, so we can generate 345135c4bbdfSmrg# our stamp files there. 345235c4bbdfSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 345335c4bbdfSmrg[# Compute $1's index in $config_headers. 345435c4bbdfSmrg_am_arg=$1 345535c4bbdfSmrg_am_stamp_count=1 345635c4bbdfSmrgfor _am_header in $config_headers :; do 345735c4bbdfSmrg case $_am_header in 345835c4bbdfSmrg $_am_arg | $_am_arg:* ) 345935c4bbdfSmrg break ;; 346035c4bbdfSmrg * ) 346135c4bbdfSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 346235c4bbdfSmrg esac 346335c4bbdfSmrgdone 346435c4bbdfSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 346535c4bbdfSmrg 3466c82838c1Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 346735c4bbdfSmrg# 346835c4bbdfSmrg# This file is free software; the Free Software Foundation 346935c4bbdfSmrg# gives unlimited permission to copy and/or distribute it, 347035c4bbdfSmrg# with or without modifications, as long as this notice is preserved. 347135c4bbdfSmrg 347235c4bbdfSmrg# AM_PROG_INSTALL_SH 347335c4bbdfSmrg# ------------------ 347435c4bbdfSmrg# Define $install_sh. 347535c4bbdfSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 347635c4bbdfSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 347735c4bbdfSmrgif test x"${install_sh+set}" != xset; then 347835c4bbdfSmrg case $am_aux_dir in 347935c4bbdfSmrg *\ * | *\ *) 348035c4bbdfSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 348135c4bbdfSmrg *) 348235c4bbdfSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 348335c4bbdfSmrg esac 348435c4bbdfSmrgfi 348535c4bbdfSmrgAC_SUBST([install_sh])]) 348635c4bbdfSmrg 3487c82838c1Smrg# Copyright (C) 2003-2021 Free Software Foundation, Inc. 348835c4bbdfSmrg# 348935c4bbdfSmrg# This file is free software; the Free Software Foundation 349035c4bbdfSmrg# gives unlimited permission to copy and/or distribute it, 349135c4bbdfSmrg# with or without modifications, as long as this notice is preserved. 349235c4bbdfSmrg 349335c4bbdfSmrg# Check whether the underlying file-system supports filenames 349435c4bbdfSmrg# with a leading dot. For instance MS-DOS doesn't. 349535c4bbdfSmrgAC_DEFUN([AM_SET_LEADING_DOT], 349635c4bbdfSmrg[rm -rf .tst 2>/dev/null 349735c4bbdfSmrgmkdir .tst 2>/dev/null 349835c4bbdfSmrgif test -d .tst; then 349935c4bbdfSmrg am__leading_dot=. 350035c4bbdfSmrgelse 350135c4bbdfSmrg am__leading_dot=_ 350235c4bbdfSmrgfi 350335c4bbdfSmrgrmdir .tst 2>/dev/null 350435c4bbdfSmrgAC_SUBST([am__leading_dot])]) 350535c4bbdfSmrg 350635c4bbdfSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 350735c4bbdfSmrg 3508c82838c1Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 350935c4bbdfSmrg# 351035c4bbdfSmrg# This file is free software; the Free Software Foundation 351135c4bbdfSmrg# gives unlimited permission to copy and/or distribute it, 351235c4bbdfSmrg# with or without modifications, as long as this notice is preserved. 351335c4bbdfSmrg 351435c4bbdfSmrg# AM_MAKE_INCLUDE() 351535c4bbdfSmrg# ----------------- 3516e23ec014Smrg# Check whether make has an 'include' directive that can support all 3517e23ec014Smrg# the idioms we need for our automatic dependency tracking code. 351835c4bbdfSmrgAC_DEFUN([AM_MAKE_INCLUDE], 3519e23ec014Smrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 3520e23ec014Smrgcat > confinc.mk << 'END' 352135c4bbdfSmrgam__doit: 3522e23ec014Smrg @echo this is the am__doit target >confinc.out 352335c4bbdfSmrg.PHONY: am__doit 352435c4bbdfSmrgEND 352535c4bbdfSmrgam__include="#" 352635c4bbdfSmrgam__quote= 3527e23ec014Smrg# BSD make does it like this. 3528e23ec014Smrgecho '.include "confinc.mk" # ignored' > confmf.BSD 3529e23ec014Smrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 3530e23ec014Smrgecho 'include confinc.mk # ignored' > confmf.GNU 3531e23ec014Smrg_am_result=no 3532e23ec014Smrgfor s in GNU BSD; do 3533e23ec014Smrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 3534e23ec014Smrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 3535e23ec014Smrg ['0:this is the am__doit target'], 3536e23ec014Smrg [AS_CASE([$s], 3537e23ec014Smrg [BSD], [am__include='.include' am__quote='"'], 3538e23ec014Smrg [am__include='include' am__quote=''])]) 3539e23ec014Smrg if test "$am__include" != "#"; then 3540e23ec014Smrg _am_result="yes ($s style)" 3541e23ec014Smrg break 3542e23ec014Smrg fi 3543e23ec014Smrgdone 3544e23ec014Smrgrm -f confinc.* confmf.* 3545e23ec014SmrgAC_MSG_RESULT([${_am_result}]) 3546e23ec014SmrgAC_SUBST([am__include])]) 3547e23ec014SmrgAC_SUBST([am__quote])]) 354835c4bbdfSmrg 354935c4bbdfSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 355035c4bbdfSmrg 3551c82838c1Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 355235c4bbdfSmrg# 355335c4bbdfSmrg# This file is free software; the Free Software Foundation 355435c4bbdfSmrg# gives unlimited permission to copy and/or distribute it, 355535c4bbdfSmrg# with or without modifications, as long as this notice is preserved. 355635c4bbdfSmrg 355735c4bbdfSmrg# AM_MISSING_PROG(NAME, PROGRAM) 355835c4bbdfSmrg# ------------------------------ 355935c4bbdfSmrgAC_DEFUN([AM_MISSING_PROG], 356035c4bbdfSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 356135c4bbdfSmrg$1=${$1-"${am_missing_run}$2"} 356235c4bbdfSmrgAC_SUBST($1)]) 356335c4bbdfSmrg 356435c4bbdfSmrg# AM_MISSING_HAS_RUN 356535c4bbdfSmrg# ------------------ 356635c4bbdfSmrg# Define MISSING if not defined so far and test if it is modern enough. 356735c4bbdfSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 356835c4bbdfSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 356935c4bbdfSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 357035c4bbdfSmrgAC_REQUIRE_AUX_FILE([missing])dnl 357135c4bbdfSmrgif test x"${MISSING+set}" != xset; then 3572dc61d50dSmrg MISSING="\${SHELL} '$am_aux_dir/missing'" 357335c4bbdfSmrgfi 357435c4bbdfSmrg# Use eval to expand $SHELL 357535c4bbdfSmrgif eval "$MISSING --is-lightweight"; then 357635c4bbdfSmrg am_missing_run="$MISSING " 357735c4bbdfSmrgelse 357835c4bbdfSmrg am_missing_run= 357935c4bbdfSmrg AC_MSG_WARN(['missing' script is too old or missing]) 358035c4bbdfSmrgfi 358135c4bbdfSmrg]) 358235c4bbdfSmrg 358335c4bbdfSmrg# Helper functions for option handling. -*- Autoconf -*- 358435c4bbdfSmrg 3585c82838c1Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 358635c4bbdfSmrg# 358735c4bbdfSmrg# This file is free software; the Free Software Foundation 358835c4bbdfSmrg# gives unlimited permission to copy and/or distribute it, 358935c4bbdfSmrg# with or without modifications, as long as this notice is preserved. 359035c4bbdfSmrg 359135c4bbdfSmrg# _AM_MANGLE_OPTION(NAME) 359235c4bbdfSmrg# ----------------------- 359335c4bbdfSmrgAC_DEFUN([_AM_MANGLE_OPTION], 359435c4bbdfSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 359535c4bbdfSmrg 359635c4bbdfSmrg# _AM_SET_OPTION(NAME) 359735c4bbdfSmrg# -------------------- 359835c4bbdfSmrg# Set option NAME. Presently that only means defining a flag for this option. 359935c4bbdfSmrgAC_DEFUN([_AM_SET_OPTION], 360035c4bbdfSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 360135c4bbdfSmrg 360235c4bbdfSmrg# _AM_SET_OPTIONS(OPTIONS) 360335c4bbdfSmrg# ------------------------ 360435c4bbdfSmrg# OPTIONS is a space-separated list of Automake options. 360535c4bbdfSmrgAC_DEFUN([_AM_SET_OPTIONS], 360635c4bbdfSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 360735c4bbdfSmrg 360835c4bbdfSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 360935c4bbdfSmrg# ------------------------------------------- 361035c4bbdfSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 361135c4bbdfSmrgAC_DEFUN([_AM_IF_OPTION], 361235c4bbdfSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 361335c4bbdfSmrg 3614c82838c1Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 361535c4bbdfSmrg# 361635c4bbdfSmrg# This file is free software; the Free Software Foundation 361735c4bbdfSmrg# gives unlimited permission to copy and/or distribute it, 361835c4bbdfSmrg# with or without modifications, as long as this notice is preserved. 361935c4bbdfSmrg 362035c4bbdfSmrg# _AM_PROG_CC_C_O 362135c4bbdfSmrg# --------------- 362235c4bbdfSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 362335c4bbdfSmrg# to automatically call this. 362435c4bbdfSmrgAC_DEFUN([_AM_PROG_CC_C_O], 362535c4bbdfSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 362635c4bbdfSmrgAC_REQUIRE_AUX_FILE([compile])dnl 362735c4bbdfSmrgAC_LANG_PUSH([C])dnl 362835c4bbdfSmrgAC_CACHE_CHECK( 362935c4bbdfSmrg [whether $CC understands -c and -o together], 363035c4bbdfSmrg [am_cv_prog_cc_c_o], 363135c4bbdfSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 363235c4bbdfSmrg # Make sure it works both with $CC and with simple cc. 363335c4bbdfSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 363435c4bbdfSmrg # compilers refuse to overwrite an existing .o file with -o, 363535c4bbdfSmrg # though they will create one. 363635c4bbdfSmrg am_cv_prog_cc_c_o=yes 363735c4bbdfSmrg for am_i in 1 2; do 363835c4bbdfSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 363935c4bbdfSmrg && test -f conftest2.$ac_objext; then 364035c4bbdfSmrg : OK 364135c4bbdfSmrg else 364235c4bbdfSmrg am_cv_prog_cc_c_o=no 364335c4bbdfSmrg break 364435c4bbdfSmrg fi 364535c4bbdfSmrg done 364635c4bbdfSmrg rm -f core conftest* 364735c4bbdfSmrg unset am_i]) 364835c4bbdfSmrgif test "$am_cv_prog_cc_c_o" != yes; then 364935c4bbdfSmrg # Losing compiler, so override with the script. 365035c4bbdfSmrg # FIXME: It is wrong to rewrite CC. 365135c4bbdfSmrg # But if we don't then we get into trouble of one sort or another. 365235c4bbdfSmrg # A longer-term fix would be to have automake use am__CC in this case, 365335c4bbdfSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 365435c4bbdfSmrg CC="$am_aux_dir/compile $CC" 365535c4bbdfSmrgfi 365635c4bbdfSmrgAC_LANG_POP([C])]) 365735c4bbdfSmrg 365835c4bbdfSmrg# For backward compatibility. 365935c4bbdfSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 366035c4bbdfSmrg 3661c82838c1Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 366235c4bbdfSmrg# 366335c4bbdfSmrg# This file is free software; the Free Software Foundation 366435c4bbdfSmrg# gives unlimited permission to copy and/or distribute it, 366535c4bbdfSmrg# with or without modifications, as long as this notice is preserved. 366635c4bbdfSmrg 366735c4bbdfSmrg# AM_RUN_LOG(COMMAND) 366835c4bbdfSmrg# ------------------- 366935c4bbdfSmrg# Run COMMAND, save the exit status in ac_status, and log it. 367035c4bbdfSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 367135c4bbdfSmrgAC_DEFUN([AM_RUN_LOG], 367235c4bbdfSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 367335c4bbdfSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 367435c4bbdfSmrg ac_status=$? 367535c4bbdfSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 367635c4bbdfSmrg (exit $ac_status); }]) 367735c4bbdfSmrg 367835c4bbdfSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 367935c4bbdfSmrg 3680c82838c1Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 368135c4bbdfSmrg# 368235c4bbdfSmrg# This file is free software; the Free Software Foundation 368335c4bbdfSmrg# gives unlimited permission to copy and/or distribute it, 368435c4bbdfSmrg# with or without modifications, as long as this notice is preserved. 368535c4bbdfSmrg 368635c4bbdfSmrg# AM_SANITY_CHECK 368735c4bbdfSmrg# --------------- 368835c4bbdfSmrgAC_DEFUN([AM_SANITY_CHECK], 368935c4bbdfSmrg[AC_MSG_CHECKING([whether build environment is sane]) 369035c4bbdfSmrg# Reject unsafe characters in $srcdir or the absolute working directory 369135c4bbdfSmrg# name. Accept space and tab only in the latter. 369235c4bbdfSmrgam_lf=' 369335c4bbdfSmrg' 369435c4bbdfSmrgcase `pwd` in 369535c4bbdfSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 369635c4bbdfSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 369735c4bbdfSmrgesac 369835c4bbdfSmrgcase $srcdir in 369935c4bbdfSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 370035c4bbdfSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 370135c4bbdfSmrgesac 370235c4bbdfSmrg 370335c4bbdfSmrg# Do 'set' in a subshell so we don't clobber the current shell's 370435c4bbdfSmrg# arguments. Must try -L first in case configure is actually a 370535c4bbdfSmrg# symlink; some systems play weird games with the mod time of symlinks 370635c4bbdfSmrg# (eg FreeBSD returns the mod time of the symlink's containing 370735c4bbdfSmrg# directory). 370835c4bbdfSmrgif ( 370935c4bbdfSmrg am_has_slept=no 371035c4bbdfSmrg for am_try in 1 2; do 371135c4bbdfSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 371235c4bbdfSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 371335c4bbdfSmrg if test "$[*]" = "X"; then 371435c4bbdfSmrg # -L didn't work. 371535c4bbdfSmrg set X `ls -t "$srcdir/configure" conftest.file` 371635c4bbdfSmrg fi 371735c4bbdfSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 371835c4bbdfSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 371935c4bbdfSmrg 372035c4bbdfSmrg # If neither matched, then we have a broken ls. This can happen 372135c4bbdfSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 372235c4bbdfSmrg # broken ls alias from the environment. This has actually 372335c4bbdfSmrg # happened. Such a system could not be considered "sane". 372435c4bbdfSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 372535c4bbdfSmrg alias in your environment]) 372635c4bbdfSmrg fi 372735c4bbdfSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 372835c4bbdfSmrg break 372935c4bbdfSmrg fi 373035c4bbdfSmrg # Just in case. 373135c4bbdfSmrg sleep 1 373235c4bbdfSmrg am_has_slept=yes 373335c4bbdfSmrg done 373435c4bbdfSmrg test "$[2]" = conftest.file 373535c4bbdfSmrg ) 373635c4bbdfSmrgthen 373735c4bbdfSmrg # Ok. 373835c4bbdfSmrg : 373935c4bbdfSmrgelse 374035c4bbdfSmrg AC_MSG_ERROR([newly created file is older than distributed files! 374135c4bbdfSmrgCheck your system clock]) 374235c4bbdfSmrgfi 374335c4bbdfSmrgAC_MSG_RESULT([yes]) 374435c4bbdfSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 374535c4bbdfSmrg# generated files are strictly newer. 374635c4bbdfSmrgam_sleep_pid= 374735c4bbdfSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 374835c4bbdfSmrg ( sleep 1 ) & 374935c4bbdfSmrg am_sleep_pid=$! 375035c4bbdfSmrgfi 375135c4bbdfSmrgAC_CONFIG_COMMANDS_PRE( 375235c4bbdfSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 375335c4bbdfSmrg if test -n "$am_sleep_pid"; then 375435c4bbdfSmrg # Hide warnings about reused PIDs. 375535c4bbdfSmrg wait $am_sleep_pid 2>/dev/null 375635c4bbdfSmrg fi 375735c4bbdfSmrg AC_MSG_RESULT([done])]) 375835c4bbdfSmrgrm -f conftest.file 375935c4bbdfSmrg]) 376035c4bbdfSmrg 3761c82838c1Smrg# Copyright (C) 2009-2021 Free Software Foundation, Inc. 376235c4bbdfSmrg# 376335c4bbdfSmrg# This file is free software; the Free Software Foundation 376435c4bbdfSmrg# gives unlimited permission to copy and/or distribute it, 376535c4bbdfSmrg# with or without modifications, as long as this notice is preserved. 376635c4bbdfSmrg 376735c4bbdfSmrg# AM_SILENT_RULES([DEFAULT]) 376835c4bbdfSmrg# -------------------------- 376935c4bbdfSmrg# Enable less verbose build rules; with the default set to DEFAULT 377035c4bbdfSmrg# ("yes" being less verbose, "no" or empty being verbose). 377135c4bbdfSmrgAC_DEFUN([AM_SILENT_RULES], 377235c4bbdfSmrg[AC_ARG_ENABLE([silent-rules], [dnl 377335c4bbdfSmrgAS_HELP_STRING( 377435c4bbdfSmrg [--enable-silent-rules], 377535c4bbdfSmrg [less verbose build output (undo: "make V=1")]) 377635c4bbdfSmrgAS_HELP_STRING( 377735c4bbdfSmrg [--disable-silent-rules], 377835c4bbdfSmrg [verbose build output (undo: "make V=0")])dnl 377935c4bbdfSmrg]) 378035c4bbdfSmrgcase $enable_silent_rules in @%:@ ((( 378135c4bbdfSmrg yes) AM_DEFAULT_VERBOSITY=0;; 378235c4bbdfSmrg no) AM_DEFAULT_VERBOSITY=1;; 378335c4bbdfSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 378435c4bbdfSmrgesac 378535c4bbdfSmrgdnl 378635c4bbdfSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 378735c4bbdfSmrgdnl do not support nested variable expansions. 378835c4bbdfSmrgdnl See automake bug#9928 and bug#10237. 378935c4bbdfSmrgam_make=${MAKE-make} 379035c4bbdfSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 379135c4bbdfSmrg [am_cv_make_support_nested_variables], 379235c4bbdfSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 379335c4bbdfSmrgBAR0=false 379435c4bbdfSmrgBAR1=true 379535c4bbdfSmrgV=1 379635c4bbdfSmrgam__doit: 379735c4bbdfSmrg @$(TRUE) 379835c4bbdfSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 379935c4bbdfSmrg am_cv_make_support_nested_variables=yes 380035c4bbdfSmrgelse 380135c4bbdfSmrg am_cv_make_support_nested_variables=no 380235c4bbdfSmrgfi]) 380335c4bbdfSmrgif test $am_cv_make_support_nested_variables = yes; then 380435c4bbdfSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 380535c4bbdfSmrg AM_V='$(V)' 380635c4bbdfSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 380735c4bbdfSmrgelse 380835c4bbdfSmrg AM_V=$AM_DEFAULT_VERBOSITY 380935c4bbdfSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 381035c4bbdfSmrgfi 381135c4bbdfSmrgAC_SUBST([AM_V])dnl 381235c4bbdfSmrgAM_SUBST_NOTMAKE([AM_V])dnl 381335c4bbdfSmrgAC_SUBST([AM_DEFAULT_V])dnl 381435c4bbdfSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 381535c4bbdfSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 381635c4bbdfSmrgAM_BACKSLASH='\' 381735c4bbdfSmrgAC_SUBST([AM_BACKSLASH])dnl 381835c4bbdfSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 381935c4bbdfSmrg]) 382035c4bbdfSmrg 3821c82838c1Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 382235c4bbdfSmrg# 382335c4bbdfSmrg# This file is free software; the Free Software Foundation 382435c4bbdfSmrg# gives unlimited permission to copy and/or distribute it, 382535c4bbdfSmrg# with or without modifications, as long as this notice is preserved. 382635c4bbdfSmrg 382735c4bbdfSmrg# AM_PROG_INSTALL_STRIP 382835c4bbdfSmrg# --------------------- 382935c4bbdfSmrg# One issue with vendor 'install' (even GNU) is that you can't 383035c4bbdfSmrg# specify the program used to strip binaries. This is especially 383135c4bbdfSmrg# annoying in cross-compiling environments, where the build's strip 383235c4bbdfSmrg# is unlikely to handle the host's binaries. 383335c4bbdfSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 383435c4bbdfSmrg# always use install-sh in "make install-strip", and initialize 383535c4bbdfSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 383635c4bbdfSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 383735c4bbdfSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 383835c4bbdfSmrg# Installed binaries are usually stripped using 'strip' when the user 383935c4bbdfSmrg# run "make install-strip". However 'strip' might not be the right 384035c4bbdfSmrg# tool to use in cross-compilation environments, therefore Automake 384135c4bbdfSmrg# will honor the 'STRIP' environment variable to overrule this program. 384235c4bbdfSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 384335c4bbdfSmrgif test "$cross_compiling" != no; then 384435c4bbdfSmrg AC_CHECK_TOOL([STRIP], [strip], :) 384535c4bbdfSmrgfi 384635c4bbdfSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 384735c4bbdfSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 384835c4bbdfSmrg 3849c82838c1Smrg# Copyright (C) 2006-2021 Free Software Foundation, Inc. 385035c4bbdfSmrg# 385135c4bbdfSmrg# This file is free software; the Free Software Foundation 385235c4bbdfSmrg# gives unlimited permission to copy and/or distribute it, 385335c4bbdfSmrg# with or without modifications, as long as this notice is preserved. 385435c4bbdfSmrg 385535c4bbdfSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 385635c4bbdfSmrg# --------------------------- 385735c4bbdfSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 385835c4bbdfSmrg# This macro is traced by Automake. 385935c4bbdfSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 386035c4bbdfSmrg 386135c4bbdfSmrg# AM_SUBST_NOTMAKE(VARIABLE) 386235c4bbdfSmrg# -------------------------- 386335c4bbdfSmrg# Public sister of _AM_SUBST_NOTMAKE. 386435c4bbdfSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 386535c4bbdfSmrg 386635c4bbdfSmrg# Check how to create a tarball. -*- Autoconf -*- 386735c4bbdfSmrg 3868c82838c1Smrg# Copyright (C) 2004-2021 Free Software Foundation, Inc. 386935c4bbdfSmrg# 387035c4bbdfSmrg# This file is free software; the Free Software Foundation 387135c4bbdfSmrg# gives unlimited permission to copy and/or distribute it, 387235c4bbdfSmrg# with or without modifications, as long as this notice is preserved. 387335c4bbdfSmrg 387435c4bbdfSmrg# _AM_PROG_TAR(FORMAT) 387535c4bbdfSmrg# -------------------- 387635c4bbdfSmrg# Check how to create a tarball in format FORMAT. 387735c4bbdfSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 387835c4bbdfSmrg# 387935c4bbdfSmrg# Substitute a variable $(am__tar) that is a command 388035c4bbdfSmrg# writing to stdout a FORMAT-tarball containing the directory 388135c4bbdfSmrg# $tardir. 388235c4bbdfSmrg# tardir=directory && $(am__tar) > result.tar 388335c4bbdfSmrg# 388435c4bbdfSmrg# Substitute a variable $(am__untar) that extract such 388535c4bbdfSmrg# a tarball read from stdin. 388635c4bbdfSmrg# $(am__untar) < result.tar 388735c4bbdfSmrg# 388835c4bbdfSmrgAC_DEFUN([_AM_PROG_TAR], 388935c4bbdfSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 389035c4bbdfSmrg# in the wild :-( We should find a proper way to deprecate it ... 389135c4bbdfSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 389235c4bbdfSmrg 389335c4bbdfSmrg# We'll loop over all known methods to create a tar archive until one works. 389435c4bbdfSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 389535c4bbdfSmrg 389635c4bbdfSmrgm4_if([$1], [v7], 389735c4bbdfSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 389835c4bbdfSmrg 389935c4bbdfSmrg [m4_case([$1], 390035c4bbdfSmrg [ustar], 390135c4bbdfSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 390235c4bbdfSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 390335c4bbdfSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 390435c4bbdfSmrg # and bug#13588). 390535c4bbdfSmrg am_max_uid=2097151 # 2^21 - 1 390635c4bbdfSmrg am_max_gid=$am_max_uid 390735c4bbdfSmrg # The $UID and $GID variables are not portable, so we need to resort 390835c4bbdfSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 390935c4bbdfSmrg # below are definitely unexpected, so allow the users to see them 391035c4bbdfSmrg # (that is, avoid stderr redirection). 391135c4bbdfSmrg am_uid=`id -u || echo unknown` 391235c4bbdfSmrg am_gid=`id -g || echo unknown` 391335c4bbdfSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 391435c4bbdfSmrg if test $am_uid -le $am_max_uid; then 391535c4bbdfSmrg AC_MSG_RESULT([yes]) 391635c4bbdfSmrg else 391735c4bbdfSmrg AC_MSG_RESULT([no]) 391835c4bbdfSmrg _am_tools=none 391935c4bbdfSmrg fi 392035c4bbdfSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 392135c4bbdfSmrg if test $am_gid -le $am_max_gid; then 392235c4bbdfSmrg AC_MSG_RESULT([yes]) 392335c4bbdfSmrg else 392435c4bbdfSmrg AC_MSG_RESULT([no]) 392535c4bbdfSmrg _am_tools=none 392635c4bbdfSmrg fi], 392735c4bbdfSmrg 392835c4bbdfSmrg [pax], 392935c4bbdfSmrg [], 393035c4bbdfSmrg 393135c4bbdfSmrg [m4_fatal([Unknown tar format])]) 393235c4bbdfSmrg 393335c4bbdfSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 393435c4bbdfSmrg 393535c4bbdfSmrg # Go ahead even if we have the value already cached. We do so because we 393635c4bbdfSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 393735c4bbdfSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 393835c4bbdfSmrg 393935c4bbdfSmrg for _am_tool in $_am_tools; do 394035c4bbdfSmrg case $_am_tool in 394135c4bbdfSmrg gnutar) 394235c4bbdfSmrg for _am_tar in tar gnutar gtar; do 394335c4bbdfSmrg AM_RUN_LOG([$_am_tar --version]) && break 394435c4bbdfSmrg done 394535c4bbdfSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 394635c4bbdfSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 394735c4bbdfSmrg am__untar="$_am_tar -xf -" 394835c4bbdfSmrg ;; 394935c4bbdfSmrg plaintar) 395035c4bbdfSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 395135c4bbdfSmrg # ustar tarball either. 395235c4bbdfSmrg (tar --version) >/dev/null 2>&1 && continue 395335c4bbdfSmrg am__tar='tar chf - "$$tardir"' 395435c4bbdfSmrg am__tar_='tar chf - "$tardir"' 395535c4bbdfSmrg am__untar='tar xf -' 395635c4bbdfSmrg ;; 395735c4bbdfSmrg pax) 395835c4bbdfSmrg am__tar='pax -L -x $1 -w "$$tardir"' 395935c4bbdfSmrg am__tar_='pax -L -x $1 -w "$tardir"' 396035c4bbdfSmrg am__untar='pax -r' 396135c4bbdfSmrg ;; 396235c4bbdfSmrg cpio) 396335c4bbdfSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 396435c4bbdfSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 396535c4bbdfSmrg am__untar='cpio -i -H $1 -d' 396635c4bbdfSmrg ;; 396735c4bbdfSmrg none) 396835c4bbdfSmrg am__tar=false 396935c4bbdfSmrg am__tar_=false 397035c4bbdfSmrg am__untar=false 397135c4bbdfSmrg ;; 397235c4bbdfSmrg esac 397335c4bbdfSmrg 397435c4bbdfSmrg # If the value was cached, stop now. We just wanted to have am__tar 397535c4bbdfSmrg # and am__untar set. 397635c4bbdfSmrg test -n "${am_cv_prog_tar_$1}" && break 397735c4bbdfSmrg 397835c4bbdfSmrg # tar/untar a dummy directory, and stop if the command works. 397935c4bbdfSmrg rm -rf conftest.dir 398035c4bbdfSmrg mkdir conftest.dir 398135c4bbdfSmrg echo GrepMe > conftest.dir/file 398235c4bbdfSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 398335c4bbdfSmrg rm -rf conftest.dir 398435c4bbdfSmrg if test -s conftest.tar; then 398535c4bbdfSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 398635c4bbdfSmrg AM_RUN_LOG([cat conftest.dir/file]) 398735c4bbdfSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 398835c4bbdfSmrg fi 398935c4bbdfSmrg done 399035c4bbdfSmrg rm -rf conftest.dir 399135c4bbdfSmrg 399235c4bbdfSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 399335c4bbdfSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 399435c4bbdfSmrg 399535c4bbdfSmrgAC_SUBST([am__tar]) 399635c4bbdfSmrgAC_SUBST([am__untar]) 399735c4bbdfSmrg]) # _AM_PROG_TAR 399835c4bbdfSmrg 399935c4bbdfSmrgm4_include([m4/ac_define_dir.m4]) 40001b5d61b8Smrgm4_include([m4/ax_pthread.m4]) 400135c4bbdfSmrgm4_include([m4/ltoptions.m4]) 400235c4bbdfSmrgm4_include([m4/ltsugar.m4]) 400335c4bbdfSmrgm4_include([m4/lt~obsolete.m4]) 4004c82838c1Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 4005c82838c1Smrg# 4006c82838c1Smrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 4007c82838c1Smrg# Foundation, Inc. 4008c82838c1Smrg# Written by Gordon Matzigkeit, 1996 4009c82838c1Smrg# 4010c82838c1Smrg# This file is free software; the Free Software Foundation gives 4011c82838c1Smrg# unlimited permission to copy and/or distribute it, with or without 4012c82838c1Smrg# modifications, as long as this notice is preserved. 4013c82838c1Smrg 4014c82838c1Smrgm4_define([_LT_COPYING], [dnl 4015c82838c1Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 4016c82838c1Smrg# This is free software; see the source for copying conditions. There is NO 4017c82838c1Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 4018c82838c1Smrg 4019c82838c1Smrg# GNU Libtool is free software; you can redistribute it and/or modify 4020c82838c1Smrg# it under the terms of the GNU General Public License as published by 4021c82838c1Smrg# the Free Software Foundation; either version 2 of of the License, or 4022c82838c1Smrg# (at your option) any later version. 4023c82838c1Smrg# 4024c82838c1Smrg# As a special exception to the GNU General Public License, if you 4025c82838c1Smrg# distribute this file as part of a program or library that is built 4026c82838c1Smrg# using GNU Libtool, you may include this file under the same 4027c82838c1Smrg# distribution terms that you use for the rest of that program. 4028c82838c1Smrg# 4029c82838c1Smrg# GNU Libtool is distributed in the hope that it will be useful, but 4030c82838c1Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 4031c82838c1Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4032c82838c1Smrg# GNU General Public License for more details. 4033c82838c1Smrg# 4034c82838c1Smrg# You should have received a copy of the GNU General Public License 4035c82838c1Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 4036c82838c1Smrg]) 4037c82838c1Smrg 4038c82838c1Smrg# serial 59 LT_INIT 4039c82838c1Smrg 4040c82838c1Smrg 4041c82838c1Smrg# LT_PREREQ(VERSION) 4042c82838c1Smrg# ------------------ 4043c82838c1Smrg# Complain and exit if this libtool version is less that VERSION. 4044c82838c1Smrgm4_defun([LT_PREREQ], 4045c82838c1Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 4046c82838c1Smrg [m4_default([$3], 4047c82838c1Smrg [m4_fatal([Libtool version $1 or higher is required], 4048c82838c1Smrg 63)])], 4049c82838c1Smrg [$2])]) 4050c82838c1Smrg 4051c82838c1Smrg 4052c82838c1Smrg# _LT_CHECK_BUILDDIR 4053c82838c1Smrg# ------------------ 4054c82838c1Smrg# Complain if the absolute build directory name contains unusual characters 4055c82838c1Smrgm4_defun([_LT_CHECK_BUILDDIR], 4056c82838c1Smrg[case `pwd` in 4057c82838c1Smrg *\ * | *\ *) 4058c82838c1Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 4059c82838c1Smrgesac 4060c82838c1Smrg]) 4061c82838c1Smrg 4062c82838c1Smrg 4063c82838c1Smrg# LT_INIT([OPTIONS]) 4064c82838c1Smrg# ------------------ 4065c82838c1SmrgAC_DEFUN([LT_INIT], 4066c82838c1Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 4067c82838c1SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 4068c82838c1SmrgAC_BEFORE([$0], [LT_LANG])dnl 4069c82838c1SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 4070c82838c1SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 4071c82838c1Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 4072c82838c1Smrg 4073c82838c1Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 4074c82838c1Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 4075c82838c1Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 4076c82838c1Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 4077c82838c1Smrgdnl unless we require an AC_DEFUNed macro: 4078c82838c1SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 4079c82838c1SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 4080c82838c1SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 4081c82838c1SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 4082c82838c1Smrgm4_require([_LT_PROG_LTMAIN])dnl 4083c82838c1Smrg 4084c82838c1Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 4085c82838c1Smrg 4086c82838c1Smrgdnl Parse OPTIONS 4087c82838c1Smrg_LT_SET_OPTIONS([$0], [$1]) 4088c82838c1Smrg 4089c82838c1Smrg# This can be used to rebuild libtool when needed 4090c82838c1SmrgLIBTOOL_DEPS=$ltmain 4091c82838c1Smrg 4092c82838c1Smrg# Always use our own libtool. 4093c82838c1SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 4094c82838c1SmrgAC_SUBST(LIBTOOL)dnl 4095c82838c1Smrg 4096c82838c1Smrg_LT_SETUP 4097c82838c1Smrg 4098c82838c1Smrg# Only expand once: 4099c82838c1Smrgm4_define([LT_INIT]) 4100c82838c1Smrg])# LT_INIT 4101c82838c1Smrg 4102c82838c1Smrg# Old names: 4103c82838c1SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 4104c82838c1SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 4105c82838c1Smrgdnl aclocal-1.4 backwards compatibility: 4106c82838c1Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 4107c82838c1Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 4108c82838c1Smrg 4109c82838c1Smrg 4110c82838c1Smrg# _LT_PREPARE_CC_BASENAME 4111c82838c1Smrg# ----------------------- 4112c82838c1Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 4113c82838c1Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 4114c82838c1Smrgfunc_cc_basename () 4115c82838c1Smrg{ 4116c82838c1Smrg for cc_temp in @S|@*""; do 4117c82838c1Smrg case $cc_temp in 4118c82838c1Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 4119c82838c1Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 4120c82838c1Smrg \-*) ;; 4121c82838c1Smrg *) break;; 4122c82838c1Smrg esac 4123c82838c1Smrg done 4124c82838c1Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 4125c82838c1Smrg} 4126c82838c1Smrg])# _LT_PREPARE_CC_BASENAME 4127c82838c1Smrg 4128c82838c1Smrg 4129c82838c1Smrg# _LT_CC_BASENAME(CC) 4130c82838c1Smrg# ------------------- 4131c82838c1Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 4132c82838c1Smrg# but that macro is also expanded into generated libtool script, which 4133c82838c1Smrg# arranges for $SED and $ECHO to be set by different means. 4134c82838c1Smrgm4_defun([_LT_CC_BASENAME], 4135c82838c1Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 4136c82838c1SmrgAC_REQUIRE([_LT_DECL_SED])dnl 4137c82838c1SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 4138c82838c1Smrgfunc_cc_basename $1 4139c82838c1Smrgcc_basename=$func_cc_basename_result 4140c82838c1Smrg]) 4141c82838c1Smrg 4142c82838c1Smrg 4143c82838c1Smrg# _LT_FILEUTILS_DEFAULTS 4144c82838c1Smrg# ---------------------- 4145c82838c1Smrg# It is okay to use these file commands and assume they have been set 4146c82838c1Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 4147c82838c1Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 4148c82838c1Smrg[: ${CP="cp -f"} 4149c82838c1Smrg: ${MV="mv -f"} 4150c82838c1Smrg: ${RM="rm -f"} 4151c82838c1Smrg])# _LT_FILEUTILS_DEFAULTS 4152c82838c1Smrg 4153c82838c1Smrg 4154c82838c1Smrg# _LT_SETUP 4155c82838c1Smrg# --------- 4156c82838c1Smrgm4_defun([_LT_SETUP], 4157c82838c1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4158c82838c1SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 4159c82838c1SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 4160c82838c1SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 4161c82838c1Smrg 4162c82838c1Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 4163c82838c1Smrgdnl 4164c82838c1Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 4165c82838c1Smrg_LT_DECL([], [host], [0])dnl 4166c82838c1Smrg_LT_DECL([], [host_os], [0])dnl 4167c82838c1Smrgdnl 4168c82838c1Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 4169c82838c1Smrg_LT_DECL([], [build], [0])dnl 4170c82838c1Smrg_LT_DECL([], [build_os], [0])dnl 4171c82838c1Smrgdnl 4172c82838c1SmrgAC_REQUIRE([AC_PROG_CC])dnl 4173c82838c1SmrgAC_REQUIRE([LT_PATH_LD])dnl 4174c82838c1SmrgAC_REQUIRE([LT_PATH_NM])dnl 4175c82838c1Smrgdnl 4176c82838c1SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 4177c82838c1Smrgtest -z "$LN_S" && LN_S="ln -s" 4178c82838c1Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 4179c82838c1Smrgdnl 4180c82838c1SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 4181c82838c1Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 4182c82838c1Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 4183c82838c1Smrgdnl 4184c82838c1Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4185c82838c1Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 4186c82838c1Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 4187c82838c1Smrgm4_require([_LT_CMD_RELOAD])dnl 4188c82838c1Smrgm4_require([_LT_DECL_FILECMD])dnl 4189c82838c1Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 4190c82838c1Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 4191c82838c1Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 4192c82838c1Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4193c82838c1Smrgm4_require([_LT_WITH_SYSROOT])dnl 4194c82838c1Smrgm4_require([_LT_CMD_TRUNCATE])dnl 4195c82838c1Smrg 4196c82838c1Smrg_LT_CONFIG_LIBTOOL_INIT([ 4197c82838c1Smrg# See if we are running on zsh, and set the options that allow our 4198c82838c1Smrg# commands through without removal of \ escapes INIT. 4199c82838c1Smrgif test -n "\${ZSH_VERSION+set}"; then 4200c82838c1Smrg setopt NO_GLOB_SUBST 4201c82838c1Smrgfi 4202c82838c1Smrg]) 4203c82838c1Smrgif test -n "${ZSH_VERSION+set}"; then 4204c82838c1Smrg setopt NO_GLOB_SUBST 4205c82838c1Smrgfi 4206c82838c1Smrg 4207c82838c1Smrg_LT_CHECK_OBJDIR 4208c82838c1Smrg 4209c82838c1Smrgm4_require([_LT_TAG_COMPILER])dnl 4210c82838c1Smrg 4211c82838c1Smrgcase $host_os in 4212c82838c1Smrgaix3*) 4213c82838c1Smrg # AIX sometimes has problems with the GCC collect2 program. For some 4214c82838c1Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 4215c82838c1Smrg # vanish in a puff of smoke. 4216c82838c1Smrg if test set != "${COLLECT_NAMES+set}"; then 4217c82838c1Smrg COLLECT_NAMES= 4218c82838c1Smrg export COLLECT_NAMES 4219c82838c1Smrg fi 4220c82838c1Smrg ;; 4221c82838c1Smrgesac 4222c82838c1Smrg 4223c82838c1Smrg# Global variables: 4224c82838c1Smrgofile=libtool 4225c82838c1Smrgcan_build_shared=yes 4226c82838c1Smrg 4227c82838c1Smrg# All known linkers require a '.a' archive for static linking (except MSVC and 4228c82838c1Smrg# ICC, which need '.lib'). 4229c82838c1Smrglibext=a 4230c82838c1Smrg 4231c82838c1Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 4232c82838c1Smrg 4233c82838c1Smrgold_CC=$CC 4234c82838c1Smrgold_CFLAGS=$CFLAGS 4235c82838c1Smrg 4236c82838c1Smrg# Set sane defaults for various variables 4237c82838c1Smrgtest -z "$CC" && CC=cc 4238c82838c1Smrgtest -z "$LTCC" && LTCC=$CC 4239c82838c1Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 4240c82838c1Smrgtest -z "$LD" && LD=ld 4241c82838c1Smrgtest -z "$ac_objext" && ac_objext=o 4242c82838c1Smrg 4243c82838c1Smrg_LT_CC_BASENAME([$compiler]) 4244c82838c1Smrg 4245c82838c1Smrg# Only perform the check for file, if the check method requires it 4246c82838c1Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 4247c82838c1Smrgcase $deplibs_check_method in 4248c82838c1Smrgfile_magic*) 4249c82838c1Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 4250c82838c1Smrg _LT_PATH_MAGIC 4251c82838c1Smrg fi 4252c82838c1Smrg ;; 4253c82838c1Smrgesac 4254c82838c1Smrg 4255c82838c1Smrg# Use C for the default configuration in the libtool script 4256c82838c1SmrgLT_SUPPORTED_TAG([CC]) 4257c82838c1Smrg_LT_LANG_C_CONFIG 4258c82838c1Smrg_LT_LANG_DEFAULT_CONFIG 4259c82838c1Smrg_LT_CONFIG_COMMANDS 4260c82838c1Smrg])# _LT_SETUP 4261c82838c1Smrg 4262c82838c1Smrg 4263c82838c1Smrg# _LT_PREPARE_SED_QUOTE_VARS 4264c82838c1Smrg# -------------------------- 4265c82838c1Smrg# Define a few sed substitution that help us do robust quoting. 4266c82838c1Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 4267c82838c1Smrg[# Backslashify metacharacters that are still active within 4268c82838c1Smrg# double-quoted strings. 4269c82838c1Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 4270c82838c1Smrg 4271c82838c1Smrg# Same as above, but do not quote variable references. 4272c82838c1Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 4273c82838c1Smrg 4274c82838c1Smrg# Sed substitution to delay expansion of an escaped shell variable in a 4275c82838c1Smrg# double_quote_subst'ed string. 4276c82838c1Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 4277c82838c1Smrg 4278c82838c1Smrg# Sed substitution to delay expansion of an escaped single quote. 4279c82838c1Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 4280c82838c1Smrg 4281c82838c1Smrg# Sed substitution to avoid accidental globbing in evaled expressions 4282c82838c1Smrgno_glob_subst='s/\*/\\\*/g' 4283c82838c1Smrg]) 4284c82838c1Smrg 4285c82838c1Smrg# _LT_PROG_LTMAIN 4286c82838c1Smrg# --------------- 4287c82838c1Smrg# Note that this code is called both from 'configure', and 'config.status' 4288c82838c1Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 4289c82838c1Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 4290c82838c1Smrg# so we pass a copy along to make sure it has a sensible value anyway. 4291c82838c1Smrgm4_defun([_LT_PROG_LTMAIN], 4292c82838c1Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 4293c82838c1Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 4294c82838c1Smrgltmain=$ac_aux_dir/ltmain.sh 4295c82838c1Smrg])# _LT_PROG_LTMAIN 4296c82838c1Smrg 4297c82838c1Smrg 4298c82838c1Smrg 4299c82838c1Smrg# So that we can recreate a full libtool script including additional 4300c82838c1Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 4301c82838c1Smrg# in macros and then make a single call at the end using the 'libtool' 4302c82838c1Smrg# label. 4303c82838c1Smrg 4304c82838c1Smrg 4305c82838c1Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 4306c82838c1Smrg# ---------------------------------------- 4307c82838c1Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 4308c82838c1Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 4309c82838c1Smrg[m4_ifval([$1], 4310c82838c1Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 4311c82838c1Smrg [$1 4312c82838c1Smrg])])]) 4313c82838c1Smrg 4314c82838c1Smrg# Initialize. 4315c82838c1Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 4316c82838c1Smrg 4317c82838c1Smrg 4318c82838c1Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 4319c82838c1Smrg# ------------------------------ 4320c82838c1Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 4321c82838c1Smrgm4_define([_LT_CONFIG_LIBTOOL], 4322c82838c1Smrg[m4_ifval([$1], 4323c82838c1Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 4324c82838c1Smrg [$1 4325c82838c1Smrg])])]) 4326c82838c1Smrg 4327c82838c1Smrg# Initialize. 4328c82838c1Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 4329c82838c1Smrg 4330c82838c1Smrg 4331c82838c1Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 4332c82838c1Smrg# ----------------------------------------------------- 4333c82838c1Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 4334c82838c1Smrg[_LT_CONFIG_LIBTOOL([$1]) 4335c82838c1Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 4336c82838c1Smrg]) 4337c82838c1Smrg 4338c82838c1Smrg 4339c82838c1Smrg# _LT_FORMAT_COMMENT([COMMENT]) 4340c82838c1Smrg# ----------------------------- 4341c82838c1Smrg# Add leading comment marks to the start of each line, and a trailing 4342c82838c1Smrg# full-stop to the whole comment if one is not present already. 4343c82838c1Smrgm4_define([_LT_FORMAT_COMMENT], 4344c82838c1Smrg[m4_ifval([$1], [ 4345c82838c1Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 4346c82838c1Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 4347c82838c1Smrg)]) 4348c82838c1Smrg 4349c82838c1Smrg 4350c82838c1Smrg 4351c82838c1Smrg 4352c82838c1Smrg 4353c82838c1Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 4354c82838c1Smrg# ------------------------------------------------------------------- 4355c82838c1Smrg# CONFIGNAME is the name given to the value in the libtool script. 4356c82838c1Smrg# VARNAME is the (base) name used in the configure script. 4357c82838c1Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 4358c82838c1Smrg# VARNAME. Any other value will be used directly. 4359c82838c1Smrgm4_define([_LT_DECL], 4360c82838c1Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 4361c82838c1Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 4362c82838c1Smrg [m4_ifval([$1], [$1], [$2])]) 4363c82838c1Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 4364c82838c1Smrg m4_ifval([$4], 4365c82838c1Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 4366c82838c1Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 4367c82838c1Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 4368c82838c1Smrg]) 4369c82838c1Smrg 4370c82838c1Smrg 4371c82838c1Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 4372c82838c1Smrg# -------------------------------------------------------- 4373c82838c1Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 4374c82838c1Smrg 4375c82838c1Smrg 4376c82838c1Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 4377c82838c1Smrg# ------------------------------------------------ 4378c82838c1Smrgm4_define([lt_decl_tag_varnames], 4379c82838c1Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 4380c82838c1Smrg 4381c82838c1Smrg 4382c82838c1Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 4383c82838c1Smrg# --------------------------------------------------------- 4384c82838c1Smrgm4_define([_lt_decl_filter], 4385c82838c1Smrg[m4_case([$#], 4386c82838c1Smrg [0], [m4_fatal([$0: too few arguments: $#])], 4387c82838c1Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 4388c82838c1Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 4389c82838c1Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 4390c82838c1Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 4391c82838c1Smrg]) 4392c82838c1Smrg 4393c82838c1Smrg 4394c82838c1Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 4395c82838c1Smrg# -------------------------------------------------- 4396c82838c1Smrgm4_define([lt_decl_quote_varnames], 4397c82838c1Smrg[_lt_decl_filter([value], [1], $@)]) 4398c82838c1Smrg 4399c82838c1Smrg 4400c82838c1Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4401c82838c1Smrg# --------------------------------------------------- 4402c82838c1Smrgm4_define([lt_decl_dquote_varnames], 4403c82838c1Smrg[_lt_decl_filter([value], [2], $@)]) 4404c82838c1Smrg 4405c82838c1Smrg 4406c82838c1Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4407c82838c1Smrg# --------------------------------------------------- 4408c82838c1Smrgm4_define([lt_decl_varnames_tagged], 4409c82838c1Smrg[m4_assert([$# <= 2])dnl 4410c82838c1Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 4411c82838c1Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4412c82838c1Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4413c82838c1Smrgm4_define([_lt_decl_varnames_tagged], 4414c82838c1Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4415c82838c1Smrg 4416c82838c1Smrg 4417c82838c1Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4418c82838c1Smrg# ------------------------------------------------ 4419c82838c1Smrgm4_define([lt_decl_all_varnames], 4420c82838c1Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4421c82838c1Smrg m4_if([$2], [], 4422c82838c1Smrg m4_quote(lt_decl_varnames), 4423c82838c1Smrg m4_quote(m4_shift($@))))[]dnl 4424c82838c1Smrg]) 4425c82838c1Smrgm4_define([_lt_decl_all_varnames], 4426c82838c1Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 4427c82838c1Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4428c82838c1Smrg]) 4429c82838c1Smrg 4430c82838c1Smrg 4431c82838c1Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4432c82838c1Smrg# ------------------------------------ 4433c82838c1Smrg# Quote a variable value, and forward it to 'config.status' so that its 4434c82838c1Smrg# declaration there will have the same value as in 'configure'. VARNAME 4435c82838c1Smrg# must have a single quote delimited value for this to work. 4436c82838c1Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4437c82838c1Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 4438c82838c1Smrg 4439c82838c1Smrg 4440c82838c1Smrg# _LT_CONFIG_STATUS_DECLARATIONS 4441c82838c1Smrg# ------------------------------ 4442c82838c1Smrg# We delimit libtool config variables with single quotes, so when 4443c82838c1Smrg# we write them to config.status, we have to be sure to quote all 4444c82838c1Smrg# embedded single quotes properly. In configure, this macro expands 4445c82838c1Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4446c82838c1Smrg# 4447c82838c1Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4448c82838c1Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4449c82838c1Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4450c82838c1Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4451c82838c1Smrg 4452c82838c1Smrg 4453c82838c1Smrg# _LT_LIBTOOL_TAGS 4454c82838c1Smrg# ---------------- 4455c82838c1Smrg# Output comment and list of tags supported by the script 4456c82838c1Smrgm4_defun([_LT_LIBTOOL_TAGS], 4457c82838c1Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4458c82838c1Smrgavailable_tags='_LT_TAGS'dnl 4459c82838c1Smrg]) 4460c82838c1Smrg 4461c82838c1Smrg 4462c82838c1Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4463c82838c1Smrg# ----------------------------------- 4464c82838c1Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4465c82838c1Smrg# expand to a commented shell variable setting: 4466c82838c1Smrg# 4467c82838c1Smrg# # Some comment about what VAR is for. 4468c82838c1Smrg# visible_name=$lt_internal_name 4469c82838c1Smrgm4_define([_LT_LIBTOOL_DECLARE], 4470c82838c1Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4471c82838c1Smrg [description])))[]dnl 4472c82838c1Smrgm4_pushdef([_libtool_name], 4473c82838c1Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4474c82838c1Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4475c82838c1Smrg [0], [_libtool_name=[$]$1], 4476c82838c1Smrg [1], [_libtool_name=$lt_[]$1], 4477c82838c1Smrg [2], [_libtool_name=$lt_[]$1], 4478c82838c1Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4479c82838c1Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4480c82838c1Smrg]) 4481c82838c1Smrg 4482c82838c1Smrg 4483c82838c1Smrg# _LT_LIBTOOL_CONFIG_VARS 4484c82838c1Smrg# ----------------------- 4485c82838c1Smrg# Produce commented declarations of non-tagged libtool config variables 4486c82838c1Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 4487c82838c1Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4488c82838c1Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4489c82838c1Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4490c82838c1Smrg[m4_foreach([_lt_var], 4491c82838c1Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4492c82838c1Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 4493c82838c1Smrg 4494c82838c1Smrg 4495c82838c1Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 4496c82838c1Smrg# ------------------------- 4497c82838c1Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 4498c82838c1Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 4499c82838c1Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 4500c82838c1Smrg 4501c82838c1Smrg 4502c82838c1Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 4503c82838c1Smrg# ------------------------------ 4504c82838c1Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 4505c82838c1Smrg 4506c82838c1Smrg 4507c82838c1Smrg# _LT_CONFIG_COMMANDS 4508c82838c1Smrg# ------------------- 4509c82838c1Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 4510c82838c1Smrg# variables for single and double quote escaping we saved from calls 4511c82838c1Smrg# to _LT_DECL, we can put quote escaped variables declarations 4512c82838c1Smrg# into 'config.status', and then the shell code to quote escape them in 4513c82838c1Smrg# for loops in 'config.status'. Finally, any additional code accumulated 4514c82838c1Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 4515c82838c1Smrgm4_defun([_LT_CONFIG_COMMANDS], 4516c82838c1Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 4517c82838c1Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 4518c82838c1Smrg dnl instead of duplicating it all over again into config.status, 4519c82838c1Smrg dnl then we will have config.status run $CONFIG_LT later, so it 4520c82838c1Smrg dnl needs to know what name is stored there: 4521c82838c1Smrg [AC_CONFIG_COMMANDS([libtool], 4522c82838c1Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 4523c82838c1Smrg dnl If the libtool generation code is destined for config.status, 4524c82838c1Smrg dnl expand the accumulated commands and init code now: 4525c82838c1Smrg [AC_CONFIG_COMMANDS([libtool], 4526c82838c1Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 4527c82838c1Smrg])#_LT_CONFIG_COMMANDS 4528c82838c1Smrg 4529c82838c1Smrg 4530c82838c1Smrg# Initialize. 4531c82838c1Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 4532c82838c1Smrg[ 4533c82838c1Smrg 4534c82838c1Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 4535c82838c1Smrg# if CDPATH is set. 4536c82838c1Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4537c82838c1Smrg 4538c82838c1Smrgsed_quote_subst='$sed_quote_subst' 4539c82838c1Smrgdouble_quote_subst='$double_quote_subst' 4540c82838c1Smrgdelay_variable_subst='$delay_variable_subst' 4541c82838c1Smrg_LT_CONFIG_STATUS_DECLARATIONS 4542c82838c1SmrgLTCC='$LTCC' 4543c82838c1SmrgLTCFLAGS='$LTCFLAGS' 4544c82838c1Smrgcompiler='$compiler_DEFAULT' 4545c82838c1Smrg 4546c82838c1Smrg# A function that is used when there is no print builtin or printf. 4547c82838c1Smrgfunc_fallback_echo () 4548c82838c1Smrg{ 4549c82838c1Smrg eval 'cat <<_LTECHO_EOF 4550c82838c1Smrg\$[]1 4551c82838c1Smrg_LTECHO_EOF' 4552c82838c1Smrg} 4553c82838c1Smrg 4554c82838c1Smrg# Quote evaled strings. 4555c82838c1Smrgfor var in lt_decl_all_varnames([[ \ 4556c82838c1Smrg]], lt_decl_quote_varnames); do 4557c82838c1Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 4558c82838c1Smrg *[[\\\\\\\`\\"\\\$]]*) 4559c82838c1Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 4560c82838c1Smrg ;; 4561c82838c1Smrg *) 4562c82838c1Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 4563c82838c1Smrg ;; 4564c82838c1Smrg esac 4565c82838c1Smrgdone 4566c82838c1Smrg 4567c82838c1Smrg# Double-quote double-evaled strings. 4568c82838c1Smrgfor var in lt_decl_all_varnames([[ \ 4569c82838c1Smrg]], lt_decl_dquote_varnames); do 4570c82838c1Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 4571c82838c1Smrg *[[\\\\\\\`\\"\\\$]]*) 4572c82838c1Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 4573c82838c1Smrg ;; 4574c82838c1Smrg *) 4575c82838c1Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 4576c82838c1Smrg ;; 4577c82838c1Smrg esac 4578c82838c1Smrgdone 4579c82838c1Smrg 4580c82838c1Smrg_LT_OUTPUT_LIBTOOL_INIT 4581c82838c1Smrg]) 4582c82838c1Smrg 4583c82838c1Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 4584c82838c1Smrg# ------------------------------------ 4585c82838c1Smrg# Generate a child script FILE with all initialization necessary to 4586c82838c1Smrg# reuse the environment learned by the parent script, and make the 4587c82838c1Smrg# file executable. If COMMENT is supplied, it is inserted after the 4588c82838c1Smrg# '#!' sequence but before initialization text begins. After this 4589c82838c1Smrg# macro, additional text can be appended to FILE to form the body of 4590c82838c1Smrg# the child script. The macro ends with non-zero status if the 4591c82838c1Smrg# file could not be fully written (such as if the disk is full). 4592c82838c1Smrgm4_ifdef([AS_INIT_GENERATED], 4593c82838c1Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 4594c82838c1Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 4595c82838c1Smrg[m4_require([AS_PREPARE])]dnl 4596c82838c1Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 4597c82838c1Smrg[lt_write_fail=0 4598c82838c1Smrgcat >$1 <<_ASEOF || lt_write_fail=1 4599c82838c1Smrg#! $SHELL 4600c82838c1Smrg# Generated by $as_me. 4601c82838c1Smrg$2 4602c82838c1SmrgSHELL=\${CONFIG_SHELL-$SHELL} 4603c82838c1Smrgexport SHELL 4604c82838c1Smrg_ASEOF 4605c82838c1Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 4606c82838c1SmrgAS_SHELL_SANITIZE 4607c82838c1Smrg_AS_PREPARE 4608c82838c1Smrgexec AS_MESSAGE_FD>&1 4609c82838c1Smrg_ASEOF 4610c82838c1Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 4611c82838c1Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 4612c82838c1Smrg 4613c82838c1Smrg# LT_OUTPUT 4614c82838c1Smrg# --------- 4615c82838c1Smrg# This macro allows early generation of the libtool script (before 4616c82838c1Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 4617c82838c1Smrg# tests. 4618c82838c1SmrgAC_DEFUN([LT_OUTPUT], 4619c82838c1Smrg[: ${CONFIG_LT=./config.lt} 4620c82838c1SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 4621c82838c1Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 4622c82838c1Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 4623c82838c1Smrg 4624c82838c1Smrgcat >>"$CONFIG_LT" <<\_LTEOF 4625c82838c1Smrglt_cl_silent=false 4626c82838c1Smrgexec AS_MESSAGE_LOG_FD>>config.log 4627c82838c1Smrg{ 4628c82838c1Smrg echo 4629c82838c1Smrg AS_BOX([Running $as_me.]) 4630c82838c1Smrg} >&AS_MESSAGE_LOG_FD 4631c82838c1Smrg 4632c82838c1Smrglt_cl_help="\ 4633c82838c1Smrg'$as_me' creates a local libtool stub from the current configuration, 4634c82838c1Smrgfor use in further configure time tests before the real libtool is 4635c82838c1Smrggenerated. 4636c82838c1Smrg 4637c82838c1SmrgUsage: $[0] [[OPTIONS]] 4638c82838c1Smrg 4639c82838c1Smrg -h, --help print this help, then exit 4640c82838c1Smrg -V, --version print version number, then exit 4641c82838c1Smrg -q, --quiet do not print progress messages 4642c82838c1Smrg -d, --debug don't remove temporary files 4643c82838c1Smrg 4644c82838c1SmrgReport bugs to <bug-libtool@gnu.org>." 4645c82838c1Smrg 4646c82838c1Smrglt_cl_version="\ 4647c82838c1Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 4648c82838c1Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 4649c82838c1Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 4650c82838c1Smrg 4651c82838c1SmrgCopyright (C) 2011 Free Software Foundation, Inc. 4652c82838c1SmrgThis config.lt script is free software; the Free Software Foundation 4653c82838c1Smrggives unlimited permision to copy, distribute and modify it." 4654c82838c1Smrg 4655c82838c1Smrgwhile test 0 != $[#] 4656c82838c1Smrgdo 4657c82838c1Smrg case $[1] in 4658c82838c1Smrg --version | --v* | -V ) 4659c82838c1Smrg echo "$lt_cl_version"; exit 0 ;; 4660c82838c1Smrg --help | --h* | -h ) 4661c82838c1Smrg echo "$lt_cl_help"; exit 0 ;; 4662c82838c1Smrg --debug | --d* | -d ) 4663c82838c1Smrg debug=: ;; 4664c82838c1Smrg --quiet | --q* | --silent | --s* | -q ) 4665c82838c1Smrg lt_cl_silent=: ;; 4666c82838c1Smrg 4667c82838c1Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 4668c82838c1SmrgTry '$[0] --help' for more information.]) ;; 4669c82838c1Smrg 4670c82838c1Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 4671c82838c1SmrgTry '$[0] --help' for more information.]) ;; 4672c82838c1Smrg esac 4673c82838c1Smrg shift 4674c82838c1Smrgdone 4675c82838c1Smrg 4676c82838c1Smrgif $lt_cl_silent; then 4677c82838c1Smrg exec AS_MESSAGE_FD>/dev/null 4678c82838c1Smrgfi 4679c82838c1Smrg_LTEOF 4680c82838c1Smrg 4681c82838c1Smrgcat >>"$CONFIG_LT" <<_LTEOF 4682c82838c1Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 4683c82838c1Smrg_LTEOF 4684c82838c1Smrg 4685c82838c1Smrgcat >>"$CONFIG_LT" <<\_LTEOF 4686c82838c1SmrgAC_MSG_NOTICE([creating $ofile]) 4687c82838c1Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 4688c82838c1SmrgAS_EXIT(0) 4689c82838c1Smrg_LTEOF 4690c82838c1Smrgchmod +x "$CONFIG_LT" 4691c82838c1Smrg 4692c82838c1Smrg# configure is writing to config.log, but config.lt does its own redirection, 4693c82838c1Smrg# appending to config.log, which fails on DOS, as config.log is still kept 4694c82838c1Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 4695c82838c1Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 4696c82838c1Smrglt_cl_success=: 4697c82838c1Smrgtest yes = "$silent" && 4698c82838c1Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 4699c82838c1Smrgexec AS_MESSAGE_LOG_FD>/dev/null 4700c82838c1Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 4701c82838c1Smrgexec AS_MESSAGE_LOG_FD>>config.log 4702c82838c1Smrg$lt_cl_success || AS_EXIT(1) 4703c82838c1Smrg])# LT_OUTPUT 4704c82838c1Smrg 4705c82838c1Smrg 4706c82838c1Smrg# _LT_CONFIG(TAG) 4707c82838c1Smrg# --------------- 4708c82838c1Smrg# If TAG is the built-in tag, create an initial libtool script with a 4709c82838c1Smrg# default configuration from the untagged config vars. Otherwise add code 4710c82838c1Smrg# to config.status for appending the configuration named by TAG from the 4711c82838c1Smrg# matching tagged config vars. 4712c82838c1Smrgm4_defun([_LT_CONFIG], 4713c82838c1Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4714c82838c1Smrg_LT_CONFIG_SAVE_COMMANDS([ 4715c82838c1Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 4716c82838c1Smrg m4_if(_LT_TAG, [C], [ 4717c82838c1Smrg # See if we are running on zsh, and set the options that allow our 4718c82838c1Smrg # commands through without removal of \ escapes. 4719c82838c1Smrg if test -n "${ZSH_VERSION+set}"; then 4720c82838c1Smrg setopt NO_GLOB_SUBST 4721c82838c1Smrg fi 4722c82838c1Smrg 4723c82838c1Smrg cfgfile=${ofile}T 4724c82838c1Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 4725c82838c1Smrg $RM "$cfgfile" 4726c82838c1Smrg 4727c82838c1Smrg cat <<_LT_EOF >> "$cfgfile" 4728c82838c1Smrg#! $SHELL 4729c82838c1Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 4730c82838c1Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4731c82838c1Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4732c82838c1Smrg 4733c82838c1Smrg# Provide generalized library-building support services. 4734c82838c1Smrg# Written by Gordon Matzigkeit, 1996 4735c82838c1Smrg 4736c82838c1Smrg_LT_COPYING 4737c82838c1Smrg_LT_LIBTOOL_TAGS 4738c82838c1Smrg 4739c82838c1Smrg# Configured defaults for sys_lib_dlsearch_path munging. 4740c82838c1Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 4741c82838c1Smrg 4742c82838c1Smrg# ### BEGIN LIBTOOL CONFIG 4743c82838c1Smrg_LT_LIBTOOL_CONFIG_VARS 4744c82838c1Smrg_LT_LIBTOOL_TAG_VARS 4745c82838c1Smrg# ### END LIBTOOL CONFIG 4746c82838c1Smrg 4747c82838c1Smrg_LT_EOF 4748c82838c1Smrg 4749c82838c1Smrg cat <<'_LT_EOF' >> "$cfgfile" 4750c82838c1Smrg 4751c82838c1Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 4752c82838c1Smrg 4753c82838c1Smrg_LT_PREPARE_MUNGE_PATH_LIST 4754c82838c1Smrg_LT_PREPARE_CC_BASENAME 4755c82838c1Smrg 4756c82838c1Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 4757c82838c1Smrg 4758c82838c1Smrg_LT_EOF 4759c82838c1Smrg 4760c82838c1Smrg case $host_os in 4761c82838c1Smrg aix3*) 4762c82838c1Smrg cat <<\_LT_EOF >> "$cfgfile" 4763c82838c1Smrg# AIX sometimes has problems with the GCC collect2 program. For some 4764c82838c1Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4765c82838c1Smrg# vanish in a puff of smoke. 4766c82838c1Smrgif test set != "${COLLECT_NAMES+set}"; then 4767c82838c1Smrg COLLECT_NAMES= 4768c82838c1Smrg export COLLECT_NAMES 4769c82838c1Smrgfi 4770c82838c1Smrg_LT_EOF 4771c82838c1Smrg ;; 4772c82838c1Smrg esac 4773c82838c1Smrg 4774c82838c1Smrg _LT_PROG_LTMAIN 4775c82838c1Smrg 4776c82838c1Smrg # We use sed instead of cat because bash on DJGPP gets confused if 4777c82838c1Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4778c82838c1Smrg # text mode, it properly converts lines to CR/LF. This bash problem 4779c82838c1Smrg # is reportedly fixed, but why not run on old versions too? 4780c82838c1Smrg $SED '$q' "$ltmain" >> "$cfgfile" \ 4781c82838c1Smrg || (rm -f "$cfgfile"; exit 1) 4782c82838c1Smrg 4783c82838c1Smrg mv -f "$cfgfile" "$ofile" || 4784c82838c1Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4785c82838c1Smrg chmod +x "$ofile" 4786c82838c1Smrg], 4787c82838c1Smrg[cat <<_LT_EOF >> "$ofile" 4788c82838c1Smrg 4789c82838c1Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 4790c82838c1Smrgdnl in a comment (ie after a #). 4791c82838c1Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 4792c82838c1Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 4793c82838c1Smrg# ### END LIBTOOL TAG CONFIG: $1 4794c82838c1Smrg_LT_EOF 4795c82838c1Smrg])dnl /m4_if 4796c82838c1Smrg], 4797c82838c1Smrg[m4_if([$1], [], [ 4798c82838c1Smrg PACKAGE='$PACKAGE' 4799c82838c1Smrg VERSION='$VERSION' 4800c82838c1Smrg RM='$RM' 4801c82838c1Smrg ofile='$ofile'], []) 4802c82838c1Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 4803c82838c1Smrg])# _LT_CONFIG 4804c82838c1Smrg 4805c82838c1Smrg 4806c82838c1Smrg# LT_SUPPORTED_TAG(TAG) 4807c82838c1Smrg# --------------------- 4808c82838c1Smrg# Trace this macro to discover what tags are supported by the libtool 4809c82838c1Smrg# --tag option, using: 4810c82838c1Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 4811c82838c1SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 4812c82838c1Smrg 4813c82838c1Smrg 4814c82838c1Smrg# C support is built-in for now 4815c82838c1Smrgm4_define([_LT_LANG_C_enabled], []) 4816c82838c1Smrgm4_define([_LT_TAGS], []) 4817c82838c1Smrg 4818c82838c1Smrg 4819c82838c1Smrg# LT_LANG(LANG) 4820c82838c1Smrg# ------------- 4821c82838c1Smrg# Enable libtool support for the given language if not already enabled. 4822c82838c1SmrgAC_DEFUN([LT_LANG], 4823c82838c1Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 4824c82838c1Smrgm4_case([$1], 4825c82838c1Smrg [C], [_LT_LANG(C)], 4826c82838c1Smrg [C++], [_LT_LANG(CXX)], 4827c82838c1Smrg [Go], [_LT_LANG(GO)], 4828c82838c1Smrg [Java], [_LT_LANG(GCJ)], 4829c82838c1Smrg [Fortran 77], [_LT_LANG(F77)], 4830c82838c1Smrg [Fortran], [_LT_LANG(FC)], 4831c82838c1Smrg [Windows Resource], [_LT_LANG(RC)], 4832c82838c1Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 4833c82838c1Smrg [_LT_LANG($1)], 4834c82838c1Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 4835c82838c1Smrg])# LT_LANG 4836c82838c1Smrg 4837c82838c1Smrg 4838c82838c1Smrg# _LT_LANG(LANGNAME) 4839c82838c1Smrg# ------------------ 4840c82838c1Smrgm4_defun([_LT_LANG], 4841c82838c1Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 4842c82838c1Smrg [LT_SUPPORTED_TAG([$1])dnl 4843c82838c1Smrg m4_append([_LT_TAGS], [$1 ])dnl 4844c82838c1Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 4845c82838c1Smrg _LT_LANG_$1_CONFIG($1)])dnl 4846c82838c1Smrg])# _LT_LANG 4847c82838c1Smrg 4848c82838c1Smrg 4849c82838c1Smrgm4_ifndef([AC_PROG_GO], [ 4850c82838c1Smrg# NOTE: This macro has been submitted for inclusion into # 4851c82838c1Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 4852c82838c1Smrg# a released version of Autoconf we should remove this # 4853c82838c1Smrg# macro and use it instead. # 4854c82838c1Smrgm4_defun([AC_PROG_GO], 4855c82838c1Smrg[AC_LANG_PUSH(Go)dnl 4856c82838c1SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 4857c82838c1SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 4858c82838c1Smrg_AC_ARG_VAR_LDFLAGS()dnl 4859c82838c1SmrgAC_CHECK_TOOL(GOC, gccgo) 4860c82838c1Smrgif test -z "$GOC"; then 4861c82838c1Smrg if test -n "$ac_tool_prefix"; then 4862c82838c1Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 4863c82838c1Smrg fi 4864c82838c1Smrgfi 4865c82838c1Smrgif test -z "$GOC"; then 4866c82838c1Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 4867c82838c1Smrgfi 4868c82838c1Smrg])#m4_defun 4869c82838c1Smrg])#m4_ifndef 4870c82838c1Smrg 4871c82838c1Smrg 4872c82838c1Smrg# _LT_LANG_DEFAULT_CONFIG 4873c82838c1Smrg# ----------------------- 4874c82838c1Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 4875c82838c1Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 4876c82838c1Smrg [LT_LANG(CXX)], 4877c82838c1Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 4878c82838c1Smrg 4879c82838c1SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 4880c82838c1Smrg [LT_LANG(F77)], 4881c82838c1Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 4882c82838c1Smrg 4883c82838c1SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 4884c82838c1Smrg [LT_LANG(FC)], 4885c82838c1Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 4886c82838c1Smrg 4887c82838c1Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 4888c82838c1Smrgdnl pulling things in needlessly. 4889c82838c1SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 4890c82838c1Smrg [LT_LANG(GCJ)], 4891c82838c1Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 4892c82838c1Smrg [LT_LANG(GCJ)], 4893c82838c1Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 4894c82838c1Smrg [LT_LANG(GCJ)], 4895c82838c1Smrg [m4_ifdef([AC_PROG_GCJ], 4896c82838c1Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 4897c82838c1Smrg m4_ifdef([A][M_PROG_GCJ], 4898c82838c1Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 4899c82838c1Smrg m4_ifdef([LT_PROG_GCJ], 4900c82838c1Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 4901c82838c1Smrg 4902c82838c1SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 4903c82838c1Smrg [LT_LANG(GO)], 4904c82838c1Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 4905c82838c1Smrg 4906c82838c1SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 4907c82838c1Smrg [LT_LANG(RC)], 4908c82838c1Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 4909c82838c1Smrg])# _LT_LANG_DEFAULT_CONFIG 4910c82838c1Smrg 4911c82838c1Smrg# Obsolete macros: 4912c82838c1SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 4913c82838c1SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 4914c82838c1SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 4915c82838c1SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 4916c82838c1SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 4917c82838c1Smrgdnl aclocal-1.4 backwards compatibility: 4918c82838c1Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 4919c82838c1Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 4920c82838c1Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 4921c82838c1Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 4922c82838c1Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 4923c82838c1Smrg 4924c82838c1Smrg 4925c82838c1Smrg# _LT_TAG_COMPILER 4926c82838c1Smrg# ---------------- 4927c82838c1Smrgm4_defun([_LT_TAG_COMPILER], 4928c82838c1Smrg[AC_REQUIRE([AC_PROG_CC])dnl 4929c82838c1Smrg 4930c82838c1Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 4931c82838c1Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 4932c82838c1Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 4933c82838c1Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 4934c82838c1Smrg 4935c82838c1Smrg# If no C compiler was specified, use CC. 4936c82838c1SmrgLTCC=${LTCC-"$CC"} 4937c82838c1Smrg 4938c82838c1Smrg# If no C compiler flags were specified, use CFLAGS. 4939c82838c1SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 4940c82838c1Smrg 4941c82838c1Smrg# Allow CC to be a program name with arguments. 4942c82838c1Smrgcompiler=$CC 4943c82838c1Smrg])# _LT_TAG_COMPILER 4944c82838c1Smrg 4945c82838c1Smrg 4946c82838c1Smrg# _LT_COMPILER_BOILERPLATE 4947c82838c1Smrg# ------------------------ 4948c82838c1Smrg# Check for compiler boilerplate output or warnings with 4949c82838c1Smrg# the simple compiler test code. 4950c82838c1Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 4951c82838c1Smrg[m4_require([_LT_DECL_SED])dnl 4952c82838c1Smrgac_outfile=conftest.$ac_objext 4953c82838c1Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 4954c82838c1Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4955c82838c1Smrg_lt_compiler_boilerplate=`cat conftest.err` 4956c82838c1Smrg$RM conftest* 4957c82838c1Smrg])# _LT_COMPILER_BOILERPLATE 4958c82838c1Smrg 4959c82838c1Smrg 4960c82838c1Smrg# _LT_LINKER_BOILERPLATE 4961c82838c1Smrg# ---------------------- 4962c82838c1Smrg# Check for linker boilerplate output or warnings with 4963c82838c1Smrg# the simple link test code. 4964c82838c1Smrgm4_defun([_LT_LINKER_BOILERPLATE], 4965c82838c1Smrg[m4_require([_LT_DECL_SED])dnl 4966c82838c1Smrgac_outfile=conftest.$ac_objext 4967c82838c1Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 4968c82838c1Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4969c82838c1Smrg_lt_linker_boilerplate=`cat conftest.err` 4970c82838c1Smrg$RM -r conftest* 4971c82838c1Smrg])# _LT_LINKER_BOILERPLATE 4972c82838c1Smrg 4973c82838c1Smrg# _LT_REQUIRED_DARWIN_CHECKS 4974c82838c1Smrg# ------------------------- 4975c82838c1Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 4976c82838c1Smrg case $host_os in 4977c82838c1Smrg rhapsody* | darwin*) 4978c82838c1Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 4979c82838c1Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 4980c82838c1Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 4981c82838c1Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 4982c82838c1Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 4983c82838c1Smrg _LT_DECL([], [DSYMUTIL], [1], 4984c82838c1Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 4985c82838c1Smrg _LT_DECL([], [NMEDIT], [1], 4986c82838c1Smrg [Tool to change global to local symbols on Mac OS X]) 4987c82838c1Smrg _LT_DECL([], [LIPO], [1], 4988c82838c1Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 4989c82838c1Smrg _LT_DECL([], [OTOOL], [1], 4990c82838c1Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 4991c82838c1Smrg _LT_DECL([], [OTOOL64], [1], 4992c82838c1Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 4993c82838c1Smrg 4994c82838c1Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 4995c82838c1Smrg [lt_cv_apple_cc_single_mod=no 4996c82838c1Smrg if test -z "$LT_MULTI_MODULE"; then 4997c82838c1Smrg # By default we will add the -single_module flag. You can override 4998c82838c1Smrg # by either setting the environment variable LT_MULTI_MODULE 4999c82838c1Smrg # non-empty at configure time, or by adding -multi_module to the 5000c82838c1Smrg # link flags. 5001c82838c1Smrg rm -rf libconftest.dylib* 5002c82838c1Smrg echo "int foo(void){return 1;}" > conftest.c 5003c82838c1Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 5004c82838c1Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 5005c82838c1Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 5006c82838c1Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 5007c82838c1Smrg _lt_result=$? 5008c82838c1Smrg # If there is a non-empty error log, and "single_module" 5009c82838c1Smrg # appears in it, assume the flag caused a linker warning 5010c82838c1Smrg if test -s conftest.err && $GREP single_module conftest.err; then 5011c82838c1Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5012c82838c1Smrg # Otherwise, if the output was created with a 0 exit code from 5013c82838c1Smrg # the compiler, it worked. 5014c82838c1Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 5015c82838c1Smrg lt_cv_apple_cc_single_mod=yes 5016c82838c1Smrg else 5017c82838c1Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5018c82838c1Smrg fi 5019c82838c1Smrg rm -rf libconftest.dylib* 5020c82838c1Smrg rm -f conftest.* 5021c82838c1Smrg fi]) 5022c82838c1Smrg 5023c82838c1Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 5024c82838c1Smrg [lt_cv_ld_exported_symbols_list], 5025c82838c1Smrg [lt_cv_ld_exported_symbols_list=no 5026c82838c1Smrg save_LDFLAGS=$LDFLAGS 5027c82838c1Smrg echo "_main" > conftest.sym 5028c82838c1Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 5029c82838c1Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 5030c82838c1Smrg [lt_cv_ld_exported_symbols_list=yes], 5031c82838c1Smrg [lt_cv_ld_exported_symbols_list=no]) 5032c82838c1Smrg LDFLAGS=$save_LDFLAGS 5033c82838c1Smrg ]) 5034c82838c1Smrg 5035c82838c1Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 5036c82838c1Smrg [lt_cv_ld_force_load=no 5037c82838c1Smrg cat > conftest.c << _LT_EOF 5038c82838c1Smrgint forced_loaded() { return 2;} 5039c82838c1Smrg_LT_EOF 5040c82838c1Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 5041c82838c1Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 5042c82838c1Smrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 5043c82838c1Smrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 5044c82838c1Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 5045c82838c1Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 5046c82838c1Smrg cat > conftest.c << _LT_EOF 5047c82838c1Smrgint main() { return 0;} 5048c82838c1Smrg_LT_EOF 5049c82838c1Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 5050c82838c1Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 5051c82838c1Smrg _lt_result=$? 5052c82838c1Smrg if test -s conftest.err && $GREP force_load conftest.err; then 5053c82838c1Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5054c82838c1Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 5055c82838c1Smrg lt_cv_ld_force_load=yes 5056c82838c1Smrg else 5057c82838c1Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5058c82838c1Smrg fi 5059c82838c1Smrg rm -f conftest.err libconftest.a conftest conftest.c 5060c82838c1Smrg rm -rf conftest.dSYM 5061c82838c1Smrg ]) 5062c82838c1Smrg case $host_os in 5063c82838c1Smrg rhapsody* | darwin1.[[012]]) 5064c82838c1Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 5065c82838c1Smrg darwin1.*) 5066c82838c1Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 5067c82838c1Smrg darwin*) 5068c82838c1Smrg case $MACOSX_DEPLOYMENT_TARGET,$host in 5069c82838c1Smrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 5070c82838c1Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 5071c82838c1Smrg *) 5072c82838c1Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 5073c82838c1Smrg esac 5074c82838c1Smrg ;; 5075c82838c1Smrg esac 5076c82838c1Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 5077c82838c1Smrg _lt_dar_single_mod='$single_module' 5078c82838c1Smrg fi 5079c82838c1Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 5080c82838c1Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 5081c82838c1Smrg else 5082c82838c1Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 5083c82838c1Smrg fi 5084c82838c1Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 5085c82838c1Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 5086c82838c1Smrg else 5087c82838c1Smrg _lt_dsymutil= 5088c82838c1Smrg fi 5089c82838c1Smrg ;; 5090c82838c1Smrg esac 5091c82838c1Smrg]) 5092c82838c1Smrg 5093c82838c1Smrg 5094c82838c1Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 5095c82838c1Smrg# --------------------------------- 5096c82838c1Smrg# Checks for linker and compiler features on darwin 5097c82838c1Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 5098c82838c1Smrg[ 5099c82838c1Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 5100c82838c1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5101c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5102c82838c1Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 5103c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5104c82838c1Smrg if test yes = "$lt_cv_ld_force_load"; then 5105c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' 5106c82838c1Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 5107c82838c1Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 5108c82838c1Smrg else 5109c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 5110c82838c1Smrg fi 5111c82838c1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5112c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 5113c82838c1Smrg case $cc_basename in 5114c82838c1Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 5115c82838c1Smrg *) _lt_dar_can_shared=$GCC ;; 5116c82838c1Smrg esac 5117c82838c1Smrg if test yes = "$_lt_dar_can_shared"; then 5118c82838c1Smrg output_verbose_link_cmd=func_echo_all 5119c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" 5120c82838c1Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 5121c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" 5122c82838c1Smrg _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" 5123c82838c1Smrg m4_if([$1], [CXX], 5124c82838c1Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 5125c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" 5126c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" 5127c82838c1Smrg fi 5128c82838c1Smrg],[]) 5129c82838c1Smrg else 5130c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5131c82838c1Smrg fi 5132c82838c1Smrg]) 5133c82838c1Smrg 5134c82838c1Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 5135c82838c1Smrg# ---------------------------------- 5136c82838c1Smrg# Links a minimal program and checks the executable 5137c82838c1Smrg# for the system default hardcoded library path. In most cases, 5138c82838c1Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 5139c82838c1Smrg# the location of the communication and MPI libs are included too. 5140c82838c1Smrg# If we don't find anything, use the default library path according 5141c82838c1Smrg# to the aix ld manual. 5142c82838c1Smrg# Store the results from the different compilers for each TAGNAME. 5143c82838c1Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 5144c82838c1Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 5145c82838c1Smrg[m4_require([_LT_DECL_SED])dnl 5146c82838c1Smrgif test set = "${lt_cv_aix_libpath+set}"; then 5147c82838c1Smrg aix_libpath=$lt_cv_aix_libpath 5148c82838c1Smrgelse 5149c82838c1Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 5150c82838c1Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 5151c82838c1Smrg lt_aix_libpath_sed='[ 5152c82838c1Smrg /Import File Strings/,/^$/ { 5153c82838c1Smrg /^0/ { 5154c82838c1Smrg s/^0 *\([^ ]*\) *$/\1/ 5155c82838c1Smrg p 5156c82838c1Smrg } 5157c82838c1Smrg }]' 5158c82838c1Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 5159c82838c1Smrg # Check for a 64-bit object if we didn't find anything. 5160c82838c1Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 5161c82838c1Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 5162c82838c1Smrg fi],[]) 5163c82838c1Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 5164c82838c1Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 5165c82838c1Smrg fi 5166c82838c1Smrg ]) 5167c82838c1Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 5168c82838c1Smrgfi 5169c82838c1Smrg])# _LT_SYS_MODULE_PATH_AIX 5170c82838c1Smrg 5171c82838c1Smrg 5172c82838c1Smrg# _LT_SHELL_INIT(ARG) 5173c82838c1Smrg# ------------------- 5174c82838c1Smrgm4_define([_LT_SHELL_INIT], 5175c82838c1Smrg[m4_divert_text([M4SH-INIT], [$1 5176c82838c1Smrg])])# _LT_SHELL_INIT 5177c82838c1Smrg 5178c82838c1Smrg 5179c82838c1Smrg 5180c82838c1Smrg# _LT_PROG_ECHO_BACKSLASH 5181c82838c1Smrg# ----------------------- 5182c82838c1Smrg# Find how we can fake an echo command that does not interpret backslash. 5183c82838c1Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 5184c82838c1Smrg# of the generated configure script that will find a shell with a builtin 5185c82838c1Smrg# printf (that we can use as an echo command). 5186c82838c1Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 5187c82838c1Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 5188c82838c1SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 5189c82838c1SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 5190c82838c1Smrg 5191c82838c1SmrgAC_MSG_CHECKING([how to print strings]) 5192c82838c1Smrg# Test print first, because it will be a builtin if present. 5193c82838c1Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 5194c82838c1Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 5195c82838c1Smrg ECHO='print -r --' 5196c82838c1Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 5197c82838c1Smrg ECHO='printf %s\n' 5198c82838c1Smrgelse 5199c82838c1Smrg # Use this function as a fallback that always works. 5200c82838c1Smrg func_fallback_echo () 5201c82838c1Smrg { 5202c82838c1Smrg eval 'cat <<_LTECHO_EOF 5203c82838c1Smrg$[]1 5204c82838c1Smrg_LTECHO_EOF' 5205c82838c1Smrg } 5206c82838c1Smrg ECHO='func_fallback_echo' 5207c82838c1Smrgfi 5208c82838c1Smrg 5209c82838c1Smrg# func_echo_all arg... 5210c82838c1Smrg# Invoke $ECHO with all args, space-separated. 5211c82838c1Smrgfunc_echo_all () 5212c82838c1Smrg{ 5213c82838c1Smrg $ECHO "$*" 5214c82838c1Smrg} 5215c82838c1Smrg 5216c82838c1Smrgcase $ECHO in 5217c82838c1Smrg printf*) AC_MSG_RESULT([printf]) ;; 5218c82838c1Smrg print*) AC_MSG_RESULT([print -r]) ;; 5219c82838c1Smrg *) AC_MSG_RESULT([cat]) ;; 5220c82838c1Smrgesac 5221c82838c1Smrg 5222c82838c1Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 5223c82838c1Smrg[_AS_DETECT_SUGGESTED([ 5224c82838c1Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 5225c82838c1Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 5226c82838c1Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 5227c82838c1Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 5228c82838c1Smrg PATH=/empty FPATH=/empty; export PATH FPATH 5229c82838c1Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 5230c82838c1Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 5231c82838c1Smrg 5232c82838c1Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 5233c82838c1Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 5234c82838c1Smrg])# _LT_PROG_ECHO_BACKSLASH 5235c82838c1Smrg 5236c82838c1Smrg 5237c82838c1Smrg# _LT_WITH_SYSROOT 5238c82838c1Smrg# ---------------- 5239c82838c1SmrgAC_DEFUN([_LT_WITH_SYSROOT], 5240c82838c1Smrg[m4_require([_LT_DECL_SED])dnl 5241c82838c1SmrgAC_MSG_CHECKING([for sysroot]) 5242c82838c1SmrgAC_ARG_WITH([sysroot], 5243c82838c1Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 5244c82838c1Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 5245c82838c1Smrg if not specified).])], 5246c82838c1Smrg[], [with_sysroot=no]) 5247c82838c1Smrg 5248c82838c1Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 5249c82838c1Smrgdnl in case the user passed a directory name. 5250c82838c1Smrglt_sysroot= 5251c82838c1Smrgcase $with_sysroot in #( 5252c82838c1Smrg yes) 5253c82838c1Smrg if test yes = "$GCC"; then 5254c82838c1Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 5255c82838c1Smrg fi 5256c82838c1Smrg ;; #( 5257c82838c1Smrg /*) 5258c82838c1Smrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 5259c82838c1Smrg ;; #( 5260c82838c1Smrg no|'') 5261c82838c1Smrg ;; #( 5262c82838c1Smrg *) 5263c82838c1Smrg AC_MSG_RESULT([$with_sysroot]) 5264c82838c1Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 5265c82838c1Smrg ;; 5266c82838c1Smrgesac 5267c82838c1Smrg 5268c82838c1Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 5269c82838c1Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 5270c82838c1Smrg[dependent libraries, and where our libraries should be installed.])]) 5271c82838c1Smrg 5272c82838c1Smrg# _LT_ENABLE_LOCK 5273c82838c1Smrg# --------------- 5274c82838c1Smrgm4_defun([_LT_ENABLE_LOCK], 5275c82838c1Smrg[AC_ARG_ENABLE([libtool-lock], 5276c82838c1Smrg [AS_HELP_STRING([--disable-libtool-lock], 5277c82838c1Smrg [avoid locking (might break parallel builds)])]) 5278c82838c1Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 5279c82838c1Smrg 5280c82838c1Smrg# Some flags need to be propagated to the compiler or linker for good 5281c82838c1Smrg# libtool support. 5282c82838c1Smrgcase $host in 5283c82838c1Smrgia64-*-hpux*) 5284c82838c1Smrg # Find out what ABI is being produced by ac_compile, and set mode 5285c82838c1Smrg # options accordingly. 5286c82838c1Smrg echo 'int i;' > conftest.$ac_ext 5287c82838c1Smrg if AC_TRY_EVAL(ac_compile); then 5288c82838c1Smrg case `$FILECMD conftest.$ac_objext` in 5289c82838c1Smrg *ELF-32*) 5290c82838c1Smrg HPUX_IA64_MODE=32 5291c82838c1Smrg ;; 5292c82838c1Smrg *ELF-64*) 5293c82838c1Smrg HPUX_IA64_MODE=64 5294c82838c1Smrg ;; 5295c82838c1Smrg esac 5296c82838c1Smrg fi 5297c82838c1Smrg rm -rf conftest* 5298c82838c1Smrg ;; 5299c82838c1Smrg*-*-irix6*) 5300c82838c1Smrg # Find out what ABI is being produced by ac_compile, and set linker 5301c82838c1Smrg # options accordingly. 5302c82838c1Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 5303c82838c1Smrg if AC_TRY_EVAL(ac_compile); then 5304c82838c1Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 5305c82838c1Smrg case `$FILECMD conftest.$ac_objext` in 5306c82838c1Smrg *32-bit*) 5307c82838c1Smrg LD="${LD-ld} -melf32bsmip" 5308c82838c1Smrg ;; 5309c82838c1Smrg *N32*) 5310c82838c1Smrg LD="${LD-ld} -melf32bmipn32" 5311c82838c1Smrg ;; 5312c82838c1Smrg *64-bit*) 5313c82838c1Smrg LD="${LD-ld} -melf64bmip" 5314c82838c1Smrg ;; 5315c82838c1Smrg esac 5316c82838c1Smrg else 5317c82838c1Smrg case `$FILECMD conftest.$ac_objext` in 5318c82838c1Smrg *32-bit*) 5319c82838c1Smrg LD="${LD-ld} -32" 5320c82838c1Smrg ;; 5321c82838c1Smrg *N32*) 5322c82838c1Smrg LD="${LD-ld} -n32" 5323c82838c1Smrg ;; 5324c82838c1Smrg *64-bit*) 5325c82838c1Smrg LD="${LD-ld} -64" 5326c82838c1Smrg ;; 5327c82838c1Smrg esac 5328c82838c1Smrg fi 5329c82838c1Smrg fi 5330c82838c1Smrg rm -rf conftest* 5331c82838c1Smrg ;; 5332c82838c1Smrg 5333c82838c1Smrgmips64*-*linux*) 5334c82838c1Smrg # Find out what ABI is being produced by ac_compile, and set linker 5335c82838c1Smrg # options accordingly. 5336c82838c1Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 5337c82838c1Smrg if AC_TRY_EVAL(ac_compile); then 5338c82838c1Smrg emul=elf 5339c82838c1Smrg case `$FILECMD conftest.$ac_objext` in 5340c82838c1Smrg *32-bit*) 5341c82838c1Smrg emul="${emul}32" 5342c82838c1Smrg ;; 5343c82838c1Smrg *64-bit*) 5344c82838c1Smrg emul="${emul}64" 5345c82838c1Smrg ;; 5346c82838c1Smrg esac 5347c82838c1Smrg case `$FILECMD conftest.$ac_objext` in 5348c82838c1Smrg *MSB*) 5349c82838c1Smrg emul="${emul}btsmip" 5350c82838c1Smrg ;; 5351c82838c1Smrg *LSB*) 5352c82838c1Smrg emul="${emul}ltsmip" 5353c82838c1Smrg ;; 5354c82838c1Smrg esac 5355c82838c1Smrg case `$FILECMD conftest.$ac_objext` in 5356c82838c1Smrg *N32*) 5357c82838c1Smrg emul="${emul}n32" 5358c82838c1Smrg ;; 5359c82838c1Smrg esac 5360c82838c1Smrg LD="${LD-ld} -m $emul" 5361c82838c1Smrg fi 5362c82838c1Smrg rm -rf conftest* 5363c82838c1Smrg ;; 5364c82838c1Smrg 5365c82838c1Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 5366c82838c1Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 5367c82838c1Smrg # Find out what ABI is being produced by ac_compile, and set linker 5368c82838c1Smrg # options accordingly. Note that the listed cases only cover the 5369c82838c1Smrg # situations where additional linker options are needed (such as when 5370c82838c1Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 5371c82838c1Smrg # vice versa); the common cases where no linker options are needed do 5372c82838c1Smrg # not appear in the list. 5373c82838c1Smrg echo 'int i;' > conftest.$ac_ext 5374c82838c1Smrg if AC_TRY_EVAL(ac_compile); then 5375c82838c1Smrg case `$FILECMD conftest.o` in 5376c82838c1Smrg *32-bit*) 5377c82838c1Smrg case $host in 5378c82838c1Smrg x86_64-*kfreebsd*-gnu) 5379c82838c1Smrg LD="${LD-ld} -m elf_i386_fbsd" 5380c82838c1Smrg ;; 5381c82838c1Smrg x86_64-*linux*) 5382c82838c1Smrg case `$FILECMD conftest.o` in 5383c82838c1Smrg *x86-64*) 5384c82838c1Smrg LD="${LD-ld} -m elf32_x86_64" 5385c82838c1Smrg ;; 5386c82838c1Smrg *) 5387c82838c1Smrg LD="${LD-ld} -m elf_i386" 5388c82838c1Smrg ;; 5389c82838c1Smrg esac 5390c82838c1Smrg ;; 5391c82838c1Smrg powerpc64le-*linux*) 5392c82838c1Smrg LD="${LD-ld} -m elf32lppclinux" 5393c82838c1Smrg ;; 5394c82838c1Smrg powerpc64-*linux*) 5395c82838c1Smrg LD="${LD-ld} -m elf32ppclinux" 5396c82838c1Smrg ;; 5397c82838c1Smrg s390x-*linux*) 5398c82838c1Smrg LD="${LD-ld} -m elf_s390" 5399c82838c1Smrg ;; 5400c82838c1Smrg sparc64-*linux*) 5401c82838c1Smrg LD="${LD-ld} -m elf32_sparc" 5402c82838c1Smrg ;; 5403c82838c1Smrg esac 5404c82838c1Smrg ;; 5405c82838c1Smrg *64-bit*) 5406c82838c1Smrg case $host in 5407c82838c1Smrg x86_64-*kfreebsd*-gnu) 5408c82838c1Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 5409c82838c1Smrg ;; 5410c82838c1Smrg x86_64-*linux*) 5411c82838c1Smrg LD="${LD-ld} -m elf_x86_64" 5412c82838c1Smrg ;; 5413c82838c1Smrg powerpcle-*linux*) 5414c82838c1Smrg LD="${LD-ld} -m elf64lppc" 5415c82838c1Smrg ;; 5416c82838c1Smrg powerpc-*linux*) 5417c82838c1Smrg LD="${LD-ld} -m elf64ppc" 5418c82838c1Smrg ;; 5419c82838c1Smrg s390*-*linux*|s390*-*tpf*) 5420c82838c1Smrg LD="${LD-ld} -m elf64_s390" 5421c82838c1Smrg ;; 5422c82838c1Smrg sparc*-*linux*) 5423c82838c1Smrg LD="${LD-ld} -m elf64_sparc" 5424c82838c1Smrg ;; 5425c82838c1Smrg esac 5426c82838c1Smrg ;; 5427c82838c1Smrg esac 5428c82838c1Smrg fi 5429c82838c1Smrg rm -rf conftest* 5430c82838c1Smrg ;; 5431c82838c1Smrg 5432c82838c1Smrg*-*-sco3.2v5*) 5433c82838c1Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 5434c82838c1Smrg SAVE_CFLAGS=$CFLAGS 5435c82838c1Smrg CFLAGS="$CFLAGS -belf" 5436c82838c1Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 5437c82838c1Smrg [AC_LANG_PUSH(C) 5438c82838c1Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 5439c82838c1Smrg AC_LANG_POP]) 5440c82838c1Smrg if test yes != "$lt_cv_cc_needs_belf"; then 5441c82838c1Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 5442c82838c1Smrg CFLAGS=$SAVE_CFLAGS 5443c82838c1Smrg fi 5444c82838c1Smrg ;; 5445c82838c1Smrg*-*solaris*) 5446c82838c1Smrg # Find out what ABI is being produced by ac_compile, and set linker 5447c82838c1Smrg # options accordingly. 5448c82838c1Smrg echo 'int i;' > conftest.$ac_ext 5449c82838c1Smrg if AC_TRY_EVAL(ac_compile); then 5450c82838c1Smrg case `$FILECMD conftest.o` in 5451c82838c1Smrg *64-bit*) 5452c82838c1Smrg case $lt_cv_prog_gnu_ld in 5453c82838c1Smrg yes*) 5454c82838c1Smrg case $host in 5455c82838c1Smrg i?86-*-solaris*|x86_64-*-solaris*) 5456c82838c1Smrg LD="${LD-ld} -m elf_x86_64" 5457c82838c1Smrg ;; 5458c82838c1Smrg sparc*-*-solaris*) 5459c82838c1Smrg LD="${LD-ld} -m elf64_sparc" 5460c82838c1Smrg ;; 5461c82838c1Smrg esac 5462c82838c1Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 5463c82838c1Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 5464c82838c1Smrg LD=${LD-ld}_sol2 5465c82838c1Smrg fi 5466c82838c1Smrg ;; 5467c82838c1Smrg *) 5468c82838c1Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 5469c82838c1Smrg LD="${LD-ld} -64" 5470c82838c1Smrg fi 5471c82838c1Smrg ;; 5472c82838c1Smrg esac 5473c82838c1Smrg ;; 5474c82838c1Smrg esac 5475c82838c1Smrg fi 5476c82838c1Smrg rm -rf conftest* 5477c82838c1Smrg ;; 5478c82838c1Smrgesac 5479c82838c1Smrg 5480c82838c1Smrgneed_locks=$enable_libtool_lock 5481c82838c1Smrg])# _LT_ENABLE_LOCK 5482c82838c1Smrg 5483c82838c1Smrg 5484c82838c1Smrg# _LT_PROG_AR 5485c82838c1Smrg# ----------- 5486c82838c1Smrgm4_defun([_LT_PROG_AR], 5487c82838c1Smrg[AC_CHECK_TOOLS(AR, [ar], false) 5488c82838c1Smrg: ${AR=ar} 5489c82838c1Smrg_LT_DECL([], [AR], [1], [The archiver]) 5490c82838c1Smrg 5491c82838c1Smrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 5492c82838c1Smrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 5493c82838c1Smrg# higher priority because thats what people were doing historically (setting 5494c82838c1Smrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 5495c82838c1Smrg# variable obsoleted/removed. 5496c82838c1Smrg 5497c82838c1Smrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 5498c82838c1Smrglt_ar_flags=$AR_FLAGS 5499c82838c1Smrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 5500c82838c1Smrg 5501c82838c1Smrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 5502c82838c1Smrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 5503c82838c1Smrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 5504c82838c1Smrg [Flags to create an archive]) 5505c82838c1Smrg 5506c82838c1SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 5507c82838c1Smrg [lt_cv_ar_at_file=no 5508c82838c1Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 5509c82838c1Smrg [echo conftest.$ac_objext > conftest.lst 5510c82838c1Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 5511c82838c1Smrg AC_TRY_EVAL([lt_ar_try]) 5512c82838c1Smrg if test 0 -eq "$ac_status"; then 5513c82838c1Smrg # Ensure the archiver fails upon bogus file names. 5514c82838c1Smrg rm -f conftest.$ac_objext libconftest.a 5515c82838c1Smrg AC_TRY_EVAL([lt_ar_try]) 5516c82838c1Smrg if test 0 -ne "$ac_status"; then 5517c82838c1Smrg lt_cv_ar_at_file=@ 5518c82838c1Smrg fi 5519c82838c1Smrg fi 5520c82838c1Smrg rm -f conftest.* libconftest.a 5521c82838c1Smrg ]) 5522c82838c1Smrg ]) 5523c82838c1Smrg 5524c82838c1Smrgif test no = "$lt_cv_ar_at_file"; then 5525c82838c1Smrg archiver_list_spec= 5526c82838c1Smrgelse 5527c82838c1Smrg archiver_list_spec=$lt_cv_ar_at_file 5528c82838c1Smrgfi 5529c82838c1Smrg_LT_DECL([], [archiver_list_spec], [1], 5530c82838c1Smrg [How to feed a file listing to the archiver]) 5531c82838c1Smrg])# _LT_PROG_AR 5532c82838c1Smrg 5533c82838c1Smrg 5534c82838c1Smrg# _LT_CMD_OLD_ARCHIVE 5535c82838c1Smrg# ------------------- 5536c82838c1Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 5537c82838c1Smrg[_LT_PROG_AR 5538c82838c1Smrg 5539c82838c1SmrgAC_CHECK_TOOL(STRIP, strip, :) 5540c82838c1Smrgtest -z "$STRIP" && STRIP=: 5541c82838c1Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 5542c82838c1Smrg 5543c82838c1SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 5544c82838c1Smrgtest -z "$RANLIB" && RANLIB=: 5545c82838c1Smrg_LT_DECL([], [RANLIB], [1], 5546c82838c1Smrg [Commands used to install an old-style archive]) 5547c82838c1Smrg 5548c82838c1Smrg# Determine commands to create old-style static archives. 5549c82838c1Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 5550c82838c1Smrgold_postinstall_cmds='chmod 644 $oldlib' 5551c82838c1Smrgold_postuninstall_cmds= 5552c82838c1Smrg 5553c82838c1Smrgif test -n "$RANLIB"; then 5554c82838c1Smrg case $host_os in 5555c82838c1Smrg bitrig* | openbsd*) 5556c82838c1Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 5557c82838c1Smrg ;; 5558c82838c1Smrg *) 5559c82838c1Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 5560c82838c1Smrg ;; 5561c82838c1Smrg esac 5562c82838c1Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 5563c82838c1Smrgfi 5564c82838c1Smrg 5565c82838c1Smrgcase $host_os in 5566c82838c1Smrg darwin*) 5567c82838c1Smrg lock_old_archive_extraction=yes ;; 5568c82838c1Smrg *) 5569c82838c1Smrg lock_old_archive_extraction=no ;; 5570c82838c1Smrgesac 5571c82838c1Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 5572c82838c1Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 5573c82838c1Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 5574c82838c1Smrg [Commands used to build an old-style archive]) 5575c82838c1Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 5576c82838c1Smrg [Whether to use a lock for old archive extraction]) 5577c82838c1Smrg])# _LT_CMD_OLD_ARCHIVE 5578c82838c1Smrg 5579c82838c1Smrg 5580c82838c1Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 5581c82838c1Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 5582c82838c1Smrg# ---------------------------------------------------------------- 5583c82838c1Smrg# Check whether the given compiler option works 5584c82838c1SmrgAC_DEFUN([_LT_COMPILER_OPTION], 5585c82838c1Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5586c82838c1Smrgm4_require([_LT_DECL_SED])dnl 5587c82838c1SmrgAC_CACHE_CHECK([$1], [$2], 5588c82838c1Smrg [$2=no 5589c82838c1Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 5590c82838c1Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5591c82838c1Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 5592c82838c1Smrg # Insert the option either (1) after the last *FLAGS variable, or 5593c82838c1Smrg # (2) before a word containing "conftest.", or (3) at the end. 5594c82838c1Smrg # Note that $ac_compile itself does not contain backslashes and begins 5595c82838c1Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 5596c82838c1Smrg # The option is referenced via a variable to avoid confusing sed. 5597c82838c1Smrg lt_compile=`echo "$ac_compile" | $SED \ 5598c82838c1Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5599c82838c1Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5600c82838c1Smrg -e 's:$: $lt_compiler_flag:'` 5601c82838c1Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5602c82838c1Smrg (eval "$lt_compile" 2>conftest.err) 5603c82838c1Smrg ac_status=$? 5604c82838c1Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5605c82838c1Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5606c82838c1Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 5607c82838c1Smrg # The compiler can only warn and ignore the option if not recognized 5608c82838c1Smrg # So say no if there are warnings other than the usual output. 5609c82838c1Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 5610c82838c1Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5611c82838c1Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 5612c82838c1Smrg $2=yes 5613c82838c1Smrg fi 5614c82838c1Smrg fi 5615c82838c1Smrg $RM conftest* 5616c82838c1Smrg]) 5617c82838c1Smrg 5618c82838c1Smrgif test yes = "[$]$2"; then 5619c82838c1Smrg m4_if([$5], , :, [$5]) 5620c82838c1Smrgelse 5621c82838c1Smrg m4_if([$6], , :, [$6]) 5622c82838c1Smrgfi 5623c82838c1Smrg])# _LT_COMPILER_OPTION 5624c82838c1Smrg 5625c82838c1Smrg# Old name: 5626c82838c1SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 5627c82838c1Smrgdnl aclocal-1.4 backwards compatibility: 5628c82838c1Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 5629c82838c1Smrg 5630c82838c1Smrg 5631c82838c1Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 5632c82838c1Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 5633c82838c1Smrg# ---------------------------------------------------- 5634c82838c1Smrg# Check whether the given linker option works 5635c82838c1SmrgAC_DEFUN([_LT_LINKER_OPTION], 5636c82838c1Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5637c82838c1Smrgm4_require([_LT_DECL_SED])dnl 5638c82838c1SmrgAC_CACHE_CHECK([$1], [$2], 5639c82838c1Smrg [$2=no 5640c82838c1Smrg save_LDFLAGS=$LDFLAGS 5641c82838c1Smrg LDFLAGS="$LDFLAGS $3" 5642c82838c1Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 5643c82838c1Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 5644c82838c1Smrg # The linker can only warn and ignore the option if not recognized 5645c82838c1Smrg # So say no if there are warnings 5646c82838c1Smrg if test -s conftest.err; then 5647c82838c1Smrg # Append any errors to the config.log. 5648c82838c1Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 5649c82838c1Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 5650c82838c1Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5651c82838c1Smrg if diff conftest.exp conftest.er2 >/dev/null; then 5652c82838c1Smrg $2=yes 5653c82838c1Smrg fi 5654c82838c1Smrg else 5655c82838c1Smrg $2=yes 5656c82838c1Smrg fi 5657c82838c1Smrg fi 5658c82838c1Smrg $RM -r conftest* 5659c82838c1Smrg LDFLAGS=$save_LDFLAGS 5660c82838c1Smrg]) 5661c82838c1Smrg 5662c82838c1Smrgif test yes = "[$]$2"; then 5663c82838c1Smrg m4_if([$4], , :, [$4]) 5664c82838c1Smrgelse 5665c82838c1Smrg m4_if([$5], , :, [$5]) 5666c82838c1Smrgfi 5667c82838c1Smrg])# _LT_LINKER_OPTION 5668c82838c1Smrg 5669c82838c1Smrg# Old name: 5670c82838c1SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 5671c82838c1Smrgdnl aclocal-1.4 backwards compatibility: 5672c82838c1Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 5673c82838c1Smrg 5674c82838c1Smrg 5675c82838c1Smrg# LT_CMD_MAX_LEN 5676c82838c1Smrg#--------------- 5677c82838c1SmrgAC_DEFUN([LT_CMD_MAX_LEN], 5678c82838c1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5679c82838c1Smrg# find the maximum length of command line arguments 5680c82838c1SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 5681c82838c1SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 5682c82838c1Smrg i=0 5683c82838c1Smrg teststring=ABCD 5684c82838c1Smrg 5685c82838c1Smrg case $build_os in 5686c82838c1Smrg msdosdjgpp*) 5687c82838c1Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 5688c82838c1Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 5689c82838c1Smrg # during glob expansion). Even if it were fixed, the result of this 5690c82838c1Smrg # check would be larger than it should be. 5691c82838c1Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 5692c82838c1Smrg ;; 5693c82838c1Smrg 5694c82838c1Smrg gnu*) 5695c82838c1Smrg # Under GNU Hurd, this test is not required because there is 5696c82838c1Smrg # no limit to the length of command line arguments. 5697c82838c1Smrg # Libtool will interpret -1 as no limit whatsoever 5698c82838c1Smrg lt_cv_sys_max_cmd_len=-1; 5699c82838c1Smrg ;; 5700c82838c1Smrg 5701c82838c1Smrg cygwin* | mingw* | cegcc*) 5702c82838c1Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 5703c82838c1Smrg # about 5 minutes as the teststring grows exponentially. 5704c82838c1Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 5705c82838c1Smrg # you end up with a "frozen" computer, even though with patience 5706c82838c1Smrg # the test eventually succeeds (with a max line length of 256k). 5707c82838c1Smrg # Instead, let's just punt: use the minimum linelength reported by 5708c82838c1Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 5709c82838c1Smrg lt_cv_sys_max_cmd_len=8192; 5710c82838c1Smrg ;; 5711c82838c1Smrg 5712c82838c1Smrg mint*) 5713c82838c1Smrg # On MiNT this can take a long time and run out of memory. 5714c82838c1Smrg lt_cv_sys_max_cmd_len=8192; 5715c82838c1Smrg ;; 5716c82838c1Smrg 5717c82838c1Smrg amigaos*) 5718c82838c1Smrg # On AmigaOS with pdksh, this test takes hours, literally. 5719c82838c1Smrg # So we just punt and use a minimum line length of 8192. 5720c82838c1Smrg lt_cv_sys_max_cmd_len=8192; 5721c82838c1Smrg ;; 5722c82838c1Smrg 5723c82838c1Smrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 5724c82838c1Smrg # This has been around since 386BSD, at least. Likely further. 5725c82838c1Smrg if test -x /sbin/sysctl; then 5726c82838c1Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 5727c82838c1Smrg elif test -x /usr/sbin/sysctl; then 5728c82838c1Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 5729c82838c1Smrg else 5730c82838c1Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 5731c82838c1Smrg fi 5732c82838c1Smrg # And add a safety zone 5733c82838c1Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5734c82838c1Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5735c82838c1Smrg ;; 5736c82838c1Smrg 5737c82838c1Smrg interix*) 5738c82838c1Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 5739c82838c1Smrg lt_cv_sys_max_cmd_len=196608 5740c82838c1Smrg ;; 5741c82838c1Smrg 5742c82838c1Smrg os2*) 5743c82838c1Smrg # The test takes a long time on OS/2. 5744c82838c1Smrg lt_cv_sys_max_cmd_len=8192 5745c82838c1Smrg ;; 5746c82838c1Smrg 5747c82838c1Smrg osf*) 5748c82838c1Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 5749c82838c1Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 5750c82838c1Smrg # nice to cause kernel panics so lets avoid the loop below. 5751c82838c1Smrg # First set a reasonable default. 5752c82838c1Smrg lt_cv_sys_max_cmd_len=16384 5753c82838c1Smrg # 5754c82838c1Smrg if test -x /sbin/sysconfig; then 5755c82838c1Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 5756c82838c1Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 5757c82838c1Smrg esac 5758c82838c1Smrg fi 5759c82838c1Smrg ;; 5760c82838c1Smrg sco3.2v5*) 5761c82838c1Smrg lt_cv_sys_max_cmd_len=102400 5762c82838c1Smrg ;; 5763c82838c1Smrg sysv5* | sco5v6* | sysv4.2uw2*) 5764c82838c1Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 5765c82838c1Smrg if test -n "$kargmax"; then 5766c82838c1Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 5767c82838c1Smrg else 5768c82838c1Smrg lt_cv_sys_max_cmd_len=32768 5769c82838c1Smrg fi 5770c82838c1Smrg ;; 5771c82838c1Smrg *) 5772c82838c1Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 5773c82838c1Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 5774c82838c1Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 5775c82838c1Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5776c82838c1Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5777c82838c1Smrg else 5778c82838c1Smrg # Make teststring a little bigger before we do anything with it. 5779c82838c1Smrg # a 1K string should be a reasonable start. 5780c82838c1Smrg for i in 1 2 3 4 5 6 7 8; do 5781c82838c1Smrg teststring=$teststring$teststring 5782c82838c1Smrg done 5783c82838c1Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 5784c82838c1Smrg # If test is not a shell built-in, we'll probably end up computing a 5785c82838c1Smrg # maximum length that is only half of the actual maximum length, but 5786c82838c1Smrg # we can't tell. 5787c82838c1Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 5788c82838c1Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 5789c82838c1Smrg test 17 != "$i" # 1/2 MB should be enough 5790c82838c1Smrg do 5791c82838c1Smrg i=`expr $i + 1` 5792c82838c1Smrg teststring=$teststring$teststring 5793c82838c1Smrg done 5794c82838c1Smrg # Only check the string length outside the loop. 5795c82838c1Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 5796c82838c1Smrg teststring= 5797c82838c1Smrg # Add a significant safety factor because C++ compilers can tack on 5798c82838c1Smrg # massive amounts of additional arguments before passing them to the 5799c82838c1Smrg # linker. It appears as though 1/2 is a usable value. 5800c82838c1Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 5801c82838c1Smrg fi 5802c82838c1Smrg ;; 5803c82838c1Smrg esac 5804c82838c1Smrg]) 5805c82838c1Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 5806c82838c1Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 5807c82838c1Smrgelse 5808c82838c1Smrg AC_MSG_RESULT(none) 5809c82838c1Smrgfi 5810c82838c1Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 5811c82838c1Smrg_LT_DECL([], [max_cmd_len], [0], 5812c82838c1Smrg [What is the maximum length of a command?]) 5813c82838c1Smrg])# LT_CMD_MAX_LEN 5814c82838c1Smrg 5815c82838c1Smrg# Old name: 5816c82838c1SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 5817c82838c1Smrgdnl aclocal-1.4 backwards compatibility: 5818c82838c1Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 5819c82838c1Smrg 5820c82838c1Smrg 5821c82838c1Smrg# _LT_HEADER_DLFCN 5822c82838c1Smrg# ---------------- 5823c82838c1Smrgm4_defun([_LT_HEADER_DLFCN], 5824c82838c1Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 5825c82838c1Smrg])# _LT_HEADER_DLFCN 5826c82838c1Smrg 5827c82838c1Smrg 5828c82838c1Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 5829c82838c1Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 5830c82838c1Smrg# ---------------------------------------------------------------- 5831c82838c1Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 5832c82838c1Smrg[m4_require([_LT_HEADER_DLFCN])dnl 5833c82838c1Smrgif test yes = "$cross_compiling"; then : 5834c82838c1Smrg [$4] 5835c82838c1Smrgelse 5836c82838c1Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 5837c82838c1Smrg lt_status=$lt_dlunknown 5838c82838c1Smrg cat > conftest.$ac_ext <<_LT_EOF 5839c82838c1Smrg[#line $LINENO "configure" 5840c82838c1Smrg#include "confdefs.h" 5841c82838c1Smrg 5842c82838c1Smrg#if HAVE_DLFCN_H 5843c82838c1Smrg#include <dlfcn.h> 5844c82838c1Smrg#endif 5845c82838c1Smrg 5846c82838c1Smrg#include <stdio.h> 5847c82838c1Smrg 5848c82838c1Smrg#ifdef RTLD_GLOBAL 5849c82838c1Smrg# define LT_DLGLOBAL RTLD_GLOBAL 5850c82838c1Smrg#else 5851c82838c1Smrg# ifdef DL_GLOBAL 5852c82838c1Smrg# define LT_DLGLOBAL DL_GLOBAL 5853c82838c1Smrg# else 5854c82838c1Smrg# define LT_DLGLOBAL 0 5855c82838c1Smrg# endif 5856c82838c1Smrg#endif 5857c82838c1Smrg 5858c82838c1Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 5859c82838c1Smrg find out it does not work in some platform. */ 5860c82838c1Smrg#ifndef LT_DLLAZY_OR_NOW 5861c82838c1Smrg# ifdef RTLD_LAZY 5862c82838c1Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 5863c82838c1Smrg# else 5864c82838c1Smrg# ifdef DL_LAZY 5865c82838c1Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 5866c82838c1Smrg# else 5867c82838c1Smrg# ifdef RTLD_NOW 5868c82838c1Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 5869c82838c1Smrg# else 5870c82838c1Smrg# ifdef DL_NOW 5871c82838c1Smrg# define LT_DLLAZY_OR_NOW DL_NOW 5872c82838c1Smrg# else 5873c82838c1Smrg# define LT_DLLAZY_OR_NOW 0 5874c82838c1Smrg# endif 5875c82838c1Smrg# endif 5876c82838c1Smrg# endif 5877c82838c1Smrg# endif 5878c82838c1Smrg#endif 5879c82838c1Smrg 5880c82838c1Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 5881c82838c1Smrg correspondingly for the symbols needed. */ 5882c82838c1Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 5883c82838c1Smrgint fnord () __attribute__((visibility("default"))); 5884c82838c1Smrg#endif 5885c82838c1Smrg 5886c82838c1Smrgint fnord () { return 42; } 5887c82838c1Smrgint main () 5888c82838c1Smrg{ 5889c82838c1Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 5890c82838c1Smrg int status = $lt_dlunknown; 5891c82838c1Smrg 5892c82838c1Smrg if (self) 5893c82838c1Smrg { 5894c82838c1Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 5895c82838c1Smrg else 5896c82838c1Smrg { 5897c82838c1Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 5898c82838c1Smrg else puts (dlerror ()); 5899c82838c1Smrg } 5900c82838c1Smrg /* dlclose (self); */ 5901c82838c1Smrg } 5902c82838c1Smrg else 5903c82838c1Smrg puts (dlerror ()); 5904c82838c1Smrg 5905c82838c1Smrg return status; 5906c82838c1Smrg}] 5907c82838c1Smrg_LT_EOF 5908c82838c1Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 5909c82838c1Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 5910c82838c1Smrg lt_status=$? 5911c82838c1Smrg case x$lt_status in 5912c82838c1Smrg x$lt_dlno_uscore) $1 ;; 5913c82838c1Smrg x$lt_dlneed_uscore) $2 ;; 5914c82838c1Smrg x$lt_dlunknown|x*) $3 ;; 5915c82838c1Smrg esac 5916c82838c1Smrg else : 5917c82838c1Smrg # compilation failed 5918c82838c1Smrg $3 5919c82838c1Smrg fi 5920c82838c1Smrgfi 5921c82838c1Smrgrm -fr conftest* 5922c82838c1Smrg])# _LT_TRY_DLOPEN_SELF 5923c82838c1Smrg 5924c82838c1Smrg 5925c82838c1Smrg# LT_SYS_DLOPEN_SELF 5926c82838c1Smrg# ------------------ 5927c82838c1SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 5928c82838c1Smrg[m4_require([_LT_HEADER_DLFCN])dnl 5929c82838c1Smrgif test yes != "$enable_dlopen"; then 5930c82838c1Smrg enable_dlopen=unknown 5931c82838c1Smrg enable_dlopen_self=unknown 5932c82838c1Smrg enable_dlopen_self_static=unknown 5933c82838c1Smrgelse 5934c82838c1Smrg lt_cv_dlopen=no 5935c82838c1Smrg lt_cv_dlopen_libs= 5936c82838c1Smrg 5937c82838c1Smrg case $host_os in 5938c82838c1Smrg beos*) 5939c82838c1Smrg lt_cv_dlopen=load_add_on 5940c82838c1Smrg lt_cv_dlopen_libs= 5941c82838c1Smrg lt_cv_dlopen_self=yes 5942c82838c1Smrg ;; 5943c82838c1Smrg 5944c82838c1Smrg mingw* | pw32* | cegcc*) 5945c82838c1Smrg lt_cv_dlopen=LoadLibrary 5946c82838c1Smrg lt_cv_dlopen_libs= 5947c82838c1Smrg ;; 5948c82838c1Smrg 5949c82838c1Smrg cygwin*) 5950c82838c1Smrg lt_cv_dlopen=dlopen 5951c82838c1Smrg lt_cv_dlopen_libs= 5952c82838c1Smrg ;; 5953c82838c1Smrg 5954c82838c1Smrg darwin*) 5955c82838c1Smrg # if libdl is installed we need to link against it 5956c82838c1Smrg AC_CHECK_LIB([dl], [dlopen], 5957c82838c1Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 5958c82838c1Smrg lt_cv_dlopen=dyld 5959c82838c1Smrg lt_cv_dlopen_libs= 5960c82838c1Smrg lt_cv_dlopen_self=yes 5961c82838c1Smrg ]) 5962c82838c1Smrg ;; 5963c82838c1Smrg 5964c82838c1Smrg tpf*) 5965c82838c1Smrg # Don't try to run any link tests for TPF. We know it's impossible 5966c82838c1Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 5967c82838c1Smrg lt_cv_dlopen=dlopen 5968c82838c1Smrg lt_cv_dlopen_libs= 5969c82838c1Smrg lt_cv_dlopen_self=no 5970c82838c1Smrg ;; 5971c82838c1Smrg 5972c82838c1Smrg *) 5973c82838c1Smrg AC_CHECK_FUNC([shl_load], 5974c82838c1Smrg [lt_cv_dlopen=shl_load], 5975c82838c1Smrg [AC_CHECK_LIB([dld], [shl_load], 5976c82838c1Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 5977c82838c1Smrg [AC_CHECK_FUNC([dlopen], 5978c82838c1Smrg [lt_cv_dlopen=dlopen], 5979c82838c1Smrg [AC_CHECK_LIB([dl], [dlopen], 5980c82838c1Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 5981c82838c1Smrg [AC_CHECK_LIB([svld], [dlopen], 5982c82838c1Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 5983c82838c1Smrg [AC_CHECK_LIB([dld], [dld_link], 5984c82838c1Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 5985c82838c1Smrg ]) 5986c82838c1Smrg ]) 5987c82838c1Smrg ]) 5988c82838c1Smrg ]) 5989c82838c1Smrg ]) 5990c82838c1Smrg ;; 5991c82838c1Smrg esac 5992c82838c1Smrg 5993c82838c1Smrg if test no = "$lt_cv_dlopen"; then 5994c82838c1Smrg enable_dlopen=no 5995c82838c1Smrg else 5996c82838c1Smrg enable_dlopen=yes 5997c82838c1Smrg fi 5998c82838c1Smrg 5999c82838c1Smrg case $lt_cv_dlopen in 6000c82838c1Smrg dlopen) 6001c82838c1Smrg save_CPPFLAGS=$CPPFLAGS 6002c82838c1Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 6003c82838c1Smrg 6004c82838c1Smrg save_LDFLAGS=$LDFLAGS 6005c82838c1Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 6006c82838c1Smrg 6007c82838c1Smrg save_LIBS=$LIBS 6008c82838c1Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 6009c82838c1Smrg 6010c82838c1Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 6011c82838c1Smrg lt_cv_dlopen_self, [dnl 6012c82838c1Smrg _LT_TRY_DLOPEN_SELF( 6013c82838c1Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 6014c82838c1Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 6015c82838c1Smrg ]) 6016c82838c1Smrg 6017c82838c1Smrg if test yes = "$lt_cv_dlopen_self"; then 6018c82838c1Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 6019c82838c1Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 6020c82838c1Smrg lt_cv_dlopen_self_static, [dnl 6021c82838c1Smrg _LT_TRY_DLOPEN_SELF( 6022c82838c1Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 6023c82838c1Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 6024c82838c1Smrg ]) 6025c82838c1Smrg fi 6026c82838c1Smrg 6027c82838c1Smrg CPPFLAGS=$save_CPPFLAGS 6028c82838c1Smrg LDFLAGS=$save_LDFLAGS 6029c82838c1Smrg LIBS=$save_LIBS 6030c82838c1Smrg ;; 6031c82838c1Smrg esac 6032c82838c1Smrg 6033c82838c1Smrg case $lt_cv_dlopen_self in 6034c82838c1Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 6035c82838c1Smrg *) enable_dlopen_self=unknown ;; 6036c82838c1Smrg esac 6037c82838c1Smrg 6038c82838c1Smrg case $lt_cv_dlopen_self_static in 6039c82838c1Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 6040c82838c1Smrg *) enable_dlopen_self_static=unknown ;; 6041c82838c1Smrg esac 6042c82838c1Smrgfi 6043c82838c1Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 6044c82838c1Smrg [Whether dlopen is supported]) 6045c82838c1Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 6046c82838c1Smrg [Whether dlopen of programs is supported]) 6047c82838c1Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 6048c82838c1Smrg [Whether dlopen of statically linked programs is supported]) 6049c82838c1Smrg])# LT_SYS_DLOPEN_SELF 6050c82838c1Smrg 6051c82838c1Smrg# Old name: 6052c82838c1SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 6053c82838c1Smrgdnl aclocal-1.4 backwards compatibility: 6054c82838c1Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 6055c82838c1Smrg 6056c82838c1Smrg 6057c82838c1Smrg# _LT_COMPILER_C_O([TAGNAME]) 6058c82838c1Smrg# --------------------------- 6059c82838c1Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 6060c82838c1Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 6061c82838c1Smrgm4_defun([_LT_COMPILER_C_O], 6062c82838c1Smrg[m4_require([_LT_DECL_SED])dnl 6063c82838c1Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 6064c82838c1Smrgm4_require([_LT_TAG_COMPILER])dnl 6065c82838c1SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 6066c82838c1Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 6067c82838c1Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 6068c82838c1Smrg $RM -r conftest 2>/dev/null 6069c82838c1Smrg mkdir conftest 6070c82838c1Smrg cd conftest 6071c82838c1Smrg mkdir out 6072c82838c1Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6073c82838c1Smrg 6074c82838c1Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 6075c82838c1Smrg # Insert the option either (1) after the last *FLAGS variable, or 6076c82838c1Smrg # (2) before a word containing "conftest.", or (3) at the end. 6077c82838c1Smrg # Note that $ac_compile itself does not contain backslashes and begins 6078c82838c1Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 6079c82838c1Smrg lt_compile=`echo "$ac_compile" | $SED \ 6080c82838c1Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 6081c82838c1Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 6082c82838c1Smrg -e 's:$: $lt_compiler_flag:'` 6083c82838c1Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 6084c82838c1Smrg (eval "$lt_compile" 2>out/conftest.err) 6085c82838c1Smrg ac_status=$? 6086c82838c1Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 6087c82838c1Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 6088c82838c1Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 6089c82838c1Smrg then 6090c82838c1Smrg # The compiler can only warn and ignore the option if not recognized 6091c82838c1Smrg # So say no if there are warnings 6092c82838c1Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 6093c82838c1Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 6094c82838c1Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 6095c82838c1Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 6096c82838c1Smrg fi 6097c82838c1Smrg fi 6098c82838c1Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 6099c82838c1Smrg $RM conftest* 6100c82838c1Smrg # SGI C++ compiler will create directory out/ii_files/ for 6101c82838c1Smrg # template instantiation 6102c82838c1Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 6103c82838c1Smrg $RM out/* && rmdir out 6104c82838c1Smrg cd .. 6105c82838c1Smrg $RM -r conftest 6106c82838c1Smrg $RM conftest* 6107c82838c1Smrg]) 6108c82838c1Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 6109c82838c1Smrg [Does compiler simultaneously support -c and -o options?]) 6110c82838c1Smrg])# _LT_COMPILER_C_O 6111c82838c1Smrg 6112c82838c1Smrg 6113c82838c1Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 6114c82838c1Smrg# ---------------------------------- 6115c82838c1Smrg# Check to see if we can do hard links to lock some files if needed 6116c82838c1Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 6117c82838c1Smrg[m4_require([_LT_ENABLE_LOCK])dnl 6118c82838c1Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 6119c82838c1Smrg_LT_COMPILER_C_O([$1]) 6120c82838c1Smrg 6121c82838c1Smrghard_links=nottested 6122c82838c1Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 6123c82838c1Smrg # do not overwrite the value of need_locks provided by the user 6124c82838c1Smrg AC_MSG_CHECKING([if we can lock with hard links]) 6125c82838c1Smrg hard_links=yes 6126c82838c1Smrg $RM conftest* 6127c82838c1Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 6128c82838c1Smrg touch conftest.a 6129c82838c1Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 6130c82838c1Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 6131c82838c1Smrg AC_MSG_RESULT([$hard_links]) 6132c82838c1Smrg if test no = "$hard_links"; then 6133c82838c1Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 6134c82838c1Smrg need_locks=warn 6135c82838c1Smrg fi 6136c82838c1Smrgelse 6137c82838c1Smrg need_locks=no 6138c82838c1Smrgfi 6139c82838c1Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 6140c82838c1Smrg])# _LT_COMPILER_FILE_LOCKS 6141c82838c1Smrg 6142c82838c1Smrg 6143c82838c1Smrg# _LT_CHECK_OBJDIR 6144c82838c1Smrg# ---------------- 6145c82838c1Smrgm4_defun([_LT_CHECK_OBJDIR], 6146c82838c1Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 6147c82838c1Smrg[rm -f .libs 2>/dev/null 6148c82838c1Smrgmkdir .libs 2>/dev/null 6149c82838c1Smrgif test -d .libs; then 6150c82838c1Smrg lt_cv_objdir=.libs 6151c82838c1Smrgelse 6152c82838c1Smrg # MS-DOS does not allow filenames that begin with a dot. 6153c82838c1Smrg lt_cv_objdir=_libs 6154c82838c1Smrgfi 6155c82838c1Smrgrmdir .libs 2>/dev/null]) 6156c82838c1Smrgobjdir=$lt_cv_objdir 6157c82838c1Smrg_LT_DECL([], [objdir], [0], 6158c82838c1Smrg [The name of the directory that contains temporary libtool files])dnl 6159c82838c1Smrgm4_pattern_allow([LT_OBJDIR])dnl 6160c82838c1SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 6161c82838c1Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 6162c82838c1Smrg])# _LT_CHECK_OBJDIR 6163c82838c1Smrg 6164c82838c1Smrg 6165c82838c1Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 6166c82838c1Smrg# -------------------------------------- 6167c82838c1Smrg# Check hardcoding attributes. 6168c82838c1Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 6169c82838c1Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 6170c82838c1Smrg_LT_TAGVAR(hardcode_action, $1)= 6171c82838c1Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 6172c82838c1Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 6173c82838c1Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 6174c82838c1Smrg 6175c82838c1Smrg # We can hardcode non-existent directories. 6176c82838c1Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 6177c82838c1Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 6178c82838c1Smrg # have to relink, otherwise we might link with an installed library 6179c82838c1Smrg # when we should be linking with a yet-to-be-installed one 6180c82838c1Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 6181c82838c1Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 6182c82838c1Smrg # Linking always hardcodes the temporary library directory. 6183c82838c1Smrg _LT_TAGVAR(hardcode_action, $1)=relink 6184c82838c1Smrg else 6185c82838c1Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 6186c82838c1Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 6187c82838c1Smrg fi 6188c82838c1Smrgelse 6189c82838c1Smrg # We cannot hardcode anything, or else we can only hardcode existing 6190c82838c1Smrg # directories. 6191c82838c1Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 6192c82838c1Smrgfi 6193c82838c1SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 6194c82838c1Smrg 6195c82838c1Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 6196c82838c1Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 6197c82838c1Smrg # Fast installation is not supported 6198c82838c1Smrg enable_fast_install=no 6199c82838c1Smrgelif test yes = "$shlibpath_overrides_runpath" || 6200c82838c1Smrg test no = "$enable_shared"; then 6201c82838c1Smrg # Fast installation is not necessary 6202c82838c1Smrg enable_fast_install=needless 6203c82838c1Smrgfi 6204c82838c1Smrg_LT_TAGDECL([], [hardcode_action], [0], 6205c82838c1Smrg [How to hardcode a shared library path into an executable]) 6206c82838c1Smrg])# _LT_LINKER_HARDCODE_LIBPATH 6207c82838c1Smrg 6208c82838c1Smrg 6209c82838c1Smrg# _LT_CMD_STRIPLIB 6210c82838c1Smrg# ---------------- 6211c82838c1Smrgm4_defun([_LT_CMD_STRIPLIB], 6212c82838c1Smrg[m4_require([_LT_DECL_EGREP]) 6213c82838c1Smrgstriplib= 6214c82838c1Smrgold_striplib= 6215c82838c1SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 6216c82838c1Smrgif test -z "$STRIP"; then 6217c82838c1Smrg AC_MSG_RESULT([no]) 6218c82838c1Smrgelse 6219c82838c1Smrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 6220c82838c1Smrg old_striplib="$STRIP --strip-debug" 6221c82838c1Smrg striplib="$STRIP --strip-unneeded" 6222c82838c1Smrg AC_MSG_RESULT([yes]) 6223c82838c1Smrg else 6224c82838c1Smrg case $host_os in 6225c82838c1Smrg darwin*) 6226c82838c1Smrg # FIXME - insert some real tests, host_os isn't really good enough 6227c82838c1Smrg striplib="$STRIP -x" 6228c82838c1Smrg old_striplib="$STRIP -S" 6229c82838c1Smrg AC_MSG_RESULT([yes]) 6230c82838c1Smrg ;; 6231c82838c1Smrg freebsd*) 6232c82838c1Smrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 6233c82838c1Smrg old_striplib="$STRIP --strip-debug" 6234c82838c1Smrg striplib="$STRIP --strip-unneeded" 6235c82838c1Smrg AC_MSG_RESULT([yes]) 6236c82838c1Smrg else 6237c82838c1Smrg AC_MSG_RESULT([no]) 6238c82838c1Smrg fi 6239c82838c1Smrg ;; 6240c82838c1Smrg *) 6241c82838c1Smrg AC_MSG_RESULT([no]) 6242c82838c1Smrg ;; 6243c82838c1Smrg esac 6244c82838c1Smrg fi 6245c82838c1Smrgfi 6246c82838c1Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 6247c82838c1Smrg_LT_DECL([], [striplib], [1]) 6248c82838c1Smrg])# _LT_CMD_STRIPLIB 6249c82838c1Smrg 6250c82838c1Smrg 6251c82838c1Smrg# _LT_PREPARE_MUNGE_PATH_LIST 6252c82838c1Smrg# --------------------------- 6253c82838c1Smrg# Make sure func_munge_path_list() is defined correctly. 6254c82838c1Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 6255c82838c1Smrg[[# func_munge_path_list VARIABLE PATH 6256c82838c1Smrg# ----------------------------------- 6257c82838c1Smrg# VARIABLE is name of variable containing _space_ separated list of 6258c82838c1Smrg# directories to be munged by the contents of PATH, which is string 6259c82838c1Smrg# having a format: 6260c82838c1Smrg# "DIR[:DIR]:" 6261c82838c1Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 6262c82838c1Smrg# ":DIR[:DIR]" 6263c82838c1Smrg# string "DIR[ DIR]" will be appended to VARIABLE 6264c82838c1Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 6265c82838c1Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 6266c82838c1Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 6267c82838c1Smrg# "DIR[:DIR]" 6268c82838c1Smrg# VARIABLE will be replaced by "DIR[ DIR]" 6269c82838c1Smrgfunc_munge_path_list () 6270c82838c1Smrg{ 6271c82838c1Smrg case x@S|@2 in 6272c82838c1Smrg x) 6273c82838c1Smrg ;; 6274c82838c1Smrg *:) 6275c82838c1Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 6276c82838c1Smrg ;; 6277c82838c1Smrg x:*) 6278c82838c1Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 6279c82838c1Smrg ;; 6280c82838c1Smrg *::*) 6281c82838c1Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 6282c82838c1Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 6283c82838c1Smrg ;; 6284c82838c1Smrg *) 6285c82838c1Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 6286c82838c1Smrg ;; 6287c82838c1Smrg esac 6288c82838c1Smrg} 6289c82838c1Smrg]])# _LT_PREPARE_PATH_LIST 6290c82838c1Smrg 6291c82838c1Smrg 6292c82838c1Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 6293c82838c1Smrg# ----------------------------- 6294c82838c1Smrg# PORTME Fill in your ld.so characteristics 6295c82838c1Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 6296c82838c1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 6297c82838c1Smrgm4_require([_LT_DECL_EGREP])dnl 6298c82838c1Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 6299c82838c1Smrgm4_require([_LT_DECL_OBJDUMP])dnl 6300c82838c1Smrgm4_require([_LT_DECL_SED])dnl 6301c82838c1Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 6302c82838c1Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 6303c82838c1SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 6304c82838c1Smrgm4_if([$1], 6305c82838c1Smrg [], [ 6306c82838c1Smrgif test yes = "$GCC"; then 6307c82838c1Smrg case $host_os in 6308c82838c1Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 6309c82838c1Smrg *) lt_awk_arg='/^libraries:/' ;; 6310c82838c1Smrg esac 6311c82838c1Smrg case $host_os in 6312c82838c1Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 6313c82838c1Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 6314c82838c1Smrg esac 6315c82838c1Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 6316c82838c1Smrg case $lt_search_path_spec in 6317c82838c1Smrg *\;*) 6318c82838c1Smrg # if the path contains ";" then we assume it to be the separator 6319c82838c1Smrg # otherwise default to the standard path separator (i.e. ":") - it is 6320c82838c1Smrg # assumed that no part of a normal pathname contains ";" but that should 6321c82838c1Smrg # okay in the real world where ";" in dirpaths is itself problematic. 6322c82838c1Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 6323c82838c1Smrg ;; 6324c82838c1Smrg *) 6325c82838c1Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 6326c82838c1Smrg ;; 6327c82838c1Smrg esac 6328c82838c1Smrg # Ok, now we have the path, separated by spaces, we can step through it 6329c82838c1Smrg # and add multilib dir if necessary... 6330c82838c1Smrg lt_tmp_lt_search_path_spec= 6331c82838c1Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 6332c82838c1Smrg # ...but if some path component already ends with the multilib dir we assume 6333c82838c1Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 6334c82838c1Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 6335c82838c1Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 6336c82838c1Smrg lt_multi_os_dir= 6337c82838c1Smrg ;; 6338c82838c1Smrg esac 6339c82838c1Smrg for lt_sys_path in $lt_search_path_spec; do 6340c82838c1Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 6341c82838c1Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 6342c82838c1Smrg elif test -n "$lt_multi_os_dir"; then 6343c82838c1Smrg test -d "$lt_sys_path" && \ 6344c82838c1Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 6345c82838c1Smrg fi 6346c82838c1Smrg done 6347c82838c1Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 6348c82838c1SmrgBEGIN {RS = " "; FS = "/|\n";} { 6349c82838c1Smrg lt_foo = ""; 6350c82838c1Smrg lt_count = 0; 6351c82838c1Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 6352c82838c1Smrg if ($lt_i != "" && $lt_i != ".") { 6353c82838c1Smrg if ($lt_i == "..") { 6354c82838c1Smrg lt_count++; 6355c82838c1Smrg } else { 6356c82838c1Smrg if (lt_count == 0) { 6357c82838c1Smrg lt_foo = "/" $lt_i lt_foo; 6358c82838c1Smrg } else { 6359c82838c1Smrg lt_count--; 6360c82838c1Smrg } 6361c82838c1Smrg } 6362c82838c1Smrg } 6363c82838c1Smrg } 6364c82838c1Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 6365c82838c1Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 6366c82838c1Smrg}'` 6367c82838c1Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 6368c82838c1Smrg # for these hosts. 6369c82838c1Smrg case $host_os in 6370c82838c1Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 6371c82838c1Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 6372c82838c1Smrg esac 6373c82838c1Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 6374c82838c1Smrgelse 6375c82838c1Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 6376c82838c1Smrgfi]) 6377c82838c1Smrglibrary_names_spec= 6378c82838c1Smrglibname_spec='lib$name' 6379c82838c1Smrgsoname_spec= 6380c82838c1Smrgshrext_cmds=.so 6381c82838c1Smrgpostinstall_cmds= 6382c82838c1Smrgpostuninstall_cmds= 6383c82838c1Smrgfinish_cmds= 6384c82838c1Smrgfinish_eval= 6385c82838c1Smrgshlibpath_var= 6386c82838c1Smrgshlibpath_overrides_runpath=unknown 6387c82838c1Smrgversion_type=none 6388c82838c1Smrgdynamic_linker="$host_os ld.so" 6389c82838c1Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 6390c82838c1Smrgneed_lib_prefix=unknown 6391c82838c1Smrghardcode_into_libs=no 6392c82838c1Smrg 6393c82838c1Smrg# when you set need_version to no, make sure it does not cause -set_version 6394c82838c1Smrg# flags to be left without arguments 6395c82838c1Smrgneed_version=unknown 6396c82838c1Smrg 6397c82838c1SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 6398c82838c1Smrg[User-defined run-time library search path.]) 6399c82838c1Smrg 6400c82838c1Smrgcase $host_os in 6401c82838c1Smrgaix3*) 6402c82838c1Smrg version_type=linux # correct to gnu/linux during the next big refactor 6403c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 6404c82838c1Smrg shlibpath_var=LIBPATH 6405c82838c1Smrg 6406c82838c1Smrg # AIX 3 has no versioning support, so we append a major version to the name. 6407c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 6408c82838c1Smrg ;; 6409c82838c1Smrg 6410c82838c1Smrgaix[[4-9]]*) 6411c82838c1Smrg version_type=linux # correct to gnu/linux during the next big refactor 6412c82838c1Smrg need_lib_prefix=no 6413c82838c1Smrg need_version=no 6414c82838c1Smrg hardcode_into_libs=yes 6415c82838c1Smrg if test ia64 = "$host_cpu"; then 6416c82838c1Smrg # AIX 5 supports IA64 6417c82838c1Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 6418c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 6419c82838c1Smrg else 6420c82838c1Smrg # With GCC up to 2.95.x, collect2 would create an import file 6421c82838c1Smrg # for dependence libraries. The import file would start with 6422c82838c1Smrg # the line '#! .'. This would cause the generated library to 6423c82838c1Smrg # depend on '.', always an invalid library. This was fixed in 6424c82838c1Smrg # development snapshots of GCC prior to 3.0. 6425c82838c1Smrg case $host_os in 6426c82838c1Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 6427c82838c1Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 6428c82838c1Smrg echo ' yes ' 6429c82838c1Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 6430c82838c1Smrg : 6431c82838c1Smrg else 6432c82838c1Smrg can_build_shared=no 6433c82838c1Smrg fi 6434c82838c1Smrg ;; 6435c82838c1Smrg esac 6436c82838c1Smrg # Using Import Files as archive members, it is possible to support 6437c82838c1Smrg # filename-based versioning of shared library archives on AIX. While 6438c82838c1Smrg # this would work for both with and without runtime linking, it will 6439c82838c1Smrg # prevent static linking of such archives. So we do filename-based 6440c82838c1Smrg # shared library versioning with .so extension only, which is used 6441c82838c1Smrg # when both runtime linking and shared linking is enabled. 6442c82838c1Smrg # Unfortunately, runtime linking may impact performance, so we do 6443c82838c1Smrg # not want this to be the default eventually. Also, we use the 6444c82838c1Smrg # versioned .so libs for executables only if there is the -brtl 6445c82838c1Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 6446c82838c1Smrg # To allow for filename-based versioning support, we need to create 6447c82838c1Smrg # libNAME.so.V as an archive file, containing: 6448c82838c1Smrg # *) an Import File, referring to the versioned filename of the 6449c82838c1Smrg # archive as well as the shared archive member, telling the 6450c82838c1Smrg # bitwidth (32 or 64) of that shared object, and providing the 6451c82838c1Smrg # list of exported symbols of that shared object, eventually 6452c82838c1Smrg # decorated with the 'weak' keyword 6453c82838c1Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 6454c82838c1Smrg # it being seen by the linker. 6455c82838c1Smrg # At run time we better use the real file rather than another symlink, 6456c82838c1Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 6457c82838c1Smrg 6458c82838c1Smrg case $with_aix_soname,$aix_use_runtimelinking in 6459c82838c1Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 6460c82838c1Smrg # soname into executable. Probably we can add versioning support to 6461c82838c1Smrg # collect2, so additional links can be useful in future. 6462c82838c1Smrg aix,yes) # traditional libtool 6463c82838c1Smrg dynamic_linker='AIX unversionable lib.so' 6464c82838c1Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 6465c82838c1Smrg # instead of lib<name>.a to let people know that these are not 6466c82838c1Smrg # typical AIX shared libraries. 6467c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6468c82838c1Smrg ;; 6469c82838c1Smrg aix,no) # traditional AIX only 6470c82838c1Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 6471c82838c1Smrg # We preserve .a as extension for shared libraries through AIX4.2 6472c82838c1Smrg # and later when we are not doing run time linking. 6473c82838c1Smrg library_names_spec='$libname$release.a $libname.a' 6474c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 6475c82838c1Smrg ;; 6476c82838c1Smrg svr4,*) # full svr4 only 6477c82838c1Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 6478c82838c1Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 6479c82838c1Smrg # We do not specify a path in Import Files, so LIBPATH fires. 6480c82838c1Smrg shlibpath_overrides_runpath=yes 6481c82838c1Smrg ;; 6482c82838c1Smrg *,yes) # both, prefer svr4 6483c82838c1Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 6484c82838c1Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 6485c82838c1Smrg # unpreferred sharedlib libNAME.a needs extra handling 6486c82838c1Smrg postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' 6487c82838c1Smrg postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' 6488c82838c1Smrg # We do not specify a path in Import Files, so LIBPATH fires. 6489c82838c1Smrg shlibpath_overrides_runpath=yes 6490c82838c1Smrg ;; 6491c82838c1Smrg *,no) # both, prefer aix 6492c82838c1Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 6493c82838c1Smrg library_names_spec='$libname$release.a $libname.a' 6494c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 6495c82838c1Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 6496c82838c1Smrg postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' 6497c82838c1Smrg postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' 6498c82838c1Smrg ;; 6499c82838c1Smrg esac 6500c82838c1Smrg shlibpath_var=LIBPATH 6501c82838c1Smrg fi 6502c82838c1Smrg ;; 6503c82838c1Smrg 6504c82838c1Smrgamigaos*) 6505c82838c1Smrg case $host_cpu in 6506c82838c1Smrg powerpc) 6507c82838c1Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 6508c82838c1Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 6509c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6510c82838c1Smrg ;; 6511c82838c1Smrg m68k) 6512c82838c1Smrg library_names_spec='$libname.ixlibrary $libname.a' 6513c82838c1Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 6514c82838c1Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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' 6515c82838c1Smrg ;; 6516c82838c1Smrg esac 6517c82838c1Smrg ;; 6518c82838c1Smrg 6519c82838c1Smrgbeos*) 6520c82838c1Smrg library_names_spec='$libname$shared_ext' 6521c82838c1Smrg dynamic_linker="$host_os ld.so" 6522c82838c1Smrg shlibpath_var=LIBRARY_PATH 6523c82838c1Smrg ;; 6524c82838c1Smrg 6525c82838c1Smrgbsdi[[45]]*) 6526c82838c1Smrg version_type=linux # correct to gnu/linux during the next big refactor 6527c82838c1Smrg need_version=no 6528c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6529c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 6530c82838c1Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 6531c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 6532c82838c1Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 6533c82838c1Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 6534c82838c1Smrg # the default ld.so.conf also contains /usr/contrib/lib and 6535c82838c1Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 6536c82838c1Smrg # libtool to hard-code these into programs 6537c82838c1Smrg ;; 6538c82838c1Smrg 6539c82838c1Smrgcygwin* | mingw* | pw32* | cegcc*) 6540c82838c1Smrg version_type=windows 6541c82838c1Smrg shrext_cmds=.dll 6542c82838c1Smrg need_version=no 6543c82838c1Smrg need_lib_prefix=no 6544c82838c1Smrg 6545c82838c1Smrg case $GCC,$cc_basename in 6546c82838c1Smrg yes,*) 6547c82838c1Smrg # gcc 6548c82838c1Smrg library_names_spec='$libname.dll.a' 6549c82838c1Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 6550c82838c1Smrg postinstall_cmds='base_file=`basename \$file`~ 6551c82838c1Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 6552c82838c1Smrg dldir=$destdir/`dirname \$dlpath`~ 6553c82838c1Smrg test -d \$dldir || mkdir -p \$dldir~ 6554c82838c1Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 6555c82838c1Smrg chmod a+x \$dldir/$dlname~ 6556c82838c1Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6557c82838c1Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6558c82838c1Smrg fi' 6559c82838c1Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 6560c82838c1Smrg dlpath=$dir/\$dldll~ 6561c82838c1Smrg $RM \$dlpath' 6562c82838c1Smrg shlibpath_overrides_runpath=yes 6563c82838c1Smrg 6564c82838c1Smrg case $host_os in 6565c82838c1Smrg cygwin*) 6566c82838c1Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 6567c82838c1Smrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6568c82838c1Smrgm4_if([$1], [],[ 6569c82838c1Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 6570c82838c1Smrg ;; 6571c82838c1Smrg mingw* | cegcc*) 6572c82838c1Smrg # MinGW DLLs use traditional 'lib' prefix 6573c82838c1Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6574c82838c1Smrg ;; 6575c82838c1Smrg pw32*) 6576c82838c1Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 6577c82838c1Smrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6578c82838c1Smrg ;; 6579c82838c1Smrg esac 6580c82838c1Smrg dynamic_linker='Win32 ld.exe' 6581c82838c1Smrg ;; 6582c82838c1Smrg 6583c82838c1Smrg *,cl* | *,icl*) 6584c82838c1Smrg # Native MSVC or ICC 6585c82838c1Smrg libname_spec='$name' 6586c82838c1Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6587c82838c1Smrg library_names_spec='$libname.dll.lib' 6588c82838c1Smrg 6589c82838c1Smrg case $build_os in 6590c82838c1Smrg mingw*) 6591c82838c1Smrg sys_lib_search_path_spec= 6592c82838c1Smrg lt_save_ifs=$IFS 6593c82838c1Smrg IFS=';' 6594c82838c1Smrg for lt_path in $LIB 6595c82838c1Smrg do 6596c82838c1Smrg IFS=$lt_save_ifs 6597c82838c1Smrg # Let DOS variable expansion print the short 8.3 style file name. 6598c82838c1Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 6599c82838c1Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 6600c82838c1Smrg done 6601c82838c1Smrg IFS=$lt_save_ifs 6602c82838c1Smrg # Convert to MSYS style. 6603c82838c1Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 6604c82838c1Smrg ;; 6605c82838c1Smrg cygwin*) 6606c82838c1Smrg # Convert to unix form, then to dos form, then back to unix form 6607c82838c1Smrg # but this time dos style (no spaces!) so that the unix form looks 6608c82838c1Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 6609c82838c1Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 6610c82838c1Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 6611c82838c1Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6612c82838c1Smrg ;; 6613c82838c1Smrg *) 6614c82838c1Smrg sys_lib_search_path_spec=$LIB 6615c82838c1Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 6616c82838c1Smrg # It is most probably a Windows format PATH. 6617c82838c1Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 6618c82838c1Smrg else 6619c82838c1Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6620c82838c1Smrg fi 6621c82838c1Smrg # FIXME: find the short name or the path components, as spaces are 6622c82838c1Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 6623c82838c1Smrg ;; 6624c82838c1Smrg esac 6625c82838c1Smrg 6626c82838c1Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 6627c82838c1Smrg postinstall_cmds='base_file=`basename \$file`~ 6628c82838c1Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 6629c82838c1Smrg dldir=$destdir/`dirname \$dlpath`~ 6630c82838c1Smrg test -d \$dldir || mkdir -p \$dldir~ 6631c82838c1Smrg $install_prog $dir/$dlname \$dldir/$dlname' 6632c82838c1Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 6633c82838c1Smrg dlpath=$dir/\$dldll~ 6634c82838c1Smrg $RM \$dlpath' 6635c82838c1Smrg shlibpath_overrides_runpath=yes 6636c82838c1Smrg dynamic_linker='Win32 link.exe' 6637c82838c1Smrg ;; 6638c82838c1Smrg 6639c82838c1Smrg *) 6640c82838c1Smrg # Assume MSVC and ICC wrapper 6641c82838c1Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 6642c82838c1Smrg dynamic_linker='Win32 ld.exe' 6643c82838c1Smrg ;; 6644c82838c1Smrg esac 6645c82838c1Smrg # FIXME: first we should search . and the directory the executable is in 6646c82838c1Smrg shlibpath_var=PATH 6647c82838c1Smrg ;; 6648c82838c1Smrg 6649c82838c1Smrgdarwin* | rhapsody*) 6650c82838c1Smrg dynamic_linker="$host_os dyld" 6651c82838c1Smrg version_type=darwin 6652c82838c1Smrg need_lib_prefix=no 6653c82838c1Smrg need_version=no 6654c82838c1Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 6655c82838c1Smrg soname_spec='$libname$release$major$shared_ext' 6656c82838c1Smrg shlibpath_overrides_runpath=yes 6657c82838c1Smrg shlibpath_var=DYLD_LIBRARY_PATH 6658c82838c1Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 6659c82838c1Smrgm4_if([$1], [],[ 6660c82838c1Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 6661c82838c1Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 6662c82838c1Smrg ;; 6663c82838c1Smrg 6664c82838c1Smrgdgux*) 6665c82838c1Smrg version_type=linux # correct to gnu/linux during the next big refactor 6666c82838c1Smrg need_lib_prefix=no 6667c82838c1Smrg need_version=no 6668c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6669c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 6670c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 6671c82838c1Smrg ;; 6672c82838c1Smrg 6673c82838c1Smrgfreebsd* | dragonfly* | midnightbsd*) 6674c82838c1Smrg # DragonFly does not have aout. When/if they implement a new 6675c82838c1Smrg # versioning mechanism, adjust this. 6676c82838c1Smrg if test -x /usr/bin/objformat; then 6677c82838c1Smrg objformat=`/usr/bin/objformat` 6678c82838c1Smrg else 6679c82838c1Smrg case $host_os in 6680c82838c1Smrg freebsd[[23]].*) objformat=aout ;; 6681c82838c1Smrg *) objformat=elf ;; 6682c82838c1Smrg esac 6683c82838c1Smrg fi 6684c82838c1Smrg version_type=freebsd-$objformat 6685c82838c1Smrg case $version_type in 6686c82838c1Smrg freebsd-elf*) 6687c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6688c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 6689c82838c1Smrg need_version=no 6690c82838c1Smrg need_lib_prefix=no 6691c82838c1Smrg ;; 6692c82838c1Smrg freebsd-*) 6693c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6694c82838c1Smrg need_version=yes 6695c82838c1Smrg ;; 6696c82838c1Smrg esac 6697c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 6698c82838c1Smrg case $host_os in 6699c82838c1Smrg freebsd2.*) 6700c82838c1Smrg shlibpath_overrides_runpath=yes 6701c82838c1Smrg ;; 6702c82838c1Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 6703c82838c1Smrg shlibpath_overrides_runpath=yes 6704c82838c1Smrg hardcode_into_libs=yes 6705c82838c1Smrg ;; 6706c82838c1Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 6707c82838c1Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 6708c82838c1Smrg shlibpath_overrides_runpath=no 6709c82838c1Smrg hardcode_into_libs=yes 6710c82838c1Smrg ;; 6711c82838c1Smrg *) # from 4.6 on, and DragonFly 6712c82838c1Smrg shlibpath_overrides_runpath=yes 6713c82838c1Smrg hardcode_into_libs=yes 6714c82838c1Smrg ;; 6715c82838c1Smrg esac 6716c82838c1Smrg ;; 6717c82838c1Smrg 6718c82838c1Smrghaiku*) 6719c82838c1Smrg version_type=linux # correct to gnu/linux during the next big refactor 6720c82838c1Smrg need_lib_prefix=no 6721c82838c1Smrg need_version=no 6722c82838c1Smrg dynamic_linker="$host_os runtime_loader" 6723c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6724c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 6725c82838c1Smrg shlibpath_var=LIBRARY_PATH 6726c82838c1Smrg shlibpath_overrides_runpath=no 6727c82838c1Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 6728c82838c1Smrg hardcode_into_libs=yes 6729c82838c1Smrg ;; 6730c82838c1Smrg 6731c82838c1Smrghpux9* | hpux10* | hpux11*) 6732c82838c1Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 6733c82838c1Smrg # link against other versions. 6734c82838c1Smrg version_type=sunos 6735c82838c1Smrg need_lib_prefix=no 6736c82838c1Smrg need_version=no 6737c82838c1Smrg case $host_cpu in 6738c82838c1Smrg ia64*) 6739c82838c1Smrg shrext_cmds='.so' 6740c82838c1Smrg hardcode_into_libs=yes 6741c82838c1Smrg dynamic_linker="$host_os dld.so" 6742c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 6743c82838c1Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6744c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6745c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 6746c82838c1Smrg if test 32 = "$HPUX_IA64_MODE"; then 6747c82838c1Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 6748c82838c1Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 6749c82838c1Smrg else 6750c82838c1Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 6751c82838c1Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 6752c82838c1Smrg fi 6753c82838c1Smrg ;; 6754c82838c1Smrg hppa*64*) 6755c82838c1Smrg shrext_cmds='.sl' 6756c82838c1Smrg hardcode_into_libs=yes 6757c82838c1Smrg dynamic_linker="$host_os dld.sl" 6758c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 6759c82838c1Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6760c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6761c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 6762c82838c1Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 6763c82838c1Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6764c82838c1Smrg ;; 6765c82838c1Smrg *) 6766c82838c1Smrg shrext_cmds='.sl' 6767c82838c1Smrg dynamic_linker="$host_os dld.sl" 6768c82838c1Smrg shlibpath_var=SHLIB_PATH 6769c82838c1Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 6770c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6771c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 6772c82838c1Smrg ;; 6773c82838c1Smrg esac 6774c82838c1Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 6775c82838c1Smrg postinstall_cmds='chmod 555 $lib' 6776c82838c1Smrg # or fails outright, so override atomically: 6777c82838c1Smrg install_override_mode=555 6778c82838c1Smrg ;; 6779c82838c1Smrg 6780c82838c1Smrginterix[[3-9]]*) 6781c82838c1Smrg version_type=linux # correct to gnu/linux during the next big refactor 6782c82838c1Smrg need_lib_prefix=no 6783c82838c1Smrg need_version=no 6784c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6785c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 6786c82838c1Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 6787c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 6788c82838c1Smrg shlibpath_overrides_runpath=no 6789c82838c1Smrg hardcode_into_libs=yes 6790c82838c1Smrg ;; 6791c82838c1Smrg 6792c82838c1Smrgirix5* | irix6* | nonstopux*) 6793c82838c1Smrg case $host_os in 6794c82838c1Smrg nonstopux*) version_type=nonstopux ;; 6795c82838c1Smrg *) 6796c82838c1Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 6797c82838c1Smrg version_type=linux # correct to gnu/linux during the next big refactor 6798c82838c1Smrg else 6799c82838c1Smrg version_type=irix 6800c82838c1Smrg fi ;; 6801c82838c1Smrg esac 6802c82838c1Smrg need_lib_prefix=no 6803c82838c1Smrg need_version=no 6804c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 6805c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 6806c82838c1Smrg case $host_os in 6807c82838c1Smrg irix5* | nonstopux*) 6808c82838c1Smrg libsuff= shlibsuff= 6809c82838c1Smrg ;; 6810c82838c1Smrg *) 6811c82838c1Smrg case $LD in # libtool.m4 will add one of these switches to LD 6812c82838c1Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 6813c82838c1Smrg libsuff= shlibsuff= libmagic=32-bit;; 6814c82838c1Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 6815c82838c1Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 6816c82838c1Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 6817c82838c1Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 6818c82838c1Smrg *) libsuff= shlibsuff= libmagic=never-match;; 6819c82838c1Smrg esac 6820c82838c1Smrg ;; 6821c82838c1Smrg esac 6822c82838c1Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 6823c82838c1Smrg shlibpath_overrides_runpath=no 6824c82838c1Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 6825c82838c1Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 6826c82838c1Smrg hardcode_into_libs=yes 6827c82838c1Smrg ;; 6828c82838c1Smrg 6829c82838c1Smrg# No shared lib support for Linux oldld, aout, or coff. 6830c82838c1Smrglinux*oldld* | linux*aout* | linux*coff*) 6831c82838c1Smrg dynamic_linker=no 6832c82838c1Smrg ;; 6833c82838c1Smrg 6834c82838c1Smrglinux*android*) 6835c82838c1Smrg version_type=none # Android doesn't support versioned libraries. 6836c82838c1Smrg need_lib_prefix=no 6837c82838c1Smrg need_version=no 6838c82838c1Smrg library_names_spec='$libname$release$shared_ext' 6839c82838c1Smrg soname_spec='$libname$release$shared_ext' 6840c82838c1Smrg finish_cmds= 6841c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 6842c82838c1Smrg shlibpath_overrides_runpath=yes 6843c82838c1Smrg 6844c82838c1Smrg # This implies no fast_install, which is unacceptable. 6845c82838c1Smrg # Some rework will be needed to allow for fast_install 6846c82838c1Smrg # before this can be enabled. 6847c82838c1Smrg hardcode_into_libs=yes 6848c82838c1Smrg 6849c82838c1Smrg dynamic_linker='Android linker' 6850c82838c1Smrg # Don't embed -rpath directories since the linker doesn't support them. 6851c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6852c82838c1Smrg ;; 6853c82838c1Smrg 6854c82838c1Smrg# This must be glibc/ELF. 6855c82838c1Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6856c82838c1Smrg version_type=linux # correct to gnu/linux during the next big refactor 6857c82838c1Smrg need_lib_prefix=no 6858c82838c1Smrg need_version=no 6859c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6860c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 6861c82838c1Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 6862c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 6863c82838c1Smrg shlibpath_overrides_runpath=no 6864c82838c1Smrg 6865c82838c1Smrg # Some binutils ld are patched to set DT_RUNPATH 6866c82838c1Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 6867c82838c1Smrg [lt_cv_shlibpath_overrides_runpath=no 6868c82838c1Smrg save_LDFLAGS=$LDFLAGS 6869c82838c1Smrg save_libdir=$libdir 6870c82838c1Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 6871c82838c1Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 6872c82838c1Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 6873c82838c1Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 6874c82838c1Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 6875c82838c1Smrg LDFLAGS=$save_LDFLAGS 6876c82838c1Smrg libdir=$save_libdir 6877c82838c1Smrg ]) 6878c82838c1Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 6879c82838c1Smrg 6880c82838c1Smrg # This implies no fast_install, which is unacceptable. 6881c82838c1Smrg # Some rework will be needed to allow for fast_install 6882c82838c1Smrg # before this can be enabled. 6883c82838c1Smrg hardcode_into_libs=yes 6884c82838c1Smrg 6885c82838c1Smrg # Add ABI-specific directories to the system library path. 6886c82838c1Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 6887c82838c1Smrg 6888c82838c1Smrg # Ideally, we could use ldconfig to report *all* directores which are 6889c82838c1Smrg # searched for libraries, however this is still not possible. Aside from not 6890c82838c1Smrg # being certain /sbin/ldconfig is available, command 6891c82838c1Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 6892c82838c1Smrg # even though it is searched at run-time. Try to do the best guess by 6893c82838c1Smrg # appending ld.so.conf contents (and includes) to the search path. 6894c82838c1Smrg if test -f /etc/ld.so.conf; then 6895c82838c1Smrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` 6896c82838c1Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 6897c82838c1Smrg fi 6898c82838c1Smrg 6899c82838c1Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 6900c82838c1Smrg # powerpc, because MkLinux only supported shared libraries with the 6901c82838c1Smrg # GNU dynamic linker. Since this was broken with cross compilers, 6902c82838c1Smrg # most powerpc-linux boxes support dynamic linking these days and 6903c82838c1Smrg # people can always --disable-shared, the test was removed, and we 6904c82838c1Smrg # assume the GNU/Linux dynamic linker is in use. 6905c82838c1Smrg dynamic_linker='GNU/Linux ld.so' 6906c82838c1Smrg ;; 6907c82838c1Smrg 6908c82838c1Smrgnetbsd*) 6909c82838c1Smrg version_type=sunos 6910c82838c1Smrg need_lib_prefix=no 6911c82838c1Smrg need_version=no 6912c82838c1Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6913c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6914c82838c1Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6915c82838c1Smrg dynamic_linker='NetBSD (a.out) ld.so' 6916c82838c1Smrg else 6917c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6918c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 6919c82838c1Smrg dynamic_linker='NetBSD ld.elf_so' 6920c82838c1Smrg fi 6921c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 6922c82838c1Smrg shlibpath_overrides_runpath=yes 6923c82838c1Smrg hardcode_into_libs=yes 6924c82838c1Smrg ;; 6925c82838c1Smrg 6926c82838c1Smrgnewsos6) 6927c82838c1Smrg version_type=linux # correct to gnu/linux during the next big refactor 6928c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6929c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 6930c82838c1Smrg shlibpath_overrides_runpath=yes 6931c82838c1Smrg ;; 6932c82838c1Smrg 6933c82838c1Smrg*nto* | *qnx*) 6934c82838c1Smrg version_type=qnx 6935c82838c1Smrg need_lib_prefix=no 6936c82838c1Smrg need_version=no 6937c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6938c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 6939c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 6940c82838c1Smrg shlibpath_overrides_runpath=no 6941c82838c1Smrg hardcode_into_libs=yes 6942c82838c1Smrg dynamic_linker='ldqnx.so' 6943c82838c1Smrg ;; 6944c82838c1Smrg 6945c82838c1Smrgopenbsd* | bitrig*) 6946c82838c1Smrg version_type=sunos 6947c82838c1Smrg sys_lib_dlsearch_path_spec=/usr/lib 6948c82838c1Smrg need_lib_prefix=no 6949c82838c1Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6950c82838c1Smrg need_version=no 6951c82838c1Smrg else 6952c82838c1Smrg need_version=yes 6953c82838c1Smrg fi 6954c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6955c82838c1Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6956c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 6957c82838c1Smrg shlibpath_overrides_runpath=yes 6958c82838c1Smrg ;; 6959c82838c1Smrg 6960c82838c1Smrgos2*) 6961c82838c1Smrg libname_spec='$name' 6962c82838c1Smrg version_type=windows 6963c82838c1Smrg shrext_cmds=.dll 6964c82838c1Smrg need_version=no 6965c82838c1Smrg need_lib_prefix=no 6966c82838c1Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 6967c82838c1Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 6968c82838c1Smrg v=$($ECHO $release$versuffix | tr -d .-); 6969c82838c1Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 6970c82838c1Smrg $ECHO $n$v`$shared_ext' 6971c82838c1Smrg library_names_spec='${libname}_dll.$libext' 6972c82838c1Smrg dynamic_linker='OS/2 ld.exe' 6973c82838c1Smrg shlibpath_var=BEGINLIBPATH 6974c82838c1Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 6975c82838c1Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6976c82838c1Smrg postinstall_cmds='base_file=`basename \$file`~ 6977c82838c1Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 6978c82838c1Smrg dldir=$destdir/`dirname \$dlpath`~ 6979c82838c1Smrg test -d \$dldir || mkdir -p \$dldir~ 6980c82838c1Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 6981c82838c1Smrg chmod a+x \$dldir/$dlname~ 6982c82838c1Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6983c82838c1Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6984c82838c1Smrg fi' 6985c82838c1Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 6986c82838c1Smrg dlpath=$dir/\$dldll~ 6987c82838c1Smrg $RM \$dlpath' 6988c82838c1Smrg ;; 6989c82838c1Smrg 6990c82838c1Smrgosf3* | osf4* | osf5*) 6991c82838c1Smrg version_type=osf 6992c82838c1Smrg need_lib_prefix=no 6993c82838c1Smrg need_version=no 6994c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 6995c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6996c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 6997c82838c1Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 6998c82838c1Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6999c82838c1Smrg ;; 7000c82838c1Smrg 7001c82838c1Smrgrdos*) 7002c82838c1Smrg dynamic_linker=no 7003c82838c1Smrg ;; 7004c82838c1Smrg 7005c82838c1Smrgsolaris*) 7006c82838c1Smrg version_type=linux # correct to gnu/linux during the next big refactor 7007c82838c1Smrg need_lib_prefix=no 7008c82838c1Smrg need_version=no 7009c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 7010c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 7011c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 7012c82838c1Smrg shlibpath_overrides_runpath=yes 7013c82838c1Smrg hardcode_into_libs=yes 7014c82838c1Smrg # ldd complains unless libraries are executable 7015c82838c1Smrg postinstall_cmds='chmod +x $lib' 7016c82838c1Smrg ;; 7017c82838c1Smrg 7018c82838c1Smrgsunos4*) 7019c82838c1Smrg version_type=sunos 7020c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 7021c82838c1Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 7022c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 7023c82838c1Smrg shlibpath_overrides_runpath=yes 7024c82838c1Smrg if test yes = "$with_gnu_ld"; then 7025c82838c1Smrg need_lib_prefix=no 7026c82838c1Smrg fi 7027c82838c1Smrg need_version=yes 7028c82838c1Smrg ;; 7029c82838c1Smrg 7030c82838c1Smrgsysv4 | sysv4.3*) 7031c82838c1Smrg version_type=linux # correct to gnu/linux during the next big refactor 7032c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 7033c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 7034c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 7035c82838c1Smrg case $host_vendor in 7036c82838c1Smrg sni) 7037c82838c1Smrg shlibpath_overrides_runpath=no 7038c82838c1Smrg need_lib_prefix=no 7039c82838c1Smrg runpath_var=LD_RUN_PATH 7040c82838c1Smrg ;; 7041c82838c1Smrg siemens) 7042c82838c1Smrg need_lib_prefix=no 7043c82838c1Smrg ;; 7044c82838c1Smrg motorola) 7045c82838c1Smrg need_lib_prefix=no 7046c82838c1Smrg need_version=no 7047c82838c1Smrg shlibpath_overrides_runpath=no 7048c82838c1Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 7049c82838c1Smrg ;; 7050c82838c1Smrg esac 7051c82838c1Smrg ;; 7052c82838c1Smrg 7053c82838c1Smrgsysv4*MP*) 7054c82838c1Smrg if test -d /usr/nec; then 7055c82838c1Smrg version_type=linux # correct to gnu/linux during the next big refactor 7056c82838c1Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 7057c82838c1Smrg soname_spec='$libname$shared_ext.$major' 7058c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 7059c82838c1Smrg fi 7060c82838c1Smrg ;; 7061c82838c1Smrg 7062c82838c1Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 7063c82838c1Smrg version_type=sco 7064c82838c1Smrg need_lib_prefix=no 7065c82838c1Smrg need_version=no 7066c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 7067c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 7068c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 7069c82838c1Smrg shlibpath_overrides_runpath=yes 7070c82838c1Smrg hardcode_into_libs=yes 7071c82838c1Smrg if test yes = "$with_gnu_ld"; then 7072c82838c1Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 7073c82838c1Smrg else 7074c82838c1Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 7075c82838c1Smrg case $host_os in 7076c82838c1Smrg sco3.2v5*) 7077c82838c1Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 7078c82838c1Smrg ;; 7079c82838c1Smrg esac 7080c82838c1Smrg fi 7081c82838c1Smrg sys_lib_dlsearch_path_spec='/usr/lib' 7082c82838c1Smrg ;; 7083c82838c1Smrg 7084c82838c1Smrgtpf*) 7085c82838c1Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 7086c82838c1Smrg version_type=linux # correct to gnu/linux during the next big refactor 7087c82838c1Smrg need_lib_prefix=no 7088c82838c1Smrg need_version=no 7089c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 7090c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 7091c82838c1Smrg shlibpath_overrides_runpath=no 7092c82838c1Smrg hardcode_into_libs=yes 7093c82838c1Smrg ;; 7094c82838c1Smrg 7095c82838c1Smrguts4*) 7096c82838c1Smrg version_type=linux # correct to gnu/linux during the next big refactor 7097c82838c1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 7098c82838c1Smrg soname_spec='$libname$release$shared_ext$major' 7099c82838c1Smrg shlibpath_var=LD_LIBRARY_PATH 7100c82838c1Smrg ;; 7101c82838c1Smrg 7102c82838c1Smrg*) 7103c82838c1Smrg dynamic_linker=no 7104c82838c1Smrg ;; 7105c82838c1Smrgesac 7106c82838c1SmrgAC_MSG_RESULT([$dynamic_linker]) 7107c82838c1Smrgtest no = "$dynamic_linker" && can_build_shared=no 7108c82838c1Smrg 7109c82838c1Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 7110c82838c1Smrgif test yes = "$GCC"; then 7111c82838c1Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 7112c82838c1Smrgfi 7113c82838c1Smrg 7114c82838c1Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 7115c82838c1Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 7116c82838c1Smrgfi 7117c82838c1Smrg 7118c82838c1Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 7119c82838c1Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 7120c82838c1Smrgfi 7121c82838c1Smrg 7122c82838c1Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 7123c82838c1Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 7124c82838c1Smrg 7125c82838c1Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 7126c82838c1Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 7127c82838c1Smrg 7128c82838c1Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 7129c82838c1Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 7130c82838c1Smrg 7131c82838c1Smrg_LT_DECL([], [variables_saved_for_relink], [1], 7132c82838c1Smrg [Variables whose values should be saved in libtool wrapper scripts and 7133c82838c1Smrg restored at link time]) 7134c82838c1Smrg_LT_DECL([], [need_lib_prefix], [0], 7135c82838c1Smrg [Do we need the "lib" prefix for modules?]) 7136c82838c1Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 7137c82838c1Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 7138c82838c1Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 7139c82838c1Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 7140c82838c1Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 7141c82838c1Smrg [Is shlibpath searched before the hard-coded library search path?]) 7142c82838c1Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 7143c82838c1Smrg_LT_DECL([], [library_names_spec], [1], 7144c82838c1Smrg [[List of archive names. First name is the real one, the rest are links. 7145c82838c1Smrg The last name is the one that the linker finds with -lNAME]]) 7146c82838c1Smrg_LT_DECL([], [soname_spec], [1], 7147c82838c1Smrg [[The coded name of the library, if different from the real name]]) 7148c82838c1Smrg_LT_DECL([], [install_override_mode], [1], 7149c82838c1Smrg [Permission mode override for installation of shared libraries]) 7150c82838c1Smrg_LT_DECL([], [postinstall_cmds], [2], 7151c82838c1Smrg [Command to use after installation of a shared archive]) 7152c82838c1Smrg_LT_DECL([], [postuninstall_cmds], [2], 7153c82838c1Smrg [Command to use after uninstallation of a shared archive]) 7154c82838c1Smrg_LT_DECL([], [finish_cmds], [2], 7155c82838c1Smrg [Commands used to finish a libtool library installation in a directory]) 7156c82838c1Smrg_LT_DECL([], [finish_eval], [1], 7157c82838c1Smrg [[As "finish_cmds", except a single script fragment to be evaled but 7158c82838c1Smrg not shown]]) 7159c82838c1Smrg_LT_DECL([], [hardcode_into_libs], [0], 7160c82838c1Smrg [Whether we should hardcode library paths into libraries]) 7161c82838c1Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 7162c82838c1Smrg [Compile-time system search path for libraries]) 7163c82838c1Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 7164c82838c1Smrg [Detected run-time system search path for libraries]) 7165c82838c1Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 7166c82838c1Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 7167c82838c1Smrg])# _LT_SYS_DYNAMIC_LINKER 7168c82838c1Smrg 7169c82838c1Smrg 7170c82838c1Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 7171c82838c1Smrg# -------------------------- 7172c82838c1Smrg# find a file program that can recognize shared library 7173c82838c1SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 7174c82838c1Smrg[m4_require([_LT_DECL_EGREP])dnl 7175c82838c1SmrgAC_MSG_CHECKING([for $1]) 7176c82838c1SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 7177c82838c1Smrg[case $MAGIC_CMD in 7178c82838c1Smrg[[\\/*] | ?:[\\/]*]) 7179c82838c1Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 7180c82838c1Smrg ;; 7181c82838c1Smrg*) 7182c82838c1Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 7183c82838c1Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7184c82838c1Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 7185c82838c1Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 7186c82838c1Smrgdnl not every word. This closes a longstanding sh security hole. 7187c82838c1Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 7188c82838c1Smrg for ac_dir in $ac_dummy; do 7189c82838c1Smrg IFS=$lt_save_ifs 7190c82838c1Smrg test -z "$ac_dir" && ac_dir=. 7191c82838c1Smrg if test -f "$ac_dir/$1"; then 7192c82838c1Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 7193c82838c1Smrg if test -n "$file_magic_test_file"; then 7194c82838c1Smrg case $deplibs_check_method in 7195c82838c1Smrg "file_magic "*) 7196c82838c1Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 7197c82838c1Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 7198c82838c1Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 7199c82838c1Smrg $EGREP "$file_magic_regex" > /dev/null; then 7200c82838c1Smrg : 7201c82838c1Smrg else 7202c82838c1Smrg cat <<_LT_EOF 1>&2 7203c82838c1Smrg 7204c82838c1Smrg*** Warning: the command libtool uses to detect shared libraries, 7205c82838c1Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 7206c82838c1Smrg*** The result is that libtool may fail to recognize shared libraries 7207c82838c1Smrg*** as such. This will affect the creation of libtool libraries that 7208c82838c1Smrg*** depend on shared libraries, but programs linked with such libtool 7209c82838c1Smrg*** libraries will work regardless of this problem. Nevertheless, you 7210c82838c1Smrg*** may want to report the problem to your system manager and/or to 7211c82838c1Smrg*** bug-libtool@gnu.org 7212c82838c1Smrg 7213c82838c1Smrg_LT_EOF 7214c82838c1Smrg fi ;; 7215c82838c1Smrg esac 7216c82838c1Smrg fi 7217c82838c1Smrg break 7218c82838c1Smrg fi 7219c82838c1Smrg done 7220c82838c1Smrg IFS=$lt_save_ifs 7221c82838c1Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 7222c82838c1Smrg ;; 7223c82838c1Smrgesac]) 7224c82838c1SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 7225c82838c1Smrgif test -n "$MAGIC_CMD"; then 7226c82838c1Smrg AC_MSG_RESULT($MAGIC_CMD) 7227c82838c1Smrgelse 7228c82838c1Smrg AC_MSG_RESULT(no) 7229c82838c1Smrgfi 7230c82838c1Smrg_LT_DECL([], [MAGIC_CMD], [0], 7231c82838c1Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 7232c82838c1Smrg])# _LT_PATH_TOOL_PREFIX 7233c82838c1Smrg 7234c82838c1Smrg# Old name: 7235c82838c1SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 7236c82838c1Smrgdnl aclocal-1.4 backwards compatibility: 7237c82838c1Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 7238c82838c1Smrg 7239c82838c1Smrg 7240c82838c1Smrg# _LT_PATH_MAGIC 7241c82838c1Smrg# -------------- 7242c82838c1Smrg# find a file program that can recognize a shared library 7243c82838c1Smrgm4_defun([_LT_PATH_MAGIC], 7244c82838c1Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 7245c82838c1Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 7246c82838c1Smrg if test -n "$ac_tool_prefix"; then 7247c82838c1Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 7248c82838c1Smrg else 7249c82838c1Smrg MAGIC_CMD=: 7250c82838c1Smrg fi 7251c82838c1Smrgfi 7252c82838c1Smrg])# _LT_PATH_MAGIC 7253c82838c1Smrg 7254c82838c1Smrg 7255c82838c1Smrg# LT_PATH_LD 7256c82838c1Smrg# ---------- 7257c82838c1Smrg# find the pathname to the GNU or non-GNU linker 7258c82838c1SmrgAC_DEFUN([LT_PATH_LD], 7259c82838c1Smrg[AC_REQUIRE([AC_PROG_CC])dnl 7260c82838c1SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 7261c82838c1SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7262c82838c1Smrgm4_require([_LT_DECL_SED])dnl 7263c82838c1Smrgm4_require([_LT_DECL_EGREP])dnl 7264c82838c1Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 7265c82838c1Smrg 7266c82838c1SmrgAC_ARG_WITH([gnu-ld], 7267c82838c1Smrg [AS_HELP_STRING([--with-gnu-ld], 7268c82838c1Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 7269c82838c1Smrg [test no = "$withval" || with_gnu_ld=yes], 7270c82838c1Smrg [with_gnu_ld=no])dnl 7271c82838c1Smrg 7272c82838c1Smrgac_prog=ld 7273c82838c1Smrgif test yes = "$GCC"; then 7274c82838c1Smrg # Check if gcc -print-prog-name=ld gives a path. 7275c82838c1Smrg AC_MSG_CHECKING([for ld used by $CC]) 7276c82838c1Smrg case $host in 7277c82838c1Smrg *-*-mingw*) 7278c82838c1Smrg # gcc leaves a trailing carriage return, which upsets mingw 7279c82838c1Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 7280c82838c1Smrg *) 7281c82838c1Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 7282c82838c1Smrg esac 7283c82838c1Smrg case $ac_prog in 7284c82838c1Smrg # Accept absolute paths. 7285c82838c1Smrg [[\\/]]* | ?:[[\\/]]*) 7286c82838c1Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 7287c82838c1Smrg # Canonicalize the pathname of ld 7288c82838c1Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 7289c82838c1Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 7290c82838c1Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 7291c82838c1Smrg done 7292c82838c1Smrg test -z "$LD" && LD=$ac_prog 7293c82838c1Smrg ;; 7294c82838c1Smrg "") 7295c82838c1Smrg # If it fails, then pretend we aren't using GCC. 7296c82838c1Smrg ac_prog=ld 7297c82838c1Smrg ;; 7298c82838c1Smrg *) 7299c82838c1Smrg # If it is relative, then search for the first ld in PATH. 7300c82838c1Smrg with_gnu_ld=unknown 7301c82838c1Smrg ;; 7302c82838c1Smrg esac 7303c82838c1Smrgelif test yes = "$with_gnu_ld"; then 7304c82838c1Smrg AC_MSG_CHECKING([for GNU ld]) 7305c82838c1Smrgelse 7306c82838c1Smrg AC_MSG_CHECKING([for non-GNU ld]) 7307c82838c1Smrgfi 7308c82838c1SmrgAC_CACHE_VAL(lt_cv_path_LD, 7309c82838c1Smrg[if test -z "$LD"; then 7310c82838c1Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7311c82838c1Smrg for ac_dir in $PATH; do 7312c82838c1Smrg IFS=$lt_save_ifs 7313c82838c1Smrg test -z "$ac_dir" && ac_dir=. 7314c82838c1Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 7315c82838c1Smrg lt_cv_path_LD=$ac_dir/$ac_prog 7316c82838c1Smrg # Check to see if the program is GNU ld. I'd rather use --version, 7317c82838c1Smrg # but apparently some variants of GNU ld only accept -v. 7318c82838c1Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 7319c82838c1Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 7320c82838c1Smrg *GNU* | *'with BFD'*) 7321c82838c1Smrg test no != "$with_gnu_ld" && break 7322c82838c1Smrg ;; 7323c82838c1Smrg *) 7324c82838c1Smrg test yes != "$with_gnu_ld" && break 7325c82838c1Smrg ;; 7326c82838c1Smrg esac 7327c82838c1Smrg fi 7328c82838c1Smrg done 7329c82838c1Smrg IFS=$lt_save_ifs 7330c82838c1Smrgelse 7331c82838c1Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 7332c82838c1Smrgfi]) 7333c82838c1SmrgLD=$lt_cv_path_LD 7334c82838c1Smrgif test -n "$LD"; then 7335c82838c1Smrg AC_MSG_RESULT($LD) 7336c82838c1Smrgelse 7337c82838c1Smrg AC_MSG_RESULT(no) 7338c82838c1Smrgfi 7339c82838c1Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 7340c82838c1Smrg_LT_PATH_LD_GNU 7341c82838c1SmrgAC_SUBST([LD]) 7342c82838c1Smrg 7343c82838c1Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 7344c82838c1Smrg])# LT_PATH_LD 7345c82838c1Smrg 7346c82838c1Smrg# Old names: 7347c82838c1SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 7348c82838c1SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 7349c82838c1Smrgdnl aclocal-1.4 backwards compatibility: 7350c82838c1Smrgdnl AC_DEFUN([AM_PROG_LD], []) 7351c82838c1Smrgdnl AC_DEFUN([AC_PROG_LD], []) 7352c82838c1Smrg 7353c82838c1Smrg 7354c82838c1Smrg# _LT_PATH_LD_GNU 7355c82838c1Smrg#- -------------- 7356c82838c1Smrgm4_defun([_LT_PATH_LD_GNU], 7357c82838c1Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 7358c82838c1Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 7359c82838c1Smrgcase `$LD -v 2>&1 </dev/null` in 7360c82838c1Smrg*GNU* | *'with BFD'*) 7361c82838c1Smrg lt_cv_prog_gnu_ld=yes 7362c82838c1Smrg ;; 7363c82838c1Smrg*) 7364c82838c1Smrg lt_cv_prog_gnu_ld=no 7365c82838c1Smrg ;; 7366c82838c1Smrgesac]) 7367c82838c1Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 7368c82838c1Smrg])# _LT_PATH_LD_GNU 7369c82838c1Smrg 7370c82838c1Smrg 7371c82838c1Smrg# _LT_CMD_RELOAD 7372c82838c1Smrg# -------------- 7373c82838c1Smrg# find reload flag for linker 7374c82838c1Smrg# -- PORTME Some linkers may need a different reload flag. 7375c82838c1Smrgm4_defun([_LT_CMD_RELOAD], 7376c82838c1Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 7377c82838c1Smrg lt_cv_ld_reload_flag, 7378c82838c1Smrg [lt_cv_ld_reload_flag='-r']) 7379c82838c1Smrgreload_flag=$lt_cv_ld_reload_flag 7380c82838c1Smrgcase $reload_flag in 7381c82838c1Smrg"" | " "*) ;; 7382c82838c1Smrg*) reload_flag=" $reload_flag" ;; 7383c82838c1Smrgesac 7384c82838c1Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 7385c82838c1Smrgcase $host_os in 7386c82838c1Smrg cygwin* | mingw* | pw32* | cegcc*) 7387c82838c1Smrg if test yes != "$GCC"; then 7388c82838c1Smrg reload_cmds=false 7389c82838c1Smrg fi 7390c82838c1Smrg ;; 7391c82838c1Smrg darwin*) 7392c82838c1Smrg if test yes = "$GCC"; then 7393c82838c1Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 7394c82838c1Smrg else 7395c82838c1Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 7396c82838c1Smrg fi 7397c82838c1Smrg ;; 7398c82838c1Smrgesac 7399c82838c1Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 7400c82838c1Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 7401c82838c1Smrg])# _LT_CMD_RELOAD 7402c82838c1Smrg 7403c82838c1Smrg 7404c82838c1Smrg# _LT_PATH_DD 7405c82838c1Smrg# ----------- 7406c82838c1Smrg# find a working dd 7407c82838c1Smrgm4_defun([_LT_PATH_DD], 7408c82838c1Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 7409c82838c1Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 7410c82838c1Smrgcat conftest.i conftest.i >conftest2.i 7411c82838c1Smrg: ${lt_DD:=$DD} 7412c82838c1SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 7413c82838c1Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 7414c82838c1Smrg cmp -s conftest.i conftest.out \ 7415c82838c1Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 7416c82838c1Smrgfi]) 7417c82838c1Smrgrm -f conftest.i conftest2.i conftest.out]) 7418c82838c1Smrg])# _LT_PATH_DD 7419c82838c1Smrg 7420c82838c1Smrg 7421c82838c1Smrg# _LT_CMD_TRUNCATE 7422c82838c1Smrg# ---------------- 7423c82838c1Smrg# find command to truncate a binary pipe 7424c82838c1Smrgm4_defun([_LT_CMD_TRUNCATE], 7425c82838c1Smrg[m4_require([_LT_PATH_DD]) 7426c82838c1SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 7427c82838c1Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 7428c82838c1Smrgcat conftest.i conftest.i >conftest2.i 7429c82838c1Smrglt_cv_truncate_bin= 7430c82838c1Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 7431c82838c1Smrg cmp -s conftest.i conftest.out \ 7432c82838c1Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 7433c82838c1Smrgfi 7434c82838c1Smrgrm -f conftest.i conftest2.i conftest.out 7435c82838c1Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 7436c82838c1Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 7437c82838c1Smrg [Command to truncate a binary pipe]) 7438c82838c1Smrg])# _LT_CMD_TRUNCATE 7439c82838c1Smrg 7440c82838c1Smrg 7441c82838c1Smrg# _LT_CHECK_MAGIC_METHOD 7442c82838c1Smrg# ---------------------- 7443c82838c1Smrg# how to check for library dependencies 7444c82838c1Smrg# -- PORTME fill in with the dynamic library characteristics 7445c82838c1Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 7446c82838c1Smrg[m4_require([_LT_DECL_EGREP]) 7447c82838c1Smrgm4_require([_LT_DECL_OBJDUMP]) 7448c82838c1SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 7449c82838c1Smrglt_cv_deplibs_check_method, 7450c82838c1Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 7451c82838c1Smrglt_cv_file_magic_test_file= 7452c82838c1Smrglt_cv_deplibs_check_method='unknown' 7453c82838c1Smrg# Need to set the preceding variable on all platforms that support 7454c82838c1Smrg# interlibrary dependencies. 7455c82838c1Smrg# 'none' -- dependencies not supported. 7456c82838c1Smrg# 'unknown' -- same as none, but documents that we really don't know. 7457c82838c1Smrg# 'pass_all' -- all dependencies passed with no checks. 7458c82838c1Smrg# 'test_compile' -- check by making test program. 7459c82838c1Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 7460c82838c1Smrg# that responds to the $file_magic_cmd with a given extended regex. 7461c82838c1Smrg# If you have 'file' or equivalent on your system and you're not sure 7462c82838c1Smrg# whether 'pass_all' will *always* work, you probably want this one. 7463c82838c1Smrg 7464c82838c1Smrgcase $host_os in 7465c82838c1Smrgaix[[4-9]]*) 7466c82838c1Smrg lt_cv_deplibs_check_method=pass_all 7467c82838c1Smrg ;; 7468c82838c1Smrg 7469c82838c1Smrgbeos*) 7470c82838c1Smrg lt_cv_deplibs_check_method=pass_all 7471c82838c1Smrg ;; 7472c82838c1Smrg 7473c82838c1Smrgbsdi[[45]]*) 7474c82838c1Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 7475c82838c1Smrg lt_cv_file_magic_cmd='$FILECMD -L' 7476c82838c1Smrg lt_cv_file_magic_test_file=/shlib/libc.so 7477c82838c1Smrg ;; 7478c82838c1Smrg 7479c82838c1Smrgcygwin*) 7480c82838c1Smrg # func_win32_libid is a shell function defined in ltmain.sh 7481c82838c1Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 7482c82838c1Smrg lt_cv_file_magic_cmd='func_win32_libid' 7483c82838c1Smrg ;; 7484c82838c1Smrg 7485c82838c1Smrgmingw* | pw32*) 7486c82838c1Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 7487c82838c1Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 7488c82838c1Smrg # unless we find 'file', for example because we are cross-compiling. 7489c82838c1Smrg if ( file / ) >/dev/null 2>&1; then 7490c82838c1Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 7491c82838c1Smrg lt_cv_file_magic_cmd='func_win32_libid' 7492c82838c1Smrg else 7493c82838c1Smrg # Keep this pattern in sync with the one in func_win32_libid. 7494c82838c1Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 7495c82838c1Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 7496c82838c1Smrg fi 7497c82838c1Smrg ;; 7498c82838c1Smrg 7499c82838c1Smrgcegcc*) 7500c82838c1Smrg # use the weaker test based on 'objdump'. See mingw*. 7501c82838c1Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 7502c82838c1Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 7503c82838c1Smrg ;; 7504c82838c1Smrg 7505c82838c1Smrgdarwin* | rhapsody*) 7506c82838c1Smrg lt_cv_deplibs_check_method=pass_all 7507c82838c1Smrg ;; 7508c82838c1Smrg 7509c82838c1Smrgfreebsd* | dragonfly* | midnightbsd*) 7510c82838c1Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 7511c82838c1Smrg case $host_cpu in 7512c82838c1Smrg i*86 ) 7513c82838c1Smrg # Not sure whether the presence of OpenBSD here was a mistake. 7514c82838c1Smrg # Let's accept both of them until this is cleared up. 7515c82838c1Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 7516c82838c1Smrg lt_cv_file_magic_cmd=$FILECMD 7517c82838c1Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 7518c82838c1Smrg ;; 7519c82838c1Smrg esac 7520c82838c1Smrg else 7521c82838c1Smrg lt_cv_deplibs_check_method=pass_all 7522c82838c1Smrg fi 7523c82838c1Smrg ;; 7524c82838c1Smrg 7525c82838c1Smrghaiku*) 7526c82838c1Smrg lt_cv_deplibs_check_method=pass_all 7527c82838c1Smrg ;; 7528c82838c1Smrg 7529c82838c1Smrghpux10.20* | hpux11*) 7530c82838c1Smrg lt_cv_file_magic_cmd=$FILECMD 7531c82838c1Smrg case $host_cpu in 7532c82838c1Smrg ia64*) 7533c82838c1Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 7534c82838c1Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 7535c82838c1Smrg ;; 7536c82838c1Smrg hppa*64*) 7537c82838c1Smrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] 7538c82838c1Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 7539c82838c1Smrg ;; 7540c82838c1Smrg *) 7541c82838c1Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 7542c82838c1Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 7543c82838c1Smrg ;; 7544c82838c1Smrg esac 7545c82838c1Smrg ;; 7546c82838c1Smrg 7547c82838c1Smrginterix[[3-9]]*) 7548c82838c1Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 7549c82838c1Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 7550c82838c1Smrg ;; 7551c82838c1Smrg 7552c82838c1Smrgirix5* | irix6* | nonstopux*) 7553c82838c1Smrg case $LD in 7554c82838c1Smrg *-32|*"-32 ") libmagic=32-bit;; 7555c82838c1Smrg *-n32|*"-n32 ") libmagic=N32;; 7556c82838c1Smrg *-64|*"-64 ") libmagic=64-bit;; 7557c82838c1Smrg *) libmagic=never-match;; 7558c82838c1Smrg esac 7559c82838c1Smrg lt_cv_deplibs_check_method=pass_all 7560c82838c1Smrg ;; 7561c82838c1Smrg 7562c82838c1Smrg# This must be glibc/ELF. 7563c82838c1Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7564c82838c1Smrg lt_cv_deplibs_check_method=pass_all 7565c82838c1Smrg ;; 7566c82838c1Smrg 7567c82838c1Smrgnetbsd*) 7568c82838c1Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 7569c82838c1Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 7570c82838c1Smrg else 7571c82838c1Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 7572c82838c1Smrg fi 7573c82838c1Smrg ;; 7574c82838c1Smrg 7575c82838c1Smrgnewos6*) 7576c82838c1Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 7577c82838c1Smrg lt_cv_file_magic_cmd=$FILECMD 7578c82838c1Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 7579c82838c1Smrg ;; 7580c82838c1Smrg 7581c82838c1Smrg*nto* | *qnx*) 7582c82838c1Smrg lt_cv_deplibs_check_method=pass_all 7583c82838c1Smrg ;; 7584c82838c1Smrg 7585c82838c1Smrgopenbsd* | bitrig*) 7586c82838c1Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 7587c82838c1Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 7588c82838c1Smrg else 7589c82838c1Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 7590c82838c1Smrg fi 7591c82838c1Smrg ;; 7592c82838c1Smrg 7593c82838c1Smrgosf3* | osf4* | osf5*) 7594c82838c1Smrg lt_cv_deplibs_check_method=pass_all 7595c82838c1Smrg ;; 7596c82838c1Smrg 7597c82838c1Smrgrdos*) 7598c82838c1Smrg lt_cv_deplibs_check_method=pass_all 7599c82838c1Smrg ;; 7600c82838c1Smrg 7601c82838c1Smrgsolaris*) 7602c82838c1Smrg lt_cv_deplibs_check_method=pass_all 7603c82838c1Smrg ;; 7604c82838c1Smrg 7605c82838c1Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 7606c82838c1Smrg lt_cv_deplibs_check_method=pass_all 7607c82838c1Smrg ;; 7608c82838c1Smrg 7609c82838c1Smrgsysv4 | sysv4.3*) 7610c82838c1Smrg case $host_vendor in 7611c82838c1Smrg motorola) 7612c82838c1Smrg 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]]' 7613c82838c1Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 7614c82838c1Smrg ;; 7615c82838c1Smrg ncr) 7616c82838c1Smrg lt_cv_deplibs_check_method=pass_all 7617c82838c1Smrg ;; 7618c82838c1Smrg sequent) 7619c82838c1Smrg lt_cv_file_magic_cmd='/bin/file' 7620c82838c1Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 7621c82838c1Smrg ;; 7622c82838c1Smrg sni) 7623c82838c1Smrg lt_cv_file_magic_cmd='/bin/file' 7624c82838c1Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 7625c82838c1Smrg lt_cv_file_magic_test_file=/lib/libc.so 7626c82838c1Smrg ;; 7627c82838c1Smrg siemens) 7628c82838c1Smrg lt_cv_deplibs_check_method=pass_all 7629c82838c1Smrg ;; 7630c82838c1Smrg pc) 7631c82838c1Smrg lt_cv_deplibs_check_method=pass_all 7632c82838c1Smrg ;; 7633c82838c1Smrg esac 7634c82838c1Smrg ;; 7635c82838c1Smrg 7636c82838c1Smrgtpf*) 7637c82838c1Smrg lt_cv_deplibs_check_method=pass_all 7638c82838c1Smrg ;; 7639c82838c1Smrgos2*) 7640c82838c1Smrg lt_cv_deplibs_check_method=pass_all 7641c82838c1Smrg ;; 7642c82838c1Smrgesac 7643c82838c1Smrg]) 7644c82838c1Smrg 7645c82838c1Smrgfile_magic_glob= 7646c82838c1Smrgwant_nocaseglob=no 7647c82838c1Smrgif test "$build" = "$host"; then 7648c82838c1Smrg case $host_os in 7649c82838c1Smrg mingw* | pw32*) 7650c82838c1Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 7651c82838c1Smrg want_nocaseglob=yes 7652c82838c1Smrg else 7653c82838c1Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 7654c82838c1Smrg fi 7655c82838c1Smrg ;; 7656c82838c1Smrg esac 7657c82838c1Smrgfi 7658c82838c1Smrg 7659c82838c1Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 7660c82838c1Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 7661c82838c1Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 7662c82838c1Smrg 7663c82838c1Smrg_LT_DECL([], [deplibs_check_method], [1], 7664c82838c1Smrg [Method to check whether dependent libraries are shared objects]) 7665c82838c1Smrg_LT_DECL([], [file_magic_cmd], [1], 7666c82838c1Smrg [Command to use when deplibs_check_method = "file_magic"]) 7667c82838c1Smrg_LT_DECL([], [file_magic_glob], [1], 7668c82838c1Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 7669c82838c1Smrg_LT_DECL([], [want_nocaseglob], [1], 7670c82838c1Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 7671c82838c1Smrg])# _LT_CHECK_MAGIC_METHOD 7672c82838c1Smrg 7673c82838c1Smrg 7674c82838c1Smrg# LT_PATH_NM 7675c82838c1Smrg# ---------- 7676c82838c1Smrg# find the pathname to a BSD- or MS-compatible name lister 7677c82838c1SmrgAC_DEFUN([LT_PATH_NM], 7678c82838c1Smrg[AC_REQUIRE([AC_PROG_CC])dnl 7679c82838c1SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 7680c82838c1Smrg[if test -n "$NM"; then 7681c82838c1Smrg # Let the user override the test. 7682c82838c1Smrg lt_cv_path_NM=$NM 7683c82838c1Smrgelse 7684c82838c1Smrg lt_nm_to_check=${ac_tool_prefix}nm 7685c82838c1Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 7686c82838c1Smrg lt_nm_to_check="$lt_nm_to_check nm" 7687c82838c1Smrg fi 7688c82838c1Smrg for lt_tmp_nm in $lt_nm_to_check; do 7689c82838c1Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7690c82838c1Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 7691c82838c1Smrg IFS=$lt_save_ifs 7692c82838c1Smrg test -z "$ac_dir" && ac_dir=. 7693c82838c1Smrg tmp_nm=$ac_dir/$lt_tmp_nm 7694c82838c1Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 7695c82838c1Smrg # Check to see if the nm accepts a BSD-compat flag. 7696c82838c1Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 7697c82838c1Smrg # nm: unknown option "B" ignored 7698c82838c1Smrg # Tru64's nm complains that /dev/null is an invalid object file 7699c82838c1Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 7700c82838c1Smrg case $build_os in 7701c82838c1Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 7702c82838c1Smrg *) lt_bad_file=/dev/null ;; 7703c82838c1Smrg esac 7704c82838c1Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 7705c82838c1Smrg *$lt_bad_file* | *'Invalid file or object type'*) 7706c82838c1Smrg lt_cv_path_NM="$tmp_nm -B" 7707c82838c1Smrg break 2 7708c82838c1Smrg ;; 7709c82838c1Smrg *) 7710c82838c1Smrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 7711c82838c1Smrg */dev/null*) 7712c82838c1Smrg lt_cv_path_NM="$tmp_nm -p" 7713c82838c1Smrg break 2 7714c82838c1Smrg ;; 7715c82838c1Smrg *) 7716c82838c1Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 7717c82838c1Smrg continue # so that we can try to find one that supports BSD flags 7718c82838c1Smrg ;; 7719c82838c1Smrg esac 7720c82838c1Smrg ;; 7721c82838c1Smrg esac 7722c82838c1Smrg fi 7723c82838c1Smrg done 7724c82838c1Smrg IFS=$lt_save_ifs 7725c82838c1Smrg done 7726c82838c1Smrg : ${lt_cv_path_NM=no} 7727c82838c1Smrgfi]) 7728c82838c1Smrgif test no != "$lt_cv_path_NM"; then 7729c82838c1Smrg NM=$lt_cv_path_NM 7730c82838c1Smrgelse 7731c82838c1Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 7732c82838c1Smrg if test -n "$DUMPBIN"; then : 7733c82838c1Smrg # Let the user override the test. 7734c82838c1Smrg else 7735c82838c1Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 7736c82838c1Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 7737c82838c1Smrg *COFF*) 7738c82838c1Smrg DUMPBIN="$DUMPBIN -symbols -headers" 7739c82838c1Smrg ;; 7740c82838c1Smrg *) 7741c82838c1Smrg DUMPBIN=: 7742c82838c1Smrg ;; 7743c82838c1Smrg esac 7744c82838c1Smrg fi 7745c82838c1Smrg AC_SUBST([DUMPBIN]) 7746c82838c1Smrg if test : != "$DUMPBIN"; then 7747c82838c1Smrg NM=$DUMPBIN 7748c82838c1Smrg fi 7749c82838c1Smrgfi 7750c82838c1Smrgtest -z "$NM" && NM=nm 7751c82838c1SmrgAC_SUBST([NM]) 7752c82838c1Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 7753c82838c1Smrg 7754c82838c1SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 7755c82838c1Smrg [lt_cv_nm_interface="BSD nm" 7756c82838c1Smrg echo "int some_variable = 0;" > conftest.$ac_ext 7757c82838c1Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 7758c82838c1Smrg (eval "$ac_compile" 2>conftest.err) 7759c82838c1Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7760c82838c1Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 7761c82838c1Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 7762c82838c1Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7763c82838c1Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 7764c82838c1Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 7765c82838c1Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 7766c82838c1Smrg lt_cv_nm_interface="MS dumpbin" 7767c82838c1Smrg fi 7768c82838c1Smrg rm -f conftest*]) 7769c82838c1Smrg])# LT_PATH_NM 7770c82838c1Smrg 7771c82838c1Smrg# Old names: 7772c82838c1SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 7773c82838c1SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 7774c82838c1Smrgdnl aclocal-1.4 backwards compatibility: 7775c82838c1Smrgdnl AC_DEFUN([AM_PROG_NM], []) 7776c82838c1Smrgdnl AC_DEFUN([AC_PROG_NM], []) 7777c82838c1Smrg 7778c82838c1Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7779c82838c1Smrg# -------------------------------- 7780c82838c1Smrg# how to determine the name of the shared library 7781c82838c1Smrg# associated with a specific link library. 7782c82838c1Smrg# -- PORTME fill in with the dynamic library characteristics 7783c82838c1Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 7784c82838c1Smrg[m4_require([_LT_DECL_EGREP]) 7785c82838c1Smrgm4_require([_LT_DECL_OBJDUMP]) 7786c82838c1Smrgm4_require([_LT_DECL_DLLTOOL]) 7787c82838c1SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 7788c82838c1Smrglt_cv_sharedlib_from_linklib_cmd, 7789c82838c1Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 7790c82838c1Smrg 7791c82838c1Smrgcase $host_os in 7792c82838c1Smrgcygwin* | mingw* | pw32* | cegcc*) 7793c82838c1Smrg # two different shell functions defined in ltmain.sh; 7794c82838c1Smrg # decide which one to use based on capabilities of $DLLTOOL 7795c82838c1Smrg case `$DLLTOOL --help 2>&1` in 7796c82838c1Smrg *--identify-strict*) 7797c82838c1Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 7798c82838c1Smrg ;; 7799c82838c1Smrg *) 7800c82838c1Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 7801c82838c1Smrg ;; 7802c82838c1Smrg esac 7803c82838c1Smrg ;; 7804c82838c1Smrg*) 7805c82838c1Smrg # fallback: assume linklib IS sharedlib 7806c82838c1Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 7807c82838c1Smrg ;; 7808c82838c1Smrgesac 7809c82838c1Smrg]) 7810c82838c1Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 7811c82838c1Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 7812c82838c1Smrg 7813c82838c1Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 7814c82838c1Smrg [Command to associate shared and link libraries]) 7815c82838c1Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7816c82838c1Smrg 7817c82838c1Smrg 7818c82838c1Smrg# _LT_PATH_MANIFEST_TOOL 7819c82838c1Smrg# ---------------------- 7820c82838c1Smrg# locate the manifest tool 7821c82838c1Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 7822c82838c1Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 7823c82838c1Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 7824c82838c1SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 7825c82838c1Smrg [lt_cv_path_mainfest_tool=no 7826c82838c1Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 7827c82838c1Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 7828c82838c1Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7829c82838c1Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 7830c82838c1Smrg lt_cv_path_mainfest_tool=yes 7831c82838c1Smrg fi 7832c82838c1Smrg rm -f conftest*]) 7833c82838c1Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 7834c82838c1Smrg MANIFEST_TOOL=: 7835c82838c1Smrgfi 7836c82838c1Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 7837c82838c1Smrg])# _LT_PATH_MANIFEST_TOOL 7838c82838c1Smrg 7839c82838c1Smrg 7840c82838c1Smrg# _LT_DLL_DEF_P([FILE]) 7841c82838c1Smrg# --------------------- 7842c82838c1Smrg# True iff FILE is a Windows DLL '.def' file. 7843c82838c1Smrg# Keep in sync with func_dll_def_p in the libtool script 7844c82838c1SmrgAC_DEFUN([_LT_DLL_DEF_P], 7845c82838c1Smrg[dnl 7846c82838c1Smrg test DEF = "`$SED -n dnl 7847c82838c1Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 7848c82838c1Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 7849c82838c1Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 7850c82838c1Smrg -e q dnl Only consider the first "real" line 7851c82838c1Smrg $1`" dnl 7852c82838c1Smrg])# _LT_DLL_DEF_P 7853c82838c1Smrg 7854c82838c1Smrg 7855c82838c1Smrg# LT_LIB_M 7856c82838c1Smrg# -------- 7857c82838c1Smrg# check for math library 7858c82838c1SmrgAC_DEFUN([LT_LIB_M], 7859c82838c1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7860c82838c1SmrgLIBM= 7861c82838c1Smrgcase $host in 7862c82838c1Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 7863c82838c1Smrg # These system don't have libm, or don't need it 7864c82838c1Smrg ;; 7865c82838c1Smrg*-ncr-sysv4.3*) 7866c82838c1Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 7867c82838c1Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 7868c82838c1Smrg ;; 7869c82838c1Smrg*) 7870c82838c1Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 7871c82838c1Smrg ;; 7872c82838c1Smrgesac 7873c82838c1SmrgAC_SUBST([LIBM]) 7874c82838c1Smrg])# LT_LIB_M 7875c82838c1Smrg 7876c82838c1Smrg# Old name: 7877c82838c1SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 7878c82838c1Smrgdnl aclocal-1.4 backwards compatibility: 7879c82838c1Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 7880c82838c1Smrg 7881c82838c1Smrg 7882c82838c1Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 7883c82838c1Smrg# ------------------------------- 7884c82838c1Smrgm4_defun([_LT_COMPILER_NO_RTTI], 7885c82838c1Smrg[m4_require([_LT_TAG_COMPILER])dnl 7886c82838c1Smrg 7887c82838c1Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7888c82838c1Smrg 7889c82838c1Smrgif test yes = "$GCC"; then 7890c82838c1Smrg case $cc_basename in 7891c82838c1Smrg nvcc*) 7892c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 7893c82838c1Smrg *) 7894c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 7895c82838c1Smrg esac 7896c82838c1Smrg 7897c82838c1Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 7898c82838c1Smrg lt_cv_prog_compiler_rtti_exceptions, 7899c82838c1Smrg [-fno-rtti -fno-exceptions], [], 7900c82838c1Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 7901c82838c1Smrgfi 7902c82838c1Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 7903c82838c1Smrg [Compiler flag to turn off builtin functions]) 7904c82838c1Smrg])# _LT_COMPILER_NO_RTTI 7905c82838c1Smrg 7906c82838c1Smrg 7907c82838c1Smrg# _LT_CMD_GLOBAL_SYMBOLS 7908c82838c1Smrg# ---------------------- 7909c82838c1Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 7910c82838c1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7911c82838c1SmrgAC_REQUIRE([AC_PROG_CC])dnl 7912c82838c1SmrgAC_REQUIRE([AC_PROG_AWK])dnl 7913c82838c1SmrgAC_REQUIRE([LT_PATH_NM])dnl 7914c82838c1SmrgAC_REQUIRE([LT_PATH_LD])dnl 7915c82838c1Smrgm4_require([_LT_DECL_SED])dnl 7916c82838c1Smrgm4_require([_LT_DECL_EGREP])dnl 7917c82838c1Smrgm4_require([_LT_TAG_COMPILER])dnl 7918c82838c1Smrg 7919c82838c1Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 7920c82838c1SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 7921c82838c1SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 7922c82838c1Smrg[ 7923c82838c1Smrg# These are sane defaults that work on at least a few old systems. 7924c82838c1Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 7925c82838c1Smrg 7926c82838c1Smrg# Character class describing NM global symbol codes. 7927c82838c1Smrgsymcode='[[BCDEGRST]]' 7928c82838c1Smrg 7929c82838c1Smrg# Regexp to match symbols that can be accessed directly from C. 7930c82838c1Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 7931c82838c1Smrg 7932c82838c1Smrg# Define system-specific variables. 7933c82838c1Smrgcase $host_os in 7934c82838c1Smrgaix*) 7935c82838c1Smrg symcode='[[BCDT]]' 7936c82838c1Smrg ;; 7937c82838c1Smrgcygwin* | mingw* | pw32* | cegcc*) 7938c82838c1Smrg symcode='[[ABCDGISTW]]' 7939c82838c1Smrg ;; 7940c82838c1Smrghpux*) 7941c82838c1Smrg if test ia64 = "$host_cpu"; then 7942c82838c1Smrg symcode='[[ABCDEGRST]]' 7943c82838c1Smrg fi 7944c82838c1Smrg ;; 7945c82838c1Smrgirix* | nonstopux*) 7946c82838c1Smrg symcode='[[BCDEGRST]]' 7947c82838c1Smrg ;; 7948c82838c1Smrgosf*) 7949c82838c1Smrg symcode='[[BCDEGQRST]]' 7950c82838c1Smrg ;; 7951c82838c1Smrgsolaris*) 7952c82838c1Smrg symcode='[[BDRT]]' 7953c82838c1Smrg ;; 7954c82838c1Smrgsco3.2v5*) 7955c82838c1Smrg symcode='[[DT]]' 7956c82838c1Smrg ;; 7957c82838c1Smrgsysv4.2uw2*) 7958c82838c1Smrg symcode='[[DT]]' 7959c82838c1Smrg ;; 7960c82838c1Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 7961c82838c1Smrg symcode='[[ABDT]]' 7962c82838c1Smrg ;; 7963c82838c1Smrgsysv4) 7964c82838c1Smrg symcode='[[DFNSTU]]' 7965c82838c1Smrg ;; 7966c82838c1Smrgesac 7967c82838c1Smrg 7968c82838c1Smrg# If we're using GNU nm, then use its standard symbol codes. 7969c82838c1Smrgcase `$NM -V 2>&1` in 7970c82838c1Smrg*GNU* | *'with BFD'*) 7971c82838c1Smrg symcode='[[ABCDGIRSTW]]' ;; 7972c82838c1Smrgesac 7973c82838c1Smrg 7974c82838c1Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7975c82838c1Smrg # Gets list of data symbols to import. 7976c82838c1Smrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 7977c82838c1Smrg # Adjust the below global symbol transforms to fixup imported variables. 7978c82838c1Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 7979c82838c1Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 7980c82838c1Smrg lt_c_name_lib_hook="\ 7981c82838c1Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 7982c82838c1Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 7983c82838c1Smrgelse 7984c82838c1Smrg # Disable hooks by default. 7985c82838c1Smrg lt_cv_sys_global_symbol_to_import= 7986c82838c1Smrg lt_cdecl_hook= 7987c82838c1Smrg lt_c_name_hook= 7988c82838c1Smrg lt_c_name_lib_hook= 7989c82838c1Smrgfi 7990c82838c1Smrg 7991c82838c1Smrg# Transform an extracted symbol line into a proper C declaration. 7992c82838c1Smrg# Some systems (esp. on ia64) link data and code symbols differently, 7993c82838c1Smrg# so use this general approach. 7994c82838c1Smrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 7995c82838c1Smrg$lt_cdecl_hook\ 7996c82838c1Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 7997c82838c1Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 7998c82838c1Smrg 7999c82838c1Smrg# Transform an extracted symbol line into symbol name and symbol address 8000c82838c1Smrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 8001c82838c1Smrg$lt_c_name_hook\ 8002c82838c1Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 8003c82838c1Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 8004c82838c1Smrg 8005c82838c1Smrg# Transform an extracted symbol line into symbol name with lib prefix and 8006c82838c1Smrg# symbol address. 8007c82838c1Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 8008c82838c1Smrg$lt_c_name_lib_hook\ 8009c82838c1Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 8010c82838c1Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 8011c82838c1Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 8012c82838c1Smrg 8013c82838c1Smrg# Handle CRLF in mingw tool chain 8014c82838c1Smrgopt_cr= 8015c82838c1Smrgcase $build_os in 8016c82838c1Smrgmingw*) 8017c82838c1Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 8018c82838c1Smrg ;; 8019c82838c1Smrgesac 8020c82838c1Smrg 8021c82838c1Smrg# Try without a prefix underscore, then with it. 8022c82838c1Smrgfor ac_symprfx in "" "_"; do 8023c82838c1Smrg 8024c82838c1Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 8025c82838c1Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 8026c82838c1Smrg 8027c82838c1Smrg # Write the raw and C identifiers. 8028c82838c1Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 8029c82838c1Smrg # Fake it for dumpbin and say T for any non-static function, 8030c82838c1Smrg # D for any global variable and I for any imported variable. 8031c82838c1Smrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 8032c82838c1Smrg # which start with @ or ?. 8033c82838c1Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 8034c82838c1Smrg" {last_section=section; section=\$ 3};"\ 8035c82838c1Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 8036c82838c1Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 8037c82838c1Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 8038c82838c1Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 8039c82838c1Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 8040c82838c1Smrg" \$ 0!~/External *\|/{next};"\ 8041c82838c1Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 8042c82838c1Smrg" {if(hide[section]) next};"\ 8043c82838c1Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 8044c82838c1Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 8045c82838c1Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 8046c82838c1Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 8047c82838c1Smrg" ' prfx=^$ac_symprfx]" 8048c82838c1Smrg else 8049c82838c1Smrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 8050c82838c1Smrg fi 8051c82838c1Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 8052c82838c1Smrg 8053c82838c1Smrg # Check to see that the pipe works correctly. 8054c82838c1Smrg pipe_works=no 8055c82838c1Smrg 8056c82838c1Smrg rm -f conftest* 8057c82838c1Smrg cat > conftest.$ac_ext <<_LT_EOF 8058c82838c1Smrg#ifdef __cplusplus 8059c82838c1Smrgextern "C" { 8060c82838c1Smrg#endif 8061c82838c1Smrgchar nm_test_var; 8062c82838c1Smrgvoid nm_test_func(void); 8063c82838c1Smrgvoid nm_test_func(void){} 8064c82838c1Smrg#ifdef __cplusplus 8065c82838c1Smrg} 8066c82838c1Smrg#endif 8067c82838c1Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 8068c82838c1Smrg_LT_EOF 8069c82838c1Smrg 8070c82838c1Smrg if AC_TRY_EVAL(ac_compile); then 8071c82838c1Smrg # Now try to grab the symbols. 8072c82838c1Smrg nlist=conftest.nm 8073c82838c1Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 8074c82838c1Smrg # Try sorting and uniquifying the output. 8075c82838c1Smrg if sort "$nlist" | uniq > "$nlist"T; then 8076c82838c1Smrg mv -f "$nlist"T "$nlist" 8077c82838c1Smrg else 8078c82838c1Smrg rm -f "$nlist"T 8079c82838c1Smrg fi 8080c82838c1Smrg 8081c82838c1Smrg # Make sure that we snagged all the symbols we need. 8082c82838c1Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 8083c82838c1Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 8084c82838c1Smrg cat <<_LT_EOF > conftest.$ac_ext 8085c82838c1Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 8086c82838c1Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 8087c82838c1Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 8088c82838c1Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 8089c82838c1Smrg# define LT@&t@_DLSYM_CONST 8090c82838c1Smrg#elif defined __osf__ 8091c82838c1Smrg/* This system does not cope well with relocations in const data. */ 8092c82838c1Smrg# define LT@&t@_DLSYM_CONST 8093c82838c1Smrg#else 8094c82838c1Smrg# define LT@&t@_DLSYM_CONST const 8095c82838c1Smrg#endif 8096c82838c1Smrg 8097c82838c1Smrg#ifdef __cplusplus 8098c82838c1Smrgextern "C" { 8099c82838c1Smrg#endif 8100c82838c1Smrg 8101c82838c1Smrg_LT_EOF 8102c82838c1Smrg # Now generate the symbol file. 8103c82838c1Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 8104c82838c1Smrg 8105c82838c1Smrg cat <<_LT_EOF >> conftest.$ac_ext 8106c82838c1Smrg 8107c82838c1Smrg/* The mapping between symbol names and symbols. */ 8108c82838c1SmrgLT@&t@_DLSYM_CONST struct { 8109c82838c1Smrg const char *name; 8110c82838c1Smrg void *address; 8111c82838c1Smrg} 8112c82838c1Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 8113c82838c1Smrg{ 8114c82838c1Smrg { "@PROGRAM@", (void *) 0 }, 8115c82838c1Smrg_LT_EOF 8116c82838c1Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 8117c82838c1Smrg cat <<\_LT_EOF >> conftest.$ac_ext 8118c82838c1Smrg {0, (void *) 0} 8119c82838c1Smrg}; 8120c82838c1Smrg 8121c82838c1Smrg/* This works around a problem in FreeBSD linker */ 8122c82838c1Smrg#ifdef FREEBSD_WORKAROUND 8123c82838c1Smrgstatic const void *lt_preloaded_setup() { 8124c82838c1Smrg return lt__PROGRAM__LTX_preloaded_symbols; 8125c82838c1Smrg} 8126c82838c1Smrg#endif 8127c82838c1Smrg 8128c82838c1Smrg#ifdef __cplusplus 8129c82838c1Smrg} 8130c82838c1Smrg#endif 8131c82838c1Smrg_LT_EOF 8132c82838c1Smrg # Now try linking the two files. 8133c82838c1Smrg mv conftest.$ac_objext conftstm.$ac_objext 8134c82838c1Smrg lt_globsym_save_LIBS=$LIBS 8135c82838c1Smrg lt_globsym_save_CFLAGS=$CFLAGS 8136c82838c1Smrg LIBS=conftstm.$ac_objext 8137c82838c1Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 8138c82838c1Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 8139c82838c1Smrg pipe_works=yes 8140c82838c1Smrg fi 8141c82838c1Smrg LIBS=$lt_globsym_save_LIBS 8142c82838c1Smrg CFLAGS=$lt_globsym_save_CFLAGS 8143c82838c1Smrg else 8144c82838c1Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 8145c82838c1Smrg fi 8146c82838c1Smrg else 8147c82838c1Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 8148c82838c1Smrg fi 8149c82838c1Smrg else 8150c82838c1Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 8151c82838c1Smrg fi 8152c82838c1Smrg else 8153c82838c1Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 8154c82838c1Smrg cat conftest.$ac_ext >&5 8155c82838c1Smrg fi 8156c82838c1Smrg rm -rf conftest* conftst* 8157c82838c1Smrg 8158c82838c1Smrg # Do not use the global_symbol_pipe unless it works. 8159c82838c1Smrg if test yes = "$pipe_works"; then 8160c82838c1Smrg break 8161c82838c1Smrg else 8162c82838c1Smrg lt_cv_sys_global_symbol_pipe= 8163c82838c1Smrg fi 8164c82838c1Smrgdone 8165c82838c1Smrg]) 8166c82838c1Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 8167c82838c1Smrg lt_cv_sys_global_symbol_to_cdecl= 8168c82838c1Smrgfi 8169c82838c1Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 8170c82838c1Smrg AC_MSG_RESULT(failed) 8171c82838c1Smrgelse 8172c82838c1Smrg AC_MSG_RESULT(ok) 8173c82838c1Smrgfi 8174c82838c1Smrg 8175c82838c1Smrg# Response file support. 8176c82838c1Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 8177c82838c1Smrg nm_file_list_spec='@' 8178c82838c1Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 8179c82838c1Smrg nm_file_list_spec='@' 8180c82838c1Smrgfi 8181c82838c1Smrg 8182c82838c1Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 8183c82838c1Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 8184c82838c1Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 8185c82838c1Smrg [Transform the output of nm in a proper C declaration]) 8186c82838c1Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 8187c82838c1Smrg [Transform the output of nm into a list of symbols to manually relocate]) 8188c82838c1Smrg_LT_DECL([global_symbol_to_c_name_address], 8189c82838c1Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 8190c82838c1Smrg [Transform the output of nm in a C name address pair]) 8191c82838c1Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 8192c82838c1Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 8193c82838c1Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 8194c82838c1Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 8195c82838c1Smrg [The name lister interface]) 8196c82838c1Smrg_LT_DECL([], [nm_file_list_spec], [1], 8197c82838c1Smrg [Specify filename containing input files for $NM]) 8198c82838c1Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 8199c82838c1Smrg 8200c82838c1Smrg 8201c82838c1Smrg# _LT_COMPILER_PIC([TAGNAME]) 8202c82838c1Smrg# --------------------------- 8203c82838c1Smrgm4_defun([_LT_COMPILER_PIC], 8204c82838c1Smrg[m4_require([_LT_TAG_COMPILER])dnl 8205c82838c1Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 8206c82838c1Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 8207c82838c1Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 8208c82838c1Smrg 8209c82838c1Smrgm4_if([$1], [CXX], [ 8210c82838c1Smrg # C++ specific cases for pic, static, wl, etc. 8211c82838c1Smrg if test yes = "$GXX"; then 8212c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8213c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8214c82838c1Smrg 8215c82838c1Smrg case $host_os in 8216c82838c1Smrg aix*) 8217c82838c1Smrg # All AIX code is PIC. 8218c82838c1Smrg if test ia64 = "$host_cpu"; then 8219c82838c1Smrg # AIX 5 now supports IA64 processor 8220c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8221c82838c1Smrg fi 8222c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8223c82838c1Smrg ;; 8224c82838c1Smrg 8225c82838c1Smrg amigaos*) 8226c82838c1Smrg case $host_cpu in 8227c82838c1Smrg powerpc) 8228c82838c1Smrg # see comment about AmigaOS4 .so support 8229c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8230c82838c1Smrg ;; 8231c82838c1Smrg m68k) 8232c82838c1Smrg # FIXME: we need at least 68020 code to build shared libraries, but 8233c82838c1Smrg # adding the '-m68020' flag to GCC prevents building anything better, 8234c82838c1Smrg # like '-m68040'. 8235c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 8236c82838c1Smrg ;; 8237c82838c1Smrg esac 8238c82838c1Smrg ;; 8239c82838c1Smrg 8240c82838c1Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 8241c82838c1Smrg # PIC is the default for these OSes. 8242c82838c1Smrg ;; 8243c82838c1Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 8244c82838c1Smrg # This hack is so that the source file can tell whether it is being 8245c82838c1Smrg # built for inclusion in a dll (and should export symbols for example). 8246c82838c1Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 8247c82838c1Smrg # (--disable-auto-import) libraries 8248c82838c1Smrg m4_if([$1], [GCJ], [], 8249c82838c1Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8250c82838c1Smrg case $host_os in 8251c82838c1Smrg os2*) 8252c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8253c82838c1Smrg ;; 8254c82838c1Smrg esac 8255c82838c1Smrg ;; 8256c82838c1Smrg darwin* | rhapsody*) 8257c82838c1Smrg # PIC is the default on this platform 8258c82838c1Smrg # Common symbols not allowed in MH_DYLIB files 8259c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8260c82838c1Smrg ;; 8261c82838c1Smrg *djgpp*) 8262c82838c1Smrg # DJGPP does not support shared libraries at all 8263c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8264c82838c1Smrg ;; 8265c82838c1Smrg haiku*) 8266c82838c1Smrg # PIC is the default for Haiku. 8267c82838c1Smrg # The "-static" flag exists, but is broken. 8268c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 8269c82838c1Smrg ;; 8270c82838c1Smrg interix[[3-9]]*) 8271c82838c1Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 8272c82838c1Smrg # Instead, we relocate shared libraries at runtime. 8273c82838c1Smrg ;; 8274c82838c1Smrg sysv4*MP*) 8275c82838c1Smrg if test -d /usr/nec; then 8276c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 8277c82838c1Smrg fi 8278c82838c1Smrg ;; 8279c82838c1Smrg hpux*) 8280c82838c1Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 8281c82838c1Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 8282c82838c1Smrg # sets the default TLS model and affects inlining. 8283c82838c1Smrg case $host_cpu in 8284c82838c1Smrg hppa*64*) 8285c82838c1Smrg ;; 8286c82838c1Smrg *) 8287c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8288c82838c1Smrg ;; 8289c82838c1Smrg esac 8290c82838c1Smrg ;; 8291c82838c1Smrg *qnx* | *nto*) 8292c82838c1Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8293c82838c1Smrg # it will coredump. 8294c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8295c82838c1Smrg ;; 8296c82838c1Smrg *) 8297c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8298c82838c1Smrg ;; 8299c82838c1Smrg esac 8300c82838c1Smrg else 8301c82838c1Smrg case $host_os in 8302c82838c1Smrg aix[[4-9]]*) 8303c82838c1Smrg # All AIX code is PIC. 8304c82838c1Smrg if test ia64 = "$host_cpu"; then 8305c82838c1Smrg # AIX 5 now supports IA64 processor 8306c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8307c82838c1Smrg else 8308c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 8309c82838c1Smrg fi 8310c82838c1Smrg ;; 8311c82838c1Smrg chorus*) 8312c82838c1Smrg case $cc_basename in 8313c82838c1Smrg cxch68*) 8314c82838c1Smrg # Green Hills C++ Compiler 8315c82838c1Smrg # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" 8316c82838c1Smrg ;; 8317c82838c1Smrg esac 8318c82838c1Smrg ;; 8319c82838c1Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 8320c82838c1Smrg # This hack is so that the source file can tell whether it is being 8321c82838c1Smrg # built for inclusion in a dll (and should export symbols for example). 8322c82838c1Smrg m4_if([$1], [GCJ], [], 8323c82838c1Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8324c82838c1Smrg ;; 8325c82838c1Smrg dgux*) 8326c82838c1Smrg case $cc_basename in 8327c82838c1Smrg ec++*) 8328c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8329c82838c1Smrg ;; 8330c82838c1Smrg ghcx*) 8331c82838c1Smrg # Green Hills C++ Compiler 8332c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8333c82838c1Smrg ;; 8334c82838c1Smrg *) 8335c82838c1Smrg ;; 8336c82838c1Smrg esac 8337c82838c1Smrg ;; 8338c82838c1Smrg freebsd* | dragonfly* | midnightbsd*) 8339c82838c1Smrg # FreeBSD uses GNU C++ 8340c82838c1Smrg ;; 8341c82838c1Smrg hpux9* | hpux10* | hpux11*) 8342c82838c1Smrg case $cc_basename in 8343c82838c1Smrg CC*) 8344c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8345c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8346c82838c1Smrg if test ia64 != "$host_cpu"; then 8347c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8348c82838c1Smrg fi 8349c82838c1Smrg ;; 8350c82838c1Smrg aCC*) 8351c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8352c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8353c82838c1Smrg case $host_cpu in 8354c82838c1Smrg hppa*64*|ia64*) 8355c82838c1Smrg # +Z the default 8356c82838c1Smrg ;; 8357c82838c1Smrg *) 8358c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8359c82838c1Smrg ;; 8360c82838c1Smrg esac 8361c82838c1Smrg ;; 8362c82838c1Smrg *) 8363c82838c1Smrg ;; 8364c82838c1Smrg esac 8365c82838c1Smrg ;; 8366c82838c1Smrg interix*) 8367c82838c1Smrg # This is c89, which is MS Visual C++ (no shared libs) 8368c82838c1Smrg # Anyone wants to do a port? 8369c82838c1Smrg ;; 8370c82838c1Smrg irix5* | irix6* | nonstopux*) 8371c82838c1Smrg case $cc_basename in 8372c82838c1Smrg CC*) 8373c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8374c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8375c82838c1Smrg # CC pic flag -KPIC is the default. 8376c82838c1Smrg ;; 8377c82838c1Smrg *) 8378c82838c1Smrg ;; 8379c82838c1Smrg esac 8380c82838c1Smrg ;; 8381c82838c1Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 8382c82838c1Smrg case $cc_basename in 8383c82838c1Smrg KCC*) 8384c82838c1Smrg # KAI C++ Compiler 8385c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 8386c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8387c82838c1Smrg ;; 8388c82838c1Smrg ecpc* ) 8389c82838c1Smrg # old Intel C++ for x86_64, which still supported -KPIC. 8390c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8391c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8392c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8393c82838c1Smrg ;; 8394c82838c1Smrg icpc* ) 8395c82838c1Smrg # Intel C++, used to be incompatible with GCC. 8396c82838c1Smrg # ICC 10 doesn't accept -KPIC any more. 8397c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8398c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8399c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8400c82838c1Smrg ;; 8401c82838c1Smrg pgCC* | pgcpp*) 8402c82838c1Smrg # Portland Group C++ compiler 8403c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8404c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8405c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8406c82838c1Smrg ;; 8407c82838c1Smrg cxx*) 8408c82838c1Smrg # Compaq C++ 8409c82838c1Smrg # Make sure the PIC flag is empty. It appears that all Alpha 8410c82838c1Smrg # Linux and Compaq Tru64 Unix objects are PIC. 8411c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8412c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8413c82838c1Smrg ;; 8414c82838c1Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 8415c82838c1Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 8416c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8417c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 8418c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 8419c82838c1Smrg ;; 8420c82838c1Smrg *) 8421c82838c1Smrg case `$CC -V 2>&1 | $SED 5q` in 8422c82838c1Smrg *Sun\ C*) 8423c82838c1Smrg # Sun C++ 5.9 8424c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8425c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8426c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8427c82838c1Smrg ;; 8428c82838c1Smrg esac 8429c82838c1Smrg ;; 8430c82838c1Smrg esac 8431c82838c1Smrg ;; 8432c82838c1Smrg lynxos*) 8433c82838c1Smrg ;; 8434c82838c1Smrg m88k*) 8435c82838c1Smrg ;; 8436c82838c1Smrg mvs*) 8437c82838c1Smrg case $cc_basename in 8438c82838c1Smrg cxx*) 8439c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 8440c82838c1Smrg ;; 8441c82838c1Smrg *) 8442c82838c1Smrg ;; 8443c82838c1Smrg esac 8444c82838c1Smrg ;; 8445c82838c1Smrg netbsd*) 8446c82838c1Smrg ;; 8447c82838c1Smrg *qnx* | *nto*) 8448c82838c1Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8449c82838c1Smrg # it will coredump. 8450c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8451c82838c1Smrg ;; 8452c82838c1Smrg osf3* | osf4* | osf5*) 8453c82838c1Smrg case $cc_basename in 8454c82838c1Smrg KCC*) 8455c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 8456c82838c1Smrg ;; 8457c82838c1Smrg RCC*) 8458c82838c1Smrg # Rational C++ 2.4.1 8459c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8460c82838c1Smrg ;; 8461c82838c1Smrg cxx*) 8462c82838c1Smrg # Digital/Compaq C++ 8463c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8464c82838c1Smrg # Make sure the PIC flag is empty. It appears that all Alpha 8465c82838c1Smrg # Linux and Compaq Tru64 Unix objects are PIC. 8466c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8467c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8468c82838c1Smrg ;; 8469c82838c1Smrg *) 8470c82838c1Smrg ;; 8471c82838c1Smrg esac 8472c82838c1Smrg ;; 8473c82838c1Smrg psos*) 8474c82838c1Smrg ;; 8475c82838c1Smrg solaris*) 8476c82838c1Smrg case $cc_basename in 8477c82838c1Smrg CC* | sunCC*) 8478c82838c1Smrg # Sun C++ 4.2, 5.x and Centerline C++ 8479c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8480c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8481c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8482c82838c1Smrg ;; 8483c82838c1Smrg gcx*) 8484c82838c1Smrg # Green Hills C++ Compiler 8485c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8486c82838c1Smrg ;; 8487c82838c1Smrg *) 8488c82838c1Smrg ;; 8489c82838c1Smrg esac 8490c82838c1Smrg ;; 8491c82838c1Smrg sunos4*) 8492c82838c1Smrg case $cc_basename in 8493c82838c1Smrg CC*) 8494c82838c1Smrg # Sun C++ 4.x 8495c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8496c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8497c82838c1Smrg ;; 8498c82838c1Smrg lcc*) 8499c82838c1Smrg # Lucid 8500c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8501c82838c1Smrg ;; 8502c82838c1Smrg *) 8503c82838c1Smrg ;; 8504c82838c1Smrg esac 8505c82838c1Smrg ;; 8506c82838c1Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8507c82838c1Smrg case $cc_basename in 8508c82838c1Smrg CC*) 8509c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8510c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8511c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8512c82838c1Smrg ;; 8513c82838c1Smrg esac 8514c82838c1Smrg ;; 8515c82838c1Smrg tandem*) 8516c82838c1Smrg case $cc_basename in 8517c82838c1Smrg NCC*) 8518c82838c1Smrg # NonStop-UX NCC 3.20 8519c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8520c82838c1Smrg ;; 8521c82838c1Smrg *) 8522c82838c1Smrg ;; 8523c82838c1Smrg esac 8524c82838c1Smrg ;; 8525c82838c1Smrg vxworks*) 8526c82838c1Smrg ;; 8527c82838c1Smrg *) 8528c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8529c82838c1Smrg ;; 8530c82838c1Smrg esac 8531c82838c1Smrg fi 8532c82838c1Smrg], 8533c82838c1Smrg[ 8534c82838c1Smrg if test yes = "$GCC"; then 8535c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8536c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8537c82838c1Smrg 8538c82838c1Smrg case $host_os in 8539c82838c1Smrg aix*) 8540c82838c1Smrg # All AIX code is PIC. 8541c82838c1Smrg if test ia64 = "$host_cpu"; then 8542c82838c1Smrg # AIX 5 now supports IA64 processor 8543c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8544c82838c1Smrg fi 8545c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8546c82838c1Smrg ;; 8547c82838c1Smrg 8548c82838c1Smrg amigaos*) 8549c82838c1Smrg case $host_cpu in 8550c82838c1Smrg powerpc) 8551c82838c1Smrg # see comment about AmigaOS4 .so support 8552c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8553c82838c1Smrg ;; 8554c82838c1Smrg m68k) 8555c82838c1Smrg # FIXME: we need at least 68020 code to build shared libraries, but 8556c82838c1Smrg # adding the '-m68020' flag to GCC prevents building anything better, 8557c82838c1Smrg # like '-m68040'. 8558c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 8559c82838c1Smrg ;; 8560c82838c1Smrg esac 8561c82838c1Smrg ;; 8562c82838c1Smrg 8563c82838c1Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 8564c82838c1Smrg # PIC is the default for these OSes. 8565c82838c1Smrg ;; 8566c82838c1Smrg 8567c82838c1Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 8568c82838c1Smrg # This hack is so that the source file can tell whether it is being 8569c82838c1Smrg # built for inclusion in a dll (and should export symbols for example). 8570c82838c1Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 8571c82838c1Smrg # (--disable-auto-import) libraries 8572c82838c1Smrg m4_if([$1], [GCJ], [], 8573c82838c1Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8574c82838c1Smrg case $host_os in 8575c82838c1Smrg os2*) 8576c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8577c82838c1Smrg ;; 8578c82838c1Smrg esac 8579c82838c1Smrg ;; 8580c82838c1Smrg 8581c82838c1Smrg darwin* | rhapsody*) 8582c82838c1Smrg # PIC is the default on this platform 8583c82838c1Smrg # Common symbols not allowed in MH_DYLIB files 8584c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8585c82838c1Smrg ;; 8586c82838c1Smrg 8587c82838c1Smrg haiku*) 8588c82838c1Smrg # PIC is the default for Haiku. 8589c82838c1Smrg # The "-static" flag exists, but is broken. 8590c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 8591c82838c1Smrg ;; 8592c82838c1Smrg 8593c82838c1Smrg hpux*) 8594c82838c1Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 8595c82838c1Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 8596c82838c1Smrg # sets the default TLS model and affects inlining. 8597c82838c1Smrg case $host_cpu in 8598c82838c1Smrg hppa*64*) 8599c82838c1Smrg # +Z the default 8600c82838c1Smrg ;; 8601c82838c1Smrg *) 8602c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8603c82838c1Smrg ;; 8604c82838c1Smrg esac 8605c82838c1Smrg ;; 8606c82838c1Smrg 8607c82838c1Smrg interix[[3-9]]*) 8608c82838c1Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 8609c82838c1Smrg # Instead, we relocate shared libraries at runtime. 8610c82838c1Smrg ;; 8611c82838c1Smrg 8612c82838c1Smrg msdosdjgpp*) 8613c82838c1Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 8614c82838c1Smrg # on systems that don't support them. 8615c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8616c82838c1Smrg enable_shared=no 8617c82838c1Smrg ;; 8618c82838c1Smrg 8619c82838c1Smrg *nto* | *qnx*) 8620c82838c1Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8621c82838c1Smrg # it will coredump. 8622c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8623c82838c1Smrg ;; 8624c82838c1Smrg 8625c82838c1Smrg sysv4*MP*) 8626c82838c1Smrg if test -d /usr/nec; then 8627c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 8628c82838c1Smrg fi 8629c82838c1Smrg ;; 8630c82838c1Smrg 8631c82838c1Smrg *) 8632c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8633c82838c1Smrg ;; 8634c82838c1Smrg esac 8635c82838c1Smrg 8636c82838c1Smrg case $cc_basename in 8637c82838c1Smrg nvcc*) # Cuda Compiler Driver 2.2 8638c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 8639c82838c1Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8640c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 8641c82838c1Smrg fi 8642c82838c1Smrg ;; 8643c82838c1Smrg esac 8644c82838c1Smrg else 8645c82838c1Smrg # PORTME Check for flag to pass linker flags through the system compiler. 8646c82838c1Smrg case $host_os in 8647c82838c1Smrg aix*) 8648c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8649c82838c1Smrg if test ia64 = "$host_cpu"; then 8650c82838c1Smrg # AIX 5 now supports IA64 processor 8651c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8652c82838c1Smrg else 8653c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 8654c82838c1Smrg fi 8655c82838c1Smrg ;; 8656c82838c1Smrg 8657c82838c1Smrg darwin* | rhapsody*) 8658c82838c1Smrg # PIC is the default on this platform 8659c82838c1Smrg # Common symbols not allowed in MH_DYLIB files 8660c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8661c82838c1Smrg case $cc_basename in 8662c82838c1Smrg nagfor*) 8663c82838c1Smrg # NAG Fortran compiler 8664c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8665c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8666c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8667c82838c1Smrg ;; 8668c82838c1Smrg esac 8669c82838c1Smrg ;; 8670c82838c1Smrg 8671c82838c1Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 8672c82838c1Smrg # This hack is so that the source file can tell whether it is being 8673c82838c1Smrg # built for inclusion in a dll (and should export symbols for example). 8674c82838c1Smrg m4_if([$1], [GCJ], [], 8675c82838c1Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8676c82838c1Smrg case $host_os in 8677c82838c1Smrg os2*) 8678c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8679c82838c1Smrg ;; 8680c82838c1Smrg esac 8681c82838c1Smrg ;; 8682c82838c1Smrg 8683c82838c1Smrg hpux9* | hpux10* | hpux11*) 8684c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8685c82838c1Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 8686c82838c1Smrg # not for PA HP-UX. 8687c82838c1Smrg case $host_cpu in 8688c82838c1Smrg hppa*64*|ia64*) 8689c82838c1Smrg # +Z the default 8690c82838c1Smrg ;; 8691c82838c1Smrg *) 8692c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8693c82838c1Smrg ;; 8694c82838c1Smrg esac 8695c82838c1Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 8696c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8697c82838c1Smrg ;; 8698c82838c1Smrg 8699c82838c1Smrg irix5* | irix6* | nonstopux*) 8700c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8701c82838c1Smrg # PIC (with -KPIC) is the default. 8702c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8703c82838c1Smrg ;; 8704c82838c1Smrg 8705c82838c1Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 8706c82838c1Smrg case $cc_basename in 8707c82838c1Smrg # old Intel for x86_64, which still supported -KPIC. 8708c82838c1Smrg ecc*) 8709c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8710c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8711c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8712c82838c1Smrg ;; 8713c82838c1Smrg # icc used to be incompatible with GCC. 8714c82838c1Smrg # ICC 10 doesn't accept -KPIC any more. 8715c82838c1Smrg icc* | ifort*) 8716c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8717c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8718c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8719c82838c1Smrg ;; 8720c82838c1Smrg # Lahey Fortran 8.1. 8721c82838c1Smrg lf95*) 8722c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8723c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 8724c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 8725c82838c1Smrg ;; 8726c82838c1Smrg nagfor*) 8727c82838c1Smrg # NAG Fortran compiler 8728c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8729c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8730c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8731c82838c1Smrg ;; 8732c82838c1Smrg tcc*) 8733c82838c1Smrg # Fabrice Bellard et al's Tiny C Compiler 8734c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8735c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8736c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8737c82838c1Smrg ;; 8738c82838c1Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 8739c82838c1Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 8740c82838c1Smrg # which looks to be a dead project) 8741c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8742c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8743c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8744c82838c1Smrg ;; 8745c82838c1Smrg ccc*) 8746c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8747c82838c1Smrg # All Alpha code is PIC. 8748c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8749c82838c1Smrg ;; 8750c82838c1Smrg xl* | bgxl* | bgf* | mpixl*) 8751c82838c1Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 8752c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8753c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 8754c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 8755c82838c1Smrg ;; 8756c82838c1Smrg *) 8757c82838c1Smrg case `$CC -V 2>&1 | $SED 5q` in 8758c82838c1Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 8759c82838c1Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 8760c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8761c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8762c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 8763c82838c1Smrg ;; 8764c82838c1Smrg *Sun\ F* | *Sun*Fortran*) 8765c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8766c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8767c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8768c82838c1Smrg ;; 8769c82838c1Smrg *Sun\ C*) 8770c82838c1Smrg # Sun C 5.9 8771c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8772c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8773c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8774c82838c1Smrg ;; 8775c82838c1Smrg *Intel*\ [[CF]]*Compiler*) 8776c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8777c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8778c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8779c82838c1Smrg ;; 8780c82838c1Smrg *Portland\ Group*) 8781c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8782c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8783c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8784c82838c1Smrg ;; 8785c82838c1Smrg esac 8786c82838c1Smrg ;; 8787c82838c1Smrg esac 8788c82838c1Smrg ;; 8789c82838c1Smrg 8790c82838c1Smrg newsos6) 8791c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8792c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8793c82838c1Smrg ;; 8794c82838c1Smrg 8795c82838c1Smrg *nto* | *qnx*) 8796c82838c1Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8797c82838c1Smrg # it will coredump. 8798c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8799c82838c1Smrg ;; 8800c82838c1Smrg 8801c82838c1Smrg osf3* | osf4* | osf5*) 8802c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8803c82838c1Smrg # All OSF/1 code is PIC. 8804c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8805c82838c1Smrg ;; 8806c82838c1Smrg 8807c82838c1Smrg rdos*) 8808c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8809c82838c1Smrg ;; 8810c82838c1Smrg 8811c82838c1Smrg solaris*) 8812c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8813c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8814c82838c1Smrg case $cc_basename in 8815c82838c1Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 8816c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 8817c82838c1Smrg *) 8818c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 8819c82838c1Smrg esac 8820c82838c1Smrg ;; 8821c82838c1Smrg 8822c82838c1Smrg sunos4*) 8823c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8824c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8825c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8826c82838c1Smrg ;; 8827c82838c1Smrg 8828c82838c1Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 8829c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8830c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8831c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8832c82838c1Smrg ;; 8833c82838c1Smrg 8834c82838c1Smrg sysv4*MP*) 8835c82838c1Smrg if test -d /usr/nec; then 8836c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 8837c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8838c82838c1Smrg fi 8839c82838c1Smrg ;; 8840c82838c1Smrg 8841c82838c1Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8842c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8843c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8844c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8845c82838c1Smrg ;; 8846c82838c1Smrg 8847c82838c1Smrg unicos*) 8848c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8849c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8850c82838c1Smrg ;; 8851c82838c1Smrg 8852c82838c1Smrg uts4*) 8853c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8854c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8855c82838c1Smrg ;; 8856c82838c1Smrg 8857c82838c1Smrg *) 8858c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8859c82838c1Smrg ;; 8860c82838c1Smrg esac 8861c82838c1Smrg fi 8862c82838c1Smrg]) 8863c82838c1Smrgcase $host_os in 8864c82838c1Smrg # For platforms that do not support PIC, -DPIC is meaningless: 8865c82838c1Smrg *djgpp*) 8866c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8867c82838c1Smrg ;; 8868c82838c1Smrg *) 8869c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 8870c82838c1Smrg ;; 8871c82838c1Smrgesac 8872c82838c1Smrg 8873c82838c1SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 8874c82838c1Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 8875c82838c1Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 8876c82838c1Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 8877c82838c1Smrg 8878c82838c1Smrg# 8879c82838c1Smrg# Check to make sure the PIC flag actually works. 8880c82838c1Smrg# 8881c82838c1Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8882c82838c1Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 8883c82838c1Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 8884c82838c1Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 8885c82838c1Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 8886c82838c1Smrg "" | " "*) ;; 8887c82838c1Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 8888c82838c1Smrg esac], 8889c82838c1Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 8890c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 8891c82838c1Smrgfi 8892c82838c1Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 8893c82838c1Smrg [Additional compiler flags for building library objects]) 8894c82838c1Smrg 8895c82838c1Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 8896c82838c1Smrg [How to pass a linker flag through the compiler]) 8897c82838c1Smrg# 8898c82838c1Smrg# Check to make sure the static flag actually works. 8899c82838c1Smrg# 8900c82838c1Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 8901c82838c1Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 8902c82838c1Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 8903c82838c1Smrg $lt_tmp_static_flag, 8904c82838c1Smrg [], 8905c82838c1Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 8906c82838c1Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 8907c82838c1Smrg [Compiler flag to prevent dynamic linking]) 8908c82838c1Smrg])# _LT_COMPILER_PIC 8909c82838c1Smrg 8910c82838c1Smrg 8911c82838c1Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 8912c82838c1Smrg# ---------------------------- 8913c82838c1Smrg# See if the linker supports building shared libraries. 8914c82838c1Smrgm4_defun([_LT_LINKER_SHLIBS], 8915c82838c1Smrg[AC_REQUIRE([LT_PATH_LD])dnl 8916c82838c1SmrgAC_REQUIRE([LT_PATH_NM])dnl 8917c82838c1Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 8918c82838c1Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 8919c82838c1Smrgm4_require([_LT_DECL_EGREP])dnl 8920c82838c1Smrgm4_require([_LT_DECL_SED])dnl 8921c82838c1Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 8922c82838c1Smrgm4_require([_LT_TAG_COMPILER])dnl 8923c82838c1SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8924c82838c1Smrgm4_if([$1], [CXX], [ 8925c82838c1Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8926c82838c1Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8927c82838c1Smrg case $host_os in 8928c82838c1Smrg aix[[4-9]]*) 8929c82838c1Smrg # If we're using GNU nm, then we don't want the "-C" option. 8930c82838c1Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8931c82838c1Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8932c82838c1Smrg # weak defined symbols like other global defined symbols, whereas 8933c82838c1Smrg # GNU nm marks them as "W". 8934c82838c1Smrg # While the 'weak' keyword is ignored in the Export File, we need 8935c82838c1Smrg # it in the Import File for the 'aix-soname' feature, so we have 8936c82838c1Smrg # to replace the "-B" option with "-P" for AIX nm. 8937c82838c1Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8938c82838c1Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 8939c82838c1Smrg else 8940c82838c1Smrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 8941c82838c1Smrg fi 8942c82838c1Smrg ;; 8943c82838c1Smrg pw32*) 8944c82838c1Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 8945c82838c1Smrg ;; 8946c82838c1Smrg cygwin* | mingw* | cegcc*) 8947c82838c1Smrg case $cc_basename in 8948c82838c1Smrg cl* | icl*) 8949c82838c1Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8950c82838c1Smrg ;; 8951c82838c1Smrg *) 8952c82838c1Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 8953c82838c1Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8954c82838c1Smrg ;; 8955c82838c1Smrg esac 8956c82838c1Smrg ;; 8957c82838c1Smrg *) 8958c82838c1Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8959c82838c1Smrg ;; 8960c82838c1Smrg esac 8961c82838c1Smrg], [ 8962c82838c1Smrg runpath_var= 8963c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 8964c82838c1Smrg _LT_TAGVAR(always_export_symbols, $1)=no 8965c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)= 8966c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 8967c82838c1Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 8968c82838c1Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8969c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8970c82838c1Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8971c82838c1Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 8972c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8973c82838c1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8974c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8975c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8976c82838c1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 8977c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 8978c82838c1Smrg _LT_TAGVAR(inherit_rpath, $1)=no 8979c82838c1Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 8980c82838c1Smrg _LT_TAGVAR(module_cmds, $1)= 8981c82838c1Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 8982c82838c1Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 8983c82838c1Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 8984c82838c1Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 8985c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8986c82838c1Smrg # include_expsyms should be a list of space-separated symbols to be *always* 8987c82838c1Smrg # included in the symbol list 8988c82838c1Smrg _LT_TAGVAR(include_expsyms, $1)= 8989c82838c1Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 8990c82838c1Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 8991c82838c1Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 8992c82838c1Smrg # as well as any symbol that contains 'd'. 8993c82838c1Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8994c82838c1Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 8995c82838c1Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 8996c82838c1Smrg # the symbol is explicitly referenced. Since portable code cannot 8997c82838c1Smrg # rely on this symbol name, it's probably fine to never include it in 8998c82838c1Smrg # preloaded symbol tables. 8999c82838c1Smrg # Exclude shared library initialization/finalization symbols. 9000c82838c1Smrgdnl Note also adjust exclude_expsyms for C++ above. 9001c82838c1Smrg extract_expsyms_cmds= 9002c82838c1Smrg 9003c82838c1Smrg case $host_os in 9004c82838c1Smrg cygwin* | mingw* | pw32* | cegcc*) 9005c82838c1Smrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 9006c82838c1Smrg # When not using gcc, we currently assume that we are using 9007c82838c1Smrg # Microsoft Visual C++ or Intel C++ Compiler. 9008c82838c1Smrg if test yes != "$GCC"; then 9009c82838c1Smrg with_gnu_ld=no 9010c82838c1Smrg fi 9011c82838c1Smrg ;; 9012c82838c1Smrg interix*) 9013c82838c1Smrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 9014c82838c1Smrg with_gnu_ld=yes 9015c82838c1Smrg ;; 9016c82838c1Smrg openbsd* | bitrig*) 9017c82838c1Smrg with_gnu_ld=no 9018c82838c1Smrg ;; 9019c82838c1Smrg esac 9020c82838c1Smrg 9021c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 9022c82838c1Smrg 9023c82838c1Smrg # On some targets, GNU ld is compatible enough with the native linker 9024c82838c1Smrg # that we're better off using the native interface for both. 9025c82838c1Smrg lt_use_gnu_ld_interface=no 9026c82838c1Smrg if test yes = "$with_gnu_ld"; then 9027c82838c1Smrg case $host_os in 9028c82838c1Smrg aix*) 9029c82838c1Smrg # The AIX port of GNU ld has always aspired to compatibility 9030c82838c1Smrg # with the native linker. However, as the warning in the GNU ld 9031c82838c1Smrg # block says, versions before 2.19.5* couldn't really create working 9032c82838c1Smrg # shared libraries, regardless of the interface used. 9033c82838c1Smrg case `$LD -v 2>&1` in 9034c82838c1Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 9035c82838c1Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 9036c82838c1Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 9037c82838c1Smrg *) 9038c82838c1Smrg lt_use_gnu_ld_interface=yes 9039c82838c1Smrg ;; 9040c82838c1Smrg esac 9041c82838c1Smrg ;; 9042c82838c1Smrg *) 9043c82838c1Smrg lt_use_gnu_ld_interface=yes 9044c82838c1Smrg ;; 9045c82838c1Smrg esac 9046c82838c1Smrg fi 9047c82838c1Smrg 9048c82838c1Smrg if test yes = "$lt_use_gnu_ld_interface"; then 9049c82838c1Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 9050c82838c1Smrg wlarc='$wl' 9051c82838c1Smrg 9052c82838c1Smrg # Set some defaults for GNU ld with shared library support. These 9053c82838c1Smrg # are reset later if shared libraries are not supported. Putting them 9054c82838c1Smrg # here allows them to be overridden if necessary. 9055c82838c1Smrg runpath_var=LD_RUN_PATH 9056c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9057c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 9058c82838c1Smrg # ancient GNU ld didn't support --whole-archive et. al. 9059c82838c1Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 9060c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 9061c82838c1Smrg else 9062c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 9063c82838c1Smrg fi 9064c82838c1Smrg supports_anon_versioning=no 9065c82838c1Smrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 9066c82838c1Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 9067c82838c1Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 9068c82838c1Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 9069c82838c1Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 9070c82838c1Smrg *\ 2.11.*) ;; # other 2.11 versions 9071c82838c1Smrg *) supports_anon_versioning=yes ;; 9072c82838c1Smrg esac 9073c82838c1Smrg 9074c82838c1Smrg # See if GNU ld supports shared libraries. 9075c82838c1Smrg case $host_os in 9076c82838c1Smrg aix[[3-9]]*) 9077c82838c1Smrg # On AIX/PPC, the GNU linker is very broken 9078c82838c1Smrg if test ia64 != "$host_cpu"; then 9079c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9080c82838c1Smrg cat <<_LT_EOF 1>&2 9081c82838c1Smrg 9082c82838c1Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 9083c82838c1Smrg*** to be unable to reliably create shared libraries on AIX. 9084c82838c1Smrg*** Therefore, libtool is disabling shared libraries support. If you 9085c82838c1Smrg*** really care for shared libraries, you may want to install binutils 9086c82838c1Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 9087c82838c1Smrg*** You will then need to restart the configuration process. 9088c82838c1Smrg 9089c82838c1Smrg_LT_EOF 9090c82838c1Smrg fi 9091c82838c1Smrg ;; 9092c82838c1Smrg 9093c82838c1Smrg amigaos*) 9094c82838c1Smrg case $host_cpu in 9095c82838c1Smrg powerpc) 9096c82838c1Smrg # see comment about AmigaOS4 .so support 9097c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9098c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 9099c82838c1Smrg ;; 9100c82838c1Smrg m68k) 9101c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 9102c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9103c82838c1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9104c82838c1Smrg ;; 9105c82838c1Smrg esac 9106c82838c1Smrg ;; 9107c82838c1Smrg 9108c82838c1Smrg beos*) 9109c82838c1Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 9110c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9111c82838c1Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 9112c82838c1Smrg # support --undefined. This deserves some investigation. FIXME 9113c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9114c82838c1Smrg else 9115c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9116c82838c1Smrg fi 9117c82838c1Smrg ;; 9118c82838c1Smrg 9119c82838c1Smrg cygwin* | mingw* | pw32* | cegcc*) 9120c82838c1Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 9121c82838c1Smrg # as there is no search path for DLLs. 9122c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9123c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 9124c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9125c82838c1Smrg _LT_TAGVAR(always_export_symbols, $1)=no 9126c82838c1Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9127c82838c1Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 9128c82838c1Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 9129c82838c1Smrg 9130c82838c1Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 9131c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 9132c82838c1Smrg # If the export-symbols file already is a .def file, use it as 9133c82838c1Smrg # is; otherwise, prepend EXPORTS... 9134c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 9135c82838c1Smrg cp $export_symbols $output_objdir/$soname.def; 9136c82838c1Smrg else 9137c82838c1Smrg echo EXPORTS > $output_objdir/$soname.def; 9138c82838c1Smrg cat $export_symbols >> $output_objdir/$soname.def; 9139c82838c1Smrg fi~ 9140c82838c1Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 9141c82838c1Smrg else 9142c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9143c82838c1Smrg fi 9144c82838c1Smrg ;; 9145c82838c1Smrg 9146c82838c1Smrg haiku*) 9147c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9148c82838c1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9149c82838c1Smrg ;; 9150c82838c1Smrg 9151c82838c1Smrg os2*) 9152c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9153c82838c1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9154c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9155c82838c1Smrg shrext_cmds=.dll 9156c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9157c82838c1Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9158c82838c1Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9159c82838c1Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9160c82838c1Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 9161c82838c1Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9162c82838c1Smrg emximp -o $lib $output_objdir/$libname.def' 9163c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9164c82838c1Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9165c82838c1Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9166c82838c1Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9167c82838c1Smrg prefix_cmds="$SED"~ 9168c82838c1Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 9169c82838c1Smrg prefix_cmds="$prefix_cmds -e 1d"; 9170c82838c1Smrg fi~ 9171c82838c1Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 9172c82838c1Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 9173c82838c1Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9174c82838c1Smrg emximp -o $lib $output_objdir/$libname.def' 9175c82838c1Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 9176c82838c1Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9177c82838c1Smrg _LT_TAGVAR(file_list_spec, $1)='@' 9178c82838c1Smrg ;; 9179c82838c1Smrg 9180c82838c1Smrg interix[[3-9]]*) 9181c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9182c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9183c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9184c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9185c82838c1Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 9186c82838c1Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 9187c82838c1Smrg # default) and relocated if they conflict, which is a slow very memory 9188c82838c1Smrg # consuming and fragmenting process. To avoid this, we pick a random, 9189c82838c1Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 9190c82838c1Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 9191c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 9192c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 9193c82838c1Smrg ;; 9194c82838c1Smrg 9195c82838c1Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 9196c82838c1Smrg tmp_diet=no 9197c82838c1Smrg if test linux-dietlibc = "$host_os"; then 9198c82838c1Smrg case $cc_basename in 9199c82838c1Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 9200c82838c1Smrg esac 9201c82838c1Smrg fi 9202c82838c1Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 9203c82838c1Smrg && test no = "$tmp_diet" 9204c82838c1Smrg then 9205c82838c1Smrg tmp_addflag=' $pic_flag' 9206c82838c1Smrg tmp_sharedflag='-shared' 9207c82838c1Smrg case $cc_basename,$host_cpu in 9208c82838c1Smrg pgcc*) # Portland Group C compiler 9209c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 9210c82838c1Smrg tmp_addflag=' $pic_flag' 9211c82838c1Smrg ;; 9212c82838c1Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 9213c82838c1Smrg # Portland Group f77 and f90 compilers 9214c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 9215c82838c1Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 9216c82838c1Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 9217c82838c1Smrg tmp_addflag=' -i_dynamic' ;; 9218c82838c1Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 9219c82838c1Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 9220c82838c1Smrg ifc* | ifort*) # Intel Fortran compiler 9221c82838c1Smrg tmp_addflag=' -nofor_main' ;; 9222c82838c1Smrg lf95*) # Lahey Fortran 8.1 9223c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 9224c82838c1Smrg tmp_sharedflag='--shared' ;; 9225c82838c1Smrg nagfor*) # NAGFOR 5.3 9226c82838c1Smrg tmp_sharedflag='-Wl,-shared' ;; 9227c82838c1Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 9228c82838c1Smrg tmp_sharedflag='-qmkshrobj' 9229c82838c1Smrg tmp_addflag= ;; 9230c82838c1Smrg nvcc*) # Cuda Compiler Driver 2.2 9231c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 9232c82838c1Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 9233c82838c1Smrg ;; 9234c82838c1Smrg esac 9235c82838c1Smrg case `$CC -V 2>&1 | $SED 5q` in 9236c82838c1Smrg *Sun\ C*) # Sun C 5.9 9237c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 9238c82838c1Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 9239c82838c1Smrg tmp_sharedflag='-G' ;; 9240c82838c1Smrg *Sun\ F*) # Sun Fortran 8.3 9241c82838c1Smrg tmp_sharedflag='-G' ;; 9242c82838c1Smrg esac 9243c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9244c82838c1Smrg 9245c82838c1Smrg if test yes = "$supports_anon_versioning"; then 9246c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 9247c82838c1Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 9248c82838c1Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 9249c82838c1Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 9250c82838c1Smrg fi 9251c82838c1Smrg 9252c82838c1Smrg case $cc_basename in 9253c82838c1Smrg tcc*) 9254c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 9255c82838c1Smrg ;; 9256c82838c1Smrg xlf* | bgf* | bgxlf* | mpixlf*) 9257c82838c1Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 9258c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 9259c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9260c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 9261c82838c1Smrg if test yes = "$supports_anon_versioning"; then 9262c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 9263c82838c1Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 9264c82838c1Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 9265c82838c1Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 9266c82838c1Smrg fi 9267c82838c1Smrg ;; 9268c82838c1Smrg esac 9269c82838c1Smrg else 9270c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9271c82838c1Smrg fi 9272c82838c1Smrg ;; 9273c82838c1Smrg 9274c82838c1Smrg netbsd*) 9275c82838c1Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9276c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 9277c82838c1Smrg wlarc= 9278c82838c1Smrg else 9279c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9280c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 9281c82838c1Smrg fi 9282c82838c1Smrg ;; 9283c82838c1Smrg 9284c82838c1Smrg solaris*) 9285c82838c1Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 9286c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9287c82838c1Smrg cat <<_LT_EOF 1>&2 9288c82838c1Smrg 9289c82838c1Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 9290c82838c1Smrg*** create shared libraries on Solaris systems. Therefore, libtool 9291c82838c1Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 9292c82838c1Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 9293c82838c1Smrg*** your PATH or compiler configuration so that the native linker is 9294c82838c1Smrg*** used, and then restart. 9295c82838c1Smrg 9296c82838c1Smrg_LT_EOF 9297c82838c1Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 9298c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9299c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 9300c82838c1Smrg else 9301c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9302c82838c1Smrg fi 9303c82838c1Smrg ;; 9304c82838c1Smrg 9305c82838c1Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 9306c82838c1Smrg case `$LD -v 2>&1` in 9307c82838c1Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 9308c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9309c82838c1Smrg cat <<_LT_EOF 1>&2 9310c82838c1Smrg 9311c82838c1Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 9312c82838c1Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 9313c82838c1Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 9314c82838c1Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 9315c82838c1Smrg*** your PATH or compiler configuration so that the native linker is 9316c82838c1Smrg*** used, and then restart. 9317c82838c1Smrg 9318c82838c1Smrg_LT_EOF 9319c82838c1Smrg ;; 9320c82838c1Smrg *) 9321c82838c1Smrg # For security reasons, it is highly recommended that you always 9322c82838c1Smrg # use absolute paths for naming shared libraries, and exclude the 9323c82838c1Smrg # DT_RUNPATH tag from executables and libraries. But doing so 9324c82838c1Smrg # requires that you compile everything twice, which is a pain. 9325c82838c1Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 9326c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9327c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9328c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 9329c82838c1Smrg else 9330c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9331c82838c1Smrg fi 9332c82838c1Smrg ;; 9333c82838c1Smrg esac 9334c82838c1Smrg ;; 9335c82838c1Smrg 9336c82838c1Smrg sunos4*) 9337c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 9338c82838c1Smrg wlarc= 9339c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9340c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9341c82838c1Smrg ;; 9342c82838c1Smrg 9343c82838c1Smrg *) 9344c82838c1Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 9345c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9346c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 9347c82838c1Smrg else 9348c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9349c82838c1Smrg fi 9350c82838c1Smrg ;; 9351c82838c1Smrg esac 9352c82838c1Smrg 9353c82838c1Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 9354c82838c1Smrg runpath_var= 9355c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9356c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 9357c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 9358c82838c1Smrg fi 9359c82838c1Smrg else 9360c82838c1Smrg # PORTME fill in a description of your system's linker (not GNU ld) 9361c82838c1Smrg case $host_os in 9362c82838c1Smrg aix3*) 9363c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9364c82838c1Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 9365c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' 9366c82838c1Smrg # Note: this linker hardcodes the directories in LIBPATH if there 9367c82838c1Smrg # are no directories specified by -L. 9368c82838c1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9369c82838c1Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 9370c82838c1Smrg # Neither direct hardcoding nor static linking is supported with a 9371c82838c1Smrg # broken collect2. 9372c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 9373c82838c1Smrg fi 9374c82838c1Smrg ;; 9375c82838c1Smrg 9376c82838c1Smrg aix[[4-9]]*) 9377c82838c1Smrg if test ia64 = "$host_cpu"; then 9378c82838c1Smrg # On IA64, the linker does run time linking by default, so we don't 9379c82838c1Smrg # have to do anything special. 9380c82838c1Smrg aix_use_runtimelinking=no 9381c82838c1Smrg exp_sym_flag='-Bexport' 9382c82838c1Smrg no_entry_flag= 9383c82838c1Smrg else 9384c82838c1Smrg # If we're using GNU nm, then we don't want the "-C" option. 9385c82838c1Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 9386c82838c1Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 9387c82838c1Smrg # weak defined symbols like other global defined symbols, whereas 9388c82838c1Smrg # GNU nm marks them as "W". 9389c82838c1Smrg # While the 'weak' keyword is ignored in the Export File, we need 9390c82838c1Smrg # it in the Import File for the 'aix-soname' feature, so we have 9391c82838c1Smrg # to replace the "-B" option with "-P" for AIX nm. 9392c82838c1Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 9393c82838c1Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 9394c82838c1Smrg else 9395c82838c1Smrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 9396c82838c1Smrg fi 9397c82838c1Smrg aix_use_runtimelinking=no 9398c82838c1Smrg 9399c82838c1Smrg # Test if we are trying to use run time linking or normal 9400c82838c1Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 9401c82838c1Smrg # have runtime linking enabled, and use it for executables. 9402c82838c1Smrg # For shared libraries, we enable/disable runtime linking 9403c82838c1Smrg # depending on the kind of the shared library created - 9404c82838c1Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 9405c82838c1Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 9406c82838c1Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 9407c82838c1Smrg # lib.a static archive 9408c82838c1Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 9409c82838c1Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 9410c82838c1Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 9411c82838c1Smrg # lib.a(lib.so.V) shared, rtl:no 9412c82838c1Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 9413c82838c1Smrg # lib.a static archive 9414c82838c1Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 9415c82838c1Smrg for ld_flag in $LDFLAGS; do 9416c82838c1Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 9417c82838c1Smrg aix_use_runtimelinking=yes 9418c82838c1Smrg break 9419c82838c1Smrg fi 9420c82838c1Smrg done 9421c82838c1Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 9422c82838c1Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 9423c82838c1Smrg # so we don't have lib.a shared libs to link our executables. 9424c82838c1Smrg # We have to force runtime linking in this case. 9425c82838c1Smrg aix_use_runtimelinking=yes 9426c82838c1Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 9427c82838c1Smrg fi 9428c82838c1Smrg ;; 9429c82838c1Smrg esac 9430c82838c1Smrg 9431c82838c1Smrg exp_sym_flag='-bexport' 9432c82838c1Smrg no_entry_flag='-bnoentry' 9433c82838c1Smrg fi 9434c82838c1Smrg 9435c82838c1Smrg # When large executables or shared objects are built, AIX ld can 9436c82838c1Smrg # have problems creating the table of contents. If linking a library 9437c82838c1Smrg # or program results in "error TOC overflow" add -mminimal-toc to 9438c82838c1Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 9439c82838c1Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 9440c82838c1Smrg 9441c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='' 9442c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9443c82838c1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9444c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9445c82838c1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9446c82838c1Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 9447c82838c1Smrg case $with_aix_soname,$aix_use_runtimelinking in 9448c82838c1Smrg aix,*) ;; # traditional, no import file 9449c82838c1Smrg svr4,* | *,yes) # use import file 9450c82838c1Smrg # The Import File defines what to hardcode. 9451c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9452c82838c1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 9453c82838c1Smrg ;; 9454c82838c1Smrg esac 9455c82838c1Smrg 9456c82838c1Smrg if test yes = "$GCC"; then 9457c82838c1Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 9458c82838c1Smrg # We only want to do this on AIX 4.2 and lower, the check 9459c82838c1Smrg # below for broken collect2 doesn't work under 4.3+ 9460c82838c1Smrg collect2name=`$CC -print-prog-name=collect2` 9461c82838c1Smrg if test -f "$collect2name" && 9462c82838c1Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 9463c82838c1Smrg then 9464c82838c1Smrg # We have reworked collect2 9465c82838c1Smrg : 9466c82838c1Smrg else 9467c82838c1Smrg # We have old collect2 9468c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 9469c82838c1Smrg # It fails to find uninstalled libraries when the uninstalled 9470c82838c1Smrg # path is not listed in the libpath. Setting hardcode_minus_L 9471c82838c1Smrg # to unsupported forces relinking 9472c82838c1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9473c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9474c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 9475c82838c1Smrg fi 9476c82838c1Smrg ;; 9477c82838c1Smrg esac 9478c82838c1Smrg shared_flag='-shared' 9479c82838c1Smrg if test yes = "$aix_use_runtimelinking"; then 9480c82838c1Smrg shared_flag="$shared_flag "'$wl-G' 9481c82838c1Smrg fi 9482c82838c1Smrg # Need to ensure runtime linking is disabled for the traditional 9483c82838c1Smrg # shared library, or the linker may eventually find shared libraries 9484c82838c1Smrg # /with/ Import File - we do not want to mix them. 9485c82838c1Smrg shared_flag_aix='-shared' 9486c82838c1Smrg shared_flag_svr4='-shared $wl-G' 9487c82838c1Smrg else 9488c82838c1Smrg # not using gcc 9489c82838c1Smrg if test ia64 = "$host_cpu"; then 9490c82838c1Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 9491c82838c1Smrg # chokes on -Wl,-G. The following line is correct: 9492c82838c1Smrg shared_flag='-G' 9493c82838c1Smrg else 9494c82838c1Smrg if test yes = "$aix_use_runtimelinking"; then 9495c82838c1Smrg shared_flag='$wl-G' 9496c82838c1Smrg else 9497c82838c1Smrg shared_flag='$wl-bM:SRE' 9498c82838c1Smrg fi 9499c82838c1Smrg shared_flag_aix='$wl-bM:SRE' 9500c82838c1Smrg shared_flag_svr4='$wl-G' 9501c82838c1Smrg fi 9502c82838c1Smrg fi 9503c82838c1Smrg 9504c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 9505c82838c1Smrg # It seems that -bexpall does not export symbols beginning with 9506c82838c1Smrg # underscore (_), so it is better to generate a list of symbols to export. 9507c82838c1Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 9508c82838c1Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 9509c82838c1Smrg # Warning - without using the other runtime loading flags (-brtl), 9510c82838c1Smrg # -berok will link without error, but may produce a broken library. 9511c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 9512c82838c1Smrg # Determine the default libpath from the value encoded in an 9513c82838c1Smrg # empty executable. 9514c82838c1Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 9515c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9516c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 9517c82838c1Smrg else 9518c82838c1Smrg if test ia64 = "$host_cpu"; then 9519c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 9520c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 9521c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" 9522c82838c1Smrg else 9523c82838c1Smrg # Determine the default libpath from the value encoded in an 9524c82838c1Smrg # empty executable. 9525c82838c1Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 9526c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9527c82838c1Smrg # Warning - without using the other run time loading flags, 9528c82838c1Smrg # -berok will link without error, but may produce a broken library. 9529c82838c1Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 9530c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 9531c82838c1Smrg if test yes = "$with_gnu_ld"; then 9532c82838c1Smrg # We only use this code for GNU lds that support --whole-archive. 9533c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 9534c82838c1Smrg else 9535c82838c1Smrg # Exported symbols can be pulled into shared objects from archives 9536c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 9537c82838c1Smrg fi 9538c82838c1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9539c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 9540c82838c1Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 9541c82838c1Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 9542c82838c1Smrg if test svr4 != "$with_aix_soname"; then 9543c82838c1Smrg # This is similar to how AIX traditionally builds its shared libraries. 9544c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 9545c82838c1Smrg fi 9546c82838c1Smrg if test aix != "$with_aix_soname"; then 9547c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 9548c82838c1Smrg else 9549c82838c1Smrg # used by -dlpreopen to get the symbols 9550c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 9551c82838c1Smrg fi 9552c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 9553c82838c1Smrg fi 9554c82838c1Smrg fi 9555c82838c1Smrg ;; 9556c82838c1Smrg 9557c82838c1Smrg amigaos*) 9558c82838c1Smrg case $host_cpu in 9559c82838c1Smrg powerpc) 9560c82838c1Smrg # see comment about AmigaOS4 .so support 9561c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9562c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 9563c82838c1Smrg ;; 9564c82838c1Smrg m68k) 9565c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 9566c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9567c82838c1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9568c82838c1Smrg ;; 9569c82838c1Smrg esac 9570c82838c1Smrg ;; 9571c82838c1Smrg 9572c82838c1Smrg bsdi[[45]]*) 9573c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 9574c82838c1Smrg ;; 9575c82838c1Smrg 9576c82838c1Smrg cygwin* | mingw* | pw32* | cegcc*) 9577c82838c1Smrg # When not using gcc, we currently assume that we are using 9578c82838c1Smrg # Microsoft Visual C++ or Intel C++ Compiler. 9579c82838c1Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 9580c82838c1Smrg # no search path for DLLs. 9581c82838c1Smrg case $cc_basename in 9582c82838c1Smrg cl* | icl*) 9583c82838c1Smrg # Native MSVC or ICC 9584c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9585c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9586c82838c1Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 9587c82838c1Smrg _LT_TAGVAR(file_list_spec, $1)='@' 9588c82838c1Smrg # Tell ltmain to make .lib files, not .a files. 9589c82838c1Smrg libext=lib 9590c82838c1Smrg # Tell ltmain to make .dll files, not .so files. 9591c82838c1Smrg shrext_cmds=.dll 9592c82838c1Smrg # FIXME: Setting linknames here is a bad hack. 9593c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 9594c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 9595c82838c1Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 9596c82838c1Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 9597c82838c1Smrg else 9598c82838c1Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 9599c82838c1Smrg fi~ 9600c82838c1Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 9601c82838c1Smrg linknames=' 9602c82838c1Smrg # The linker will not automatically build a static lib if we build a DLL. 9603c82838c1Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9604c82838c1Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9605c82838c1Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 9606c82838c1Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' 9607c82838c1Smrg # Don't use ranlib 9608c82838c1Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 9609c82838c1Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 9610c82838c1Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 9611c82838c1Smrg case $lt_outputfile in 9612c82838c1Smrg *.exe|*.EXE) ;; 9613c82838c1Smrg *) 9614c82838c1Smrg lt_outputfile=$lt_outputfile.exe 9615c82838c1Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 9616c82838c1Smrg ;; 9617c82838c1Smrg esac~ 9618c82838c1Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 9619c82838c1Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 9620c82838c1Smrg $RM "$lt_outputfile.manifest"; 9621c82838c1Smrg fi' 9622c82838c1Smrg ;; 9623c82838c1Smrg *) 9624c82838c1Smrg # Assume MSVC and ICC wrapper 9625c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9626c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9627c82838c1Smrg # Tell ltmain to make .lib files, not .a files. 9628c82838c1Smrg libext=lib 9629c82838c1Smrg # Tell ltmain to make .dll files, not .so files. 9630c82838c1Smrg shrext_cmds=.dll 9631c82838c1Smrg # FIXME: Setting linknames here is a bad hack. 9632c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 9633c82838c1Smrg # The linker will automatically build a .lib file if we build a DLL. 9634c82838c1Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9635c82838c1Smrg # FIXME: Should let the user specify the lib program. 9636c82838c1Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 9637c82838c1Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9638c82838c1Smrg ;; 9639c82838c1Smrg esac 9640c82838c1Smrg ;; 9641c82838c1Smrg 9642c82838c1Smrg darwin* | rhapsody*) 9643c82838c1Smrg _LT_DARWIN_LINKER_FEATURES($1) 9644c82838c1Smrg ;; 9645c82838c1Smrg 9646c82838c1Smrg dgux*) 9647c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9648c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9649c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9650c82838c1Smrg ;; 9651c82838c1Smrg 9652c82838c1Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 9653c82838c1Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 9654c82838c1Smrg # does not break anything, and helps significantly (at the cost of a little 9655c82838c1Smrg # extra space). 9656c82838c1Smrg freebsd2.2*) 9657c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 9658c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9659c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9660c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9661c82838c1Smrg ;; 9662c82838c1Smrg 9663c82838c1Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 9664c82838c1Smrg freebsd2.*) 9665c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 9666c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9667c82838c1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9668c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9669c82838c1Smrg ;; 9670c82838c1Smrg 9671c82838c1Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 9672c82838c1Smrg freebsd* | dragonfly* | midnightbsd*) 9673c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9674c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9675c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9676c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9677c82838c1Smrg ;; 9678c82838c1Smrg 9679c82838c1Smrg hpux9*) 9680c82838c1Smrg if test yes = "$GCC"; then 9681c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 9682c82838c1Smrg else 9683c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 9684c82838c1Smrg fi 9685c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9686c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9687c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9688c82838c1Smrg 9689c82838c1Smrg # hardcode_minus_L: Not really in the search PATH, 9690c82838c1Smrg # but as the default location of the library. 9691c82838c1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9692c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9693c82838c1Smrg ;; 9694c82838c1Smrg 9695c82838c1Smrg hpux10*) 9696c82838c1Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 9697c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9698c82838c1Smrg else 9699c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 9700c82838c1Smrg fi 9701c82838c1Smrg if test no = "$with_gnu_ld"; then 9702c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9703c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9704c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9705c82838c1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9706c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9707c82838c1Smrg # hardcode_minus_L: Not really in the search PATH, 9708c82838c1Smrg # but as the default location of the library. 9709c82838c1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9710c82838c1Smrg fi 9711c82838c1Smrg ;; 9712c82838c1Smrg 9713c82838c1Smrg hpux11*) 9714c82838c1Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 9715c82838c1Smrg case $host_cpu in 9716c82838c1Smrg hppa*64*) 9717c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9718c82838c1Smrg ;; 9719c82838c1Smrg ia64*) 9720c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9721c82838c1Smrg ;; 9722c82838c1Smrg *) 9723c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9724c82838c1Smrg ;; 9725c82838c1Smrg esac 9726c82838c1Smrg else 9727c82838c1Smrg case $host_cpu in 9728c82838c1Smrg hppa*64*) 9729c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9730c82838c1Smrg ;; 9731c82838c1Smrg ia64*) 9732c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9733c82838c1Smrg ;; 9734c82838c1Smrg *) 9735c82838c1Smrg m4_if($1, [], [ 9736c82838c1Smrg # Older versions of the 11.00 compiler do not understand -b yet 9737c82838c1Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 9738c82838c1Smrg _LT_LINKER_OPTION([if $CC understands -b], 9739c82838c1Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 9740c82838c1Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 9741c82838c1Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 9742c82838c1Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 9743c82838c1Smrg ;; 9744c82838c1Smrg esac 9745c82838c1Smrg fi 9746c82838c1Smrg if test no = "$with_gnu_ld"; then 9747c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9748c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9749c82838c1Smrg 9750c82838c1Smrg case $host_cpu in 9751c82838c1Smrg hppa*64*|ia64*) 9752c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9753c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9754c82838c1Smrg ;; 9755c82838c1Smrg *) 9756c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9757c82838c1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9758c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9759c82838c1Smrg 9760c82838c1Smrg # hardcode_minus_L: Not really in the search PATH, 9761c82838c1Smrg # but as the default location of the library. 9762c82838c1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9763c82838c1Smrg ;; 9764c82838c1Smrg esac 9765c82838c1Smrg fi 9766c82838c1Smrg ;; 9767c82838c1Smrg 9768c82838c1Smrg irix5* | irix6* | nonstopux*) 9769c82838c1Smrg if test yes = "$GCC"; then 9770c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 9771c82838c1Smrg # Try to use the -exported_symbol ld option, if it does not 9772c82838c1Smrg # work, assume that -exports_file does not work either and 9773c82838c1Smrg # implicitly export all symbols. 9774c82838c1Smrg # This should be the same for all languages, so no per-tag cache variable. 9775c82838c1Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 9776c82838c1Smrg [lt_cv_irix_exported_symbol], 9777c82838c1Smrg [save_LDFLAGS=$LDFLAGS 9778c82838c1Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 9779c82838c1Smrg AC_LINK_IFELSE( 9780c82838c1Smrg [AC_LANG_SOURCE( 9781c82838c1Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 9782c82838c1Smrg [C++], [[int foo (void) { return 0; }]], 9783c82838c1Smrg [Fortran 77], [[ 9784c82838c1Smrg subroutine foo 9785c82838c1Smrg end]], 9786c82838c1Smrg [Fortran], [[ 9787c82838c1Smrg subroutine foo 9788c82838c1Smrg end]])])], 9789c82838c1Smrg [lt_cv_irix_exported_symbol=yes], 9790c82838c1Smrg [lt_cv_irix_exported_symbol=no]) 9791c82838c1Smrg LDFLAGS=$save_LDFLAGS]) 9792c82838c1Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 9793c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' 9794c82838c1Smrg fi 9795c82838c1Smrg else 9796c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 9797c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' 9798c82838c1Smrg fi 9799c82838c1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9800c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9801c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9802c82838c1Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 9803c82838c1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9804c82838c1Smrg ;; 9805c82838c1Smrg 9806c82838c1Smrg linux*) 9807c82838c1Smrg case $cc_basename in 9808c82838c1Smrg tcc*) 9809c82838c1Smrg # Fabrice Bellard et al's Tiny C Compiler 9810c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 9811c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9812c82838c1Smrg ;; 9813c82838c1Smrg esac 9814c82838c1Smrg ;; 9815c82838c1Smrg 9816c82838c1Smrg netbsd*) 9817c82838c1Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9818c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 9819c82838c1Smrg else 9820c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 9821c82838c1Smrg fi 9822c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9823c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9824c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9825c82838c1Smrg ;; 9826c82838c1Smrg 9827c82838c1Smrg newsos6) 9828c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9829c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9830c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9831c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9832c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9833c82838c1Smrg ;; 9834c82838c1Smrg 9835c82838c1Smrg *nto* | *qnx*) 9836c82838c1Smrg ;; 9837c82838c1Smrg 9838c82838c1Smrg openbsd* | bitrig*) 9839c82838c1Smrg if test -f /usr/libexec/ld.so; then 9840c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9841c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9842c82838c1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9843c82838c1Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 9844c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9845c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 9846c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9847c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9848c82838c1Smrg else 9849c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9850c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9851c82838c1Smrg fi 9852c82838c1Smrg else 9853c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9854c82838c1Smrg fi 9855c82838c1Smrg ;; 9856c82838c1Smrg 9857c82838c1Smrg os2*) 9858c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9859c82838c1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9860c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9861c82838c1Smrg shrext_cmds=.dll 9862c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9863c82838c1Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9864c82838c1Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9865c82838c1Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9866c82838c1Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 9867c82838c1Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9868c82838c1Smrg emximp -o $lib $output_objdir/$libname.def' 9869c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9870c82838c1Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9871c82838c1Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9872c82838c1Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9873c82838c1Smrg prefix_cmds="$SED"~ 9874c82838c1Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 9875c82838c1Smrg prefix_cmds="$prefix_cmds -e 1d"; 9876c82838c1Smrg fi~ 9877c82838c1Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 9878c82838c1Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 9879c82838c1Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9880c82838c1Smrg emximp -o $lib $output_objdir/$libname.def' 9881c82838c1Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 9882c82838c1Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9883c82838c1Smrg _LT_TAGVAR(file_list_spec, $1)='@' 9884c82838c1Smrg ;; 9885c82838c1Smrg 9886c82838c1Smrg osf3*) 9887c82838c1Smrg if test yes = "$GCC"; then 9888c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9889c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 9890c82838c1Smrg else 9891c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9892c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 9893c82838c1Smrg fi 9894c82838c1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9895c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9896c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9897c82838c1Smrg ;; 9898c82838c1Smrg 9899c82838c1Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 9900c82838c1Smrg if test yes = "$GCC"; then 9901c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9902c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 9903c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9904c82838c1Smrg else 9905c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9906c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 9907c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ 9908c82838c1Smrg $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' 9909c82838c1Smrg 9910c82838c1Smrg # Both c and cxx compiler support -rpath directly 9911c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9912c82838c1Smrg fi 9913c82838c1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9914c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9915c82838c1Smrg ;; 9916c82838c1Smrg 9917c82838c1Smrg solaris*) 9918c82838c1Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 9919c82838c1Smrg if test yes = "$GCC"; then 9920c82838c1Smrg wlarc='$wl' 9921c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9922c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9923c82838c1Smrg $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 9924c82838c1Smrg else 9925c82838c1Smrg case `$CC -V 2>&1` in 9926c82838c1Smrg *"Compilers 5.0"*) 9927c82838c1Smrg wlarc='' 9928c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 9929c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9930c82838c1Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 9931c82838c1Smrg ;; 9932c82838c1Smrg *) 9933c82838c1Smrg wlarc='$wl' 9934c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 9935c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9936c82838c1Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 9937c82838c1Smrg ;; 9938c82838c1Smrg esac 9939c82838c1Smrg fi 9940c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9941c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9942c82838c1Smrg case $host_os in 9943c82838c1Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9944c82838c1Smrg *) 9945c82838c1Smrg # The compiler driver will combine and reorder linker options, 9946c82838c1Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 9947c82838c1Smrg # but is careful enough not to reorder. 9948c82838c1Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 9949c82838c1Smrg if test yes = "$GCC"; then 9950c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 9951c82838c1Smrg else 9952c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 9953c82838c1Smrg fi 9954c82838c1Smrg ;; 9955c82838c1Smrg esac 9956c82838c1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9957c82838c1Smrg ;; 9958c82838c1Smrg 9959c82838c1Smrg sunos4*) 9960c82838c1Smrg if test sequent = "$host_vendor"; then 9961c82838c1Smrg # Use $CC to link under sequent, because it throws in some extra .o 9962c82838c1Smrg # files that make .init and .fini sections work. 9963c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 9964c82838c1Smrg else 9965c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 9966c82838c1Smrg fi 9967c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9968c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9969c82838c1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9970c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9971c82838c1Smrg ;; 9972c82838c1Smrg 9973c82838c1Smrg sysv4) 9974c82838c1Smrg case $host_vendor in 9975c82838c1Smrg sni) 9976c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9977c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 9978c82838c1Smrg ;; 9979c82838c1Smrg siemens) 9980c82838c1Smrg ## LD is ld it makes a PLAMLIB 9981c82838c1Smrg ## CC just makes a GrossModule. 9982c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 9983c82838c1Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 9984c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9985c82838c1Smrg ;; 9986c82838c1Smrg motorola) 9987c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9988c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 9989c82838c1Smrg ;; 9990c82838c1Smrg esac 9991c82838c1Smrg runpath_var='LD_RUN_PATH' 9992c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9993c82838c1Smrg ;; 9994c82838c1Smrg 9995c82838c1Smrg sysv4.3*) 9996c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9997c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9998c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 9999c82838c1Smrg ;; 10000c82838c1Smrg 10001c82838c1Smrg sysv4*MP*) 10002c82838c1Smrg if test -d /usr/nec; then 10003c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 10004c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10005c82838c1Smrg runpath_var=LD_RUN_PATH 10006c82838c1Smrg hardcode_runpath_var=yes 10007c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 10008c82838c1Smrg fi 10009c82838c1Smrg ;; 10010c82838c1Smrg 10011c82838c1Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 10012c82838c1Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10013c82838c1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10014c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10015c82838c1Smrg runpath_var='LD_RUN_PATH' 10016c82838c1Smrg 10017c82838c1Smrg if test yes = "$GCC"; then 10018c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10019c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10020c82838c1Smrg else 10021c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10022c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10023c82838c1Smrg fi 10024c82838c1Smrg ;; 10025c82838c1Smrg 10026c82838c1Smrg sysv5* | sco3.2v5* | sco5v6*) 10027c82838c1Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 10028c82838c1Smrg # link with -lc, and that would cause any symbols used from libc to 10029c82838c1Smrg # always be unresolved, which means just about no library would 10030c82838c1Smrg # ever link correctly. If we're not using GNU ld we use -z text 10031c82838c1Smrg # though, which does catch some bad symbols but isn't as heavy-handed 10032c82838c1Smrg # as -z defs. 10033c82838c1Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10034c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 10035c82838c1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10036c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10037c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 10038c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10039c82838c1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10040c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 10041c82838c1Smrg runpath_var='LD_RUN_PATH' 10042c82838c1Smrg 10043c82838c1Smrg if test yes = "$GCC"; then 10044c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10045c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10046c82838c1Smrg else 10047c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10048c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10049c82838c1Smrg fi 10050c82838c1Smrg ;; 10051c82838c1Smrg 10052c82838c1Smrg uts4*) 10053c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 10054c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10055c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10056c82838c1Smrg ;; 10057c82838c1Smrg 10058c82838c1Smrg *) 10059c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10060c82838c1Smrg ;; 10061c82838c1Smrg esac 10062c82838c1Smrg 10063c82838c1Smrg if test sni = "$host_vendor"; then 10064c82838c1Smrg case $host in 10065c82838c1Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 10066c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 10067c82838c1Smrg ;; 10068c82838c1Smrg esac 10069c82838c1Smrg fi 10070c82838c1Smrg fi 10071c82838c1Smrg]) 10072c82838c1SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 10073c82838c1Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 10074c82838c1Smrg 10075c82838c1Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 10076c82838c1Smrg 10077c82838c1Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 10078c82838c1Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 10079c82838c1Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 10080c82838c1Smrg [The commands to extract the exported symbol list from a shared archive]) 10081c82838c1Smrg 10082c82838c1Smrg# 10083c82838c1Smrg# Do we need to explicitly link libc? 10084c82838c1Smrg# 10085c82838c1Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 10086c82838c1Smrgx|xyes) 10087c82838c1Smrg # Assume -lc should be added 10088c82838c1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 10089c82838c1Smrg 10090c82838c1Smrg if test yes,yes = "$GCC,$enable_shared"; then 10091c82838c1Smrg case $_LT_TAGVAR(archive_cmds, $1) in 10092c82838c1Smrg *'~'*) 10093c82838c1Smrg # FIXME: we may have to deal with multi-command sequences. 10094c82838c1Smrg ;; 10095c82838c1Smrg '$CC '*) 10096c82838c1Smrg # Test whether the compiler implicitly links with -lc since on some 10097c82838c1Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 10098c82838c1Smrg # to ld, don't add -lc before -lgcc. 10099c82838c1Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 10100c82838c1Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 10101c82838c1Smrg [$RM conftest* 10102c82838c1Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 10103c82838c1Smrg 10104c82838c1Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 10105c82838c1Smrg soname=conftest 10106c82838c1Smrg lib=conftest 10107c82838c1Smrg libobjs=conftest.$ac_objext 10108c82838c1Smrg deplibs= 10109c82838c1Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 10110c82838c1Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 10111c82838c1Smrg compiler_flags=-v 10112c82838c1Smrg linker_flags=-v 10113c82838c1Smrg verstring= 10114c82838c1Smrg output_objdir=. 10115c82838c1Smrg libname=conftest 10116c82838c1Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 10117c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 10118c82838c1Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 10119c82838c1Smrg then 10120c82838c1Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 10121c82838c1Smrg else 10122c82838c1Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 10123c82838c1Smrg fi 10124c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 10125c82838c1Smrg else 10126c82838c1Smrg cat conftest.err 1>&5 10127c82838c1Smrg fi 10128c82838c1Smrg $RM conftest* 10129c82838c1Smrg ]) 10130c82838c1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 10131c82838c1Smrg ;; 10132c82838c1Smrg esac 10133c82838c1Smrg fi 10134c82838c1Smrg ;; 10135c82838c1Smrgesac 10136c82838c1Smrg 10137c82838c1Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 10138c82838c1Smrg [Whether or not to add -lc for building shared libraries]) 10139c82838c1Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 10140c82838c1Smrg [enable_shared_with_static_runtimes], [0], 10141c82838c1Smrg [Whether or not to disallow shared libs when runtime libs are static]) 10142c82838c1Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 10143c82838c1Smrg [Compiler flag to allow reflexive dlopens]) 10144c82838c1Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 10145c82838c1Smrg [Compiler flag to generate shared objects directly from archives]) 10146c82838c1Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 10147c82838c1Smrg [Whether the compiler copes with passing no objects directly]) 10148c82838c1Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 10149c82838c1Smrg [Create an old-style archive from a shared archive]) 10150c82838c1Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 10151c82838c1Smrg [Create a temporary old-style archive to link instead of a shared archive]) 10152c82838c1Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 10153c82838c1Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 10154c82838c1Smrg_LT_TAGDECL([], [module_cmds], [2], 10155c82838c1Smrg [Commands used to build a loadable module if different from building 10156c82838c1Smrg a shared archive.]) 10157c82838c1Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 10158c82838c1Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 10159c82838c1Smrg [Whether we are building with GNU ld or not]) 10160c82838c1Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 10161c82838c1Smrg [Flag that allows shared libraries with undefined symbols to be built]) 10162c82838c1Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 10163c82838c1Smrg [Flag that enforces no undefined symbols]) 10164c82838c1Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 10165c82838c1Smrg [Flag to hardcode $libdir into a binary during linking. 10166c82838c1Smrg This must work even if $libdir does not exist]) 10167c82838c1Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 10168c82838c1Smrg [Whether we need a single "-rpath" flag with a separated argument]) 10169c82838c1Smrg_LT_TAGDECL([], [hardcode_direct], [0], 10170c82838c1Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 10171c82838c1Smrg DIR into the resulting binary]) 10172c82838c1Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 10173c82838c1Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 10174c82838c1Smrg DIR into the resulting binary and the resulting library dependency is 10175c82838c1Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 10176c82838c1Smrg library is relocated]) 10177c82838c1Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 10178c82838c1Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 10179c82838c1Smrg into the resulting binary]) 10180c82838c1Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 10181c82838c1Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 10182c82838c1Smrg into the resulting binary]) 10183c82838c1Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 10184c82838c1Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 10185c82838c1Smrg into the library and all subsequent libraries and executables linked 10186c82838c1Smrg against it]) 10187c82838c1Smrg_LT_TAGDECL([], [inherit_rpath], [0], 10188c82838c1Smrg [Set to yes if linker adds runtime paths of dependent libraries 10189c82838c1Smrg to runtime path list]) 10190c82838c1Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 10191c82838c1Smrg [Whether libtool must link a program against all its dependency libraries]) 10192c82838c1Smrg_LT_TAGDECL([], [always_export_symbols], [0], 10193c82838c1Smrg [Set to "yes" if exported symbols are required]) 10194c82838c1Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 10195c82838c1Smrg [The commands to list exported symbols]) 10196c82838c1Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 10197c82838c1Smrg [Symbols that should not be listed in the preloaded symbols]) 10198c82838c1Smrg_LT_TAGDECL([], [include_expsyms], [1], 10199c82838c1Smrg [Symbols that must always be exported]) 10200c82838c1Smrg_LT_TAGDECL([], [prelink_cmds], [2], 10201c82838c1Smrg [Commands necessary for linking programs (against libraries) with templates]) 10202c82838c1Smrg_LT_TAGDECL([], [postlink_cmds], [2], 10203c82838c1Smrg [Commands necessary for finishing linking programs]) 10204c82838c1Smrg_LT_TAGDECL([], [file_list_spec], [1], 10205c82838c1Smrg [Specify filename containing input files]) 10206c82838c1Smrgdnl FIXME: Not yet implemented 10207c82838c1Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 10208c82838c1Smrgdnl [Compiler flag to generate thread safe objects]) 10209c82838c1Smrg])# _LT_LINKER_SHLIBS 10210c82838c1Smrg 10211c82838c1Smrg 10212c82838c1Smrg# _LT_LANG_C_CONFIG([TAG]) 10213c82838c1Smrg# ------------------------ 10214c82838c1Smrg# Ensure that the configuration variables for a C compiler are suitably 10215c82838c1Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 10216c82838c1Smrg# the compiler configuration to 'libtool'. 10217c82838c1Smrgm4_defun([_LT_LANG_C_CONFIG], 10218c82838c1Smrg[m4_require([_LT_DECL_EGREP])dnl 10219c82838c1Smrglt_save_CC=$CC 10220c82838c1SmrgAC_LANG_PUSH(C) 10221c82838c1Smrg 10222c82838c1Smrg# Source file extension for C test sources. 10223c82838c1Smrgac_ext=c 10224c82838c1Smrg 10225c82838c1Smrg# Object file extension for compiled C test sources. 10226c82838c1Smrgobjext=o 10227c82838c1Smrg_LT_TAGVAR(objext, $1)=$objext 10228c82838c1Smrg 10229c82838c1Smrg# Code to be used in simple compile tests 10230c82838c1Smrglt_simple_compile_test_code="int some_variable = 0;" 10231c82838c1Smrg 10232c82838c1Smrg# Code to be used in simple link tests 10233c82838c1Smrglt_simple_link_test_code='int main(){return(0);}' 10234c82838c1Smrg 10235c82838c1Smrg_LT_TAG_COMPILER 10236c82838c1Smrg# Save the default compiler, since it gets overwritten when the other 10237c82838c1Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 10238c82838c1Smrgcompiler_DEFAULT=$CC 10239c82838c1Smrg 10240c82838c1Smrg# save warnings/boilerplate of simple test code 10241c82838c1Smrg_LT_COMPILER_BOILERPLATE 10242c82838c1Smrg_LT_LINKER_BOILERPLATE 10243c82838c1Smrg 10244c82838c1Smrgif test -n "$compiler"; then 10245c82838c1Smrg _LT_COMPILER_NO_RTTI($1) 10246c82838c1Smrg _LT_COMPILER_PIC($1) 10247c82838c1Smrg _LT_COMPILER_C_O($1) 10248c82838c1Smrg _LT_COMPILER_FILE_LOCKS($1) 10249c82838c1Smrg _LT_LINKER_SHLIBS($1) 10250c82838c1Smrg _LT_SYS_DYNAMIC_LINKER($1) 10251c82838c1Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 10252c82838c1Smrg LT_SYS_DLOPEN_SELF 10253c82838c1Smrg _LT_CMD_STRIPLIB 10254c82838c1Smrg 10255c82838c1Smrg # Report what library types will actually be built 10256c82838c1Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 10257c82838c1Smrg AC_MSG_RESULT([$can_build_shared]) 10258c82838c1Smrg 10259c82838c1Smrg AC_MSG_CHECKING([whether to build shared libraries]) 10260c82838c1Smrg test no = "$can_build_shared" && enable_shared=no 10261c82838c1Smrg 10262c82838c1Smrg # On AIX, shared libraries and static libraries use the same namespace, and 10263c82838c1Smrg # are all built from PIC. 10264c82838c1Smrg case $host_os in 10265c82838c1Smrg aix3*) 10266c82838c1Smrg test yes = "$enable_shared" && enable_static=no 10267c82838c1Smrg if test -n "$RANLIB"; then 10268c82838c1Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 10269c82838c1Smrg postinstall_cmds='$RANLIB $lib' 10270c82838c1Smrg fi 10271c82838c1Smrg ;; 10272c82838c1Smrg 10273c82838c1Smrg aix[[4-9]]*) 10274c82838c1Smrg if test ia64 != "$host_cpu"; then 10275c82838c1Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 10276c82838c1Smrg yes,aix,yes) ;; # shared object as lib.so file only 10277c82838c1Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 10278c82838c1Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 10279c82838c1Smrg esac 10280c82838c1Smrg fi 10281c82838c1Smrg ;; 10282c82838c1Smrg esac 10283c82838c1Smrg AC_MSG_RESULT([$enable_shared]) 10284c82838c1Smrg 10285c82838c1Smrg AC_MSG_CHECKING([whether to build static libraries]) 10286c82838c1Smrg # Make sure either enable_shared or enable_static is yes. 10287c82838c1Smrg test yes = "$enable_shared" || enable_static=yes 10288c82838c1Smrg AC_MSG_RESULT([$enable_static]) 10289c82838c1Smrg 10290c82838c1Smrg _LT_CONFIG($1) 10291c82838c1Smrgfi 10292c82838c1SmrgAC_LANG_POP 10293c82838c1SmrgCC=$lt_save_CC 10294c82838c1Smrg])# _LT_LANG_C_CONFIG 10295c82838c1Smrg 10296c82838c1Smrg 10297c82838c1Smrg# _LT_LANG_CXX_CONFIG([TAG]) 10298c82838c1Smrg# -------------------------- 10299c82838c1Smrg# Ensure that the configuration variables for a C++ compiler are suitably 10300c82838c1Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 10301c82838c1Smrg# the compiler configuration to 'libtool'. 10302c82838c1Smrgm4_defun([_LT_LANG_CXX_CONFIG], 10303c82838c1Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 10304c82838c1Smrgm4_require([_LT_DECL_EGREP])dnl 10305c82838c1Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 10306c82838c1Smrgif test -n "$CXX" && ( test no != "$CXX" && 10307c82838c1Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 10308c82838c1Smrg (test g++ != "$CXX"))); then 10309c82838c1Smrg AC_PROG_CXXCPP 10310c82838c1Smrgelse 10311c82838c1Smrg _lt_caught_CXX_error=yes 10312c82838c1Smrgfi 10313c82838c1Smrg 10314c82838c1SmrgAC_LANG_PUSH(C++) 10315c82838c1Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 10316c82838c1Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 10317c82838c1Smrg_LT_TAGVAR(always_export_symbols, $1)=no 10318c82838c1Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 10319c82838c1Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 10320c82838c1Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 10321c82838c1Smrg_LT_TAGVAR(hardcode_direct, $1)=no 10322c82838c1Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 10323c82838c1Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 10324c82838c1Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 10325c82838c1Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 10326c82838c1Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 10327c82838c1Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 10328c82838c1Smrg_LT_TAGVAR(inherit_rpath, $1)=no 10329c82838c1Smrg_LT_TAGVAR(module_cmds, $1)= 10330c82838c1Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 10331c82838c1Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 10332c82838c1Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 10333c82838c1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 10334c82838c1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 10335c82838c1Smrg_LT_TAGVAR(no_undefined_flag, $1)= 10336c82838c1Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 10337c82838c1Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 10338c82838c1Smrg 10339c82838c1Smrg# Source file extension for C++ test sources. 10340c82838c1Smrgac_ext=cpp 10341c82838c1Smrg 10342c82838c1Smrg# Object file extension for compiled C++ test sources. 10343c82838c1Smrgobjext=o 10344c82838c1Smrg_LT_TAGVAR(objext, $1)=$objext 10345c82838c1Smrg 10346c82838c1Smrg# No sense in running all these tests if we already determined that 10347c82838c1Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 10348c82838c1Smrg# are currently assumed to apply to all compilers on this platform, 10349c82838c1Smrg# and will be corrupted by setting them based on a non-working compiler. 10350c82838c1Smrgif test yes != "$_lt_caught_CXX_error"; then 10351c82838c1Smrg # Code to be used in simple compile tests 10352c82838c1Smrg lt_simple_compile_test_code="int some_variable = 0;" 10353c82838c1Smrg 10354c82838c1Smrg # Code to be used in simple link tests 10355c82838c1Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 10356c82838c1Smrg 10357c82838c1Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 10358c82838c1Smrg _LT_TAG_COMPILER 10359c82838c1Smrg 10360c82838c1Smrg # save warnings/boilerplate of simple test code 10361c82838c1Smrg _LT_COMPILER_BOILERPLATE 10362c82838c1Smrg _LT_LINKER_BOILERPLATE 10363c82838c1Smrg 10364c82838c1Smrg # Allow CC to be a program name with arguments. 10365c82838c1Smrg lt_save_CC=$CC 10366c82838c1Smrg lt_save_CFLAGS=$CFLAGS 10367c82838c1Smrg lt_save_LD=$LD 10368c82838c1Smrg lt_save_GCC=$GCC 10369c82838c1Smrg GCC=$GXX 10370c82838c1Smrg lt_save_with_gnu_ld=$with_gnu_ld 10371c82838c1Smrg lt_save_path_LD=$lt_cv_path_LD 10372c82838c1Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 10373c82838c1Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 10374c82838c1Smrg else 10375c82838c1Smrg $as_unset lt_cv_prog_gnu_ld 10376c82838c1Smrg fi 10377c82838c1Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 10378c82838c1Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 10379c82838c1Smrg else 10380c82838c1Smrg $as_unset lt_cv_path_LD 10381c82838c1Smrg fi 10382c82838c1Smrg test -z "${LDCXX+set}" || LD=$LDCXX 10383c82838c1Smrg CC=${CXX-"c++"} 10384c82838c1Smrg CFLAGS=$CXXFLAGS 10385c82838c1Smrg compiler=$CC 10386c82838c1Smrg _LT_TAGVAR(compiler, $1)=$CC 10387c82838c1Smrg _LT_CC_BASENAME([$compiler]) 10388c82838c1Smrg 10389c82838c1Smrg if test -n "$compiler"; then 10390c82838c1Smrg # We don't want -fno-exception when compiling C++ code, so set the 10391c82838c1Smrg # no_builtin_flag separately 10392c82838c1Smrg if test yes = "$GXX"; then 10393c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 10394c82838c1Smrg else 10395c82838c1Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 10396c82838c1Smrg fi 10397c82838c1Smrg 10398c82838c1Smrg if test yes = "$GXX"; then 10399c82838c1Smrg # Set up default GNU C++ configuration 10400c82838c1Smrg 10401c82838c1Smrg LT_PATH_LD 10402c82838c1Smrg 10403c82838c1Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 10404c82838c1Smrg # archiving commands below assume that GNU ld is being used. 10405c82838c1Smrg if test yes = "$with_gnu_ld"; then 10406c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10407c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 10408c82838c1Smrg 10409c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10410c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10411c82838c1Smrg 10412c82838c1Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 10413c82838c1Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 10414c82838c1Smrg # investigate it a little bit more. (MM) 10415c82838c1Smrg wlarc='$wl' 10416c82838c1Smrg 10417c82838c1Smrg # ancient GNU ld didn't support --whole-archive et. al. 10418c82838c1Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 10419c82838c1Smrg $GREP 'no-whole-archive' > /dev/null; then 10420c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 10421c82838c1Smrg else 10422c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 10423c82838c1Smrg fi 10424c82838c1Smrg else 10425c82838c1Smrg with_gnu_ld=no 10426c82838c1Smrg wlarc= 10427c82838c1Smrg 10428c82838c1Smrg # A generic and very simple default shared library creation 10429c82838c1Smrg # command for GNU C++ for the case where it uses the native 10430c82838c1Smrg # linker, instead of GNU ld. If possible, this setting should 10431c82838c1Smrg # overridden to take advantage of the native linker features on 10432c82838c1Smrg # the platform it is being used on. 10433c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 10434c82838c1Smrg fi 10435c82838c1Smrg 10436c82838c1Smrg # Commands to make compiler produce verbose output that lists 10437c82838c1Smrg # what "hidden" libraries, object files and flags are used when 10438c82838c1Smrg # linking a shared library. 10439c82838c1Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10440c82838c1Smrg 10441c82838c1Smrg else 10442c82838c1Smrg GXX=no 10443c82838c1Smrg with_gnu_ld=no 10444c82838c1Smrg wlarc= 10445c82838c1Smrg fi 10446c82838c1Smrg 10447c82838c1Smrg # PORTME: fill in a description of your system's C++ link characteristics 10448c82838c1Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 10449c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 10450c82838c1Smrg case $host_os in 10451c82838c1Smrg aix3*) 10452c82838c1Smrg # FIXME: insert proper C++ library support 10453c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10454c82838c1Smrg ;; 10455c82838c1Smrg aix[[4-9]]*) 10456c82838c1Smrg if test ia64 = "$host_cpu"; then 10457c82838c1Smrg # On IA64, the linker does run time linking by default, so we don't 10458c82838c1Smrg # have to do anything special. 10459c82838c1Smrg aix_use_runtimelinking=no 10460c82838c1Smrg exp_sym_flag='-Bexport' 10461c82838c1Smrg no_entry_flag= 10462c82838c1Smrg else 10463c82838c1Smrg aix_use_runtimelinking=no 10464c82838c1Smrg 10465c82838c1Smrg # Test if we are trying to use run time linking or normal 10466c82838c1Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 10467c82838c1Smrg # have runtime linking enabled, and use it for executables. 10468c82838c1Smrg # For shared libraries, we enable/disable runtime linking 10469c82838c1Smrg # depending on the kind of the shared library created - 10470c82838c1Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 10471c82838c1Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 10472c82838c1Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 10473c82838c1Smrg # lib.a static archive 10474c82838c1Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 10475c82838c1Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 10476c82838c1Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 10477c82838c1Smrg # lib.a(lib.so.V) shared, rtl:no 10478c82838c1Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 10479c82838c1Smrg # lib.a static archive 10480c82838c1Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 10481c82838c1Smrg for ld_flag in $LDFLAGS; do 10482c82838c1Smrg case $ld_flag in 10483c82838c1Smrg *-brtl*) 10484c82838c1Smrg aix_use_runtimelinking=yes 10485c82838c1Smrg break 10486c82838c1Smrg ;; 10487c82838c1Smrg esac 10488c82838c1Smrg done 10489c82838c1Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 10490c82838c1Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 10491c82838c1Smrg # so we don't have lib.a shared libs to link our executables. 10492c82838c1Smrg # We have to force runtime linking in this case. 10493c82838c1Smrg aix_use_runtimelinking=yes 10494c82838c1Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 10495c82838c1Smrg fi 10496c82838c1Smrg ;; 10497c82838c1Smrg esac 10498c82838c1Smrg 10499c82838c1Smrg exp_sym_flag='-bexport' 10500c82838c1Smrg no_entry_flag='-bnoentry' 10501c82838c1Smrg fi 10502c82838c1Smrg 10503c82838c1Smrg # When large executables or shared objects are built, AIX ld can 10504c82838c1Smrg # have problems creating the table of contents. If linking a library 10505c82838c1Smrg # or program results in "error TOC overflow" add -mminimal-toc to 10506c82838c1Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 10507c82838c1Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 10508c82838c1Smrg 10509c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='' 10510c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10511c82838c1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10512c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10513c82838c1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10514c82838c1Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 10515c82838c1Smrg case $with_aix_soname,$aix_use_runtimelinking in 10516c82838c1Smrg aix,*) ;; # no import file 10517c82838c1Smrg svr4,* | *,yes) # use import file 10518c82838c1Smrg # The Import File defines what to hardcode. 10519c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=no 10520c82838c1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 10521c82838c1Smrg ;; 10522c82838c1Smrg esac 10523c82838c1Smrg 10524c82838c1Smrg if test yes = "$GXX"; then 10525c82838c1Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 10526c82838c1Smrg # We only want to do this on AIX 4.2 and lower, the check 10527c82838c1Smrg # below for broken collect2 doesn't work under 4.3+ 10528c82838c1Smrg collect2name=`$CC -print-prog-name=collect2` 10529c82838c1Smrg if test -f "$collect2name" && 10530c82838c1Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 10531c82838c1Smrg then 10532c82838c1Smrg # We have reworked collect2 10533c82838c1Smrg : 10534c82838c1Smrg else 10535c82838c1Smrg # We have old collect2 10536c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 10537c82838c1Smrg # It fails to find uninstalled libraries when the uninstalled 10538c82838c1Smrg # path is not listed in the libpath. Setting hardcode_minus_L 10539c82838c1Smrg # to unsupported forces relinking 10540c82838c1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 10541c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10542c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 10543c82838c1Smrg fi 10544c82838c1Smrg esac 10545c82838c1Smrg shared_flag='-shared' 10546c82838c1Smrg if test yes = "$aix_use_runtimelinking"; then 10547c82838c1Smrg shared_flag=$shared_flag' $wl-G' 10548c82838c1Smrg fi 10549c82838c1Smrg # Need to ensure runtime linking is disabled for the traditional 10550c82838c1Smrg # shared library, or the linker may eventually find shared libraries 10551c82838c1Smrg # /with/ Import File - we do not want to mix them. 10552c82838c1Smrg shared_flag_aix='-shared' 10553c82838c1Smrg shared_flag_svr4='-shared $wl-G' 10554c82838c1Smrg else 10555c82838c1Smrg # not using gcc 10556c82838c1Smrg if test ia64 = "$host_cpu"; then 10557c82838c1Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 10558c82838c1Smrg # chokes on -Wl,-G. The following line is correct: 10559c82838c1Smrg shared_flag='-G' 10560c82838c1Smrg else 10561c82838c1Smrg if test yes = "$aix_use_runtimelinking"; then 10562c82838c1Smrg shared_flag='$wl-G' 10563c82838c1Smrg else 10564c82838c1Smrg shared_flag='$wl-bM:SRE' 10565c82838c1Smrg fi 10566c82838c1Smrg shared_flag_aix='$wl-bM:SRE' 10567c82838c1Smrg shared_flag_svr4='$wl-G' 10568c82838c1Smrg fi 10569c82838c1Smrg fi 10570c82838c1Smrg 10571c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 10572c82838c1Smrg # It seems that -bexpall does not export symbols beginning with 10573c82838c1Smrg # underscore (_), so it is better to generate a list of symbols to 10574c82838c1Smrg # export. 10575c82838c1Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 10576c82838c1Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 10577c82838c1Smrg # Warning - without using the other runtime loading flags (-brtl), 10578c82838c1Smrg # -berok will link without error, but may produce a broken library. 10579c82838c1Smrg # The "-G" linker flag allows undefined symbols. 10580c82838c1Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 10581c82838c1Smrg # Determine the default libpath from the value encoded in an empty 10582c82838c1Smrg # executable. 10583c82838c1Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 10584c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 10585c82838c1Smrg 10586c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 10587c82838c1Smrg else 10588c82838c1Smrg if test ia64 = "$host_cpu"; then 10589c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 10590c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 10591c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" 10592c82838c1Smrg else 10593c82838c1Smrg # Determine the default libpath from the value encoded in an 10594c82838c1Smrg # empty executable. 10595c82838c1Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 10596c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 10597c82838c1Smrg # Warning - without using the other run time loading flags, 10598c82838c1Smrg # -berok will link without error, but may produce a broken library. 10599c82838c1Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 10600c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 10601c82838c1Smrg if test yes = "$with_gnu_ld"; then 10602c82838c1Smrg # We only use this code for GNU lds that support --whole-archive. 10603c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10604c82838c1Smrg else 10605c82838c1Smrg # Exported symbols can be pulled into shared objects from archives 10606c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 10607c82838c1Smrg fi 10608c82838c1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 10609c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 10610c82838c1Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 10611c82838c1Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 10612c82838c1Smrg if test svr4 != "$with_aix_soname"; then 10613c82838c1Smrg # This is similar to how AIX traditionally builds its shared 10614c82838c1Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 10615c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 10616c82838c1Smrg fi 10617c82838c1Smrg if test aix != "$with_aix_soname"; then 10618c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 10619c82838c1Smrg else 10620c82838c1Smrg # used by -dlpreopen to get the symbols 10621c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 10622c82838c1Smrg fi 10623c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 10624c82838c1Smrg fi 10625c82838c1Smrg fi 10626c82838c1Smrg ;; 10627c82838c1Smrg 10628c82838c1Smrg beos*) 10629c82838c1Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 10630c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10631c82838c1Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 10632c82838c1Smrg # support --undefined. This deserves some investigation. FIXME 10633c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10634c82838c1Smrg else 10635c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10636c82838c1Smrg fi 10637c82838c1Smrg ;; 10638c82838c1Smrg 10639c82838c1Smrg chorus*) 10640c82838c1Smrg case $cc_basename in 10641c82838c1Smrg *) 10642c82838c1Smrg # FIXME: insert proper C++ library support 10643c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10644c82838c1Smrg ;; 10645c82838c1Smrg esac 10646c82838c1Smrg ;; 10647c82838c1Smrg 10648c82838c1Smrg cygwin* | mingw* | pw32* | cegcc*) 10649c82838c1Smrg case $GXX,$cc_basename in 10650c82838c1Smrg ,cl* | no,cl* | ,icl* | no,icl*) 10651c82838c1Smrg # Native MSVC or ICC 10652c82838c1Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 10653c82838c1Smrg # no search path for DLLs. 10654c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 10655c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10656c82838c1Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 10657c82838c1Smrg _LT_TAGVAR(file_list_spec, $1)='@' 10658c82838c1Smrg # Tell ltmain to make .lib files, not .a files. 10659c82838c1Smrg libext=lib 10660c82838c1Smrg # Tell ltmain to make .dll files, not .so files. 10661c82838c1Smrg shrext_cmds=.dll 10662c82838c1Smrg # FIXME: Setting linknames here is a bad hack. 10663c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 10664c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10665c82838c1Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 10666c82838c1Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 10667c82838c1Smrg else 10668c82838c1Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 10669c82838c1Smrg fi~ 10670c82838c1Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 10671c82838c1Smrg linknames=' 10672c82838c1Smrg # The linker will not automatically build a static lib if we build a DLL. 10673c82838c1Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 10674c82838c1Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10675c82838c1Smrg # Don't use ranlib 10676c82838c1Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 10677c82838c1Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 10678c82838c1Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 10679c82838c1Smrg case $lt_outputfile in 10680c82838c1Smrg *.exe|*.EXE) ;; 10681c82838c1Smrg *) 10682c82838c1Smrg lt_outputfile=$lt_outputfile.exe 10683c82838c1Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 10684c82838c1Smrg ;; 10685c82838c1Smrg esac~ 10686c82838c1Smrg func_to_tool_file "$lt_outputfile"~ 10687c82838c1Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 10688c82838c1Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 10689c82838c1Smrg $RM "$lt_outputfile.manifest"; 10690c82838c1Smrg fi' 10691c82838c1Smrg ;; 10692c82838c1Smrg *) 10693c82838c1Smrg # g++ 10694c82838c1Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 10695c82838c1Smrg # as there is no search path for DLLs. 10696c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10697c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 10698c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10699c82838c1Smrg _LT_TAGVAR(always_export_symbols, $1)=no 10700c82838c1Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10701c82838c1Smrg 10702c82838c1Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 10703c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 10704c82838c1Smrg # If the export-symbols file already is a .def file, use it as 10705c82838c1Smrg # is; otherwise, prepend EXPORTS... 10706c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10707c82838c1Smrg cp $export_symbols $output_objdir/$soname.def; 10708c82838c1Smrg else 10709c82838c1Smrg echo EXPORTS > $output_objdir/$soname.def; 10710c82838c1Smrg cat $export_symbols >> $output_objdir/$soname.def; 10711c82838c1Smrg fi~ 10712c82838c1Smrg $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' 10713c82838c1Smrg else 10714c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10715c82838c1Smrg fi 10716c82838c1Smrg ;; 10717c82838c1Smrg esac 10718c82838c1Smrg ;; 10719c82838c1Smrg darwin* | rhapsody*) 10720c82838c1Smrg _LT_DARWIN_LINKER_FEATURES($1) 10721c82838c1Smrg ;; 10722c82838c1Smrg 10723c82838c1Smrg os2*) 10724c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10725c82838c1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 10726c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10727c82838c1Smrg shrext_cmds=.dll 10728c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10729c82838c1Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10730c82838c1Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10731c82838c1Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10732c82838c1Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 10733c82838c1Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10734c82838c1Smrg emximp -o $lib $output_objdir/$libname.def' 10735c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10736c82838c1Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10737c82838c1Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10738c82838c1Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10739c82838c1Smrg prefix_cmds="$SED"~ 10740c82838c1Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 10741c82838c1Smrg prefix_cmds="$prefix_cmds -e 1d"; 10742c82838c1Smrg fi~ 10743c82838c1Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 10744c82838c1Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 10745c82838c1Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10746c82838c1Smrg emximp -o $lib $output_objdir/$libname.def' 10747c82838c1Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 10748c82838c1Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10749c82838c1Smrg _LT_TAGVAR(file_list_spec, $1)='@' 10750c82838c1Smrg ;; 10751c82838c1Smrg 10752c82838c1Smrg dgux*) 10753c82838c1Smrg case $cc_basename in 10754c82838c1Smrg ec++*) 10755c82838c1Smrg # FIXME: insert proper C++ library support 10756c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10757c82838c1Smrg ;; 10758c82838c1Smrg ghcx*) 10759c82838c1Smrg # Green Hills C++ Compiler 10760c82838c1Smrg # FIXME: insert proper C++ library support 10761c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10762c82838c1Smrg ;; 10763c82838c1Smrg *) 10764c82838c1Smrg # FIXME: insert proper C++ library support 10765c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10766c82838c1Smrg ;; 10767c82838c1Smrg esac 10768c82838c1Smrg ;; 10769c82838c1Smrg 10770c82838c1Smrg freebsd2.*) 10771c82838c1Smrg # C++ shared libraries reported to be fairly broken before 10772c82838c1Smrg # switch to ELF 10773c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10774c82838c1Smrg ;; 10775c82838c1Smrg 10776c82838c1Smrg freebsd-elf*) 10777c82838c1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10778c82838c1Smrg ;; 10779c82838c1Smrg 10780c82838c1Smrg freebsd* | dragonfly* | midnightbsd*) 10781c82838c1Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 10782c82838c1Smrg # conventions 10783c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 10784c82838c1Smrg ;; 10785c82838c1Smrg 10786c82838c1Smrg haiku*) 10787c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10788c82838c1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10789c82838c1Smrg ;; 10790c82838c1Smrg 10791c82838c1Smrg hpux9*) 10792c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10793c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10794c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10795c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10796c82838c1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10797c82838c1Smrg # but as the default 10798c82838c1Smrg # location of the library. 10799c82838c1Smrg 10800c82838c1Smrg case $cc_basename in 10801c82838c1Smrg CC*) 10802c82838c1Smrg # FIXME: insert proper C++ library support 10803c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10804c82838c1Smrg ;; 10805c82838c1Smrg aCC*) 10806c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 10807c82838c1Smrg # Commands to make compiler produce verbose output that lists 10808c82838c1Smrg # what "hidden" libraries, object files and flags are used when 10809c82838c1Smrg # linking a shared library. 10810c82838c1Smrg # 10811c82838c1Smrg # There doesn't appear to be a way to prevent this compiler from 10812c82838c1Smrg # explicitly linking system object files so we need to strip them 10813c82838c1Smrg # from the output so that they don't get included in the library 10814c82838c1Smrg # dependencies. 10815c82838c1Smrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 10816c82838c1Smrg ;; 10817c82838c1Smrg *) 10818c82838c1Smrg if test yes = "$GXX"; then 10819c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 10820c82838c1Smrg else 10821c82838c1Smrg # FIXME: insert proper C++ library support 10822c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10823c82838c1Smrg fi 10824c82838c1Smrg ;; 10825c82838c1Smrg esac 10826c82838c1Smrg ;; 10827c82838c1Smrg 10828c82838c1Smrg hpux10*|hpux11*) 10829c82838c1Smrg if test no = "$with_gnu_ld"; then 10830c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10831c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10832c82838c1Smrg 10833c82838c1Smrg case $host_cpu in 10834c82838c1Smrg hppa*64*|ia64*) 10835c82838c1Smrg ;; 10836c82838c1Smrg *) 10837c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10838c82838c1Smrg ;; 10839c82838c1Smrg esac 10840c82838c1Smrg fi 10841c82838c1Smrg case $host_cpu in 10842c82838c1Smrg hppa*64*|ia64*) 10843c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=no 10844c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10845c82838c1Smrg ;; 10846c82838c1Smrg *) 10847c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10848c82838c1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10849c82838c1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10850c82838c1Smrg # but as the default 10851c82838c1Smrg # location of the library. 10852c82838c1Smrg ;; 10853c82838c1Smrg esac 10854c82838c1Smrg 10855c82838c1Smrg case $cc_basename in 10856c82838c1Smrg CC*) 10857c82838c1Smrg # FIXME: insert proper C++ library support 10858c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10859c82838c1Smrg ;; 10860c82838c1Smrg aCC*) 10861c82838c1Smrg case $host_cpu in 10862c82838c1Smrg hppa*64*) 10863c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10864c82838c1Smrg ;; 10865c82838c1Smrg ia64*) 10866c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10867c82838c1Smrg ;; 10868c82838c1Smrg *) 10869c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10870c82838c1Smrg ;; 10871c82838c1Smrg esac 10872c82838c1Smrg # Commands to make compiler produce verbose output that lists 10873c82838c1Smrg # what "hidden" libraries, object files and flags are used when 10874c82838c1Smrg # linking a shared library. 10875c82838c1Smrg # 10876c82838c1Smrg # There doesn't appear to be a way to prevent this compiler from 10877c82838c1Smrg # explicitly linking system object files so we need to strip them 10878c82838c1Smrg # from the output so that they don't get included in the library 10879c82838c1Smrg # dependencies. 10880c82838c1Smrg 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; func_echo_all "$list"' 10881c82838c1Smrg ;; 10882c82838c1Smrg *) 10883c82838c1Smrg if test yes = "$GXX"; then 10884c82838c1Smrg if test no = "$with_gnu_ld"; then 10885c82838c1Smrg case $host_cpu in 10886c82838c1Smrg hppa*64*) 10887c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10888c82838c1Smrg ;; 10889c82838c1Smrg ia64*) 10890c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10891c82838c1Smrg ;; 10892c82838c1Smrg *) 10893c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10894c82838c1Smrg ;; 10895c82838c1Smrg esac 10896c82838c1Smrg fi 10897c82838c1Smrg else 10898c82838c1Smrg # FIXME: insert proper C++ library support 10899c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10900c82838c1Smrg fi 10901c82838c1Smrg ;; 10902c82838c1Smrg esac 10903c82838c1Smrg ;; 10904c82838c1Smrg 10905c82838c1Smrg interix[[3-9]]*) 10906c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=no 10907c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10908c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10909c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10910c82838c1Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 10911c82838c1Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 10912c82838c1Smrg # default) and relocated if they conflict, which is a slow very memory 10913c82838c1Smrg # consuming and fragmenting process. To avoid this, we pick a random, 10914c82838c1Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 10915c82838c1Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 10916c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 10917c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 10918c82838c1Smrg ;; 10919c82838c1Smrg irix5* | irix6*) 10920c82838c1Smrg case $cc_basename in 10921c82838c1Smrg CC*) 10922c82838c1Smrg # SGI C++ 10923c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 10924c82838c1Smrg 10925c82838c1Smrg # Archives containing C++ object files must be created using 10926c82838c1Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 10927c82838c1Smrg # necessary to make sure instantiated templates are included 10928c82838c1Smrg # in the archive. 10929c82838c1Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 10930c82838c1Smrg ;; 10931c82838c1Smrg *) 10932c82838c1Smrg if test yes = "$GXX"; then 10933c82838c1Smrg if test no = "$with_gnu_ld"; then 10934c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 10935c82838c1Smrg else 10936c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' 10937c82838c1Smrg fi 10938c82838c1Smrg fi 10939c82838c1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10940c82838c1Smrg ;; 10941c82838c1Smrg esac 10942c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10943c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10944c82838c1Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 10945c82838c1Smrg ;; 10946c82838c1Smrg 10947c82838c1Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 10948c82838c1Smrg case $cc_basename in 10949c82838c1Smrg KCC*) 10950c82838c1Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 10951c82838c1Smrg 10952c82838c1Smrg # KCC will only create a shared library if the output file 10953c82838c1Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10954c82838c1Smrg # to its proper name (with version) after linking. 10955c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 10956c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' 10957c82838c1Smrg # Commands to make compiler produce verbose output that lists 10958c82838c1Smrg # what "hidden" libraries, object files and flags are used when 10959c82838c1Smrg # linking a shared library. 10960c82838c1Smrg # 10961c82838c1Smrg # There doesn't appear to be a way to prevent this compiler from 10962c82838c1Smrg # explicitly linking system object files so we need to strip them 10963c82838c1Smrg # from the output so that they don't get included in the library 10964c82838c1Smrg # dependencies. 10965c82838c1Smrg 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; func_echo_all "$list"' 10966c82838c1Smrg 10967c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10968c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10969c82838c1Smrg 10970c82838c1Smrg # Archives containing C++ object files must be created using 10971c82838c1Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 10972c82838c1Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 10973c82838c1Smrg ;; 10974c82838c1Smrg icpc* | ecpc* ) 10975c82838c1Smrg # Intel C++ 10976c82838c1Smrg with_gnu_ld=yes 10977c82838c1Smrg # version 8.0 and above of icpc choke on multiply defined symbols 10978c82838c1Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 10979c82838c1Smrg # earlier do not add the objects themselves. 10980c82838c1Smrg case `$CC -V 2>&1` in 10981c82838c1Smrg *"Version 7."*) 10982c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10983c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 10984c82838c1Smrg ;; 10985c82838c1Smrg *) # Version 8.0 or newer 10986c82838c1Smrg tmp_idyn= 10987c82838c1Smrg case $host_cpu in 10988c82838c1Smrg ia64*) tmp_idyn=' -i_dynamic';; 10989c82838c1Smrg esac 10990c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10991c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 10992c82838c1Smrg ;; 10993c82838c1Smrg esac 10994c82838c1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10995c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10996c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10997c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10998c82838c1Smrg ;; 10999c82838c1Smrg pgCC* | pgcpp*) 11000c82838c1Smrg # Portland Group C++ compiler 11001c82838c1Smrg case `$CC -V` in 11002c82838c1Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 11003c82838c1Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 11004c82838c1Smrg rm -rf $tpldir~ 11005c82838c1Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 11006c82838c1Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 11007c82838c1Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 11008c82838c1Smrg rm -rf $tpldir~ 11009c82838c1Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 11010c82838c1Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 11011c82838c1Smrg $RANLIB $oldlib' 11012c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 11013c82838c1Smrg rm -rf $tpldir~ 11014c82838c1Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 11015c82838c1Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 11016c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 11017c82838c1Smrg rm -rf $tpldir~ 11018c82838c1Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 11019c82838c1Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 11020c82838c1Smrg ;; 11021c82838c1Smrg *) # Version 6 and above use weak symbols 11022c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 11023c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 11024c82838c1Smrg ;; 11025c82838c1Smrg esac 11026c82838c1Smrg 11027c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 11028c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 11029c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 11030c82838c1Smrg ;; 11031c82838c1Smrg cxx*) 11032c82838c1Smrg # Compaq C++ 11033c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 11034c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' 11035c82838c1Smrg 11036c82838c1Smrg runpath_var=LD_RUN_PATH 11037c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 11038c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 11039c82838c1Smrg 11040c82838c1Smrg # Commands to make compiler produce verbose output that lists 11041c82838c1Smrg # what "hidden" libraries, object files and flags are used when 11042c82838c1Smrg # linking a shared library. 11043c82838c1Smrg # 11044c82838c1Smrg # There doesn't appear to be a way to prevent this compiler from 11045c82838c1Smrg # explicitly linking system object files so we need to strip them 11046c82838c1Smrg # from the output so that they don't get included in the library 11047c82838c1Smrg # dependencies. 11048c82838c1Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed' 11049c82838c1Smrg ;; 11050c82838c1Smrg xl* | mpixl* | bgxl*) 11051c82838c1Smrg # IBM XL 8.0 on PPC, with GNU ld 11052c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 11053c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 11054c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 11055c82838c1Smrg if test yes = "$supports_anon_versioning"; then 11056c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 11057c82838c1Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 11058c82838c1Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 11059c82838c1Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 11060c82838c1Smrg fi 11061c82838c1Smrg ;; 11062c82838c1Smrg *) 11063c82838c1Smrg case `$CC -V 2>&1 | $SED 5q` in 11064c82838c1Smrg *Sun\ C*) 11065c82838c1Smrg # Sun C++ 5.9 11066c82838c1Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 11067c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 11068c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' 11069c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 11070c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 11071c82838c1Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 11072c82838c1Smrg 11073c82838c1Smrg # Not sure whether something based on 11074c82838c1Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 11075c82838c1Smrg # would be better. 11076c82838c1Smrg output_verbose_link_cmd='func_echo_all' 11077c82838c1Smrg 11078c82838c1Smrg # Archives containing C++ object files must be created using 11079c82838c1Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 11080c82838c1Smrg # necessary to make sure instantiated templates are included 11081c82838c1Smrg # in the archive. 11082c82838c1Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 11083c82838c1Smrg ;; 11084c82838c1Smrg esac 11085c82838c1Smrg ;; 11086c82838c1Smrg esac 11087c82838c1Smrg ;; 11088c82838c1Smrg 11089c82838c1Smrg lynxos*) 11090c82838c1Smrg # FIXME: insert proper C++ library support 11091c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11092c82838c1Smrg ;; 11093c82838c1Smrg 11094c82838c1Smrg m88k*) 11095c82838c1Smrg # FIXME: insert proper C++ library support 11096c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11097c82838c1Smrg ;; 11098c82838c1Smrg 11099c82838c1Smrg mvs*) 11100c82838c1Smrg case $cc_basename in 11101c82838c1Smrg cxx*) 11102c82838c1Smrg # FIXME: insert proper C++ library support 11103c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11104c82838c1Smrg ;; 11105c82838c1Smrg *) 11106c82838c1Smrg # FIXME: insert proper C++ library support 11107c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11108c82838c1Smrg ;; 11109c82838c1Smrg esac 11110c82838c1Smrg ;; 11111c82838c1Smrg 11112c82838c1Smrg netbsd*) 11113c82838c1Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 11114c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 11115c82838c1Smrg wlarc= 11116c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 11117c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 11118c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 11119c82838c1Smrg fi 11120c82838c1Smrg # Workaround some broken pre-1.5 toolchains 11121c82838c1Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 11122c82838c1Smrg ;; 11123c82838c1Smrg 11124c82838c1Smrg *nto* | *qnx*) 11125c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 11126c82838c1Smrg ;; 11127c82838c1Smrg 11128c82838c1Smrg openbsd* | bitrig*) 11129c82838c1Smrg if test -f /usr/libexec/ld.so; then 11130c82838c1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 11131c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 11132c82838c1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 11133c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 11134c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 11135c82838c1Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 11136c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' 11137c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 11138c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 11139c82838c1Smrg fi 11140c82838c1Smrg output_verbose_link_cmd=func_echo_all 11141c82838c1Smrg else 11142c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11143c82838c1Smrg fi 11144c82838c1Smrg ;; 11145c82838c1Smrg 11146c82838c1Smrg osf3* | osf4* | osf5*) 11147c82838c1Smrg case $cc_basename in 11148c82838c1Smrg KCC*) 11149c82838c1Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 11150c82838c1Smrg 11151c82838c1Smrg # KCC will only create a shared library if the output file 11152c82838c1Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 11153c82838c1Smrg # to its proper name (with version) after linking. 11154c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 11155c82838c1Smrg 11156c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 11157c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 11158c82838c1Smrg 11159c82838c1Smrg # Archives containing C++ object files must be created using 11160c82838c1Smrg # the KAI C++ compiler. 11161c82838c1Smrg case $host in 11162c82838c1Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 11163c82838c1Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 11164c82838c1Smrg esac 11165c82838c1Smrg ;; 11166c82838c1Smrg RCC*) 11167c82838c1Smrg # Rational C++ 2.4.1 11168c82838c1Smrg # FIXME: insert proper C++ library support 11169c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11170c82838c1Smrg ;; 11171c82838c1Smrg cxx*) 11172c82838c1Smrg case $host in 11173c82838c1Smrg osf3*) 11174c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 11175c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 11176c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 11177c82838c1Smrg ;; 11178c82838c1Smrg *) 11179c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 11180c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 11181c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 11182c82838c1Smrg echo "-hidden">> $lib.exp~ 11183c82838c1Smrg $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~ 11184c82838c1Smrg $RM $lib.exp' 11185c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 11186c82838c1Smrg ;; 11187c82838c1Smrg esac 11188c82838c1Smrg 11189c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 11190c82838c1Smrg 11191c82838c1Smrg # Commands to make compiler produce verbose output that lists 11192c82838c1Smrg # what "hidden" libraries, object files and flags are used when 11193c82838c1Smrg # linking a shared library. 11194c82838c1Smrg # 11195c82838c1Smrg # There doesn't appear to be a way to prevent this compiler from 11196c82838c1Smrg # explicitly linking system object files so we need to strip them 11197c82838c1Smrg # from the output so that they don't get included in the library 11198c82838c1Smrg # dependencies. 11199c82838c1Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"' 11200c82838c1Smrg ;; 11201c82838c1Smrg *) 11202c82838c1Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 11203c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 11204c82838c1Smrg case $host in 11205c82838c1Smrg osf3*) 11206c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 11207c82838c1Smrg ;; 11208c82838c1Smrg *) 11209c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 11210c82838c1Smrg ;; 11211c82838c1Smrg esac 11212c82838c1Smrg 11213c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 11214c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 11215c82838c1Smrg 11216c82838c1Smrg # Commands to make compiler produce verbose output that lists 11217c82838c1Smrg # what "hidden" libraries, object files and flags are used when 11218c82838c1Smrg # linking a shared library. 11219c82838c1Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 11220c82838c1Smrg 11221c82838c1Smrg else 11222c82838c1Smrg # FIXME: insert proper C++ library support 11223c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11224c82838c1Smrg fi 11225c82838c1Smrg ;; 11226c82838c1Smrg esac 11227c82838c1Smrg ;; 11228c82838c1Smrg 11229c82838c1Smrg psos*) 11230c82838c1Smrg # FIXME: insert proper C++ library support 11231c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11232c82838c1Smrg ;; 11233c82838c1Smrg 11234c82838c1Smrg sunos4*) 11235c82838c1Smrg case $cc_basename in 11236c82838c1Smrg CC*) 11237c82838c1Smrg # Sun C++ 4.x 11238c82838c1Smrg # FIXME: insert proper C++ library support 11239c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11240c82838c1Smrg ;; 11241c82838c1Smrg lcc*) 11242c82838c1Smrg # Lucid 11243c82838c1Smrg # FIXME: insert proper C++ library support 11244c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11245c82838c1Smrg ;; 11246c82838c1Smrg *) 11247c82838c1Smrg # FIXME: insert proper C++ library support 11248c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11249c82838c1Smrg ;; 11250c82838c1Smrg esac 11251c82838c1Smrg ;; 11252c82838c1Smrg 11253c82838c1Smrg solaris*) 11254c82838c1Smrg case $cc_basename in 11255c82838c1Smrg CC* | sunCC*) 11256c82838c1Smrg # Sun C++ 4.2, 5.x and Centerline C++ 11257c82838c1Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 11258c82838c1Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 11259c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 11260c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 11261c82838c1Smrg $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' 11262c82838c1Smrg 11263c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 11264c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 11265c82838c1Smrg case $host_os in 11266c82838c1Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 11267c82838c1Smrg *) 11268c82838c1Smrg # The compiler driver will combine and reorder linker options, 11269c82838c1Smrg # but understands '-z linker_flag'. 11270c82838c1Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 11271c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 11272c82838c1Smrg ;; 11273c82838c1Smrg esac 11274c82838c1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11275c82838c1Smrg 11276c82838c1Smrg output_verbose_link_cmd='func_echo_all' 11277c82838c1Smrg 11278c82838c1Smrg # Archives containing C++ object files must be created using 11279c82838c1Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 11280c82838c1Smrg # necessary to make sure instantiated templates are included 11281c82838c1Smrg # in the archive. 11282c82838c1Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 11283c82838c1Smrg ;; 11284c82838c1Smrg gcx*) 11285c82838c1Smrg # Green Hills C++ Compiler 11286c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 11287c82838c1Smrg 11288c82838c1Smrg # The C++ compiler must be used to create the archive. 11289c82838c1Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 11290c82838c1Smrg ;; 11291c82838c1Smrg *) 11292c82838c1Smrg # GNU C++ compiler with Solaris linker 11293c82838c1Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 11294c82838c1Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 11295c82838c1Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 11296c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 11297c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 11298c82838c1Smrg $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 11299c82838c1Smrg 11300c82838c1Smrg # Commands to make compiler produce verbose output that lists 11301c82838c1Smrg # what "hidden" libraries, object files and flags are used when 11302c82838c1Smrg # linking a shared library. 11303c82838c1Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 11304c82838c1Smrg else 11305c82838c1Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 11306c82838c1Smrg # platform. 11307c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 11308c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 11309c82838c1Smrg $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 11310c82838c1Smrg 11311c82838c1Smrg # Commands to make compiler produce verbose output that lists 11312c82838c1Smrg # what "hidden" libraries, object files and flags are used when 11313c82838c1Smrg # linking a shared library. 11314c82838c1Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 11315c82838c1Smrg fi 11316c82838c1Smrg 11317c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 11318c82838c1Smrg case $host_os in 11319c82838c1Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 11320c82838c1Smrg *) 11321c82838c1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 11322c82838c1Smrg ;; 11323c82838c1Smrg esac 11324c82838c1Smrg fi 11325c82838c1Smrg ;; 11326c82838c1Smrg esac 11327c82838c1Smrg ;; 11328c82838c1Smrg 11329c82838c1Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 11330c82838c1Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 11331c82838c1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11332c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 11333c82838c1Smrg runpath_var='LD_RUN_PATH' 11334c82838c1Smrg 11335c82838c1Smrg case $cc_basename in 11336c82838c1Smrg CC*) 11337c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11338c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11339c82838c1Smrg ;; 11340c82838c1Smrg *) 11341c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11342c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11343c82838c1Smrg ;; 11344c82838c1Smrg esac 11345c82838c1Smrg ;; 11346c82838c1Smrg 11347c82838c1Smrg sysv5* | sco3.2v5* | sco5v6*) 11348c82838c1Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 11349c82838c1Smrg # link with -lc, and that would cause any symbols used from libc to 11350c82838c1Smrg # always be unresolved, which means just about no library would 11351c82838c1Smrg # ever link correctly. If we're not using GNU ld we use -z text 11352c82838c1Smrg # though, which does catch some bad symbols but isn't as heavy-handed 11353c82838c1Smrg # as -z defs. 11354c82838c1Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 11355c82838c1Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 11356c82838c1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11357c82838c1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 11358c82838c1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 11359c82838c1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 11360c82838c1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11361c82838c1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 11362c82838c1Smrg runpath_var='LD_RUN_PATH' 11363c82838c1Smrg 11364c82838c1Smrg case $cc_basename in 11365c82838c1Smrg CC*) 11366c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11367c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11368c82838c1Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 11369c82838c1Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 11370c82838c1Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 11371c82838c1Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 11372c82838c1Smrg ;; 11373c82838c1Smrg *) 11374c82838c1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11375c82838c1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11376c82838c1Smrg ;; 11377c82838c1Smrg esac 11378c82838c1Smrg ;; 11379c82838c1Smrg 11380c82838c1Smrg tandem*) 11381c82838c1Smrg case $cc_basename in 11382c82838c1Smrg NCC*) 11383c82838c1Smrg # NonStop-UX NCC 3.20 11384c82838c1Smrg # FIXME: insert proper C++ library support 11385c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11386c82838c1Smrg ;; 11387c82838c1Smrg *) 11388c82838c1Smrg # FIXME: insert proper C++ library support 11389c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11390c82838c1Smrg ;; 11391c82838c1Smrg esac 11392c82838c1Smrg ;; 11393c82838c1Smrg 11394c82838c1Smrg vxworks*) 11395c82838c1Smrg # FIXME: insert proper C++ library support 11396c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11397c82838c1Smrg ;; 11398c82838c1Smrg 11399c82838c1Smrg *) 11400c82838c1Smrg # FIXME: insert proper C++ library support 11401c82838c1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11402c82838c1Smrg ;; 11403c82838c1Smrg esac 11404c82838c1Smrg 11405c82838c1Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 11406c82838c1Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 11407c82838c1Smrg 11408c82838c1Smrg _LT_TAGVAR(GCC, $1)=$GXX 11409c82838c1Smrg _LT_TAGVAR(LD, $1)=$LD 11410c82838c1Smrg 11411c82838c1Smrg ## CAVEAT EMPTOR: 11412c82838c1Smrg ## There is no encapsulation within the following macros, do not change 11413c82838c1Smrg ## the running order or otherwise move them around unless you know exactly 11414c82838c1Smrg ## what you are doing... 11415c82838c1Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 11416c82838c1Smrg _LT_COMPILER_PIC($1) 11417c82838c1Smrg _LT_COMPILER_C_O($1) 11418c82838c1Smrg _LT_COMPILER_FILE_LOCKS($1) 11419c82838c1Smrg _LT_LINKER_SHLIBS($1) 11420c82838c1Smrg _LT_SYS_DYNAMIC_LINKER($1) 11421c82838c1Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 11422c82838c1Smrg 11423c82838c1Smrg _LT_CONFIG($1) 11424c82838c1Smrg fi # test -n "$compiler" 11425c82838c1Smrg 11426c82838c1Smrg CC=$lt_save_CC 11427c82838c1Smrg CFLAGS=$lt_save_CFLAGS 11428c82838c1Smrg LDCXX=$LD 11429c82838c1Smrg LD=$lt_save_LD 11430c82838c1Smrg GCC=$lt_save_GCC 11431c82838c1Smrg with_gnu_ld=$lt_save_with_gnu_ld 11432c82838c1Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 11433c82838c1Smrg lt_cv_path_LD=$lt_save_path_LD 11434c82838c1Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 11435c82838c1Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 11436c82838c1Smrgfi # test yes != "$_lt_caught_CXX_error" 11437c82838c1Smrg 11438c82838c1SmrgAC_LANG_POP 11439c82838c1Smrg])# _LT_LANG_CXX_CONFIG 11440c82838c1Smrg 11441c82838c1Smrg 11442c82838c1Smrg# _LT_FUNC_STRIPNAME_CNF 11443c82838c1Smrg# ---------------------- 11444c82838c1Smrg# func_stripname_cnf prefix suffix name 11445c82838c1Smrg# strip PREFIX and SUFFIX off of NAME. 11446c82838c1Smrg# PREFIX and SUFFIX must not contain globbing or regex special 11447c82838c1Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 11448c82838c1Smrg# dot (in which case that matches only a dot). 11449c82838c1Smrg# 11450c82838c1Smrg# This function is identical to the (non-XSI) version of func_stripname, 11451c82838c1Smrg# except this one can be used by m4 code that may be executed by configure, 11452c82838c1Smrg# rather than the libtool script. 11453c82838c1Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 11454c82838c1SmrgAC_REQUIRE([_LT_DECL_SED]) 11455c82838c1SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 11456c82838c1Smrgfunc_stripname_cnf () 11457c82838c1Smrg{ 11458c82838c1Smrg case @S|@2 in 11459c82838c1Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 11460c82838c1Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 11461c82838c1Smrg esac 11462c82838c1Smrg} # func_stripname_cnf 11463c82838c1Smrg])# _LT_FUNC_STRIPNAME_CNF 11464c82838c1Smrg 11465c82838c1Smrg 11466c82838c1Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 11467c82838c1Smrg# --------------------------------- 11468c82838c1Smrg# Figure out "hidden" library dependencies from verbose 11469c82838c1Smrg# compiler output when linking a shared library. 11470c82838c1Smrg# Parse the compiler output and extract the necessary 11471c82838c1Smrg# objects, libraries and library flags. 11472c82838c1Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 11473c82838c1Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 11474c82838c1SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 11475c82838c1Smrg# Dependencies to place before and after the object being linked: 11476c82838c1Smrg_LT_TAGVAR(predep_objects, $1)= 11477c82838c1Smrg_LT_TAGVAR(postdep_objects, $1)= 11478c82838c1Smrg_LT_TAGVAR(predeps, $1)= 11479c82838c1Smrg_LT_TAGVAR(postdeps, $1)= 11480c82838c1Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 11481c82838c1Smrg 11482c82838c1Smrgdnl we can't use the lt_simple_compile_test_code here, 11483c82838c1Smrgdnl because it contains code intended for an executable, 11484c82838c1Smrgdnl not a library. It's possible we should let each 11485c82838c1Smrgdnl tag define a new lt_????_link_test_code variable, 11486c82838c1Smrgdnl but it's only used here... 11487c82838c1Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 11488c82838c1Smrgint a; 11489c82838c1Smrgvoid foo (void) { a = 0; } 11490c82838c1Smrg_LT_EOF 11491c82838c1Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 11492c82838c1Smrgclass Foo 11493c82838c1Smrg{ 11494c82838c1Smrgpublic: 11495c82838c1Smrg Foo (void) { a = 0; } 11496c82838c1Smrgprivate: 11497c82838c1Smrg int a; 11498c82838c1Smrg}; 11499c82838c1Smrg_LT_EOF 11500c82838c1Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 11501c82838c1Smrg subroutine foo 11502c82838c1Smrg implicit none 11503c82838c1Smrg integer*4 a 11504c82838c1Smrg a=0 11505c82838c1Smrg return 11506c82838c1Smrg end 11507c82838c1Smrg_LT_EOF 11508c82838c1Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 11509c82838c1Smrg subroutine foo 11510c82838c1Smrg implicit none 11511c82838c1Smrg integer a 11512c82838c1Smrg a=0 11513c82838c1Smrg return 11514c82838c1Smrg end 11515c82838c1Smrg_LT_EOF 11516c82838c1Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 11517c82838c1Smrgpublic class foo { 11518c82838c1Smrg private int a; 11519c82838c1Smrg public void bar (void) { 11520c82838c1Smrg a = 0; 11521c82838c1Smrg } 11522c82838c1Smrg}; 11523c82838c1Smrg_LT_EOF 11524c82838c1Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 11525c82838c1Smrgpackage foo 11526c82838c1Smrgfunc foo() { 11527c82838c1Smrg} 11528c82838c1Smrg_LT_EOF 11529c82838c1Smrg]) 11530c82838c1Smrg 11531c82838c1Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 11532c82838c1Smrgcase "$CC $CFLAGS " in #( 11533c82838c1Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 11534c82838c1Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 11535c82838c1Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 11536c82838c1Smrgesac 11537c82838c1Smrg 11538c82838c1Smrgdnl Parse the compiler output and extract the necessary 11539c82838c1Smrgdnl objects, libraries and library flags. 11540c82838c1Smrgif AC_TRY_EVAL(ac_compile); then 11541c82838c1Smrg # Parse the compiler output and extract the necessary 11542c82838c1Smrg # objects, libraries and library flags. 11543c82838c1Smrg 11544c82838c1Smrg # Sentinel used to keep track of whether or not we are before 11545c82838c1Smrg # the conftest object file. 11546c82838c1Smrg pre_test_object_deps_done=no 11547c82838c1Smrg 11548c82838c1Smrg for p in `eval "$output_verbose_link_cmd"`; do 11549c82838c1Smrg case $prev$p in 11550c82838c1Smrg 11551c82838c1Smrg -L* | -R* | -l*) 11552c82838c1Smrg # Some compilers place space between "-{L,R}" and the path. 11553c82838c1Smrg # Remove the space. 11554c82838c1Smrg if test x-L = "$p" || 11555c82838c1Smrg test x-R = "$p"; then 11556c82838c1Smrg prev=$p 11557c82838c1Smrg continue 11558c82838c1Smrg fi 11559c82838c1Smrg 11560c82838c1Smrg # Expand the sysroot to ease extracting the directories later. 11561c82838c1Smrg if test -z "$prev"; then 11562c82838c1Smrg case $p in 11563c82838c1Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 11564c82838c1Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 11565c82838c1Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 11566c82838c1Smrg esac 11567c82838c1Smrg fi 11568c82838c1Smrg case $p in 11569c82838c1Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 11570c82838c1Smrg esac 11571c82838c1Smrg if test no = "$pre_test_object_deps_done"; then 11572c82838c1Smrg case $prev in 11573c82838c1Smrg -L | -R) 11574c82838c1Smrg # Internal compiler library paths should come after those 11575c82838c1Smrg # provided the user. The postdeps already come after the 11576c82838c1Smrg # user supplied libs so there is no need to process them. 11577c82838c1Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 11578c82838c1Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 11579c82838c1Smrg else 11580c82838c1Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 11581c82838c1Smrg fi 11582c82838c1Smrg ;; 11583c82838c1Smrg # The "-l" case would never come before the object being 11584c82838c1Smrg # linked, so don't bother handling this case. 11585c82838c1Smrg esac 11586c82838c1Smrg else 11587c82838c1Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 11588c82838c1Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 11589c82838c1Smrg else 11590c82838c1Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 11591c82838c1Smrg fi 11592c82838c1Smrg fi 11593c82838c1Smrg prev= 11594c82838c1Smrg ;; 11595c82838c1Smrg 11596c82838c1Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 11597c82838c1Smrg *.$objext) 11598c82838c1Smrg # This assumes that the test object file only shows up 11599c82838c1Smrg # once in the compiler output. 11600c82838c1Smrg if test "$p" = "conftest.$objext"; then 11601c82838c1Smrg pre_test_object_deps_done=yes 11602c82838c1Smrg continue 11603c82838c1Smrg fi 11604c82838c1Smrg 11605c82838c1Smrg if test no = "$pre_test_object_deps_done"; then 11606c82838c1Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 11607c82838c1Smrg _LT_TAGVAR(predep_objects, $1)=$p 11608c82838c1Smrg else 11609c82838c1Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 11610c82838c1Smrg fi 11611c82838c1Smrg else 11612c82838c1Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 11613c82838c1Smrg _LT_TAGVAR(postdep_objects, $1)=$p 11614c82838c1Smrg else 11615c82838c1Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 11616c82838c1Smrg fi 11617c82838c1Smrg fi 11618c82838c1Smrg ;; 11619c82838c1Smrg 11620c82838c1Smrg *) ;; # Ignore the rest. 11621c82838c1Smrg 11622c82838c1Smrg esac 11623c82838c1Smrg done 11624c82838c1Smrg 11625c82838c1Smrg # Clean up. 11626c82838c1Smrg rm -f a.out a.exe 11627c82838c1Smrgelse 11628c82838c1Smrg echo "libtool.m4: error: problem compiling $1 test program" 11629c82838c1Smrgfi 11630c82838c1Smrg 11631c82838c1Smrg$RM -f confest.$objext 11632c82838c1SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 11633c82838c1Smrg 11634c82838c1Smrg# PORTME: override above test on systems where it is broken 11635c82838c1Smrgm4_if([$1], [CXX], 11636c82838c1Smrg[case $host_os in 11637c82838c1Smrginterix[[3-9]]*) 11638c82838c1Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 11639c82838c1Smrg # hack all around it, let's just trust "g++" to DTRT. 11640c82838c1Smrg _LT_TAGVAR(predep_objects,$1)= 11641c82838c1Smrg _LT_TAGVAR(postdep_objects,$1)= 11642c82838c1Smrg _LT_TAGVAR(postdeps,$1)= 11643c82838c1Smrg ;; 11644c82838c1Smrgesac 11645c82838c1Smrg]) 11646c82838c1Smrg 11647c82838c1Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 11648c82838c1Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 11649c82838c1Smrgesac 11650c82838c1Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 11651c82838c1Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 11652c82838c1Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 11653c82838c1Smrgfi 11654c82838c1Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 11655c82838c1Smrg [The directories searched by this compiler when creating a shared library]) 11656c82838c1Smrg_LT_TAGDECL([], [predep_objects], [1], 11657c82838c1Smrg [Dependencies to place before and after the objects being linked to 11658c82838c1Smrg create a shared library]) 11659c82838c1Smrg_LT_TAGDECL([], [postdep_objects], [1]) 11660c82838c1Smrg_LT_TAGDECL([], [predeps], [1]) 11661c82838c1Smrg_LT_TAGDECL([], [postdeps], [1]) 11662c82838c1Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 11663c82838c1Smrg [The library search path used internally by the compiler when linking 11664c82838c1Smrg a shared library]) 11665c82838c1Smrg])# _LT_SYS_HIDDEN_LIBDEPS 11666c82838c1Smrg 11667c82838c1Smrg 11668c82838c1Smrg# _LT_LANG_F77_CONFIG([TAG]) 11669c82838c1Smrg# -------------------------- 11670c82838c1Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 11671c82838c1Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11672c82838c1Smrg# to write the compiler configuration to 'libtool'. 11673c82838c1Smrgm4_defun([_LT_LANG_F77_CONFIG], 11674c82838c1Smrg[AC_LANG_PUSH(Fortran 77) 11675c82838c1Smrgif test -z "$F77" || test no = "$F77"; then 11676c82838c1Smrg _lt_disable_F77=yes 11677c82838c1Smrgfi 11678c82838c1Smrg 11679c82838c1Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11680c82838c1Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 11681c82838c1Smrg_LT_TAGVAR(always_export_symbols, $1)=no 11682c82838c1Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11683c82838c1Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11684c82838c1Smrg_LT_TAGVAR(hardcode_direct, $1)=no 11685c82838c1Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11686c82838c1Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11687c82838c1Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11688c82838c1Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11689c82838c1Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 11690c82838c1Smrg_LT_TAGVAR(inherit_rpath, $1)=no 11691c82838c1Smrg_LT_TAGVAR(module_cmds, $1)= 11692c82838c1Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 11693c82838c1Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11694c82838c1Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11695c82838c1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11696c82838c1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11697c82838c1Smrg_LT_TAGVAR(no_undefined_flag, $1)= 11698c82838c1Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11699c82838c1Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11700c82838c1Smrg 11701c82838c1Smrg# Source file extension for f77 test sources. 11702c82838c1Smrgac_ext=f 11703c82838c1Smrg 11704c82838c1Smrg# Object file extension for compiled f77 test sources. 11705c82838c1Smrgobjext=o 11706c82838c1Smrg_LT_TAGVAR(objext, $1)=$objext 11707c82838c1Smrg 11708c82838c1Smrg# No sense in running all these tests if we already determined that 11709c82838c1Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 11710c82838c1Smrg# are currently assumed to apply to all compilers on this platform, 11711c82838c1Smrg# and will be corrupted by setting them based on a non-working compiler. 11712c82838c1Smrgif test yes != "$_lt_disable_F77"; then 11713c82838c1Smrg # Code to be used in simple compile tests 11714c82838c1Smrg lt_simple_compile_test_code="\ 11715c82838c1Smrg subroutine t 11716c82838c1Smrg return 11717c82838c1Smrg end 11718c82838c1Smrg" 11719c82838c1Smrg 11720c82838c1Smrg # Code to be used in simple link tests 11721c82838c1Smrg lt_simple_link_test_code="\ 11722c82838c1Smrg program t 11723c82838c1Smrg end 11724c82838c1Smrg" 11725c82838c1Smrg 11726c82838c1Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11727c82838c1Smrg _LT_TAG_COMPILER 11728c82838c1Smrg 11729c82838c1Smrg # save warnings/boilerplate of simple test code 11730c82838c1Smrg _LT_COMPILER_BOILERPLATE 11731c82838c1Smrg _LT_LINKER_BOILERPLATE 11732c82838c1Smrg 11733c82838c1Smrg # Allow CC to be a program name with arguments. 11734c82838c1Smrg lt_save_CC=$CC 11735c82838c1Smrg lt_save_GCC=$GCC 11736c82838c1Smrg lt_save_CFLAGS=$CFLAGS 11737c82838c1Smrg CC=${F77-"f77"} 11738c82838c1Smrg CFLAGS=$FFLAGS 11739c82838c1Smrg compiler=$CC 11740c82838c1Smrg _LT_TAGVAR(compiler, $1)=$CC 11741c82838c1Smrg _LT_CC_BASENAME([$compiler]) 11742c82838c1Smrg GCC=$G77 11743c82838c1Smrg if test -n "$compiler"; then 11744c82838c1Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11745c82838c1Smrg AC_MSG_RESULT([$can_build_shared]) 11746c82838c1Smrg 11747c82838c1Smrg AC_MSG_CHECKING([whether to build shared libraries]) 11748c82838c1Smrg test no = "$can_build_shared" && enable_shared=no 11749c82838c1Smrg 11750c82838c1Smrg # On AIX, shared libraries and static libraries use the same namespace, and 11751c82838c1Smrg # are all built from PIC. 11752c82838c1Smrg case $host_os in 11753c82838c1Smrg aix3*) 11754c82838c1Smrg test yes = "$enable_shared" && enable_static=no 11755c82838c1Smrg if test -n "$RANLIB"; then 11756c82838c1Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11757c82838c1Smrg postinstall_cmds='$RANLIB $lib' 11758c82838c1Smrg fi 11759c82838c1Smrg ;; 11760c82838c1Smrg aix[[4-9]]*) 11761c82838c1Smrg if test ia64 != "$host_cpu"; then 11762c82838c1Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11763c82838c1Smrg yes,aix,yes) ;; # shared object as lib.so file only 11764c82838c1Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 11765c82838c1Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11766c82838c1Smrg esac 11767c82838c1Smrg fi 11768c82838c1Smrg ;; 11769c82838c1Smrg esac 11770c82838c1Smrg AC_MSG_RESULT([$enable_shared]) 11771c82838c1Smrg 11772c82838c1Smrg AC_MSG_CHECKING([whether to build static libraries]) 11773c82838c1Smrg # Make sure either enable_shared or enable_static is yes. 11774c82838c1Smrg test yes = "$enable_shared" || enable_static=yes 11775c82838c1Smrg AC_MSG_RESULT([$enable_static]) 11776c82838c1Smrg 11777c82838c1Smrg _LT_TAGVAR(GCC, $1)=$G77 11778c82838c1Smrg _LT_TAGVAR(LD, $1)=$LD 11779c82838c1Smrg 11780c82838c1Smrg ## CAVEAT EMPTOR: 11781c82838c1Smrg ## There is no encapsulation within the following macros, do not change 11782c82838c1Smrg ## the running order or otherwise move them around unless you know exactly 11783c82838c1Smrg ## what you are doing... 11784c82838c1Smrg _LT_COMPILER_PIC($1) 11785c82838c1Smrg _LT_COMPILER_C_O($1) 11786c82838c1Smrg _LT_COMPILER_FILE_LOCKS($1) 11787c82838c1Smrg _LT_LINKER_SHLIBS($1) 11788c82838c1Smrg _LT_SYS_DYNAMIC_LINKER($1) 11789c82838c1Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 11790c82838c1Smrg 11791c82838c1Smrg _LT_CONFIG($1) 11792c82838c1Smrg fi # test -n "$compiler" 11793c82838c1Smrg 11794c82838c1Smrg GCC=$lt_save_GCC 11795c82838c1Smrg CC=$lt_save_CC 11796c82838c1Smrg CFLAGS=$lt_save_CFLAGS 11797c82838c1Smrgfi # test yes != "$_lt_disable_F77" 11798c82838c1Smrg 11799c82838c1SmrgAC_LANG_POP 11800c82838c1Smrg])# _LT_LANG_F77_CONFIG 11801c82838c1Smrg 11802c82838c1Smrg 11803c82838c1Smrg# _LT_LANG_FC_CONFIG([TAG]) 11804c82838c1Smrg# ------------------------- 11805c82838c1Smrg# Ensure that the configuration variables for a Fortran compiler are 11806c82838c1Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11807c82838c1Smrg# to write the compiler configuration to 'libtool'. 11808c82838c1Smrgm4_defun([_LT_LANG_FC_CONFIG], 11809c82838c1Smrg[AC_LANG_PUSH(Fortran) 11810c82838c1Smrg 11811c82838c1Smrgif test -z "$FC" || test no = "$FC"; then 11812c82838c1Smrg _lt_disable_FC=yes 11813c82838c1Smrgfi 11814c82838c1Smrg 11815c82838c1Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11816c82838c1Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 11817c82838c1Smrg_LT_TAGVAR(always_export_symbols, $1)=no 11818c82838c1Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11819c82838c1Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11820c82838c1Smrg_LT_TAGVAR(hardcode_direct, $1)=no 11821c82838c1Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11822c82838c1Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11823c82838c1Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11824c82838c1Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11825c82838c1Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 11826c82838c1Smrg_LT_TAGVAR(inherit_rpath, $1)=no 11827c82838c1Smrg_LT_TAGVAR(module_cmds, $1)= 11828c82838c1Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 11829c82838c1Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11830c82838c1Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11831c82838c1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11832c82838c1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11833c82838c1Smrg_LT_TAGVAR(no_undefined_flag, $1)= 11834c82838c1Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11835c82838c1Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11836c82838c1Smrg 11837c82838c1Smrg# Source file extension for fc test sources. 11838c82838c1Smrgac_ext=${ac_fc_srcext-f} 11839c82838c1Smrg 11840c82838c1Smrg# Object file extension for compiled fc test sources. 11841c82838c1Smrgobjext=o 11842c82838c1Smrg_LT_TAGVAR(objext, $1)=$objext 11843c82838c1Smrg 11844c82838c1Smrg# No sense in running all these tests if we already determined that 11845c82838c1Smrg# the FC compiler isn't working. Some variables (like enable_shared) 11846c82838c1Smrg# are currently assumed to apply to all compilers on this platform, 11847c82838c1Smrg# and will be corrupted by setting them based on a non-working compiler. 11848c82838c1Smrgif test yes != "$_lt_disable_FC"; then 11849c82838c1Smrg # Code to be used in simple compile tests 11850c82838c1Smrg lt_simple_compile_test_code="\ 11851c82838c1Smrg subroutine t 11852c82838c1Smrg return 11853c82838c1Smrg end 11854c82838c1Smrg" 11855c82838c1Smrg 11856c82838c1Smrg # Code to be used in simple link tests 11857c82838c1Smrg lt_simple_link_test_code="\ 11858c82838c1Smrg program t 11859c82838c1Smrg end 11860c82838c1Smrg" 11861c82838c1Smrg 11862c82838c1Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11863c82838c1Smrg _LT_TAG_COMPILER 11864c82838c1Smrg 11865c82838c1Smrg # save warnings/boilerplate of simple test code 11866c82838c1Smrg _LT_COMPILER_BOILERPLATE 11867c82838c1Smrg _LT_LINKER_BOILERPLATE 11868c82838c1Smrg 11869c82838c1Smrg # Allow CC to be a program name with arguments. 11870c82838c1Smrg lt_save_CC=$CC 11871c82838c1Smrg lt_save_GCC=$GCC 11872c82838c1Smrg lt_save_CFLAGS=$CFLAGS 11873c82838c1Smrg CC=${FC-"f95"} 11874c82838c1Smrg CFLAGS=$FCFLAGS 11875c82838c1Smrg compiler=$CC 11876c82838c1Smrg GCC=$ac_cv_fc_compiler_gnu 11877c82838c1Smrg 11878c82838c1Smrg _LT_TAGVAR(compiler, $1)=$CC 11879c82838c1Smrg _LT_CC_BASENAME([$compiler]) 11880c82838c1Smrg 11881c82838c1Smrg if test -n "$compiler"; then 11882c82838c1Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11883c82838c1Smrg AC_MSG_RESULT([$can_build_shared]) 11884c82838c1Smrg 11885c82838c1Smrg AC_MSG_CHECKING([whether to build shared libraries]) 11886c82838c1Smrg test no = "$can_build_shared" && enable_shared=no 11887c82838c1Smrg 11888c82838c1Smrg # On AIX, shared libraries and static libraries use the same namespace, and 11889c82838c1Smrg # are all built from PIC. 11890c82838c1Smrg case $host_os in 11891c82838c1Smrg aix3*) 11892c82838c1Smrg test yes = "$enable_shared" && enable_static=no 11893c82838c1Smrg if test -n "$RANLIB"; then 11894c82838c1Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11895c82838c1Smrg postinstall_cmds='$RANLIB $lib' 11896c82838c1Smrg fi 11897c82838c1Smrg ;; 11898c82838c1Smrg aix[[4-9]]*) 11899c82838c1Smrg if test ia64 != "$host_cpu"; then 11900c82838c1Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11901c82838c1Smrg yes,aix,yes) ;; # shared object as lib.so file only 11902c82838c1Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 11903c82838c1Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11904c82838c1Smrg esac 11905c82838c1Smrg fi 11906c82838c1Smrg ;; 11907c82838c1Smrg esac 11908c82838c1Smrg AC_MSG_RESULT([$enable_shared]) 11909c82838c1Smrg 11910c82838c1Smrg AC_MSG_CHECKING([whether to build static libraries]) 11911c82838c1Smrg # Make sure either enable_shared or enable_static is yes. 11912c82838c1Smrg test yes = "$enable_shared" || enable_static=yes 11913c82838c1Smrg AC_MSG_RESULT([$enable_static]) 11914c82838c1Smrg 11915c82838c1Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 11916c82838c1Smrg _LT_TAGVAR(LD, $1)=$LD 11917c82838c1Smrg 11918c82838c1Smrg ## CAVEAT EMPTOR: 11919c82838c1Smrg ## There is no encapsulation within the following macros, do not change 11920c82838c1Smrg ## the running order or otherwise move them around unless you know exactly 11921c82838c1Smrg ## what you are doing... 11922c82838c1Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 11923c82838c1Smrg _LT_COMPILER_PIC($1) 11924c82838c1Smrg _LT_COMPILER_C_O($1) 11925c82838c1Smrg _LT_COMPILER_FILE_LOCKS($1) 11926c82838c1Smrg _LT_LINKER_SHLIBS($1) 11927c82838c1Smrg _LT_SYS_DYNAMIC_LINKER($1) 11928c82838c1Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 11929c82838c1Smrg 11930c82838c1Smrg _LT_CONFIG($1) 11931c82838c1Smrg fi # test -n "$compiler" 11932c82838c1Smrg 11933c82838c1Smrg GCC=$lt_save_GCC 11934c82838c1Smrg CC=$lt_save_CC 11935c82838c1Smrg CFLAGS=$lt_save_CFLAGS 11936c82838c1Smrgfi # test yes != "$_lt_disable_FC" 11937c82838c1Smrg 11938c82838c1SmrgAC_LANG_POP 11939c82838c1Smrg])# _LT_LANG_FC_CONFIG 11940c82838c1Smrg 11941c82838c1Smrg 11942c82838c1Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 11943c82838c1Smrg# -------------------------- 11944c82838c1Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 11945c82838c1Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11946c82838c1Smrg# to write the compiler configuration to 'libtool'. 11947c82838c1Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 11948c82838c1Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 11949c82838c1SmrgAC_LANG_SAVE 11950c82838c1Smrg 11951c82838c1Smrg# Source file extension for Java test sources. 11952c82838c1Smrgac_ext=java 11953c82838c1Smrg 11954c82838c1Smrg# Object file extension for compiled Java test sources. 11955c82838c1Smrgobjext=o 11956c82838c1Smrg_LT_TAGVAR(objext, $1)=$objext 11957c82838c1Smrg 11958c82838c1Smrg# Code to be used in simple compile tests 11959c82838c1Smrglt_simple_compile_test_code="class foo {}" 11960c82838c1Smrg 11961c82838c1Smrg# Code to be used in simple link tests 11962c82838c1Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 11963c82838c1Smrg 11964c82838c1Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11965c82838c1Smrg_LT_TAG_COMPILER 11966c82838c1Smrg 11967c82838c1Smrg# save warnings/boilerplate of simple test code 11968c82838c1Smrg_LT_COMPILER_BOILERPLATE 11969c82838c1Smrg_LT_LINKER_BOILERPLATE 11970c82838c1Smrg 11971c82838c1Smrg# Allow CC to be a program name with arguments. 11972c82838c1Smrglt_save_CC=$CC 11973c82838c1Smrglt_save_CFLAGS=$CFLAGS 11974c82838c1Smrglt_save_GCC=$GCC 11975c82838c1SmrgGCC=yes 11976c82838c1SmrgCC=${GCJ-"gcj"} 11977c82838c1SmrgCFLAGS=$GCJFLAGS 11978c82838c1Smrgcompiler=$CC 11979c82838c1Smrg_LT_TAGVAR(compiler, $1)=$CC 11980c82838c1Smrg_LT_TAGVAR(LD, $1)=$LD 11981c82838c1Smrg_LT_CC_BASENAME([$compiler]) 11982c82838c1Smrg 11983c82838c1Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 11984c82838c1Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11985c82838c1Smrg 11986c82838c1Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11987c82838c1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11988c82838c1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11989c82838c1Smrg 11990c82838c1Smrgif test -n "$compiler"; then 11991c82838c1Smrg _LT_COMPILER_NO_RTTI($1) 11992c82838c1Smrg _LT_COMPILER_PIC($1) 11993c82838c1Smrg _LT_COMPILER_C_O($1) 11994c82838c1Smrg _LT_COMPILER_FILE_LOCKS($1) 11995c82838c1Smrg _LT_LINKER_SHLIBS($1) 11996c82838c1Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 11997c82838c1Smrg 11998c82838c1Smrg _LT_CONFIG($1) 11999c82838c1Smrgfi 12000c82838c1Smrg 12001c82838c1SmrgAC_LANG_RESTORE 12002c82838c1Smrg 12003c82838c1SmrgGCC=$lt_save_GCC 12004c82838c1SmrgCC=$lt_save_CC 12005c82838c1SmrgCFLAGS=$lt_save_CFLAGS 12006c82838c1Smrg])# _LT_LANG_GCJ_CONFIG 12007c82838c1Smrg 12008c82838c1Smrg 12009c82838c1Smrg# _LT_LANG_GO_CONFIG([TAG]) 12010c82838c1Smrg# -------------------------- 12011c82838c1Smrg# Ensure that the configuration variables for the GNU Go compiler 12012c82838c1Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 12013c82838c1Smrg# to write the compiler configuration to 'libtool'. 12014c82838c1Smrgm4_defun([_LT_LANG_GO_CONFIG], 12015c82838c1Smrg[AC_REQUIRE([LT_PROG_GO])dnl 12016c82838c1SmrgAC_LANG_SAVE 12017c82838c1Smrg 12018c82838c1Smrg# Source file extension for Go test sources. 12019c82838c1Smrgac_ext=go 12020c82838c1Smrg 12021c82838c1Smrg# Object file extension for compiled Go test sources. 12022c82838c1Smrgobjext=o 12023c82838c1Smrg_LT_TAGVAR(objext, $1)=$objext 12024c82838c1Smrg 12025c82838c1Smrg# Code to be used in simple compile tests 12026c82838c1Smrglt_simple_compile_test_code="package main; func main() { }" 12027c82838c1Smrg 12028c82838c1Smrg# Code to be used in simple link tests 12029c82838c1Smrglt_simple_link_test_code='package main; func main() { }' 12030c82838c1Smrg 12031c82838c1Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 12032c82838c1Smrg_LT_TAG_COMPILER 12033c82838c1Smrg 12034c82838c1Smrg# save warnings/boilerplate of simple test code 12035c82838c1Smrg_LT_COMPILER_BOILERPLATE 12036c82838c1Smrg_LT_LINKER_BOILERPLATE 12037c82838c1Smrg 12038c82838c1Smrg# Allow CC to be a program name with arguments. 12039c82838c1Smrglt_save_CC=$CC 12040c82838c1Smrglt_save_CFLAGS=$CFLAGS 12041c82838c1Smrglt_save_GCC=$GCC 12042c82838c1SmrgGCC=yes 12043c82838c1SmrgCC=${GOC-"gccgo"} 12044c82838c1SmrgCFLAGS=$GOFLAGS 12045c82838c1Smrgcompiler=$CC 12046c82838c1Smrg_LT_TAGVAR(compiler, $1)=$CC 12047c82838c1Smrg_LT_TAGVAR(LD, $1)=$LD 12048c82838c1Smrg_LT_CC_BASENAME([$compiler]) 12049c82838c1Smrg 12050c82838c1Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 12051c82838c1Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 12052c82838c1Smrg 12053c82838c1Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 12054c82838c1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 12055c82838c1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 12056c82838c1Smrg 12057c82838c1Smrgif test -n "$compiler"; then 12058c82838c1Smrg _LT_COMPILER_NO_RTTI($1) 12059c82838c1Smrg _LT_COMPILER_PIC($1) 12060c82838c1Smrg _LT_COMPILER_C_O($1) 12061c82838c1Smrg _LT_COMPILER_FILE_LOCKS($1) 12062c82838c1Smrg _LT_LINKER_SHLIBS($1) 12063c82838c1Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 12064c82838c1Smrg 12065c82838c1Smrg _LT_CONFIG($1) 12066c82838c1Smrgfi 12067c82838c1Smrg 12068c82838c1SmrgAC_LANG_RESTORE 12069c82838c1Smrg 12070c82838c1SmrgGCC=$lt_save_GCC 12071c82838c1SmrgCC=$lt_save_CC 12072c82838c1SmrgCFLAGS=$lt_save_CFLAGS 12073c82838c1Smrg])# _LT_LANG_GO_CONFIG 12074c82838c1Smrg 12075c82838c1Smrg 12076c82838c1Smrg# _LT_LANG_RC_CONFIG([TAG]) 12077c82838c1Smrg# ------------------------- 12078c82838c1Smrg# Ensure that the configuration variables for the Windows resource compiler 12079c82838c1Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 12080c82838c1Smrg# to write the compiler configuration to 'libtool'. 12081c82838c1Smrgm4_defun([_LT_LANG_RC_CONFIG], 12082c82838c1Smrg[AC_REQUIRE([LT_PROG_RC])dnl 12083c82838c1SmrgAC_LANG_SAVE 12084c82838c1Smrg 12085c82838c1Smrg# Source file extension for RC test sources. 12086c82838c1Smrgac_ext=rc 12087c82838c1Smrg 12088c82838c1Smrg# Object file extension for compiled RC test sources. 12089c82838c1Smrgobjext=o 12090c82838c1Smrg_LT_TAGVAR(objext, $1)=$objext 12091c82838c1Smrg 12092c82838c1Smrg# Code to be used in simple compile tests 12093c82838c1Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 12094c82838c1Smrg 12095c82838c1Smrg# Code to be used in simple link tests 12096c82838c1Smrglt_simple_link_test_code=$lt_simple_compile_test_code 12097c82838c1Smrg 12098c82838c1Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 12099c82838c1Smrg_LT_TAG_COMPILER 12100c82838c1Smrg 12101c82838c1Smrg# save warnings/boilerplate of simple test code 12102c82838c1Smrg_LT_COMPILER_BOILERPLATE 12103c82838c1Smrg_LT_LINKER_BOILERPLATE 12104c82838c1Smrg 12105c82838c1Smrg# Allow CC to be a program name with arguments. 12106c82838c1Smrglt_save_CC=$CC 12107c82838c1Smrglt_save_CFLAGS=$CFLAGS 12108c82838c1Smrglt_save_GCC=$GCC 12109c82838c1SmrgGCC= 12110c82838c1SmrgCC=${RC-"windres"} 12111c82838c1SmrgCFLAGS= 12112c82838c1Smrgcompiler=$CC 12113c82838c1Smrg_LT_TAGVAR(compiler, $1)=$CC 12114c82838c1Smrg_LT_CC_BASENAME([$compiler]) 12115c82838c1Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 12116c82838c1Smrg 12117c82838c1Smrgif test -n "$compiler"; then 12118c82838c1Smrg : 12119c82838c1Smrg _LT_CONFIG($1) 12120c82838c1Smrgfi 12121c82838c1Smrg 12122c82838c1SmrgGCC=$lt_save_GCC 12123c82838c1SmrgAC_LANG_RESTORE 12124c82838c1SmrgCC=$lt_save_CC 12125c82838c1SmrgCFLAGS=$lt_save_CFLAGS 12126c82838c1Smrg])# _LT_LANG_RC_CONFIG 12127c82838c1Smrg 12128c82838c1Smrg 12129c82838c1Smrg# LT_PROG_GCJ 12130c82838c1Smrg# ----------- 12131c82838c1SmrgAC_DEFUN([LT_PROG_GCJ], 12132c82838c1Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 12133c82838c1Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 12134c82838c1Smrg [AC_CHECK_TOOL(GCJ, gcj,) 12135c82838c1Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 12136c82838c1Smrg AC_SUBST(GCJFLAGS)])])[]dnl 12137c82838c1Smrg]) 12138c82838c1Smrg 12139c82838c1Smrg# Old name: 12140c82838c1SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 12141c82838c1Smrgdnl aclocal-1.4 backwards compatibility: 12142c82838c1Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 12143c82838c1Smrg 12144c82838c1Smrg 12145c82838c1Smrg# LT_PROG_GO 12146c82838c1Smrg# ---------- 12147c82838c1SmrgAC_DEFUN([LT_PROG_GO], 12148c82838c1Smrg[AC_CHECK_TOOL(GOC, gccgo,) 12149c82838c1Smrg]) 12150c82838c1Smrg 12151c82838c1Smrg 12152c82838c1Smrg# LT_PROG_RC 12153c82838c1Smrg# ---------- 12154c82838c1SmrgAC_DEFUN([LT_PROG_RC], 12155c82838c1Smrg[AC_CHECK_TOOL(RC, windres,) 12156c82838c1Smrg]) 12157c82838c1Smrg 12158c82838c1Smrg# Old name: 12159c82838c1SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 12160c82838c1Smrgdnl aclocal-1.4 backwards compatibility: 12161c82838c1Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 12162c82838c1Smrg 12163c82838c1Smrg 12164c82838c1Smrg# _LT_DECL_EGREP 12165c82838c1Smrg# -------------- 12166c82838c1Smrg# If we don't have a new enough Autoconf to choose the best grep 12167c82838c1Smrg# available, choose the one first in the user's PATH. 12168c82838c1Smrgm4_defun([_LT_DECL_EGREP], 12169c82838c1Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 12170c82838c1SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 12171c82838c1Smrgtest -z "$GREP" && GREP=grep 12172c82838c1Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 12173c82838c1Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 12174c82838c1Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 12175c82838c1Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 12176c82838c1SmrgAC_SUBST([GREP]) 12177c82838c1Smrg]) 12178c82838c1Smrg 12179c82838c1Smrg 12180c82838c1Smrg# _LT_DECL_OBJDUMP 12181c82838c1Smrg# -------------- 12182c82838c1Smrg# If we don't have a new enough Autoconf to choose the best objdump 12183c82838c1Smrg# available, choose the one first in the user's PATH. 12184c82838c1Smrgm4_defun([_LT_DECL_OBJDUMP], 12185c82838c1Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 12186c82838c1Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 12187c82838c1Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 12188c82838c1SmrgAC_SUBST([OBJDUMP]) 12189c82838c1Smrg]) 12190c82838c1Smrg 12191c82838c1Smrg# _LT_DECL_DLLTOOL 12192c82838c1Smrg# ---------------- 12193c82838c1Smrg# Ensure DLLTOOL variable is set. 12194c82838c1Smrgm4_defun([_LT_DECL_DLLTOOL], 12195c82838c1Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 12196c82838c1Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 12197c82838c1Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 12198c82838c1SmrgAC_SUBST([DLLTOOL]) 12199c82838c1Smrg]) 12200c82838c1Smrg 12201c82838c1Smrg# _LT_DECL_FILECMD 12202c82838c1Smrg# ---------------- 12203c82838c1Smrg# Check for a file(cmd) program that can be used to detect file type and magic 12204c82838c1Smrgm4_defun([_LT_DECL_FILECMD], 12205c82838c1Smrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 12206c82838c1Smrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 12207c82838c1Smrg])# _LD_DECL_FILECMD 12208c82838c1Smrg 12209c82838c1Smrg# _LT_DECL_SED 12210c82838c1Smrg# ------------ 12211c82838c1Smrg# Check for a fully-functional sed program, that truncates 12212c82838c1Smrg# as few characters as possible. Prefer GNU sed if found. 12213c82838c1Smrgm4_defun([_LT_DECL_SED], 12214c82838c1Smrg[AC_PROG_SED 12215c82838c1Smrgtest -z "$SED" && SED=sed 12216c82838c1SmrgXsed="$SED -e 1s/^X//" 12217c82838c1Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 12218c82838c1Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 12219c82838c1Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 12220c82838c1Smrg])# _LT_DECL_SED 12221c82838c1Smrg 12222c82838c1Smrgm4_ifndef([AC_PROG_SED], [ 12223c82838c1Smrg# NOTE: This macro has been submitted for inclusion into # 12224c82838c1Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 12225c82838c1Smrg# a released version of Autoconf we should remove this # 12226c82838c1Smrg# macro and use it instead. # 12227c82838c1Smrg 12228c82838c1Smrgm4_defun([AC_PROG_SED], 12229c82838c1Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 12230c82838c1SmrgAC_CACHE_VAL(lt_cv_path_SED, 12231c82838c1Smrg[# Loop through the user's path and test for sed and gsed. 12232c82838c1Smrg# Then use that list of sed's as ones to test for truncation. 12233c82838c1Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 12234c82838c1Smrgfor as_dir in $PATH 12235c82838c1Smrgdo 12236c82838c1Smrg IFS=$as_save_IFS 12237c82838c1Smrg test -z "$as_dir" && as_dir=. 12238c82838c1Smrg for lt_ac_prog in sed gsed; do 12239c82838c1Smrg for ac_exec_ext in '' $ac_executable_extensions; do 12240c82838c1Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 12241c82838c1Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 12242c82838c1Smrg fi 12243c82838c1Smrg done 12244c82838c1Smrg done 12245c82838c1Smrgdone 12246c82838c1SmrgIFS=$as_save_IFS 12247c82838c1Smrglt_ac_max=0 12248c82838c1Smrglt_ac_count=0 12249c82838c1Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 12250c82838c1Smrg# along with /bin/sed that truncates output. 12251c82838c1Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 12252c82838c1Smrg test ! -f "$lt_ac_sed" && continue 12253c82838c1Smrg cat /dev/null > conftest.in 12254c82838c1Smrg lt_ac_count=0 12255c82838c1Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 12256c82838c1Smrg # Check for GNU sed and select it if it is found. 12257c82838c1Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 12258c82838c1Smrg lt_cv_path_SED=$lt_ac_sed 12259c82838c1Smrg break 12260c82838c1Smrg fi 12261c82838c1Smrg while true; do 12262c82838c1Smrg cat conftest.in conftest.in >conftest.tmp 12263c82838c1Smrg mv conftest.tmp conftest.in 12264c82838c1Smrg cp conftest.in conftest.nl 12265c82838c1Smrg echo >>conftest.nl 12266c82838c1Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 12267c82838c1Smrg cmp -s conftest.out conftest.nl || break 12268c82838c1Smrg # 10000 chars as input seems more than enough 12269c82838c1Smrg test 10 -lt "$lt_ac_count" && break 12270c82838c1Smrg lt_ac_count=`expr $lt_ac_count + 1` 12271c82838c1Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 12272c82838c1Smrg lt_ac_max=$lt_ac_count 12273c82838c1Smrg lt_cv_path_SED=$lt_ac_sed 12274c82838c1Smrg fi 12275c82838c1Smrg done 12276c82838c1Smrgdone 12277c82838c1Smrg]) 12278c82838c1SmrgSED=$lt_cv_path_SED 12279c82838c1SmrgAC_SUBST([SED]) 12280c82838c1SmrgAC_MSG_RESULT([$SED]) 12281c82838c1Smrg])#AC_PROG_SED 12282c82838c1Smrg])#m4_ifndef 12283c82838c1Smrg 12284c82838c1Smrg# Old name: 12285c82838c1SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 12286c82838c1Smrgdnl aclocal-1.4 backwards compatibility: 12287c82838c1Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 12288c82838c1Smrg 12289c82838c1Smrg 12290c82838c1Smrg# _LT_CHECK_SHELL_FEATURES 12291c82838c1Smrg# ------------------------ 12292c82838c1Smrg# Find out whether the shell is Bourne or XSI compatible, 12293c82838c1Smrg# or has some other useful features. 12294c82838c1Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 12295c82838c1Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 12296c82838c1Smrg lt_unset=unset 12297c82838c1Smrgelse 12298c82838c1Smrg lt_unset=false 12299c82838c1Smrgfi 12300c82838c1Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 12301c82838c1Smrg 12302c82838c1Smrg# test EBCDIC or ASCII 12303c82838c1Smrgcase `echo X|tr X '\101'` in 12304c82838c1Smrg A) # ASCII based system 12305c82838c1Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 12306c82838c1Smrg lt_SP2NL='tr \040 \012' 12307c82838c1Smrg lt_NL2SP='tr \015\012 \040\040' 12308c82838c1Smrg ;; 12309c82838c1Smrg *) # EBCDIC based system 12310c82838c1Smrg lt_SP2NL='tr \100 \n' 12311c82838c1Smrg lt_NL2SP='tr \r\n \100\100' 12312c82838c1Smrg ;; 12313c82838c1Smrgesac 12314c82838c1Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 12315c82838c1Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 12316c82838c1Smrg])# _LT_CHECK_SHELL_FEATURES 12317c82838c1Smrg 12318c82838c1Smrg 12319c82838c1Smrg# _LT_PATH_CONVERSION_FUNCTIONS 12320c82838c1Smrg# ----------------------------- 12321c82838c1Smrg# Determine what file name conversion functions should be used by 12322c82838c1Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 12323c82838c1Smrg# for certain cross-compile configurations and native mingw. 12324c82838c1Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 12325c82838c1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 12326c82838c1SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 12327c82838c1SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 12328c82838c1SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 12329c82838c1Smrg[case $host in 12330c82838c1Smrg *-*-mingw* ) 12331c82838c1Smrg case $build in 12332c82838c1Smrg *-*-mingw* ) # actually msys 12333c82838c1Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 12334c82838c1Smrg ;; 12335c82838c1Smrg *-*-cygwin* ) 12336c82838c1Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 12337c82838c1Smrg ;; 12338c82838c1Smrg * ) # otherwise, assume *nix 12339c82838c1Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 12340c82838c1Smrg ;; 12341c82838c1Smrg esac 12342c82838c1Smrg ;; 12343c82838c1Smrg *-*-cygwin* ) 12344c82838c1Smrg case $build in 12345c82838c1Smrg *-*-mingw* ) # actually msys 12346c82838c1Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 12347c82838c1Smrg ;; 12348c82838c1Smrg *-*-cygwin* ) 12349c82838c1Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 12350c82838c1Smrg ;; 12351c82838c1Smrg * ) # otherwise, assume *nix 12352c82838c1Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 12353c82838c1Smrg ;; 12354c82838c1Smrg esac 12355c82838c1Smrg ;; 12356c82838c1Smrg * ) # unhandled hosts (and "normal" native builds) 12357c82838c1Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 12358c82838c1Smrg ;; 12359c82838c1Smrgesac 12360c82838c1Smrg]) 12361c82838c1Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 12362c82838c1SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 12363c82838c1Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 12364c82838c1Smrg [0], [convert $build file names to $host format])dnl 12365c82838c1Smrg 12366c82838c1SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 12367c82838c1SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 12368c82838c1Smrg[#assume ordinary cross tools, or native build. 12369c82838c1Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 12370c82838c1Smrgcase $host in 12371c82838c1Smrg *-*-mingw* ) 12372c82838c1Smrg case $build in 12373c82838c1Smrg *-*-mingw* ) # actually msys 12374c82838c1Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 12375c82838c1Smrg ;; 12376c82838c1Smrg esac 12377c82838c1Smrg ;; 12378c82838c1Smrgesac 12379c82838c1Smrg]) 12380c82838c1Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 12381c82838c1SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 12382c82838c1Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 12383c82838c1Smrg [0], [convert $build files to toolchain format])dnl 12384c82838c1Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 12385c82838c1Smrg 12386c82838c1Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 12387c82838c1Smrg# 12388c82838c1Smrg# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 12389c82838c1Smrg# Inc. 12390c82838c1Smrg# Written by Scott James Remnant, 2004 12391c82838c1Smrg# 12392c82838c1Smrg# This file is free software; the Free Software Foundation gives 12393c82838c1Smrg# unlimited permission to copy and/or distribute it, with or without 12394c82838c1Smrg# modifications, as long as this notice is preserved. 12395c82838c1Smrg 12396c82838c1Smrg# @configure_input@ 12397c82838c1Smrg 12398c82838c1Smrg# serial 4245 ltversion.m4 12399c82838c1Smrg# This file is part of GNU Libtool 12400c82838c1Smrg 12401c82838c1Smrgm4_define([LT_PACKAGE_VERSION], [2.4.7]) 12402c82838c1Smrgm4_define([LT_PACKAGE_REVISION], [2.4.7]) 12403c82838c1Smrg 12404c82838c1SmrgAC_DEFUN([LTVERSION_VERSION], 12405c82838c1Smrg[macro_version='2.4.7' 12406c82838c1Smrgmacro_revision='2.4.7' 12407c82838c1Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 12408c82838c1Smrg_LT_DECL(, macro_revision, 0) 12409c82838c1Smrg]) 12410c82838c1Smrg 12411