aclocal.m4 revision 63847c39
163847c39Smrg# generated automatically by aclocal 1.11.3 -*- Autoconf -*- 276888252Smrg 376888252Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 463847c39Smrg# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 563847c39Smrg# Inc. 676888252Smrg# This file is free software; the Free Software Foundation 776888252Smrg# gives unlimited permission to copy and/or distribute it, 876888252Smrg# with or without modifications, as long as this notice is preserved. 976888252Smrg 1076888252Smrg# This program is distributed in the hope that it will be useful, 1176888252Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1276888252Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1376888252Smrg# PARTICULAR PURPOSE. 1476888252Smrg 1586dafe34Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1686dafe34Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1763847c39Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 1863847c39Smrg[m4_warning([this file was generated for autoconf 2.69. 1986dafe34SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 2086dafe34SmrgIf you have problems, you may need to regenerate the build system entirely. 2186dafe34SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 2276888252Smrg 2386dafe34Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2463847c39Smrg# 2563847c39Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2663847c39Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 2763847c39Smrg# Foundation, Inc. 2863847c39Smrg# Written by Gordon Matzigkeit, 1996 2963847c39Smrg# 3063847c39Smrg# This file is free software; the Free Software Foundation gives 3163847c39Smrg# unlimited permission to copy and/or distribute it, with or without 3263847c39Smrg# modifications, as long as this notice is preserved. 3363847c39Smrg 3463847c39Smrgm4_define([_LT_COPYING], [dnl 3563847c39Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 3663847c39Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 3763847c39Smrg# Foundation, Inc. 3863847c39Smrg# Written by Gordon Matzigkeit, 1996 3963847c39Smrg# 4063847c39Smrg# This file is part of GNU Libtool. 4163847c39Smrg# 4263847c39Smrg# GNU Libtool is free software; you can redistribute it and/or 4363847c39Smrg# modify it under the terms of the GNU General Public License as 4463847c39Smrg# published by the Free Software Foundation; either version 2 of 4563847c39Smrg# the License, or (at your option) any later version. 4663847c39Smrg# 4763847c39Smrg# As a special exception to the GNU General Public License, 4863847c39Smrg# if you distribute this file as part of a program or library that 4963847c39Smrg# is built using GNU Libtool, you may include this file under the 5063847c39Smrg# same distribution terms that you use for the rest of that program. 5163847c39Smrg# 5263847c39Smrg# GNU Libtool is distributed in the hope that it will be useful, 5363847c39Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 5463847c39Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 5563847c39Smrg# GNU General Public License for more details. 5663847c39Smrg# 5763847c39Smrg# You should have received a copy of the GNU General Public License 5863847c39Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 5963847c39Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 6063847c39Smrg# obtained by writing to the Free Software Foundation, Inc., 6163847c39Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 6263847c39Smrg]) 6376888252Smrg 6463847c39Smrg# serial 57 LT_INIT 6576888252Smrg 6676888252Smrg 6763847c39Smrg# LT_PREREQ(VERSION) 6863847c39Smrg# ------------------ 6963847c39Smrg# Complain and exit if this libtool version is less that VERSION. 7063847c39Smrgm4_defun([LT_PREREQ], 7163847c39Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 7263847c39Smrg [m4_default([$3], 7363847c39Smrg [m4_fatal([Libtool version $1 or higher is required], 7463847c39Smrg 63)])], 7563847c39Smrg [$2])]) 7676888252Smrg 7776888252Smrg 7863847c39Smrg# _LT_CHECK_BUILDDIR 7963847c39Smrg# ------------------ 8063847c39Smrg# Complain if the absolute build directory name contains unusual characters 8163847c39Smrgm4_defun([_LT_CHECK_BUILDDIR], 8263847c39Smrg[case `pwd` in 8363847c39Smrg *\ * | *\ *) 8463847c39Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 8563847c39Smrgesac 8663847c39Smrg]) 8763847c39Smrg 8863847c39Smrg 8963847c39Smrg# LT_INIT([OPTIONS]) 9063847c39Smrg# ------------------ 9163847c39SmrgAC_DEFUN([LT_INIT], 9263847c39Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 9363847c39SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 9463847c39SmrgAC_BEFORE([$0], [LT_LANG])dnl 9563847c39SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 9663847c39SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 9763847c39Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 9863847c39Smrg 9963847c39Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 10063847c39Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 10163847c39Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 10263847c39Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 10363847c39Smrgdnl unless we require an AC_DEFUNed macro: 10463847c39SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 10563847c39SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 10663847c39SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 10763847c39SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 10863847c39Smrgm4_require([_LT_PROG_LTMAIN])dnl 10963847c39Smrg 11063847c39Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 11163847c39Smrg 11263847c39Smrgdnl Parse OPTIONS 11363847c39Smrg_LT_SET_OPTIONS([$0], [$1]) 11476888252Smrg 11586dafe34Smrg# This can be used to rebuild libtool when needed 11663847c39SmrgLIBTOOL_DEPS="$ltmain" 11776888252Smrg 11886dafe34Smrg# Always use our own libtool. 11986dafe34SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 12086dafe34SmrgAC_SUBST(LIBTOOL)dnl 12176888252Smrg 12263847c39Smrg_LT_SETUP 12376888252Smrg 12463847c39Smrg# Only expand once: 12563847c39Smrgm4_define([LT_INIT]) 12663847c39Smrg])# LT_INIT 12786dafe34Smrg 12863847c39Smrg# Old names: 12963847c39SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 13063847c39SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 13163847c39Smrgdnl aclocal-1.4 backwards compatibility: 13263847c39Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 13363847c39Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 13463847c39Smrg 13563847c39Smrg 13663847c39Smrg# _LT_CC_BASENAME(CC) 13763847c39Smrg# ------------------- 13863847c39Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 13963847c39Smrgm4_defun([_LT_CC_BASENAME], 14063847c39Smrg[for cc_temp in $1""; do 14163847c39Smrg case $cc_temp in 14263847c39Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 14363847c39Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 14463847c39Smrg \-*) ;; 14563847c39Smrg *) break;; 14663847c39Smrg esac 14763847c39Smrgdone 14863847c39Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 14963847c39Smrg]) 15063847c39Smrg 15163847c39Smrg 15263847c39Smrg# _LT_FILEUTILS_DEFAULTS 15363847c39Smrg# ---------------------- 15463847c39Smrg# It is okay to use these file commands and assume they have been set 15563847c39Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 15663847c39Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 15763847c39Smrg[: ${CP="cp -f"} 15863847c39Smrg: ${MV="mv -f"} 15963847c39Smrg: ${RM="rm -f"} 16063847c39Smrg])# _LT_FILEUTILS_DEFAULTS 16163847c39Smrg 16263847c39Smrg 16363847c39Smrg# _LT_SETUP 16463847c39Smrg# --------- 16563847c39Smrgm4_defun([_LT_SETUP], 16663847c39Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16786dafe34SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 16863847c39SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 16963847c39SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 170d8556812Smrg 17163847c39Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 17263847c39Smrgdnl 17363847c39Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 17463847c39Smrg_LT_DECL([], [host], [0])dnl 17563847c39Smrg_LT_DECL([], [host_os], [0])dnl 17663847c39Smrgdnl 17763847c39Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 17863847c39Smrg_LT_DECL([], [build], [0])dnl 17963847c39Smrg_LT_DECL([], [build_os], [0])dnl 18063847c39Smrgdnl 18163847c39SmrgAC_REQUIRE([AC_PROG_CC])dnl 18263847c39SmrgAC_REQUIRE([LT_PATH_LD])dnl 18363847c39SmrgAC_REQUIRE([LT_PATH_NM])dnl 18463847c39Smrgdnl 18586dafe34SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 18663847c39Smrgtest -z "$LN_S" && LN_S="ln -s" 18763847c39Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 18886dafe34Smrgdnl 18963847c39SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 19063847c39Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 19163847c39Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 19263847c39Smrgdnl 19363847c39Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 19463847c39Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 19563847c39Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 19663847c39Smrgm4_require([_LT_CMD_RELOAD])dnl 19763847c39Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 19863847c39Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 19963847c39Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 20063847c39Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 20163847c39Smrgm4_require([_LT_WITH_SYSROOT])dnl 20263847c39Smrg 20363847c39Smrg_LT_CONFIG_LIBTOOL_INIT([ 20463847c39Smrg# See if we are running on zsh, and set the options which allow our 20563847c39Smrg# commands through without removal of \ escapes INIT. 20663847c39Smrgif test -n "\${ZSH_VERSION+set}" ; then 20763847c39Smrg setopt NO_GLOB_SUBST 20863847c39Smrgfi 20963847c39Smrg]) 21063847c39Smrgif test -n "${ZSH_VERSION+set}" ; then 21163847c39Smrg setopt NO_GLOB_SUBST 21263847c39Smrgfi 21376888252Smrg 21463847c39Smrg_LT_CHECK_OBJDIR 21563847c39Smrg 21663847c39Smrgm4_require([_LT_TAG_COMPILER])dnl 21776888252Smrg 21886dafe34Smrgcase $host_os in 21986dafe34Smrgaix3*) 22086dafe34Smrg # AIX sometimes has problems with the GCC collect2 program. For some 22186dafe34Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 22286dafe34Smrg # vanish in a puff of smoke. 22386dafe34Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 22486dafe34Smrg COLLECT_NAMES= 22586dafe34Smrg export COLLECT_NAMES 22686dafe34Smrg fi 22786dafe34Smrg ;; 22886dafe34Smrgesac 22976888252Smrg 23086dafe34Smrg# Global variables: 23163847c39Smrgofile=libtool 23286dafe34Smrgcan_build_shared=yes 23376888252Smrg 23486dafe34Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 23586dafe34Smrg# which needs '.lib'). 23686dafe34Smrglibext=a 23776888252Smrg 23863847c39Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 239d8556812Smrg 24086dafe34Smrgold_CC="$CC" 24186dafe34Smrgold_CFLAGS="$CFLAGS" 2421ae1b5e8Smrg 24386dafe34Smrg# Set sane defaults for various variables 24486dafe34Smrgtest -z "$CC" && CC=cc 24586dafe34Smrgtest -z "$LTCC" && LTCC=$CC 24686dafe34Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 24786dafe34Smrgtest -z "$LD" && LD=ld 24886dafe34Smrgtest -z "$ac_objext" && ac_objext=o 2491ae1b5e8Smrg 25086dafe34Smrg_LT_CC_BASENAME([$compiler]) 2511ae1b5e8Smrg 25286dafe34Smrg# Only perform the check for file, if the check method requires it 25363847c39Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 25486dafe34Smrgcase $deplibs_check_method in 25586dafe34Smrgfile_magic*) 25686dafe34Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 25763847c39Smrg _LT_PATH_MAGIC 25886dafe34Smrg fi 25986dafe34Smrg ;; 26086dafe34Smrgesac 26176888252Smrg 26263847c39Smrg# Use C for the default configuration in the libtool script 26363847c39SmrgLT_SUPPORTED_TAG([CC]) 26463847c39Smrg_LT_LANG_C_CONFIG 26563847c39Smrg_LT_LANG_DEFAULT_CONFIG 26663847c39Smrg_LT_CONFIG_COMMANDS 26763847c39Smrg])# _LT_SETUP 26876888252Smrg 26976888252Smrg 27063847c39Smrg# _LT_PREPARE_SED_QUOTE_VARS 27163847c39Smrg# -------------------------- 27263847c39Smrg# Define a few sed substitution that help us do robust quoting. 27363847c39Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 27463847c39Smrg[# Backslashify metacharacters that are still active within 27563847c39Smrg# double-quoted strings. 27663847c39Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 27776888252Smrg 27863847c39Smrg# Same as above, but do not quote variable references. 27963847c39Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 28076888252Smrg 28163847c39Smrg# Sed substitution to delay expansion of an escaped shell variable in a 28263847c39Smrg# double_quote_subst'ed string. 28363847c39Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 28476888252Smrg 28563847c39Smrg# Sed substitution to delay expansion of an escaped single quote. 28663847c39Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 28776888252Smrg 28863847c39Smrg# Sed substitution to avoid accidental globbing in evaled expressions 28963847c39Smrgno_glob_subst='s/\*/\\\*/g' 29063847c39Smrg]) 29176888252Smrg 29263847c39Smrg# _LT_PROG_LTMAIN 29363847c39Smrg# --------------- 29463847c39Smrg# Note that this code is called both from `configure', and `config.status' 29563847c39Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 29663847c39Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 29763847c39Smrg# so we pass a copy along to make sure it has a sensible value anyway. 29863847c39Smrgm4_defun([_LT_PROG_LTMAIN], 29963847c39Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 30063847c39Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 30163847c39Smrgltmain="$ac_aux_dir/ltmain.sh" 30263847c39Smrg])# _LT_PROG_LTMAIN 30376888252Smrg 30476888252Smrg 305d8556812Smrg 30663847c39Smrg# So that we can recreate a full libtool script including additional 30763847c39Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 30863847c39Smrg# in macros and then make a single call at the end using the `libtool' 30963847c39Smrg# label. 310d8556812Smrg 31176888252Smrg 31263847c39Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 31363847c39Smrg# ---------------------------------------- 31463847c39Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 31563847c39Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 31663847c39Smrg[m4_ifval([$1], 31763847c39Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 31863847c39Smrg [$1 31963847c39Smrg])])]) 32076888252Smrg 32163847c39Smrg# Initialize. 32263847c39Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 32376888252Smrg 32476888252Smrg 32563847c39Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 32663847c39Smrg# ------------------------------ 32763847c39Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 32863847c39Smrgm4_define([_LT_CONFIG_LIBTOOL], 32963847c39Smrg[m4_ifval([$1], 33063847c39Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 33163847c39Smrg [$1 33263847c39Smrg])])]) 33363847c39Smrg 33463847c39Smrg# Initialize. 33563847c39Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 33663847c39Smrg 33763847c39Smrg 33863847c39Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 33963847c39Smrg# ----------------------------------------------------- 34063847c39Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 34163847c39Smrg[_LT_CONFIG_LIBTOOL([$1]) 34263847c39Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 34363847c39Smrg]) 34476888252Smrg 34586dafe34Smrg 34663847c39Smrg# _LT_FORMAT_COMMENT([COMMENT]) 34763847c39Smrg# ----------------------------- 34863847c39Smrg# Add leading comment marks to the start of each line, and a trailing 34963847c39Smrg# full-stop to the whole comment if one is not present already. 35063847c39Smrgm4_define([_LT_FORMAT_COMMENT], 35163847c39Smrg[m4_ifval([$1], [ 35263847c39Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 35363847c39Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 35463847c39Smrg)]) 35563847c39Smrg 35663847c39Smrg 35763847c39Smrg 35863847c39Smrg 35963847c39Smrg 36063847c39Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 36163847c39Smrg# ------------------------------------------------------------------- 36263847c39Smrg# CONFIGNAME is the name given to the value in the libtool script. 36363847c39Smrg# VARNAME is the (base) name used in the configure script. 36463847c39Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 36563847c39Smrg# VARNAME. Any other value will be used directly. 36663847c39Smrgm4_define([_LT_DECL], 36763847c39Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 36863847c39Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 36963847c39Smrg [m4_ifval([$1], [$1], [$2])]) 37063847c39Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 37163847c39Smrg m4_ifval([$4], 37263847c39Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 37363847c39Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 37463847c39Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 37586dafe34Smrg]) 37676888252Smrg 37776888252Smrg 37863847c39Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 37963847c39Smrg# -------------------------------------------------------- 38063847c39Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 38176888252Smrg 38276888252Smrg 38363847c39Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 38463847c39Smrg# ------------------------------------------------ 38563847c39Smrgm4_define([lt_decl_tag_varnames], 38663847c39Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 38776888252Smrg 38886dafe34Smrg 38963847c39Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 39063847c39Smrg# --------------------------------------------------------- 39163847c39Smrgm4_define([_lt_decl_filter], 39263847c39Smrg[m4_case([$#], 39363847c39Smrg [0], [m4_fatal([$0: too few arguments: $#])], 39463847c39Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 39563847c39Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 39663847c39Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 39763847c39Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 39863847c39Smrg]) 39976888252Smrg 40076888252Smrg 40163847c39Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 40263847c39Smrg# -------------------------------------------------- 40363847c39Smrgm4_define([lt_decl_quote_varnames], 40463847c39Smrg[_lt_decl_filter([value], [1], $@)]) 40576888252Smrg 40676888252Smrg 40763847c39Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 40863847c39Smrg# --------------------------------------------------- 40963847c39Smrgm4_define([lt_decl_dquote_varnames], 41063847c39Smrg[_lt_decl_filter([value], [2], $@)]) 41176888252Smrg 41276888252Smrg 41363847c39Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 41463847c39Smrg# --------------------------------------------------- 41563847c39Smrgm4_define([lt_decl_varnames_tagged], 41663847c39Smrg[m4_assert([$# <= 2])dnl 41763847c39Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 41863847c39Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 41963847c39Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 42063847c39Smrgm4_define([_lt_decl_varnames_tagged], 42163847c39Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 42276888252Smrg 423d8556812Smrg 42463847c39Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 42563847c39Smrg# ------------------------------------------------ 42663847c39Smrgm4_define([lt_decl_all_varnames], 42763847c39Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 42863847c39Smrg m4_if([$2], [], 42963847c39Smrg m4_quote(lt_decl_varnames), 43063847c39Smrg m4_quote(m4_shift($@))))[]dnl 43163847c39Smrg]) 43263847c39Smrgm4_define([_lt_decl_all_varnames], 43363847c39Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 43463847c39Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 43563847c39Smrg]) 43676888252Smrg 43776888252Smrg 43863847c39Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 43963847c39Smrg# ------------------------------------ 44063847c39Smrg# Quote a variable value, and forward it to `config.status' so that its 44163847c39Smrg# declaration there will have the same value as in `configure'. VARNAME 44263847c39Smrg# must have a single quote delimited value for this to work. 44363847c39Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 44463847c39Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 44576888252Smrg 44676888252Smrg 44763847c39Smrg# _LT_CONFIG_STATUS_DECLARATIONS 44863847c39Smrg# ------------------------------ 44963847c39Smrg# We delimit libtool config variables with single quotes, so when 45063847c39Smrg# we write them to config.status, we have to be sure to quote all 45163847c39Smrg# embedded single quotes properly. In configure, this macro expands 45263847c39Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 45363847c39Smrg# 45463847c39Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 45563847c39Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 45663847c39Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 45763847c39Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 45876888252Smrg 45963847c39Smrg 46063847c39Smrg# _LT_LIBTOOL_TAGS 46163847c39Smrg# ---------------- 46263847c39Smrg# Output comment and list of tags supported by the script 46363847c39Smrgm4_defun([_LT_LIBTOOL_TAGS], 46463847c39Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 46563847c39Smrgavailable_tags="_LT_TAGS"dnl 46663847c39Smrg]) 46763847c39Smrg 46863847c39Smrg 46963847c39Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 47063847c39Smrg# ----------------------------------- 47163847c39Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 47263847c39Smrg# expand to a commented shell variable setting: 47363847c39Smrg# 47463847c39Smrg# # Some comment about what VAR is for. 47563847c39Smrg# visible_name=$lt_internal_name 47663847c39Smrgm4_define([_LT_LIBTOOL_DECLARE], 47763847c39Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 47863847c39Smrg [description])))[]dnl 47963847c39Smrgm4_pushdef([_libtool_name], 48063847c39Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 48163847c39Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 48263847c39Smrg [0], [_libtool_name=[$]$1], 48363847c39Smrg [1], [_libtool_name=$lt_[]$1], 48463847c39Smrg [2], [_libtool_name=$lt_[]$1], 48563847c39Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 48663847c39Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 48763847c39Smrg]) 48863847c39Smrg 48963847c39Smrg 49063847c39Smrg# _LT_LIBTOOL_CONFIG_VARS 49163847c39Smrg# ----------------------- 49263847c39Smrg# Produce commented declarations of non-tagged libtool config variables 49363847c39Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 49463847c39Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 49563847c39Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 49663847c39Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 49763847c39Smrg[m4_foreach([_lt_var], 49863847c39Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 49963847c39Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 50063847c39Smrg 50163847c39Smrg 50263847c39Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 50363847c39Smrg# ------------------------- 50463847c39Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 50563847c39Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 50663847c39Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 50763847c39Smrg 50863847c39Smrg 50963847c39Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 51063847c39Smrg# ------------------------------ 51163847c39Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 51263847c39Smrg 51363847c39Smrg 51463847c39Smrg# _LT_CONFIG_COMMANDS 51563847c39Smrg# ------------------- 51663847c39Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 51763847c39Smrg# variables for single and double quote escaping we saved from calls 51863847c39Smrg# to _LT_DECL, we can put quote escaped variables declarations 51963847c39Smrg# into `config.status', and then the shell code to quote escape them in 52063847c39Smrg# for loops in `config.status'. Finally, any additional code accumulated 52163847c39Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 52263847c39Smrgm4_defun([_LT_CONFIG_COMMANDS], 52363847c39Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 52463847c39Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 52563847c39Smrg dnl instead of duplicating it all over again into config.status, 52663847c39Smrg dnl then we will have config.status run $CONFIG_LT later, so it 52763847c39Smrg dnl needs to know what name is stored there: 52863847c39Smrg [AC_CONFIG_COMMANDS([libtool], 52963847c39Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 53063847c39Smrg dnl If the libtool generation code is destined for config.status, 53163847c39Smrg dnl expand the accumulated commands and init code now: 53263847c39Smrg [AC_CONFIG_COMMANDS([libtool], 53363847c39Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 53463847c39Smrg])#_LT_CONFIG_COMMANDS 53563847c39Smrg 53663847c39Smrg 53763847c39Smrg# Initialize. 53863847c39Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 53963847c39Smrg[ 54063847c39Smrg 54163847c39Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 54263847c39Smrg# if CDPATH is set. 54363847c39Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 54463847c39Smrg 54563847c39Smrgsed_quote_subst='$sed_quote_subst' 54663847c39Smrgdouble_quote_subst='$double_quote_subst' 54763847c39Smrgdelay_variable_subst='$delay_variable_subst' 54863847c39Smrg_LT_CONFIG_STATUS_DECLARATIONS 54963847c39SmrgLTCC='$LTCC' 55063847c39SmrgLTCFLAGS='$LTCFLAGS' 55163847c39Smrgcompiler='$compiler_DEFAULT' 55263847c39Smrg 55363847c39Smrg# A function that is used when there is no print builtin or printf. 55463847c39Smrgfunc_fallback_echo () 55563847c39Smrg{ 55663847c39Smrg eval 'cat <<_LTECHO_EOF 55763847c39Smrg\$[]1 55863847c39Smrg_LTECHO_EOF' 55963847c39Smrg} 56063847c39Smrg 56163847c39Smrg# Quote evaled strings. 56263847c39Smrgfor var in lt_decl_all_varnames([[ \ 56363847c39Smrg]], lt_decl_quote_varnames); do 56463847c39Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 56563847c39Smrg *[[\\\\\\\`\\"\\\$]]*) 56663847c39Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 567d8556812Smrg ;; 56863847c39Smrg *) 56963847c39Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 570d8556812Smrg ;; 571d8556812Smrg esac 57263847c39Smrgdone 57376888252Smrg 57463847c39Smrg# Double-quote double-evaled strings. 57563847c39Smrgfor var in lt_decl_all_varnames([[ \ 57663847c39Smrg]], lt_decl_dquote_varnames); do 57763847c39Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 57863847c39Smrg *[[\\\\\\\`\\"\\\$]]*) 57963847c39Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 580d8556812Smrg ;; 58163847c39Smrg *) 58263847c39Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 583d8556812Smrg ;; 58486dafe34Smrg esac 58563847c39Smrgdone 58676888252Smrg 58763847c39Smrg_LT_OUTPUT_LIBTOOL_INIT 58863847c39Smrg]) 589d8556812Smrg 59063847c39Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 59163847c39Smrg# ------------------------------------ 59263847c39Smrg# Generate a child script FILE with all initialization necessary to 59363847c39Smrg# reuse the environment learned by the parent script, and make the 59463847c39Smrg# file executable. If COMMENT is supplied, it is inserted after the 59563847c39Smrg# `#!' sequence but before initialization text begins. After this 59663847c39Smrg# macro, additional text can be appended to FILE to form the body of 59763847c39Smrg# the child script. The macro ends with non-zero status if the 59863847c39Smrg# file could not be fully written (such as if the disk is full). 59963847c39Smrgm4_ifdef([AS_INIT_GENERATED], 60063847c39Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 60163847c39Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 60263847c39Smrg[m4_require([AS_PREPARE])]dnl 60363847c39Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 60463847c39Smrg[lt_write_fail=0 60563847c39Smrgcat >$1 <<_ASEOF || lt_write_fail=1 60663847c39Smrg#! $SHELL 60763847c39Smrg# Generated by $as_me. 60863847c39Smrg$2 60963847c39SmrgSHELL=\${CONFIG_SHELL-$SHELL} 61063847c39Smrgexport SHELL 61163847c39Smrg_ASEOF 61263847c39Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 61363847c39SmrgAS_SHELL_SANITIZE 61463847c39Smrg_AS_PREPARE 61563847c39Smrgexec AS_MESSAGE_FD>&1 61663847c39Smrg_ASEOF 61763847c39Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 61863847c39Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 61963847c39Smrg 62063847c39Smrg# LT_OUTPUT 62163847c39Smrg# --------- 62263847c39Smrg# This macro allows early generation of the libtool script (before 62363847c39Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 62463847c39Smrg# tests. 62563847c39SmrgAC_DEFUN([LT_OUTPUT], 62663847c39Smrg[: ${CONFIG_LT=./config.lt} 62763847c39SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 62863847c39Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 62963847c39Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 63063847c39Smrg 63163847c39Smrgcat >>"$CONFIG_LT" <<\_LTEOF 63263847c39Smrglt_cl_silent=false 63363847c39Smrgexec AS_MESSAGE_LOG_FD>>config.log 63463847c39Smrg{ 63563847c39Smrg echo 63663847c39Smrg AS_BOX([Running $as_me.]) 63763847c39Smrg} >&AS_MESSAGE_LOG_FD 63876888252Smrg 63963847c39Smrglt_cl_help="\ 64063847c39Smrg\`$as_me' creates a local libtool stub from the current configuration, 64163847c39Smrgfor use in further configure time tests before the real libtool is 64263847c39Smrggenerated. 64376888252Smrg 64463847c39SmrgUsage: $[0] [[OPTIONS]] 64576888252Smrg 64663847c39Smrg -h, --help print this help, then exit 64763847c39Smrg -V, --version print version number, then exit 64863847c39Smrg -q, --quiet do not print progress messages 64963847c39Smrg -d, --debug don't remove temporary files 65076888252Smrg 65163847c39SmrgReport bugs to <bug-libtool@gnu.org>." 65276888252Smrg 65363847c39Smrglt_cl_version="\ 65463847c39Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 65563847c39Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 65663847c39Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 65776888252Smrg 65863847c39SmrgCopyright (C) 2011 Free Software Foundation, Inc. 65963847c39SmrgThis config.lt script is free software; the Free Software Foundation 66063847c39Smrggives unlimited permision to copy, distribute and modify it." 66176888252Smrg 66263847c39Smrgwhile test $[#] != 0 66363847c39Smrgdo 66463847c39Smrg case $[1] in 66563847c39Smrg --version | --v* | -V ) 66663847c39Smrg echo "$lt_cl_version"; exit 0 ;; 66763847c39Smrg --help | --h* | -h ) 66863847c39Smrg echo "$lt_cl_help"; exit 0 ;; 66963847c39Smrg --debug | --d* | -d ) 67063847c39Smrg debug=: ;; 67163847c39Smrg --quiet | --q* | --silent | --s* | -q ) 67263847c39Smrg lt_cl_silent=: ;; 67363847c39Smrg 67463847c39Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 67563847c39SmrgTry \`$[0] --help' for more information.]) ;; 67663847c39Smrg 67763847c39Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 67863847c39SmrgTry \`$[0] --help' for more information.]) ;; 67963847c39Smrg esac 68063847c39Smrg shift 68163847c39Smrgdone 68276888252Smrg 68363847c39Smrgif $lt_cl_silent; then 68463847c39Smrg exec AS_MESSAGE_FD>/dev/null 68576888252Smrgfi 68663847c39Smrg_LTEOF 68763847c39Smrg 68863847c39Smrgcat >>"$CONFIG_LT" <<_LTEOF 68963847c39Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 69063847c39Smrg_LTEOF 69163847c39Smrg 69263847c39Smrgcat >>"$CONFIG_LT" <<\_LTEOF 69363847c39SmrgAC_MSG_NOTICE([creating $ofile]) 69463847c39Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 69563847c39SmrgAS_EXIT(0) 69663847c39Smrg_LTEOF 69763847c39Smrgchmod +x "$CONFIG_LT" 69863847c39Smrg 69963847c39Smrg# configure is writing to config.log, but config.lt does its own redirection, 70063847c39Smrg# appending to config.log, which fails on DOS, as config.log is still kept 70163847c39Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 70263847c39Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 70363847c39Smrglt_cl_success=: 70463847c39Smrgtest "$silent" = yes && 70563847c39Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 70663847c39Smrgexec AS_MESSAGE_LOG_FD>/dev/null 70763847c39Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 70863847c39Smrgexec AS_MESSAGE_LOG_FD>>config.log 70963847c39Smrg$lt_cl_success || AS_EXIT(1) 71063847c39Smrg])# LT_OUTPUT 71163847c39Smrg 71263847c39Smrg 71363847c39Smrg# _LT_CONFIG(TAG) 71463847c39Smrg# --------------- 71563847c39Smrg# If TAG is the built-in tag, create an initial libtool script with a 71663847c39Smrg# default configuration from the untagged config vars. Otherwise add code 71763847c39Smrg# to config.status for appending the configuration named by TAG from the 71863847c39Smrg# matching tagged config vars. 71963847c39Smrgm4_defun([_LT_CONFIG], 72063847c39Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 72163847c39Smrg_LT_CONFIG_SAVE_COMMANDS([ 72263847c39Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 72363847c39Smrg m4_if(_LT_TAG, [C], [ 72463847c39Smrg # See if we are running on zsh, and set the options which allow our 72563847c39Smrg # commands through without removal of \ escapes. 72663847c39Smrg if test -n "${ZSH_VERSION+set}" ; then 72763847c39Smrg setopt NO_GLOB_SUBST 72863847c39Smrg fi 72976888252Smrg 73063847c39Smrg cfgfile="${ofile}T" 73163847c39Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 73263847c39Smrg $RM "$cfgfile" 73376888252Smrg 73463847c39Smrg cat <<_LT_EOF >> "$cfgfile" 73563847c39Smrg#! $SHELL 73676888252Smrg 73763847c39Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 73863847c39Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 73963847c39Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 74063847c39Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 74163847c39Smrg# 74263847c39Smrg_LT_COPYING 74363847c39Smrg_LT_LIBTOOL_TAGS 74476888252Smrg 74563847c39Smrg# ### BEGIN LIBTOOL CONFIG 74663847c39Smrg_LT_LIBTOOL_CONFIG_VARS 74763847c39Smrg_LT_LIBTOOL_TAG_VARS 74863847c39Smrg# ### END LIBTOOL CONFIG 74976888252Smrg 75063847c39Smrg_LT_EOF 75176888252Smrg 75263847c39Smrg case $host_os in 75363847c39Smrg aix3*) 75463847c39Smrg cat <<\_LT_EOF >> "$cfgfile" 75563847c39Smrg# AIX sometimes has problems with the GCC collect2 program. For some 75663847c39Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 75763847c39Smrg# vanish in a puff of smoke. 75863847c39Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 75963847c39Smrg COLLECT_NAMES= 76063847c39Smrg export COLLECT_NAMES 76163847c39Smrgfi 76263847c39Smrg_LT_EOF 76386dafe34Smrg ;; 76463847c39Smrg esac 76576888252Smrg 76663847c39Smrg _LT_PROG_LTMAIN 76786dafe34Smrg 76863847c39Smrg # We use sed instead of cat because bash on DJGPP gets confused if 76963847c39Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 77063847c39Smrg # text mode, it properly converts lines to CR/LF. This bash problem 77163847c39Smrg # is reportedly fixed, but why not run on old versions too? 77263847c39Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 77363847c39Smrg || (rm -f "$cfgfile"; exit 1) 77463847c39Smrg 77563847c39Smrg _LT_PROG_REPLACE_SHELLFNS 77663847c39Smrg 77763847c39Smrg mv -f "$cfgfile" "$ofile" || 77863847c39Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 77963847c39Smrg chmod +x "$ofile" 78063847c39Smrg], 78163847c39Smrg[cat <<_LT_EOF >> "$ofile" 78263847c39Smrg 78363847c39Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 78463847c39Smrgdnl in a comment (ie after a #). 78563847c39Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 78663847c39Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 78763847c39Smrg# ### END LIBTOOL TAG CONFIG: $1 78863847c39Smrg_LT_EOF 78963847c39Smrg])dnl /m4_if 79063847c39Smrg], 79163847c39Smrg[m4_if([$1], [], [ 79263847c39Smrg PACKAGE='$PACKAGE' 79363847c39Smrg VERSION='$VERSION' 79463847c39Smrg TIMESTAMP='$TIMESTAMP' 79563847c39Smrg RM='$RM' 79663847c39Smrg ofile='$ofile'], []) 79763847c39Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 79863847c39Smrg])# _LT_CONFIG 79986dafe34Smrg 80063847c39Smrg 80163847c39Smrg# LT_SUPPORTED_TAG(TAG) 80263847c39Smrg# --------------------- 80363847c39Smrg# Trace this macro to discover what tags are supported by the libtool 80463847c39Smrg# --tag option, using: 80563847c39Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 80663847c39SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 80763847c39Smrg 80863847c39Smrg 80963847c39Smrg# C support is built-in for now 81063847c39Smrgm4_define([_LT_LANG_C_enabled], []) 81163847c39Smrgm4_define([_LT_TAGS], []) 81276888252Smrg 8131ae1b5e8Smrg 81463847c39Smrg# LT_LANG(LANG) 81563847c39Smrg# ------------- 81663847c39Smrg# Enable libtool support for the given language if not already enabled. 81763847c39SmrgAC_DEFUN([LT_LANG], 81863847c39Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 81963847c39Smrgm4_case([$1], 82063847c39Smrg [C], [_LT_LANG(C)], 82163847c39Smrg [C++], [_LT_LANG(CXX)], 82263847c39Smrg [Go], [_LT_LANG(GO)], 82363847c39Smrg [Java], [_LT_LANG(GCJ)], 82463847c39Smrg [Fortran 77], [_LT_LANG(F77)], 82563847c39Smrg [Fortran], [_LT_LANG(FC)], 82663847c39Smrg [Windows Resource], [_LT_LANG(RC)], 82763847c39Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 82863847c39Smrg [_LT_LANG($1)], 82963847c39Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 83063847c39Smrg])# LT_LANG 83163847c39Smrg 83263847c39Smrg 83363847c39Smrg# _LT_LANG(LANGNAME) 834d8556812Smrg# ------------------ 83563847c39Smrgm4_defun([_LT_LANG], 83663847c39Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 83763847c39Smrg [LT_SUPPORTED_TAG([$1])dnl 83863847c39Smrg m4_append([_LT_TAGS], [$1 ])dnl 83963847c39Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 84063847c39Smrg _LT_LANG_$1_CONFIG($1)])dnl 84163847c39Smrg])# _LT_LANG 84276888252Smrg 84376888252Smrg 84463847c39Smrgm4_ifndef([AC_PROG_GO], [ 84563847c39Smrg# NOTE: This macro has been submitted for inclusion into # 84663847c39Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 84763847c39Smrg# a released version of Autoconf we should remove this # 84863847c39Smrg# macro and use it instead. # 84963847c39Smrgm4_defun([AC_PROG_GO], 85063847c39Smrg[AC_LANG_PUSH(Go)dnl 85163847c39SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 85263847c39SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 85363847c39Smrg_AC_ARG_VAR_LDFLAGS()dnl 85463847c39SmrgAC_CHECK_TOOL(GOC, gccgo) 85563847c39Smrgif test -z "$GOC"; then 85663847c39Smrg if test -n "$ac_tool_prefix"; then 85763847c39Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 85863847c39Smrg fi 85963847c39Smrgfi 86063847c39Smrgif test -z "$GOC"; then 86163847c39Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 86263847c39Smrgfi 86363847c39Smrg])#m4_defun 86463847c39Smrg])#m4_ifndef 86576888252Smrg 86676888252Smrg 86763847c39Smrg# _LT_LANG_DEFAULT_CONFIG 86863847c39Smrg# ----------------------- 86963847c39Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 87063847c39Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 87163847c39Smrg [LT_LANG(CXX)], 87263847c39Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 87363847c39Smrg 87463847c39SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 87563847c39Smrg [LT_LANG(F77)], 87663847c39Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 87763847c39Smrg 87863847c39SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 87963847c39Smrg [LT_LANG(FC)], 88063847c39Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 88163847c39Smrg 88263847c39Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 88363847c39Smrgdnl pulling things in needlessly. 88463847c39SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 88563847c39Smrg [LT_LANG(GCJ)], 88663847c39Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 88763847c39Smrg [LT_LANG(GCJ)], 88863847c39Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 88963847c39Smrg [LT_LANG(GCJ)], 89063847c39Smrg [m4_ifdef([AC_PROG_GCJ], 89163847c39Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 89263847c39Smrg m4_ifdef([A][M_PROG_GCJ], 89363847c39Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 89463847c39Smrg m4_ifdef([LT_PROG_GCJ], 89563847c39Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 89663847c39Smrg 89763847c39SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 89863847c39Smrg [LT_LANG(GO)], 89963847c39Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 90063847c39Smrg 90163847c39SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 90263847c39Smrg [LT_LANG(RC)], 90363847c39Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 90463847c39Smrg])# _LT_LANG_DEFAULT_CONFIG 90563847c39Smrg 90663847c39Smrg# Obsolete macros: 90763847c39SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 90863847c39SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 90963847c39SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 91063847c39SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 91163847c39SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 91263847c39Smrgdnl aclocal-1.4 backwards compatibility: 91363847c39Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 91463847c39Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 91563847c39Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 91663847c39Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 91763847c39Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 91863847c39Smrg 91963847c39Smrg 92063847c39Smrg# _LT_TAG_COMPILER 92163847c39Smrg# ---------------- 92263847c39Smrgm4_defun([_LT_TAG_COMPILER], 92363847c39Smrg[AC_REQUIRE([AC_PROG_CC])dnl 92476888252Smrg 92563847c39Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 92663847c39Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 92763847c39Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 92863847c39Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 92976888252Smrg 93063847c39Smrg# If no C compiler was specified, use CC. 93163847c39SmrgLTCC=${LTCC-"$CC"} 93276888252Smrg 93363847c39Smrg# If no C compiler flags were specified, use CFLAGS. 93463847c39SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 935d8556812Smrg 93663847c39Smrg# Allow CC to be a program name with arguments. 93763847c39Smrgcompiler=$CC 93863847c39Smrg])# _LT_TAG_COMPILER 93976888252Smrg 94076888252Smrg 94163847c39Smrg# _LT_COMPILER_BOILERPLATE 94263847c39Smrg# ------------------------ 94363847c39Smrg# Check for compiler boilerplate output or warnings with 94463847c39Smrg# the simple compiler test code. 94563847c39Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 94663847c39Smrg[m4_require([_LT_DECL_SED])dnl 94763847c39Smrgac_outfile=conftest.$ac_objext 94863847c39Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 94963847c39Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 95063847c39Smrg_lt_compiler_boilerplate=`cat conftest.err` 95163847c39Smrg$RM conftest* 95263847c39Smrg])# _LT_COMPILER_BOILERPLATE 95376888252Smrg 95476888252Smrg 95563847c39Smrg# _LT_LINKER_BOILERPLATE 956d8556812Smrg# ---------------------- 95763847c39Smrg# Check for linker boilerplate output or warnings with 95863847c39Smrg# the simple link test code. 95963847c39Smrgm4_defun([_LT_LINKER_BOILERPLATE], 96063847c39Smrg[m4_require([_LT_DECL_SED])dnl 96163847c39Smrgac_outfile=conftest.$ac_objext 96263847c39Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 96363847c39Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 96463847c39Smrg_lt_linker_boilerplate=`cat conftest.err` 96563847c39Smrg$RM -r conftest* 96663847c39Smrg])# _LT_LINKER_BOILERPLATE 96776888252Smrg 96863847c39Smrg# _LT_REQUIRED_DARWIN_CHECKS 96963847c39Smrg# ------------------------- 97063847c39Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 97186dafe34Smrg case $host_os in 97263847c39Smrg rhapsody* | darwin*) 97363847c39Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 97463847c39Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 97563847c39Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 97663847c39Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 97763847c39Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 97863847c39Smrg _LT_DECL([], [DSYMUTIL], [1], 97963847c39Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 98063847c39Smrg _LT_DECL([], [NMEDIT], [1], 98163847c39Smrg [Tool to change global to local symbols on Mac OS X]) 98263847c39Smrg _LT_DECL([], [LIPO], [1], 98363847c39Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 98463847c39Smrg _LT_DECL([], [OTOOL], [1], 98563847c39Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 98663847c39Smrg _LT_DECL([], [OTOOL64], [1], 98763847c39Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 98876888252Smrg 98963847c39Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 99063847c39Smrg [lt_cv_apple_cc_single_mod=no 99163847c39Smrg if test -z "${LT_MULTI_MODULE}"; then 99263847c39Smrg # By default we will add the -single_module flag. You can override 99363847c39Smrg # by either setting the environment variable LT_MULTI_MODULE 99463847c39Smrg # non-empty at configure time, or by adding -multi_module to the 99563847c39Smrg # link flags. 99663847c39Smrg rm -rf libconftest.dylib* 99763847c39Smrg echo "int foo(void){return 1;}" > conftest.c 99863847c39Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 99963847c39Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 100063847c39Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 100163847c39Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 100263847c39Smrg _lt_result=$? 100363847c39Smrg # If there is a non-empty error log, and "single_module" 100463847c39Smrg # appears in it, assume the flag caused a linker warning 100563847c39Smrg if test -s conftest.err && $GREP single_module conftest.err; then 100663847c39Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 100763847c39Smrg # Otherwise, if the output was created with a 0 exit code from 100863847c39Smrg # the compiler, it worked. 100963847c39Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 101063847c39Smrg lt_cv_apple_cc_single_mod=yes 101163847c39Smrg else 101263847c39Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 101363847c39Smrg fi 101463847c39Smrg rm -rf libconftest.dylib* 101563847c39Smrg rm -f conftest.* 101663847c39Smrg fi]) 101776888252Smrg 101863847c39Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 101963847c39Smrg [lt_cv_ld_exported_symbols_list], 102063847c39Smrg [lt_cv_ld_exported_symbols_list=no 102163847c39Smrg save_LDFLAGS=$LDFLAGS 102263847c39Smrg echo "_main" > conftest.sym 102363847c39Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 102463847c39Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 102563847c39Smrg [lt_cv_ld_exported_symbols_list=yes], 102663847c39Smrg [lt_cv_ld_exported_symbols_list=no]) 102763847c39Smrg LDFLAGS="$save_LDFLAGS" 102886dafe34Smrg ]) 102976888252Smrg 103063847c39Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 103163847c39Smrg [lt_cv_ld_force_load=no 103263847c39Smrg cat > conftest.c << _LT_EOF 103363847c39Smrgint forced_loaded() { return 2;} 103463847c39Smrg_LT_EOF 103563847c39Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 103663847c39Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 103763847c39Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 103863847c39Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 103963847c39Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 104063847c39Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 104163847c39Smrg cat > conftest.c << _LT_EOF 104263847c39Smrgint main() { return 0;} 104363847c39Smrg_LT_EOF 104463847c39Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 104563847c39Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 104663847c39Smrg _lt_result=$? 104763847c39Smrg if test -s conftest.err && $GREP force_load conftest.err; then 104863847c39Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 104963847c39Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 105063847c39Smrg lt_cv_ld_force_load=yes 105163847c39Smrg else 105263847c39Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 105363847c39Smrg fi 105463847c39Smrg rm -f conftest.err libconftest.a conftest conftest.c 105563847c39Smrg rm -rf conftest.dSYM 105663847c39Smrg ]) 105763847c39Smrg case $host_os in 105863847c39Smrg rhapsody* | darwin1.[[012]]) 105963847c39Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 106063847c39Smrg darwin1.*) 106163847c39Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 106263847c39Smrg darwin*) # darwin 5.x on 106363847c39Smrg # if running on 10.5 or later, the deployment target defaults 106463847c39Smrg # to the OS version, if on x86, and 10.4, the deployment 106563847c39Smrg # target defaults to 10.4. Don't you love it? 106663847c39Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 106763847c39Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 106863847c39Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 106963847c39Smrg 10.[[012]]*) 107063847c39Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 107163847c39Smrg 10.*) 107263847c39Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 107363847c39Smrg esac 107463847c39Smrg ;; 107563847c39Smrg esac 107663847c39Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 107763847c39Smrg _lt_dar_single_mod='$single_module' 107863847c39Smrg fi 107963847c39Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 108063847c39Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 108163847c39Smrg else 108263847c39Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 108363847c39Smrg fi 108463847c39Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 108563847c39Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 108663847c39Smrg else 108763847c39Smrg _lt_dsymutil= 108863847c39Smrg fi 108986dafe34Smrg ;; 109086dafe34Smrg esac 109163847c39Smrg]) 109276888252Smrg 109363847c39Smrg 109463847c39Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 109563847c39Smrg# --------------------------------- 109663847c39Smrg# Checks for linker and compiler features on darwin 109763847c39Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 109863847c39Smrg[ 109963847c39Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 110063847c39Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 110163847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=no 110263847c39Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 110363847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 110463847c39Smrg if test "$lt_cv_ld_force_load" = "yes"; then 110563847c39Smrg _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\"`' 110663847c39Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 110763847c39Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 110886dafe34Smrg else 110963847c39Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 111086dafe34Smrg fi 111163847c39Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 111263847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 111363847c39Smrg case $cc_basename in 111463847c39Smrg ifort*) _lt_dar_can_shared=yes ;; 111563847c39Smrg *) _lt_dar_can_shared=$GCC ;; 111663847c39Smrg esac 111763847c39Smrg if test "$_lt_dar_can_shared" = "yes"; then 111863847c39Smrg output_verbose_link_cmd=func_echo_all 111963847c39Smrg _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}" 112063847c39Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 112163847c39Smrg _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}" 112263847c39Smrg _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}" 112363847c39Smrg m4_if([$1], [CXX], 112463847c39Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 112563847c39Smrg _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}" 112663847c39Smrg _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}" 112763847c39Smrg fi 112863847c39Smrg],[]) 112963847c39Smrg else 113063847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 113163847c39Smrg fi 113263847c39Smrg]) 113376888252Smrg 113463847c39Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 113563847c39Smrg# ---------------------------------- 113663847c39Smrg# Links a minimal program and checks the executable 113763847c39Smrg# for the system default hardcoded library path. In most cases, 113863847c39Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 113963847c39Smrg# the location of the communication and MPI libs are included too. 114063847c39Smrg# If we don't find anything, use the default library path according 114163847c39Smrg# to the aix ld manual. 114263847c39Smrg# Store the results from the different compilers for each TAGNAME. 114363847c39Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 114463847c39Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 114563847c39Smrg[m4_require([_LT_DECL_SED])dnl 114663847c39Smrgif test "${lt_cv_aix_libpath+set}" = set; then 114763847c39Smrg aix_libpath=$lt_cv_aix_libpath 114863847c39Smrgelse 114963847c39Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 115063847c39Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 115163847c39Smrg lt_aix_libpath_sed='[ 115263847c39Smrg /Import File Strings/,/^$/ { 115363847c39Smrg /^0/ { 115463847c39Smrg s/^0 *\([^ ]*\) *$/\1/ 115563847c39Smrg p 115663847c39Smrg } 115763847c39Smrg }]' 115863847c39Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 115963847c39Smrg # Check for a 64-bit object if we didn't find anything. 116063847c39Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 116163847c39Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 116263847c39Smrg fi],[]) 116363847c39Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 116463847c39Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 116563847c39Smrg fi 116663847c39Smrg ]) 116763847c39Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 116863847c39Smrgfi 116963847c39Smrg])# _LT_SYS_MODULE_PATH_AIX 117076888252Smrg 117176888252Smrg 117263847c39Smrg# _LT_SHELL_INIT(ARG) 117363847c39Smrg# ------------------- 117463847c39Smrgm4_define([_LT_SHELL_INIT], 117563847c39Smrg[m4_divert_text([M4SH-INIT], [$1 117663847c39Smrg])])# _LT_SHELL_INIT 117776888252Smrg 117863847c39Smrg 117963847c39Smrg 118063847c39Smrg# _LT_PROG_ECHO_BACKSLASH 118163847c39Smrg# ----------------------- 118263847c39Smrg# Find how we can fake an echo command that does not interpret backslash. 118363847c39Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 118463847c39Smrg# of the generated configure script which will find a shell with a builtin 118563847c39Smrg# printf (which we can use as an echo command). 118663847c39Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 118763847c39Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 118863847c39SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 118963847c39SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 119063847c39Smrg 119163847c39SmrgAC_MSG_CHECKING([how to print strings]) 119263847c39Smrg# Test print first, because it will be a builtin if present. 119363847c39Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 119463847c39Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 119563847c39Smrg ECHO='print -r --' 119663847c39Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 119763847c39Smrg ECHO='printf %s\n' 119863847c39Smrgelse 119963847c39Smrg # Use this function as a fallback that always works. 120063847c39Smrg func_fallback_echo () 120163847c39Smrg { 120263847c39Smrg eval 'cat <<_LTECHO_EOF 120363847c39Smrg$[]1 120463847c39Smrg_LTECHO_EOF' 120563847c39Smrg } 120663847c39Smrg ECHO='func_fallback_echo' 120763847c39Smrgfi 120863847c39Smrg 120963847c39Smrg# func_echo_all arg... 121063847c39Smrg# Invoke $ECHO with all args, space-separated. 121163847c39Smrgfunc_echo_all () 121263847c39Smrg{ 121363847c39Smrg $ECHO "$*" 121463847c39Smrg} 121563847c39Smrg 121663847c39Smrgcase "$ECHO" in 121763847c39Smrg printf*) AC_MSG_RESULT([printf]) ;; 121863847c39Smrg print*) AC_MSG_RESULT([print -r]) ;; 121963847c39Smrg *) AC_MSG_RESULT([cat]) ;; 122063847c39Smrgesac 122163847c39Smrg 122263847c39Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 122363847c39Smrg[_AS_DETECT_SUGGESTED([ 122463847c39Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 122563847c39Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 122663847c39Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 122763847c39Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 122863847c39Smrg PATH=/empty FPATH=/empty; export PATH FPATH 122963847c39Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 123063847c39Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 123163847c39Smrg 123263847c39Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 123363847c39Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 123463847c39Smrg])# _LT_PROG_ECHO_BACKSLASH 123563847c39Smrg 123663847c39Smrg 123763847c39Smrg# _LT_WITH_SYSROOT 123863847c39Smrg# ---------------- 123963847c39SmrgAC_DEFUN([_LT_WITH_SYSROOT], 124063847c39Smrg[AC_MSG_CHECKING([for sysroot]) 124163847c39SmrgAC_ARG_WITH([sysroot], 124263847c39Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 124363847c39Smrg (or the compiler's sysroot if not specified).], 124463847c39Smrg[], [with_sysroot=no]) 124563847c39Smrg 124663847c39Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 124763847c39Smrgdnl in case the user passed a directory name. 124863847c39Smrglt_sysroot= 124963847c39Smrgcase ${with_sysroot} in #( 125063847c39Smrg yes) 125163847c39Smrg if test "$GCC" = yes; then 125263847c39Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 125363847c39Smrg fi 125463847c39Smrg ;; #( 125563847c39Smrg /*) 125663847c39Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 125763847c39Smrg ;; #( 125863847c39Smrg no|'') 125963847c39Smrg ;; #( 126063847c39Smrg *) 126163847c39Smrg AC_MSG_RESULT([${with_sysroot}]) 126263847c39Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 126363847c39Smrg ;; 126463847c39Smrgesac 126563847c39Smrg 126663847c39Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 126763847c39Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 126863847c39Smrg[dependent libraries, and in which our libraries should be installed.])]) 126963847c39Smrg 127063847c39Smrg# _LT_ENABLE_LOCK 127163847c39Smrg# --------------- 127263847c39Smrgm4_defun([_LT_ENABLE_LOCK], 127363847c39Smrg[AC_ARG_ENABLE([libtool-lock], 127463847c39Smrg [AS_HELP_STRING([--disable-libtool-lock], 127563847c39Smrg [avoid locking (might break parallel builds)])]) 127663847c39Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 127763847c39Smrg 127863847c39Smrg# Some flags need to be propagated to the compiler or linker for good 127963847c39Smrg# libtool support. 128063847c39Smrgcase $host in 128163847c39Smrgia64-*-hpux*) 128263847c39Smrg # Find out which ABI we are using. 128363847c39Smrg echo 'int i;' > conftest.$ac_ext 128463847c39Smrg if AC_TRY_EVAL(ac_compile); then 128563847c39Smrg case `/usr/bin/file conftest.$ac_objext` in 128663847c39Smrg *ELF-32*) 128763847c39Smrg HPUX_IA64_MODE="32" 128863847c39Smrg ;; 128963847c39Smrg *ELF-64*) 129063847c39Smrg HPUX_IA64_MODE="64" 129163847c39Smrg ;; 129263847c39Smrg esac 129363847c39Smrg fi 129463847c39Smrg rm -rf conftest* 129563847c39Smrg ;; 129663847c39Smrg*-*-irix6*) 129763847c39Smrg # Find out which ABI we are using. 129863847c39Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 129963847c39Smrg if AC_TRY_EVAL(ac_compile); then 130063847c39Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 130163847c39Smrg case `/usr/bin/file conftest.$ac_objext` in 130263847c39Smrg *32-bit*) 130363847c39Smrg LD="${LD-ld} -melf32bsmip" 130463847c39Smrg ;; 130563847c39Smrg *N32*) 130663847c39Smrg LD="${LD-ld} -melf32bmipn32" 130763847c39Smrg ;; 130863847c39Smrg *64-bit*) 130963847c39Smrg LD="${LD-ld} -melf64bmip" 131063847c39Smrg ;; 131163847c39Smrg esac 131263847c39Smrg else 131363847c39Smrg case `/usr/bin/file conftest.$ac_objext` in 131463847c39Smrg *32-bit*) 131563847c39Smrg LD="${LD-ld} -32" 131663847c39Smrg ;; 131763847c39Smrg *N32*) 131863847c39Smrg LD="${LD-ld} -n32" 131963847c39Smrg ;; 132063847c39Smrg *64-bit*) 132163847c39Smrg LD="${LD-ld} -64" 132263847c39Smrg ;; 132363847c39Smrg esac 132486dafe34Smrg fi 132563847c39Smrg fi 132663847c39Smrg rm -rf conftest* 132763847c39Smrg ;; 132876888252Smrg 132963847c39Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 133063847c39Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 133163847c39Smrg # Find out which ABI we are using. 133263847c39Smrg echo 'int i;' > conftest.$ac_ext 133363847c39Smrg if AC_TRY_EVAL(ac_compile); then 133463847c39Smrg case `/usr/bin/file conftest.o` in 133563847c39Smrg *32-bit*) 133663847c39Smrg case $host in 133763847c39Smrg x86_64-*kfreebsd*-gnu) 133863847c39Smrg LD="${LD-ld} -m elf_i386_fbsd" 133963847c39Smrg ;; 134063847c39Smrg x86_64-*linux*) 134163847c39Smrg LD="${LD-ld} -m elf_i386" 134263847c39Smrg ;; 134363847c39Smrg ppc64-*linux*|powerpc64-*linux*) 134463847c39Smrg LD="${LD-ld} -m elf32ppclinux" 134563847c39Smrg ;; 134663847c39Smrg s390x-*linux*) 134763847c39Smrg LD="${LD-ld} -m elf_s390" 134863847c39Smrg ;; 134963847c39Smrg sparc64-*linux*) 135063847c39Smrg LD="${LD-ld} -m elf32_sparc" 135163847c39Smrg ;; 135263847c39Smrg esac 135363847c39Smrg ;; 135463847c39Smrg *64-bit*) 135563847c39Smrg case $host in 135663847c39Smrg x86_64-*kfreebsd*-gnu) 135763847c39Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 135863847c39Smrg ;; 135963847c39Smrg x86_64-*linux*) 136063847c39Smrg LD="${LD-ld} -m elf_x86_64" 136163847c39Smrg ;; 136263847c39Smrg ppc*-*linux*|powerpc*-*linux*) 136363847c39Smrg LD="${LD-ld} -m elf64ppc" 136463847c39Smrg ;; 136563847c39Smrg s390*-*linux*|s390*-*tpf*) 136663847c39Smrg LD="${LD-ld} -m elf64_s390" 136763847c39Smrg ;; 136863847c39Smrg sparc*-*linux*) 136963847c39Smrg LD="${LD-ld} -m elf64_sparc" 137063847c39Smrg ;; 137163847c39Smrg esac 137263847c39Smrg ;; 137363847c39Smrg esac 137463847c39Smrg fi 137563847c39Smrg rm -rf conftest* 137663847c39Smrg ;; 137776888252Smrg 137863847c39Smrg*-*-sco3.2v5*) 137963847c39Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 138063847c39Smrg SAVE_CFLAGS="$CFLAGS" 138163847c39Smrg CFLAGS="$CFLAGS -belf" 138263847c39Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 138363847c39Smrg [AC_LANG_PUSH(C) 138463847c39Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 138563847c39Smrg AC_LANG_POP]) 138663847c39Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 138763847c39Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 138863847c39Smrg CFLAGS="$SAVE_CFLAGS" 138963847c39Smrg fi 139063847c39Smrg ;; 139163847c39Smrg*-*solaris*) 139263847c39Smrg # Find out which ABI we are using. 139363847c39Smrg echo 'int i;' > conftest.$ac_ext 139463847c39Smrg if AC_TRY_EVAL(ac_compile); then 139563847c39Smrg case `/usr/bin/file conftest.o` in 139663847c39Smrg *64-bit*) 139763847c39Smrg case $lt_cv_prog_gnu_ld in 139863847c39Smrg yes*) 139963847c39Smrg case $host in 140063847c39Smrg i?86-*-solaris*) 140163847c39Smrg LD="${LD-ld} -m elf_x86_64" 140263847c39Smrg ;; 140363847c39Smrg sparc*-*-solaris*) 140463847c39Smrg LD="${LD-ld} -m elf64_sparc" 140563847c39Smrg ;; 140663847c39Smrg esac 140763847c39Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 140863847c39Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 140963847c39Smrg LD="${LD-ld}_sol2" 141063847c39Smrg fi 141163847c39Smrg ;; 141263847c39Smrg *) 141363847c39Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 141463847c39Smrg LD="${LD-ld} -64" 141563847c39Smrg fi 141663847c39Smrg ;; 141763847c39Smrg esac 141863847c39Smrg ;; 141963847c39Smrg esac 142063847c39Smrg fi 142163847c39Smrg rm -rf conftest* 142263847c39Smrg ;; 142363847c39Smrgesac 142476888252Smrg 142563847c39Smrgneed_locks="$enable_libtool_lock" 142663847c39Smrg])# _LT_ENABLE_LOCK 142763847c39Smrg 142863847c39Smrg 142963847c39Smrg# _LT_PROG_AR 143063847c39Smrg# ----------- 143163847c39Smrgm4_defun([_LT_PROG_AR], 143263847c39Smrg[AC_CHECK_TOOLS(AR, [ar], false) 143363847c39Smrg: ${AR=ar} 143463847c39Smrg: ${AR_FLAGS=cru} 143563847c39Smrg_LT_DECL([], [AR], [1], [The archiver]) 143663847c39Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 143763847c39Smrg 143863847c39SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 143963847c39Smrg [lt_cv_ar_at_file=no 144063847c39Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 144163847c39Smrg [echo conftest.$ac_objext > conftest.lst 144263847c39Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 144363847c39Smrg AC_TRY_EVAL([lt_ar_try]) 144463847c39Smrg if test "$ac_status" -eq 0; then 144563847c39Smrg # Ensure the archiver fails upon bogus file names. 144663847c39Smrg rm -f conftest.$ac_objext libconftest.a 144763847c39Smrg AC_TRY_EVAL([lt_ar_try]) 144863847c39Smrg if test "$ac_status" -ne 0; then 144963847c39Smrg lt_cv_ar_at_file=@ 145063847c39Smrg fi 145163847c39Smrg fi 145263847c39Smrg rm -f conftest.* libconftest.a 145363847c39Smrg ]) 145463847c39Smrg ]) 145563847c39Smrg 145663847c39Smrgif test "x$lt_cv_ar_at_file" = xno; then 145763847c39Smrg archiver_list_spec= 145863847c39Smrgelse 145963847c39Smrg archiver_list_spec=$lt_cv_ar_at_file 146063847c39Smrgfi 146163847c39Smrg_LT_DECL([], [archiver_list_spec], [1], 146263847c39Smrg [How to feed a file listing to the archiver]) 146363847c39Smrg])# _LT_PROG_AR 146463847c39Smrg 146563847c39Smrg 146663847c39Smrg# _LT_CMD_OLD_ARCHIVE 146763847c39Smrg# ------------------- 146863847c39Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 146963847c39Smrg[_LT_PROG_AR 147063847c39Smrg 147163847c39SmrgAC_CHECK_TOOL(STRIP, strip, :) 147263847c39Smrgtest -z "$STRIP" && STRIP=: 147363847c39Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 147463847c39Smrg 147563847c39SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 147663847c39Smrgtest -z "$RANLIB" && RANLIB=: 147763847c39Smrg_LT_DECL([], [RANLIB], [1], 147863847c39Smrg [Commands used to install an old-style archive]) 147963847c39Smrg 148063847c39Smrg# Determine commands to create old-style static archives. 148163847c39Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 148263847c39Smrgold_postinstall_cmds='chmod 644 $oldlib' 148363847c39Smrgold_postuninstall_cmds= 148463847c39Smrg 148563847c39Smrgif test -n "$RANLIB"; then 148663847c39Smrg case $host_os in 148763847c39Smrg openbsd*) 148863847c39Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 148963847c39Smrg ;; 149063847c39Smrg *) 149163847c39Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 149263847c39Smrg ;; 149386dafe34Smrg esac 149463847c39Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 149586dafe34Smrgfi 149663847c39Smrg 149763847c39Smrgcase $host_os in 149863847c39Smrg darwin*) 149963847c39Smrg lock_old_archive_extraction=yes ;; 150063847c39Smrg *) 150163847c39Smrg lock_old_archive_extraction=no ;; 150263847c39Smrgesac 150363847c39Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 150463847c39Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 150563847c39Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 150663847c39Smrg [Commands used to build an old-style archive]) 150763847c39Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 150863847c39Smrg [Whether to use a lock for old archive extraction]) 150963847c39Smrg])# _LT_CMD_OLD_ARCHIVE 151076888252Smrg 15111ae1b5e8Smrg 151263847c39Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 151363847c39Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 151463847c39Smrg# ---------------------------------------------------------------- 151563847c39Smrg# Check whether the given compiler option works 151663847c39SmrgAC_DEFUN([_LT_COMPILER_OPTION], 151763847c39Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 151863847c39Smrgm4_require([_LT_DECL_SED])dnl 151963847c39SmrgAC_CACHE_CHECK([$1], [$2], 152063847c39Smrg [$2=no 152163847c39Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 152286dafe34Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 152363847c39Smrg lt_compiler_flag="$3" 152486dafe34Smrg # Insert the option either (1) after the last *FLAGS variable, or 152586dafe34Smrg # (2) before a word containing "conftest.", or (3) at the end. 152686dafe34Smrg # Note that $ac_compile itself does not contain backslashes and begins 152786dafe34Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 152863847c39Smrg # The option is referenced via a variable to avoid confusing sed. 152986dafe34Smrg lt_compile=`echo "$ac_compile" | $SED \ 153086dafe34Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 153186dafe34Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 153286dafe34Smrg -e 's:$: $lt_compiler_flag:'` 153363847c39Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 153463847c39Smrg (eval "$lt_compile" 2>conftest.err) 153586dafe34Smrg ac_status=$? 153663847c39Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 153763847c39Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 153863847c39Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 153986dafe34Smrg # The compiler can only warn and ignore the option if not recognized 154063847c39Smrg # So say no if there are warnings other than the usual output. 154163847c39Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 154263847c39Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 154363847c39Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 154463847c39Smrg $2=yes 154586dafe34Smrg fi 154686dafe34Smrg fi 154763847c39Smrg $RM conftest* 154886dafe34Smrg]) 154976888252Smrg 155063847c39Smrgif test x"[$]$2" = xyes; then 155163847c39Smrg m4_if([$5], , :, [$5]) 155286dafe34Smrgelse 155363847c39Smrg m4_if([$6], , :, [$6]) 15541ae1b5e8Smrgfi 155563847c39Smrg])# _LT_COMPILER_OPTION 155676888252Smrg 155763847c39Smrg# Old name: 155863847c39SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 155963847c39Smrgdnl aclocal-1.4 backwards compatibility: 156063847c39Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 156176888252Smrg 156276888252Smrg 156363847c39Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 156463847c39Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 156563847c39Smrg# ---------------------------------------------------- 156663847c39Smrg# Check whether the given linker option works 156763847c39SmrgAC_DEFUN([_LT_LINKER_OPTION], 156863847c39Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 156963847c39Smrgm4_require([_LT_DECL_SED])dnl 157063847c39SmrgAC_CACHE_CHECK([$1], [$2], 157163847c39Smrg [$2=no 157263847c39Smrg save_LDFLAGS="$LDFLAGS" 157363847c39Smrg LDFLAGS="$LDFLAGS $3" 157463847c39Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 157563847c39Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 157663847c39Smrg # The linker can only warn and ignore the option if not recognized 157763847c39Smrg # So say no if there are warnings 157863847c39Smrg if test -s conftest.err; then 157963847c39Smrg # Append any errors to the config.log. 158063847c39Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 158163847c39Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 158263847c39Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 158363847c39Smrg if diff conftest.exp conftest.er2 >/dev/null; then 158463847c39Smrg $2=yes 158563847c39Smrg fi 158663847c39Smrg else 158763847c39Smrg $2=yes 158863847c39Smrg fi 158963847c39Smrg fi 159063847c39Smrg $RM -r conftest* 159163847c39Smrg LDFLAGS="$save_LDFLAGS" 159263847c39Smrg]) 159376888252Smrg 159463847c39Smrgif test x"[$]$2" = xyes; then 159563847c39Smrg m4_if([$4], , :, [$4]) 159686dafe34Smrgelse 159763847c39Smrg m4_if([$5], , :, [$5]) 15981ae1b5e8Smrgfi 159963847c39Smrg])# _LT_LINKER_OPTION 160076888252Smrg 160163847c39Smrg# Old name: 160263847c39SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 160363847c39Smrgdnl aclocal-1.4 backwards compatibility: 160463847c39Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 160576888252Smrg 160676888252Smrg 160763847c39Smrg# LT_CMD_MAX_LEN 160863847c39Smrg#--------------- 160963847c39SmrgAC_DEFUN([LT_CMD_MAX_LEN], 161063847c39Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 161163847c39Smrg# find the maximum length of command line arguments 161263847c39SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 161363847c39SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 161463847c39Smrg i=0 161563847c39Smrg teststring="ABCD" 161676888252Smrg 161763847c39Smrg case $build_os in 161863847c39Smrg msdosdjgpp*) 161963847c39Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 162063847c39Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 162163847c39Smrg # during glob expansion). Even if it were fixed, the result of this 162263847c39Smrg # check would be larger than it should be. 162363847c39Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 162463847c39Smrg ;; 162576888252Smrg 162663847c39Smrg gnu*) 162763847c39Smrg # Under GNU Hurd, this test is not required because there is 162863847c39Smrg # no limit to the length of command line arguments. 162963847c39Smrg # Libtool will interpret -1 as no limit whatsoever 163063847c39Smrg lt_cv_sys_max_cmd_len=-1; 163163847c39Smrg ;; 163276888252Smrg 163363847c39Smrg cygwin* | mingw* | cegcc*) 163463847c39Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 163563847c39Smrg # about 5 minutes as the teststring grows exponentially. 163663847c39Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 163763847c39Smrg # you end up with a "frozen" computer, even though with patience 163863847c39Smrg # the test eventually succeeds (with a max line length of 256k). 163963847c39Smrg # Instead, let's just punt: use the minimum linelength reported by 164063847c39Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 164163847c39Smrg lt_cv_sys_max_cmd_len=8192; 164263847c39Smrg ;; 164376888252Smrg 164463847c39Smrg mint*) 164563847c39Smrg # On MiNT this can take a long time and run out of memory. 164663847c39Smrg lt_cv_sys_max_cmd_len=8192; 164763847c39Smrg ;; 164876888252Smrg 164963847c39Smrg amigaos*) 165063847c39Smrg # On AmigaOS with pdksh, this test takes hours, literally. 165163847c39Smrg # So we just punt and use a minimum line length of 8192. 165263847c39Smrg lt_cv_sys_max_cmd_len=8192; 165363847c39Smrg ;; 165476888252Smrg 165563847c39Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 165663847c39Smrg # This has been around since 386BSD, at least. Likely further. 165763847c39Smrg if test -x /sbin/sysctl; then 165863847c39Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 165963847c39Smrg elif test -x /usr/sbin/sysctl; then 166063847c39Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 166186dafe34Smrg else 166263847c39Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 16631ae1b5e8Smrg fi 166463847c39Smrg # And add a safety zone 166563847c39Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 166663847c39Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 166763847c39Smrg ;; 16681ae1b5e8Smrg 166963847c39Smrg interix*) 167063847c39Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 167163847c39Smrg lt_cv_sys_max_cmd_len=196608 167263847c39Smrg ;; 16731ae1b5e8Smrg 167463847c39Smrg os2*) 167563847c39Smrg # The test takes a long time on OS/2. 167663847c39Smrg lt_cv_sys_max_cmd_len=8192 167763847c39Smrg ;; 16781ae1b5e8Smrg 167963847c39Smrg osf*) 168063847c39Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 168163847c39Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 168263847c39Smrg # nice to cause kernel panics so lets avoid the loop below. 168363847c39Smrg # First set a reasonable default. 168463847c39Smrg lt_cv_sys_max_cmd_len=16384 168563847c39Smrg # 168663847c39Smrg if test -x /sbin/sysconfig; then 168763847c39Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 168863847c39Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 168963847c39Smrg esac 169063847c39Smrg fi 169163847c39Smrg ;; 169263847c39Smrg sco3.2v5*) 169363847c39Smrg lt_cv_sys_max_cmd_len=102400 169463847c39Smrg ;; 169563847c39Smrg sysv5* | sco5v6* | sysv4.2uw2*) 169663847c39Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 169763847c39Smrg if test -n "$kargmax"; then 169863847c39Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 169963847c39Smrg else 170063847c39Smrg lt_cv_sys_max_cmd_len=32768 170163847c39Smrg fi 170276888252Smrg ;; 170376888252Smrg *) 170463847c39Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 170563847c39Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 170663847c39Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 170763847c39Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 170863847c39Smrg else 170963847c39Smrg # Make teststring a little bigger before we do anything with it. 171063847c39Smrg # a 1K string should be a reasonable start. 171163847c39Smrg for i in 1 2 3 4 5 6 7 8 ; do 171263847c39Smrg teststring=$teststring$teststring 171363847c39Smrg done 171463847c39Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 171563847c39Smrg # If test is not a shell built-in, we'll probably end up computing a 171663847c39Smrg # maximum length that is only half of the actual maximum length, but 171763847c39Smrg # we can't tell. 171863847c39Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 171963847c39Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 172063847c39Smrg test $i != 17 # 1/2 MB should be enough 172163847c39Smrg do 172263847c39Smrg i=`expr $i + 1` 172363847c39Smrg teststring=$teststring$teststring 172463847c39Smrg done 172563847c39Smrg # Only check the string length outside the loop. 172663847c39Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 172763847c39Smrg teststring= 172863847c39Smrg # Add a significant safety factor because C++ compilers can tack on 172963847c39Smrg # massive amounts of additional arguments before passing them to the 173063847c39Smrg # linker. It appears as though 1/2 is a usable value. 173163847c39Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 173263847c39Smrg fi 173376888252Smrg ;; 173476888252Smrg esac 173563847c39Smrg]) 173663847c39Smrgif test -n $lt_cv_sys_max_cmd_len ; then 173763847c39Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 173863847c39Smrgelse 173963847c39Smrg AC_MSG_RESULT(none) 174063847c39Smrgfi 174163847c39Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 174263847c39Smrg_LT_DECL([], [max_cmd_len], [0], 174363847c39Smrg [What is the maximum length of a command?]) 174463847c39Smrg])# LT_CMD_MAX_LEN 174576888252Smrg 174663847c39Smrg# Old name: 174763847c39SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 174863847c39Smrgdnl aclocal-1.4 backwards compatibility: 174963847c39Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 175076888252Smrg 175176888252Smrg 175263847c39Smrg# _LT_HEADER_DLFCN 175363847c39Smrg# ---------------- 175463847c39Smrgm4_defun([_LT_HEADER_DLFCN], 175563847c39Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 175663847c39Smrg])# _LT_HEADER_DLFCN 175776888252Smrg 175863847c39Smrg 175963847c39Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 176063847c39Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 176163847c39Smrg# ---------------------------------------------------------------- 176263847c39Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 176363847c39Smrg[m4_require([_LT_HEADER_DLFCN])dnl 176463847c39Smrgif test "$cross_compiling" = yes; then : 176563847c39Smrg [$4] 176663847c39Smrgelse 176763847c39Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 176863847c39Smrg lt_status=$lt_dlunknown 176963847c39Smrg cat > conftest.$ac_ext <<_LT_EOF 177063847c39Smrg[#line $LINENO "configure" 177163847c39Smrg#include "confdefs.h" 177263847c39Smrg 177363847c39Smrg#if HAVE_DLFCN_H 177463847c39Smrg#include <dlfcn.h> 177563847c39Smrg#endif 177663847c39Smrg 177763847c39Smrg#include <stdio.h> 177863847c39Smrg 177963847c39Smrg#ifdef RTLD_GLOBAL 178063847c39Smrg# define LT_DLGLOBAL RTLD_GLOBAL 178163847c39Smrg#else 178263847c39Smrg# ifdef DL_GLOBAL 178363847c39Smrg# define LT_DLGLOBAL DL_GLOBAL 178463847c39Smrg# else 178563847c39Smrg# define LT_DLGLOBAL 0 178663847c39Smrg# endif 178763847c39Smrg#endif 178863847c39Smrg 178963847c39Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 179063847c39Smrg find out it does not work in some platform. */ 179163847c39Smrg#ifndef LT_DLLAZY_OR_NOW 179263847c39Smrg# ifdef RTLD_LAZY 179363847c39Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 179463847c39Smrg# else 179563847c39Smrg# ifdef DL_LAZY 179663847c39Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 179763847c39Smrg# else 179863847c39Smrg# ifdef RTLD_NOW 179963847c39Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 180063847c39Smrg# else 180163847c39Smrg# ifdef DL_NOW 180263847c39Smrg# define LT_DLLAZY_OR_NOW DL_NOW 180363847c39Smrg# else 180463847c39Smrg# define LT_DLLAZY_OR_NOW 0 180563847c39Smrg# endif 180663847c39Smrg# endif 180763847c39Smrg# endif 180863847c39Smrg# endif 180963847c39Smrg#endif 181063847c39Smrg 181163847c39Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 181263847c39Smrg correspondingly for the symbols needed. */ 181363847c39Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 181463847c39Smrgint fnord () __attribute__((visibility("default"))); 181563847c39Smrg#endif 181663847c39Smrg 181763847c39Smrgint fnord () { return 42; } 181863847c39Smrgint main () 181963847c39Smrg{ 182063847c39Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 182163847c39Smrg int status = $lt_dlunknown; 182263847c39Smrg 182363847c39Smrg if (self) 182463847c39Smrg { 182563847c39Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 182663847c39Smrg else 182763847c39Smrg { 182863847c39Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 182963847c39Smrg else puts (dlerror ()); 183063847c39Smrg } 183163847c39Smrg /* dlclose (self); */ 183263847c39Smrg } 183386dafe34Smrg else 183463847c39Smrg puts (dlerror ()); 183563847c39Smrg 183663847c39Smrg return status; 183763847c39Smrg}] 183863847c39Smrg_LT_EOF 183963847c39Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 184063847c39Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 184163847c39Smrg lt_status=$? 184263847c39Smrg case x$lt_status in 184363847c39Smrg x$lt_dlno_uscore) $1 ;; 184463847c39Smrg x$lt_dlneed_uscore) $2 ;; 184563847c39Smrg x$lt_dlunknown|x*) $3 ;; 184686dafe34Smrg esac 184763847c39Smrg else : 184863847c39Smrg # compilation failed 184963847c39Smrg $3 185086dafe34Smrg fi 185163847c39Smrgfi 185263847c39Smrgrm -fr conftest* 185363847c39Smrg])# _LT_TRY_DLOPEN_SELF 185463847c39Smrg 185563847c39Smrg 185663847c39Smrg# LT_SYS_DLOPEN_SELF 185763847c39Smrg# ------------------ 185863847c39SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 185963847c39Smrg[m4_require([_LT_HEADER_DLFCN])dnl 186063847c39Smrgif test "x$enable_dlopen" != xyes; then 186163847c39Smrg enable_dlopen=unknown 186263847c39Smrg enable_dlopen_self=unknown 186363847c39Smrg enable_dlopen_self_static=unknown 186463847c39Smrgelse 186563847c39Smrg lt_cv_dlopen=no 186663847c39Smrg lt_cv_dlopen_libs= 186763847c39Smrg 186886dafe34Smrg case $host_os in 186963847c39Smrg beos*) 187063847c39Smrg lt_cv_dlopen="load_add_on" 187163847c39Smrg lt_cv_dlopen_libs= 187263847c39Smrg lt_cv_dlopen_self=yes 187386dafe34Smrg ;; 187463847c39Smrg 187563847c39Smrg mingw* | pw32* | cegcc*) 187663847c39Smrg lt_cv_dlopen="LoadLibrary" 187763847c39Smrg lt_cv_dlopen_libs= 187886dafe34Smrg ;; 187963847c39Smrg 188063847c39Smrg cygwin*) 188163847c39Smrg lt_cv_dlopen="dlopen" 188263847c39Smrg lt_cv_dlopen_libs= 188386dafe34Smrg ;; 188463847c39Smrg 188563847c39Smrg darwin*) 188663847c39Smrg # if libdl is installed we need to link against it 188763847c39Smrg AC_CHECK_LIB([dl], [dlopen], 188863847c39Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 188963847c39Smrg lt_cv_dlopen="dyld" 189063847c39Smrg lt_cv_dlopen_libs= 189163847c39Smrg lt_cv_dlopen_self=yes 189263847c39Smrg ]) 189363847c39Smrg ;; 189463847c39Smrg 189563847c39Smrg *) 189663847c39Smrg AC_CHECK_FUNC([shl_load], 189763847c39Smrg [lt_cv_dlopen="shl_load"], 189863847c39Smrg [AC_CHECK_LIB([dld], [shl_load], 189963847c39Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 190063847c39Smrg [AC_CHECK_FUNC([dlopen], 190163847c39Smrg [lt_cv_dlopen="dlopen"], 190263847c39Smrg [AC_CHECK_LIB([dl], [dlopen], 190363847c39Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 190463847c39Smrg [AC_CHECK_LIB([svld], [dlopen], 190563847c39Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 190663847c39Smrg [AC_CHECK_LIB([dld], [dld_link], 190763847c39Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 190863847c39Smrg ]) 190963847c39Smrg ]) 191063847c39Smrg ]) 191163847c39Smrg ]) 191263847c39Smrg ]) 191386dafe34Smrg ;; 191486dafe34Smrg esac 191576888252Smrg 191663847c39Smrg if test "x$lt_cv_dlopen" != xno; then 191763847c39Smrg enable_dlopen=yes 191863847c39Smrg else 191963847c39Smrg enable_dlopen=no 192063847c39Smrg fi 192163847c39Smrg 192263847c39Smrg case $lt_cv_dlopen in 192363847c39Smrg dlopen) 192463847c39Smrg save_CPPFLAGS="$CPPFLAGS" 192563847c39Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 192663847c39Smrg 192763847c39Smrg save_LDFLAGS="$LDFLAGS" 192863847c39Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 192963847c39Smrg 193063847c39Smrg save_LIBS="$LIBS" 193163847c39Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 193263847c39Smrg 193363847c39Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 193463847c39Smrg lt_cv_dlopen_self, [dnl 193563847c39Smrg _LT_TRY_DLOPEN_SELF( 193663847c39Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 193763847c39Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 193863847c39Smrg ]) 193963847c39Smrg 194063847c39Smrg if test "x$lt_cv_dlopen_self" = xyes; then 194163847c39Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 194263847c39Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 194363847c39Smrg lt_cv_dlopen_self_static, [dnl 194463847c39Smrg _LT_TRY_DLOPEN_SELF( 194563847c39Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 194663847c39Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 194763847c39Smrg ]) 194863847c39Smrg fi 194963847c39Smrg 195063847c39Smrg CPPFLAGS="$save_CPPFLAGS" 195163847c39Smrg LDFLAGS="$save_LDFLAGS" 195263847c39Smrg LIBS="$save_LIBS" 195363847c39Smrg ;; 195463847c39Smrg esac 195563847c39Smrg 195663847c39Smrg case $lt_cv_dlopen_self in 195763847c39Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 195863847c39Smrg *) enable_dlopen_self=unknown ;; 195963847c39Smrg esac 196063847c39Smrg 196163847c39Smrg case $lt_cv_dlopen_self_static in 196263847c39Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 196363847c39Smrg *) enable_dlopen_self_static=unknown ;; 196463847c39Smrg esac 196563847c39Smrgfi 196663847c39Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 196763847c39Smrg [Whether dlopen is supported]) 196863847c39Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 196963847c39Smrg [Whether dlopen of programs is supported]) 197063847c39Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 197163847c39Smrg [Whether dlopen of statically linked programs is supported]) 197263847c39Smrg])# LT_SYS_DLOPEN_SELF 197363847c39Smrg 197463847c39Smrg# Old name: 197563847c39SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 197663847c39Smrgdnl aclocal-1.4 backwards compatibility: 197763847c39Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 197863847c39Smrg 197963847c39Smrg 198063847c39Smrg# _LT_COMPILER_C_O([TAGNAME]) 198163847c39Smrg# --------------------------- 198263847c39Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 198363847c39Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 198463847c39Smrgm4_defun([_LT_COMPILER_C_O], 198563847c39Smrg[m4_require([_LT_DECL_SED])dnl 198663847c39Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 198763847c39Smrgm4_require([_LT_TAG_COMPILER])dnl 198863847c39SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 198963847c39Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 199063847c39Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 199163847c39Smrg $RM -r conftest 2>/dev/null 199263847c39Smrg mkdir conftest 199363847c39Smrg cd conftest 199463847c39Smrg mkdir out 199563847c39Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 199663847c39Smrg 199763847c39Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 199863847c39Smrg # Insert the option either (1) after the last *FLAGS variable, or 199963847c39Smrg # (2) before a word containing "conftest.", or (3) at the end. 200063847c39Smrg # Note that $ac_compile itself does not contain backslashes and begins 200163847c39Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 200263847c39Smrg lt_compile=`echo "$ac_compile" | $SED \ 200363847c39Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 200463847c39Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 200563847c39Smrg -e 's:$: $lt_compiler_flag:'` 200663847c39Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 200763847c39Smrg (eval "$lt_compile" 2>out/conftest.err) 200863847c39Smrg ac_status=$? 200963847c39Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 201063847c39Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 201163847c39Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 201263847c39Smrg then 201363847c39Smrg # The compiler can only warn and ignore the option if not recognized 201463847c39Smrg # So say no if there are warnings 201563847c39Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 201663847c39Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 201763847c39Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 201863847c39Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 201963847c39Smrg fi 202063847c39Smrg fi 202163847c39Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 202263847c39Smrg $RM conftest* 202363847c39Smrg # SGI C++ compiler will create directory out/ii_files/ for 202463847c39Smrg # template instantiation 202563847c39Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 202663847c39Smrg $RM out/* && rmdir out 202763847c39Smrg cd .. 202863847c39Smrg $RM -r conftest 202963847c39Smrg $RM conftest* 203063847c39Smrg]) 203163847c39Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 203263847c39Smrg [Does compiler simultaneously support -c and -o options?]) 203363847c39Smrg])# _LT_COMPILER_C_O 203463847c39Smrg 203563847c39Smrg 203663847c39Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 203763847c39Smrg# ---------------------------------- 203863847c39Smrg# Check to see if we can do hard links to lock some files if needed 203963847c39Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 204063847c39Smrg[m4_require([_LT_ENABLE_LOCK])dnl 204163847c39Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 204263847c39Smrg_LT_COMPILER_C_O([$1]) 204363847c39Smrg 204463847c39Smrghard_links="nottested" 204563847c39Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 204663847c39Smrg # do not overwrite the value of need_locks provided by the user 204763847c39Smrg AC_MSG_CHECKING([if we can lock with hard links]) 204863847c39Smrg hard_links=yes 204963847c39Smrg $RM conftest* 205063847c39Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 205163847c39Smrg touch conftest.a 205263847c39Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 205363847c39Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 205463847c39Smrg AC_MSG_RESULT([$hard_links]) 205563847c39Smrg if test "$hard_links" = no; then 205663847c39Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 205763847c39Smrg need_locks=warn 205863847c39Smrg fi 205963847c39Smrgelse 206063847c39Smrg need_locks=no 206163847c39Smrgfi 206263847c39Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 206363847c39Smrg])# _LT_COMPILER_FILE_LOCKS 206463847c39Smrg 206563847c39Smrg 206663847c39Smrg# _LT_CHECK_OBJDIR 206763847c39Smrg# ---------------- 206863847c39Smrgm4_defun([_LT_CHECK_OBJDIR], 206963847c39Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 207063847c39Smrg[rm -f .libs 2>/dev/null 207163847c39Smrgmkdir .libs 2>/dev/null 207263847c39Smrgif test -d .libs; then 207363847c39Smrg lt_cv_objdir=.libs 207463847c39Smrgelse 207563847c39Smrg # MS-DOS does not allow filenames that begin with a dot. 207663847c39Smrg lt_cv_objdir=_libs 207763847c39Smrgfi 207863847c39Smrgrmdir .libs 2>/dev/null]) 207963847c39Smrgobjdir=$lt_cv_objdir 208063847c39Smrg_LT_DECL([], [objdir], [0], 208163847c39Smrg [The name of the directory that contains temporary libtool files])dnl 208263847c39Smrgm4_pattern_allow([LT_OBJDIR])dnl 208363847c39SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 208463847c39Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 208563847c39Smrg])# _LT_CHECK_OBJDIR 208663847c39Smrg 208763847c39Smrg 208863847c39Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 208963847c39Smrg# -------------------------------------- 209063847c39Smrg# Check hardcoding attributes. 209163847c39Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 209263847c39Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 209363847c39Smrg_LT_TAGVAR(hardcode_action, $1)= 209463847c39Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 209563847c39Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 209663847c39Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 209763847c39Smrg 209863847c39Smrg # We can hardcode non-existent directories. 209963847c39Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 210063847c39Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 210163847c39Smrg # have to relink, otherwise we might link with an installed library 210263847c39Smrg # when we should be linking with a yet-to-be-installed one 210363847c39Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 210463847c39Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 210563847c39Smrg # Linking always hardcodes the temporary library directory. 210663847c39Smrg _LT_TAGVAR(hardcode_action, $1)=relink 210763847c39Smrg else 210863847c39Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 210963847c39Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 211063847c39Smrg fi 211163847c39Smrgelse 211263847c39Smrg # We cannot hardcode anything, or else we can only hardcode existing 211363847c39Smrg # directories. 211463847c39Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 211563847c39Smrgfi 211663847c39SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 211763847c39Smrg 211863847c39Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 211963847c39Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 212063847c39Smrg # Fast installation is not supported 212163847c39Smrg enable_fast_install=no 212263847c39Smrgelif test "$shlibpath_overrides_runpath" = yes || 212363847c39Smrg test "$enable_shared" = no; then 212463847c39Smrg # Fast installation is not necessary 212563847c39Smrg enable_fast_install=needless 212663847c39Smrgfi 212763847c39Smrg_LT_TAGDECL([], [hardcode_action], [0], 212863847c39Smrg [How to hardcode a shared library path into an executable]) 212963847c39Smrg])# _LT_LINKER_HARDCODE_LIBPATH 213063847c39Smrg 213163847c39Smrg 213263847c39Smrg# _LT_CMD_STRIPLIB 213363847c39Smrg# ---------------- 213463847c39Smrgm4_defun([_LT_CMD_STRIPLIB], 213563847c39Smrg[m4_require([_LT_DECL_EGREP]) 213663847c39Smrgstriplib= 213763847c39Smrgold_striplib= 213863847c39SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 213963847c39Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 214063847c39Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 214163847c39Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 214263847c39Smrg AC_MSG_RESULT([yes]) 214363847c39Smrgelse 214463847c39Smrg# FIXME - insert some real tests, host_os isn't really good enough 214563847c39Smrg case $host_os in 214663847c39Smrg darwin*) 214763847c39Smrg if test -n "$STRIP" ; then 214863847c39Smrg striplib="$STRIP -x" 214963847c39Smrg old_striplib="$STRIP -S" 215063847c39Smrg AC_MSG_RESULT([yes]) 215163847c39Smrg else 215263847c39Smrg AC_MSG_RESULT([no]) 215363847c39Smrg fi 215463847c39Smrg ;; 215563847c39Smrg *) 215663847c39Smrg AC_MSG_RESULT([no]) 215763847c39Smrg ;; 215863847c39Smrg esac 215963847c39Smrgfi 216063847c39Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 216163847c39Smrg_LT_DECL([], [striplib], [1]) 216263847c39Smrg])# _LT_CMD_STRIPLIB 216363847c39Smrg 216463847c39Smrg 216563847c39Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 216663847c39Smrg# ----------------------------- 216763847c39Smrg# PORTME Fill in your ld.so characteristics 216863847c39Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 216963847c39Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 217063847c39Smrgm4_require([_LT_DECL_EGREP])dnl 217163847c39Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 217263847c39Smrgm4_require([_LT_DECL_OBJDUMP])dnl 217363847c39Smrgm4_require([_LT_DECL_SED])dnl 217463847c39Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 217563847c39SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 217663847c39Smrgm4_if([$1], 217763847c39Smrg [], [ 217863847c39Smrgif test "$GCC" = yes; then 217963847c39Smrg case $host_os in 218063847c39Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 218163847c39Smrg *) lt_awk_arg="/^libraries:/" ;; 218263847c39Smrg esac 218363847c39Smrg case $host_os in 218463847c39Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 218563847c39Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 218663847c39Smrg esac 218763847c39Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 218863847c39Smrg case $lt_search_path_spec in 218963847c39Smrg *\;*) 219063847c39Smrg # if the path contains ";" then we assume it to be the separator 219163847c39Smrg # otherwise default to the standard path separator (i.e. ":") - it is 219263847c39Smrg # assumed that no part of a normal pathname contains ";" but that should 219363847c39Smrg # okay in the real world where ";" in dirpaths is itself problematic. 219463847c39Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 219563847c39Smrg ;; 219663847c39Smrg *) 219763847c39Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 219863847c39Smrg ;; 219963847c39Smrg esac 220063847c39Smrg # Ok, now we have the path, separated by spaces, we can step through it 220163847c39Smrg # and add multilib dir if necessary. 220263847c39Smrg lt_tmp_lt_search_path_spec= 220363847c39Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 220463847c39Smrg for lt_sys_path in $lt_search_path_spec; do 220563847c39Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 220663847c39Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 220763847c39Smrg else 220863847c39Smrg test -d "$lt_sys_path" && \ 220963847c39Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 221063847c39Smrg fi 221163847c39Smrg done 221263847c39Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 221363847c39SmrgBEGIN {RS=" "; FS="/|\n";} { 221463847c39Smrg lt_foo=""; 221563847c39Smrg lt_count=0; 221663847c39Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 221763847c39Smrg if ($lt_i != "" && $lt_i != ".") { 221863847c39Smrg if ($lt_i == "..") { 221963847c39Smrg lt_count++; 222063847c39Smrg } else { 222163847c39Smrg if (lt_count == 0) { 222263847c39Smrg lt_foo="/" $lt_i lt_foo; 222363847c39Smrg } else { 222463847c39Smrg lt_count--; 222563847c39Smrg } 222663847c39Smrg } 222763847c39Smrg } 222863847c39Smrg } 222963847c39Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 223063847c39Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 223163847c39Smrg}'` 223263847c39Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 223363847c39Smrg # for these hosts. 223463847c39Smrg case $host_os in 223563847c39Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 223663847c39Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 223763847c39Smrg esac 223863847c39Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 223963847c39Smrgelse 224063847c39Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 224163847c39Smrgfi]) 224263847c39Smrglibrary_names_spec= 224363847c39Smrglibname_spec='lib$name' 224463847c39Smrgsoname_spec= 224563847c39Smrgshrext_cmds=".so" 224663847c39Smrgpostinstall_cmds= 224763847c39Smrgpostuninstall_cmds= 224863847c39Smrgfinish_cmds= 224963847c39Smrgfinish_eval= 225063847c39Smrgshlibpath_var= 225163847c39Smrgshlibpath_overrides_runpath=unknown 225263847c39Smrgversion_type=none 225363847c39Smrgdynamic_linker="$host_os ld.so" 225463847c39Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 225563847c39Smrgneed_lib_prefix=unknown 225663847c39Smrghardcode_into_libs=no 225763847c39Smrg 225863847c39Smrg# when you set need_version to no, make sure it does not cause -set_version 225963847c39Smrg# flags to be left without arguments 226063847c39Smrgneed_version=unknown 226163847c39Smrg 226263847c39Smrgcase $host_os in 226363847c39Smrgaix3*) 226463847c39Smrg version_type=linux # correct to gnu/linux during the next big refactor 226563847c39Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 226663847c39Smrg shlibpath_var=LIBPATH 226763847c39Smrg 226863847c39Smrg # AIX 3 has no versioning support, so we append a major version to the name. 226963847c39Smrg soname_spec='${libname}${release}${shared_ext}$major' 227063847c39Smrg ;; 227163847c39Smrg 227263847c39Smrgaix[[4-9]]*) 227363847c39Smrg version_type=linux # correct to gnu/linux during the next big refactor 227463847c39Smrg need_lib_prefix=no 227563847c39Smrg need_version=no 227663847c39Smrg hardcode_into_libs=yes 227763847c39Smrg if test "$host_cpu" = ia64; then 227863847c39Smrg # AIX 5 supports IA64 227963847c39Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 228063847c39Smrg shlibpath_var=LD_LIBRARY_PATH 228163847c39Smrg else 228263847c39Smrg # With GCC up to 2.95.x, collect2 would create an import file 228363847c39Smrg # for dependence libraries. The import file would start with 228463847c39Smrg # the line `#! .'. This would cause the generated library to 228563847c39Smrg # depend on `.', always an invalid library. This was fixed in 228663847c39Smrg # development snapshots of GCC prior to 3.0. 228763847c39Smrg case $host_os in 228863847c39Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 228963847c39Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 229063847c39Smrg echo ' yes ' 229163847c39Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 229263847c39Smrg : 229363847c39Smrg else 229463847c39Smrg can_build_shared=no 229563847c39Smrg fi 229663847c39Smrg ;; 229763847c39Smrg esac 229863847c39Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 229963847c39Smrg # soname into executable. Probably we can add versioning support to 230063847c39Smrg # collect2, so additional links can be useful in future. 230163847c39Smrg if test "$aix_use_runtimelinking" = yes; then 230263847c39Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 230363847c39Smrg # instead of lib<name>.a to let people know that these are not 230463847c39Smrg # typical AIX shared libraries. 230563847c39Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 230663847c39Smrg else 230763847c39Smrg # We preserve .a as extension for shared libraries through AIX4.2 230863847c39Smrg # and later when we are not doing run time linking. 230963847c39Smrg library_names_spec='${libname}${release}.a $libname.a' 231063847c39Smrg soname_spec='${libname}${release}${shared_ext}$major' 231163847c39Smrg fi 231263847c39Smrg shlibpath_var=LIBPATH 231363847c39Smrg fi 231463847c39Smrg ;; 231563847c39Smrg 231663847c39Smrgamigaos*) 231763847c39Smrg case $host_cpu in 231863847c39Smrg powerpc) 231963847c39Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 232063847c39Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 232163847c39Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 232263847c39Smrg ;; 232363847c39Smrg m68k) 232463847c39Smrg library_names_spec='$libname.ixlibrary $libname.a' 232563847c39Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 232663847c39Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 232763847c39Smrg ;; 232863847c39Smrg esac 232963847c39Smrg ;; 233063847c39Smrg 233163847c39Smrgbeos*) 233263847c39Smrg library_names_spec='${libname}${shared_ext}' 233363847c39Smrg dynamic_linker="$host_os ld.so" 233463847c39Smrg shlibpath_var=LIBRARY_PATH 233563847c39Smrg ;; 233663847c39Smrg 233763847c39Smrgbsdi[[45]]*) 233863847c39Smrg version_type=linux # correct to gnu/linux during the next big refactor 233963847c39Smrg need_version=no 234063847c39Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 234163847c39Smrg soname_spec='${libname}${release}${shared_ext}$major' 234263847c39Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 234363847c39Smrg shlibpath_var=LD_LIBRARY_PATH 234463847c39Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 234563847c39Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 234663847c39Smrg # the default ld.so.conf also contains /usr/contrib/lib and 234763847c39Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 234863847c39Smrg # libtool to hard-code these into programs 234963847c39Smrg ;; 235063847c39Smrg 235163847c39Smrgcygwin* | mingw* | pw32* | cegcc*) 235263847c39Smrg version_type=windows 235363847c39Smrg shrext_cmds=".dll" 235463847c39Smrg need_version=no 235563847c39Smrg need_lib_prefix=no 235663847c39Smrg 235763847c39Smrg case $GCC,$cc_basename in 235863847c39Smrg yes,*) 235963847c39Smrg # gcc 236063847c39Smrg library_names_spec='$libname.dll.a' 236163847c39Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 236263847c39Smrg postinstall_cmds='base_file=`basename \${file}`~ 236363847c39Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 236463847c39Smrg dldir=$destdir/`dirname \$dlpath`~ 236563847c39Smrg test -d \$dldir || mkdir -p \$dldir~ 236663847c39Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 236763847c39Smrg chmod a+x \$dldir/$dlname~ 236863847c39Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 236963847c39Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 237063847c39Smrg fi' 237163847c39Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 237263847c39Smrg dlpath=$dir/\$dldll~ 237363847c39Smrg $RM \$dlpath' 237463847c39Smrg shlibpath_overrides_runpath=yes 237563847c39Smrg 237663847c39Smrg case $host_os in 237763847c39Smrg cygwin*) 237863847c39Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 237963847c39Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 238063847c39Smrgm4_if([$1], [],[ 238163847c39Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 238263847c39Smrg ;; 238363847c39Smrg mingw* | cegcc*) 238463847c39Smrg # MinGW DLLs use traditional 'lib' prefix 238563847c39Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 238663847c39Smrg ;; 238763847c39Smrg pw32*) 238863847c39Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 238963847c39Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 239063847c39Smrg ;; 239163847c39Smrg esac 239263847c39Smrg dynamic_linker='Win32 ld.exe' 239363847c39Smrg ;; 239463847c39Smrg 239563847c39Smrg *,cl*) 239663847c39Smrg # Native MSVC 239763847c39Smrg libname_spec='$name' 239863847c39Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 239963847c39Smrg library_names_spec='${libname}.dll.lib' 240063847c39Smrg 240163847c39Smrg case $build_os in 240263847c39Smrg mingw*) 240363847c39Smrg sys_lib_search_path_spec= 240463847c39Smrg lt_save_ifs=$IFS 240563847c39Smrg IFS=';' 240663847c39Smrg for lt_path in $LIB 240763847c39Smrg do 240863847c39Smrg IFS=$lt_save_ifs 240963847c39Smrg # Let DOS variable expansion print the short 8.3 style file name. 241063847c39Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 241163847c39Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 241263847c39Smrg done 241363847c39Smrg IFS=$lt_save_ifs 241463847c39Smrg # Convert to MSYS style. 241563847c39Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 241663847c39Smrg ;; 241763847c39Smrg cygwin*) 241863847c39Smrg # Convert to unix form, then to dos form, then back to unix form 241963847c39Smrg # but this time dos style (no spaces!) so that the unix form looks 242063847c39Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 242163847c39Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 242263847c39Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 242363847c39Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 242463847c39Smrg ;; 242563847c39Smrg *) 242663847c39Smrg sys_lib_search_path_spec="$LIB" 242763847c39Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 242863847c39Smrg # It is most probably a Windows format PATH. 242963847c39Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 243063847c39Smrg else 243163847c39Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 243263847c39Smrg fi 243363847c39Smrg # FIXME: find the short name or the path components, as spaces are 243463847c39Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 243563847c39Smrg ;; 243663847c39Smrg esac 243763847c39Smrg 243863847c39Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 243963847c39Smrg postinstall_cmds='base_file=`basename \${file}`~ 244063847c39Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 244163847c39Smrg dldir=$destdir/`dirname \$dlpath`~ 244263847c39Smrg test -d \$dldir || mkdir -p \$dldir~ 244363847c39Smrg $install_prog $dir/$dlname \$dldir/$dlname' 244463847c39Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 244563847c39Smrg dlpath=$dir/\$dldll~ 244663847c39Smrg $RM \$dlpath' 244763847c39Smrg shlibpath_overrides_runpath=yes 244863847c39Smrg dynamic_linker='Win32 link.exe' 244963847c39Smrg ;; 245063847c39Smrg 245163847c39Smrg *) 245263847c39Smrg # Assume MSVC wrapper 245363847c39Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 245463847c39Smrg dynamic_linker='Win32 ld.exe' 245563847c39Smrg ;; 245663847c39Smrg esac 245763847c39Smrg # FIXME: first we should search . and the directory the executable is in 245863847c39Smrg shlibpath_var=PATH 245963847c39Smrg ;; 246063847c39Smrg 246163847c39Smrgdarwin* | rhapsody*) 246263847c39Smrg dynamic_linker="$host_os dyld" 246363847c39Smrg version_type=darwin 246463847c39Smrg need_lib_prefix=no 246563847c39Smrg need_version=no 246663847c39Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 246763847c39Smrg soname_spec='${libname}${release}${major}$shared_ext' 246863847c39Smrg shlibpath_overrides_runpath=yes 246963847c39Smrg shlibpath_var=DYLD_LIBRARY_PATH 247063847c39Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 247163847c39Smrgm4_if([$1], [],[ 247263847c39Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 247363847c39Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 247463847c39Smrg ;; 247563847c39Smrg 247663847c39Smrgdgux*) 247763847c39Smrg version_type=linux # correct to gnu/linux during the next big refactor 247863847c39Smrg need_lib_prefix=no 247963847c39Smrg need_version=no 248063847c39Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 248163847c39Smrg soname_spec='${libname}${release}${shared_ext}$major' 248263847c39Smrg shlibpath_var=LD_LIBRARY_PATH 248363847c39Smrg ;; 248463847c39Smrg 248563847c39Smrgfreebsd* | dragonfly*) 248663847c39Smrg # DragonFly does not have aout. When/if they implement a new 248763847c39Smrg # versioning mechanism, adjust this. 248863847c39Smrg if test -x /usr/bin/objformat; then 248963847c39Smrg objformat=`/usr/bin/objformat` 249063847c39Smrg else 249163847c39Smrg case $host_os in 249263847c39Smrg freebsd[[23]].*) objformat=aout ;; 249363847c39Smrg *) objformat=elf ;; 249463847c39Smrg esac 249563847c39Smrg fi 249663847c39Smrg version_type=freebsd-$objformat 249763847c39Smrg case $version_type in 249863847c39Smrg freebsd-elf*) 249963847c39Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 250063847c39Smrg need_version=no 250163847c39Smrg need_lib_prefix=no 250263847c39Smrg ;; 250363847c39Smrg freebsd-*) 250463847c39Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 250563847c39Smrg need_version=yes 250663847c39Smrg ;; 250763847c39Smrg esac 250863847c39Smrg shlibpath_var=LD_LIBRARY_PATH 250963847c39Smrg case $host_os in 251063847c39Smrg freebsd2.*) 251163847c39Smrg shlibpath_overrides_runpath=yes 251263847c39Smrg ;; 251363847c39Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 251463847c39Smrg shlibpath_overrides_runpath=yes 251563847c39Smrg hardcode_into_libs=yes 251663847c39Smrg ;; 251763847c39Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 251863847c39Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 251963847c39Smrg shlibpath_overrides_runpath=no 252063847c39Smrg hardcode_into_libs=yes 252163847c39Smrg ;; 252263847c39Smrg *) # from 4.6 on, and DragonFly 252363847c39Smrg shlibpath_overrides_runpath=yes 252463847c39Smrg hardcode_into_libs=yes 252563847c39Smrg ;; 252663847c39Smrg esac 252763847c39Smrg ;; 252863847c39Smrg 252963847c39Smrggnu*) 253063847c39Smrg version_type=linux # correct to gnu/linux during the next big refactor 253163847c39Smrg need_lib_prefix=no 253263847c39Smrg need_version=no 253386dafe34Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 253486dafe34Smrg soname_spec='${libname}${release}${shared_ext}$major' 253586dafe34Smrg shlibpath_var=LD_LIBRARY_PATH 253663847c39Smrg shlibpath_overrides_runpath=no 253763847c39Smrg hardcode_into_libs=yes 253863847c39Smrg ;; 253963847c39Smrg 254063847c39Smrghaiku*) 254163847c39Smrg version_type=linux # correct to gnu/linux during the next big refactor 254263847c39Smrg need_lib_prefix=no 254363847c39Smrg need_version=no 254463847c39Smrg dynamic_linker="$host_os runtime_loader" 254563847c39Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 254663847c39Smrg soname_spec='${libname}${release}${shared_ext}$major' 254763847c39Smrg shlibpath_var=LIBRARY_PATH 254863847c39Smrg shlibpath_overrides_runpath=yes 254963847c39Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 255086dafe34Smrg hardcode_into_libs=yes 255186dafe34Smrg ;; 255276888252Smrg 255386dafe34Smrghpux9* | hpux10* | hpux11*) 255486dafe34Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 255586dafe34Smrg # link against other versions. 255686dafe34Smrg version_type=sunos 255786dafe34Smrg need_lib_prefix=no 255886dafe34Smrg need_version=no 255986dafe34Smrg case $host_cpu in 256086dafe34Smrg ia64*) 256186dafe34Smrg shrext_cmds='.so' 256286dafe34Smrg hardcode_into_libs=yes 256386dafe34Smrg dynamic_linker="$host_os dld.so" 256486dafe34Smrg shlibpath_var=LD_LIBRARY_PATH 256586dafe34Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 256686dafe34Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 256786dafe34Smrg soname_spec='${libname}${release}${shared_ext}$major' 256886dafe34Smrg if test "X$HPUX_IA64_MODE" = X32; then 256986dafe34Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 257086dafe34Smrg else 257186dafe34Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 257286dafe34Smrg fi 257386dafe34Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 257486dafe34Smrg ;; 257563847c39Smrg hppa*64*) 257663847c39Smrg shrext_cmds='.sl' 257763847c39Smrg hardcode_into_libs=yes 257863847c39Smrg dynamic_linker="$host_os dld.sl" 257963847c39Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 258063847c39Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 258163847c39Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 258263847c39Smrg soname_spec='${libname}${release}${shared_ext}$major' 258363847c39Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 258463847c39Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 258563847c39Smrg ;; 258663847c39Smrg *) 258786dafe34Smrg shrext_cmds='.sl' 258886dafe34Smrg dynamic_linker="$host_os dld.sl" 258986dafe34Smrg shlibpath_var=SHLIB_PATH 259086dafe34Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 259186dafe34Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 259286dafe34Smrg soname_spec='${libname}${release}${shared_ext}$major' 259386dafe34Smrg ;; 259486dafe34Smrg esac 259563847c39Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 259686dafe34Smrg postinstall_cmds='chmod 555 $lib' 259763847c39Smrg # or fails outright, so override atomically: 259863847c39Smrg install_override_mode=555 259986dafe34Smrg ;; 260076888252Smrg 260186dafe34Smrginterix[[3-9]]*) 260263847c39Smrg version_type=linux # correct to gnu/linux during the next big refactor 260386dafe34Smrg need_lib_prefix=no 260486dafe34Smrg need_version=no 260586dafe34Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 260686dafe34Smrg soname_spec='${libname}${release}${shared_ext}$major' 260786dafe34Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 260886dafe34Smrg shlibpath_var=LD_LIBRARY_PATH 260986dafe34Smrg shlibpath_overrides_runpath=no 261086dafe34Smrg hardcode_into_libs=yes 261186dafe34Smrg ;; 261276888252Smrg 261386dafe34Smrgirix5* | irix6* | nonstopux*) 261486dafe34Smrg case $host_os in 261586dafe34Smrg nonstopux*) version_type=nonstopux ;; 261686dafe34Smrg *) 261786dafe34Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 261863847c39Smrg version_type=linux # correct to gnu/linux during the next big refactor 261986dafe34Smrg else 262086dafe34Smrg version_type=irix 262186dafe34Smrg fi ;; 262286dafe34Smrg esac 262386dafe34Smrg need_lib_prefix=no 262486dafe34Smrg need_version=no 262586dafe34Smrg soname_spec='${libname}${release}${shared_ext}$major' 262686dafe34Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 262786dafe34Smrg case $host_os in 262886dafe34Smrg irix5* | nonstopux*) 262986dafe34Smrg libsuff= shlibsuff= 263086dafe34Smrg ;; 263186dafe34Smrg *) 263286dafe34Smrg case $LD in # libtool.m4 will add one of these switches to LD 263386dafe34Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 263486dafe34Smrg libsuff= shlibsuff= libmagic=32-bit;; 263586dafe34Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 263686dafe34Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 263786dafe34Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 263886dafe34Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 263986dafe34Smrg *) libsuff= shlibsuff= libmagic=never-match;; 264086dafe34Smrg esac 264186dafe34Smrg ;; 264286dafe34Smrg esac 264386dafe34Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 264486dafe34Smrg shlibpath_overrides_runpath=no 264586dafe34Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 264686dafe34Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 264786dafe34Smrg hardcode_into_libs=yes 264886dafe34Smrg ;; 264976888252Smrg 265086dafe34Smrg# No shared lib support for Linux oldld, aout, or coff. 265186dafe34Smrglinux*oldld* | linux*aout* | linux*coff*) 265286dafe34Smrg dynamic_linker=no 265386dafe34Smrg ;; 265476888252Smrg 265563847c39Smrg# This must be glibc/ELF. 265663847c39Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 265763847c39Smrg version_type=linux # correct to gnu/linux during the next big refactor 265886dafe34Smrg need_lib_prefix=no 265986dafe34Smrg need_version=no 266086dafe34Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 266186dafe34Smrg soname_spec='${libname}${release}${shared_ext}$major' 266286dafe34Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 266386dafe34Smrg shlibpath_var=LD_LIBRARY_PATH 266486dafe34Smrg shlibpath_overrides_runpath=no 266563847c39Smrg 266663847c39Smrg # Some binutils ld are patched to set DT_RUNPATH 266763847c39Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 266863847c39Smrg [lt_cv_shlibpath_overrides_runpath=no 266963847c39Smrg save_LDFLAGS=$LDFLAGS 267063847c39Smrg save_libdir=$libdir 267163847c39Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 267263847c39Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 267363847c39Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 267463847c39Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 267563847c39Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 267663847c39Smrg LDFLAGS=$save_LDFLAGS 267763847c39Smrg libdir=$save_libdir 267863847c39Smrg ]) 267963847c39Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 268063847c39Smrg 268186dafe34Smrg # This implies no fast_install, which is unacceptable. 268286dafe34Smrg # Some rework will be needed to allow for fast_install 268386dafe34Smrg # before this can be enabled. 268486dafe34Smrg hardcode_into_libs=yes 268576888252Smrg 268686dafe34Smrg # Append ld.so.conf contents to the search path 268786dafe34Smrg if test -f /etc/ld.so.conf; then 268863847c39Smrg 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' ' '` 268963847c39Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 269086dafe34Smrg fi 269176888252Smrg 269286dafe34Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 269386dafe34Smrg # powerpc, because MkLinux only supported shared libraries with the 269486dafe34Smrg # GNU dynamic linker. Since this was broken with cross compilers, 269586dafe34Smrg # most powerpc-linux boxes support dynamic linking these days and 269686dafe34Smrg # people can always --disable-shared, the test was removed, and we 269786dafe34Smrg # assume the GNU/Linux dynamic linker is in use. 269886dafe34Smrg dynamic_linker='GNU/Linux ld.so' 269986dafe34Smrg ;; 270076888252Smrg 270163847c39Smrgnetbsdelf*-gnu) 270263847c39Smrg version_type=linux 270363847c39Smrg need_lib_prefix=no 270463847c39Smrg need_version=no 270563847c39Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 270663847c39Smrg soname_spec='${libname}${release}${shared_ext}$major' 270763847c39Smrg shlibpath_var=LD_LIBRARY_PATH 270863847c39Smrg shlibpath_overrides_runpath=no 270963847c39Smrg hardcode_into_libs=yes 271063847c39Smrg dynamic_linker='NetBSD ld.elf_so' 271163847c39Smrg ;; 271263847c39Smrg 271386dafe34Smrgnetbsd*) 271486dafe34Smrg version_type=sunos 271586dafe34Smrg need_lib_prefix=no 271686dafe34Smrg need_version=no 271763847c39Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 271886dafe34Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 271986dafe34Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 272086dafe34Smrg dynamic_linker='NetBSD (a.out) ld.so' 272186dafe34Smrg else 272286dafe34Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 272386dafe34Smrg soname_spec='${libname}${release}${shared_ext}$major' 272486dafe34Smrg dynamic_linker='NetBSD ld.elf_so' 272586dafe34Smrg fi 272686dafe34Smrg shlibpath_var=LD_LIBRARY_PATH 272786dafe34Smrg shlibpath_overrides_runpath=yes 272886dafe34Smrg hardcode_into_libs=yes 272976888252Smrg ;; 273076888252Smrg 273186dafe34Smrgnewsos6) 273263847c39Smrg version_type=linux # correct to gnu/linux during the next big refactor 273386dafe34Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 273486dafe34Smrg shlibpath_var=LD_LIBRARY_PATH 273586dafe34Smrg shlibpath_overrides_runpath=yes 273686dafe34Smrg ;; 273776888252Smrg 273863847c39Smrg*nto* | *qnx*) 273963847c39Smrg version_type=qnx 274086dafe34Smrg need_lib_prefix=no 274186dafe34Smrg need_version=no 274286dafe34Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 274386dafe34Smrg soname_spec='${libname}${release}${shared_ext}$major' 274486dafe34Smrg shlibpath_var=LD_LIBRARY_PATH 274563847c39Smrg shlibpath_overrides_runpath=no 274663847c39Smrg hardcode_into_libs=yes 274763847c39Smrg dynamic_linker='ldqnx.so' 274886dafe34Smrg ;; 274976888252Smrg 275086dafe34Smrgopenbsd*) 275186dafe34Smrg version_type=sunos 275286dafe34Smrg sys_lib_dlsearch_path_spec="/usr/lib" 275386dafe34Smrg need_lib_prefix=no 275486dafe34Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 275586dafe34Smrg case $host_os in 275663847c39Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 275763847c39Smrg *) need_version=no ;; 275886dafe34Smrg esac 275986dafe34Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 276086dafe34Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 276186dafe34Smrg shlibpath_var=LD_LIBRARY_PATH 276263847c39Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 276386dafe34Smrg case $host_os in 276486dafe34Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 276586dafe34Smrg shlibpath_overrides_runpath=no 276686dafe34Smrg ;; 276786dafe34Smrg *) 276886dafe34Smrg shlibpath_overrides_runpath=yes 276986dafe34Smrg ;; 277086dafe34Smrg esac 277186dafe34Smrg else 277286dafe34Smrg shlibpath_overrides_runpath=yes 27731ae1b5e8Smrg fi 277486dafe34Smrg ;; 277576888252Smrg 277686dafe34Smrgos2*) 277786dafe34Smrg libname_spec='$name' 277886dafe34Smrg shrext_cmds=".dll" 277986dafe34Smrg need_lib_prefix=no 278086dafe34Smrg library_names_spec='$libname${shared_ext} $libname.a' 278186dafe34Smrg dynamic_linker='OS/2 ld.exe' 278286dafe34Smrg shlibpath_var=LIBPATH 278386dafe34Smrg ;; 278476888252Smrg 278586dafe34Smrgosf3* | osf4* | osf5*) 278686dafe34Smrg version_type=osf 278786dafe34Smrg need_lib_prefix=no 278886dafe34Smrg need_version=no 278986dafe34Smrg soname_spec='${libname}${release}${shared_ext}$major' 279086dafe34Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 279186dafe34Smrg shlibpath_var=LD_LIBRARY_PATH 279286dafe34Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 279386dafe34Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 279486dafe34Smrg ;; 279576888252Smrg 279686dafe34Smrgrdos*) 279786dafe34Smrg dynamic_linker=no 279886dafe34Smrg ;; 279976888252Smrg 280086dafe34Smrgsolaris*) 280163847c39Smrg version_type=linux # correct to gnu/linux during the next big refactor 280286dafe34Smrg need_lib_prefix=no 280386dafe34Smrg need_version=no 280486dafe34Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 280586dafe34Smrg soname_spec='${libname}${release}${shared_ext}$major' 280686dafe34Smrg shlibpath_var=LD_LIBRARY_PATH 280786dafe34Smrg shlibpath_overrides_runpath=yes 280886dafe34Smrg hardcode_into_libs=yes 280986dafe34Smrg # ldd complains unless libraries are executable 281086dafe34Smrg postinstall_cmds='chmod +x $lib' 281186dafe34Smrg ;; 281276888252Smrg 281386dafe34Smrgsunos4*) 281486dafe34Smrg version_type=sunos 281586dafe34Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 281686dafe34Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 281786dafe34Smrg shlibpath_var=LD_LIBRARY_PATH 281886dafe34Smrg shlibpath_overrides_runpath=yes 281986dafe34Smrg if test "$with_gnu_ld" = yes; then 282086dafe34Smrg need_lib_prefix=no 28211ae1b5e8Smrg fi 282286dafe34Smrg need_version=yes 28231ae1b5e8Smrg ;; 282486dafe34Smrg 282586dafe34Smrgsysv4 | sysv4.3*) 282663847c39Smrg version_type=linux # correct to gnu/linux during the next big refactor 282786dafe34Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 282886dafe34Smrg soname_spec='${libname}${release}${shared_ext}$major' 282986dafe34Smrg shlibpath_var=LD_LIBRARY_PATH 283086dafe34Smrg case $host_vendor in 283186dafe34Smrg sni) 283286dafe34Smrg shlibpath_overrides_runpath=no 283386dafe34Smrg need_lib_prefix=no 283486dafe34Smrg runpath_var=LD_RUN_PATH 28351ae1b5e8Smrg ;; 283686dafe34Smrg siemens) 283786dafe34Smrg need_lib_prefix=no 28381ae1b5e8Smrg ;; 283986dafe34Smrg motorola) 284086dafe34Smrg need_lib_prefix=no 284186dafe34Smrg need_version=no 284286dafe34Smrg shlibpath_overrides_runpath=no 284386dafe34Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 28441ae1b5e8Smrg ;; 284586dafe34Smrg esac 28461ae1b5e8Smrg ;; 284776888252Smrg 284886dafe34Smrgsysv4*MP*) 284986dafe34Smrg if test -d /usr/nec ;then 285063847c39Smrg version_type=linux # correct to gnu/linux during the next big refactor 285186dafe34Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 285286dafe34Smrg soname_spec='$libname${shared_ext}.$major' 285386dafe34Smrg shlibpath_var=LD_LIBRARY_PATH 28541ae1b5e8Smrg fi 28551ae1b5e8Smrg ;; 285676888252Smrg 285786dafe34Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 285886dafe34Smrg version_type=freebsd-elf 285986dafe34Smrg need_lib_prefix=no 286086dafe34Smrg need_version=no 286186dafe34Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 286286dafe34Smrg soname_spec='${libname}${release}${shared_ext}$major' 286386dafe34Smrg shlibpath_var=LD_LIBRARY_PATH 286463847c39Smrg shlibpath_overrides_runpath=yes 286586dafe34Smrg hardcode_into_libs=yes 286686dafe34Smrg if test "$with_gnu_ld" = yes; then 286786dafe34Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 286886dafe34Smrg else 286986dafe34Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 287086dafe34Smrg case $host_os in 287186dafe34Smrg sco3.2v5*) 287286dafe34Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 287386dafe34Smrg ;; 28741ae1b5e8Smrg esac 28751ae1b5e8Smrg fi 287686dafe34Smrg sys_lib_dlsearch_path_spec='/usr/lib' 28771ae1b5e8Smrg ;; 287876888252Smrg 287963847c39Smrgtpf*) 288063847c39Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 288163847c39Smrg version_type=linux # correct to gnu/linux during the next big refactor 288263847c39Smrg need_lib_prefix=no 288363847c39Smrg need_version=no 288463847c39Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 288563847c39Smrg shlibpath_var=LD_LIBRARY_PATH 288663847c39Smrg shlibpath_overrides_runpath=no 288763847c39Smrg hardcode_into_libs=yes 288863847c39Smrg ;; 288963847c39Smrg 289086dafe34Smrguts4*) 289163847c39Smrg version_type=linux # correct to gnu/linux during the next big refactor 289286dafe34Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 289386dafe34Smrg soname_spec='${libname}${release}${shared_ext}$major' 289486dafe34Smrg shlibpath_var=LD_LIBRARY_PATH 289586dafe34Smrg ;; 289676888252Smrg 289786dafe34Smrg*) 289886dafe34Smrg dynamic_linker=no 289986dafe34Smrg ;; 290086dafe34Smrgesac 290186dafe34SmrgAC_MSG_RESULT([$dynamic_linker]) 290286dafe34Smrgtest "$dynamic_linker" = no && can_build_shared=no 290386dafe34Smrg 290486dafe34Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 290586dafe34Smrgif test "$GCC" = yes; then 290686dafe34Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 29071ae1b5e8Smrgfi 2908d8556812Smrg 290963847c39Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 291063847c39Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 291163847c39Smrgfi 291263847c39Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 291363847c39Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2914d8556812Smrgfi 2915d8556812Smrg 291663847c39Smrg_LT_DECL([], [variables_saved_for_relink], [1], 291763847c39Smrg [Variables whose values should be saved in libtool wrapper scripts and 291863847c39Smrg restored at link time]) 291963847c39Smrg_LT_DECL([], [need_lib_prefix], [0], 292063847c39Smrg [Do we need the "lib" prefix for modules?]) 292163847c39Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 292263847c39Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 292363847c39Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 292463847c39Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 292563847c39Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 292663847c39Smrg [Is shlibpath searched before the hard-coded library search path?]) 292763847c39Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 292863847c39Smrg_LT_DECL([], [library_names_spec], [1], 292963847c39Smrg [[List of archive names. First name is the real one, the rest are links. 293063847c39Smrg The last name is the one that the linker finds with -lNAME]]) 293163847c39Smrg_LT_DECL([], [soname_spec], [1], 293263847c39Smrg [[The coded name of the library, if different from the real name]]) 293363847c39Smrg_LT_DECL([], [install_override_mode], [1], 293463847c39Smrg [Permission mode override for installation of shared libraries]) 293563847c39Smrg_LT_DECL([], [postinstall_cmds], [2], 293663847c39Smrg [Command to use after installation of a shared archive]) 293763847c39Smrg_LT_DECL([], [postuninstall_cmds], [2], 293863847c39Smrg [Command to use after uninstallation of a shared archive]) 293963847c39Smrg_LT_DECL([], [finish_cmds], [2], 294063847c39Smrg [Commands used to finish a libtool library installation in a directory]) 294163847c39Smrg_LT_DECL([], [finish_eval], [1], 294263847c39Smrg [[As "finish_cmds", except a single script fragment to be evaled but 294363847c39Smrg not shown]]) 294463847c39Smrg_LT_DECL([], [hardcode_into_libs], [0], 294563847c39Smrg [Whether we should hardcode library paths into libraries]) 294663847c39Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 294763847c39Smrg [Compile-time system search path for libraries]) 294863847c39Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 294963847c39Smrg [Run-time system search path for libraries]) 295063847c39Smrg])# _LT_SYS_DYNAMIC_LINKER 295163847c39Smrg 295263847c39Smrg 295363847c39Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 2954d8556812Smrg# -------------------------- 2955d8556812Smrg# find a file program which can recognize shared library 295663847c39SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 295763847c39Smrg[m4_require([_LT_DECL_EGREP])dnl 2958d8556812SmrgAC_MSG_CHECKING([for $1]) 2959d8556812SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2960d8556812Smrg[case $MAGIC_CMD in 296186dafe34Smrg[[\\/*] | ?:[\\/]*]) 296286dafe34Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 296386dafe34Smrg ;; 296486dafe34Smrg*) 296586dafe34Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 296686dafe34Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 296786dafe34Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 296886dafe34Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 296986dafe34Smrgdnl not every word. This closes a longstanding sh security hole. 297063847c39Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 297186dafe34Smrg for ac_dir in $ac_dummy; do 297286dafe34Smrg IFS="$lt_save_ifs" 297386dafe34Smrg test -z "$ac_dir" && ac_dir=. 297486dafe34Smrg if test -f $ac_dir/$1; then 297586dafe34Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 297686dafe34Smrg if test -n "$file_magic_test_file"; then 297786dafe34Smrg case $deplibs_check_method in 297886dafe34Smrg "file_magic "*) 297986dafe34Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 298086dafe34Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 298186dafe34Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 298286dafe34Smrg $EGREP "$file_magic_regex" > /dev/null; then 298386dafe34Smrg : 298486dafe34Smrg else 298563847c39Smrg cat <<_LT_EOF 1>&2 298676888252Smrg 298786dafe34Smrg*** Warning: the command libtool uses to detect shared libraries, 298886dafe34Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 298986dafe34Smrg*** The result is that libtool may fail to recognize shared libraries 299086dafe34Smrg*** as such. This will affect the creation of libtool libraries that 299186dafe34Smrg*** depend on shared libraries, but programs linked with such libtool 299286dafe34Smrg*** libraries will work regardless of this problem. Nevertheless, you 299386dafe34Smrg*** may want to report the problem to your system manager and/or to 299486dafe34Smrg*** bug-libtool@gnu.org 299586dafe34Smrg 299663847c39Smrg_LT_EOF 299786dafe34Smrg fi ;; 299886dafe34Smrg esac 299986dafe34Smrg fi 300086dafe34Smrg break 300186dafe34Smrg fi 300286dafe34Smrg done 300386dafe34Smrg IFS="$lt_save_ifs" 300486dafe34Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 300586dafe34Smrg ;; 300686dafe34Smrgesac]) 300786dafe34SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 300886dafe34Smrgif test -n "$MAGIC_CMD"; then 300986dafe34Smrg AC_MSG_RESULT($MAGIC_CMD) 30101ae1b5e8Smrgelse 301186dafe34Smrg AC_MSG_RESULT(no) 30121ae1b5e8Smrgfi 301363847c39Smrg_LT_DECL([], [MAGIC_CMD], [0], 301463847c39Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 301563847c39Smrg])# _LT_PATH_TOOL_PREFIX 301676888252Smrg 301763847c39Smrg# Old name: 301863847c39SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 301963847c39Smrgdnl aclocal-1.4 backwards compatibility: 302063847c39Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 302176888252Smrg 302263847c39Smrg 302363847c39Smrg# _LT_PATH_MAGIC 302463847c39Smrg# -------------- 302586dafe34Smrg# find a file program which can recognize a shared library 302663847c39Smrgm4_defun([_LT_PATH_MAGIC], 302763847c39Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 302886dafe34Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 302986dafe34Smrg if test -n "$ac_tool_prefix"; then 303063847c39Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 303186dafe34Smrg else 303286dafe34Smrg MAGIC_CMD=: 303386dafe34Smrg fi 303486dafe34Smrgfi 303563847c39Smrg])# _LT_PATH_MAGIC 303676888252Smrg 303776888252Smrg 303863847c39Smrg# LT_PATH_LD 303986dafe34Smrg# ---------- 304086dafe34Smrg# find the pathname to the GNU or non-GNU linker 304163847c39SmrgAC_DEFUN([LT_PATH_LD], 304263847c39Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3043d8556812SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3044d8556812SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 304563847c39Smrgm4_require([_LT_DECL_SED])dnl 304663847c39Smrgm4_require([_LT_DECL_EGREP])dnl 304763847c39Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 304863847c39Smrg 304963847c39SmrgAC_ARG_WITH([gnu-ld], 305063847c39Smrg [AS_HELP_STRING([--with-gnu-ld], 305163847c39Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 305263847c39Smrg [test "$withval" = no || with_gnu_ld=yes], 305363847c39Smrg [with_gnu_ld=no])dnl 305463847c39Smrg 305586dafe34Smrgac_prog=ld 305686dafe34Smrgif test "$GCC" = yes; then 305786dafe34Smrg # Check if gcc -print-prog-name=ld gives a path. 305886dafe34Smrg AC_MSG_CHECKING([for ld used by $CC]) 305986dafe34Smrg case $host in 306086dafe34Smrg *-*-mingw*) 306186dafe34Smrg # gcc leaves a trailing carriage return which upsets mingw 306286dafe34Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 306386dafe34Smrg *) 306486dafe34Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 306586dafe34Smrg esac 306686dafe34Smrg case $ac_prog in 306786dafe34Smrg # Accept absolute paths. 306886dafe34Smrg [[\\/]]* | ?:[[\\/]]*) 306986dafe34Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 307086dafe34Smrg # Canonicalize the pathname of ld 307163847c39Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 307263847c39Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 307363847c39Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 307486dafe34Smrg done 307586dafe34Smrg test -z "$LD" && LD="$ac_prog" 307686dafe34Smrg ;; 307786dafe34Smrg "") 307886dafe34Smrg # If it fails, then pretend we aren't using GCC. 307986dafe34Smrg ac_prog=ld 30801ae1b5e8Smrg ;; 30811ae1b5e8Smrg *) 308286dafe34Smrg # If it is relative, then search for the first ld in PATH. 308386dafe34Smrg with_gnu_ld=unknown 30841ae1b5e8Smrg ;; 30851ae1b5e8Smrg esac 308686dafe34Smrgelif test "$with_gnu_ld" = yes; then 308786dafe34Smrg AC_MSG_CHECKING([for GNU ld]) 30881ae1b5e8Smrgelse 308986dafe34Smrg AC_MSG_CHECKING([for non-GNU ld]) 30901ae1b5e8Smrgfi 309186dafe34SmrgAC_CACHE_VAL(lt_cv_path_LD, 309286dafe34Smrg[if test -z "$LD"; then 309386dafe34Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 309486dafe34Smrg for ac_dir in $PATH; do 309586dafe34Smrg IFS="$lt_save_ifs" 309686dafe34Smrg test -z "$ac_dir" && ac_dir=. 309786dafe34Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 309886dafe34Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 309986dafe34Smrg # Check to see if the program is GNU ld. I'd rather use --version, 310086dafe34Smrg # but apparently some variants of GNU ld only accept -v. 310186dafe34Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 310286dafe34Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 310386dafe34Smrg *GNU* | *'with BFD'*) 310486dafe34Smrg test "$with_gnu_ld" != no && break 310586dafe34Smrg ;; 310686dafe34Smrg *) 310786dafe34Smrg test "$with_gnu_ld" != yes && break 310886dafe34Smrg ;; 310986dafe34Smrg esac 311086dafe34Smrg fi 311186dafe34Smrg done 311286dafe34Smrg IFS="$lt_save_ifs" 311386dafe34Smrgelse 311486dafe34Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 311586dafe34Smrgfi]) 311686dafe34SmrgLD="$lt_cv_path_LD" 311786dafe34Smrgif test -n "$LD"; then 311886dafe34Smrg AC_MSG_RESULT($LD) 311986dafe34Smrgelse 312086dafe34Smrg AC_MSG_RESULT(no) 312186dafe34Smrgfi 312286dafe34Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 312363847c39Smrg_LT_PATH_LD_GNU 312463847c39SmrgAC_SUBST([LD]) 312576888252Smrg 312663847c39Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 312763847c39Smrg])# LT_PATH_LD 312876888252Smrg 312963847c39Smrg# Old names: 313063847c39SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 313163847c39SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 313263847c39Smrgdnl aclocal-1.4 backwards compatibility: 313363847c39Smrgdnl AC_DEFUN([AM_PROG_LD], []) 313463847c39Smrgdnl AC_DEFUN([AC_PROG_LD], []) 313563847c39Smrg 313663847c39Smrg 313763847c39Smrg# _LT_PATH_LD_GNU 313863847c39Smrg#- -------------- 313963847c39Smrgm4_defun([_LT_PATH_LD_GNU], 314063847c39Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 314186dafe34Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 314286dafe34Smrgcase `$LD -v 2>&1 </dev/null` in 314386dafe34Smrg*GNU* | *'with BFD'*) 314486dafe34Smrg lt_cv_prog_gnu_ld=yes 314586dafe34Smrg ;; 314686dafe34Smrg*) 314786dafe34Smrg lt_cv_prog_gnu_ld=no 314886dafe34Smrg ;; 314986dafe34Smrgesac]) 315086dafe34Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 315163847c39Smrg])# _LT_PATH_LD_GNU 315276888252Smrg 315376888252Smrg 315463847c39Smrg# _LT_CMD_RELOAD 315563847c39Smrg# -------------- 315686dafe34Smrg# find reload flag for linker 315786dafe34Smrg# -- PORTME Some linkers may need a different reload flag. 315863847c39Smrgm4_defun([_LT_CMD_RELOAD], 315986dafe34Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 316086dafe34Smrg lt_cv_ld_reload_flag, 316186dafe34Smrg [lt_cv_ld_reload_flag='-r']) 316286dafe34Smrgreload_flag=$lt_cv_ld_reload_flag 316386dafe34Smrgcase $reload_flag in 316486dafe34Smrg"" | " "*) ;; 316586dafe34Smrg*) reload_flag=" $reload_flag" ;; 316686dafe34Smrgesac 316786dafe34Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 316886dafe34Smrgcase $host_os in 316963847c39Smrg cygwin* | mingw* | pw32* | cegcc*) 317063847c39Smrg if test "$GCC" != yes; then 317163847c39Smrg reload_cmds=false 317263847c39Smrg fi 317363847c39Smrg ;; 317486dafe34Smrg darwin*) 317586dafe34Smrg if test "$GCC" = yes; then 317686dafe34Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 317786dafe34Smrg else 317886dafe34Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 317986dafe34Smrg fi 318086dafe34Smrg ;; 318186dafe34Smrgesac 318263847c39Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 318363847c39Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 318463847c39Smrg])# _LT_CMD_RELOAD 318576888252Smrg 318676888252Smrg 318763847c39Smrg# _LT_CHECK_MAGIC_METHOD 318863847c39Smrg# ---------------------- 318986dafe34Smrg# how to check for library dependencies 319086dafe34Smrg# -- PORTME fill in with the dynamic library characteristics 319163847c39Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 319263847c39Smrg[m4_require([_LT_DECL_EGREP]) 319363847c39Smrgm4_require([_LT_DECL_OBJDUMP]) 319463847c39SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 319586dafe34Smrglt_cv_deplibs_check_method, 319686dafe34Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 319786dafe34Smrglt_cv_file_magic_test_file= 319886dafe34Smrglt_cv_deplibs_check_method='unknown' 319986dafe34Smrg# Need to set the preceding variable on all platforms that support 320086dafe34Smrg# interlibrary dependencies. 320186dafe34Smrg# 'none' -- dependencies not supported. 320286dafe34Smrg# `unknown' -- same as none, but documents that we really don't know. 320386dafe34Smrg# 'pass_all' -- all dependencies passed with no checks. 320486dafe34Smrg# 'test_compile' -- check by making test program. 320586dafe34Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 320686dafe34Smrg# which responds to the $file_magic_cmd with a given extended regex. 320786dafe34Smrg# If you have `file' or equivalent on your system and you're not sure 320886dafe34Smrg# whether `pass_all' will *always* work, you probably want this one. 320976888252Smrg 321086dafe34Smrgcase $host_os in 321186dafe34Smrgaix[[4-9]]*) 321286dafe34Smrg lt_cv_deplibs_check_method=pass_all 321386dafe34Smrg ;; 321476888252Smrg 321586dafe34Smrgbeos*) 321686dafe34Smrg lt_cv_deplibs_check_method=pass_all 321786dafe34Smrg ;; 321876888252Smrg 321986dafe34Smrgbsdi[[45]]*) 322086dafe34Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 322186dafe34Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 322286dafe34Smrg lt_cv_file_magic_test_file=/shlib/libc.so 322386dafe34Smrg ;; 322476888252Smrg 322586dafe34Smrgcygwin*) 322686dafe34Smrg # func_win32_libid is a shell function defined in ltmain.sh 322786dafe34Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 322886dafe34Smrg lt_cv_file_magic_cmd='func_win32_libid' 322986dafe34Smrg ;; 323076888252Smrg 323186dafe34Smrgmingw* | pw32*) 323286dafe34Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 323386dafe34Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 323486dafe34Smrg # unless we find 'file', for example because we are cross-compiling. 323563847c39Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 323663847c39Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 323786dafe34Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 323886dafe34Smrg lt_cv_file_magic_cmd='func_win32_libid' 32391ae1b5e8Smrg else 324063847c39Smrg # Keep this pattern in sync with the one in func_win32_libid. 324163847c39Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 324286dafe34Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 32431ae1b5e8Smrg fi 324486dafe34Smrg ;; 324576888252Smrg 324663847c39Smrgcegcc*) 324763847c39Smrg # use the weaker test based on 'objdump'. See mingw*. 324863847c39Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 324963847c39Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 325063847c39Smrg ;; 325163847c39Smrg 325286dafe34Smrgdarwin* | rhapsody*) 325386dafe34Smrg lt_cv_deplibs_check_method=pass_all 325486dafe34Smrg ;; 32551ae1b5e8Smrg 325686dafe34Smrgfreebsd* | dragonfly*) 325763847c39Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 325886dafe34Smrg case $host_cpu in 325986dafe34Smrg i*86 ) 326086dafe34Smrg # Not sure whether the presence of OpenBSD here was a mistake. 326186dafe34Smrg # Let's accept both of them until this is cleared up. 326286dafe34Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 326386dafe34Smrg lt_cv_file_magic_cmd=/usr/bin/file 326486dafe34Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 326586dafe34Smrg ;; 326686dafe34Smrg esac 326786dafe34Smrg else 326886dafe34Smrg lt_cv_deplibs_check_method=pass_all 326986dafe34Smrg fi 327086dafe34Smrg ;; 32711ae1b5e8Smrg 327286dafe34Smrggnu*) 327386dafe34Smrg lt_cv_deplibs_check_method=pass_all 327486dafe34Smrg ;; 327576888252Smrg 327663847c39Smrghaiku*) 327763847c39Smrg lt_cv_deplibs_check_method=pass_all 327863847c39Smrg ;; 327963847c39Smrg 328086dafe34Smrghpux10.20* | hpux11*) 328186dafe34Smrg lt_cv_file_magic_cmd=/usr/bin/file 328286dafe34Smrg case $host_cpu in 328386dafe34Smrg ia64*) 328486dafe34Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 328586dafe34Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 328686dafe34Smrg ;; 328786dafe34Smrg hppa*64*) 328863847c39Smrg [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]'] 328986dafe34Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 329086dafe34Smrg ;; 329186dafe34Smrg *) 329263847c39Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 329386dafe34Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 329476888252Smrg ;; 32951ae1b5e8Smrg esac 329686dafe34Smrg ;; 329776888252Smrg 329886dafe34Smrginterix[[3-9]]*) 329986dafe34Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 330086dafe34Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 330186dafe34Smrg ;; 330276888252Smrg 330386dafe34Smrgirix5* | irix6* | nonstopux*) 330486dafe34Smrg case $LD in 330586dafe34Smrg *-32|*"-32 ") libmagic=32-bit;; 330686dafe34Smrg *-n32|*"-n32 ") libmagic=N32;; 330786dafe34Smrg *-64|*"-64 ") libmagic=64-bit;; 330886dafe34Smrg *) libmagic=never-match;; 33091ae1b5e8Smrg esac 331086dafe34Smrg lt_cv_deplibs_check_method=pass_all 331186dafe34Smrg ;; 331276888252Smrg 331363847c39Smrg# This must be glibc/ELF. 331463847c39Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 331586dafe34Smrg lt_cv_deplibs_check_method=pass_all 331686dafe34Smrg ;; 331776888252Smrg 331863847c39Smrgnetbsd* | netbsdelf*-gnu) 331963847c39Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 332086dafe34Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 332186dafe34Smrg else 332286dafe34Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 332386dafe34Smrg fi 332486dafe34Smrg ;; 332576888252Smrg 332686dafe34Smrgnewos6*) 332786dafe34Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 332886dafe34Smrg lt_cv_file_magic_cmd=/usr/bin/file 332986dafe34Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 333086dafe34Smrg ;; 333186dafe34Smrg 333263847c39Smrg*nto* | *qnx*) 333363847c39Smrg lt_cv_deplibs_check_method=pass_all 333486dafe34Smrg ;; 333586dafe34Smrg 333686dafe34Smrgopenbsd*) 333763847c39Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 333886dafe34Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 333986dafe34Smrg else 334086dafe34Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 334186dafe34Smrg fi 334286dafe34Smrg ;; 334386dafe34Smrg 334486dafe34Smrgosf3* | osf4* | osf5*) 334586dafe34Smrg lt_cv_deplibs_check_method=pass_all 334686dafe34Smrg ;; 334786dafe34Smrg 334886dafe34Smrgrdos*) 334986dafe34Smrg lt_cv_deplibs_check_method=pass_all 335086dafe34Smrg ;; 335186dafe34Smrg 335286dafe34Smrgsolaris*) 335386dafe34Smrg lt_cv_deplibs_check_method=pass_all 335486dafe34Smrg ;; 335586dafe34Smrg 335663847c39Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 335763847c39Smrg lt_cv_deplibs_check_method=pass_all 335863847c39Smrg ;; 335963847c39Smrg 336086dafe34Smrgsysv4 | sysv4.3*) 336186dafe34Smrg case $host_vendor in 336286dafe34Smrg motorola) 336386dafe34Smrg 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]]' 336486dafe34Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 336586dafe34Smrg ;; 336686dafe34Smrg ncr) 336786dafe34Smrg lt_cv_deplibs_check_method=pass_all 336886dafe34Smrg ;; 336986dafe34Smrg sequent) 337086dafe34Smrg lt_cv_file_magic_cmd='/bin/file' 337186dafe34Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 337286dafe34Smrg ;; 337386dafe34Smrg sni) 337486dafe34Smrg lt_cv_file_magic_cmd='/bin/file' 337586dafe34Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 337686dafe34Smrg lt_cv_file_magic_test_file=/lib/libc.so 337786dafe34Smrg ;; 337886dafe34Smrg siemens) 337986dafe34Smrg lt_cv_deplibs_check_method=pass_all 338086dafe34Smrg ;; 338186dafe34Smrg pc) 338286dafe34Smrg lt_cv_deplibs_check_method=pass_all 338386dafe34Smrg ;; 338486dafe34Smrg esac 338586dafe34Smrg ;; 338686dafe34Smrg 338763847c39Smrgtpf*) 338886dafe34Smrg lt_cv_deplibs_check_method=pass_all 338986dafe34Smrg ;; 339086dafe34Smrgesac 33911ae1b5e8Smrg]) 339263847c39Smrg 339363847c39Smrgfile_magic_glob= 339463847c39Smrgwant_nocaseglob=no 339563847c39Smrgif test "$build" = "$host"; then 339663847c39Smrg case $host_os in 339763847c39Smrg mingw* | pw32*) 339863847c39Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 339963847c39Smrg want_nocaseglob=yes 340063847c39Smrg else 340163847c39Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 340263847c39Smrg fi 340363847c39Smrg ;; 340463847c39Smrg esac 340563847c39Smrgfi 340663847c39Smrg 340786dafe34Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 340886dafe34Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 340986dafe34Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 341063847c39Smrg 341163847c39Smrg_LT_DECL([], [deplibs_check_method], [1], 341263847c39Smrg [Method to check whether dependent libraries are shared objects]) 341363847c39Smrg_LT_DECL([], [file_magic_cmd], [1], 341463847c39Smrg [Command to use when deplibs_check_method = "file_magic"]) 341563847c39Smrg_LT_DECL([], [file_magic_glob], [1], 341663847c39Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 341763847c39Smrg_LT_DECL([], [want_nocaseglob], [1], 341863847c39Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 341963847c39Smrg])# _LT_CHECK_MAGIC_METHOD 342076888252Smrg 342176888252Smrg 342263847c39Smrg# LT_PATH_NM 342386dafe34Smrg# ---------- 342463847c39Smrg# find the pathname to a BSD- or MS-compatible name lister 342563847c39SmrgAC_DEFUN([LT_PATH_NM], 342663847c39Smrg[AC_REQUIRE([AC_PROG_CC])dnl 342763847c39SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 342886dafe34Smrg[if test -n "$NM"; then 342986dafe34Smrg # Let the user override the test. 343086dafe34Smrg lt_cv_path_NM="$NM" 343186dafe34Smrgelse 343286dafe34Smrg lt_nm_to_check="${ac_tool_prefix}nm" 343386dafe34Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 343486dafe34Smrg lt_nm_to_check="$lt_nm_to_check nm" 34351ae1b5e8Smrg fi 343686dafe34Smrg for lt_tmp_nm in $lt_nm_to_check; do 343786dafe34Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 343886dafe34Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 343986dafe34Smrg IFS="$lt_save_ifs" 344086dafe34Smrg test -z "$ac_dir" && ac_dir=. 344186dafe34Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 344286dafe34Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 344386dafe34Smrg # Check to see if the nm accepts a BSD-compat flag. 344486dafe34Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 344586dafe34Smrg # nm: unknown option "B" ignored 344686dafe34Smrg # Tru64's nm complains that /dev/null is an invalid object file 344786dafe34Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 344886dafe34Smrg */dev/null* | *'Invalid file or object type'*) 344986dafe34Smrg lt_cv_path_NM="$tmp_nm -B" 345086dafe34Smrg break 345186dafe34Smrg ;; 345286dafe34Smrg *) 345386dafe34Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 345486dafe34Smrg */dev/null*) 345586dafe34Smrg lt_cv_path_NM="$tmp_nm -p" 345686dafe34Smrg break 345786dafe34Smrg ;; 345886dafe34Smrg *) 345986dafe34Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 346086dafe34Smrg continue # so that we can try to find one that supports BSD flags 346186dafe34Smrg ;; 346286dafe34Smrg esac 346386dafe34Smrg ;; 346486dafe34Smrg esac 346586dafe34Smrg fi 346686dafe34Smrg done 346786dafe34Smrg IFS="$lt_save_ifs" 346886dafe34Smrg done 346963847c39Smrg : ${lt_cv_path_NM=no} 347086dafe34Smrgfi]) 347163847c39Smrgif test "$lt_cv_path_NM" != "no"; then 347263847c39Smrg NM="$lt_cv_path_NM" 347363847c39Smrgelse 347463847c39Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 347563847c39Smrg if test -n "$DUMPBIN"; then : 347663847c39Smrg # Let the user override the test. 347763847c39Smrg else 347863847c39Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 347963847c39Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 348063847c39Smrg *COFF*) 348163847c39Smrg DUMPBIN="$DUMPBIN -symbols" 348263847c39Smrg ;; 348363847c39Smrg *) 348463847c39Smrg DUMPBIN=: 348563847c39Smrg ;; 348663847c39Smrg esac 348763847c39Smrg fi 348863847c39Smrg AC_SUBST([DUMPBIN]) 348963847c39Smrg if test "$DUMPBIN" != ":"; then 349063847c39Smrg NM="$DUMPBIN" 349163847c39Smrg fi 349263847c39Smrgfi 349363847c39Smrgtest -z "$NM" && NM=nm 349463847c39SmrgAC_SUBST([NM]) 349563847c39Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 349663847c39Smrg 349763847c39SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 349863847c39Smrg [lt_cv_nm_interface="BSD nm" 349963847c39Smrg echo "int some_variable = 0;" > conftest.$ac_ext 350063847c39Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 350163847c39Smrg (eval "$ac_compile" 2>conftest.err) 350263847c39Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 350363847c39Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 350463847c39Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 350563847c39Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 350663847c39Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 350763847c39Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 350863847c39Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 350963847c39Smrg lt_cv_nm_interface="MS dumpbin" 351063847c39Smrg fi 351163847c39Smrg rm -f conftest*]) 351263847c39Smrg])# LT_PATH_NM 351363847c39Smrg 351463847c39Smrg# Old names: 351563847c39SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 351663847c39SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 351763847c39Smrgdnl aclocal-1.4 backwards compatibility: 351863847c39Smrgdnl AC_DEFUN([AM_PROG_NM], []) 351963847c39Smrgdnl AC_DEFUN([AC_PROG_NM], []) 352063847c39Smrg 352163847c39Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 352263847c39Smrg# -------------------------------- 352363847c39Smrg# how to determine the name of the shared library 352463847c39Smrg# associated with a specific link library. 352563847c39Smrg# -- PORTME fill in with the dynamic library characteristics 352663847c39Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 352763847c39Smrg[m4_require([_LT_DECL_EGREP]) 352863847c39Smrgm4_require([_LT_DECL_OBJDUMP]) 352963847c39Smrgm4_require([_LT_DECL_DLLTOOL]) 353063847c39SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 353163847c39Smrglt_cv_sharedlib_from_linklib_cmd, 353263847c39Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 353363847c39Smrg 353463847c39Smrgcase $host_os in 353563847c39Smrgcygwin* | mingw* | pw32* | cegcc*) 353663847c39Smrg # two different shell functions defined in ltmain.sh 353763847c39Smrg # decide which to use based on capabilities of $DLLTOOL 353863847c39Smrg case `$DLLTOOL --help 2>&1` in 353963847c39Smrg *--identify-strict*) 354063847c39Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 354163847c39Smrg ;; 354263847c39Smrg *) 354363847c39Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 354463847c39Smrg ;; 354563847c39Smrg esac 354663847c39Smrg ;; 354763847c39Smrg*) 354863847c39Smrg # fallback: assume linklib IS sharedlib 354963847c39Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 355063847c39Smrg ;; 355163847c39Smrgesac 355263847c39Smrg]) 355363847c39Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 355463847c39Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 355576888252Smrg 355663847c39Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 355763847c39Smrg [Command to associate shared and link libraries]) 355863847c39Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 355976888252Smrg 356063847c39Smrg 356163847c39Smrg# _LT_PATH_MANIFEST_TOOL 356263847c39Smrg# ---------------------- 356363847c39Smrg# locate the manifest tool 356463847c39Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 356563847c39Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 356663847c39Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 356763847c39SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 356863847c39Smrg [lt_cv_path_mainfest_tool=no 356963847c39Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 357063847c39Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 357163847c39Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 357263847c39Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 357363847c39Smrg lt_cv_path_mainfest_tool=yes 357463847c39Smrg fi 357563847c39Smrg rm -f conftest*]) 357663847c39Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 357763847c39Smrg MANIFEST_TOOL=: 357863847c39Smrgfi 357963847c39Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 358063847c39Smrg])# _LT_PATH_MANIFEST_TOOL 358163847c39Smrg 358263847c39Smrg 358363847c39Smrg# LT_LIB_M 358463847c39Smrg# -------- 358586dafe34Smrg# check for math library 358663847c39SmrgAC_DEFUN([LT_LIB_M], 358786dafe34Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 358886dafe34SmrgLIBM= 358986dafe34Smrgcase $host in 359063847c39Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 359186dafe34Smrg # These system don't have libm, or don't need it 359286dafe34Smrg ;; 359386dafe34Smrg*-ncr-sysv4.3*) 359486dafe34Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 359586dafe34Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 359686dafe34Smrg ;; 359786dafe34Smrg*) 359886dafe34Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 359986dafe34Smrg ;; 360086dafe34Smrgesac 360163847c39SmrgAC_SUBST([LIBM]) 360263847c39Smrg])# LT_LIB_M 360376888252Smrg 360463847c39Smrg# Old name: 360563847c39SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 360663847c39Smrgdnl aclocal-1.4 backwards compatibility: 360763847c39Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 360886dafe34Smrg 360986dafe34Smrg 361063847c39Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 361163847c39Smrg# ------------------------------- 361263847c39Smrgm4_defun([_LT_COMPILER_NO_RTTI], 361363847c39Smrg[m4_require([_LT_TAG_COMPILER])dnl 36141ae1b5e8Smrg 361563847c39Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 36161ae1b5e8Smrg 361763847c39Smrgif test "$GCC" = yes; then 361863847c39Smrg case $cc_basename in 361963847c39Smrg nvcc*) 362063847c39Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 362163847c39Smrg *) 362263847c39Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 362363847c39Smrg esac 362476888252Smrg 362563847c39Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 362663847c39Smrg lt_cv_prog_compiler_rtti_exceptions, 362763847c39Smrg [-fno-rtti -fno-exceptions], [], 362863847c39Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3629d8556812Smrgfi 363063847c39Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 363163847c39Smrg [Compiler flag to turn off builtin functions]) 363263847c39Smrg])# _LT_COMPILER_NO_RTTI 3633d8556812Smrg 3634d8556812Smrg 363563847c39Smrg# _LT_CMD_GLOBAL_SYMBOLS 363663847c39Smrg# ---------------------- 363763847c39Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 363863847c39Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 363963847c39SmrgAC_REQUIRE([AC_PROG_CC])dnl 364063847c39SmrgAC_REQUIRE([AC_PROG_AWK])dnl 364163847c39SmrgAC_REQUIRE([LT_PATH_NM])dnl 364263847c39SmrgAC_REQUIRE([LT_PATH_LD])dnl 364363847c39Smrgm4_require([_LT_DECL_SED])dnl 364463847c39Smrgm4_require([_LT_DECL_EGREP])dnl 364563847c39Smrgm4_require([_LT_TAG_COMPILER])dnl 3646d8556812Smrg 364763847c39Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 364863847c39SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 364963847c39SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 365063847c39Smrg[ 365163847c39Smrg# These are sane defaults that work on at least a few old systems. 365263847c39Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3653d8556812Smrg 365463847c39Smrg# Character class describing NM global symbol codes. 365563847c39Smrgsymcode='[[BCDEGRST]]' 3656d8556812Smrg 365763847c39Smrg# Regexp to match symbols that can be accessed directly from C. 365863847c39Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3659d8556812Smrg 366063847c39Smrg# Define system-specific variables. 3661d8556812Smrgcase $host_os in 366263847c39Smrgaix*) 366363847c39Smrg symcode='[[BCDT]]' 3664d8556812Smrg ;; 366563847c39Smrgcygwin* | mingw* | pw32* | cegcc*) 366663847c39Smrg symcode='[[ABCDGISTW]]' 366763847c39Smrg ;; 366863847c39Smrghpux*) 366963847c39Smrg if test "$host_cpu" = ia64; then 367063847c39Smrg symcode='[[ABCDEGRST]]' 3671d8556812Smrg fi 367263847c39Smrg ;; 367363847c39Smrgirix* | nonstopux*) 367463847c39Smrg symcode='[[BCDEGRST]]' 367563847c39Smrg ;; 367663847c39Smrgosf*) 367763847c39Smrg symcode='[[BCDEGQRST]]' 367863847c39Smrg ;; 367963847c39Smrgsolaris*) 368063847c39Smrg symcode='[[BDRT]]' 368163847c39Smrg ;; 368263847c39Smrgsco3.2v5*) 368363847c39Smrg symcode='[[DT]]' 368463847c39Smrg ;; 368563847c39Smrgsysv4.2uw2*) 368663847c39Smrg symcode='[[DT]]' 368763847c39Smrg ;; 368863847c39Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 368963847c39Smrg symcode='[[ABDT]]' 369063847c39Smrg ;; 369163847c39Smrgsysv4) 369263847c39Smrg symcode='[[DFNSTU]]' 369363847c39Smrg ;; 3694d8556812Smrgesac 3695d8556812Smrg 369663847c39Smrg# If we're using GNU nm, then use its standard symbol codes. 369763847c39Smrgcase `$NM -V 2>&1` in 369863847c39Smrg*GNU* | *'with BFD'*) 369963847c39Smrg symcode='[[ABCDGIRSTW]]' ;; 370063847c39Smrgesac 3701d8556812Smrg 370263847c39Smrg# Transform an extracted symbol line into a proper C declaration. 370363847c39Smrg# Some systems (esp. on ia64) link data and code symbols differently, 370463847c39Smrg# so use this general approach. 370563847c39Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3706d8556812Smrg 370763847c39Smrg# Transform an extracted symbol line into symbol name and symbol address 370863847c39Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 370963847c39Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" 3710d8556812Smrg 371163847c39Smrg# Handle CRLF in mingw tool chain 371263847c39Smrgopt_cr= 371363847c39Smrgcase $build_os in 371463847c39Smrgmingw*) 371563847c39Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 371663847c39Smrg ;; 371763847c39Smrgesac 3718d8556812Smrg 371963847c39Smrg# Try without a prefix underscore, then with it. 372063847c39Smrgfor ac_symprfx in "" "_"; do 3721d8556812Smrg 372263847c39Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 372363847c39Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 3724d8556812Smrg 372563847c39Smrg # Write the raw and C identifiers. 372663847c39Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 372763847c39Smrg # Fake it for dumpbin and say T for any non-static function 372863847c39Smrg # and D for any global variable. 372963847c39Smrg # Also find C++ and __fastcall symbols from MSVC++, 373063847c39Smrg # which start with @ or ?. 373163847c39Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 373263847c39Smrg" {last_section=section; section=\$ 3};"\ 373363847c39Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 373463847c39Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 373563847c39Smrg" \$ 0!~/External *\|/{next};"\ 373663847c39Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 373763847c39Smrg" {if(hide[section]) next};"\ 373863847c39Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 373963847c39Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 374063847c39Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 374163847c39Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 374263847c39Smrg" ' prfx=^$ac_symprfx]" 374386dafe34Smrg else 374463847c39Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 37451ae1b5e8Smrg fi 374663847c39Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 374776888252Smrg 374863847c39Smrg # Check to see that the pipe works correctly. 374963847c39Smrg pipe_works=no 3750d8556812Smrg 375163847c39Smrg rm -f conftest* 375263847c39Smrg cat > conftest.$ac_ext <<_LT_EOF 375363847c39Smrg#ifdef __cplusplus 375463847c39Smrgextern "C" { 375563847c39Smrg#endif 375663847c39Smrgchar nm_test_var; 375763847c39Smrgvoid nm_test_func(void); 375863847c39Smrgvoid nm_test_func(void){} 375963847c39Smrg#ifdef __cplusplus 376063847c39Smrg} 376163847c39Smrg#endif 376263847c39Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 376363847c39Smrg_LT_EOF 376476888252Smrg 376563847c39Smrg if AC_TRY_EVAL(ac_compile); then 376663847c39Smrg # Now try to grab the symbols. 376763847c39Smrg nlist=conftest.nm 376863847c39Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 376963847c39Smrg # Try sorting and uniquifying the output. 377063847c39Smrg if sort "$nlist" | uniq > "$nlist"T; then 377163847c39Smrg mv -f "$nlist"T "$nlist" 377263847c39Smrg else 377363847c39Smrg rm -f "$nlist"T 377463847c39Smrg fi 377563847c39Smrg 377663847c39Smrg # Make sure that we snagged all the symbols we need. 377763847c39Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 377863847c39Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 377963847c39Smrg cat <<_LT_EOF > conftest.$ac_ext 378063847c39Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 378163847c39Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 378263847c39Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 378363847c39Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 378463847c39Smrg# define LT@&t@_DLSYM_CONST 378563847c39Smrg#elif defined(__osf__) 378663847c39Smrg/* This system does not cope well with relocations in const data. */ 378763847c39Smrg# define LT@&t@_DLSYM_CONST 378863847c39Smrg#else 378963847c39Smrg# define LT@&t@_DLSYM_CONST const 379063847c39Smrg#endif 379176888252Smrg 379263847c39Smrg#ifdef __cplusplus 379363847c39Smrgextern "C" { 379463847c39Smrg#endif 379576888252Smrg 379663847c39Smrg_LT_EOF 379763847c39Smrg # Now generate the symbol file. 379863847c39Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 379976888252Smrg 380063847c39Smrg cat <<_LT_EOF >> conftest.$ac_ext 380176888252Smrg 380263847c39Smrg/* The mapping between symbol names and symbols. */ 380363847c39SmrgLT@&t@_DLSYM_CONST struct { 380463847c39Smrg const char *name; 380563847c39Smrg void *address; 380663847c39Smrg} 380763847c39Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 380863847c39Smrg{ 380963847c39Smrg { "@PROGRAM@", (void *) 0 }, 381063847c39Smrg_LT_EOF 381163847c39Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 381263847c39Smrg cat <<\_LT_EOF >> conftest.$ac_ext 381363847c39Smrg {0, (void *) 0} 381463847c39Smrg}; 381563847c39Smrg 381663847c39Smrg/* This works around a problem in FreeBSD linker */ 381763847c39Smrg#ifdef FREEBSD_WORKAROUND 381863847c39Smrgstatic const void *lt_preloaded_setup() { 381963847c39Smrg return lt__PROGRAM__LTX_preloaded_symbols; 382063847c39Smrg} 382163847c39Smrg#endif 382263847c39Smrg 382363847c39Smrg#ifdef __cplusplus 382463847c39Smrg} 382563847c39Smrg#endif 382663847c39Smrg_LT_EOF 382763847c39Smrg # Now try linking the two files. 382863847c39Smrg mv conftest.$ac_objext conftstm.$ac_objext 382963847c39Smrg lt_globsym_save_LIBS=$LIBS 383063847c39Smrg lt_globsym_save_CFLAGS=$CFLAGS 383163847c39Smrg LIBS="conftstm.$ac_objext" 383263847c39Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 383363847c39Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 383463847c39Smrg pipe_works=yes 383563847c39Smrg fi 383663847c39Smrg LIBS=$lt_globsym_save_LIBS 383763847c39Smrg CFLAGS=$lt_globsym_save_CFLAGS 3838d8556812Smrg else 383963847c39Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3840d8556812Smrg fi 3841d8556812Smrg else 384263847c39Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3843d8556812Smrg fi 384463847c39Smrg else 384563847c39Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3846d8556812Smrg fi 384763847c39Smrg else 384863847c39Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 384963847c39Smrg cat conftest.$ac_ext >&5 385063847c39Smrg fi 385163847c39Smrg rm -rf conftest* conftst* 3852d8556812Smrg 385363847c39Smrg # Do not use the global_symbol_pipe unless it works. 385463847c39Smrg if test "$pipe_works" = yes; then 385563847c39Smrg break 385663847c39Smrg else 385763847c39Smrg lt_cv_sys_global_symbol_pipe= 385863847c39Smrg fi 385963847c39Smrgdone 386063847c39Smrg]) 386163847c39Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 386263847c39Smrg lt_cv_sys_global_symbol_to_cdecl= 386363847c39Smrgfi 386463847c39Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 386563847c39Smrg AC_MSG_RESULT(failed) 386663847c39Smrgelse 386763847c39Smrg AC_MSG_RESULT(ok) 386863847c39Smrgfi 3869d8556812Smrg 387063847c39Smrg# Response file support. 387163847c39Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 387263847c39Smrg nm_file_list_spec='@' 387363847c39Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 387463847c39Smrg nm_file_list_spec='@' 387563847c39Smrgfi 3876d8556812Smrg 387763847c39Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 387863847c39Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 387963847c39Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 388063847c39Smrg [Transform the output of nm in a proper C declaration]) 388163847c39Smrg_LT_DECL([global_symbol_to_c_name_address], 388263847c39Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 388363847c39Smrg [Transform the output of nm in a C name address pair]) 388463847c39Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 388563847c39Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 388663847c39Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 388763847c39Smrg_LT_DECL([], [nm_file_list_spec], [1], 388863847c39Smrg [Specify filename containing input files for $NM]) 388963847c39Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 389063847c39Smrg 389163847c39Smrg 389263847c39Smrg# _LT_COMPILER_PIC([TAGNAME]) 389363847c39Smrg# --------------------------- 389463847c39Smrgm4_defun([_LT_COMPILER_PIC], 389563847c39Smrg[m4_require([_LT_TAG_COMPILER])dnl 389663847c39Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 389763847c39Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 389863847c39Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3899d8556812Smrg 390063847c39Smrgm4_if([$1], [CXX], [ 390163847c39Smrg # C++ specific cases for pic, static, wl, etc. 390263847c39Smrg if test "$GXX" = yes; then 390363847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 390463847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 390563847c39Smrg 390663847c39Smrg case $host_os in 390763847c39Smrg aix*) 390863847c39Smrg # All AIX code is PIC. 390963847c39Smrg if test "$host_cpu" = ia64; then 391063847c39Smrg # AIX 5 now supports IA64 processor 391163847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3912d8556812Smrg fi 391363847c39Smrg ;; 3914d8556812Smrg 391563847c39Smrg amigaos*) 391663847c39Smrg case $host_cpu in 391763847c39Smrg powerpc) 391863847c39Smrg # see comment about AmigaOS4 .so support 391963847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 392063847c39Smrg ;; 392163847c39Smrg m68k) 392263847c39Smrg # FIXME: we need at least 68020 code to build shared libraries, but 392363847c39Smrg # adding the `-m68020' flag to GCC prevents building anything better, 392463847c39Smrg # like `-m68040'. 392563847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 392663847c39Smrg ;; 392763847c39Smrg esac 392863847c39Smrg ;; 3929d8556812Smrg 393063847c39Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 393163847c39Smrg # PIC is the default for these OSes. 3932d8556812Smrg ;; 393363847c39Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 393463847c39Smrg # This hack is so that the source file can tell whether it is being 393563847c39Smrg # built for inclusion in a dll (and should export symbols for example). 393663847c39Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 393763847c39Smrg # (--disable-auto-import) libraries 393863847c39Smrg m4_if([$1], [GCJ], [], 393963847c39Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3940d8556812Smrg ;; 394163847c39Smrg darwin* | rhapsody*) 394263847c39Smrg # PIC is the default on this platform 394363847c39Smrg # Common symbols not allowed in MH_DYLIB files 394463847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 394563847c39Smrg ;; 394663847c39Smrg *djgpp*) 394763847c39Smrg # DJGPP does not support shared libraries at all 394863847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 394963847c39Smrg ;; 395063847c39Smrg haiku*) 395163847c39Smrg # PIC is the default for Haiku. 395263847c39Smrg # The "-static" flag exists, but is broken. 395363847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 395463847c39Smrg ;; 395563847c39Smrg interix[[3-9]]*) 395663847c39Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 395763847c39Smrg # Instead, we relocate shared libraries at runtime. 395863847c39Smrg ;; 395963847c39Smrg sysv4*MP*) 396063847c39Smrg if test -d /usr/nec; then 396163847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 396286dafe34Smrg fi 396386dafe34Smrg ;; 396463847c39Smrg hpux*) 396563847c39Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 396663847c39Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 396763847c39Smrg # sets the default TLS model and affects inlining. 396886dafe34Smrg case $host_cpu in 396963847c39Smrg hppa*64*) 397063847c39Smrg ;; 3971d8556812Smrg *) 397263847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 397363847c39Smrg ;; 397486dafe34Smrg esac 397563847c39Smrg ;; 397663847c39Smrg *qnx* | *nto*) 397763847c39Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 397863847c39Smrg # it will coredump. 397963847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3980d8556812Smrg ;; 3981d8556812Smrg *) 398263847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 398386dafe34Smrg ;; 3984d8556812Smrg esac 398563847c39Smrg else 398663847c39Smrg case $host_os in 398763847c39Smrg aix[[4-9]]*) 398863847c39Smrg # All AIX code is PIC. 398963847c39Smrg if test "$host_cpu" = ia64; then 399063847c39Smrg # AIX 5 now supports IA64 processor 399163847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3992d8556812Smrg else 399363847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3994d8556812Smrg fi 399586dafe34Smrg ;; 399663847c39Smrg chorus*) 399763847c39Smrg case $cc_basename in 399863847c39Smrg cxch68*) 399963847c39Smrg # Green Hills C++ Compiler 400063847c39Smrg # _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" 400163847c39Smrg ;; 400263847c39Smrg esac 400386dafe34Smrg ;; 400463847c39Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 400563847c39Smrg # This hack is so that the source file can tell whether it is being 400663847c39Smrg # built for inclusion in a dll (and should export symbols for example). 400763847c39Smrg m4_if([$1], [GCJ], [], 400863847c39Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 400986dafe34Smrg ;; 401063847c39Smrg dgux*) 401163847c39Smrg case $cc_basename in 401263847c39Smrg ec++*) 401363847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 401463847c39Smrg ;; 401563847c39Smrg ghcx*) 401663847c39Smrg # Green Hills C++ Compiler 401763847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 401863847c39Smrg ;; 401963847c39Smrg *) 402063847c39Smrg ;; 402163847c39Smrg esac 4022d8556812Smrg ;; 402363847c39Smrg freebsd* | dragonfly*) 402463847c39Smrg # FreeBSD uses GNU C++ 4025d8556812Smrg ;; 402663847c39Smrg hpux9* | hpux10* | hpux11*) 402763847c39Smrg case $cc_basename in 402863847c39Smrg CC*) 402963847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 403063847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 403163847c39Smrg if test "$host_cpu" != ia64; then 403263847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 403363847c39Smrg fi 403463847c39Smrg ;; 403563847c39Smrg aCC*) 403663847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 403763847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 403863847c39Smrg case $host_cpu in 403963847c39Smrg hppa*64*|ia64*) 404063847c39Smrg # +Z the default 404163847c39Smrg ;; 404263847c39Smrg *) 404363847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 404463847c39Smrg ;; 404563847c39Smrg esac 404663847c39Smrg ;; 404763847c39Smrg *) 404863847c39Smrg ;; 404963847c39Smrg esac 4050d8556812Smrg ;; 405163847c39Smrg interix*) 405263847c39Smrg # This is c89, which is MS Visual C++ (no shared libs) 405363847c39Smrg # Anyone wants to do a port? 4054d8556812Smrg ;; 405563847c39Smrg irix5* | irix6* | nonstopux*) 405663847c39Smrg case $cc_basename in 405763847c39Smrg CC*) 405863847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 405963847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 406063847c39Smrg # CC pic flag -KPIC is the default. 406163847c39Smrg ;; 406286dafe34Smrg *) 406386dafe34Smrg ;; 406486dafe34Smrg esac 406586dafe34Smrg ;; 406663847c39Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 406763847c39Smrg case $cc_basename in 406863847c39Smrg KCC*) 406963847c39Smrg # KAI C++ Compiler 407063847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 407163847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 407263847c39Smrg ;; 407363847c39Smrg ecpc* ) 407463847c39Smrg # old Intel C++ for x86_64 which still supported -KPIC. 407563847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 407663847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 407763847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 407863847c39Smrg ;; 407963847c39Smrg icpc* ) 408063847c39Smrg # Intel C++, used to be incompatible with GCC. 408163847c39Smrg # ICC 10 doesn't accept -KPIC any more. 408263847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 408363847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 408463847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 408563847c39Smrg ;; 408663847c39Smrg pgCC* | pgcpp*) 408763847c39Smrg # Portland Group C++ compiler 408863847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 408963847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 409063847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 409163847c39Smrg ;; 409263847c39Smrg cxx*) 409363847c39Smrg # Compaq C++ 409463847c39Smrg # Make sure the PIC flag is empty. It appears that all Alpha 409563847c39Smrg # Linux and Compaq Tru64 Unix objects are PIC. 409663847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 409763847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 409863847c39Smrg ;; 409963847c39Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 410063847c39Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 410163847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 410263847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 410363847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 410463847c39Smrg ;; 4105d8556812Smrg *) 410663847c39Smrg case `$CC -V 2>&1 | sed 5q` in 410763847c39Smrg *Sun\ C*) 410863847c39Smrg # Sun C++ 5.9 410963847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 411063847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 411163847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 411263847c39Smrg ;; 411363847c39Smrg esac 4114d8556812Smrg ;; 411563847c39Smrg esac 4116d8556812Smrg ;; 411763847c39Smrg lynxos*) 411886dafe34Smrg ;; 411963847c39Smrg m88k*) 412086dafe34Smrg ;; 412163847c39Smrg mvs*) 412263847c39Smrg case $cc_basename in 412363847c39Smrg cxx*) 412463847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 412563847c39Smrg ;; 412663847c39Smrg *) 412763847c39Smrg ;; 412863847c39Smrg esac 412986dafe34Smrg ;; 413063847c39Smrg netbsd* | netbsdelf*-gnu) 413186dafe34Smrg ;; 413263847c39Smrg *qnx* | *nto*) 413363847c39Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 413463847c39Smrg # it will coredump. 413563847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 413663847c39Smrg ;; 413763847c39Smrg osf3* | osf4* | osf5*) 413863847c39Smrg case $cc_basename in 413963847c39Smrg KCC*) 414063847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 414163847c39Smrg ;; 414263847c39Smrg RCC*) 414363847c39Smrg # Rational C++ 2.4.1 414463847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 414563847c39Smrg ;; 414663847c39Smrg cxx*) 414763847c39Smrg # Digital/Compaq C++ 414863847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 414963847c39Smrg # Make sure the PIC flag is empty. It appears that all Alpha 415063847c39Smrg # Linux and Compaq Tru64 Unix objects are PIC. 415163847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 415263847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 415363847c39Smrg ;; 415463847c39Smrg *) 415563847c39Smrg ;; 415663847c39Smrg esac 415786dafe34Smrg ;; 415863847c39Smrg psos*) 415963847c39Smrg ;; 416063847c39Smrg solaris*) 416163847c39Smrg case $cc_basename in 416263847c39Smrg CC* | sunCC*) 416363847c39Smrg # Sun C++ 4.2, 5.x and Centerline C++ 416463847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 416563847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 416663847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 416763847c39Smrg ;; 416863847c39Smrg gcx*) 416963847c39Smrg # Green Hills C++ Compiler 417063847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 417163847c39Smrg ;; 417263847c39Smrg *) 417363847c39Smrg ;; 417463847c39Smrg esac 417563847c39Smrg ;; 417663847c39Smrg sunos4*) 417763847c39Smrg case $cc_basename in 417863847c39Smrg CC*) 417963847c39Smrg # Sun C++ 4.x 418063847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 418163847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 418263847c39Smrg ;; 418363847c39Smrg lcc*) 418463847c39Smrg # Lucid 418563847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 418663847c39Smrg ;; 418763847c39Smrg *) 418863847c39Smrg ;; 418963847c39Smrg esac 419063847c39Smrg ;; 419163847c39Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 419263847c39Smrg case $cc_basename in 419363847c39Smrg CC*) 419463847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 419563847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 419663847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 419763847c39Smrg ;; 419863847c39Smrg esac 419963847c39Smrg ;; 420063847c39Smrg tandem*) 420163847c39Smrg case $cc_basename in 420263847c39Smrg NCC*) 420363847c39Smrg # NonStop-UX NCC 3.20 420463847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 420563847c39Smrg ;; 420663847c39Smrg *) 420763847c39Smrg ;; 420863847c39Smrg esac 420963847c39Smrg ;; 421063847c39Smrg vxworks*) 421163847c39Smrg ;; 421263847c39Smrg *) 421363847c39Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 421486dafe34Smrg ;; 4215d8556812Smrg esac 421663847c39Smrg fi 421763847c39Smrg], 421863847c39Smrg[ 421963847c39Smrg if test "$GCC" = yes; then 422063847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 422163847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4222d8556812Smrg 422363847c39Smrg case $host_os in 422463847c39Smrg aix*) 422563847c39Smrg # All AIX code is PIC. 422663847c39Smrg if test "$host_cpu" = ia64; then 422763847c39Smrg # AIX 5 now supports IA64 processor 422863847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 422963847c39Smrg fi 4230d8556812Smrg ;; 423176888252Smrg 423263847c39Smrg amigaos*) 423363847c39Smrg case $host_cpu in 423463847c39Smrg powerpc) 423563847c39Smrg # see comment about AmigaOS4 .so support 423663847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 423763847c39Smrg ;; 423863847c39Smrg m68k) 423963847c39Smrg # FIXME: we need at least 68020 code to build shared libraries, but 424063847c39Smrg # adding the `-m68020' flag to GCC prevents building anything better, 424163847c39Smrg # like `-m68040'. 424263847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 424363847c39Smrg ;; 424463847c39Smrg esac 4245d8556812Smrg ;; 424676888252Smrg 424763847c39Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 424863847c39Smrg # PIC is the default for these OSes. 424963847c39Smrg ;; 425076888252Smrg 425163847c39Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 425263847c39Smrg # This hack is so that the source file can tell whether it is being 425363847c39Smrg # built for inclusion in a dll (and should export symbols for example). 425463847c39Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 425563847c39Smrg # (--disable-auto-import) libraries 425663847c39Smrg m4_if([$1], [GCJ], [], 425763847c39Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 425863847c39Smrg ;; 425976888252Smrg 426063847c39Smrg darwin* | rhapsody*) 426163847c39Smrg # PIC is the default on this platform 426263847c39Smrg # Common symbols not allowed in MH_DYLIB files 426363847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 426463847c39Smrg ;; 426576888252Smrg 426663847c39Smrg haiku*) 426763847c39Smrg # PIC is the default for Haiku. 426863847c39Smrg # The "-static" flag exists, but is broken. 426963847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 427063847c39Smrg ;; 427176888252Smrg 427263847c39Smrg hpux*) 427363847c39Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 427463847c39Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 427563847c39Smrg # sets the default TLS model and affects inlining. 427663847c39Smrg case $host_cpu in 427763847c39Smrg hppa*64*) 427863847c39Smrg # +Z the default 427963847c39Smrg ;; 428063847c39Smrg *) 428163847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 428263847c39Smrg ;; 428363847c39Smrg esac 428463847c39Smrg ;; 428576888252Smrg 428663847c39Smrg interix[[3-9]]*) 428763847c39Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 428863847c39Smrg # Instead, we relocate shared libraries at runtime. 428963847c39Smrg ;; 429076888252Smrg 429163847c39Smrg msdosdjgpp*) 429263847c39Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 429363847c39Smrg # on systems that don't support them. 429463847c39Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 429563847c39Smrg enable_shared=no 429663847c39Smrg ;; 429776888252Smrg 429863847c39Smrg *nto* | *qnx*) 429963847c39Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 430063847c39Smrg # it will coredump. 430163847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 430263847c39Smrg ;; 430376888252Smrg 430463847c39Smrg sysv4*MP*) 430563847c39Smrg if test -d /usr/nec; then 430663847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 430763847c39Smrg fi 430863847c39Smrg ;; 430976888252Smrg 431063847c39Smrg *) 431163847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 431263847c39Smrg ;; 431363847c39Smrg esac 431476888252Smrg 431563847c39Smrg case $cc_basename in 431663847c39Smrg nvcc*) # Cuda Compiler Driver 2.2 431763847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 431863847c39Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 431963847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 432063847c39Smrg fi 432163847c39Smrg ;; 432263847c39Smrg esac 432363847c39Smrg else 432463847c39Smrg # PORTME Check for flag to pass linker flags through the system compiler. 432563847c39Smrg case $host_os in 432663847c39Smrg aix*) 432763847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 432863847c39Smrg if test "$host_cpu" = ia64; then 432963847c39Smrg # AIX 5 now supports IA64 processor 433063847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 433163847c39Smrg else 433263847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 433363847c39Smrg fi 433463847c39Smrg ;; 433576888252Smrg 433663847c39Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 433763847c39Smrg # This hack is so that the source file can tell whether it is being 433863847c39Smrg # built for inclusion in a dll (and should export symbols for example). 433963847c39Smrg m4_if([$1], [GCJ], [], 434063847c39Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 434163847c39Smrg ;; 434276888252Smrg 434363847c39Smrg hpux9* | hpux10* | hpux11*) 434463847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 434563847c39Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 434663847c39Smrg # not for PA HP-UX. 434763847c39Smrg case $host_cpu in 434863847c39Smrg hppa*64*|ia64*) 434963847c39Smrg # +Z the default 435063847c39Smrg ;; 435163847c39Smrg *) 435263847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 435363847c39Smrg ;; 435463847c39Smrg esac 435563847c39Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 435663847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 435763847c39Smrg ;; 435876888252Smrg 435963847c39Smrg irix5* | irix6* | nonstopux*) 436063847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 436163847c39Smrg # PIC (with -KPIC) is the default. 436263847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 436363847c39Smrg ;; 436476888252Smrg 436563847c39Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 436663847c39Smrg case $cc_basename in 436763847c39Smrg # old Intel for x86_64 which still supported -KPIC. 436863847c39Smrg ecc*) 436963847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 437063847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 437163847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 437263847c39Smrg ;; 437363847c39Smrg # icc used to be incompatible with GCC. 437463847c39Smrg # ICC 10 doesn't accept -KPIC any more. 437563847c39Smrg icc* | ifort*) 437663847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 437763847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 437863847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 437963847c39Smrg ;; 438063847c39Smrg # Lahey Fortran 8.1. 438163847c39Smrg lf95*) 438263847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 438363847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 438463847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 438563847c39Smrg ;; 438663847c39Smrg nagfor*) 438763847c39Smrg # NAG Fortran compiler 438863847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 438963847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 439063847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 439163847c39Smrg ;; 439263847c39Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 439363847c39Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 439463847c39Smrg # which looks to be a dead project) 439563847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 439663847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 439763847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 439863847c39Smrg ;; 439963847c39Smrg ccc*) 440063847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 440163847c39Smrg # All Alpha code is PIC. 440263847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 440363847c39Smrg ;; 440463847c39Smrg xl* | bgxl* | bgf* | mpixl*) 440563847c39Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 440663847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 440763847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 440863847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 440963847c39Smrg ;; 441063847c39Smrg *) 441163847c39Smrg case `$CC -V 2>&1 | sed 5q` in 441263847c39Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 441363847c39Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 441463847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 441563847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 441663847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 441763847c39Smrg ;; 441863847c39Smrg *Sun\ F* | *Sun*Fortran*) 441963847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 442063847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 442163847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 442263847c39Smrg ;; 442363847c39Smrg *Sun\ C*) 442463847c39Smrg # Sun C 5.9 442563847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 442663847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 442763847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 442863847c39Smrg ;; 442963847c39Smrg *Intel*\ [[CF]]*Compiler*) 443063847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 443163847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 443263847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 443363847c39Smrg ;; 443463847c39Smrg *Portland\ Group*) 443563847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 443663847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 443763847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 443863847c39Smrg ;; 443963847c39Smrg esac 444063847c39Smrg ;; 444163847c39Smrg esac 444263847c39Smrg ;; 444376888252Smrg 444463847c39Smrg newsos6) 444563847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 444663847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 444763847c39Smrg ;; 444876888252Smrg 444963847c39Smrg *nto* | *qnx*) 445063847c39Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 445163847c39Smrg # it will coredump. 445263847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 445363847c39Smrg ;; 445476888252Smrg 445563847c39Smrg osf3* | osf4* | osf5*) 445663847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 445763847c39Smrg # All OSF/1 code is PIC. 445863847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 445963847c39Smrg ;; 446076888252Smrg 446163847c39Smrg rdos*) 446263847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 446363847c39Smrg ;; 446476888252Smrg 446563847c39Smrg solaris*) 446663847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 446763847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 446863847c39Smrg case $cc_basename in 446963847c39Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 447063847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 447163847c39Smrg *) 447263847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 447363847c39Smrg esac 447463847c39Smrg ;; 447576888252Smrg 447663847c39Smrg sunos4*) 447763847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 447863847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 447963847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 448063847c39Smrg ;; 448176888252Smrg 448263847c39Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 448363847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 448463847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 448563847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 448663847c39Smrg ;; 448776888252Smrg 448863847c39Smrg sysv4*MP*) 448963847c39Smrg if test -d /usr/nec ;then 449063847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 449163847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 449263847c39Smrg fi 449363847c39Smrg ;; 449476888252Smrg 449563847c39Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 449663847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 449763847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 449863847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 449963847c39Smrg ;; 450076888252Smrg 450163847c39Smrg unicos*) 450263847c39Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 450363847c39Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 450463847c39Smrg ;; 450576888252Smrg 450663847c39Smrg uts4*) 450763847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 450863847c39Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 450986dafe34Smrg ;; 451063847c39Smrg 4511d8556812Smrg *) 451263847c39Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 451386dafe34Smrg ;; 4514d8556812Smrg esac 451563847c39Smrg fi 451663847c39Smrg]) 451763847c39Smrgcase $host_os in 451863847c39Smrg # For platforms which do not support PIC, -DPIC is meaningless: 451963847c39Smrg *djgpp*) 452063847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4521d8556812Smrg ;; 452263847c39Smrg *) 452363847c39Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 452463847c39Smrg ;; 452563847c39Smrgesac 452676888252Smrg 452763847c39SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 452863847c39Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 452963847c39Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 453063847c39Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 453176888252Smrg 4532d8556812Smrg# 453363847c39Smrg# Check to make sure the PIC flag actually works. 4534d8556812Smrg# 453563847c39Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 453663847c39Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 453763847c39Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 453863847c39Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 453963847c39Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 454063847c39Smrg "" | " "*) ;; 454163847c39Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 454263847c39Smrg esac], 454363847c39Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 454463847c39Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 454563847c39Smrgfi 454663847c39Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 454763847c39Smrg [Additional compiler flags for building library objects]) 454863847c39Smrg 454963847c39Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 455063847c39Smrg [How to pass a linker flag through the compiler]) 4551d8556812Smrg# 455263847c39Smrg# Check to make sure the static flag actually works. 4553d8556812Smrg# 455463847c39Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 455563847c39Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 455663847c39Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 455763847c39Smrg $lt_tmp_static_flag, 455863847c39Smrg [], 455963847c39Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 456063847c39Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 456163847c39Smrg [Compiler flag to prevent dynamic linking]) 456263847c39Smrg])# _LT_COMPILER_PIC 456376888252Smrg 456476888252Smrg 456563847c39Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 456663847c39Smrg# ---------------------------- 456763847c39Smrg# See if the linker supports building shared libraries. 456863847c39Smrgm4_defun([_LT_LINKER_SHLIBS], 456963847c39Smrg[AC_REQUIRE([LT_PATH_LD])dnl 457063847c39SmrgAC_REQUIRE([LT_PATH_NM])dnl 457163847c39Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 457263847c39Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 457363847c39Smrgm4_require([_LT_DECL_EGREP])dnl 457463847c39Smrgm4_require([_LT_DECL_SED])dnl 457563847c39Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 457663847c39Smrgm4_require([_LT_TAG_COMPILER])dnl 457763847c39SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 457863847c39Smrgm4_if([$1], [CXX], [ 457963847c39Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 458063847c39Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 458163847c39Smrg case $host_os in 458263847c39Smrg aix[[4-9]]*) 458363847c39Smrg # If we're using GNU nm, then we don't want the "-C" option. 458463847c39Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 458563847c39Smrg # Also, AIX nm treats weak defined symbols like other global defined 458663847c39Smrg # symbols, whereas GNU nm marks them as "W". 458763847c39Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 458863847c39Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 458963847c39Smrg else 459063847c39Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 459163847c39Smrg fi 459263847c39Smrg ;; 459363847c39Smrg pw32*) 459463847c39Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 459563847c39Smrg ;; 459663847c39Smrg cygwin* | mingw* | cegcc*) 459763847c39Smrg case $cc_basename in 459863847c39Smrg cl*) 459963847c39Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 460063847c39Smrg ;; 460163847c39Smrg *) 460263847c39Smrg _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' 460363847c39Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 460463847c39Smrg ;; 460563847c39Smrg esac 460663847c39Smrg ;; 460763847c39Smrg linux* | k*bsd*-gnu | gnu*) 460863847c39Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 460963847c39Smrg ;; 461063847c39Smrg *) 461163847c39Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 461263847c39Smrg ;; 461363847c39Smrg esac 461463847c39Smrg], [ 461563847c39Smrg runpath_var= 461663847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 461763847c39Smrg _LT_TAGVAR(always_export_symbols, $1)=no 461863847c39Smrg _LT_TAGVAR(archive_cmds, $1)= 461963847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 462063847c39Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 462163847c39Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 462263847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 462363847c39Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 462463847c39Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 462563847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=no 462663847c39Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 462763847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 462863847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 462963847c39Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 463063847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 463163847c39Smrg _LT_TAGVAR(inherit_rpath, $1)=no 463263847c39Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 463363847c39Smrg _LT_TAGVAR(module_cmds, $1)= 463463847c39Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 463563847c39Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 463663847c39Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 463763847c39Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 463863847c39Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 463963847c39Smrg # include_expsyms should be a list of space-separated symbols to be *always* 464063847c39Smrg # included in the symbol list 464163847c39Smrg _LT_TAGVAR(include_expsyms, $1)= 464263847c39Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 464363847c39Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 464463847c39Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 464563847c39Smrg # as well as any symbol that contains `d'. 464663847c39Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 464763847c39Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 464863847c39Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 464963847c39Smrg # the symbol is explicitly referenced. Since portable code cannot 465063847c39Smrg # rely on this symbol name, it's probably fine to never include it in 465163847c39Smrg # preloaded symbol tables. 465263847c39Smrg # Exclude shared library initialization/finalization symbols. 465363847c39Smrgdnl Note also adjust exclude_expsyms for C++ above. 465463847c39Smrg extract_expsyms_cmds= 465586dafe34Smrg 465663847c39Smrg case $host_os in 465763847c39Smrg cygwin* | mingw* | pw32* | cegcc*) 465863847c39Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 465963847c39Smrg # When not using gcc, we currently assume that we are using 466063847c39Smrg # Microsoft Visual C++. 466163847c39Smrg if test "$GCC" != yes; then 466263847c39Smrg with_gnu_ld=no 466363847c39Smrg fi 466463847c39Smrg ;; 466563847c39Smrg interix*) 466663847c39Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 466763847c39Smrg with_gnu_ld=yes 466863847c39Smrg ;; 466963847c39Smrg openbsd*) 467063847c39Smrg with_gnu_ld=no 467163847c39Smrg ;; 467263847c39Smrg linux* | k*bsd*-gnu | gnu*) 467363847c39Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 467463847c39Smrg ;; 467563847c39Smrg esac 467676888252Smrg 467763847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 467886dafe34Smrg 467963847c39Smrg # On some targets, GNU ld is compatible enough with the native linker 468063847c39Smrg # that we're better off using the native interface for both. 468163847c39Smrg lt_use_gnu_ld_interface=no 468263847c39Smrg if test "$with_gnu_ld" = yes; then 468363847c39Smrg case $host_os in 468463847c39Smrg aix*) 468563847c39Smrg # The AIX port of GNU ld has always aspired to compatibility 468663847c39Smrg # with the native linker. However, as the warning in the GNU ld 468763847c39Smrg # block says, versions before 2.19.5* couldn't really create working 468863847c39Smrg # shared libraries, regardless of the interface used. 468963847c39Smrg case `$LD -v 2>&1` in 469063847c39Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 469163847c39Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 469263847c39Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 469363847c39Smrg *) 469463847c39Smrg lt_use_gnu_ld_interface=yes 469563847c39Smrg ;; 469663847c39Smrg esac 469763847c39Smrg ;; 469863847c39Smrg *) 469963847c39Smrg lt_use_gnu_ld_interface=yes 470063847c39Smrg ;; 470163847c39Smrg esac 470263847c39Smrg fi 470386dafe34Smrg 470463847c39Smrg if test "$lt_use_gnu_ld_interface" = yes; then 470563847c39Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 470663847c39Smrg wlarc='${wl}' 470786dafe34Smrg 470863847c39Smrg # Set some defaults for GNU ld with shared library support. These 470963847c39Smrg # are reset later if shared libraries are not supported. Putting them 471063847c39Smrg # here allows them to be overridden if necessary. 471163847c39Smrg runpath_var=LD_RUN_PATH 471263847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 471363847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 471463847c39Smrg # ancient GNU ld didn't support --whole-archive et. al. 471563847c39Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 471663847c39Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 471763847c39Smrg else 471863847c39Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 471963847c39Smrg fi 472063847c39Smrg supports_anon_versioning=no 472163847c39Smrg case `$LD -v 2>&1` in 472263847c39Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 472363847c39Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 472463847c39Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 472563847c39Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 472663847c39Smrg *\ 2.11.*) ;; # other 2.11 versions 472763847c39Smrg *) supports_anon_versioning=yes ;; 472863847c39Smrg esac 472986dafe34Smrg 473063847c39Smrg # See if GNU ld supports shared libraries. 473163847c39Smrg case $host_os in 473263847c39Smrg aix[[3-9]]*) 473363847c39Smrg # On AIX/PPC, the GNU linker is very broken 473463847c39Smrg if test "$host_cpu" != ia64; then 473563847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 473663847c39Smrg cat <<_LT_EOF 1>&2 473786dafe34Smrg 473863847c39Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 473963847c39Smrg*** to be unable to reliably create shared libraries on AIX. 474063847c39Smrg*** Therefore, libtool is disabling shared libraries support. If you 474163847c39Smrg*** really care for shared libraries, you may want to install binutils 474263847c39Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 474363847c39Smrg*** You will then need to restart the configuration process. 474486dafe34Smrg 474563847c39Smrg_LT_EOF 474663847c39Smrg fi 474763847c39Smrg ;; 474886dafe34Smrg 474963847c39Smrg amigaos*) 475063847c39Smrg case $host_cpu in 475163847c39Smrg powerpc) 475263847c39Smrg # see comment about AmigaOS4 .so support 475363847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 475463847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 475563847c39Smrg ;; 475663847c39Smrg m68k) 475763847c39Smrg _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)' 475863847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 475963847c39Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 476063847c39Smrg ;; 476163847c39Smrg esac 476263847c39Smrg ;; 476386dafe34Smrg 476463847c39Smrg beos*) 476563847c39Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 476663847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 476763847c39Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 476863847c39Smrg # support --undefined. This deserves some investigation. FIXME 476963847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 477063847c39Smrg else 477163847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 477263847c39Smrg fi 477363847c39Smrg ;; 477486dafe34Smrg 477563847c39Smrg cygwin* | mingw* | pw32* | cegcc*) 477663847c39Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 477763847c39Smrg # as there is no search path for DLLs. 477863847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 477963847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 478063847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 478163847c39Smrg _LT_TAGVAR(always_export_symbols, $1)=no 478263847c39Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 478363847c39Smrg _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' 478463847c39Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 478563847c39Smrg 478663847c39Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 478763847c39Smrg _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' 478863847c39Smrg # If the export-symbols file already is a .def file (1st line 478963847c39Smrg # is EXPORTS), use it as is; otherwise, prepend... 479063847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 479163847c39Smrg cp $export_symbols $output_objdir/$soname.def; 479263847c39Smrg else 479363847c39Smrg echo EXPORTS > $output_objdir/$soname.def; 479463847c39Smrg cat $export_symbols >> $output_objdir/$soname.def; 479563847c39Smrg fi~ 479663847c39Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 479763847c39Smrg else 479863847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 479963847c39Smrg fi 480063847c39Smrg ;; 480186dafe34Smrg 480263847c39Smrg haiku*) 480363847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 480463847c39Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 480563847c39Smrg ;; 480686dafe34Smrg 480763847c39Smrg interix[[3-9]]*) 480863847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=no 480963847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 481063847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 481163847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 481263847c39Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 481363847c39Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 481463847c39Smrg # default) and relocated if they conflict, which is a slow very memory 481563847c39Smrg # consuming and fragmenting process. To avoid this, we pick a random, 481663847c39Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 481763847c39Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 481863847c39Smrg _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' 481963847c39Smrg _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' 482063847c39Smrg ;; 482186dafe34Smrg 482263847c39Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 482363847c39Smrg tmp_diet=no 482463847c39Smrg if test "$host_os" = linux-dietlibc; then 482563847c39Smrg case $cc_basename in 482663847c39Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 482763847c39Smrg esac 482863847c39Smrg fi 482963847c39Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 483063847c39Smrg && test "$tmp_diet" = no 483163847c39Smrg then 483263847c39Smrg tmp_addflag=' $pic_flag' 483363847c39Smrg tmp_sharedflag='-shared' 483463847c39Smrg case $cc_basename,$host_cpu in 483563847c39Smrg pgcc*) # Portland Group C compiler 483663847c39Smrg _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' 483763847c39Smrg tmp_addflag=' $pic_flag' 483863847c39Smrg ;; 483963847c39Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 484063847c39Smrg # Portland Group f77 and f90 compilers 484163847c39Smrg _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' 484263847c39Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 484363847c39Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 484463847c39Smrg tmp_addflag=' -i_dynamic' ;; 484563847c39Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 484663847c39Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 484763847c39Smrg ifc* | ifort*) # Intel Fortran compiler 484863847c39Smrg tmp_addflag=' -nofor_main' ;; 484963847c39Smrg lf95*) # Lahey Fortran 8.1 485063847c39Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 485163847c39Smrg tmp_sharedflag='--shared' ;; 485263847c39Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 485363847c39Smrg tmp_sharedflag='-qmkshrobj' 485463847c39Smrg tmp_addflag= ;; 485563847c39Smrg nvcc*) # Cuda Compiler Driver 2.2 485663847c39Smrg _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' 485763847c39Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 485863847c39Smrg ;; 485963847c39Smrg esac 486063847c39Smrg case `$CC -V 2>&1 | sed 5q` in 486163847c39Smrg *Sun\ C*) # Sun C 5.9 486263847c39Smrg _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' 486363847c39Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 486463847c39Smrg tmp_sharedflag='-G' ;; 486563847c39Smrg *Sun\ F*) # Sun Fortran 8.3 486663847c39Smrg tmp_sharedflag='-G' ;; 486763847c39Smrg esac 486863847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 486986dafe34Smrg 487063847c39Smrg if test "x$supports_anon_versioning" = xyes; then 487163847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 487263847c39Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 487363847c39Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 487463847c39Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 487563847c39Smrg fi 487686dafe34Smrg 487763847c39Smrg case $cc_basename in 487863847c39Smrg xlf* | bgf* | bgxlf* | mpixlf*) 487963847c39Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 488063847c39Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 488163847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 488263847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 488363847c39Smrg if test "x$supports_anon_versioning" = xyes; then 488463847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 488563847c39Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 488663847c39Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 488763847c39Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 488863847c39Smrg fi 488963847c39Smrg ;; 489063847c39Smrg esac 489163847c39Smrg else 489263847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 489363847c39Smrg fi 489463847c39Smrg ;; 489586dafe34Smrg 489663847c39Smrg netbsd* | netbsdelf*-gnu) 489763847c39Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 489863847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 489963847c39Smrg wlarc= 490063847c39Smrg else 490163847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 490263847c39Smrg _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' 490363847c39Smrg fi 490463847c39Smrg ;; 490586dafe34Smrg 490663847c39Smrg solaris*) 490763847c39Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 490863847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 490963847c39Smrg cat <<_LT_EOF 1>&2 491086dafe34Smrg 491163847c39Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 491263847c39Smrg*** create shared libraries on Solaris systems. Therefore, libtool 491363847c39Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 491463847c39Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 491563847c39Smrg*** your PATH or compiler configuration so that the native linker is 491663847c39Smrg*** used, and then restart. 491786dafe34Smrg 491863847c39Smrg_LT_EOF 491963847c39Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 492063847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 492163847c39Smrg _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' 492263847c39Smrg else 492363847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 492463847c39Smrg fi 492563847c39Smrg ;; 492686dafe34Smrg 492763847c39Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 492863847c39Smrg case `$LD -v 2>&1` in 492963847c39Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 493063847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 493163847c39Smrg cat <<_LT_EOF 1>&2 493286dafe34Smrg 493363847c39Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 493463847c39Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 493563847c39Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 493663847c39Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 493763847c39Smrg*** your PATH or compiler configuration so that the native linker is 493863847c39Smrg*** used, and then restart. 493986dafe34Smrg 494063847c39Smrg_LT_EOF 494163847c39Smrg ;; 494263847c39Smrg *) 494363847c39Smrg # For security reasons, it is highly recommended that you always 494463847c39Smrg # use absolute paths for naming shared libraries, and exclude the 494563847c39Smrg # DT_RUNPATH tag from executables and libraries. But doing so 494663847c39Smrg # requires that you compile everything twice, which is a pain. 494763847c39Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 494863847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 494963847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 495063847c39Smrg _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' 495163847c39Smrg else 495263847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 495363847c39Smrg fi 495463847c39Smrg ;; 495563847c39Smrg esac 495663847c39Smrg ;; 495786dafe34Smrg 495863847c39Smrg sunos4*) 495963847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 496063847c39Smrg wlarc= 496163847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 496263847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 496363847c39Smrg ;; 496486dafe34Smrg 496563847c39Smrg *) 496663847c39Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 496763847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 496863847c39Smrg _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' 496963847c39Smrg else 497063847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 497163847c39Smrg fi 497263847c39Smrg ;; 497363847c39Smrg esac 497486dafe34Smrg 497563847c39Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 497663847c39Smrg runpath_var= 497763847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 497863847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 497963847c39Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 498063847c39Smrg fi 498163847c39Smrg else 498263847c39Smrg # PORTME fill in a description of your system's linker (not GNU ld) 498363847c39Smrg case $host_os in 498463847c39Smrg aix3*) 498563847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 498663847c39Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 498763847c39Smrg _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' 498863847c39Smrg # Note: this linker hardcodes the directories in LIBPATH if there 498963847c39Smrg # are no directories specified by -L. 499063847c39Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 499163847c39Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 499263847c39Smrg # Neither direct hardcoding nor static linking is supported with a 499363847c39Smrg # broken collect2. 499463847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 499563847c39Smrg fi 499663847c39Smrg ;; 499776888252Smrg 499863847c39Smrg aix[[4-9]]*) 499963847c39Smrg if test "$host_cpu" = ia64; then 500063847c39Smrg # On IA64, the linker does run time linking by default, so we don't 500163847c39Smrg # have to do anything special. 500263847c39Smrg aix_use_runtimelinking=no 500363847c39Smrg exp_sym_flag='-Bexport' 500463847c39Smrg no_entry_flag="" 500563847c39Smrg else 500663847c39Smrg # If we're using GNU nm, then we don't want the "-C" option. 500763847c39Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 500863847c39Smrg # Also, AIX nm treats weak defined symbols like other global 500963847c39Smrg # defined symbols, whereas GNU nm marks them as "W". 501063847c39Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 501163847c39Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 501263847c39Smrg else 501363847c39Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 501463847c39Smrg fi 501563847c39Smrg aix_use_runtimelinking=no 50161ae1b5e8Smrg 501763847c39Smrg # Test if we are trying to use run time linking or normal 501863847c39Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 501963847c39Smrg # need to do runtime linking. 502063847c39Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 502163847c39Smrg for ld_flag in $LDFLAGS; do 502263847c39Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 502363847c39Smrg aix_use_runtimelinking=yes 502463847c39Smrg break 502563847c39Smrg fi 502663847c39Smrg done 502763847c39Smrg ;; 502863847c39Smrg esac 50291ae1b5e8Smrg 503063847c39Smrg exp_sym_flag='-bexport' 503163847c39Smrg no_entry_flag='-bnoentry' 503263847c39Smrg fi 503386dafe34Smrg 503463847c39Smrg # When large executables or shared objects are built, AIX ld can 503563847c39Smrg # have problems creating the table of contents. If linking a library 503663847c39Smrg # or program results in "error TOC overflow" add -mminimal-toc to 503763847c39Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 503863847c39Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 503986dafe34Smrg 504063847c39Smrg _LT_TAGVAR(archive_cmds, $1)='' 504163847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 504263847c39Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 504363847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 504463847c39Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 504563847c39Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 504686dafe34Smrg 504763847c39Smrg if test "$GCC" = yes; then 504863847c39Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 504963847c39Smrg # We only want to do this on AIX 4.2 and lower, the check 505063847c39Smrg # below for broken collect2 doesn't work under 4.3+ 505163847c39Smrg collect2name=`${CC} -print-prog-name=collect2` 505263847c39Smrg if test -f "$collect2name" && 505363847c39Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 505463847c39Smrg then 505563847c39Smrg # We have reworked collect2 505663847c39Smrg : 505763847c39Smrg else 505863847c39Smrg # We have old collect2 505963847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 506063847c39Smrg # It fails to find uninstalled libraries when the uninstalled 506163847c39Smrg # path is not listed in the libpath. Setting hardcode_minus_L 506263847c39Smrg # to unsupported forces relinking 506363847c39Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 506463847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 506563847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 506663847c39Smrg fi 506763847c39Smrg ;; 506863847c39Smrg esac 506963847c39Smrg shared_flag='-shared' 507063847c39Smrg if test "$aix_use_runtimelinking" = yes; then 507163847c39Smrg shared_flag="$shared_flag "'${wl}-G' 507263847c39Smrg fi 507363847c39Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 507463847c39Smrg else 507563847c39Smrg # not using gcc 507663847c39Smrg if test "$host_cpu" = ia64; then 507763847c39Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 507863847c39Smrg # chokes on -Wl,-G. The following line is correct: 507963847c39Smrg shared_flag='-G' 508063847c39Smrg else 508163847c39Smrg if test "$aix_use_runtimelinking" = yes; then 508263847c39Smrg shared_flag='${wl}-G' 508363847c39Smrg else 508463847c39Smrg shared_flag='${wl}-bM:SRE' 508563847c39Smrg fi 508663847c39Smrg fi 508763847c39Smrg fi 508886dafe34Smrg 508963847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 509063847c39Smrg # It seems that -bexpall does not export symbols beginning with 509163847c39Smrg # underscore (_), so it is better to generate a list of symbols to export. 509263847c39Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 509363847c39Smrg if test "$aix_use_runtimelinking" = yes; then 509463847c39Smrg # Warning - without using the other runtime loading flags (-brtl), 509563847c39Smrg # -berok will link without error, but may produce a broken library. 509663847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 509763847c39Smrg # Determine the default libpath from the value encoded in an 509863847c39Smrg # empty executable. 509963847c39Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 510063847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 510163847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 510263847c39Smrg else 510363847c39Smrg if test "$host_cpu" = ia64; then 510463847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 510563847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 510663847c39Smrg _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" 510763847c39Smrg else 510863847c39Smrg # Determine the default libpath from the value encoded in an 510963847c39Smrg # empty executable. 511063847c39Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 511163847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 511263847c39Smrg # Warning - without using the other run time loading flags, 511363847c39Smrg # -berok will link without error, but may produce a broken library. 511463847c39Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 511563847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 511663847c39Smrg if test "$with_gnu_ld" = yes; then 511763847c39Smrg # We only use this code for GNU lds that support --whole-archive. 511863847c39Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 511963847c39Smrg else 512063847c39Smrg # Exported symbols can be pulled into shared objects from archives 512163847c39Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 512263847c39Smrg fi 512363847c39Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 512463847c39Smrg # This is similar to how AIX traditionally builds its shared libraries. 512563847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 512663847c39Smrg fi 512763847c39Smrg fi 512863847c39Smrg ;; 512986dafe34Smrg 513063847c39Smrg amigaos*) 513163847c39Smrg case $host_cpu in 513263847c39Smrg powerpc) 513363847c39Smrg # see comment about AmigaOS4 .so support 513463847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 513563847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 513663847c39Smrg ;; 513763847c39Smrg m68k) 513863847c39Smrg _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)' 513963847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 514063847c39Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 514163847c39Smrg ;; 514263847c39Smrg esac 514363847c39Smrg ;; 51441ae1b5e8Smrg 514563847c39Smrg bsdi[[45]]*) 514663847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 514763847c39Smrg ;; 51481ae1b5e8Smrg 514963847c39Smrg cygwin* | mingw* | pw32* | cegcc*) 515063847c39Smrg # When not using gcc, we currently assume that we are using 515163847c39Smrg # Microsoft Visual C++. 515263847c39Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 515363847c39Smrg # no search path for DLLs. 515463847c39Smrg case $cc_basename in 515563847c39Smrg cl*) 515663847c39Smrg # Native MSVC 515763847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 515863847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 515963847c39Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 516063847c39Smrg _LT_TAGVAR(file_list_spec, $1)='@' 516163847c39Smrg # Tell ltmain to make .lib files, not .a files. 516263847c39Smrg libext=lib 516363847c39Smrg # Tell ltmain to make .dll files, not .so files. 516463847c39Smrg shrext_cmds=".dll" 516563847c39Smrg # FIXME: Setting linknames here is a bad hack. 516663847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 516763847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 516863847c39Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 516963847c39Smrg else 517063847c39Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 517163847c39Smrg fi~ 517263847c39Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 517363847c39Smrg linknames=' 517463847c39Smrg # The linker will not automatically build a static lib if we build a DLL. 517563847c39Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 517663847c39Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 517763847c39Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 517863847c39Smrg _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' 517963847c39Smrg # Don't use ranlib 518063847c39Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 518163847c39Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 518263847c39Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 518363847c39Smrg case $lt_outputfile in 518463847c39Smrg *.exe|*.EXE) ;; 518563847c39Smrg *) 518663847c39Smrg lt_outputfile="$lt_outputfile.exe" 518763847c39Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 518863847c39Smrg ;; 518963847c39Smrg esac~ 519063847c39Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 519163847c39Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 519263847c39Smrg $RM "$lt_outputfile.manifest"; 519363847c39Smrg fi' 519463847c39Smrg ;; 519563847c39Smrg *) 519663847c39Smrg # Assume MSVC wrapper 519763847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 519863847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 519963847c39Smrg # Tell ltmain to make .lib files, not .a files. 520063847c39Smrg libext=lib 520163847c39Smrg # Tell ltmain to make .dll files, not .so files. 520263847c39Smrg shrext_cmds=".dll" 520363847c39Smrg # FIXME: Setting linknames here is a bad hack. 520463847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 520563847c39Smrg # The linker will automatically build a .lib file if we build a DLL. 520663847c39Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 520763847c39Smrg # FIXME: Should let the user specify the lib program. 520863847c39Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 520963847c39Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 521063847c39Smrg ;; 521163847c39Smrg esac 521263847c39Smrg ;; 52131ae1b5e8Smrg 521463847c39Smrg darwin* | rhapsody*) 521563847c39Smrg _LT_DARWIN_LINKER_FEATURES($1) 521663847c39Smrg ;; 52171ae1b5e8Smrg 521863847c39Smrg dgux*) 521963847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 522063847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 522163847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 522263847c39Smrg ;; 52231ae1b5e8Smrg 522463847c39Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 522563847c39Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 522663847c39Smrg # does not break anything, and helps significantly (at the cost of a little 522763847c39Smrg # extra space). 522863847c39Smrg freebsd2.2*) 522963847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 523063847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 523163847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 523263847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 523363847c39Smrg ;; 52341ae1b5e8Smrg 523563847c39Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 523663847c39Smrg freebsd2.*) 523763847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 523863847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 523963847c39Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 524063847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 524163847c39Smrg ;; 52421ae1b5e8Smrg 524363847c39Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 524463847c39Smrg freebsd* | dragonfly*) 524563847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 524663847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 524763847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 524863847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 524963847c39Smrg ;; 525086dafe34Smrg 525163847c39Smrg hpux9*) 525263847c39Smrg if test "$GCC" = yes; then 525363847c39Smrg _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 525463847c39Smrg else 525563847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 525663847c39Smrg fi 525763847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 525863847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 525963847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52601ae1b5e8Smrg 526163847c39Smrg # hardcode_minus_L: Not really in the search PATH, 526263847c39Smrg # but as the default location of the library. 526363847c39Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 526463847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 526563847c39Smrg ;; 52661ae1b5e8Smrg 526763847c39Smrg hpux10*) 526863847c39Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 526963847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 527063847c39Smrg else 527163847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 527263847c39Smrg fi 527363847c39Smrg if test "$with_gnu_ld" = no; then 527463847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 527563847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 527663847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 527763847c39Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 527863847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 527963847c39Smrg # hardcode_minus_L: Not really in the search PATH, 528063847c39Smrg # but as the default location of the library. 528163847c39Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 528263847c39Smrg fi 528363847c39Smrg ;; 528486dafe34Smrg 528563847c39Smrg hpux11*) 528663847c39Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 528763847c39Smrg case $host_cpu in 528863847c39Smrg hppa*64*) 528963847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 529063847c39Smrg ;; 529163847c39Smrg ia64*) 529263847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 529363847c39Smrg ;; 529463847c39Smrg *) 529563847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 529663847c39Smrg ;; 529763847c39Smrg esac 529863847c39Smrg else 529963847c39Smrg case $host_cpu in 530063847c39Smrg hppa*64*) 530163847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 530263847c39Smrg ;; 530363847c39Smrg ia64*) 530463847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 530563847c39Smrg ;; 530663847c39Smrg *) 530763847c39Smrg m4_if($1, [], [ 530863847c39Smrg # Older versions of the 11.00 compiler do not understand -b yet 530963847c39Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 531063847c39Smrg _LT_LINKER_OPTION([if $CC understands -b], 531163847c39Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 531263847c39Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 531363847c39Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 531463847c39Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 531563847c39Smrg ;; 531663847c39Smrg esac 531763847c39Smrg fi 531863847c39Smrg if test "$with_gnu_ld" = no; then 531963847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 532063847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 532186dafe34Smrg 532263847c39Smrg case $host_cpu in 532363847c39Smrg hppa*64*|ia64*) 532463847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=no 532563847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 532663847c39Smrg ;; 532763847c39Smrg *) 532863847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 532963847c39Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 533063847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 533186dafe34Smrg 533263847c39Smrg # hardcode_minus_L: Not really in the search PATH, 533363847c39Smrg # but as the default location of the library. 533463847c39Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 533563847c39Smrg ;; 533663847c39Smrg esac 533763847c39Smrg fi 533863847c39Smrg ;; 533986dafe34Smrg 534063847c39Smrg irix5* | irix6* | nonstopux*) 534163847c39Smrg if test "$GCC" = yes; then 534263847c39Smrg _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' 534363847c39Smrg # Try to use the -exported_symbol ld option, if it does not 534463847c39Smrg # work, assume that -exports_file does not work either and 534563847c39Smrg # implicitly export all symbols. 534663847c39Smrg # This should be the same for all languages, so no per-tag cache variable. 534763847c39Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 534863847c39Smrg [lt_cv_irix_exported_symbol], 534963847c39Smrg [save_LDFLAGS="$LDFLAGS" 535063847c39Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 535163847c39Smrg AC_LINK_IFELSE( 535263847c39Smrg [AC_LANG_SOURCE( 535363847c39Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 535463847c39Smrg [C++], [[int foo (void) { return 0; }]], 535563847c39Smrg [Fortran 77], [[ 535663847c39Smrg subroutine foo 535763847c39Smrg end]], 535863847c39Smrg [Fortran], [[ 535963847c39Smrg subroutine foo 536063847c39Smrg end]])])], 536163847c39Smrg [lt_cv_irix_exported_symbol=yes], 536263847c39Smrg [lt_cv_irix_exported_symbol=no]) 536363847c39Smrg LDFLAGS="$save_LDFLAGS"]) 536463847c39Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 536563847c39Smrg _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' 536663847c39Smrg fi 536763847c39Smrg else 536863847c39Smrg _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' 536963847c39Smrg _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' 537063847c39Smrg fi 537163847c39Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 537263847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 537363847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 537463847c39Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 537563847c39Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 537663847c39Smrg ;; 537786dafe34Smrg 537863847c39Smrg netbsd* | netbsdelf*-gnu) 537963847c39Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 538063847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 538163847c39Smrg else 538263847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 538363847c39Smrg fi 538463847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 538563847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 538663847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 538763847c39Smrg ;; 538886dafe34Smrg 538963847c39Smrg newsos6) 539063847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 539163847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 539263847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 539363847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 539463847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 539563847c39Smrg ;; 539686dafe34Smrg 539763847c39Smrg *nto* | *qnx*) 539863847c39Smrg ;; 539986dafe34Smrg 540063847c39Smrg openbsd*) 540163847c39Smrg if test -f /usr/libexec/ld.so; then 540263847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 540363847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 540463847c39Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 540563847c39Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 540663847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 540763847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 540863847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 540963847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 541063847c39Smrg else 541163847c39Smrg case $host_os in 541263847c39Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 541363847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 541463847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 541563847c39Smrg ;; 541663847c39Smrg *) 541763847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 541863847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 541963847c39Smrg ;; 542063847c39Smrg esac 542163847c39Smrg fi 542263847c39Smrg else 542363847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 542463847c39Smrg fi 542563847c39Smrg ;; 54261ae1b5e8Smrg 542763847c39Smrg os2*) 542863847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 542963847c39Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 543063847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 543163847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' 543263847c39Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 543363847c39Smrg ;; 543486dafe34Smrg 543563847c39Smrg osf3*) 543663847c39Smrg if test "$GCC" = yes; then 543763847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 543863847c39Smrg _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' 543963847c39Smrg else 544063847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 544163847c39Smrg _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' 544263847c39Smrg fi 544363847c39Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 544463847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 544563847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 544663847c39Smrg ;; 544786dafe34Smrg 544863847c39Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 544963847c39Smrg if test "$GCC" = yes; then 545063847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 545163847c39Smrg _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' 545263847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 545363847c39Smrg else 545463847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 545563847c39Smrg _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' 545663847c39Smrg _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~ 545763847c39Smrg $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' 545886dafe34Smrg 545963847c39Smrg # Both c and cxx compiler support -rpath directly 546063847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 546163847c39Smrg fi 546263847c39Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 546363847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 546463847c39Smrg ;; 546586dafe34Smrg 546663847c39Smrg solaris*) 546763847c39Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 546863847c39Smrg if test "$GCC" = yes; then 546963847c39Smrg wlarc='${wl}' 547063847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 547163847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 547263847c39Smrg $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' 547363847c39Smrg else 547463847c39Smrg case `$CC -V 2>&1` in 547563847c39Smrg *"Compilers 5.0"*) 547663847c39Smrg wlarc='' 547763847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 547863847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 547963847c39Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 548063847c39Smrg ;; 548163847c39Smrg *) 548263847c39Smrg wlarc='${wl}' 548363847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 548463847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 548563847c39Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 548663847c39Smrg ;; 548763847c39Smrg esac 548863847c39Smrg fi 548963847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 549063847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 549163847c39Smrg case $host_os in 549263847c39Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 549363847c39Smrg *) 549463847c39Smrg # The compiler driver will combine and reorder linker options, 549563847c39Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 549663847c39Smrg # but is careful enough not to reorder. 549763847c39Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 549863847c39Smrg if test "$GCC" = yes; then 549963847c39Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 550063847c39Smrg else 550163847c39Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 550263847c39Smrg fi 550363847c39Smrg ;; 550463847c39Smrg esac 550563847c39Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 550663847c39Smrg ;; 550786dafe34Smrg 550863847c39Smrg sunos4*) 550963847c39Smrg if test "x$host_vendor" = xsequent; then 551063847c39Smrg # Use $CC to link under sequent, because it throws in some extra .o 551163847c39Smrg # files that make .init and .fini sections work. 551263847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 551363847c39Smrg else 551463847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 551563847c39Smrg fi 551663847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 551763847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 551863847c39Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 551963847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 552063847c39Smrg ;; 552186dafe34Smrg 552263847c39Smrg sysv4) 552363847c39Smrg case $host_vendor in 552463847c39Smrg sni) 552563847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 552663847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 552763847c39Smrg ;; 552863847c39Smrg siemens) 552963847c39Smrg ## LD is ld it makes a PLAMLIB 553063847c39Smrg ## CC just makes a GrossModule. 553163847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 553263847c39Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 553363847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=no 553463847c39Smrg ;; 553563847c39Smrg motorola) 553663847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 553763847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 553863847c39Smrg ;; 553963847c39Smrg esac 554063847c39Smrg runpath_var='LD_RUN_PATH' 554163847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 554263847c39Smrg ;; 554386dafe34Smrg 554463847c39Smrg sysv4.3*) 554563847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 554663847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 554763847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 554863847c39Smrg ;; 554986dafe34Smrg 555063847c39Smrg sysv4*MP*) 555163847c39Smrg if test -d /usr/nec; then 555263847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 555363847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 555463847c39Smrg runpath_var=LD_RUN_PATH 555563847c39Smrg hardcode_runpath_var=yes 555663847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 555763847c39Smrg fi 555863847c39Smrg ;; 555986dafe34Smrg 556063847c39Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 556163847c39Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 556263847c39Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 556363847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 556463847c39Smrg runpath_var='LD_RUN_PATH' 556586dafe34Smrg 556663847c39Smrg if test "$GCC" = yes; then 556763847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 556863847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 556963847c39Smrg else 557063847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 557163847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 557263847c39Smrg fi 557363847c39Smrg ;; 557486dafe34Smrg 557563847c39Smrg sysv5* | sco3.2v5* | sco5v6*) 557663847c39Smrg # Note: We can NOT use -z defs as we might desire, because we do not 557763847c39Smrg # link with -lc, and that would cause any symbols used from libc to 557863847c39Smrg # always be unresolved, which means just about no library would 557963847c39Smrg # ever link correctly. If we're not using GNU ld we use -z text 558063847c39Smrg # though, which does catch some bad symbols but isn't as heavy-handed 558163847c39Smrg # as -z defs. 558263847c39Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 558363847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 558463847c39Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 558563847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 558663847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 558763847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 558863847c39Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 558963847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 559063847c39Smrg runpath_var='LD_RUN_PATH' 559186dafe34Smrg 559263847c39Smrg if test "$GCC" = yes; then 559363847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 559463847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 559563847c39Smrg else 559663847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 559763847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 559863847c39Smrg fi 559963847c39Smrg ;; 560086dafe34Smrg 560163847c39Smrg uts4*) 560263847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 560363847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 560463847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 560563847c39Smrg ;; 560686dafe34Smrg 560763847c39Smrg *) 560863847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 560963847c39Smrg ;; 561063847c39Smrg esac 561186dafe34Smrg 561263847c39Smrg if test x$host_vendor = xsni; then 561363847c39Smrg case $host in 561463847c39Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 561563847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 561663847c39Smrg ;; 561763847c39Smrg esac 561863847c39Smrg fi 561963847c39Smrg fi 562063847c39Smrg]) 562163847c39SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 562263847c39Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 56231ae1b5e8Smrg 562463847c39Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 56251ae1b5e8Smrg 562663847c39Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 562763847c39Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 562863847c39Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 562963847c39Smrg [The commands to extract the exported symbol list from a shared archive]) 56301ae1b5e8Smrg 563163847c39Smrg# 563263847c39Smrg# Do we need to explicitly link libc? 563363847c39Smrg# 563463847c39Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 563563847c39Smrgx|xyes) 563663847c39Smrg # Assume -lc should be added 563763847c39Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 563886dafe34Smrg 563963847c39Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 564063847c39Smrg case $_LT_TAGVAR(archive_cmds, $1) in 564163847c39Smrg *'~'*) 564263847c39Smrg # FIXME: we may have to deal with multi-command sequences. 564363847c39Smrg ;; 564463847c39Smrg '$CC '*) 564563847c39Smrg # Test whether the compiler implicitly links with -lc since on some 564663847c39Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 564763847c39Smrg # to ld, don't add -lc before -lgcc. 564863847c39Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 564963847c39Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 565063847c39Smrg [$RM conftest* 565163847c39Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 565263847c39Smrg 565363847c39Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 565463847c39Smrg soname=conftest 565563847c39Smrg lib=conftest 565663847c39Smrg libobjs=conftest.$ac_objext 565763847c39Smrg deplibs= 565863847c39Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 565963847c39Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 566063847c39Smrg compiler_flags=-v 566163847c39Smrg linker_flags=-v 566263847c39Smrg verstring= 566363847c39Smrg output_objdir=. 566463847c39Smrg libname=conftest 566563847c39Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 566663847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 566763847c39Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 566863847c39Smrg then 566963847c39Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 567063847c39Smrg else 567163847c39Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 567263847c39Smrg fi 567363847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 567463847c39Smrg else 567563847c39Smrg cat conftest.err 1>&5 567663847c39Smrg fi 567763847c39Smrg $RM conftest* 567863847c39Smrg ]) 567963847c39Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 568063847c39Smrg ;; 568163847c39Smrg esac 568263847c39Smrg fi 568363847c39Smrg ;; 568463847c39Smrgesac 568586dafe34Smrg 568663847c39Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 568763847c39Smrg [Whether or not to add -lc for building shared libraries]) 568863847c39Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 568963847c39Smrg [enable_shared_with_static_runtimes], [0], 569063847c39Smrg [Whether or not to disallow shared libs when runtime libs are static]) 569163847c39Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 569263847c39Smrg [Compiler flag to allow reflexive dlopens]) 569363847c39Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 569463847c39Smrg [Compiler flag to generate shared objects directly from archives]) 569563847c39Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 569663847c39Smrg [Whether the compiler copes with passing no objects directly]) 569763847c39Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 569863847c39Smrg [Create an old-style archive from a shared archive]) 569963847c39Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 570063847c39Smrg [Create a temporary old-style archive to link instead of a shared archive]) 570163847c39Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 570263847c39Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 570363847c39Smrg_LT_TAGDECL([], [module_cmds], [2], 570463847c39Smrg [Commands used to build a loadable module if different from building 570563847c39Smrg a shared archive.]) 570663847c39Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 570763847c39Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 570863847c39Smrg [Whether we are building with GNU ld or not]) 570963847c39Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 571063847c39Smrg [Flag that allows shared libraries with undefined symbols to be built]) 571163847c39Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 571263847c39Smrg [Flag that enforces no undefined symbols]) 571363847c39Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 571463847c39Smrg [Flag to hardcode $libdir into a binary during linking. 571563847c39Smrg This must work even if $libdir does not exist]) 571663847c39Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 571763847c39Smrg [Whether we need a single "-rpath" flag with a separated argument]) 571863847c39Smrg_LT_TAGDECL([], [hardcode_direct], [0], 571963847c39Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 572063847c39Smrg DIR into the resulting binary]) 572163847c39Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 572263847c39Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 572363847c39Smrg DIR into the resulting binary and the resulting library dependency is 572463847c39Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 572563847c39Smrg library is relocated]) 572663847c39Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 572763847c39Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 572863847c39Smrg into the resulting binary]) 572963847c39Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 573063847c39Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 573163847c39Smrg into the resulting binary]) 573263847c39Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 573363847c39Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 573463847c39Smrg into the library and all subsequent libraries and executables linked 573563847c39Smrg against it]) 573663847c39Smrg_LT_TAGDECL([], [inherit_rpath], [0], 573763847c39Smrg [Set to yes if linker adds runtime paths of dependent libraries 573863847c39Smrg to runtime path list]) 573963847c39Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 574063847c39Smrg [Whether libtool must link a program against all its dependency libraries]) 574163847c39Smrg_LT_TAGDECL([], [always_export_symbols], [0], 574263847c39Smrg [Set to "yes" if exported symbols are required]) 574363847c39Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 574463847c39Smrg [The commands to list exported symbols]) 574563847c39Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 574663847c39Smrg [Symbols that should not be listed in the preloaded symbols]) 574763847c39Smrg_LT_TAGDECL([], [include_expsyms], [1], 574863847c39Smrg [Symbols that must always be exported]) 574963847c39Smrg_LT_TAGDECL([], [prelink_cmds], [2], 575063847c39Smrg [Commands necessary for linking programs (against libraries) with templates]) 575163847c39Smrg_LT_TAGDECL([], [postlink_cmds], [2], 575263847c39Smrg [Commands necessary for finishing linking programs]) 575363847c39Smrg_LT_TAGDECL([], [file_list_spec], [1], 575463847c39Smrg [Specify filename containing input files]) 575563847c39Smrgdnl FIXME: Not yet implemented 575663847c39Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 575763847c39Smrgdnl [Compiler flag to generate thread safe objects]) 575863847c39Smrg])# _LT_LINKER_SHLIBS 575963847c39Smrg 576063847c39Smrg 576163847c39Smrg# _LT_LANG_C_CONFIG([TAG]) 576263847c39Smrg# ------------------------ 576363847c39Smrg# Ensure that the configuration variables for a C compiler are suitably 576463847c39Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 576563847c39Smrg# the compiler configuration to `libtool'. 576663847c39Smrgm4_defun([_LT_LANG_C_CONFIG], 576763847c39Smrg[m4_require([_LT_DECL_EGREP])dnl 576863847c39Smrglt_save_CC="$CC" 576963847c39SmrgAC_LANG_PUSH(C) 577086dafe34Smrg 577163847c39Smrg# Source file extension for C test sources. 577263847c39Smrgac_ext=c 57731ae1b5e8Smrg 577463847c39Smrg# Object file extension for compiled C test sources. 577563847c39Smrgobjext=o 577663847c39Smrg_LT_TAGVAR(objext, $1)=$objext 57771ae1b5e8Smrg 577863847c39Smrg# Code to be used in simple compile tests 577963847c39Smrglt_simple_compile_test_code="int some_variable = 0;" 57801ae1b5e8Smrg 578163847c39Smrg# Code to be used in simple link tests 578263847c39Smrglt_simple_link_test_code='int main(){return(0);}' 57831ae1b5e8Smrg 578463847c39Smrg_LT_TAG_COMPILER 578563847c39Smrg# Save the default compiler, since it gets overwritten when the other 578663847c39Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 578763847c39Smrgcompiler_DEFAULT=$CC 57881ae1b5e8Smrg 578963847c39Smrg# save warnings/boilerplate of simple test code 579063847c39Smrg_LT_COMPILER_BOILERPLATE 579163847c39Smrg_LT_LINKER_BOILERPLATE 57921ae1b5e8Smrg 579363847c39Smrgif test -n "$compiler"; then 579463847c39Smrg _LT_COMPILER_NO_RTTI($1) 579563847c39Smrg _LT_COMPILER_PIC($1) 579663847c39Smrg _LT_COMPILER_C_O($1) 579763847c39Smrg _LT_COMPILER_FILE_LOCKS($1) 579863847c39Smrg _LT_LINKER_SHLIBS($1) 579963847c39Smrg _LT_SYS_DYNAMIC_LINKER($1) 580063847c39Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 580163847c39Smrg LT_SYS_DLOPEN_SELF 580263847c39Smrg _LT_CMD_STRIPLIB 580363847c39Smrg 580463847c39Smrg # Report which library types will actually be built 580563847c39Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 580663847c39Smrg AC_MSG_RESULT([$can_build_shared]) 580763847c39Smrg 580863847c39Smrg AC_MSG_CHECKING([whether to build shared libraries]) 580963847c39Smrg test "$can_build_shared" = "no" && enable_shared=no 581063847c39Smrg 581163847c39Smrg # On AIX, shared libraries and static libraries use the same namespace, and 581263847c39Smrg # are all built from PIC. 5813d8556812Smrg case $host_os in 5814d8556812Smrg aix3*) 581563847c39Smrg test "$enable_shared" = yes && enable_static=no 581663847c39Smrg if test -n "$RANLIB"; then 581763847c39Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 581863847c39Smrg postinstall_cmds='$RANLIB $lib' 581963847c39Smrg fi 582063847c39Smrg ;; 58211ae1b5e8Smrg 582263847c39Smrg aix[[4-9]]*) 582363847c39Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 582463847c39Smrg test "$enable_shared" = yes && enable_static=no 582563847c39Smrg fi 5826d8556812Smrg ;; 5827d8556812Smrg esac 582863847c39Smrg AC_MSG_RESULT([$enable_shared]) 58291ae1b5e8Smrg 583063847c39Smrg AC_MSG_CHECKING([whether to build static libraries]) 583163847c39Smrg # Make sure either enable_shared or enable_static is yes. 583263847c39Smrg test "$enable_shared" = yes || enable_static=yes 583363847c39Smrg AC_MSG_RESULT([$enable_static]) 58341ae1b5e8Smrg 583563847c39Smrg _LT_CONFIG($1) 58361ae1b5e8Smrgfi 583763847c39SmrgAC_LANG_POP 583863847c39SmrgCC="$lt_save_CC" 583963847c39Smrg])# _LT_LANG_C_CONFIG 584086dafe34Smrg 58411ae1b5e8Smrg 584263847c39Smrg# _LT_LANG_CXX_CONFIG([TAG]) 584363847c39Smrg# -------------------------- 584463847c39Smrg# Ensure that the configuration variables for a C++ compiler are suitably 584563847c39Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 584663847c39Smrg# the compiler configuration to `libtool'. 584763847c39Smrgm4_defun([_LT_LANG_CXX_CONFIG], 584863847c39Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 584963847c39Smrgm4_require([_LT_DECL_EGREP])dnl 585063847c39Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 585163847c39Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 585263847c39Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 585363847c39Smrg (test "X$CXX" != "Xg++"))) ; then 585463847c39Smrg AC_PROG_CXXCPP 585563847c39Smrgelse 585663847c39Smrg _lt_caught_CXX_error=yes 585786dafe34Smrgfi 585886dafe34Smrg 585963847c39SmrgAC_LANG_PUSH(C++) 586063847c39Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 586163847c39Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 586263847c39Smrg_LT_TAGVAR(always_export_symbols, $1)=no 586363847c39Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 586463847c39Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 586563847c39Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 586663847c39Smrg_LT_TAGVAR(hardcode_direct, $1)=no 586763847c39Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 586863847c39Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 586963847c39Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 587063847c39Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 587163847c39Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 587263847c39Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 587363847c39Smrg_LT_TAGVAR(inherit_rpath, $1)=no 587463847c39Smrg_LT_TAGVAR(module_cmds, $1)= 587563847c39Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 587663847c39Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 587763847c39Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 587863847c39Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 587963847c39Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 588063847c39Smrg_LT_TAGVAR(no_undefined_flag, $1)= 588163847c39Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 588263847c39Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 588386dafe34Smrg 588463847c39Smrg# Source file extension for C++ test sources. 588563847c39Smrgac_ext=cpp 588686dafe34Smrg 588763847c39Smrg# Object file extension for compiled C++ test sources. 588863847c39Smrgobjext=o 588963847c39Smrg_LT_TAGVAR(objext, $1)=$objext 589063847c39Smrg 589163847c39Smrg# No sense in running all these tests if we already determined that 589263847c39Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 589363847c39Smrg# are currently assumed to apply to all compilers on this platform, 589463847c39Smrg# and will be corrupted by setting them based on a non-working compiler. 589563847c39Smrgif test "$_lt_caught_CXX_error" != yes; then 589663847c39Smrg # Code to be used in simple compile tests 589763847c39Smrg lt_simple_compile_test_code="int some_variable = 0;" 589863847c39Smrg 589963847c39Smrg # Code to be used in simple link tests 590063847c39Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 590163847c39Smrg 590263847c39Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 590363847c39Smrg _LT_TAG_COMPILER 590463847c39Smrg 590563847c39Smrg # save warnings/boilerplate of simple test code 590663847c39Smrg _LT_COMPILER_BOILERPLATE 590763847c39Smrg _LT_LINKER_BOILERPLATE 590863847c39Smrg 590963847c39Smrg # Allow CC to be a program name with arguments. 591063847c39Smrg lt_save_CC=$CC 591163847c39Smrg lt_save_CFLAGS=$CFLAGS 591263847c39Smrg lt_save_LD=$LD 591363847c39Smrg lt_save_GCC=$GCC 591463847c39Smrg GCC=$GXX 591563847c39Smrg lt_save_with_gnu_ld=$with_gnu_ld 591663847c39Smrg lt_save_path_LD=$lt_cv_path_LD 591763847c39Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 591863847c39Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 591963847c39Smrg else 592063847c39Smrg $as_unset lt_cv_prog_gnu_ld 592163847c39Smrg fi 592263847c39Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 592363847c39Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 592463847c39Smrg else 592563847c39Smrg $as_unset lt_cv_path_LD 592663847c39Smrg fi 592763847c39Smrg test -z "${LDCXX+set}" || LD=$LDCXX 592863847c39Smrg CC=${CXX-"c++"} 592963847c39Smrg CFLAGS=$CXXFLAGS 593063847c39Smrg compiler=$CC 593163847c39Smrg _LT_TAGVAR(compiler, $1)=$CC 593263847c39Smrg _LT_CC_BASENAME([$compiler]) 593386dafe34Smrg 593463847c39Smrg if test -n "$compiler"; then 593563847c39Smrg # We don't want -fno-exception when compiling C++ code, so set the 593663847c39Smrg # no_builtin_flag separately 593763847c39Smrg if test "$GXX" = yes; then 593863847c39Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 593963847c39Smrg else 594063847c39Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 594163847c39Smrg fi 594286dafe34Smrg 594363847c39Smrg if test "$GXX" = yes; then 594463847c39Smrg # Set up default GNU C++ configuration 59451ae1b5e8Smrg 594663847c39Smrg LT_PATH_LD 59471ae1b5e8Smrg 594863847c39Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 594963847c39Smrg # archiving commands below assume that GNU ld is being used. 595063847c39Smrg if test "$with_gnu_ld" = yes; then 595163847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 595263847c39Smrg _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' 595386dafe34Smrg 595463847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 595563847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 59561ae1b5e8Smrg 595763847c39Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 595863847c39Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 595963847c39Smrg # investigate it a little bit more. (MM) 596063847c39Smrg wlarc='${wl}' 59611ae1b5e8Smrg 596263847c39Smrg # ancient GNU ld didn't support --whole-archive et. al. 596363847c39Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 596463847c39Smrg $GREP 'no-whole-archive' > /dev/null; then 596563847c39Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 596663847c39Smrg else 596763847c39Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 596863847c39Smrg fi 5969d8556812Smrg else 597063847c39Smrg with_gnu_ld=no 597163847c39Smrg wlarc= 597263847c39Smrg 597363847c39Smrg # A generic and very simple default shared library creation 597463847c39Smrg # command for GNU C++ for the case where it uses the native 597563847c39Smrg # linker, instead of GNU ld. If possible, this setting should 597663847c39Smrg # overridden to take advantage of the native linker features on 597763847c39Smrg # the platform it is being used on. 597863847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5979d8556812Smrg fi 598063847c39Smrg 598163847c39Smrg # Commands to make compiler produce verbose output that lists 598263847c39Smrg # what "hidden" libraries, object files and flags are used when 598363847c39Smrg # linking a shared library. 598463847c39Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 598563847c39Smrg 5986d8556812Smrg else 598763847c39Smrg GXX=no 598863847c39Smrg with_gnu_ld=no 598963847c39Smrg wlarc= 5990d8556812Smrg fi 59911ae1b5e8Smrg 599263847c39Smrg # PORTME: fill in a description of your system's C++ link characteristics 599363847c39Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 599463847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 599563847c39Smrg case $host_os in 599663847c39Smrg aix3*) 599763847c39Smrg # FIXME: insert proper C++ library support 599863847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 599963847c39Smrg ;; 600063847c39Smrg aix[[4-9]]*) 600163847c39Smrg if test "$host_cpu" = ia64; then 600263847c39Smrg # On IA64, the linker does run time linking by default, so we don't 600363847c39Smrg # have to do anything special. 600463847c39Smrg aix_use_runtimelinking=no 600563847c39Smrg exp_sym_flag='-Bexport' 600663847c39Smrg no_entry_flag="" 600763847c39Smrg else 600863847c39Smrg aix_use_runtimelinking=no 600963847c39Smrg 601063847c39Smrg # Test if we are trying to use run time linking or normal 601163847c39Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 601263847c39Smrg # need to do runtime linking. 601363847c39Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 601463847c39Smrg for ld_flag in $LDFLAGS; do 601563847c39Smrg case $ld_flag in 601663847c39Smrg *-brtl*) 601763847c39Smrg aix_use_runtimelinking=yes 601863847c39Smrg break 601963847c39Smrg ;; 602063847c39Smrg esac 602163847c39Smrg done 602263847c39Smrg ;; 602363847c39Smrg esac 60241ae1b5e8Smrg 602563847c39Smrg exp_sym_flag='-bexport' 602663847c39Smrg no_entry_flag='-bnoentry' 602763847c39Smrg fi 60281ae1b5e8Smrg 602963847c39Smrg # When large executables or shared objects are built, AIX ld can 603063847c39Smrg # have problems creating the table of contents. If linking a library 603163847c39Smrg # or program results in "error TOC overflow" add -mminimal-toc to 603263847c39Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 603363847c39Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 603463847c39Smrg 603563847c39Smrg _LT_TAGVAR(archive_cmds, $1)='' 603663847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 603763847c39Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 603863847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 603963847c39Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 604063847c39Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 604163847c39Smrg 604263847c39Smrg if test "$GXX" = yes; then 604363847c39Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 604463847c39Smrg # We only want to do this on AIX 4.2 and lower, the check 604563847c39Smrg # below for broken collect2 doesn't work under 4.3+ 604663847c39Smrg collect2name=`${CC} -print-prog-name=collect2` 604763847c39Smrg if test -f "$collect2name" && 604863847c39Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 604963847c39Smrg then 605063847c39Smrg # We have reworked collect2 605163847c39Smrg : 605263847c39Smrg else 605363847c39Smrg # We have old collect2 605463847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 605563847c39Smrg # It fails to find uninstalled libraries when the uninstalled 605663847c39Smrg # path is not listed in the libpath. Setting hardcode_minus_L 605763847c39Smrg # to unsupported forces relinking 605863847c39Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 605963847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 606063847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 606163847c39Smrg fi 606263847c39Smrg esac 606363847c39Smrg shared_flag='-shared' 606463847c39Smrg if test "$aix_use_runtimelinking" = yes; then 606563847c39Smrg shared_flag="$shared_flag "'${wl}-G' 606663847c39Smrg fi 606763847c39Smrg else 606863847c39Smrg # not using gcc 606963847c39Smrg if test "$host_cpu" = ia64; then 607063847c39Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 607163847c39Smrg # chokes on -Wl,-G. The following line is correct: 607263847c39Smrg shared_flag='-G' 607363847c39Smrg else 607463847c39Smrg if test "$aix_use_runtimelinking" = yes; then 607563847c39Smrg shared_flag='${wl}-G' 607663847c39Smrg else 607763847c39Smrg shared_flag='${wl}-bM:SRE' 607863847c39Smrg fi 607963847c39Smrg fi 608063847c39Smrg fi 60811ae1b5e8Smrg 608263847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 608363847c39Smrg # It seems that -bexpall does not export symbols beginning with 608463847c39Smrg # underscore (_), so it is better to generate a list of symbols to 608563847c39Smrg # export. 608663847c39Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 608763847c39Smrg if test "$aix_use_runtimelinking" = yes; then 608863847c39Smrg # Warning - without using the other runtime loading flags (-brtl), 608963847c39Smrg # -berok will link without error, but may produce a broken library. 609063847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 609163847c39Smrg # Determine the default libpath from the value encoded in an empty 609263847c39Smrg # executable. 609363847c39Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 609463847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 609563847c39Smrg 609663847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 609763847c39Smrg else 609863847c39Smrg if test "$host_cpu" = ia64; then 609963847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 610063847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 610163847c39Smrg _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" 610263847c39Smrg else 610363847c39Smrg # Determine the default libpath from the value encoded in an 610463847c39Smrg # empty executable. 610563847c39Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 610663847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 610763847c39Smrg # Warning - without using the other run time loading flags, 610863847c39Smrg # -berok will link without error, but may produce a broken library. 610963847c39Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 611063847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 611163847c39Smrg if test "$with_gnu_ld" = yes; then 611263847c39Smrg # We only use this code for GNU lds that support --whole-archive. 611363847c39Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 611463847c39Smrg else 611563847c39Smrg # Exported symbols can be pulled into shared objects from archives 611663847c39Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 611763847c39Smrg fi 611863847c39Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 611963847c39Smrg # This is similar to how AIX traditionally builds its shared 612063847c39Smrg # libraries. 612163847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 612263847c39Smrg fi 612363847c39Smrg fi 612463847c39Smrg ;; 61251ae1b5e8Smrg 612663847c39Smrg beos*) 612763847c39Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 612863847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 612963847c39Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 613063847c39Smrg # support --undefined. This deserves some investigation. FIXME 613163847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6132d8556812Smrg else 613363847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6134d8556812Smrg fi 6135d8556812Smrg ;; 613663847c39Smrg 6137d8556812Smrg chorus*) 613863847c39Smrg case $cc_basename in 613963847c39Smrg *) 614063847c39Smrg # FIXME: insert proper C++ library support 614163847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 614263847c39Smrg ;; 614363847c39Smrg esac 614463847c39Smrg ;; 614563847c39Smrg 614663847c39Smrg cygwin* | mingw* | pw32* | cegcc*) 614763847c39Smrg case $GXX,$cc_basename in 614863847c39Smrg ,cl* | no,cl*) 614963847c39Smrg # Native MSVC 615063847c39Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 615163847c39Smrg # no search path for DLLs. 615263847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 615363847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 615463847c39Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 615563847c39Smrg _LT_TAGVAR(file_list_spec, $1)='@' 615663847c39Smrg # Tell ltmain to make .lib files, not .a files. 615763847c39Smrg libext=lib 615863847c39Smrg # Tell ltmain to make .dll files, not .so files. 615963847c39Smrg shrext_cmds=".dll" 616063847c39Smrg # FIXME: Setting linknames here is a bad hack. 616163847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 616263847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 616363847c39Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 616463847c39Smrg else 616563847c39Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 616663847c39Smrg fi~ 616763847c39Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 616863847c39Smrg linknames=' 616963847c39Smrg # The linker will not automatically build a static lib if we build a DLL. 617063847c39Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 617163847c39Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 617263847c39Smrg # Don't use ranlib 617363847c39Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 617463847c39Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 617563847c39Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 617663847c39Smrg case $lt_outputfile in 617763847c39Smrg *.exe|*.EXE) ;; 617863847c39Smrg *) 617963847c39Smrg lt_outputfile="$lt_outputfile.exe" 618063847c39Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 618163847c39Smrg ;; 618263847c39Smrg esac~ 618363847c39Smrg func_to_tool_file "$lt_outputfile"~ 618463847c39Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 618563847c39Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 618663847c39Smrg $RM "$lt_outputfile.manifest"; 618763847c39Smrg fi' 618863847c39Smrg ;; 618963847c39Smrg *) 619063847c39Smrg # g++ 619163847c39Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 619263847c39Smrg # as there is no search path for DLLs. 619363847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 619463847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 619563847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 619663847c39Smrg _LT_TAGVAR(always_export_symbols, $1)=no 619763847c39Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 619863847c39Smrg 619963847c39Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 620063847c39Smrg _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' 620163847c39Smrg # If the export-symbols file already is a .def file (1st line 620263847c39Smrg # is EXPORTS), use it as is; otherwise, prepend... 620363847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 620463847c39Smrg cp $export_symbols $output_objdir/$soname.def; 620563847c39Smrg else 620663847c39Smrg echo EXPORTS > $output_objdir/$soname.def; 620763847c39Smrg cat $export_symbols >> $output_objdir/$soname.def; 620863847c39Smrg fi~ 620963847c39Smrg $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' 621063847c39Smrg else 621163847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 621263847c39Smrg fi 6213d8556812Smrg ;; 6214d8556812Smrg esac 6215d8556812Smrg ;; 621663847c39Smrg darwin* | rhapsody*) 621763847c39Smrg _LT_DARWIN_LINKER_FEATURES($1) 621863847c39Smrg ;; 621963847c39Smrg 6220d8556812Smrg dgux*) 622163847c39Smrg case $cc_basename in 622263847c39Smrg ec++*) 622363847c39Smrg # FIXME: insert proper C++ library support 622463847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6225d8556812Smrg ;; 622663847c39Smrg ghcx*) 6227d8556812Smrg # Green Hills C++ Compiler 622863847c39Smrg # FIXME: insert proper C++ library support 622963847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6230d8556812Smrg ;; 623163847c39Smrg *) 623263847c39Smrg # FIXME: insert proper C++ library support 623363847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6234d8556812Smrg ;; 623563847c39Smrg esac 623663847c39Smrg ;; 623763847c39Smrg 623863847c39Smrg freebsd2.*) 623963847c39Smrg # C++ shared libraries reported to be fairly broken before 624063847c39Smrg # switch to ELF 624163847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 624263847c39Smrg ;; 624363847c39Smrg 624463847c39Smrg freebsd-elf*) 624563847c39Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 624663847c39Smrg ;; 624763847c39Smrg 6248d8556812Smrg freebsd* | dragonfly*) 624963847c39Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 625063847c39Smrg # conventions 625163847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 625263847c39Smrg ;; 625363847c39Smrg 625463847c39Smrg gnu*) 625563847c39Smrg ;; 625663847c39Smrg 625763847c39Smrg haiku*) 625863847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 625963847c39Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 626063847c39Smrg ;; 626163847c39Smrg 626263847c39Smrg hpux9*) 626363847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 626463847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 626563847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 626663847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 626763847c39Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 626863847c39Smrg # but as the default 626963847c39Smrg # location of the library. 627063847c39Smrg 627163847c39Smrg case $cc_basename in 627263847c39Smrg CC*) 627363847c39Smrg # FIXME: insert proper C++ library support 627463847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 627563847c39Smrg ;; 627663847c39Smrg aCC*) 627763847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 627863847c39Smrg # Commands to make compiler produce verbose output that lists 627963847c39Smrg # what "hidden" libraries, object files and flags are used when 628063847c39Smrg # linking a shared library. 628163847c39Smrg # 628263847c39Smrg # There doesn't appear to be a way to prevent this compiler from 628363847c39Smrg # explicitly linking system object files so we need to strip them 628463847c39Smrg # from the output so that they don't get included in the library 628563847c39Smrg # dependencies. 628663847c39Smrg 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"' 628763847c39Smrg ;; 628863847c39Smrg *) 628963847c39Smrg if test "$GXX" = yes; then 629063847c39Smrg _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 629163847c39Smrg else 629263847c39Smrg # FIXME: insert proper C++ library support 629363847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 629463847c39Smrg fi 629563847c39Smrg ;; 629663847c39Smrg esac 629763847c39Smrg ;; 629863847c39Smrg 629963847c39Smrg hpux10*|hpux11*) 630063847c39Smrg if test $with_gnu_ld = no; then 630163847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 630263847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 630363847c39Smrg 630463847c39Smrg case $host_cpu in 630563847c39Smrg hppa*64*|ia64*) 630663847c39Smrg ;; 630763847c39Smrg *) 630863847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 630963847c39Smrg ;; 631063847c39Smrg esac 631163847c39Smrg fi 631263847c39Smrg case $host_cpu in 631363847c39Smrg hppa*64*|ia64*) 631463847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=no 631563847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 631663847c39Smrg ;; 631763847c39Smrg *) 631863847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 631963847c39Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 632063847c39Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 632163847c39Smrg # but as the default 632263847c39Smrg # location of the library. 632363847c39Smrg ;; 632463847c39Smrg esac 632563847c39Smrg 632663847c39Smrg case $cc_basename in 632763847c39Smrg CC*) 632863847c39Smrg # FIXME: insert proper C++ library support 632963847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6330d8556812Smrg ;; 633163847c39Smrg aCC*) 6332d8556812Smrg case $host_cpu in 633363847c39Smrg hppa*64*) 633463847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 633563847c39Smrg ;; 633663847c39Smrg ia64*) 633763847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 633863847c39Smrg ;; 633963847c39Smrg *) 634063847c39Smrg _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' 634163847c39Smrg ;; 6342d8556812Smrg esac 634363847c39Smrg # Commands to make compiler produce verbose output that lists 634463847c39Smrg # what "hidden" libraries, object files and flags are used when 634563847c39Smrg # linking a shared library. 634663847c39Smrg # 634763847c39Smrg # There doesn't appear to be a way to prevent this compiler from 634863847c39Smrg # explicitly linking system object files so we need to strip them 634963847c39Smrg # from the output so that they don't get included in the library 635063847c39Smrg # dependencies. 635163847c39Smrg 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"' 6352d8556812Smrg ;; 635363847c39Smrg *) 635463847c39Smrg if test "$GXX" = yes; then 635563847c39Smrg if test $with_gnu_ld = no; then 635663847c39Smrg case $host_cpu in 635763847c39Smrg hppa*64*) 635863847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 635963847c39Smrg ;; 636063847c39Smrg ia64*) 636163847c39Smrg _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' 636263847c39Smrg ;; 636363847c39Smrg *) 636463847c39Smrg _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' 636563847c39Smrg ;; 636663847c39Smrg esac 636763847c39Smrg fi 636863847c39Smrg else 636963847c39Smrg # FIXME: insert proper C++ library support 637063847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 637163847c39Smrg fi 6372d8556812Smrg ;; 637363847c39Smrg esac 637463847c39Smrg ;; 637563847c39Smrg 637663847c39Smrg interix[[3-9]]*) 637763847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=no 637863847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 637963847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 638063847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 638163847c39Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 638263847c39Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 638363847c39Smrg # default) and relocated if they conflict, which is a slow very memory 638463847c39Smrg # consuming and fragmenting process. To avoid this, we pick a random, 638563847c39Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 638663847c39Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 638763847c39Smrg _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' 638863847c39Smrg _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' 6389d8556812Smrg ;; 639063847c39Smrg irix5* | irix6*) 639163847c39Smrg case $cc_basename in 639263847c39Smrg CC*) 639363847c39Smrg # SGI C++ 639463847c39Smrg _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' 639563847c39Smrg 639663847c39Smrg # Archives containing C++ object files must be created using 639763847c39Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 639863847c39Smrg # necessary to make sure instantiated templates are included 639963847c39Smrg # in the archive. 640063847c39Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6401d8556812Smrg ;; 640263847c39Smrg *) 640363847c39Smrg if test "$GXX" = yes; then 640463847c39Smrg if test "$with_gnu_ld" = no; then 640563847c39Smrg _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' 640663847c39Smrg else 640763847c39Smrg _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' 640863847c39Smrg fi 640963847c39Smrg fi 641063847c39Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6411d8556812Smrg ;; 641263847c39Smrg esac 641363847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 641463847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 641563847c39Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 641663847c39Smrg ;; 641763847c39Smrg 641863847c39Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 641963847c39Smrg case $cc_basename in 642063847c39Smrg KCC*) 642163847c39Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 642263847c39Smrg 642363847c39Smrg # KCC will only create a shared library if the output file 642463847c39Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 642563847c39Smrg # to its proper name (with version) after linking. 642663847c39Smrg _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' 642763847c39Smrg _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' 642863847c39Smrg # Commands to make compiler produce verbose output that lists 642963847c39Smrg # what "hidden" libraries, object files and flags are used when 643063847c39Smrg # linking a shared library. 643163847c39Smrg # 643263847c39Smrg # There doesn't appear to be a way to prevent this compiler from 643363847c39Smrg # explicitly linking system object files so we need to strip them 643463847c39Smrg # from the output so that they don't get included in the library 643563847c39Smrg # dependencies. 643663847c39Smrg 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"' 643763847c39Smrg 643863847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 643963847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 644063847c39Smrg 644163847c39Smrg # Archives containing C++ object files must be created using 644263847c39Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 644363847c39Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6444d8556812Smrg ;; 644563847c39Smrg icpc* | ecpc* ) 6446d8556812Smrg # Intel C++ 644763847c39Smrg with_gnu_ld=yes 644863847c39Smrg # version 8.0 and above of icpc choke on multiply defined symbols 644963847c39Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 645063847c39Smrg # earlier do not add the objects themselves. 645163847c39Smrg case `$CC -V 2>&1` in 645263847c39Smrg *"Version 7."*) 645363847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 645463847c39Smrg _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' 645563847c39Smrg ;; 645663847c39Smrg *) # Version 8.0 or newer 645763847c39Smrg tmp_idyn= 645863847c39Smrg case $host_cpu in 645963847c39Smrg ia64*) tmp_idyn=' -i_dynamic';; 646063847c39Smrg esac 646163847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 646263847c39Smrg _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' 646363847c39Smrg ;; 646463847c39Smrg esac 646563847c39Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 646663847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 646763847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 646863847c39Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6469d8556812Smrg ;; 647063847c39Smrg pgCC* | pgcpp*) 647163847c39Smrg # Portland Group C++ compiler 647263847c39Smrg case `$CC -V` in 647363847c39Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 647463847c39Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 647563847c39Smrg rm -rf $tpldir~ 647663847c39Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 647763847c39Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 647863847c39Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 647963847c39Smrg rm -rf $tpldir~ 648063847c39Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 648163847c39Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 648263847c39Smrg $RANLIB $oldlib' 648363847c39Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 648463847c39Smrg rm -rf $tpldir~ 648563847c39Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 648663847c39Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 648763847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 648863847c39Smrg rm -rf $tpldir~ 648963847c39Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 649063847c39Smrg $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' 649163847c39Smrg ;; 649263847c39Smrg *) # Version 6 and above use weak symbols 649363847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 649463847c39Smrg _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' 649563847c39Smrg ;; 649663847c39Smrg esac 649763847c39Smrg 649863847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 649963847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 650063847c39Smrg _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' 650163847c39Smrg ;; 6502d8556812Smrg cxx*) 6503d8556812Smrg # Compaq C++ 650463847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 650563847c39Smrg _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' 650663847c39Smrg 650763847c39Smrg runpath_var=LD_RUN_PATH 650863847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 650963847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 651063847c39Smrg 651163847c39Smrg # Commands to make compiler produce verbose output that lists 651263847c39Smrg # what "hidden" libraries, object files and flags are used when 651363847c39Smrg # linking a shared library. 651463847c39Smrg # 651563847c39Smrg # There doesn't appear to be a way to prevent this compiler from 651663847c39Smrg # explicitly linking system object files so we need to strip them 651763847c39Smrg # from the output so that they don't get included in the library 651863847c39Smrg # dependencies. 651963847c39Smrg 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' 652063847c39Smrg ;; 652163847c39Smrg xl* | mpixl* | bgxl*) 652263847c39Smrg # IBM XL 8.0 on PPC, with GNU ld 652363847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 652463847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 652563847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 652663847c39Smrg if test "x$supports_anon_versioning" = xyes; then 652763847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 652863847c39Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 652963847c39Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 653063847c39Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 653163847c39Smrg fi 6532d8556812Smrg ;; 6533d8556812Smrg *) 6534d8556812Smrg case `$CC -V 2>&1 | sed 5q` in 6535d8556812Smrg *Sun\ C*) 6536d8556812Smrg # Sun C++ 5.9 653763847c39Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 653863847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 653963847c39Smrg _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' 654063847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 654163847c39Smrg _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' 654263847c39Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 654363847c39Smrg 654463847c39Smrg # Not sure whether something based on 654563847c39Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 654663847c39Smrg # would be better. 654763847c39Smrg output_verbose_link_cmd='func_echo_all' 654863847c39Smrg 654963847c39Smrg # Archives containing C++ object files must be created using 655063847c39Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 655163847c39Smrg # necessary to make sure instantiated templates are included 655263847c39Smrg # in the archive. 655363847c39Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6554d8556812Smrg ;; 6555d8556812Smrg esac 6556d8556812Smrg ;; 6557d8556812Smrg esac 6558d8556812Smrg ;; 655963847c39Smrg 6560d8556812Smrg lynxos*) 656163847c39Smrg # FIXME: insert proper C++ library support 656263847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6563d8556812Smrg ;; 656463847c39Smrg 6565d8556812Smrg m88k*) 656663847c39Smrg # FIXME: insert proper C++ library support 656763847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6568d8556812Smrg ;; 656963847c39Smrg 6570d8556812Smrg mvs*) 657163847c39Smrg case $cc_basename in 657263847c39Smrg cxx*) 657363847c39Smrg # FIXME: insert proper C++ library support 657463847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6575d8556812Smrg ;; 6576d8556812Smrg *) 657763847c39Smrg # FIXME: insert proper C++ library support 657863847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6579d8556812Smrg ;; 6580d8556812Smrg esac 6581d8556812Smrg ;; 658263847c39Smrg 6583d8556812Smrg netbsd*) 658463847c39Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 658563847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 658663847c39Smrg wlarc= 658763847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 658863847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 658963847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 659063847c39Smrg fi 659163847c39Smrg # Workaround some broken pre-1.5 toolchains 659263847c39Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 659363847c39Smrg ;; 659463847c39Smrg 659563847c39Smrg *nto* | *qnx*) 659663847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 659763847c39Smrg ;; 659863847c39Smrg 659963847c39Smrg openbsd2*) 660063847c39Smrg # C++ shared libraries are fairly broken 660163847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 660263847c39Smrg ;; 660363847c39Smrg 660463847c39Smrg openbsd*) 660563847c39Smrg if test -f /usr/libexec/ld.so; then 660663847c39Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 660763847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 660863847c39Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 660963847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 661063847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 661163847c39Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 661263847c39Smrg _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' 661363847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 661463847c39Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 661563847c39Smrg fi 661663847c39Smrg output_verbose_link_cmd=func_echo_all 661763847c39Smrg else 661863847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 661963847c39Smrg fi 6620d8556812Smrg ;; 662163847c39Smrg 6622d8556812Smrg osf3* | osf4* | osf5*) 662363847c39Smrg case $cc_basename in 662463847c39Smrg KCC*) 662563847c39Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 662663847c39Smrg 662763847c39Smrg # KCC will only create a shared library if the output file 662863847c39Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 662963847c39Smrg # to its proper name (with version) after linking. 663063847c39Smrg _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' 663163847c39Smrg 663263847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 663363847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 663463847c39Smrg 663563847c39Smrg # Archives containing C++ object files must be created using 663663847c39Smrg # the KAI C++ compiler. 663763847c39Smrg case $host in 663863847c39Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 663963847c39Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 664063847c39Smrg esac 6641d8556812Smrg ;; 664263847c39Smrg RCC*) 6643d8556812Smrg # Rational C++ 2.4.1 664463847c39Smrg # FIXME: insert proper C++ library support 664563847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6646d8556812Smrg ;; 664763847c39Smrg cxx*) 664863847c39Smrg case $host in 664963847c39Smrg osf3*) 665063847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 665163847c39Smrg _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' 665263847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 665363847c39Smrg ;; 665463847c39Smrg *) 665563847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 665663847c39Smrg _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' 665763847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 665863847c39Smrg echo "-hidden">> $lib.exp~ 665963847c39Smrg $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~ 666063847c39Smrg $RM $lib.exp' 666163847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 666263847c39Smrg ;; 666363847c39Smrg esac 666463847c39Smrg 666563847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 666663847c39Smrg 666763847c39Smrg # Commands to make compiler produce verbose output that lists 666863847c39Smrg # what "hidden" libraries, object files and flags are used when 666963847c39Smrg # linking a shared library. 667063847c39Smrg # 667163847c39Smrg # There doesn't appear to be a way to prevent this compiler from 667263847c39Smrg # explicitly linking system object files so we need to strip them 667363847c39Smrg # from the output so that they don't get included in the library 667463847c39Smrg # dependencies. 667563847c39Smrg 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"' 6676d8556812Smrg ;; 6677d8556812Smrg *) 667863847c39Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 667963847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 668063847c39Smrg case $host in 668163847c39Smrg osf3*) 668263847c39Smrg _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' 668363847c39Smrg ;; 668463847c39Smrg *) 668563847c39Smrg _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' 668663847c39Smrg ;; 668763847c39Smrg esac 668863847c39Smrg 668963847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 669063847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 669163847c39Smrg 669263847c39Smrg # Commands to make compiler produce verbose output that lists 669363847c39Smrg # what "hidden" libraries, object files and flags are used when 669463847c39Smrg # linking a shared library. 669563847c39Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 669663847c39Smrg 669763847c39Smrg else 669863847c39Smrg # FIXME: insert proper C++ library support 669963847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 670063847c39Smrg fi 6701d8556812Smrg ;; 670263847c39Smrg esac 670363847c39Smrg ;; 670463847c39Smrg 6705d8556812Smrg psos*) 670663847c39Smrg # FIXME: insert proper C++ library support 670763847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 670863847c39Smrg ;; 670963847c39Smrg 6710d8556812Smrg sunos4*) 671163847c39Smrg case $cc_basename in 671263847c39Smrg CC*) 6713d8556812Smrg # Sun C++ 4.x 671463847c39Smrg # FIXME: insert proper C++ library support 671563847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6716d8556812Smrg ;; 671763847c39Smrg lcc*) 6718d8556812Smrg # Lucid 671963847c39Smrg # FIXME: insert proper C++ library support 672063847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6721d8556812Smrg ;; 672263847c39Smrg *) 672363847c39Smrg # FIXME: insert proper C++ library support 672463847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6725d8556812Smrg ;; 672663847c39Smrg esac 672763847c39Smrg ;; 67281ae1b5e8Smrg 672963847c39Smrg solaris*) 673063847c39Smrg case $cc_basename in 673163847c39Smrg CC* | sunCC*) 673263847c39Smrg # Sun C++ 4.2, 5.x and Centerline C++ 673363847c39Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 673463847c39Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 673563847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 673663847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 673763847c39Smrg $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' 673863847c39Smrg 673963847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 674063847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 674163847c39Smrg case $host_os in 674263847c39Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 674363847c39Smrg *) 674463847c39Smrg # The compiler driver will combine and reorder linker options, 674563847c39Smrg # but understands `-z linker_flag'. 674663847c39Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 674763847c39Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 674863847c39Smrg ;; 674963847c39Smrg esac 675063847c39Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 67511ae1b5e8Smrg 675263847c39Smrg output_verbose_link_cmd='func_echo_all' 67531ae1b5e8Smrg 675463847c39Smrg # Archives containing C++ object files must be created using 675563847c39Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 675663847c39Smrg # necessary to make sure instantiated templates are included 675763847c39Smrg # in the archive. 675863847c39Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 675963847c39Smrg ;; 676063847c39Smrg gcx*) 676163847c39Smrg # Green Hills C++ Compiler 676263847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 67631ae1b5e8Smrg 676463847c39Smrg # The C++ compiler must be used to create the archive. 676563847c39Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 676663847c39Smrg ;; 676763847c39Smrg *) 676863847c39Smrg # GNU C++ compiler with Solaris linker 676963847c39Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 677063847c39Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 677163847c39Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 677263847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 677363847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 677463847c39Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 677563847c39Smrg 677663847c39Smrg # Commands to make compiler produce verbose output that lists 677763847c39Smrg # what "hidden" libraries, object files and flags are used when 677863847c39Smrg # linking a shared library. 677963847c39Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 678063847c39Smrg else 678163847c39Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 678263847c39Smrg # platform. 678363847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 678463847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 678563847c39Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 678663847c39Smrg 678763847c39Smrg # Commands to make compiler produce verbose output that lists 678863847c39Smrg # what "hidden" libraries, object files and flags are used when 678963847c39Smrg # linking a shared library. 679063847c39Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 679163847c39Smrg fi 679263847c39Smrg 679363847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 679463847c39Smrg case $host_os in 679563847c39Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 679663847c39Smrg *) 679763847c39Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 679863847c39Smrg ;; 679963847c39Smrg esac 680063847c39Smrg fi 680163847c39Smrg ;; 680263847c39Smrg esac 680363847c39Smrg ;; 68041ae1b5e8Smrg 680563847c39Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 680663847c39Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 680763847c39Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 680863847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 680963847c39Smrg runpath_var='LD_RUN_PATH' 68101ae1b5e8Smrg 6811d8556812Smrg case $cc_basename in 681263847c39Smrg CC*) 681363847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 681463847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6815d8556812Smrg ;; 681663847c39Smrg *) 681763847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 681863847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6819d8556812Smrg ;; 6820d8556812Smrg esac 6821d8556812Smrg ;; 68221ae1b5e8Smrg 682363847c39Smrg sysv5* | sco3.2v5* | sco5v6*) 682463847c39Smrg # Note: We can NOT use -z defs as we might desire, because we do not 682563847c39Smrg # link with -lc, and that would cause any symbols used from libc to 682663847c39Smrg # always be unresolved, which means just about no library would 682763847c39Smrg # ever link correctly. If we're not using GNU ld we use -z text 682863847c39Smrg # though, which does catch some bad symbols but isn't as heavy-handed 682963847c39Smrg # as -z defs. 683063847c39Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 683163847c39Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 683263847c39Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 683363847c39Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 683463847c39Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 683563847c39Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 683663847c39Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 683763847c39Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 683863847c39Smrg runpath_var='LD_RUN_PATH' 68391ae1b5e8Smrg 684063847c39Smrg case $cc_basename in 684163847c39Smrg CC*) 684263847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 684363847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 684463847c39Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 684563847c39Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 684663847c39Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 684763847c39Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 684863847c39Smrg ;; 684963847c39Smrg *) 685063847c39Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 685163847c39Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 685263847c39Smrg ;; 685363847c39Smrg esac 6854d8556812Smrg ;; 68551ae1b5e8Smrg 685663847c39Smrg tandem*) 685763847c39Smrg case $cc_basename in 685863847c39Smrg NCC*) 685963847c39Smrg # NonStop-UX NCC 3.20 686063847c39Smrg # FIXME: insert proper C++ library support 686163847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 686263847c39Smrg ;; 686363847c39Smrg *) 686463847c39Smrg # FIXME: insert proper C++ library support 686563847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 686663847c39Smrg ;; 686763847c39Smrg esac 686863847c39Smrg ;; 68691ae1b5e8Smrg 687063847c39Smrg vxworks*) 687163847c39Smrg # FIXME: insert proper C++ library support 687263847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 687363847c39Smrg ;; 68741ae1b5e8Smrg 687563847c39Smrg *) 687663847c39Smrg # FIXME: insert proper C++ library support 687763847c39Smrg _LT_TAGVAR(ld_shlibs, $1)=no 687863847c39Smrg ;; 6879d8556812Smrg esac 688076888252Smrg 688163847c39Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 688263847c39Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 688363847c39Smrg 688463847c39Smrg _LT_TAGVAR(GCC, $1)="$GXX" 688563847c39Smrg _LT_TAGVAR(LD, $1)="$LD" 688663847c39Smrg 688763847c39Smrg ## CAVEAT EMPTOR: 688863847c39Smrg ## There is no encapsulation within the following macros, do not change 688963847c39Smrg ## the running order or otherwise move them around unless you know exactly 689063847c39Smrg ## what you are doing... 689163847c39Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 689263847c39Smrg _LT_COMPILER_PIC($1) 689363847c39Smrg _LT_COMPILER_C_O($1) 689463847c39Smrg _LT_COMPILER_FILE_LOCKS($1) 689563847c39Smrg _LT_LINKER_SHLIBS($1) 689663847c39Smrg _LT_SYS_DYNAMIC_LINKER($1) 689763847c39Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 689863847c39Smrg 689963847c39Smrg _LT_CONFIG($1) 690063847c39Smrg fi # test -n "$compiler" 690163847c39Smrg 690263847c39Smrg CC=$lt_save_CC 690363847c39Smrg CFLAGS=$lt_save_CFLAGS 690463847c39Smrg LDCXX=$LD 690563847c39Smrg LD=$lt_save_LD 690663847c39Smrg GCC=$lt_save_GCC 690763847c39Smrg with_gnu_ld=$lt_save_with_gnu_ld 690863847c39Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 690963847c39Smrg lt_cv_path_LD=$lt_save_path_LD 691063847c39Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 691163847c39Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 691263847c39Smrgfi # test "$_lt_caught_CXX_error" != yes 691376888252Smrg 691463847c39SmrgAC_LANG_POP 691563847c39Smrg])# _LT_LANG_CXX_CONFIG 691663847c39Smrg 691763847c39Smrg 691863847c39Smrg# _LT_FUNC_STRIPNAME_CNF 691963847c39Smrg# ---------------------- 692063847c39Smrg# func_stripname_cnf prefix suffix name 692163847c39Smrg# strip PREFIX and SUFFIX off of NAME. 692263847c39Smrg# PREFIX and SUFFIX must not contain globbing or regex special 692363847c39Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 692463847c39Smrg# dot (in which case that matches only a dot). 6925d8556812Smrg# 692663847c39Smrg# This function is identical to the (non-XSI) version of func_stripname, 692763847c39Smrg# except this one can be used by m4 code that may be executed by configure, 692863847c39Smrg# rather than the libtool script. 692963847c39Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 693063847c39SmrgAC_REQUIRE([_LT_DECL_SED]) 693163847c39SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 693263847c39Smrgfunc_stripname_cnf () 693363847c39Smrg{ 693463847c39Smrg case ${2} in 693563847c39Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 693663847c39Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 693763847c39Smrg esac 693863847c39Smrg} # func_stripname_cnf 693963847c39Smrg])# _LT_FUNC_STRIPNAME_CNF 694063847c39Smrg 694163847c39Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 694263847c39Smrg# --------------------------------- 694363847c39Smrg# Figure out "hidden" library dependencies from verbose 694463847c39Smrg# compiler output when linking a shared library. 694563847c39Smrg# Parse the compiler output and extract the necessary 694663847c39Smrg# objects, libraries and library flags. 694763847c39Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 694863847c39Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 694963847c39SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 695063847c39Smrg# Dependencies to place before and after the object being linked: 695163847c39Smrg_LT_TAGVAR(predep_objects, $1)= 695263847c39Smrg_LT_TAGVAR(postdep_objects, $1)= 695363847c39Smrg_LT_TAGVAR(predeps, $1)= 695463847c39Smrg_LT_TAGVAR(postdeps, $1)= 695563847c39Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 695663847c39Smrg 695763847c39Smrgdnl we can't use the lt_simple_compile_test_code here, 695863847c39Smrgdnl because it contains code intended for an executable, 695963847c39Smrgdnl not a library. It's possible we should let each 696063847c39Smrgdnl tag define a new lt_????_link_test_code variable, 696163847c39Smrgdnl but it's only used here... 696263847c39Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 696363847c39Smrgint a; 696463847c39Smrgvoid foo (void) { a = 0; } 696563847c39Smrg_LT_EOF 696663847c39Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 696763847c39Smrgclass Foo 696863847c39Smrg{ 696963847c39Smrgpublic: 697063847c39Smrg Foo (void) { a = 0; } 697163847c39Smrgprivate: 697263847c39Smrg int a; 697363847c39Smrg}; 697463847c39Smrg_LT_EOF 697563847c39Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 697663847c39Smrg subroutine foo 697763847c39Smrg implicit none 697863847c39Smrg integer*4 a 697963847c39Smrg a=0 698063847c39Smrg return 698163847c39Smrg end 698263847c39Smrg_LT_EOF 698363847c39Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 698463847c39Smrg subroutine foo 698563847c39Smrg implicit none 698663847c39Smrg integer a 698763847c39Smrg a=0 698863847c39Smrg return 698963847c39Smrg end 699063847c39Smrg_LT_EOF 699163847c39Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 699263847c39Smrgpublic class foo { 699363847c39Smrg private int a; 699463847c39Smrg public void bar (void) { 699563847c39Smrg a = 0; 699663847c39Smrg } 699763847c39Smrg}; 699863847c39Smrg_LT_EOF 699963847c39Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 700063847c39Smrgpackage foo 700163847c39Smrgfunc foo() { 700263847c39Smrg} 700363847c39Smrg_LT_EOF 7004d8556812Smrg]) 700576888252Smrg 700663847c39Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 700763847c39Smrgcase "$CC $CFLAGS " in #( 700863847c39Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 700963847c39Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 701063847c39Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 701163847c39Smrgesac 701276888252Smrg 701363847c39Smrgdnl Parse the compiler output and extract the necessary 701463847c39Smrgdnl objects, libraries and library flags. 701563847c39Smrgif AC_TRY_EVAL(ac_compile); then 701663847c39Smrg # Parse the compiler output and extract the necessary 701763847c39Smrg # objects, libraries and library flags. 701876888252Smrg 701963847c39Smrg # Sentinel used to keep track of whether or not we are before 702063847c39Smrg # the conftest object file. 702163847c39Smrg pre_test_object_deps_done=no 70221ae1b5e8Smrg 702363847c39Smrg for p in `eval "$output_verbose_link_cmd"`; do 702463847c39Smrg case ${prev}${p} in 70251ae1b5e8Smrg 702663847c39Smrg -L* | -R* | -l*) 702763847c39Smrg # Some compilers place space between "-{L,R}" and the path. 702863847c39Smrg # Remove the space. 702963847c39Smrg if test $p = "-L" || 703063847c39Smrg test $p = "-R"; then 703163847c39Smrg prev=$p 703263847c39Smrg continue 703363847c39Smrg fi 70341ae1b5e8Smrg 703563847c39Smrg # Expand the sysroot to ease extracting the directories later. 703663847c39Smrg if test -z "$prev"; then 703763847c39Smrg case $p in 703863847c39Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 703963847c39Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 704063847c39Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 704163847c39Smrg esac 704263847c39Smrg fi 704363847c39Smrg case $p in 704463847c39Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 704563847c39Smrg esac 704663847c39Smrg if test "$pre_test_object_deps_done" = no; then 704763847c39Smrg case ${prev} in 704863847c39Smrg -L | -R) 704963847c39Smrg # Internal compiler library paths should come after those 705063847c39Smrg # provided the user. The postdeps already come after the 705163847c39Smrg # user supplied libs so there is no need to process them. 705263847c39Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 705363847c39Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 705463847c39Smrg else 705563847c39Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 705663847c39Smrg fi 705763847c39Smrg ;; 705863847c39Smrg # The "-l" case would never come before the object being 705963847c39Smrg # linked, so don't bother handling this case. 706063847c39Smrg esac 706163847c39Smrg else 706263847c39Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 706363847c39Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 706463847c39Smrg else 706563847c39Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 706663847c39Smrg fi 706763847c39Smrg fi 706863847c39Smrg prev= 706963847c39Smrg ;; 70701ae1b5e8Smrg 707163847c39Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 707263847c39Smrg *.$objext) 707363847c39Smrg # This assumes that the test object file only shows up 707463847c39Smrg # once in the compiler output. 707563847c39Smrg if test "$p" = "conftest.$objext"; then 707663847c39Smrg pre_test_object_deps_done=yes 707763847c39Smrg continue 707863847c39Smrg fi 70791ae1b5e8Smrg 708063847c39Smrg if test "$pre_test_object_deps_done" = no; then 708163847c39Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 708263847c39Smrg _LT_TAGVAR(predep_objects, $1)="$p" 708363847c39Smrg else 708463847c39Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 708563847c39Smrg fi 708663847c39Smrg else 708763847c39Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 708863847c39Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 708963847c39Smrg else 709063847c39Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 709163847c39Smrg fi 709263847c39Smrg fi 709363847c39Smrg ;; 70941ae1b5e8Smrg 709563847c39Smrg *) ;; # Ignore the rest. 70961ae1b5e8Smrg 709763847c39Smrg esac 709863847c39Smrg done 70991ae1b5e8Smrg 710063847c39Smrg # Clean up. 710163847c39Smrg rm -f a.out a.exe 710263847c39Smrgelse 710363847c39Smrg echo "libtool.m4: error: problem compiling $1 test program" 710463847c39Smrgfi 71051ae1b5e8Smrg 710663847c39Smrg$RM -f confest.$objext 710763847c39SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 710863847c39Smrg 710963847c39Smrg# PORTME: override above test on systems where it is broken 711063847c39Smrgm4_if([$1], [CXX], 711163847c39Smrg[case $host_os in 711263847c39Smrginterix[[3-9]]*) 711363847c39Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 711463847c39Smrg # hack all around it, let's just trust "g++" to DTRT. 711563847c39Smrg _LT_TAGVAR(predep_objects,$1)= 711663847c39Smrg _LT_TAGVAR(postdep_objects,$1)= 711763847c39Smrg _LT_TAGVAR(postdeps,$1)= 711863847c39Smrg ;; 71191ae1b5e8Smrg 712063847c39Smrglinux*) 712163847c39Smrg case `$CC -V 2>&1 | sed 5q` in 712263847c39Smrg *Sun\ C*) 712363847c39Smrg # Sun C++ 5.9 712463847c39Smrg 712563847c39Smrg # The more standards-conforming stlport4 library is 712663847c39Smrg # incompatible with the Cstd library. Avoid specifying 712763847c39Smrg # it if it's in CXXFLAGS. Ignore libCrun as 712863847c39Smrg # -library=stlport4 depends on it. 712963847c39Smrg case " $CXX $CXXFLAGS " in 713063847c39Smrg *" -library=stlport4 "*) 713163847c39Smrg solaris_use_stlport4=yes 7132d8556812Smrg ;; 713363847c39Smrg esac 71341ae1b5e8Smrg 713563847c39Smrg if test "$solaris_use_stlport4" != yes; then 713663847c39Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 713763847c39Smrg fi 713863847c39Smrg ;; 713963847c39Smrg esac 714063847c39Smrg ;; 714163847c39Smrg 714263847c39Smrgsolaris*) 714363847c39Smrg case $cc_basename in 714463847c39Smrg CC* | sunCC*) 714563847c39Smrg # The more standards-conforming stlport4 library is 714663847c39Smrg # incompatible with the Cstd library. Avoid specifying 714763847c39Smrg # it if it's in CXXFLAGS. Ignore libCrun as 714863847c39Smrg # -library=stlport4 depends on it. 714963847c39Smrg case " $CXX $CXXFLAGS " in 715063847c39Smrg *" -library=stlport4 "*) 715163847c39Smrg solaris_use_stlport4=yes 7152d8556812Smrg ;; 715363847c39Smrg esac 715476888252Smrg 715563847c39Smrg # Adding this requires a known-good setup of shared libraries for 715663847c39Smrg # Sun compiler versions before 5.6, else PIC objects from an old 715763847c39Smrg # archive will be linked into the output, leading to subtle bugs. 715863847c39Smrg if test "$solaris_use_stlport4" != yes; then 715963847c39Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 716063847c39Smrg fi 716163847c39Smrg ;; 716263847c39Smrg esac 716363847c39Smrg ;; 716463847c39Smrgesac 716563847c39Smrg]) 716676888252Smrg 716763847c39Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 716863847c39Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 716963847c39Smrgesac 717063847c39Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 717163847c39Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 717263847c39Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 717363847c39Smrgfi 717463847c39Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 717563847c39Smrg [The directories searched by this compiler when creating a shared library]) 717663847c39Smrg_LT_TAGDECL([], [predep_objects], [1], 717763847c39Smrg [Dependencies to place before and after the objects being linked to 717863847c39Smrg create a shared library]) 717963847c39Smrg_LT_TAGDECL([], [postdep_objects], [1]) 718063847c39Smrg_LT_TAGDECL([], [predeps], [1]) 718163847c39Smrg_LT_TAGDECL([], [postdeps], [1]) 718263847c39Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 718363847c39Smrg [The library search path used internally by the compiler when linking 718463847c39Smrg a shared library]) 718563847c39Smrg])# _LT_SYS_HIDDEN_LIBDEPS 718663847c39Smrg 718763847c39Smrg 718863847c39Smrg# _LT_LANG_F77_CONFIG([TAG]) 718963847c39Smrg# -------------------------- 719063847c39Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 719163847c39Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 719263847c39Smrg# to write the compiler configuration to `libtool'. 719363847c39Smrgm4_defun([_LT_LANG_F77_CONFIG], 719463847c39Smrg[AC_LANG_PUSH(Fortran 77) 719563847c39Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 719663847c39Smrg _lt_disable_F77=yes 719763847c39Smrgfi 719876888252Smrg 719963847c39Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 720063847c39Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 720163847c39Smrg_LT_TAGVAR(always_export_symbols, $1)=no 720263847c39Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 720363847c39Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 720463847c39Smrg_LT_TAGVAR(hardcode_direct, $1)=no 720563847c39Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 720663847c39Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 720763847c39Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 720863847c39Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 720963847c39Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 721063847c39Smrg_LT_TAGVAR(inherit_rpath, $1)=no 721163847c39Smrg_LT_TAGVAR(module_cmds, $1)= 721263847c39Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 721363847c39Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 721463847c39Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 721563847c39Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 721663847c39Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 721763847c39Smrg_LT_TAGVAR(no_undefined_flag, $1)= 721863847c39Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 721963847c39Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 722076888252Smrg 722163847c39Smrg# Source file extension for f77 test sources. 722263847c39Smrgac_ext=f 722376888252Smrg 722463847c39Smrg# Object file extension for compiled f77 test sources. 722563847c39Smrgobjext=o 722663847c39Smrg_LT_TAGVAR(objext, $1)=$objext 722763847c39Smrg 722863847c39Smrg# No sense in running all these tests if we already determined that 722963847c39Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 723063847c39Smrg# are currently assumed to apply to all compilers on this platform, 723163847c39Smrg# and will be corrupted by setting them based on a non-working compiler. 723263847c39Smrgif test "$_lt_disable_F77" != yes; then 723363847c39Smrg # Code to be used in simple compile tests 723463847c39Smrg lt_simple_compile_test_code="\ 723563847c39Smrg subroutine t 723663847c39Smrg return 723763847c39Smrg end 723863847c39Smrg" 723976888252Smrg 724063847c39Smrg # Code to be used in simple link tests 724163847c39Smrg lt_simple_link_test_code="\ 724263847c39Smrg program t 724363847c39Smrg end 724463847c39Smrg" 724576888252Smrg 724663847c39Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 724763847c39Smrg _LT_TAG_COMPILER 724863847c39Smrg 724963847c39Smrg # save warnings/boilerplate of simple test code 725063847c39Smrg _LT_COMPILER_BOILERPLATE 725163847c39Smrg _LT_LINKER_BOILERPLATE 725263847c39Smrg 725363847c39Smrg # Allow CC to be a program name with arguments. 725463847c39Smrg lt_save_CC="$CC" 725563847c39Smrg lt_save_GCC=$GCC 725663847c39Smrg lt_save_CFLAGS=$CFLAGS 725763847c39Smrg CC=${F77-"f77"} 725863847c39Smrg CFLAGS=$FFLAGS 725963847c39Smrg compiler=$CC 726063847c39Smrg _LT_TAGVAR(compiler, $1)=$CC 726163847c39Smrg _LT_CC_BASENAME([$compiler]) 726263847c39Smrg GCC=$G77 726363847c39Smrg if test -n "$compiler"; then 726463847c39Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 726563847c39Smrg AC_MSG_RESULT([$can_build_shared]) 726676888252Smrg 726763847c39Smrg AC_MSG_CHECKING([whether to build shared libraries]) 726863847c39Smrg test "$can_build_shared" = "no" && enable_shared=no 726976888252Smrg 727063847c39Smrg # On AIX, shared libraries and static libraries use the same namespace, and 727163847c39Smrg # are all built from PIC. 7272d8556812Smrg case $host_os in 727363847c39Smrg aix3*) 727463847c39Smrg test "$enable_shared" = yes && enable_static=no 727563847c39Smrg if test -n "$RANLIB"; then 727663847c39Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 727763847c39Smrg postinstall_cmds='$RANLIB $lib' 727863847c39Smrg fi 727963847c39Smrg ;; 728063847c39Smrg aix[[4-9]]*) 728163847c39Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 728263847c39Smrg test "$enable_shared" = yes && enable_static=no 7283d8556812Smrg fi 728463847c39Smrg ;; 728563847c39Smrg esac 728663847c39Smrg AC_MSG_RESULT([$enable_shared]) 728763847c39Smrg 728863847c39Smrg AC_MSG_CHECKING([whether to build static libraries]) 728963847c39Smrg # Make sure either enable_shared or enable_static is yes. 729063847c39Smrg test "$enable_shared" = yes || enable_static=yes 729163847c39Smrg AC_MSG_RESULT([$enable_static]) 729263847c39Smrg 729363847c39Smrg _LT_TAGVAR(GCC, $1)="$G77" 729463847c39Smrg _LT_TAGVAR(LD, $1)="$LD" 729563847c39Smrg 729663847c39Smrg ## CAVEAT EMPTOR: 729763847c39Smrg ## There is no encapsulation within the following macros, do not change 729863847c39Smrg ## the running order or otherwise move them around unless you know exactly 729963847c39Smrg ## what you are doing... 730063847c39Smrg _LT_COMPILER_PIC($1) 730163847c39Smrg _LT_COMPILER_C_O($1) 730263847c39Smrg _LT_COMPILER_FILE_LOCKS($1) 730363847c39Smrg _LT_LINKER_SHLIBS($1) 730463847c39Smrg _LT_SYS_DYNAMIC_LINKER($1) 730563847c39Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 730663847c39Smrg 730763847c39Smrg _LT_CONFIG($1) 730863847c39Smrg fi # test -n "$compiler" 730963847c39Smrg 731063847c39Smrg GCC=$lt_save_GCC 731163847c39Smrg CC="$lt_save_CC" 731263847c39Smrg CFLAGS="$lt_save_CFLAGS" 731363847c39Smrgfi # test "$_lt_disable_F77" != yes 731476888252Smrg 731563847c39SmrgAC_LANG_POP 731663847c39Smrg])# _LT_LANG_F77_CONFIG 731776888252Smrg 731876888252Smrg 731963847c39Smrg# _LT_LANG_FC_CONFIG([TAG]) 732063847c39Smrg# ------------------------- 732163847c39Smrg# Ensure that the configuration variables for a Fortran compiler are 732263847c39Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 732363847c39Smrg# to write the compiler configuration to `libtool'. 732463847c39Smrgm4_defun([_LT_LANG_FC_CONFIG], 732563847c39Smrg[AC_LANG_PUSH(Fortran) 732663847c39Smrg 732763847c39Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 732863847c39Smrg _lt_disable_FC=yes 732963847c39Smrgfi 733076888252Smrg 733163847c39Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 733263847c39Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 733363847c39Smrg_LT_TAGVAR(always_export_symbols, $1)=no 733463847c39Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 733563847c39Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 733663847c39Smrg_LT_TAGVAR(hardcode_direct, $1)=no 733763847c39Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 733863847c39Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 733963847c39Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 734063847c39Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 734163847c39Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 734263847c39Smrg_LT_TAGVAR(inherit_rpath, $1)=no 734363847c39Smrg_LT_TAGVAR(module_cmds, $1)= 734463847c39Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 734563847c39Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 734663847c39Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 734763847c39Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 734863847c39Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 734963847c39Smrg_LT_TAGVAR(no_undefined_flag, $1)= 735063847c39Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 735163847c39Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 735263847c39Smrg 735363847c39Smrg# Source file extension for fc test sources. 735463847c39Smrgac_ext=${ac_fc_srcext-f} 735563847c39Smrg 735663847c39Smrg# Object file extension for compiled fc test sources. 735763847c39Smrgobjext=o 735863847c39Smrg_LT_TAGVAR(objext, $1)=$objext 735963847c39Smrg 736063847c39Smrg# No sense in running all these tests if we already determined that 736163847c39Smrg# the FC compiler isn't working. Some variables (like enable_shared) 736263847c39Smrg# are currently assumed to apply to all compilers on this platform, 736363847c39Smrg# and will be corrupted by setting them based on a non-working compiler. 736463847c39Smrgif test "$_lt_disable_FC" != yes; then 736563847c39Smrg # Code to be used in simple compile tests 736663847c39Smrg lt_simple_compile_test_code="\ 736763847c39Smrg subroutine t 736863847c39Smrg return 736963847c39Smrg end 737063847c39Smrg" 737176888252Smrg 737263847c39Smrg # Code to be used in simple link tests 737363847c39Smrg lt_simple_link_test_code="\ 737463847c39Smrg program t 737563847c39Smrg end 737663847c39Smrg" 737776888252Smrg 737863847c39Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 737963847c39Smrg _LT_TAG_COMPILER 738063847c39Smrg 738163847c39Smrg # save warnings/boilerplate of simple test code 738263847c39Smrg _LT_COMPILER_BOILERPLATE 738363847c39Smrg _LT_LINKER_BOILERPLATE 738463847c39Smrg 738563847c39Smrg # Allow CC to be a program name with arguments. 738663847c39Smrg lt_save_CC="$CC" 738763847c39Smrg lt_save_GCC=$GCC 738863847c39Smrg lt_save_CFLAGS=$CFLAGS 738963847c39Smrg CC=${FC-"f95"} 739063847c39Smrg CFLAGS=$FCFLAGS 739163847c39Smrg compiler=$CC 739263847c39Smrg GCC=$ac_cv_fc_compiler_gnu 739363847c39Smrg 739463847c39Smrg _LT_TAGVAR(compiler, $1)=$CC 739563847c39Smrg _LT_CC_BASENAME([$compiler]) 739663847c39Smrg 739763847c39Smrg if test -n "$compiler"; then 739863847c39Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 739963847c39Smrg AC_MSG_RESULT([$can_build_shared]) 740063847c39Smrg 740163847c39Smrg AC_MSG_CHECKING([whether to build shared libraries]) 740263847c39Smrg test "$can_build_shared" = "no" && enable_shared=no 740363847c39Smrg 740463847c39Smrg # On AIX, shared libraries and static libraries use the same namespace, and 740563847c39Smrg # are all built from PIC. 740663847c39Smrg case $host_os in 740763847c39Smrg aix3*) 740863847c39Smrg test "$enable_shared" = yes && enable_static=no 740963847c39Smrg if test -n "$RANLIB"; then 741063847c39Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 741163847c39Smrg postinstall_cmds='$RANLIB $lib' 741263847c39Smrg fi 741363847c39Smrg ;; 741463847c39Smrg aix[[4-9]]*) 741563847c39Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 741663847c39Smrg test "$enable_shared" = yes && enable_static=no 7417d8556812Smrg fi 741863847c39Smrg ;; 741963847c39Smrg esac 742063847c39Smrg AC_MSG_RESULT([$enable_shared]) 742163847c39Smrg 742263847c39Smrg AC_MSG_CHECKING([whether to build static libraries]) 742363847c39Smrg # Make sure either enable_shared or enable_static is yes. 742463847c39Smrg test "$enable_shared" = yes || enable_static=yes 742563847c39Smrg AC_MSG_RESULT([$enable_static]) 742663847c39Smrg 742763847c39Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 742863847c39Smrg _LT_TAGVAR(LD, $1)="$LD" 742963847c39Smrg 743063847c39Smrg ## CAVEAT EMPTOR: 743163847c39Smrg ## There is no encapsulation within the following macros, do not change 743263847c39Smrg ## the running order or otherwise move them around unless you know exactly 743363847c39Smrg ## what you are doing... 743463847c39Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 743563847c39Smrg _LT_COMPILER_PIC($1) 743663847c39Smrg _LT_COMPILER_C_O($1) 743763847c39Smrg _LT_COMPILER_FILE_LOCKS($1) 743863847c39Smrg _LT_LINKER_SHLIBS($1) 743963847c39Smrg _LT_SYS_DYNAMIC_LINKER($1) 744063847c39Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 744163847c39Smrg 744263847c39Smrg _LT_CONFIG($1) 744363847c39Smrg fi # test -n "$compiler" 744463847c39Smrg 744563847c39Smrg GCC=$lt_save_GCC 744663847c39Smrg CC=$lt_save_CC 744763847c39Smrg CFLAGS=$lt_save_CFLAGS 744863847c39Smrgfi # test "$_lt_disable_FC" != yes 744976888252Smrg 745063847c39SmrgAC_LANG_POP 745163847c39Smrg])# _LT_LANG_FC_CONFIG 745276888252Smrg 745376888252Smrg 745463847c39Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 745563847c39Smrg# -------------------------- 745663847c39Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 745763847c39Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 745863847c39Smrg# to write the compiler configuration to `libtool'. 745963847c39Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 746063847c39Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 746163847c39SmrgAC_LANG_SAVE 746276888252Smrg 746363847c39Smrg# Source file extension for Java test sources. 746463847c39Smrgac_ext=java 746576888252Smrg 746663847c39Smrg# Object file extension for compiled Java test sources. 746763847c39Smrgobjext=o 746863847c39Smrg_LT_TAGVAR(objext, $1)=$objext 746976888252Smrg 747063847c39Smrg# Code to be used in simple compile tests 747163847c39Smrglt_simple_compile_test_code="class foo {}" 747276888252Smrg 747363847c39Smrg# Code to be used in simple link tests 747463847c39Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 747563847c39Smrg 747663847c39Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 747763847c39Smrg_LT_TAG_COMPILER 747863847c39Smrg 747963847c39Smrg# save warnings/boilerplate of simple test code 748063847c39Smrg_LT_COMPILER_BOILERPLATE 748163847c39Smrg_LT_LINKER_BOILERPLATE 748263847c39Smrg 748363847c39Smrg# Allow CC to be a program name with arguments. 748463847c39Smrglt_save_CC=$CC 748563847c39Smrglt_save_CFLAGS=$CFLAGS 748663847c39Smrglt_save_GCC=$GCC 748763847c39SmrgGCC=yes 748863847c39SmrgCC=${GCJ-"gcj"} 748963847c39SmrgCFLAGS=$GCJFLAGS 749063847c39Smrgcompiler=$CC 749163847c39Smrg_LT_TAGVAR(compiler, $1)=$CC 749263847c39Smrg_LT_TAGVAR(LD, $1)="$LD" 749363847c39Smrg_LT_CC_BASENAME([$compiler]) 749476888252Smrg 749563847c39Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 749663847c39Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 749776888252Smrg 749863847c39Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 749963847c39Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 750063847c39Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 750176888252Smrg 750263847c39Smrgif test -n "$compiler"; then 750363847c39Smrg _LT_COMPILER_NO_RTTI($1) 750463847c39Smrg _LT_COMPILER_PIC($1) 750563847c39Smrg _LT_COMPILER_C_O($1) 750663847c39Smrg _LT_COMPILER_FILE_LOCKS($1) 750763847c39Smrg _LT_LINKER_SHLIBS($1) 750863847c39Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 750976888252Smrg 751063847c39Smrg _LT_CONFIG($1) 751163847c39Smrgfi 751276888252Smrg 751363847c39SmrgAC_LANG_RESTORE 751476888252Smrg 751563847c39SmrgGCC=$lt_save_GCC 751663847c39SmrgCC=$lt_save_CC 751763847c39SmrgCFLAGS=$lt_save_CFLAGS 751863847c39Smrg])# _LT_LANG_GCJ_CONFIG 751976888252Smrg 752076888252Smrg 752163847c39Smrg# _LT_LANG_GO_CONFIG([TAG]) 752263847c39Smrg# -------------------------- 752363847c39Smrg# Ensure that the configuration variables for the GNU Go compiler 752463847c39Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 752563847c39Smrg# to write the compiler configuration to `libtool'. 752663847c39Smrgm4_defun([_LT_LANG_GO_CONFIG], 752763847c39Smrg[AC_REQUIRE([LT_PROG_GO])dnl 752863847c39SmrgAC_LANG_SAVE 752976888252Smrg 753063847c39Smrg# Source file extension for Go test sources. 753163847c39Smrgac_ext=go 753276888252Smrg 753363847c39Smrg# Object file extension for compiled Go test sources. 753463847c39Smrgobjext=o 753563847c39Smrg_LT_TAGVAR(objext, $1)=$objext 753676888252Smrg 753763847c39Smrg# Code to be used in simple compile tests 753863847c39Smrglt_simple_compile_test_code="package main; func main() { }" 753976888252Smrg 754063847c39Smrg# Code to be used in simple link tests 754163847c39Smrglt_simple_link_test_code='package main; func main() { }' 754276888252Smrg 754363847c39Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 754463847c39Smrg_LT_TAG_COMPILER 754576888252Smrg 754663847c39Smrg# save warnings/boilerplate of simple test code 754763847c39Smrg_LT_COMPILER_BOILERPLATE 754863847c39Smrg_LT_LINKER_BOILERPLATE 754976888252Smrg 755063847c39Smrg# Allow CC to be a program name with arguments. 755163847c39Smrglt_save_CC=$CC 755263847c39Smrglt_save_CFLAGS=$CFLAGS 755363847c39Smrglt_save_GCC=$GCC 755463847c39SmrgGCC=yes 755563847c39SmrgCC=${GOC-"gccgo"} 755663847c39SmrgCFLAGS=$GOFLAGS 755763847c39Smrgcompiler=$CC 755863847c39Smrg_LT_TAGVAR(compiler, $1)=$CC 755963847c39Smrg_LT_TAGVAR(LD, $1)="$LD" 756063847c39Smrg_LT_CC_BASENAME([$compiler]) 756176888252Smrg 756263847c39Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 756363847c39Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 756476888252Smrg 756563847c39Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 756663847c39Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 756763847c39Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 756876888252Smrg 756963847c39Smrgif test -n "$compiler"; then 757063847c39Smrg _LT_COMPILER_NO_RTTI($1) 757163847c39Smrg _LT_COMPILER_PIC($1) 757263847c39Smrg _LT_COMPILER_C_O($1) 757363847c39Smrg _LT_COMPILER_FILE_LOCKS($1) 757463847c39Smrg _LT_LINKER_SHLIBS($1) 757563847c39Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 757676888252Smrg 757763847c39Smrg _LT_CONFIG($1) 757863847c39Smrgfi 757976888252Smrg 758063847c39SmrgAC_LANG_RESTORE 758176888252Smrg 758263847c39SmrgGCC=$lt_save_GCC 758363847c39SmrgCC=$lt_save_CC 758463847c39SmrgCFLAGS=$lt_save_CFLAGS 758563847c39Smrg])# _LT_LANG_GO_CONFIG 758676888252Smrg 758776888252Smrg 758863847c39Smrg# _LT_LANG_RC_CONFIG([TAG]) 758963847c39Smrg# ------------------------- 759063847c39Smrg# Ensure that the configuration variables for the Windows resource compiler 759163847c39Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 759263847c39Smrg# to write the compiler configuration to `libtool'. 759363847c39Smrgm4_defun([_LT_LANG_RC_CONFIG], 759463847c39Smrg[AC_REQUIRE([LT_PROG_RC])dnl 759563847c39SmrgAC_LANG_SAVE 759676888252Smrg 759763847c39Smrg# Source file extension for RC test sources. 759863847c39Smrgac_ext=rc 759976888252Smrg 760063847c39Smrg# Object file extension for compiled RC test sources. 760163847c39Smrgobjext=o 760263847c39Smrg_LT_TAGVAR(objext, $1)=$objext 760376888252Smrg 760463847c39Smrg# Code to be used in simple compile tests 760563847c39Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 760676888252Smrg 760763847c39Smrg# Code to be used in simple link tests 760863847c39Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 760976888252Smrg 761063847c39Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 761163847c39Smrg_LT_TAG_COMPILER 761276888252Smrg 761363847c39Smrg# save warnings/boilerplate of simple test code 761463847c39Smrg_LT_COMPILER_BOILERPLATE 761563847c39Smrg_LT_LINKER_BOILERPLATE 761676888252Smrg 761763847c39Smrg# Allow CC to be a program name with arguments. 761863847c39Smrglt_save_CC="$CC" 761963847c39Smrglt_save_CFLAGS=$CFLAGS 762063847c39Smrglt_save_GCC=$GCC 762163847c39SmrgGCC= 762263847c39SmrgCC=${RC-"windres"} 762363847c39SmrgCFLAGS= 762463847c39Smrgcompiler=$CC 762563847c39Smrg_LT_TAGVAR(compiler, $1)=$CC 762663847c39Smrg_LT_CC_BASENAME([$compiler]) 762763847c39Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 762876888252Smrg 762963847c39Smrgif test -n "$compiler"; then 763063847c39Smrg : 763163847c39Smrg _LT_CONFIG($1) 763263847c39Smrgfi 763363847c39Smrg 763463847c39SmrgGCC=$lt_save_GCC 763563847c39SmrgAC_LANG_RESTORE 763663847c39SmrgCC=$lt_save_CC 763763847c39SmrgCFLAGS=$lt_save_CFLAGS 763863847c39Smrg])# _LT_LANG_RC_CONFIG 763976888252Smrg 764076888252Smrg 764163847c39Smrg# LT_PROG_GCJ 764263847c39Smrg# ----------- 764363847c39SmrgAC_DEFUN([LT_PROG_GCJ], 764463847c39Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 764563847c39Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 764663847c39Smrg [AC_CHECK_TOOL(GCJ, gcj,) 764763847c39Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 764863847c39Smrg AC_SUBST(GCJFLAGS)])])[]dnl 764963847c39Smrg]) 765063847c39Smrg 765163847c39Smrg# Old name: 765263847c39SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 765363847c39Smrgdnl aclocal-1.4 backwards compatibility: 765463847c39Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 76551ae1b5e8Smrg 76561ae1b5e8Smrg 765763847c39Smrg# LT_PROG_GO 765863847c39Smrg# ---------- 765963847c39SmrgAC_DEFUN([LT_PROG_GO], 766063847c39Smrg[AC_CHECK_TOOL(GOC, gccgo,) 766163847c39Smrg]) 766276888252Smrg 766376888252Smrg 766463847c39Smrg# LT_PROG_RC 766563847c39Smrg# ---------- 766663847c39SmrgAC_DEFUN([LT_PROG_RC], 766763847c39Smrg[AC_CHECK_TOOL(RC, windres,) 7668d8556812Smrg]) 766976888252Smrg 767063847c39Smrg# Old name: 767163847c39SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 767263847c39Smrgdnl aclocal-1.4 backwards compatibility: 767363847c39Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 767463847c39Smrg 767563847c39Smrg 767663847c39Smrg# _LT_DECL_EGREP 767763847c39Smrg# -------------- 767863847c39Smrg# If we don't have a new enough Autoconf to choose the best grep 767963847c39Smrg# available, choose the one first in the user's PATH. 768063847c39Smrgm4_defun([_LT_DECL_EGREP], 768163847c39Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 768263847c39SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 768363847c39Smrgtest -z "$GREP" && GREP=grep 768463847c39Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 768563847c39Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 768663847c39Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 768763847c39Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 768863847c39SmrgAC_SUBST([GREP]) 768986dafe34Smrg]) 769076888252Smrg 769176888252Smrg 769263847c39Smrg# _LT_DECL_OBJDUMP 769363847c39Smrg# -------------- 769463847c39Smrg# If we don't have a new enough Autoconf to choose the best objdump 769563847c39Smrg# available, choose the one first in the user's PATH. 769663847c39Smrgm4_defun([_LT_DECL_OBJDUMP], 769763847c39Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 769863847c39Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 769963847c39Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 770063847c39SmrgAC_SUBST([OBJDUMP]) 770163847c39Smrg]) 770276888252Smrg 770363847c39Smrg# _LT_DECL_DLLTOOL 7704d8556812Smrg# ---------------- 770563847c39Smrg# Ensure DLLTOOL variable is set. 770663847c39Smrgm4_defun([_LT_DECL_DLLTOOL], 770763847c39Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 770863847c39Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 770963847c39Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 771063847c39SmrgAC_SUBST([DLLTOOL]) 771163847c39Smrg]) 771276888252Smrg 771363847c39Smrg# _LT_DECL_SED 771463847c39Smrg# ------------ 771563847c39Smrg# Check for a fully-functional sed program, that truncates 771663847c39Smrg# as few characters as possible. Prefer GNU sed if found. 771763847c39Smrgm4_defun([_LT_DECL_SED], 771863847c39Smrg[AC_PROG_SED 771963847c39Smrgtest -z "$SED" && SED=sed 772063847c39SmrgXsed="$SED -e 1s/^X//" 772163847c39Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 772263847c39Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 772363847c39Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 772463847c39Smrg])# _LT_DECL_SED 772576888252Smrg 772663847c39Smrgm4_ifndef([AC_PROG_SED], [ 7727d8556812Smrg# NOTE: This macro has been submitted for inclusion into # 7728d8556812Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7729d8556812Smrg# a released version of Autoconf we should remove this # 773063847c39Smrg# macro and use it instead. # 773163847c39Smrg 773263847c39Smrgm4_defun([AC_PROG_SED], 7733d8556812Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7734d8556812SmrgAC_CACHE_VAL(lt_cv_path_SED, 7735d8556812Smrg[# Loop through the user's path and test for sed and gsed. 7736d8556812Smrg# Then use that list of sed's as ones to test for truncation. 7737d8556812Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7738d8556812Smrgfor as_dir in $PATH 7739d8556812Smrgdo 7740d8556812Smrg IFS=$as_save_IFS 7741d8556812Smrg test -z "$as_dir" && as_dir=. 7742d8556812Smrg for lt_ac_prog in sed gsed; do 7743d8556812Smrg for ac_exec_ext in '' $ac_executable_extensions; do 774463847c39Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7745d8556812Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7746d8556812Smrg fi 7747d8556812Smrg done 7748d8556812Smrg done 7749d8556812Smrgdone 7750d8556812SmrgIFS=$as_save_IFS 7751d8556812Smrglt_ac_max=0 7752d8556812Smrglt_ac_count=0 7753d8556812Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7754d8556812Smrg# along with /bin/sed that truncates output. 7755d8556812Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7756d8556812Smrg test ! -f $lt_ac_sed && continue 7757d8556812Smrg cat /dev/null > conftest.in 7758d8556812Smrg lt_ac_count=0 7759d8556812Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7760d8556812Smrg # Check for GNU sed and select it if it is found. 7761d8556812Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7762d8556812Smrg lt_cv_path_SED=$lt_ac_sed 7763d8556812Smrg break 7764d8556812Smrg fi 7765d8556812Smrg while true; do 7766d8556812Smrg cat conftest.in conftest.in >conftest.tmp 7767d8556812Smrg mv conftest.tmp conftest.in 7768d8556812Smrg cp conftest.in conftest.nl 7769d8556812Smrg echo >>conftest.nl 7770d8556812Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7771d8556812Smrg cmp -s conftest.out conftest.nl || break 7772d8556812Smrg # 10000 chars as input seems more than enough 7773d8556812Smrg test $lt_ac_count -gt 10 && break 7774d8556812Smrg lt_ac_count=`expr $lt_ac_count + 1` 7775d8556812Smrg if test $lt_ac_count -gt $lt_ac_max; then 7776d8556812Smrg lt_ac_max=$lt_ac_count 7777d8556812Smrg lt_cv_path_SED=$lt_ac_sed 7778d8556812Smrg fi 7779d8556812Smrg done 7780d8556812Smrgdone 7781d8556812Smrg]) 7782d8556812SmrgSED=$lt_cv_path_SED 7783d8556812SmrgAC_SUBST([SED]) 7784d8556812SmrgAC_MSG_RESULT([$SED]) 778563847c39Smrg])#AC_PROG_SED 778663847c39Smrg])#m4_ifndef 778763847c39Smrg 778863847c39Smrg# Old name: 778963847c39SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 779063847c39Smrgdnl aclocal-1.4 backwards compatibility: 779163847c39Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 779263847c39Smrg 779363847c39Smrg 779463847c39Smrg# _LT_CHECK_SHELL_FEATURES 779563847c39Smrg# ------------------------ 779663847c39Smrg# Find out whether the shell is Bourne or XSI compatible, 779763847c39Smrg# or has some other useful features. 779863847c39Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 779963847c39Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 780063847c39Smrg# Try some XSI features 780163847c39Smrgxsi_shell=no 780263847c39Smrg( _lt_dummy="a/b/c" 780363847c39Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 780463847c39Smrg = c,a/b,b/c, \ 780563847c39Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 780663847c39Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 780763847c39Smrg && xsi_shell=yes 780863847c39SmrgAC_MSG_RESULT([$xsi_shell]) 780963847c39Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 781063847c39Smrg 781163847c39SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 781263847c39Smrglt_shell_append=no 781363847c39Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 781463847c39Smrg >/dev/null 2>&1 \ 781563847c39Smrg && lt_shell_append=yes 781663847c39SmrgAC_MSG_RESULT([$lt_shell_append]) 781763847c39Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 781863847c39Smrg 781963847c39Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 782063847c39Smrg lt_unset=unset 782163847c39Smrgelse 782263847c39Smrg lt_unset=false 782363847c39Smrgfi 782463847c39Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 782563847c39Smrg 782663847c39Smrg# test EBCDIC or ASCII 782763847c39Smrgcase `echo X|tr X '\101'` in 782863847c39Smrg A) # ASCII based system 782963847c39Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 783063847c39Smrg lt_SP2NL='tr \040 \012' 783163847c39Smrg lt_NL2SP='tr \015\012 \040\040' 783263847c39Smrg ;; 783363847c39Smrg *) # EBCDIC based system 783463847c39Smrg lt_SP2NL='tr \100 \n' 783563847c39Smrg lt_NL2SP='tr \r\n \100\100' 783663847c39Smrg ;; 783763847c39Smrgesac 783863847c39Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 783963847c39Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 784063847c39Smrg])# _LT_CHECK_SHELL_FEATURES 784163847c39Smrg 784263847c39Smrg 784363847c39Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 784463847c39Smrg# ------------------------------------------------------ 784563847c39Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 784663847c39Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 784763847c39Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 784863847c39Smrg[dnl { 784963847c39Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 785063847c39Smrg$1 ()\ 785163847c39Smrg{\ 785263847c39Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 785363847c39Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 785463847c39Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 785563847c39Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 785663847c39Smrgtest 0 -eq $? || _lt_function_replace_fail=: 785763847c39Smrg]) 785863847c39Smrg 785963847c39Smrg 786063847c39Smrg# _LT_PROG_REPLACE_SHELLFNS 786163847c39Smrg# ------------------------- 786263847c39Smrg# Replace existing portable implementations of several shell functions with 786363847c39Smrg# equivalent extended shell implementations where those features are available.. 786463847c39Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 786563847c39Smrg[if test x"$xsi_shell" = xyes; then 786663847c39Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 786763847c39Smrg case ${1} in 786863847c39Smrg */*) func_dirname_result="${1%/*}${2}" ;; 786963847c39Smrg * ) func_dirname_result="${3}" ;; 787063847c39Smrg esac]) 787163847c39Smrg 787263847c39Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 787363847c39Smrg func_basename_result="${1##*/}"]) 787463847c39Smrg 787563847c39Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 787663847c39Smrg case ${1} in 787763847c39Smrg */*) func_dirname_result="${1%/*}${2}" ;; 787863847c39Smrg * ) func_dirname_result="${3}" ;; 787963847c39Smrg esac 788063847c39Smrg func_basename_result="${1##*/}"]) 788163847c39Smrg 788263847c39Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 788363847c39Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 788463847c39Smrg # positional parameters, so assign one to ordinary parameter first. 788563847c39Smrg func_stripname_result=${3} 788663847c39Smrg func_stripname_result=${func_stripname_result#"${1}"} 788763847c39Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 788863847c39Smrg 788963847c39Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 789063847c39Smrg func_split_long_opt_name=${1%%=*} 789163847c39Smrg func_split_long_opt_arg=${1#*=}]) 789263847c39Smrg 789363847c39Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 789463847c39Smrg func_split_short_opt_arg=${1#??} 789563847c39Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 789663847c39Smrg 789763847c39Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 789863847c39Smrg case ${1} in 789963847c39Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 790063847c39Smrg *) func_lo2o_result=${1} ;; 790163847c39Smrg esac]) 790263847c39Smrg 790363847c39Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 790463847c39Smrg 790563847c39Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 790663847c39Smrg 790763847c39Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 790863847c39Smrgfi 790963847c39Smrg 791063847c39Smrgif test x"$lt_shell_append" = xyes; then 791163847c39Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 791263847c39Smrg 791363847c39Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 791463847c39Smrg func_quote_for_eval "${2}" 791563847c39Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 791663847c39Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 791763847c39Smrg 791863847c39Smrg # Save a `func_append' function call where possible by direct use of '+=' 791963847c39Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 792063847c39Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 792163847c39Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 792263847c39Smrg test 0 -eq $? || _lt_function_replace_fail=: 792363847c39Smrgelse 792463847c39Smrg # Save a `func_append' function call even when '+=' is not available 792563847c39Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 792663847c39Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 792763847c39Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 792863847c39Smrg test 0 -eq $? || _lt_function_replace_fail=: 792963847c39Smrgfi 793063847c39Smrg 793163847c39Smrgif test x"$_lt_function_replace_fail" = x":"; then 793263847c39Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 793363847c39Smrgfi 793463847c39Smrg]) 793563847c39Smrg 793663847c39Smrg# _LT_PATH_CONVERSION_FUNCTIONS 793763847c39Smrg# ----------------------------- 793863847c39Smrg# Determine which file name conversion functions should be used by 793963847c39Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 794063847c39Smrg# for certain cross-compile configurations and native mingw. 794163847c39Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 794263847c39Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 794363847c39SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 794463847c39SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 794563847c39SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 794663847c39Smrg[case $host in 794763847c39Smrg *-*-mingw* ) 794863847c39Smrg case $build in 794963847c39Smrg *-*-mingw* ) # actually msys 795063847c39Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 795163847c39Smrg ;; 795263847c39Smrg *-*-cygwin* ) 795363847c39Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 795463847c39Smrg ;; 795563847c39Smrg * ) # otherwise, assume *nix 795663847c39Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 795763847c39Smrg ;; 795863847c39Smrg esac 795963847c39Smrg ;; 796063847c39Smrg *-*-cygwin* ) 796163847c39Smrg case $build in 796263847c39Smrg *-*-mingw* ) # actually msys 796363847c39Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 796463847c39Smrg ;; 796563847c39Smrg *-*-cygwin* ) 796663847c39Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 796763847c39Smrg ;; 796863847c39Smrg * ) # otherwise, assume *nix 796963847c39Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 797063847c39Smrg ;; 797163847c39Smrg esac 797263847c39Smrg ;; 797363847c39Smrg * ) # unhandled hosts (and "normal" native builds) 797463847c39Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 797563847c39Smrg ;; 797663847c39Smrgesac 797763847c39Smrg]) 797863847c39Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 797963847c39SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 798063847c39Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 798163847c39Smrg [0], [convert $build file names to $host format])dnl 798263847c39Smrg 798363847c39SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 798463847c39SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 798563847c39Smrg[#assume ordinary cross tools, or native build. 798663847c39Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 798763847c39Smrgcase $host in 798863847c39Smrg *-*-mingw* ) 798963847c39Smrg case $build in 799063847c39Smrg *-*-mingw* ) # actually msys 799163847c39Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 799263847c39Smrg ;; 799363847c39Smrg esac 799463847c39Smrg ;; 799563847c39Smrgesac 799663847c39Smrg]) 799763847c39Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 799863847c39SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 799963847c39Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 800063847c39Smrg [0], [convert $build files to toolchain format])dnl 800163847c39Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 800263847c39Smrg 800363847c39Smrg# Helper functions for option handling. -*- Autoconf -*- 800463847c39Smrg# 800563847c39Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 800663847c39Smrg# Inc. 800763847c39Smrg# Written by Gary V. Vaughan, 2004 800863847c39Smrg# 800963847c39Smrg# This file is free software; the Free Software Foundation gives 801063847c39Smrg# unlimited permission to copy and/or distribute it, with or without 801163847c39Smrg# modifications, as long as this notice is preserved. 801263847c39Smrg 801363847c39Smrg# serial 7 ltoptions.m4 801463847c39Smrg 801563847c39Smrg# This is to help aclocal find these macros, as it can't see m4_define. 801663847c39SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 801763847c39Smrg 801863847c39Smrg 801963847c39Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 802063847c39Smrg# ------------------------------------------ 802163847c39Smrgm4_define([_LT_MANGLE_OPTION], 802263847c39Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 802363847c39Smrg 802463847c39Smrg 802563847c39Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 802663847c39Smrg# --------------------------------------- 802763847c39Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 802863847c39Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 802963847c39Smrg# saved as a flag. 803063847c39Smrgm4_define([_LT_SET_OPTION], 803163847c39Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 803263847c39Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 803363847c39Smrg _LT_MANGLE_DEFUN([$1], [$2]), 803463847c39Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 803563847c39Smrg]) 803663847c39Smrg 803763847c39Smrg 803863847c39Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 803963847c39Smrg# ------------------------------------------------------------ 804063847c39Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 804163847c39Smrgm4_define([_LT_IF_OPTION], 804263847c39Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 804363847c39Smrg 804463847c39Smrg 804563847c39Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 804663847c39Smrg# ------------------------------------------------------- 804763847c39Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 804863847c39Smrg# are set. 804963847c39Smrgm4_define([_LT_UNLESS_OPTIONS], 805063847c39Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 805163847c39Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 805263847c39Smrg [m4_define([$0_found])])])[]dnl 805363847c39Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 805463847c39Smrg])[]dnl 805563847c39Smrg]) 805663847c39Smrg 805763847c39Smrg 805863847c39Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 805963847c39Smrg# ---------------------------------------- 806063847c39Smrg# OPTION-LIST is a space-separated list of Libtool options associated 806163847c39Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 806263847c39Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 806363847c39Smrg# the unknown option and exit. 806463847c39Smrgm4_defun([_LT_SET_OPTIONS], 806563847c39Smrg[# Set options 806663847c39Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 806763847c39Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 806863847c39Smrg 806963847c39Smrgm4_if([$1],[LT_INIT],[ 807063847c39Smrg dnl 807163847c39Smrg dnl Simply set some default values (i.e off) if boolean options were not 807263847c39Smrg dnl specified: 807363847c39Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 807463847c39Smrg ]) 807563847c39Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 807663847c39Smrg ]) 807763847c39Smrg dnl 807863847c39Smrg dnl If no reference was made to various pairs of opposing options, then 807963847c39Smrg dnl we run the default mode handler for the pair. For example, if neither 808063847c39Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 808163847c39Smrg dnl archives by default: 808263847c39Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 808363847c39Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 808463847c39Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 808563847c39Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 808663847c39Smrg [_LT_ENABLE_FAST_INSTALL]) 808763847c39Smrg ]) 808863847c39Smrg])# _LT_SET_OPTIONS 808963847c39Smrg 809063847c39Smrg 809163847c39Smrg 809263847c39Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 809363847c39Smrg# ----------------------------------------- 809463847c39Smrgm4_define([_LT_MANGLE_DEFUN], 809563847c39Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 809663847c39Smrg 809763847c39Smrg 809863847c39Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 809963847c39Smrg# ----------------------------------------------- 810063847c39Smrgm4_define([LT_OPTION_DEFINE], 810163847c39Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 810263847c39Smrg])# LT_OPTION_DEFINE 810363847c39Smrg 810463847c39Smrg 810563847c39Smrg# dlopen 810663847c39Smrg# ------ 810763847c39SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 810863847c39Smrg]) 810963847c39Smrg 811063847c39SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 811163847c39Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 811263847c39SmrgAC_DIAGNOSE([obsolete], 811363847c39Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 811463847c39Smrgput the `dlopen' option into LT_INIT's first parameter.]) 811563847c39Smrg]) 811663847c39Smrg 811763847c39Smrgdnl aclocal-1.4 backwards compatibility: 811863847c39Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 811963847c39Smrg 812063847c39Smrg 812163847c39Smrg# win32-dll 812263847c39Smrg# --------- 812363847c39Smrg# Declare package support for building win32 dll's. 812463847c39SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 812563847c39Smrg[enable_win32_dll=yes 812663847c39Smrg 812763847c39Smrgcase $host in 812863847c39Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 812963847c39Smrg AC_CHECK_TOOL(AS, as, false) 813063847c39Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 813163847c39Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 813263847c39Smrg ;; 813363847c39Smrgesac 813463847c39Smrg 813563847c39Smrgtest -z "$AS" && AS=as 813663847c39Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 813763847c39Smrg 813863847c39Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 813963847c39Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 814063847c39Smrg 814163847c39Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 814263847c39Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 814363847c39Smrg])# win32-dll 814463847c39Smrg 814563847c39SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 814663847c39Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 814763847c39Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 814863847c39SmrgAC_DIAGNOSE([obsolete], 814963847c39Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 815063847c39Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 815163847c39Smrg]) 815263847c39Smrg 815363847c39Smrgdnl aclocal-1.4 backwards compatibility: 815463847c39Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 815563847c39Smrg 815663847c39Smrg 815763847c39Smrg# _LT_ENABLE_SHARED([DEFAULT]) 815863847c39Smrg# ---------------------------- 815963847c39Smrg# implement the --enable-shared flag, and supports the `shared' and 816063847c39Smrg# `disable-shared' LT_INIT options. 816163847c39Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 816263847c39Smrgm4_define([_LT_ENABLE_SHARED], 816363847c39Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 816463847c39SmrgAC_ARG_ENABLE([shared], 816563847c39Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 816663847c39Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 816763847c39Smrg [p=${PACKAGE-default} 816863847c39Smrg case $enableval in 816963847c39Smrg yes) enable_shared=yes ;; 817063847c39Smrg no) enable_shared=no ;; 817163847c39Smrg *) 817263847c39Smrg enable_shared=no 817363847c39Smrg # Look at the argument we got. We use all the common list separators. 817463847c39Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 817563847c39Smrg for pkg in $enableval; do 817663847c39Smrg IFS="$lt_save_ifs" 817763847c39Smrg if test "X$pkg" = "X$p"; then 817863847c39Smrg enable_shared=yes 817963847c39Smrg fi 818063847c39Smrg done 818163847c39Smrg IFS="$lt_save_ifs" 818263847c39Smrg ;; 818363847c39Smrg esac], 818463847c39Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 818563847c39Smrg 818663847c39Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 818763847c39Smrg [Whether or not to build shared libraries]) 818863847c39Smrg])# _LT_ENABLE_SHARED 818963847c39Smrg 819063847c39SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 819163847c39SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 819263847c39Smrg 819363847c39Smrg# Old names: 819463847c39SmrgAC_DEFUN([AC_ENABLE_SHARED], 819563847c39Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 819663847c39Smrg]) 819763847c39Smrg 819863847c39SmrgAC_DEFUN([AC_DISABLE_SHARED], 819963847c39Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 820063847c39Smrg]) 820163847c39Smrg 820263847c39SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 820363847c39SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 820463847c39Smrg 820563847c39Smrgdnl aclocal-1.4 backwards compatibility: 820663847c39Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 820763847c39Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 820863847c39Smrg 820963847c39Smrg 821063847c39Smrg 821163847c39Smrg# _LT_ENABLE_STATIC([DEFAULT]) 821263847c39Smrg# ---------------------------- 821363847c39Smrg# implement the --enable-static flag, and support the `static' and 821463847c39Smrg# `disable-static' LT_INIT options. 821563847c39Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 821663847c39Smrgm4_define([_LT_ENABLE_STATIC], 821763847c39Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 821863847c39SmrgAC_ARG_ENABLE([static], 821963847c39Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 822063847c39Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 822163847c39Smrg [p=${PACKAGE-default} 822263847c39Smrg case $enableval in 822363847c39Smrg yes) enable_static=yes ;; 822463847c39Smrg no) enable_static=no ;; 822563847c39Smrg *) 822663847c39Smrg enable_static=no 822763847c39Smrg # Look at the argument we got. We use all the common list separators. 822863847c39Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 822963847c39Smrg for pkg in $enableval; do 823063847c39Smrg IFS="$lt_save_ifs" 823163847c39Smrg if test "X$pkg" = "X$p"; then 823263847c39Smrg enable_static=yes 823363847c39Smrg fi 823463847c39Smrg done 823563847c39Smrg IFS="$lt_save_ifs" 823663847c39Smrg ;; 823763847c39Smrg esac], 823863847c39Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 823963847c39Smrg 824063847c39Smrg _LT_DECL([build_old_libs], [enable_static], [0], 824163847c39Smrg [Whether or not to build static libraries]) 824263847c39Smrg])# _LT_ENABLE_STATIC 824363847c39Smrg 824463847c39SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 824563847c39SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 824663847c39Smrg 824763847c39Smrg# Old names: 824863847c39SmrgAC_DEFUN([AC_ENABLE_STATIC], 824963847c39Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 825063847c39Smrg]) 825163847c39Smrg 825263847c39SmrgAC_DEFUN([AC_DISABLE_STATIC], 825363847c39Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 825463847c39Smrg]) 825563847c39Smrg 825663847c39SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 825763847c39SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 825863847c39Smrg 825963847c39Smrgdnl aclocal-1.4 backwards compatibility: 826063847c39Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 826163847c39Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 826263847c39Smrg 826363847c39Smrg 826463847c39Smrg 826563847c39Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 826663847c39Smrg# ---------------------------------- 826763847c39Smrg# implement the --enable-fast-install flag, and support the `fast-install' 826863847c39Smrg# and `disable-fast-install' LT_INIT options. 826963847c39Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 827063847c39Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 827163847c39Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 827263847c39SmrgAC_ARG_ENABLE([fast-install], 827363847c39Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 827463847c39Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 827563847c39Smrg [p=${PACKAGE-default} 827663847c39Smrg case $enableval in 827763847c39Smrg yes) enable_fast_install=yes ;; 827863847c39Smrg no) enable_fast_install=no ;; 827963847c39Smrg *) 828063847c39Smrg enable_fast_install=no 828163847c39Smrg # Look at the argument we got. We use all the common list separators. 828263847c39Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 828363847c39Smrg for pkg in $enableval; do 828463847c39Smrg IFS="$lt_save_ifs" 828563847c39Smrg if test "X$pkg" = "X$p"; then 828663847c39Smrg enable_fast_install=yes 828763847c39Smrg fi 828863847c39Smrg done 828963847c39Smrg IFS="$lt_save_ifs" 829063847c39Smrg ;; 829163847c39Smrg esac], 829263847c39Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 829363847c39Smrg 829463847c39Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 829563847c39Smrg [Whether or not to optimize for fast installation])dnl 829663847c39Smrg])# _LT_ENABLE_FAST_INSTALL 829763847c39Smrg 829863847c39SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 829963847c39SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 830063847c39Smrg 830163847c39Smrg# Old names: 830263847c39SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 830363847c39Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 830463847c39SmrgAC_DIAGNOSE([obsolete], 830563847c39Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 830663847c39Smrgthe `fast-install' option into LT_INIT's first parameter.]) 830763847c39Smrg]) 830863847c39Smrg 830963847c39SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 831063847c39Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 831163847c39SmrgAC_DIAGNOSE([obsolete], 831263847c39Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 831363847c39Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 831463847c39Smrg]) 831563847c39Smrg 831663847c39Smrgdnl aclocal-1.4 backwards compatibility: 831763847c39Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 831863847c39Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 831963847c39Smrg 832063847c39Smrg 832163847c39Smrg# _LT_WITH_PIC([MODE]) 832263847c39Smrg# -------------------- 832363847c39Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 832463847c39Smrg# LT_INIT options. 832563847c39Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 832663847c39Smrgm4_define([_LT_WITH_PIC], 832763847c39Smrg[AC_ARG_WITH([pic], 832863847c39Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 832963847c39Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 833063847c39Smrg [lt_p=${PACKAGE-default} 833163847c39Smrg case $withval in 833263847c39Smrg yes|no) pic_mode=$withval ;; 833363847c39Smrg *) 833463847c39Smrg pic_mode=default 833563847c39Smrg # Look at the argument we got. We use all the common list separators. 833663847c39Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 833763847c39Smrg for lt_pkg in $withval; do 833863847c39Smrg IFS="$lt_save_ifs" 833963847c39Smrg if test "X$lt_pkg" = "X$lt_p"; then 834063847c39Smrg pic_mode=yes 834163847c39Smrg fi 834263847c39Smrg done 834363847c39Smrg IFS="$lt_save_ifs" 834463847c39Smrg ;; 834563847c39Smrg esac], 834663847c39Smrg [pic_mode=default]) 834763847c39Smrg 834863847c39Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 834963847c39Smrg 835063847c39Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 835163847c39Smrg])# _LT_WITH_PIC 835263847c39Smrg 835363847c39SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 835463847c39SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 835563847c39Smrg 835663847c39Smrg# Old name: 835763847c39SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 835863847c39Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 835963847c39SmrgAC_DIAGNOSE([obsolete], 836063847c39Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 836163847c39Smrgput the `pic-only' option into LT_INIT's first parameter.]) 836263847c39Smrg]) 836363847c39Smrg 836463847c39Smrgdnl aclocal-1.4 backwards compatibility: 836563847c39Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 836663847c39Smrg 836763847c39Smrg 836863847c39Smrgm4_define([_LTDL_MODE], []) 836963847c39SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 837063847c39Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 837163847c39SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 837263847c39Smrg [m4_define([_LTDL_MODE], [recursive])]) 837363847c39SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 837463847c39Smrg [m4_define([_LTDL_MODE], [subproject])]) 837563847c39Smrg 837663847c39Smrgm4_define([_LTDL_TYPE], []) 837763847c39SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 837863847c39Smrg [m4_define([_LTDL_TYPE], [installable])]) 837963847c39SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 838063847c39Smrg [m4_define([_LTDL_TYPE], [convenience])]) 838163847c39Smrg 838263847c39Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 838363847c39Smrg# 838463847c39Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 838563847c39Smrg# Written by Gary V. Vaughan, 2004 838663847c39Smrg# 838763847c39Smrg# This file is free software; the Free Software Foundation gives 838863847c39Smrg# unlimited permission to copy and/or distribute it, with or without 838963847c39Smrg# modifications, as long as this notice is preserved. 839063847c39Smrg 839163847c39Smrg# serial 6 ltsugar.m4 839263847c39Smrg 839363847c39Smrg# This is to help aclocal find these macros, as it can't see m4_define. 839463847c39SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 839563847c39Smrg 839663847c39Smrg 839763847c39Smrg# lt_join(SEP, ARG1, [ARG2...]) 839863847c39Smrg# ----------------------------- 839963847c39Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 840063847c39Smrg# associated separator. 840163847c39Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 840263847c39Smrg# versions in m4sugar had bugs. 840363847c39Smrgm4_define([lt_join], 840463847c39Smrg[m4_if([$#], [1], [], 840563847c39Smrg [$#], [2], [[$2]], 840663847c39Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 840763847c39Smrgm4_define([_lt_join], 840863847c39Smrg[m4_if([$#$2], [2], [], 840963847c39Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 841063847c39Smrg 841163847c39Smrg 841263847c39Smrg# lt_car(LIST) 841363847c39Smrg# lt_cdr(LIST) 841463847c39Smrg# ------------ 841563847c39Smrg# Manipulate m4 lists. 841663847c39Smrg# These macros are necessary as long as will still need to support 841763847c39Smrg# Autoconf-2.59 which quotes differently. 841863847c39Smrgm4_define([lt_car], [[$1]]) 841963847c39Smrgm4_define([lt_cdr], 842063847c39Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 842163847c39Smrg [$#], 1, [], 842263847c39Smrg [m4_dquote(m4_shift($@))])]) 842363847c39Smrgm4_define([lt_unquote], $1) 842463847c39Smrg 842563847c39Smrg 842663847c39Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 842763847c39Smrg# ------------------------------------------ 842863847c39Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 842963847c39Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 843063847c39Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 843163847c39Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 843263847c39Smrg# than defined and empty). 843363847c39Smrg# 843463847c39Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 843563847c39Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 843663847c39Smrgm4_define([lt_append], 843763847c39Smrg[m4_define([$1], 843863847c39Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 843963847c39Smrg 844063847c39Smrg 844163847c39Smrg 844263847c39Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 844363847c39Smrg# ---------------------------------------------------------- 844463847c39Smrg# Produce a SEP delimited list of all paired combinations of elements of 844563847c39Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 844663847c39Smrg# has the form PREFIXmINFIXSUFFIXn. 844763847c39Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 844863847c39Smrgm4_define([lt_combine], 844963847c39Smrg[m4_if(m4_eval([$# > 3]), [1], 845063847c39Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 845163847c39Smrg[[m4_foreach([_Lt_prefix], [$2], 845263847c39Smrg [m4_foreach([_Lt_suffix], 845363847c39Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 845463847c39Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 845563847c39Smrg 845663847c39Smrg 845763847c39Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 845863847c39Smrg# ----------------------------------------------------------------------- 845963847c39Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 846063847c39Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 846163847c39Smrgm4_define([lt_if_append_uniq], 846263847c39Smrg[m4_ifdef([$1], 846363847c39Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 846463847c39Smrg [lt_append([$1], [$2], [$3])$4], 846563847c39Smrg [$5])], 846663847c39Smrg [lt_append([$1], [$2], [$3])$4])]) 846763847c39Smrg 846863847c39Smrg 846963847c39Smrg# lt_dict_add(DICT, KEY, VALUE) 847063847c39Smrg# ----------------------------- 847163847c39Smrgm4_define([lt_dict_add], 847263847c39Smrg[m4_define([$1($2)], [$3])]) 847363847c39Smrg 847463847c39Smrg 847563847c39Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 847663847c39Smrg# -------------------------------------------- 847763847c39Smrgm4_define([lt_dict_add_subkey], 847863847c39Smrg[m4_define([$1($2:$3)], [$4])]) 847963847c39Smrg 848063847c39Smrg 848163847c39Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 848263847c39Smrg# ---------------------------------- 848363847c39Smrgm4_define([lt_dict_fetch], 848463847c39Smrg[m4_ifval([$3], 848563847c39Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 848663847c39Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 848763847c39Smrg 848863847c39Smrg 848963847c39Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 849063847c39Smrg# ----------------------------------------------------------------- 849163847c39Smrgm4_define([lt_if_dict_fetch], 849263847c39Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 849363847c39Smrg [$5], 849463847c39Smrg [$6])]) 849563847c39Smrg 849663847c39Smrg 849763847c39Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 849863847c39Smrg# -------------------------------------------------------------- 849963847c39Smrgm4_define([lt_dict_filter], 850063847c39Smrg[m4_if([$5], [], [], 850163847c39Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 850263847c39Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 850363847c39Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 850463847c39Smrg]) 850563847c39Smrg 850663847c39Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 850763847c39Smrg# 850863847c39Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 850963847c39Smrg# Written by Scott James Remnant, 2004 851063847c39Smrg# 851163847c39Smrg# This file is free software; the Free Software Foundation gives 851263847c39Smrg# unlimited permission to copy and/or distribute it, with or without 851363847c39Smrg# modifications, as long as this notice is preserved. 851463847c39Smrg 851563847c39Smrg# @configure_input@ 851663847c39Smrg 851763847c39Smrg# serial 3337 ltversion.m4 851863847c39Smrg# This file is part of GNU Libtool 851963847c39Smrg 852063847c39Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 852163847c39Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 852263847c39Smrg 852363847c39SmrgAC_DEFUN([LTVERSION_VERSION], 852463847c39Smrg[macro_version='2.4.2' 852563847c39Smrgmacro_revision='1.3337' 852663847c39Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 852763847c39Smrg_LT_DECL(, macro_revision, 0) 852886dafe34Smrg]) 852976888252Smrg 853063847c39Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 853163847c39Smrg# 853263847c39Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 853363847c39Smrg# Written by Scott James Remnant, 2004. 853463847c39Smrg# 853563847c39Smrg# This file is free software; the Free Software Foundation gives 853663847c39Smrg# unlimited permission to copy and/or distribute it, with or without 853763847c39Smrg# modifications, as long as this notice is preserved. 853863847c39Smrg 853963847c39Smrg# serial 5 lt~obsolete.m4 854063847c39Smrg 854163847c39Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 854263847c39Smrg# 854363847c39Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 854463847c39Smrg# which have later been changed to m4_define as they aren't part of the 854563847c39Smrg# exported API, or moved to Autoconf or Automake where they belong. 854663847c39Smrg# 854763847c39Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 854863847c39Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 854963847c39Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 855063847c39Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 855163847c39Smrg# and doesn't know about Autoconf macros at all.) 855263847c39Smrg# 855363847c39Smrg# So we provide this file, which has a silly filename so it's always 855463847c39Smrg# included after everything else. This provides aclocal with the 855563847c39Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 855663847c39Smrg# because those macros already exist, or will be overwritten later. 855763847c39Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 855863847c39Smrg# 855963847c39Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 856063847c39Smrg# Yes, that means every name once taken will need to remain here until 856163847c39Smrg# we give up compatibility with versions before 1.7, at which point 856263847c39Smrg# we need to keep only those names which we still refer to. 856363847c39Smrg 856463847c39Smrg# This is to help aclocal find these macros, as it can't see m4_define. 856563847c39SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 856663847c39Smrg 856763847c39Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 856863847c39Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 856963847c39Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 857063847c39Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 857163847c39Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 857263847c39Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 857363847c39Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 857463847c39Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 857563847c39Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 857663847c39Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 857763847c39Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 857863847c39Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 857963847c39Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 858063847c39Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 858163847c39Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 858263847c39Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 858363847c39Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 858463847c39Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 858563847c39Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 858663847c39Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 858763847c39Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 858863847c39Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 858963847c39Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 859063847c39Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 859163847c39Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 859263847c39Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 859363847c39Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 859463847c39Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 859563847c39Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 859663847c39Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 859763847c39Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 859863847c39Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 859963847c39Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 860063847c39Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 860163847c39Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 860263847c39Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 860363847c39Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 860463847c39Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 860563847c39Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 860663847c39Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 860763847c39Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 860863847c39Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 860963847c39Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 861063847c39Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 861163847c39Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 861263847c39Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 861363847c39Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 861463847c39Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 861563847c39Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 861663847c39Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 861763847c39Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 861863847c39Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 861963847c39Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 862063847c39Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 862163847c39Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 862263847c39Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 862363847c39Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 862463847c39Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 862563847c39Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 862663847c39Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 862763847c39Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 862863847c39Smrg 862986dafe34Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 863063847c39Smrg# serial 1 (pkg-config-0.24) 863186dafe34Smrg# 863286dafe34Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 863386dafe34Smrg# 863486dafe34Smrg# This program is free software; you can redistribute it and/or modify 863586dafe34Smrg# it under the terms of the GNU General Public License as published by 863686dafe34Smrg# the Free Software Foundation; either version 2 of the License, or 863786dafe34Smrg# (at your option) any later version. 863886dafe34Smrg# 863986dafe34Smrg# This program is distributed in the hope that it will be useful, but 864086dafe34Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 864186dafe34Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 864286dafe34Smrg# General Public License for more details. 864386dafe34Smrg# 864486dafe34Smrg# You should have received a copy of the GNU General Public License 864586dafe34Smrg# along with this program; if not, write to the Free Software 864686dafe34Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 864786dafe34Smrg# 864886dafe34Smrg# As a special exception to the GNU General Public License, if you 864986dafe34Smrg# distribute this file as part of a program that contains a 865086dafe34Smrg# configuration script generated by Autoconf, you may include it under 865186dafe34Smrg# the same distribution terms that you use for the rest of that program. 865276888252Smrg 865386dafe34Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 865486dafe34Smrg# ---------------------------------- 865586dafe34SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 865686dafe34Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 865763847c39Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 865863847c39Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 865963847c39SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 866063847c39SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 866163847c39SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 866263847c39Smrg 866386dafe34Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 866486dafe34Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 866586dafe34Smrgfi 866686dafe34Smrgif test -n "$PKG_CONFIG"; then 866786dafe34Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 866886dafe34Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 866986dafe34Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 867086dafe34Smrg AC_MSG_RESULT([yes]) 86711ae1b5e8Smrg else 867286dafe34Smrg AC_MSG_RESULT([no]) 867386dafe34Smrg PKG_CONFIG="" 86741ae1b5e8Smrg fi 867586dafe34Smrgfi[]dnl 867686dafe34Smrg])# PKG_PROG_PKG_CONFIG 867776888252Smrg 867886dafe34Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 867986dafe34Smrg# 868086dafe34Smrg# Check to see whether a particular set of modules exists. Similar 868186dafe34Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 868286dafe34Smrg# 868363847c39Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 868463847c39Smrg# only at the first occurence in configure.ac, so if the first place 868563847c39Smrg# it's called might be skipped (such as if it is within an "if", you 868663847c39Smrg# have to call PKG_CHECK_EXISTS manually 868786dafe34Smrg# -------------------------------------------------------------- 868886dafe34SmrgAC_DEFUN([PKG_CHECK_EXISTS], 868986dafe34Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 869086dafe34Smrgif test -n "$PKG_CONFIG" && \ 869186dafe34Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 869263847c39Smrg m4_default([$2], [:]) 869386dafe34Smrgm4_ifvaln([$3], [else 869486dafe34Smrg $3])dnl 869586dafe34Smrgfi]) 869676888252Smrg 869786dafe34Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 869886dafe34Smrg# --------------------------------------------- 869986dafe34Smrgm4_define([_PKG_CONFIG], 870086dafe34Smrg[if test -n "$$1"; then 870186dafe34Smrg pkg_cv_[]$1="$$1" 870286dafe34Smrg elif test -n "$PKG_CONFIG"; then 870386dafe34Smrg PKG_CHECK_EXISTS([$3], 870463847c39Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 870563847c39Smrg test "x$?" != "x0" && pkg_failed=yes ], 870686dafe34Smrg [pkg_failed=yes]) 870786dafe34Smrg else 870886dafe34Smrg pkg_failed=untried 870986dafe34Smrgfi[]dnl 871086dafe34Smrg])# _PKG_CONFIG 871176888252Smrg 871286dafe34Smrg# _PKG_SHORT_ERRORS_SUPPORTED 871386dafe34Smrg# ----------------------------- 871486dafe34SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 871586dafe34Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 871686dafe34Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 871786dafe34Smrg _pkg_short_errors_supported=yes 871886dafe34Smrgelse 871986dafe34Smrg _pkg_short_errors_supported=no 872086dafe34Smrgfi[]dnl 872186dafe34Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 872276888252Smrg 872386dafe34Smrg 872486dafe34Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 872586dafe34Smrg# [ACTION-IF-NOT-FOUND]) 872686dafe34Smrg# 872786dafe34Smrg# 872886dafe34Smrg# Note that if there is a possibility the first call to 872986dafe34Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 873086dafe34Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 873186dafe34Smrg# 873286dafe34Smrg# 873386dafe34Smrg# -------------------------------------------------------------- 873486dafe34SmrgAC_DEFUN([PKG_CHECK_MODULES], 873586dafe34Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 873686dafe34SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 873786dafe34SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 873886dafe34Smrg 873986dafe34Smrgpkg_failed=no 874086dafe34SmrgAC_MSG_CHECKING([for $1]) 874186dafe34Smrg 874286dafe34Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 874386dafe34Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 874486dafe34Smrg 874586dafe34Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 874686dafe34Smrgand $1[]_LIBS to avoid the need to call pkg-config. 874786dafe34SmrgSee the pkg-config man page for more details.]) 874886dafe34Smrg 874986dafe34Smrgif test $pkg_failed = yes; then 875063847c39Smrg AC_MSG_RESULT([no]) 875186dafe34Smrg _PKG_SHORT_ERRORS_SUPPORTED 875286dafe34Smrg if test $_pkg_short_errors_supported = yes; then 875363847c39Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 875486dafe34Smrg else 875563847c39Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 875686dafe34Smrg fi 875786dafe34Smrg # Put the nasty error message in config.log where it belongs 875886dafe34Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 875986dafe34Smrg 876063847c39Smrg m4_default([$4], [AC_MSG_ERROR( 876186dafe34Smrg[Package requirements ($2) were not met: 876286dafe34Smrg 876386dafe34Smrg$$1_PKG_ERRORS 876486dafe34Smrg 876586dafe34SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 876686dafe34Smrginstalled software in a non-standard prefix. 876786dafe34Smrg 876863847c39Smrg_PKG_TEXT])[]dnl 876963847c39Smrg ]) 877086dafe34Smrgelif test $pkg_failed = untried; then 877163847c39Smrg AC_MSG_RESULT([no]) 877263847c39Smrg m4_default([$4], [AC_MSG_FAILURE( 877386dafe34Smrg[The pkg-config script could not be found or is too old. Make sure it 877486dafe34Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 877586dafe34Smrgpath to pkg-config. 877686dafe34Smrg 877786dafe34Smrg_PKG_TEXT 877886dafe34Smrg 877963847c39SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 878063847c39Smrg ]) 878186dafe34Smrgelse 878286dafe34Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 878386dafe34Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 878486dafe34Smrg AC_MSG_RESULT([yes]) 878563847c39Smrg $3 878686dafe34Smrgfi[]dnl 878786dafe34Smrg])# PKG_CHECK_MODULES 878886dafe34Smrg 878986dafe34Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 879086dafe34Smrgdnl 879163847c39Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 879286dafe34Smrgdnl 879386dafe34Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 879463847c39Smrgdnl copy of this software and associated documentation files (the "Software"), 879563847c39Smrgdnl to deal in the Software without restriction, including without limitation 879663847c39Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 879763847c39Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 879863847c39Smrgdnl Software is furnished to do so, subject to the following conditions: 879986dafe34Smrgdnl 880063847c39Smrgdnl The above copyright notice and this permission notice (including the next 880163847c39Smrgdnl paragraph) shall be included in all copies or substantial portions of the 880263847c39Smrgdnl Software. 880386dafe34Smrgdnl 880463847c39Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 880563847c39Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 880663847c39Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 880763847c39Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 880863847c39Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 880963847c39Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 881063847c39Smrgdnl DEALINGS IN THE SOFTWARE. 881186dafe34Smrg 881286dafe34Smrg# XORG_MACROS_VERSION(required-version) 881386dafe34Smrg# ------------------------------------- 881486dafe34Smrg# Minimum version: 1.1.0 881586dafe34Smrg# 881686dafe34Smrg# If you're using a macro added in Version 1.1 or newer, include this in 881786dafe34Smrg# your configure.ac with the minimum required version, such as: 881886dafe34Smrg# XORG_MACROS_VERSION(1.1) 881986dafe34Smrg# 882063847c39Smrg# To ensure that this macro is defined, also add: 882163847c39Smrg# m4_ifndef([XORG_MACROS_VERSION], 882263847c39Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 882386dafe34Smrg# 882486dafe34Smrg# 882586dafe34Smrg# See the "minimum version" comment for each macro you use to see what 882686dafe34Smrg# version you require. 882763847c39Smrgm4_defun([XORG_MACROS_VERSION],[ 882863847c39Smrgm4_define([vers_have], [1.17]) 882963847c39Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 883063847c39Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 883163847c39Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 883263847c39Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 883363847c39Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 883463847c39Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 883563847c39Smrgm4_undefine([vers_have]) 883663847c39Smrgm4_undefine([maj_have]) 883763847c39Smrgm4_undefine([maj_needed]) 883886dafe34Smrg]) # XORG_MACROS_VERSION 883986dafe34Smrg 884086dafe34Smrg# XORG_PROG_RAWCPP() 884186dafe34Smrg# ------------------ 884286dafe34Smrg# Minimum version: 1.0.0 884386dafe34Smrg# 884486dafe34Smrg# Find cpp program and necessary flags for use in pre-processing text files 884586dafe34Smrg# such as man pages and config files 884686dafe34SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 884786dafe34SmrgAC_REQUIRE([AC_PROG_CPP]) 884886dafe34SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 884986dafe34Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 885086dafe34Smrg 885186dafe34Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 885286dafe34Smrg# which is not the best choice for supporting other OS'es, but covers most 885386dafe34Smrg# of the ones we need for now. 885486dafe34SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 885563847c39SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 885686dafe34Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 885786dafe34Smrg AC_MSG_RESULT([no]) 885886dafe34Smrgelse 885986dafe34Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 886086dafe34Smrg RAWCPPFLAGS=-undef 886186dafe34Smrg AC_MSG_RESULT([yes]) 886286dafe34Smrg # under Cygwin unix is still defined even with -undef 886386dafe34Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 886486dafe34Smrg RAWCPPFLAGS="-undef -ansi" 886586dafe34Smrg AC_MSG_RESULT([yes, with -ansi]) 886686dafe34Smrg else 886786dafe34Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 886886dafe34Smrg fi 886986dafe34Smrgfi 887086dafe34Smrgrm -f conftest.$ac_ext 887186dafe34Smrg 887286dafe34SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 887363847c39SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 887486dafe34Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 887586dafe34Smrg AC_MSG_RESULT([no]) 887686dafe34Smrgelse 887786dafe34Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 887886dafe34Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 887986dafe34Smrg AC_MSG_RESULT([yes]) 888086dafe34Smrg else 888186dafe34Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 888286dafe34Smrg fi 888386dafe34Smrgfi 888486dafe34Smrgrm -f conftest.$ac_ext 888586dafe34SmrgAC_SUBST(RAWCPPFLAGS) 888686dafe34Smrg]) # XORG_PROG_RAWCPP 888786dafe34Smrg 888886dafe34Smrg# XORG_MANPAGE_SECTIONS() 888986dafe34Smrg# ----------------------- 889086dafe34Smrg# Minimum version: 1.0.0 889186dafe34Smrg# 889286dafe34Smrg# Determine which sections man pages go in for the different man page types 889386dafe34Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 889486dafe34Smrg# Not sure if there's any better way than just hardcoding by OS name. 889586dafe34Smrg# Override default settings by setting environment variables 889663847c39Smrg# Added MAN_SUBSTS in version 1.8 889763847c39Smrg# Added AC_PROG_SED in version 1.8 889886dafe34Smrg 889986dafe34SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 890086dafe34SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 890163847c39SmrgAC_REQUIRE([AC_PROG_SED]) 890286dafe34Smrg 890386dafe34Smrgif test x$APP_MAN_SUFFIX = x ; then 890486dafe34Smrg APP_MAN_SUFFIX=1 890586dafe34Smrgfi 890686dafe34Smrgif test x$APP_MAN_DIR = x ; then 890786dafe34Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 890886dafe34Smrgfi 890986dafe34Smrg 891086dafe34Smrgif test x$LIB_MAN_SUFFIX = x ; then 891186dafe34Smrg LIB_MAN_SUFFIX=3 891286dafe34Smrgfi 891386dafe34Smrgif test x$LIB_MAN_DIR = x ; then 891486dafe34Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 891586dafe34Smrgfi 891686dafe34Smrg 891786dafe34Smrgif test x$FILE_MAN_SUFFIX = x ; then 891886dafe34Smrg case $host_os in 891986dafe34Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 892086dafe34Smrg *) FILE_MAN_SUFFIX=5 ;; 89211ae1b5e8Smrg esac 892286dafe34Smrgfi 892386dafe34Smrgif test x$FILE_MAN_DIR = x ; then 892486dafe34Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 892586dafe34Smrgfi 892676888252Smrg 892786dafe34Smrgif test x$MISC_MAN_SUFFIX = x ; then 89281ae1b5e8Smrg case $host_os in 892986dafe34Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 893086dafe34Smrg *) MISC_MAN_SUFFIX=7 ;; 893186dafe34Smrg esac 893286dafe34Smrgfi 893386dafe34Smrgif test x$MISC_MAN_DIR = x ; then 893486dafe34Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 893586dafe34Smrgfi 893676888252Smrg 893786dafe34Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 893886dafe34Smrg case $host_os in 893986dafe34Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 894086dafe34Smrg *) DRIVER_MAN_SUFFIX=4 ;; 894186dafe34Smrg esac 894286dafe34Smrgfi 894386dafe34Smrgif test x$DRIVER_MAN_DIR = x ; then 894486dafe34Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 894586dafe34Smrgfi 894676888252Smrg 894786dafe34Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 894886dafe34Smrg case $host_os in 894986dafe34Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 895086dafe34Smrg *) ADMIN_MAN_SUFFIX=8 ;; 895186dafe34Smrg esac 895286dafe34Smrgfi 895386dafe34Smrgif test x$ADMIN_MAN_DIR = x ; then 895486dafe34Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 895586dafe34Smrgfi 895676888252Smrg 895776888252Smrg 895886dafe34SmrgAC_SUBST([APP_MAN_SUFFIX]) 895986dafe34SmrgAC_SUBST([LIB_MAN_SUFFIX]) 896086dafe34SmrgAC_SUBST([FILE_MAN_SUFFIX]) 896186dafe34SmrgAC_SUBST([MISC_MAN_SUFFIX]) 896286dafe34SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 896386dafe34SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 896486dafe34SmrgAC_SUBST([APP_MAN_DIR]) 896586dafe34SmrgAC_SUBST([LIB_MAN_DIR]) 896686dafe34SmrgAC_SUBST([FILE_MAN_DIR]) 896786dafe34SmrgAC_SUBST([MISC_MAN_DIR]) 896886dafe34SmrgAC_SUBST([DRIVER_MAN_DIR]) 896986dafe34SmrgAC_SUBST([ADMIN_MAN_DIR]) 897063847c39Smrg 897163847c39SmrgXORG_MAN_PAGE="X Version 11" 897263847c39SmrgAC_SUBST([XORG_MAN_PAGE]) 897363847c39SmrgMAN_SUBSTS="\ 897463847c39Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 897563847c39Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 897663847c39Smrg -e 's|__xservername__|Xorg|g' \ 897763847c39Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 897863847c39Smrg -e 's|__projectroot__|\$(prefix)|g' \ 897963847c39Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 898063847c39Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 898163847c39Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 898263847c39Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 898363847c39Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 898463847c39Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 898563847c39Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 898663847c39SmrgAC_SUBST([MAN_SUBSTS]) 898763847c39Smrg 898886dafe34Smrg]) # XORG_MANPAGE_SECTIONS 898976888252Smrg 899063847c39Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 899163847c39Smrg# ------------------------ 899263847c39Smrg# Minimum version: 1.7.0 899363847c39Smrg# 899463847c39Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 899563847c39Smrg# provided by xorg-sgml-doctools, if installed. 899663847c39SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 899763847c39SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 899863847c39SmrgXORG_SGML_PATH= 899963847c39SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 900063847c39Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 900163847c39Smrg [m4_ifval([$1],[:], 900263847c39Smrg [if test x"$cross_compiling" != x"yes" ; then 900363847c39Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 900463847c39Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 900563847c39Smrg fi]) 900663847c39Smrg ]) 900763847c39Smrg 900863847c39Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 900963847c39Smrg# the path and the name of the doc stylesheet 901063847c39Smrgif test "x$XORG_SGML_PATH" != "x" ; then 901163847c39Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 901263847c39Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 901363847c39Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 901463847c39Smrgelse 901563847c39Smrg AC_MSG_RESULT([no]) 901663847c39Smrgfi 901763847c39Smrg 901863847c39SmrgAC_SUBST(XORG_SGML_PATH) 901963847c39SmrgAC_SUBST(STYLESHEET_SRCDIR) 902063847c39SmrgAC_SUBST(XSL_STYLESHEET) 902163847c39SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 902263847c39Smrg]) # XORG_CHECK_SGML_DOCTOOLS 902363847c39Smrg 902486dafe34Smrg# XORG_CHECK_LINUXDOC 902586dafe34Smrg# ------------------- 902686dafe34Smrg# Minimum version: 1.0.0 902786dafe34Smrg# 902886dafe34Smrg# Defines the variable MAKE_TEXT if the necessary tools and 902986dafe34Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 903086dafe34Smrg# Whether or not the necessary tools and files are found can be checked 903186dafe34Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 903286dafe34SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 903363847c39SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 903463847c39SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 903586dafe34Smrg 903686dafe34SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 903786dafe34Smrg 903863847c39SmrgAC_MSG_CHECKING([whether to build documentation]) 903986dafe34Smrg 904063847c39Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 904186dafe34Smrg BUILDDOC=yes 904286dafe34Smrgelse 904386dafe34Smrg BUILDDOC=no 904486dafe34Smrgfi 904586dafe34Smrg 904686dafe34SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 904786dafe34Smrg 904886dafe34SmrgAC_MSG_RESULT([$BUILDDOC]) 904986dafe34Smrg 905063847c39SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 905186dafe34Smrg 905263847c39Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 905386dafe34Smrg BUILDPDFDOC=yes 905486dafe34Smrgelse 905586dafe34Smrg BUILDPDFDOC=no 905686dafe34Smrgfi 905786dafe34Smrg 905886dafe34SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 905986dafe34Smrg 906086dafe34SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 906186dafe34Smrg 906263847c39SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 906386dafe34SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 906486dafe34SmrgMAKE_PDF="$PS2PDF" 906586dafe34SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 906686dafe34Smrg 906786dafe34SmrgAC_SUBST(MAKE_TEXT) 906886dafe34SmrgAC_SUBST(MAKE_PS) 906986dafe34SmrgAC_SUBST(MAKE_PDF) 907086dafe34SmrgAC_SUBST(MAKE_HTML) 907186dafe34Smrg]) # XORG_CHECK_LINUXDOC 907286dafe34Smrg 907386dafe34Smrg# XORG_CHECK_DOCBOOK 907486dafe34Smrg# ------------------- 907586dafe34Smrg# Minimum version: 1.0.0 907686dafe34Smrg# 907786dafe34Smrg# Checks for the ability to build output formats from SGML DocBook source. 907886dafe34Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 907986dafe34Smrg# indicates whether the necessary tools and files are found and, if set, 908086dafe34Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 908186dafe34SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 908263847c39SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 908363847c39Smrg 908486dafe34SmrgBUILDTXTDOC=no 908586dafe34SmrgBUILDPDFDOC=no 908686dafe34SmrgBUILDPSDOC=no 908786dafe34SmrgBUILDHTMLDOC=no 908886dafe34Smrg 908986dafe34SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 909086dafe34SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 909186dafe34SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 909286dafe34SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 909386dafe34Smrg 909463847c39SmrgAC_MSG_CHECKING([whether to build text documentation]) 909563847c39Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 909686dafe34Smrg test x$BUILD_TXTDOC != xno; then 909786dafe34Smrg BUILDTXTDOC=yes 909886dafe34Smrgfi 909986dafe34SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 910086dafe34SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 910176888252Smrg 910263847c39SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 910363847c39Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 910463847c39Smrg test x$BUILD_PDFDOC != xno; then 910563847c39Smrg BUILDPDFDOC=yes 910663847c39Smrgfi 910763847c39SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 910863847c39SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 910963847c39Smrg 911063847c39SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 911163847c39Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 911263847c39Smrg test x$BUILD_PSDOC != xno; then 911363847c39Smrg BUILDPSDOC=yes 911463847c39Smrgfi 911563847c39SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 911663847c39SmrgAC_MSG_RESULT([$BUILDPSDOC]) 911763847c39Smrg 911863847c39SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 911963847c39Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 912063847c39Smrg test x$BUILD_HTMLDOC != xno; then 912163847c39Smrg BUILDHTMLDOC=yes 912263847c39Smrgfi 912363847c39SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 912463847c39SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 912563847c39Smrg 912663847c39SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 912763847c39SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 912863847c39SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 912963847c39SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 913063847c39Smrg 913163847c39SmrgAC_SUBST(MAKE_TEXT) 913263847c39SmrgAC_SUBST(MAKE_PS) 913363847c39SmrgAC_SUBST(MAKE_PDF) 913463847c39SmrgAC_SUBST(MAKE_HTML) 913563847c39Smrg]) # XORG_CHECK_DOCBOOK 913663847c39Smrg 913763847c39Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 913863847c39Smrg# ---------------- 913963847c39Smrg# Minimum version: 1.5.0 914063847c39Smrg# Minimum version for optional DEFAULT argument: 1.11.0 914163847c39Smrg# 914263847c39Smrg# Documentation tools are not always available on all platforms and sometimes 914363847c39Smrg# not at the appropriate level. This macro enables a module to test for the 914463847c39Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 914563847c39Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 914663847c39Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 914763847c39Smrg# --with-xmlto assumes 'auto'. 914863847c39Smrg# 914963847c39Smrg# Interface to module: 915063847c39Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 915163847c39Smrg# XMLTO: returns the path of the xmlto program found 915263847c39Smrg# returns the path set by the user in the environment 915363847c39Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 915463847c39Smrg# 'no' user instructs the module not to use xmlto 915563847c39Smrg# 915663847c39Smrg# Added in version 1.10.0 915763847c39Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 915863847c39Smrg# xmlto for text output requires either lynx, links, or w3m browsers 915963847c39Smrg# 916063847c39Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 916163847c39Smrg# 916263847c39SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 916363847c39SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 916463847c39Smrgm4_define([_defopt], m4_default([$2], [auto])) 916563847c39SmrgAC_ARG_WITH(xmlto, 916663847c39Smrg AS_HELP_STRING([--with-xmlto], 916763847c39Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 916863847c39Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 916963847c39Smrgm4_undefine([_defopt]) 917063847c39Smrg 917163847c39Smrgif test "x$use_xmlto" = x"auto"; then 917263847c39Smrg AC_PATH_PROG([XMLTO], [xmlto]) 917363847c39Smrg if test "x$XMLTO" = "x"; then 917463847c39Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 917563847c39Smrg have_xmlto=no 917663847c39Smrg else 917763847c39Smrg have_xmlto=yes 917863847c39Smrg fi 917963847c39Smrgelif test "x$use_xmlto" = x"yes" ; then 918063847c39Smrg AC_PATH_PROG([XMLTO], [xmlto]) 918163847c39Smrg if test "x$XMLTO" = "x"; then 918263847c39Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 918363847c39Smrg fi 918463847c39Smrg have_xmlto=yes 918563847c39Smrgelif test "x$use_xmlto" = x"no" ; then 918663847c39Smrg if test "x$XMLTO" != "x"; then 918763847c39Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 918863847c39Smrg fi 918963847c39Smrg have_xmlto=no 919063847c39Smrgelse 919163847c39Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 919263847c39Smrgfi 919363847c39Smrg 919463847c39Smrg# Test for a minimum version of xmlto, if provided. 919563847c39Smrgm4_ifval([$1], 919663847c39Smrg[if test "$have_xmlto" = yes; then 919763847c39Smrg # scrape the xmlto version 919863847c39Smrg AC_MSG_CHECKING([the xmlto version]) 919963847c39Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 920063847c39Smrg AC_MSG_RESULT([$xmlto_version]) 920163847c39Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 920263847c39Smrg [if test "x$use_xmlto" = xauto; then 920363847c39Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 920463847c39Smrg have_xmlto=no 920563847c39Smrg else 920663847c39Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 920763847c39Smrg fi]) 920863847c39Smrgfi]) 920963847c39Smrg 921063847c39Smrg# Test for the ability of xmlto to generate a text target 921163847c39Smrghave_xmlto_text=no 921263847c39Smrgcat > conftest.xml << "EOF" 921363847c39SmrgEOF 921463847c39SmrgAS_IF([test "$have_xmlto" = yes], 921563847c39Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 921663847c39Smrg [have_xmlto_text=yes], 921763847c39Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 921863847c39Smrgrm -f conftest.xml 921963847c39SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 922063847c39SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 922163847c39Smrg]) # XORG_WITH_XMLTO 922263847c39Smrg 922363847c39Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 922463847c39Smrg# -------------------------------------------- 922563847c39Smrg# Minimum version: 1.12.0 922663847c39Smrg# Minimum version for optional DEFAULT argument: 1.12.0 922763847c39Smrg# 922863847c39Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 922963847c39Smrg# XML-based language used for the transformation of XML documents. 923063847c39Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 923163847c39Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 923263847c39Smrg# The XSLT processor is often used as a standalone tool for transformations. 923363847c39Smrg# It should not be assumed that this tool is used only to work with documnetation. 923463847c39Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 923563847c39Smrg# 923663847c39Smrg# Interface to module: 923763847c39Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 923863847c39Smrg# XSLTPROC: returns the path of the xsltproc program found 923963847c39Smrg# returns the path set by the user in the environment 924063847c39Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 924163847c39Smrg# 'no' user instructs the module not to use xsltproc 924263847c39Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 924363847c39Smrg# 924463847c39Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 924563847c39Smrg# 924663847c39SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 924763847c39SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 924863847c39Smrg# Preserves the interface, should it be implemented later 924963847c39Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 925063847c39Smrgm4_define([_defopt], m4_default([$2], [auto])) 925163847c39SmrgAC_ARG_WITH(xsltproc, 925263847c39Smrg AS_HELP_STRING([--with-xsltproc], 925363847c39Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 925463847c39Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 925563847c39Smrgm4_undefine([_defopt]) 925663847c39Smrg 925763847c39Smrgif test "x$use_xsltproc" = x"auto"; then 925863847c39Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 925963847c39Smrg if test "x$XSLTPROC" = "x"; then 926063847c39Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 926163847c39Smrg have_xsltproc=no 926263847c39Smrg else 926363847c39Smrg have_xsltproc=yes 926463847c39Smrg fi 926563847c39Smrgelif test "x$use_xsltproc" = x"yes" ; then 926663847c39Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 926763847c39Smrg if test "x$XSLTPROC" = "x"; then 926863847c39Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 926963847c39Smrg fi 927063847c39Smrg have_xsltproc=yes 927163847c39Smrgelif test "x$use_xsltproc" = x"no" ; then 927263847c39Smrg if test "x$XSLTPROC" != "x"; then 927363847c39Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 927463847c39Smrg fi 927563847c39Smrg have_xsltproc=no 927663847c39Smrgelse 927763847c39Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 927863847c39Smrgfi 927963847c39Smrg 928063847c39SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 928163847c39Smrg]) # XORG_WITH_XSLTPROC 928263847c39Smrg 928363847c39Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 928463847c39Smrg# ---------------------------------------- 928563847c39Smrg# Minimum version: 1.15.0 928663847c39Smrg# 928763847c39Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 928863847c39Smrg# scanning arbitrary text files, extracting information from those text files, 928963847c39Smrg# and printing reports based on that information. 929063847c39Smrg# 929163847c39Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 929263847c39Smrg# 929363847c39Smrg# Interface to module: 929463847c39Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 929563847c39Smrg# PERL: returns the path of the perl program found 929663847c39Smrg# returns the path set by the user in the environment 929763847c39Smrg# --with-perl: 'yes' user instructs the module to use perl 929863847c39Smrg# 'no' user instructs the module not to use perl 929963847c39Smrg# have_perl: returns yes if perl found in PATH or no 930063847c39Smrg# 930163847c39Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 930263847c39Smrg# 930363847c39SmrgAC_DEFUN([XORG_WITH_PERL],[ 930463847c39SmrgAC_ARG_VAR([PERL], [Path to perl command]) 930563847c39Smrg# Preserves the interface, should it be implemented later 930663847c39Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 930763847c39Smrgm4_define([_defopt], m4_default([$2], [auto])) 930863847c39SmrgAC_ARG_WITH(perl, 930963847c39Smrg AS_HELP_STRING([--with-perl], 931063847c39Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 931163847c39Smrg [use_perl=$withval], [use_perl=]_defopt) 931263847c39Smrgm4_undefine([_defopt]) 931363847c39Smrg 931463847c39Smrgif test "x$use_perl" = x"auto"; then 931563847c39Smrg AC_PATH_PROG([PERL], [perl]) 931663847c39Smrg if test "x$PERL" = "x"; then 931763847c39Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 931863847c39Smrg have_perl=no 931963847c39Smrg else 932063847c39Smrg have_perl=yes 932163847c39Smrg fi 932263847c39Smrgelif test "x$use_perl" = x"yes" ; then 932363847c39Smrg AC_PATH_PROG([PERL], [perl]) 932463847c39Smrg if test "x$PERL" = "x"; then 932563847c39Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 932663847c39Smrg fi 932763847c39Smrg have_perl=yes 932863847c39Smrgelif test "x$use_perl" = x"no" ; then 932963847c39Smrg if test "x$PERL" != "x"; then 933063847c39Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 933163847c39Smrg fi 933263847c39Smrg have_perl=no 933363847c39Smrgelse 933463847c39Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 933563847c39Smrgfi 933663847c39Smrg 933763847c39SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 933863847c39Smrg]) # XORG_WITH_PERL 933963847c39Smrg 934063847c39Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 934163847c39Smrg# ---------------- 934263847c39Smrg# Minimum version: 1.5.0 934363847c39Smrg# Minimum version for optional DEFAULT argument: 1.11.0 934463847c39Smrg# 934563847c39Smrg# Documentation tools are not always available on all platforms and sometimes 934663847c39Smrg# not at the appropriate level. This macro enables a module to test for the 934763847c39Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 934863847c39Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 934963847c39Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 935063847c39Smrg# --with-asciidoc assumes 'auto'. 935163847c39Smrg# 935263847c39Smrg# Interface to module: 935363847c39Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 935463847c39Smrg# ASCIIDOC: returns the path of the asciidoc program found 935563847c39Smrg# returns the path set by the user in the environment 935663847c39Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 935763847c39Smrg# 'no' user instructs the module not to use asciidoc 935863847c39Smrg# 935963847c39Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 936063847c39Smrg# 936163847c39SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 936263847c39SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 936363847c39Smrgm4_define([_defopt], m4_default([$2], [auto])) 936463847c39SmrgAC_ARG_WITH(asciidoc, 936563847c39Smrg AS_HELP_STRING([--with-asciidoc], 936663847c39Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 936763847c39Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 936863847c39Smrgm4_undefine([_defopt]) 936963847c39Smrg 937063847c39Smrgif test "x$use_asciidoc" = x"auto"; then 937163847c39Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 937263847c39Smrg if test "x$ASCIIDOC" = "x"; then 937363847c39Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 937463847c39Smrg have_asciidoc=no 937563847c39Smrg else 937663847c39Smrg have_asciidoc=yes 937763847c39Smrg fi 937863847c39Smrgelif test "x$use_asciidoc" = x"yes" ; then 937963847c39Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 938063847c39Smrg if test "x$ASCIIDOC" = "x"; then 938163847c39Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 938263847c39Smrg fi 938363847c39Smrg have_asciidoc=yes 938463847c39Smrgelif test "x$use_asciidoc" = x"no" ; then 938563847c39Smrg if test "x$ASCIIDOC" != "x"; then 938663847c39Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 938763847c39Smrg fi 938863847c39Smrg have_asciidoc=no 938963847c39Smrgelse 939063847c39Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 939163847c39Smrgfi 939263847c39Smrgm4_ifval([$1], 939363847c39Smrg[if test "$have_asciidoc" = yes; then 939463847c39Smrg # scrape the asciidoc version 939563847c39Smrg AC_MSG_CHECKING([the asciidoc version]) 939663847c39Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 939763847c39Smrg AC_MSG_RESULT([$asciidoc_version]) 939863847c39Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 939963847c39Smrg [if test "x$use_asciidoc" = xauto; then 940063847c39Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 940163847c39Smrg have_asciidoc=no 940263847c39Smrg else 940363847c39Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 940463847c39Smrg fi]) 940563847c39Smrgfi]) 940663847c39SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 940763847c39Smrg]) # XORG_WITH_ASCIIDOC 940863847c39Smrg 940963847c39Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 941063847c39Smrg# -------------------------------- 941163847c39Smrg# Minimum version: 1.5.0 941263847c39Smrg# Minimum version for optional DEFAULT argument: 1.11.0 941363847c39Smrg# 941463847c39Smrg# Documentation tools are not always available on all platforms and sometimes 941563847c39Smrg# not at the appropriate level. This macro enables a module to test for the 941663847c39Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 941763847c39Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 941863847c39Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 941963847c39Smrg# --with-doxygen assumes 'auto'. 942063847c39Smrg# 942163847c39Smrg# Interface to module: 942263847c39Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 942363847c39Smrg# DOXYGEN: returns the path of the doxygen program found 942463847c39Smrg# returns the path set by the user in the environment 942563847c39Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 942663847c39Smrg# 'no' user instructs the module not to use doxygen 942763847c39Smrg# 942863847c39Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 942963847c39Smrg# 943063847c39SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 943163847c39SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 943263847c39Smrgm4_define([_defopt], m4_default([$2], [auto])) 943363847c39SmrgAC_ARG_WITH(doxygen, 943463847c39Smrg AS_HELP_STRING([--with-doxygen], 943563847c39Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 943663847c39Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 943763847c39Smrgm4_undefine([_defopt]) 943863847c39Smrg 943963847c39Smrgif test "x$use_doxygen" = x"auto"; then 944063847c39Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 944163847c39Smrg if test "x$DOXYGEN" = "x"; then 944263847c39Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 944363847c39Smrg have_doxygen=no 944463847c39Smrg else 944563847c39Smrg have_doxygen=yes 944663847c39Smrg fi 944763847c39Smrgelif test "x$use_doxygen" = x"yes" ; then 944863847c39Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 944963847c39Smrg if test "x$DOXYGEN" = "x"; then 945063847c39Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 945163847c39Smrg fi 945263847c39Smrg have_doxygen=yes 945363847c39Smrgelif test "x$use_doxygen" = x"no" ; then 945463847c39Smrg if test "x$DOXYGEN" != "x"; then 945563847c39Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 945663847c39Smrg fi 945763847c39Smrg have_doxygen=no 945863847c39Smrgelse 945963847c39Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 946063847c39Smrgfi 946163847c39Smrgm4_ifval([$1], 946263847c39Smrg[if test "$have_doxygen" = yes; then 946363847c39Smrg # scrape the doxygen version 946463847c39Smrg AC_MSG_CHECKING([the doxygen version]) 946563847c39Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 946663847c39Smrg AC_MSG_RESULT([$doxygen_version]) 946763847c39Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 946863847c39Smrg [if test "x$use_doxygen" = xauto; then 946963847c39Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 947063847c39Smrg have_doxygen=no 947163847c39Smrg else 947263847c39Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 947363847c39Smrg fi]) 947463847c39Smrgfi]) 947563847c39SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 947663847c39Smrg]) # XORG_WITH_DOXYGEN 947763847c39Smrg 947863847c39Smrg# XORG_WITH_GROFF([DEFAULT]) 947963847c39Smrg# ---------------- 948063847c39Smrg# Minimum version: 1.6.0 948163847c39Smrg# Minimum version for optional DEFAULT argument: 1.11.0 948263847c39Smrg# 948363847c39Smrg# Documentation tools are not always available on all platforms and sometimes 948463847c39Smrg# not at the appropriate level. This macro enables a module to test for the 948563847c39Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 948663847c39Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 948763847c39Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 948863847c39Smrg# --with-groff assumes 'auto'. 948963847c39Smrg# 949063847c39Smrg# Interface to module: 949163847c39Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 949263847c39Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 949363847c39Smrg# HAVE_GROFF_MS: the -ms macros package 949463847c39Smrg# GROFF: returns the path of the groff program found 949563847c39Smrg# returns the path set by the user in the environment 949663847c39Smrg# --with-groff: 'yes' user instructs the module to use groff 949763847c39Smrg# 'no' user instructs the module not to use groff 949863847c39Smrg# 949963847c39Smrg# Added in version 1.9.0: 950063847c39Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 950163847c39Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 950263847c39Smrg# psselect from the psutils package. 950363847c39Smrg# the ghostcript package. Refer to the grohtml man pages 950463847c39Smrg# 950563847c39Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 950663847c39Smrg# 950763847c39Smrg# OS and distros often splits groff in a basic and full package, the former 950863847c39Smrg# having the groff program and the later having devices, fonts and macros 950963847c39Smrg# Checking for the groff executable is not enough. 951063847c39Smrg# 951163847c39Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 951263847c39Smrg# unset HAVE_GROFF or GROFF env variables. 951363847c39Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 951463847c39Smrg# 951563847c39SmrgAC_DEFUN([XORG_WITH_GROFF],[ 951663847c39SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 951763847c39Smrgm4_define([_defopt], m4_default([$1], [auto])) 951863847c39SmrgAC_ARG_WITH(groff, 951963847c39Smrg AS_HELP_STRING([--with-groff], 952063847c39Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 952163847c39Smrg [use_groff=$withval], [use_groff=]_defopt) 952263847c39Smrgm4_undefine([_defopt]) 952363847c39Smrg 952463847c39Smrgif test "x$use_groff" = x"auto"; then 952563847c39Smrg AC_PATH_PROG([GROFF], [groff]) 952663847c39Smrg if test "x$GROFF" = "x"; then 952763847c39Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 952863847c39Smrg have_groff=no 952963847c39Smrg else 953063847c39Smrg have_groff=yes 953163847c39Smrg fi 953263847c39Smrgelif test "x$use_groff" = x"yes" ; then 953363847c39Smrg AC_PATH_PROG([GROFF], [groff]) 953463847c39Smrg if test "x$GROFF" = "x"; then 953563847c39Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 953663847c39Smrg fi 953763847c39Smrg have_groff=yes 953863847c39Smrgelif test "x$use_groff" = x"no" ; then 953963847c39Smrg if test "x$GROFF" != "x"; then 954063847c39Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 954163847c39Smrg fi 954263847c39Smrg have_groff=no 954363847c39Smrgelse 954463847c39Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 954563847c39Smrgfi 954663847c39Smrg 954763847c39Smrg# We have groff, test for the presence of the macro packages 954863847c39Smrgif test "x$have_groff" = x"yes"; then 954963847c39Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 955063847c39Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 955163847c39Smrg groff_ms_works=yes 955263847c39Smrg else 955363847c39Smrg groff_ms_works=no 955463847c39Smrg fi 955563847c39Smrg AC_MSG_RESULT([$groff_ms_works]) 955663847c39Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 955763847c39Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 955863847c39Smrg groff_mm_works=yes 955963847c39Smrg else 956063847c39Smrg groff_mm_works=no 956163847c39Smrg fi 956263847c39Smrg AC_MSG_RESULT([$groff_mm_works]) 956363847c39Smrgfi 956463847c39Smrg 956563847c39Smrg# We have groff, test for HTML dependencies, one command per package 956663847c39Smrgif test "x$have_groff" = x"yes"; then 956763847c39Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 956863847c39Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 956963847c39Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 957063847c39Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 957163847c39Smrg have_groff_html=yes 957263847c39Smrg else 957363847c39Smrg have_groff_html=no 957463847c39Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 957563847c39Smrg fi 957663847c39Smrgfi 957763847c39Smrg 957863847c39Smrg# Set Automake conditionals for Makefiles 957963847c39SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 958063847c39SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 958163847c39SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 958263847c39SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 958363847c39Smrg]) # XORG_WITH_GROFF 958463847c39Smrg 958563847c39Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 958663847c39Smrg# --------------------------------------- 958763847c39Smrg# Minimum version: 1.6.0 958863847c39Smrg# Minimum version for optional DEFAULT argument: 1.11.0 958963847c39Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 959063847c39Smrg# 959163847c39Smrg# Documentation tools are not always available on all platforms and sometimes 959263847c39Smrg# not at the appropriate level. This macro enables a module to test for the 959363847c39Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 959463847c39Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 959563847c39Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 959663847c39Smrg# --with-fop assumes 'auto'. 959763847c39Smrg# 959863847c39Smrg# Interface to module: 959963847c39Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 960063847c39Smrg# FOP: returns the path of the fop program found 960163847c39Smrg# returns the path set by the user in the environment 960263847c39Smrg# --with-fop: 'yes' user instructs the module to use fop 960363847c39Smrg# 'no' user instructs the module not to use fop 960463847c39Smrg# 960563847c39Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 960663847c39Smrg# 960763847c39SmrgAC_DEFUN([XORG_WITH_FOP],[ 960863847c39SmrgAC_ARG_VAR([FOP], [Path to fop command]) 960963847c39Smrgm4_define([_defopt], m4_default([$2], [auto])) 961063847c39SmrgAC_ARG_WITH(fop, 961163847c39Smrg AS_HELP_STRING([--with-fop], 961263847c39Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 961363847c39Smrg [use_fop=$withval], [use_fop=]_defopt) 961463847c39Smrgm4_undefine([_defopt]) 961563847c39Smrg 961663847c39Smrgif test "x$use_fop" = x"auto"; then 961763847c39Smrg AC_PATH_PROG([FOP], [fop]) 961863847c39Smrg if test "x$FOP" = "x"; then 961963847c39Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 962063847c39Smrg have_fop=no 962163847c39Smrg else 962263847c39Smrg have_fop=yes 962363847c39Smrg fi 962463847c39Smrgelif test "x$use_fop" = x"yes" ; then 962563847c39Smrg AC_PATH_PROG([FOP], [fop]) 962663847c39Smrg if test "x$FOP" = "x"; then 962763847c39Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 962863847c39Smrg fi 962963847c39Smrg have_fop=yes 963063847c39Smrgelif test "x$use_fop" = x"no" ; then 963163847c39Smrg if test "x$FOP" != "x"; then 963263847c39Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 963363847c39Smrg fi 963463847c39Smrg have_fop=no 963563847c39Smrgelse 963663847c39Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 963763847c39Smrgfi 963863847c39Smrg 963963847c39Smrg# Test for a minimum version of fop, if provided. 964063847c39Smrgm4_ifval([$1], 964163847c39Smrg[if test "$have_fop" = yes; then 964263847c39Smrg # scrape the fop version 964363847c39Smrg AC_MSG_CHECKING([for fop minimum version]) 964463847c39Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 964563847c39Smrg AC_MSG_RESULT([$fop_version]) 964663847c39Smrg AS_VERSION_COMPARE([$fop_version], [$1], 964763847c39Smrg [if test "x$use_fop" = xauto; then 964863847c39Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 964963847c39Smrg have_fop=no 965063847c39Smrg else 965163847c39Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 965263847c39Smrg fi]) 965363847c39Smrgfi]) 965463847c39SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 965563847c39Smrg]) # XORG_WITH_FOP 965663847c39Smrg 965763847c39Smrg# XORG_WITH_PS2PDF([DEFAULT]) 965863847c39Smrg# ---------------- 965963847c39Smrg# Minimum version: 1.6.0 966063847c39Smrg# Minimum version for optional DEFAULT argument: 1.11.0 966163847c39Smrg# 966263847c39Smrg# Documentation tools are not always available on all platforms and sometimes 966363847c39Smrg# not at the appropriate level. This macro enables a module to test for the 966463847c39Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 966563847c39Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 966663847c39Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 966763847c39Smrg# --with-ps2pdf assumes 'auto'. 966863847c39Smrg# 966963847c39Smrg# Interface to module: 967063847c39Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 967163847c39Smrg# PS2PDF: returns the path of the ps2pdf program found 967263847c39Smrg# returns the path set by the user in the environment 967363847c39Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 967463847c39Smrg# 'no' user instructs the module not to use ps2pdf 967563847c39Smrg# 967663847c39Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 967763847c39Smrg# 967863847c39SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 967963847c39SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 968063847c39Smrgm4_define([_defopt], m4_default([$1], [auto])) 968163847c39SmrgAC_ARG_WITH(ps2pdf, 968263847c39Smrg AS_HELP_STRING([--with-ps2pdf], 968363847c39Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 968463847c39Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 968563847c39Smrgm4_undefine([_defopt]) 968663847c39Smrg 968763847c39Smrgif test "x$use_ps2pdf" = x"auto"; then 968863847c39Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 968963847c39Smrg if test "x$PS2PDF" = "x"; then 969063847c39Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 969163847c39Smrg have_ps2pdf=no 969263847c39Smrg else 969363847c39Smrg have_ps2pdf=yes 969463847c39Smrg fi 969563847c39Smrgelif test "x$use_ps2pdf" = x"yes" ; then 969663847c39Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 969763847c39Smrg if test "x$PS2PDF" = "x"; then 969863847c39Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 969963847c39Smrg fi 970063847c39Smrg have_ps2pdf=yes 970163847c39Smrgelif test "x$use_ps2pdf" = x"no" ; then 970263847c39Smrg if test "x$PS2PDF" != "x"; then 970363847c39Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 970463847c39Smrg fi 970563847c39Smrg have_ps2pdf=no 970663847c39Smrgelse 970763847c39Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 970863847c39Smrgfi 970963847c39SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 971063847c39Smrg]) # XORG_WITH_PS2PDF 971163847c39Smrg 971263847c39Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 971363847c39Smrg# ---------------- 971463847c39Smrg# Minimum version: 1.6.0 971563847c39Smrg# 971663847c39Smrg# Documentation tools are not always available on all platforms and sometimes 971763847c39Smrg# not at the appropriate level. This macro enables a builder to skip all 971863847c39Smrg# documentation targets except traditional man pages. 971963847c39Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 972063847c39Smrg# maximum flexibilty in controlling documentation building. 972163847c39Smrg# Refer to: 972263847c39Smrg# XORG_WITH_XMLTO --with-xmlto 972363847c39Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 972463847c39Smrg# XORG_WITH_DOXYGEN --with-doxygen 972563847c39Smrg# XORG_WITH_FOP --with-fop 972663847c39Smrg# XORG_WITH_GROFF --with-groff 972763847c39Smrg# XORG_WITH_PS2PDF --with-ps2pdf 972863847c39Smrg# 972963847c39Smrg# Interface to module: 973063847c39Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 973163847c39Smrg# --enable-docs: 'yes' user instructs the module to generate docs 973263847c39Smrg# 'no' user instructs the module not to generate docs 973363847c39Smrg# parm1: specify the default value, yes or no. 973463847c39Smrg# 973563847c39SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 973663847c39Smrgm4_define([docs_default], m4_default([$1], [yes])) 973763847c39SmrgAC_ARG_ENABLE(docs, 973863847c39Smrg AS_HELP_STRING([--enable-docs], 973963847c39Smrg [Enable building the documentation (default: ]docs_default[)]), 974063847c39Smrg [build_docs=$enableval], [build_docs=]docs_default) 974163847c39Smrgm4_undefine([docs_default]) 974263847c39SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 974363847c39SmrgAC_MSG_CHECKING([whether to build documentation]) 974463847c39SmrgAC_MSG_RESULT([$build_docs]) 974563847c39Smrg]) # XORG_ENABLE_DOCS 974663847c39Smrg 974763847c39Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 974863847c39Smrg# ---------------- 974963847c39Smrg# Minimum version: 1.6.0 975063847c39Smrg# 975163847c39Smrg# This macro enables a builder to skip all developer documentation. 975263847c39Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 975363847c39Smrg# maximum flexibilty in controlling documentation building. 975463847c39Smrg# Refer to: 975563847c39Smrg# XORG_WITH_XMLTO --with-xmlto 975663847c39Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 975763847c39Smrg# XORG_WITH_DOXYGEN --with-doxygen 975863847c39Smrg# XORG_WITH_FOP --with-fop 975963847c39Smrg# XORG_WITH_GROFF --with-groff 976063847c39Smrg# XORG_WITH_PS2PDF --with-ps2pdf 976163847c39Smrg# 976263847c39Smrg# Interface to module: 976363847c39Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 976463847c39Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 976563847c39Smrg# 'no' user instructs the module not to generate developer docs 976663847c39Smrg# parm1: specify the default value, yes or no. 976763847c39Smrg# 976863847c39SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 976963847c39Smrgm4_define([devel_default], m4_default([$1], [yes])) 977063847c39SmrgAC_ARG_ENABLE(devel-docs, 977163847c39Smrg AS_HELP_STRING([--enable-devel-docs], 977263847c39Smrg [Enable building the developer documentation (default: ]devel_default[)]), 977363847c39Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 977463847c39Smrgm4_undefine([devel_default]) 977563847c39SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 977663847c39SmrgAC_MSG_CHECKING([whether to build developer documentation]) 977763847c39SmrgAC_MSG_RESULT([$build_devel_docs]) 977863847c39Smrg]) # XORG_ENABLE_DEVEL_DOCS 977963847c39Smrg 978063847c39Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 978163847c39Smrg# ---------------- 978263847c39Smrg# Minimum version: 1.6.0 978363847c39Smrg# 978463847c39Smrg# This macro enables a builder to skip all functional specification targets. 978563847c39Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 978663847c39Smrg# maximum flexibilty in controlling documentation building. 978763847c39Smrg# Refer to: 978863847c39Smrg# XORG_WITH_XMLTO --with-xmlto 978963847c39Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 979063847c39Smrg# XORG_WITH_DOXYGEN --with-doxygen 979163847c39Smrg# XORG_WITH_FOP --with-fop 979263847c39Smrg# XORG_WITH_GROFF --with-groff 979363847c39Smrg# XORG_WITH_PS2PDF --with-ps2pdf 979463847c39Smrg# 979563847c39Smrg# Interface to module: 979663847c39Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 979763847c39Smrg# --enable-specs: 'yes' user instructs the module to generate specs 979863847c39Smrg# 'no' user instructs the module not to generate specs 979963847c39Smrg# parm1: specify the default value, yes or no. 980063847c39Smrg# 980163847c39SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 980263847c39Smrgm4_define([spec_default], m4_default([$1], [yes])) 980363847c39SmrgAC_ARG_ENABLE(specs, 980463847c39Smrg AS_HELP_STRING([--enable-specs], 980563847c39Smrg [Enable building the specs (default: ]spec_default[)]), 980663847c39Smrg [build_specs=$enableval], [build_specs=]spec_default) 980763847c39Smrgm4_undefine([spec_default]) 980863847c39SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 980963847c39SmrgAC_MSG_CHECKING([whether to build functional specifications]) 981063847c39SmrgAC_MSG_RESULT([$build_specs]) 981163847c39Smrg]) # XORG_ENABLE_SPECS 981263847c39Smrg 981363847c39Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 981463847c39Smrg# ---------------------------------------------- 981563847c39Smrg# Minimum version: 1.13.0 981663847c39Smrg# 981763847c39Smrg# This macro enables a builder to enable/disable unit testing 981863847c39Smrg# It makes no assumption about the test cases implementation 981963847c39Smrg# Test cases may or may not use Automake "Support for test suites" 982063847c39Smrg# They may or may not use the software utility library GLib 982163847c39Smrg# 982263847c39Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 982363847c39Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 982463847c39Smrg# The variable enable_unit_tests is used by other macros in this file. 982563847c39Smrg# 982663847c39Smrg# Interface to module: 982763847c39Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 982863847c39Smrg# enable_unit_tests: used in configure.ac for additional configuration 982963847c39Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 983063847c39Smrg# 'no' user instructs the module not to build tests 983163847c39Smrg# parm1: specify the default value, yes or no. 983263847c39Smrg# 983363847c39SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 983463847c39SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 983563847c39SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 983663847c39SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 983763847c39Smrgm4_define([_defopt], m4_default([$1], [auto])) 983863847c39SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 983963847c39Smrg [Enable building unit test cases (default: ]_defopt[)]), 984063847c39Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 984163847c39Smrgm4_undefine([_defopt]) 984263847c39SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 984363847c39SmrgAC_MSG_CHECKING([whether to build unit test cases]) 984463847c39SmrgAC_MSG_RESULT([$enable_unit_tests]) 984563847c39Smrg]) # XORG_ENABLE_UNIT_TESTS 984663847c39Smrg 984763847c39Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 984863847c39Smrg# ------------------------------------------------------ 984963847c39Smrg# Minimum version: 1.17.0 985063847c39Smrg# 985163847c39Smrg# This macro enables a builder to enable/disable integration testing 985263847c39Smrg# It makes no assumption about the test cases' implementation 985363847c39Smrg# Test cases may or may not use Automake "Support for test suites" 985463847c39Smrg# 985563847c39Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 985663847c39Smrg# usually requires less dependencies and may be built and run under less 985763847c39Smrg# stringent environments than integration tests. 985863847c39Smrg# 985963847c39Smrg# Interface to module: 986063847c39Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 986163847c39Smrg# enable_integration_tests: used in configure.ac for additional configuration 986263847c39Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 986363847c39Smrg# 'no' user instructs the module not to build tests 986463847c39Smrg# parm1: specify the default value, yes or no. 986563847c39Smrg# 986663847c39SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 986763847c39SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 986863847c39Smrgm4_define([_defopt], m4_default([$1], [auto])) 986963847c39SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 987063847c39Smrg [Enable building integration test cases (default: ]_defopt[)]), 987163847c39Smrg [enable_integration_tests=$enableval], 987263847c39Smrg [enable_integration_tests=]_defopt) 987363847c39Smrgm4_undefine([_defopt]) 987463847c39SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 987563847c39Smrg [test "x$enable_integration_tests" != xno]) 987663847c39SmrgAC_MSG_CHECKING([whether to build unit test cases]) 987763847c39SmrgAC_MSG_RESULT([$enable_integration_tests]) 987863847c39Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 987963847c39Smrg 988063847c39Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 988163847c39Smrg# ---------------------------------------- 988263847c39Smrg# Minimum version: 1.13.0 988363847c39Smrg# 988463847c39Smrg# GLib is a library which provides advanced data structures and functions. 988563847c39Smrg# This macro enables a module to test for the presence of Glib. 988663847c39Smrg# 988763847c39Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 988863847c39Smrg# Otherwise the value of $enable_unit_tests is blank. 988963847c39Smrg# 989063847c39Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 989163847c39Smrg# test support usually requires less dependencies and may be built and run under 989263847c39Smrg# less stringent environments than integration tests. 989363847c39Smrg# 989463847c39Smrg# Interface to module: 989563847c39Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 989663847c39Smrg# with_glib: used in configure.ac to know if GLib has been found 989763847c39Smrg# --with-glib: 'yes' user instructs the module to use glib 989863847c39Smrg# 'no' user instructs the module not to use glib 989963847c39Smrg# 990063847c39SmrgAC_DEFUN([XORG_WITH_GLIB],[ 990163847c39SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 990263847c39Smrgm4_define([_defopt], m4_default([$2], [auto])) 990363847c39SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 990463847c39Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 990563847c39Smrg [with_glib=$withval], [with_glib=]_defopt) 990663847c39Smrgm4_undefine([_defopt]) 990763847c39Smrg 990863847c39Smrghave_glib=no 990963847c39Smrg# Do not probe GLib if user explicitly disabled unit testing 991063847c39Smrgif test "x$enable_unit_tests" != x"no"; then 991163847c39Smrg # Do not probe GLib if user explicitly disabled it 991263847c39Smrg if test "x$with_glib" != x"no"; then 991363847c39Smrg m4_ifval( 991463847c39Smrg [$1], 991563847c39Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 991663847c39Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 991763847c39Smrg ) 991863847c39Smrg fi 991963847c39Smrgfi 992063847c39Smrg 992163847c39Smrg# Not having GLib when unit testing has been explicitly requested is an error 992263847c39Smrgif test "x$enable_unit_tests" = x"yes"; then 992363847c39Smrg if test "x$have_glib" = x"no"; then 992463847c39Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 992563847c39Smrg fi 992663847c39Smrgfi 992763847c39Smrg 992863847c39Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 992963847c39Smrgif test "x$enable_unit_tests" = x"no"; then 993063847c39Smrg if test "x$with_glib" = x"yes"; then 993163847c39Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 993263847c39Smrg fi 993363847c39Smrgfi 993463847c39Smrg 993563847c39Smrg# Not having GLib when it has been explicitly requested is an error 993663847c39Smrgif test "x$with_glib" = x"yes"; then 993763847c39Smrg if test "x$have_glib" = x"no"; then 993863847c39Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 993963847c39Smrg fi 994063847c39Smrgfi 994163847c39Smrg 994263847c39SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 994363847c39Smrg]) # XORG_WITH_GLIB 994463847c39Smrg 994563847c39Smrg# XORG_LD_WRAP([required|optional]) 994663847c39Smrg# --------------------------------- 994763847c39Smrg# Minimum version: 1.13.0 994863847c39Smrg# 994963847c39Smrg# Check if linker supports -wrap, passed via compiler flags 995063847c39Smrg# 995163847c39Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 995263847c39Smrg# Otherwise the value of $enable_unit_tests is blank. 995363847c39Smrg# 995463847c39Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 995563847c39Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 995663847c39Smrg# available, an argument of "optional" allows use when some unit tests require 995763847c39Smrg# ld -wrap and others do not. 995863847c39Smrg# 995963847c39SmrgAC_DEFUN([XORG_LD_WRAP],[ 996063847c39SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 996163847c39Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 996263847c39Smrg void __wrap_exit(int status) { return; }], 996363847c39Smrg [exit(0);])]) 996463847c39Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 996563847c39Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 996663847c39Smrg if test "x$have_ld_wrap" = x"no"; then 996763847c39Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 996863847c39Smrg fi 996963847c39Smrgfi 997063847c39SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 997163847c39Smrg# 997263847c39Smrg]) # XORG_LD_WRAP 997363847c39Smrg 997463847c39Smrg# XORG_CHECK_LINKER_FLAGS 997563847c39Smrg# ----------------------- 997663847c39Smrg# SYNOPSIS 997763847c39Smrg# 997863847c39Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 997963847c39Smrg# 998063847c39Smrg# DESCRIPTION 998163847c39Smrg# 998263847c39Smrg# Check whether the given linker FLAGS work with the current language's 998363847c39Smrg# linker, or whether they give an error. 998463847c39Smrg# 998563847c39Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 998663847c39Smrg# success/failure. 998763847c39Smrg# 998863847c39Smrg# PROGRAM-SOURCE is the program source to link with, if needed 998963847c39Smrg# 999063847c39Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 999163847c39Smrg# 999263847c39Smrg# LICENSE 999363847c39Smrg# 999463847c39Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 999563847c39Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 999663847c39Smrg# Copyright (c) 2009 Matteo Frigo 999763847c39Smrg# 999863847c39Smrg# This program is free software: you can redistribute it and/or modify it 999963847c39Smrg# under the terms of the GNU General Public License as published by the 1000063847c39Smrg# Free Software Foundation, either version 3 of the License, or (at your 1000163847c39Smrg# option) any later version. 1000263847c39Smrg# 1000363847c39Smrg# This program is distributed in the hope that it will be useful, but 1000463847c39Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1000563847c39Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 1000663847c39Smrg# Public License for more details. 1000763847c39Smrg# 1000863847c39Smrg# You should have received a copy of the GNU General Public License along 1000963847c39Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 1001063847c39Smrg# 1001163847c39Smrg# As a special exception, the respective Autoconf Macro's copyright owner 1001263847c39Smrg# gives unlimited permission to copy, distribute and modify the configure 1001363847c39Smrg# scripts that are the output of Autoconf when processing the Macro. You 1001463847c39Smrg# need not follow the terms of the GNU General Public License when using 1001563847c39Smrg# or distributing such scripts, even though portions of the text of the 1001663847c39Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 1001763847c39Smrg# all other use of the material that constitutes the Autoconf Macro. 1001863847c39Smrg# 1001963847c39Smrg# This special exception to the GPL applies to versions of the Autoconf 1002063847c39Smrg# Macro released by the Autoconf Archive. When you make and distribute a 1002163847c39Smrg# modified version of the Autoconf Macro, you may extend this special 1002263847c39Smrg# exception to the GPL to apply to your modified version as well.# 1002363847c39SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 1002463847c39Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 1002563847c39Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 1002663847c39SmrgAS_LITERAL_IF([$1], 1002763847c39Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 1002863847c39Smrg ax_save_FLAGS=$LDFLAGS 1002963847c39Smrg LDFLAGS="$1" 1003063847c39Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 1003163847c39Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1003263847c39Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1003363847c39Smrg LDFLAGS=$ax_save_FLAGS])], 1003463847c39Smrg [ax_save_FLAGS=$LDFLAGS 1003563847c39Smrg LDFLAGS="$1" 1003663847c39Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 1003763847c39Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1003863847c39Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1003963847c39Smrg LDFLAGS=$ax_save_FLAGS]) 1004063847c39Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 1004163847c39SmrgAC_MSG_RESULT($xorg_check_linker_flags) 1004263847c39Smrgif test "x$xorg_check_linker_flags" = xyes; then 1004363847c39Smrg m4_default([$2], :) 1004463847c39Smrgelse 1004563847c39Smrg m4_default([$3], :) 1004663847c39Smrgfi 1004763847c39Smrg]) # XORG_CHECK_LINKER_FLAGS 1004863847c39Smrg 1004963847c39Smrg# XORG_MEMORY_CHECK_FLAGS 1005063847c39Smrg# ----------------------- 1005163847c39Smrg# Minimum version: 1.16.0 1005263847c39Smrg# 1005363847c39Smrg# This macro attempts to find appropriate memory checking functionality 1005463847c39Smrg# for various platforms which unit testing code may use to catch various 1005563847c39Smrg# forms of memory allocation and access errors in testing. 1005663847c39Smrg# 1005763847c39Smrg# Interface to module: 1005863847c39Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 1005963847c39Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 1006063847c39Smrg# 1006163847c39Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 1006263847c39Smrg# 1006363847c39SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 1006463847c39Smrg 1006563847c39SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1006663847c39SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 1006763847c39Smrg [Environment variables to enable memory checking in tests]) 1006876888252Smrg 1006963847c39Smrg# Check for different types of support on different platforms 1007063847c39Smrgcase $host_os in 1007163847c39Smrg solaris*) 1007263847c39Smrg AC_CHECK_LIB([umem], [umem_alloc], 1007363847c39Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 1007463847c39Smrg ;; 1007563847c39Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 1007663847c39Smrg # both directly and inverted, so should not be 0 or 255. 1007763847c39Smrg malloc_debug_env='MALLOC_PERTURB_=15' 1007863847c39Smrg ;; 1007963847c39Smrg darwin*) 1008063847c39Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 1008163847c39Smrg ;; 1008263847c39Smrg *bsd*) 1008363847c39Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 1008463847c39Smrg ;; 1008563847c39Smrgesac 1008676888252Smrg 1008763847c39Smrg# User supplied flags override default flags 1008863847c39Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 1008963847c39Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 1009086dafe34Smrgfi 1009176888252Smrg 1009263847c39SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 1009363847c39Smrg]) # XORG_WITH_LINT 1009476888252Smrg 1009586dafe34Smrg# XORG_CHECK_MALLOC_ZERO 1009686dafe34Smrg# ---------------------- 1009786dafe34Smrg# Minimum version: 1.0.0 1009886dafe34Smrg# 1009986dafe34Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1010086dafe34Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 1010186dafe34Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1010286dafe34SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1010386dafe34SmrgAC_ARG_ENABLE(malloc0returnsnull, 1010463847c39Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 1010586dafe34Smrg [malloc(0) returns NULL (default: auto)]), 1010686dafe34Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1010786dafe34Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1010876888252Smrg 1010986dafe34SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1011086dafe34Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1011163847c39Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 1011263847c39Smrg#include <stdlib.h> 1011363847c39Smrg],[ 1011486dafe34Smrg char *m0, *r0, *c0, *p; 1011586dafe34Smrg m0 = malloc(0); 1011686dafe34Smrg p = malloc(10); 1011786dafe34Smrg r0 = realloc(p,0); 1011863847c39Smrg c0 = calloc(0,10); 1011963847c39Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 1012063847c39Smrg])], 1012186dafe34Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 1012263847c39Smrg [MALLOC_ZERO_RETURNS_NULL=no], 1012363847c39Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 1012486dafe34Smrgfi 1012586dafe34SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1012676888252Smrg 1012786dafe34Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1012886dafe34Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1012986dafe34Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1013086dafe34Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1013186dafe34Smrgelse 1013286dafe34Smrg MALLOC_ZERO_CFLAGS="" 1013386dafe34Smrg XMALLOC_ZERO_CFLAGS="" 1013486dafe34Smrg XTMALLOC_ZERO_CFLAGS="" 1013586dafe34Smrgfi 1013676888252Smrg 1013786dafe34SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1013886dafe34SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1013986dafe34SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1014086dafe34Smrg]) # XORG_CHECK_MALLOC_ZERO 1014176888252Smrg 1014286dafe34Smrg# XORG_WITH_LINT() 1014386dafe34Smrg# ---------------- 1014486dafe34Smrg# Minimum version: 1.1.0 1014586dafe34Smrg# 1014663847c39Smrg# This macro enables the use of a tool that flags some suspicious and 1014763847c39Smrg# non-portable constructs (likely to be bugs) in C language source code. 1014863847c39Smrg# It will attempt to locate the tool and use appropriate options. 1014963847c39Smrg# There are various lint type tools on different platforms. 1015063847c39Smrg# 1015163847c39Smrg# Interface to module: 1015263847c39Smrg# LINT: returns the path to the tool found on the platform 1015363847c39Smrg# or the value set to LINT on the configure cmd line 1015463847c39Smrg# also an Automake conditional 1015563847c39Smrg# LINT_FLAGS: an Automake variable with appropriate flags 1015663847c39Smrg# 1015763847c39Smrg# --with-lint: 'yes' user instructs the module to use lint 1015863847c39Smrg# 'no' user instructs the module not to use lint (default) 1015963847c39Smrg# 1016063847c39Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 1016163847c39Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 1016286dafe34Smrg# 1016386dafe34SmrgAC_DEFUN([XORG_WITH_LINT],[ 1016476888252Smrg 1016563847c39SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 1016663847c39SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 1016763847c39SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1016886dafe34Smrg [Use a lint-style source code checker (default: disabled)])], 1016986dafe34Smrg [use_lint=$withval], [use_lint=no]) 1017063847c39Smrg 1017163847c39Smrg# Obtain platform specific info like program name and options 1017263847c39Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 1017363847c39Smrgcase $host_os in 1017463847c39Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 1017563847c39Smrg lint_name=splint 1017663847c39Smrg lint_options="-badflag" 1017763847c39Smrg ;; 1017863847c39Smrg *freebsd* | *netbsd*) 1017963847c39Smrg lint_name=lint 1018063847c39Smrg lint_options="-u -b" 1018163847c39Smrg ;; 1018263847c39Smrg *solaris*) 1018363847c39Smrg lint_name=lint 1018463847c39Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1018563847c39Smrg ;; 1018663847c39Smrgesac 1018763847c39Smrg 1018863847c39Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 1018963847c39Smrgif test "x$use_lint" = x"yes" ; then 1019063847c39Smrg AC_PATH_PROG([LINT], [$lint_name]) 1019163847c39Smrg if test "x$LINT" = "x"; then 1019263847c39Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 1019363847c39Smrg fi 1019463847c39Smrgelif test "x$use_lint" = x"no" ; then 1019563847c39Smrg if test "x$LINT" != "x"; then 1019663847c39Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 1019763847c39Smrg fi 1019886dafe34Smrgelse 1019963847c39Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 1020086dafe34Smrgfi 1020163847c39Smrg 1020263847c39Smrg# User supplied flags override default flags 1020363847c39Smrgif test "x$LINT_FLAGS" != "x"; then 1020463847c39Smrg lint_options=$LINT_FLAGS 1020586dafe34Smrgfi 1020676888252Smrg 1020763847c39SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 1020863847c39SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 1020976888252Smrg 1021086dafe34Smrg]) # XORG_WITH_LINT 1021176888252Smrg 1021286dafe34Smrg# XORG_LINT_LIBRARY(LIBNAME) 1021386dafe34Smrg# -------------------------- 1021486dafe34Smrg# Minimum version: 1.1.0 1021586dafe34Smrg# 1021686dafe34Smrg# Sets up flags for building lint libraries for checking programs that call 1021786dafe34Smrg# functions in the library. 1021886dafe34Smrg# 1021963847c39Smrg# Interface to module: 1022063847c39Smrg# LINTLIB - Automake variable with the name of lint library file to make 1022163847c39Smrg# MAKE_LINT_LIB - Automake conditional 1022263847c39Smrg# 1022363847c39Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 1022463847c39Smrg# - 'no' user instructs the module not to create a lint library (default) 1022576888252Smrg 1022686dafe34SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1022786dafe34SmrgAC_REQUIRE([XORG_WITH_LINT]) 1022863847c39SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1022986dafe34Smrg [Create lint library (default: disabled)])], 1023086dafe34Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 1023163847c39Smrg 1023263847c39Smrgif test "x$make_lint_lib" = x"yes" ; then 1023363847c39Smrg LINTLIB=llib-l$1.ln 1023463847c39Smrg if test "x$LINT" = "x"; then 1023563847c39Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1023663847c39Smrg fi 1023763847c39Smrgelif test "x$make_lint_lib" != x"no" ; then 1023863847c39Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 1023986dafe34Smrgfi 1024063847c39Smrg 1024186dafe34SmrgAC_SUBST(LINTLIB) 1024286dafe34SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1024376888252Smrg 1024486dafe34Smrg]) # XORG_LINT_LIBRARY 1024576888252Smrg 1024663847c39Smrg# XORG_COMPILER_BRAND 1024763847c39Smrg# ------------------- 1024863847c39Smrg# Minimum version: 1.14.0 1024963847c39Smrg# 1025063847c39Smrg# Checks for various brands of compilers and sets flags as appropriate: 1025163847c39Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 1025263847c39Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 1025363847c39Smrg# clang compiler - sets CLANGCC to "yes" 1025463847c39Smrg# Intel compiler - sets INTELCC to "yes" 1025563847c39Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 1025663847c39Smrg# 1025763847c39SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 1025863847c39SmrgAC_LANG_CASE( 1025963847c39Smrg [C], [ 1026063847c39Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1026163847c39Smrg ], 1026263847c39Smrg [C++], [ 1026363847c39Smrg AC_REQUIRE([AC_PROG_CXX]) 1026463847c39Smrg ] 1026563847c39Smrg) 1026663847c39SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 1026763847c39SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1026863847c39SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1026963847c39Smrg]) # XORG_COMPILER_BRAND 1027063847c39Smrg 1027163847c39Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 1027263847c39Smrg# --------------- 1027363847c39Smrg# Minimum version: 1.16.0 1027463847c39Smrg# 1027563847c39Smrg# Test if the compiler works when passed the given flag as a command line argument. 1027663847c39Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 1027763847c39Smrg# next flag in the list until there are no more options. 1027863847c39Smrg# 1027963847c39Smrg# Note that this does not guarantee that the compiler supports the flag as some 1028063847c39Smrg# compilers will simply ignore arguments that they do not understand, but we do 1028163847c39Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 1028263847c39Smrg# -Werror=unused-command-line-argument 1028363847c39Smrg# 1028463847c39SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 1028563847c39Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1028663847c39Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1028763847c39Smrg 1028863847c39SmrgAC_LANG_COMPILER_REQUIRE 1028963847c39Smrg 1029063847c39SmrgAC_LANG_CASE( 1029163847c39Smrg [C], [ 1029263847c39Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1029363847c39Smrg define([PREFIX], [C]) 1029463847c39Smrg define([CACHE_PREFIX], [cc]) 1029563847c39Smrg define([COMPILER], [$CC]) 1029663847c39Smrg ], 1029763847c39Smrg [C++], [ 1029863847c39Smrg define([PREFIX], [CXX]) 1029963847c39Smrg define([CACHE_PREFIX], [cxx]) 1030063847c39Smrg define([COMPILER], [$CXX]) 1030163847c39Smrg ] 1030263847c39Smrg) 1030363847c39Smrg 1030463847c39Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 1030563847c39Smrg 1030663847c39Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 1030763847c39Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1030863847c39Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 1030963847c39Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 1031063847c39Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1031163847c39Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 1031263847c39Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 1031363847c39Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 1031463847c39Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1031563847c39Smrgfi 1031663847c39Smrg 1031763847c39Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 1031863847c39Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 1031963847c39Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1032063847c39Smrg fi 1032163847c39Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1032263847c39Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 1032363847c39Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 1032463847c39Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1032563847c39Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 1032663847c39Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 1032763847c39Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 1032863847c39Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1032963847c39Smrgfi 1033063847c39Smrg 1033163847c39Smrgfound="no" 1033263847c39Smrgm4_foreach([flag], m4_cdr($@), [ 1033363847c39Smrg if test $found = "no" ; then 1033463847c39Smrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 1033563847c39Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1033663847c39Smrg fi 1033763847c39Smrg 1033863847c39Smrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 1033963847c39Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1034063847c39Smrg fi 1034163847c39Smrg 1034263847c39Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 1034363847c39Smrg 1034463847c39Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 1034563847c39Smrg AC_MSG_CHECKING([if ]COMPILER[ supports]flag[]) 1034663847c39Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 1034763847c39Smrg AC_CACHE_VAL($cacheid, 1034863847c39Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 1034963847c39Smrg [eval $cacheid=yes], 1035063847c39Smrg [eval $cacheid=no])]) 1035163847c39Smrg 1035263847c39Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1035363847c39Smrg 1035463847c39Smrg eval supported=\$$cacheid 1035563847c39Smrg AC_MSG_RESULT([$supported]) 1035663847c39Smrg if test "$supported" = "yes" ; then 1035763847c39Smrg $1="$$1 ]flag[" 1035863847c39Smrg found="yes" 1035963847c39Smrg fi 1036063847c39Smrg fi 1036163847c39Smrg]) 1036263847c39Smrg]) # XORG_TESTSET_CFLAG 1036363847c39Smrg 1036463847c39Smrg# XORG_COMPILER_FLAGS 1036563847c39Smrg# --------------- 1036663847c39Smrg# Minimum version: 1.16.0 1036763847c39Smrg# 1036863847c39Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 1036963847c39Smrg# arguments supported by the selected compiler which do NOT alter the generated 1037063847c39Smrg# code. These arguments will cause the compiler to print various warnings 1037163847c39Smrg# during compilation AND turn a conservative set of warnings into errors. 1037263847c39Smrg# 1037363847c39Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 1037463847c39Smrg# future versions of util-macros as options are added to new compilers. 1037563847c39Smrg# 1037663847c39SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 1037763847c39SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1037863847c39Smrg 1037963847c39SmrgAC_ARG_ENABLE(selective-werror, 1038063847c39Smrg AS_HELP_STRING([--disable-selective-werror], 1038163847c39Smrg [Turn off selective compiler errors. (default: enabled)]), 1038263847c39Smrg [SELECTIVE_WERROR=$enableval], 1038363847c39Smrg [SELECTIVE_WERROR=yes]) 1038463847c39Smrg 1038563847c39SmrgAC_LANG_CASE( 1038663847c39Smrg [C], [ 1038763847c39Smrg define([PREFIX], [C]) 1038863847c39Smrg ], 1038963847c39Smrg [C++], [ 1039063847c39Smrg define([PREFIX], [CXX]) 1039163847c39Smrg ] 1039263847c39Smrg) 1039363847c39Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 1039463847c39Smrgif test "x$SUNCC" = "xyes"; then 1039563847c39Smrg [BASE_]PREFIX[FLAGS]="-v" 1039663847c39Smrgelse 1039763847c39Smrg [BASE_]PREFIX[FLAGS]="" 1039863847c39Smrgfi 1039963847c39Smrg 1040063847c39Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 1040163847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 1040263847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 1040363847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 1040463847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 1040563847c39Smrg 1040663847c39SmrgAC_LANG_CASE( 1040763847c39Smrg [C], [ 1040863847c39Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 1040963847c39Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 1041063847c39Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 1041163847c39Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 1041263847c39Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 1041363847c39Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 1041463847c39Smrg ] 1041563847c39Smrg) 1041663847c39Smrg 1041763847c39Smrg# This chunk adds additional warnings that could catch undesired effects. 1041863847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 1041963847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 1042063847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 1042163847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 1042263847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 1042363847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 1042463847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1042563847c39Smrg 1042663847c39Smrg# These are currently disabled because they are noisy. They will be enabled 1042763847c39Smrg# in the future once the codebase is sufficiently modernized to silence 1042863847c39Smrg# them. For now, I don't want them to drown out the other warnings. 1042963847c39Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 1043063847c39Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 1043163847c39Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 1043263847c39Smrg 1043363847c39Smrg# Turn some warnings into errors, so we don't accidently get successful builds 1043463847c39Smrg# when there are problems that should be fixed. 1043563847c39Smrg 1043663847c39Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 1043763847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 1043863847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 1043963847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 1044063847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 1044163847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 1044263847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 1044363847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 1044463847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 1044563847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 1044663847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 1044763847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 1044863847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 1044963847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 1045063847c39Smrgelse 1045163847c39SmrgAC_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]) 1045263847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 1045363847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 1045463847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 1045563847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 1045663847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 1045763847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 1045863847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 1045963847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 1046063847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 1046163847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 1046263847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 1046363847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 1046463847c39SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 1046563847c39Smrgfi 1046663847c39Smrg 1046763847c39SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1046863847c39Smrg]) # XORG_COMPILER_FLAGS 1046963847c39Smrg 1047086dafe34Smrg# XORG_CWARNFLAGS 1047186dafe34Smrg# --------------- 1047286dafe34Smrg# Minimum version: 1.2.0 1047363847c39Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 1047486dafe34Smrg# 1047586dafe34Smrg# Defines CWARNFLAGS to enable C compiler warnings. 1047686dafe34Smrg# 1047763847c39Smrg# This function is deprecated because it defines -fno-strict-aliasing 1047863847c39Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 1047963847c39Smrg# is needed, then it should be added explicitly in the module when 1048063847c39Smrg# it is updated to use BASE_CFLAGS. 1048163847c39Smrg# 1048286dafe34SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1048363847c39SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1048463847c39SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1048563847c39SmrgAC_LANG_CASE( 1048663847c39Smrg [C], [ 1048763847c39Smrg CWARNFLAGS="$BASE_CFLAGS" 1048863847c39Smrg if test "x$GCC" = xyes ; then 1048963847c39Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 1049063847c39Smrg fi 1049163847c39Smrg AC_SUBST(CWARNFLAGS) 1049263847c39Smrg ] 1049363847c39Smrg) 1049486dafe34Smrg]) # XORG_CWARNFLAGS 1049563847c39Smrg 1049663847c39Smrg# XORG_STRICT_OPTION 1049763847c39Smrg# ----------------------- 1049863847c39Smrg# Minimum version: 1.3.0 1049963847c39Smrg# 1050063847c39Smrg# Add configure option to enable strict compilation flags, such as treating 1050163847c39Smrg# warnings as fatal errors. 1050263847c39Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 1050363847c39Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 1050463847c39Smrg# 1050563847c39Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 1050663847c39Smrg# when strict compilation is unconditionally desired. 1050763847c39SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 1050863847c39SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 1050963847c39SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1051063847c39Smrg 1051163847c39SmrgAC_ARG_ENABLE(strict-compilation, 1051263847c39Smrg AS_HELP_STRING([--enable-strict-compilation], 1051363847c39Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 1051463847c39Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 1051563847c39Smrg 1051663847c39SmrgAC_LANG_CASE( 1051763847c39Smrg [C], [ 1051863847c39Smrg define([PREFIX], [C]) 1051963847c39Smrg ], 1052063847c39Smrg [C++], [ 1052163847c39Smrg define([PREFIX], [CXX]) 1052263847c39Smrg ] 1052363847c39Smrg) 1052463847c39Smrg 1052563847c39Smrg[STRICT_]PREFIX[FLAGS]="" 1052663847c39SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 1052763847c39SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 1052863847c39Smrg 1052963847c39Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 1053063847c39Smrg# activate it with -Werror, so we add it here explicitly. 1053163847c39SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 1053263847c39Smrg 1053363847c39Smrgif test "x$STRICT_COMPILE" = "xyes"; then 1053463847c39Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 1053563847c39Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 1053663847c39Smrgfi 1053763847c39SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 1053863847c39SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1053963847c39SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 1054063847c39Smrg]) # XORG_STRICT_OPTION 1054163847c39Smrg 1054263847c39Smrg# XORG_DEFAULT_OPTIONS 1054363847c39Smrg# -------------------- 1054463847c39Smrg# Minimum version: 1.3.0 1054563847c39Smrg# 1054663847c39Smrg# Defines default options for X.Org modules. 1054763847c39Smrg# 1054863847c39SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 1054963847c39SmrgAC_REQUIRE([AC_PROG_INSTALL]) 1055063847c39SmrgXORG_COMPILER_FLAGS 1055163847c39SmrgXORG_CWARNFLAGS 1055263847c39SmrgXORG_STRICT_OPTION 1055363847c39SmrgXORG_RELEASE_VERSION 1055463847c39SmrgXORG_CHANGELOG 1055563847c39SmrgXORG_INSTALL 1055663847c39SmrgXORG_MANPAGE_SECTIONS 1055763847c39Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 1055863847c39Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 1055963847c39Smrg]) # XORG_DEFAULT_OPTIONS 1056063847c39Smrg 1056163847c39Smrg# XORG_INSTALL() 1056263847c39Smrg# ---------------- 1056363847c39Smrg# Minimum version: 1.4.0 1056463847c39Smrg# 1056563847c39Smrg# Defines the variable INSTALL_CMD as the command to copy 1056663847c39Smrg# INSTALL from $prefix/share/util-macros. 1056763847c39Smrg# 1056863847c39SmrgAC_DEFUN([XORG_INSTALL], [ 1056963847c39SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1057063847c39Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 1057163847c39SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 1057263847c39Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 1057363847c39Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 1057463847c39Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 1057563847c39SmrgAC_SUBST([INSTALL_CMD]) 1057663847c39Smrg]) # XORG_INSTALL 1057786dafe34Smrgdnl Copyright 2005 Red Hat, Inc 1057886dafe34Smrgdnl 1057986dafe34Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1058086dafe34Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1058186dafe34Smrgdnl the above copyright notice appear in all copies and that both that 1058286dafe34Smrgdnl copyright notice and this permission notice appear in supporting 1058386dafe34Smrgdnl documentation. 1058486dafe34Smrgdnl 1058586dafe34Smrgdnl The above copyright notice and this permission notice shall be included 1058686dafe34Smrgdnl in all copies or substantial portions of the Software. 1058786dafe34Smrgdnl 1058886dafe34Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1058986dafe34Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1059086dafe34Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1059186dafe34Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1059286dafe34Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1059386dafe34Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1059486dafe34Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1059586dafe34Smrgdnl 1059686dafe34Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1059786dafe34Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1059886dafe34Smrgdnl other dealings in this Software without prior written authorization 1059986dafe34Smrgdnl from the copyright holders. 1060086dafe34Smrgdnl 1060176888252Smrg 1060286dafe34Smrg# XORG_RELEASE_VERSION 1060386dafe34Smrg# -------------------- 1060463847c39Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1060586dafe34Smrg 1060686dafe34SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1060786dafe34Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1060886dafe34Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1060986dafe34Smrg [Major version of this package]) 1061086dafe34Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1061186dafe34Smrg if test "x$PVM" = "x"; then 1061286dafe34Smrg PVM="0" 1061386dafe34Smrg fi 1061486dafe34Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1061586dafe34Smrg [$PVM], 1061686dafe34Smrg [Minor version of this package]) 1061786dafe34Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1061886dafe34Smrg if test "x$PVP" = "x"; then 1061986dafe34Smrg PVP="0" 1062086dafe34Smrg fi 1062186dafe34Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1062286dafe34Smrg [$PVP], 1062386dafe34Smrg [Patch version of this package]) 106241ae1b5e8Smrg]) 106251ae1b5e8Smrg 1062686dafe34Smrg# XORG_CHANGELOG() 1062786dafe34Smrg# ---------------- 1062886dafe34Smrg# Minimum version: 1.2.0 106291ae1b5e8Smrg# 1063086dafe34Smrg# Defines the variable CHANGELOG_CMD as the command to generate 1063186dafe34Smrg# ChangeLog from git. 106321ae1b5e8Smrg# 106331ae1b5e8Smrg# 1063486dafe34SmrgAC_DEFUN([XORG_CHANGELOG], [ 1063563847c39SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 1063663847c39Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 1063763847c39Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 1063886dafe34Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 1063986dafe34SmrgAC_SUBST([CHANGELOG_CMD]) 1064086dafe34Smrg]) # XORG_CHANGELOG 1064176888252Smrg 1064263847c39Smrgdnl Copyright 2005 Red Hat, Inc 1064363847c39Smrgdnl 1064463847c39Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1064563847c39Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1064663847c39Smrgdnl the above copyright notice appear in all copies and that both that 1064763847c39Smrgdnl copyright notice and this permission notice appear in supporting 1064863847c39Smrgdnl documentation. 1064963847c39Smrgdnl 1065063847c39Smrgdnl The above copyright notice and this permission notice shall be included 1065163847c39Smrgdnl in all copies or substantial portions of the Software. 1065263847c39Smrgdnl 1065363847c39Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1065463847c39Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1065563847c39Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1065663847c39Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1065763847c39Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1065863847c39Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1065963847c39Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1066063847c39Smrgdnl 1066163847c39Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1066263847c39Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1066363847c39Smrgdnl other dealings in this Software without prior written authorization 1066463847c39Smrgdnl from the copyright holders. 1066563847c39Smrgdnl 1066663847c39Smrg 1066763847c39Smrg# XORG_DRIVER_CHECK_EXT() 1066863847c39Smrg# -------------------------- 1066963847c39Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 1067063847c39Smrg# is defined, then add $1 to $REQUIRED_MODULES. 1067163847c39Smrg 1067263847c39SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 1067363847c39Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1067463847c39Smrg SAVE_CFLAGS="$CFLAGS" 1067563847c39Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 1067663847c39Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 1067763847c39Smrg#include "xorg-server.h" 1067863847c39Smrg#if !defined $1 1067963847c39Smrg#error $1 not defined 1068063847c39Smrg#endif 1068163847c39Smrg ]])], 1068263847c39Smrg [_EXT_CHECK=yes], 1068363847c39Smrg [_EXT_CHECK=no]) 1068463847c39Smrg CFLAGS="$SAVE_CFLAGS" 1068563847c39Smrg AC_MSG_CHECKING([if $1 is defined]) 1068663847c39Smrg AC_MSG_RESULT([$_EXT_CHECK]) 1068763847c39Smrg if test "$_EXT_CHECK" != no; then 1068863847c39Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 1068963847c39Smrg fi 1069063847c39Smrg]) 1069163847c39Smrg 1069263847c39Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software 1069363847c39Smrg# Foundation, Inc. 1069486dafe34Smrg# 1069586dafe34Smrg# This file is free software; the Free Software Foundation 1069686dafe34Smrg# gives unlimited permission to copy and/or distribute it, 1069786dafe34Smrg# with or without modifications, as long as this notice is preserved. 1069876888252Smrg 1069963847c39Smrg# serial 1 1070063847c39Smrg 1070186dafe34Smrg# AM_AUTOMAKE_VERSION(VERSION) 1070286dafe34Smrg# ---------------------------- 1070386dafe34Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 1070486dafe34Smrg# generated from the m4 files accompanying Automake X.Y. 1070586dafe34Smrg# (This private macro should not be called outside this file.) 1070686dafe34SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 10707d8556812Smrg[am__api_version='1.11' 1070886dafe34Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 1070986dafe34Smrgdnl require some minimum version. Point them to the right macro. 1071063847c39Smrgm4_if([$1], [1.11.3], [], 1071186dafe34Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 1071286dafe34Smrg]) 1071376888252Smrg 1071486dafe34Smrg# _AM_AUTOCONF_VERSION(VERSION) 1071586dafe34Smrg# ----------------------------- 1071686dafe34Smrg# aclocal traces this macro to find the Autoconf version. 1071786dafe34Smrg# This is a private macro too. Using m4_define simplifies 1071886dafe34Smrg# the logic in aclocal, which can simply ignore this definition. 1071986dafe34Smrgm4_define([_AM_AUTOCONF_VERSION], []) 1072076888252Smrg 1072186dafe34Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 1072286dafe34Smrg# ------------------------------- 1072386dafe34Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 1072486dafe34Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 1072586dafe34SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 1072663847c39Smrg[AM_AUTOMAKE_VERSION([1.11.3])dnl 1072786dafe34Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1072886dafe34Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1072986dafe34Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 1073076888252Smrg 1073186dafe34Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 1073276888252Smrg 1073363847c39Smrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 1073486dafe34Smrg# 1073586dafe34Smrg# This file is free software; the Free Software Foundation 1073686dafe34Smrg# gives unlimited permission to copy and/or distribute it, 1073786dafe34Smrg# with or without modifications, as long as this notice is preserved. 1073876888252Smrg 1073963847c39Smrg# serial 1 1074063847c39Smrg 1074186dafe34Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 1074286dafe34Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 1074386dafe34Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 1074486dafe34Smrg# 1074586dafe34Smrg# Of course, Automake must honor this variable whenever it calls a 1074686dafe34Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 1074786dafe34Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 1074886dafe34Smrg# depending on how configure is run. This is pretty annoying, since 1074986dafe34Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 1075086dafe34Smrg# source directory, any form will work fine, but in subdirectories a 1075186dafe34Smrg# relative path needs to be adjusted first. 1075286dafe34Smrg# 1075386dafe34Smrg# $ac_aux_dir/missing 1075486dafe34Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 1075586dafe34Smrg# $top_srcdir/$ac_aux_dir/missing 1075686dafe34Smrg# fails if $ac_aux_dir is absolute, 1075786dafe34Smrg# fails when called from a subdirectory in a VPATH build with 1075886dafe34Smrg# a relative $ac_aux_dir 1075986dafe34Smrg# 1076086dafe34Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 1076186dafe34Smrg# are both prefixed by $srcdir. In an in-source build this is usually 1076286dafe34Smrg# harmless because $srcdir is `.', but things will broke when you 1076386dafe34Smrg# start a VPATH build or use an absolute $srcdir. 1076486dafe34Smrg# 1076586dafe34Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 1076686dafe34Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 1076786dafe34Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 1076886dafe34Smrg# and then we would define $MISSING as 1076986dafe34Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 1077086dafe34Smrg# This will work as long as MISSING is not called from configure, because 1077186dafe34Smrg# unfortunately $(top_srcdir) has no meaning in configure. 1077286dafe34Smrg# However there are other variables, like CC, which are often used in 1077386dafe34Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 1077486dafe34Smrg# 1077586dafe34Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 1077686dafe34Smrg# absolute PATH. The drawback is that using absolute paths prevent a 1077786dafe34Smrg# configured tree to be moved without reconfiguration. 1077876888252Smrg 1077986dafe34SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1078086dafe34Smrg[dnl Rely on autoconf to set up CDPATH properly. 1078186dafe34SmrgAC_PREREQ([2.50])dnl 1078286dafe34Smrg# expand $ac_aux_dir to an absolute path 1078386dafe34Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 1078486dafe34Smrg]) 1078576888252Smrg 1078686dafe34Smrg# AM_CONDITIONAL -*- Autoconf -*- 1078776888252Smrg 10788d8556812Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 1078986dafe34Smrg# Free Software Foundation, Inc. 1079086dafe34Smrg# 1079186dafe34Smrg# This file is free software; the Free Software Foundation 1079286dafe34Smrg# gives unlimited permission to copy and/or distribute it, 1079386dafe34Smrg# with or without modifications, as long as this notice is preserved. 1079476888252Smrg 10795d8556812Smrg# serial 9 1079676888252Smrg 1079786dafe34Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1079886dafe34Smrg# ------------------------------------- 1079986dafe34Smrg# Define a conditional. 1080086dafe34SmrgAC_DEFUN([AM_CONDITIONAL], 1080186dafe34Smrg[AC_PREREQ(2.52)dnl 1080286dafe34Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1080386dafe34Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1080486dafe34SmrgAC_SUBST([$1_TRUE])dnl 1080586dafe34SmrgAC_SUBST([$1_FALSE])dnl 1080686dafe34Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1080786dafe34Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 10808d8556812Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1080986dafe34Smrgif $2; then 1081086dafe34Smrg $1_TRUE= 1081186dafe34Smrg $1_FALSE='#' 1081286dafe34Smrgelse 1081386dafe34Smrg $1_TRUE='#' 1081486dafe34Smrg $1_FALSE= 1081586dafe34Smrgfi 1081686dafe34SmrgAC_CONFIG_COMMANDS_PRE( 1081786dafe34Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1081886dafe34Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 1081986dafe34SmrgUsually this means the macro was only invoked conditionally.]]) 1082086dafe34Smrgfi])]) 1082176888252Smrg 1082263847c39Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 1082363847c39Smrg# 2010, 2011 Free Software Foundation, Inc. 1082486dafe34Smrg# 1082586dafe34Smrg# This file is free software; the Free Software Foundation 1082686dafe34Smrg# gives unlimited permission to copy and/or distribute it, 1082786dafe34Smrg# with or without modifications, as long as this notice is preserved. 1082876888252Smrg 1082963847c39Smrg# serial 12 1083076888252Smrg 1083186dafe34Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 1083286dafe34Smrg# written in clear, in which case automake, when reading aclocal.m4, 1083386dafe34Smrg# will think it sees a *use*, and therefore will trigger all it's 1083486dafe34Smrg# C support machinery. Also note that it means that autoscan, seeing 1083586dafe34Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1083676888252Smrg 1083776888252Smrg 1083886dafe34Smrg# _AM_DEPENDENCIES(NAME) 1083986dafe34Smrg# ---------------------- 1084086dafe34Smrg# See how the compiler implements dependency checking. 1084186dafe34Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 1084286dafe34Smrg# We try a few techniques and use that to set a single cache variable. 1084386dafe34Smrg# 1084486dafe34Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1084586dafe34Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1084686dafe34Smrg# dependency, and given that the user is not expected to run this macro, 1084786dafe34Smrg# just rely on AC_PROG_CC. 1084886dafe34SmrgAC_DEFUN([_AM_DEPENDENCIES], 1084986dafe34Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1085086dafe34SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1085186dafe34SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1085286dafe34SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1085376888252Smrg 1085486dafe34Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 1085586dafe34Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 1085686dafe34Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1085786dafe34Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 1085886dafe34Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1085986dafe34Smrg [depcc="$$1" am_compiler_list=]) 1086086dafe34Smrg 1086186dafe34SmrgAC_CACHE_CHECK([dependency style of $depcc], 1086286dafe34Smrg [am_cv_$1_dependencies_compiler_type], 1086386dafe34Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1086486dafe34Smrg # We make a subdir and do the tests there. Otherwise we can end up 1086586dafe34Smrg # making bogus files that we don't know about and never remove. For 1086686dafe34Smrg # instance it was reported that on HP-UX the gcc test will end up 1086786dafe34Smrg # making a dummy file named `D' -- because `-MD' means `put the output 1086886dafe34Smrg # in D'. 1086963847c39Smrg rm -rf conftest.dir 1087086dafe34Smrg mkdir conftest.dir 1087186dafe34Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 1087286dafe34Smrg # using a relative directory. 1087386dafe34Smrg cp "$am_depcomp" conftest.dir 1087486dafe34Smrg cd conftest.dir 1087586dafe34Smrg # We will build objects and dependencies in a subdirectory because 1087686dafe34Smrg # it helps to detect inapplicable dependency modes. For instance 1087786dafe34Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 1087886dafe34Smrg # side effect of compilation, but ICC will put the dependencies in 1087986dafe34Smrg # the current directory while Tru64 will put them in the object 1088086dafe34Smrg # directory. 1088186dafe34Smrg mkdir sub 1088276888252Smrg 1088386dafe34Smrg am_cv_$1_dependencies_compiler_type=none 1088486dafe34Smrg if test "$am_compiler_list" = ""; then 1088586dafe34Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 1088686dafe34Smrg fi 10887d8556812Smrg am__universal=false 10888d8556812Smrg m4_case([$1], [CC], 10889d8556812Smrg [case " $depcc " in #( 10890d8556812Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 10891d8556812Smrg esac], 10892d8556812Smrg [CXX], 10893d8556812Smrg [case " $depcc " in #( 10894d8556812Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 10895d8556812Smrg esac]) 10896d8556812Smrg 1089786dafe34Smrg for depmode in $am_compiler_list; do 1089886dafe34Smrg # Setup a source with many dependencies, because some compilers 1089986dafe34Smrg # like to wrap large dependency lists on column 80 (with \), and 1090086dafe34Smrg # we should not choose a depcomp mode which is confused by this. 1090186dafe34Smrg # 1090286dafe34Smrg # We need to recreate these files for each test, as the compiler may 1090386dafe34Smrg # overwrite some of them when testing with obscure command lines. 1090486dafe34Smrg # This happens at least with the AIX C compiler. 1090586dafe34Smrg : > sub/conftest.c 1090686dafe34Smrg for i in 1 2 3 4 5 6; do 1090786dafe34Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 1090886dafe34Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 1090986dafe34Smrg # Solaris 8's {/usr,}/bin/sh. 1091086dafe34Smrg touch sub/conftst$i.h 1091186dafe34Smrg done 1091286dafe34Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 1091376888252Smrg 10914d8556812Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 10915d8556812Smrg # mode. It turns out that the SunPro C++ compiler does not properly 10916d8556812Smrg # handle `-M -o', and we need to detect this. Also, some Intel 10917d8556812Smrg # versions had trouble with output in subdirs 10918d8556812Smrg am__obj=sub/conftest.${OBJEXT-o} 10919d8556812Smrg am__minus_obj="-o $am__obj" 1092086dafe34Smrg case $depmode in 10921d8556812Smrg gcc) 10922d8556812Smrg # This depmode causes a compiler race in universal mode. 10923d8556812Smrg test "$am__universal" = false || continue 10924d8556812Smrg ;; 1092586dafe34Smrg nosideeffect) 1092686dafe34Smrg # after this tag, mechanisms are not by side-effect, so they'll 1092786dafe34Smrg # only be used when explicitly requested 1092886dafe34Smrg if test "x$enable_dependency_tracking" = xyes; then 1092986dafe34Smrg continue 109301ae1b5e8Smrg else 1093186dafe34Smrg break 109321ae1b5e8Smrg fi 109331ae1b5e8Smrg ;; 1093463847c39Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 10935d8556812Smrg # This compiler won't grok `-c -o', but also, the minuso test has 10936d8556812Smrg # not run yet. These depmodes are late enough in the game, and 10937d8556812Smrg # so weak that their functioning should not be impacted. 10938d8556812Smrg am__obj=conftest.${OBJEXT-o} 10939d8556812Smrg am__minus_obj= 10940d8556812Smrg ;; 1094186dafe34Smrg none) break ;; 1094286dafe34Smrg esac 1094386dafe34Smrg if depmode=$depmode \ 10944d8556812Smrg source=sub/conftest.c object=$am__obj \ 1094586dafe34Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 10946d8556812Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 1094786dafe34Smrg >/dev/null 2>conftest.err && 1094886dafe34Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 1094986dafe34Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 10950d8556812Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 1095186dafe34Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 1095286dafe34Smrg # icc doesn't choke on unknown options, it will just issue warnings 1095386dafe34Smrg # or remarks (even with -Werror). So we grep stderr for any message 1095486dafe34Smrg # that says an option was ignored or not supported. 1095586dafe34Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 1095686dafe34Smrg # icc: Command line warning: ignoring option '-M'; no argument required 1095786dafe34Smrg # The diagnosis changed in icc 8.0: 1095886dafe34Smrg # icc: Command line remark: option '-MP' not supported 1095986dafe34Smrg if (grep 'ignoring option' conftest.err || 1096086dafe34Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 1096186dafe34Smrg am_cv_$1_dependencies_compiler_type=$depmode 1096286dafe34Smrg break 1096386dafe34Smrg fi 1096486dafe34Smrg fi 1096586dafe34Smrg done 1096676888252Smrg 1096786dafe34Smrg cd .. 1096886dafe34Smrg rm -rf conftest.dir 1096986dafe34Smrgelse 1097086dafe34Smrg am_cv_$1_dependencies_compiler_type=none 1097186dafe34Smrgfi 1097286dafe34Smrg]) 1097386dafe34SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 1097486dafe34SmrgAM_CONDITIONAL([am__fastdep$1], [ 1097586dafe34Smrg test "x$enable_dependency_tracking" != xno \ 1097686dafe34Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 1097786dafe34Smrg]) 1097876888252Smrg 1097976888252Smrg 1098086dafe34Smrg# AM_SET_DEPDIR 1098186dafe34Smrg# ------------- 1098286dafe34Smrg# Choose a directory name for dependency files. 1098386dafe34Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 1098486dafe34SmrgAC_DEFUN([AM_SET_DEPDIR], 1098586dafe34Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1098686dafe34SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 1098786dafe34Smrg]) 1098876888252Smrg 1098976888252Smrg 1099086dafe34Smrg# AM_DEP_TRACK 1099186dafe34Smrg# ------------ 1099286dafe34SmrgAC_DEFUN([AM_DEP_TRACK], 1099386dafe34Smrg[AC_ARG_ENABLE(dependency-tracking, 1099486dafe34Smrg[ --disable-dependency-tracking speeds up one-time build 1099586dafe34Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 1099686dafe34Smrgif test "x$enable_dependency_tracking" != xno; then 1099786dafe34Smrg am_depcomp="$ac_aux_dir/depcomp" 1099886dafe34Smrg AMDEPBACKSLASH='\' 1099963847c39Smrg am__nodep='_no' 1100086dafe34Smrgfi 1100186dafe34SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 1100286dafe34SmrgAC_SUBST([AMDEPBACKSLASH])dnl 1100386dafe34Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 1100463847c39SmrgAC_SUBST([am__nodep])dnl 1100563847c39Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 1100686dafe34Smrg]) 1100776888252Smrg 1100886dafe34Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 1100976888252Smrg 1101086dafe34Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 1101186dafe34Smrg# Free Software Foundation, Inc. 1101286dafe34Smrg# 1101386dafe34Smrg# This file is free software; the Free Software Foundation 1101486dafe34Smrg# gives unlimited permission to copy and/or distribute it, 1101586dafe34Smrg# with or without modifications, as long as this notice is preserved. 1101676888252Smrg 11017d8556812Smrg#serial 5 1101876888252Smrg 1101986dafe34Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 1102086dafe34Smrg# ------------------------------ 1102186dafe34SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11022d8556812Smrg[{ 11023d8556812Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 11024d8556812Smrg # are listed without --file. Let's play safe and only enable the eval 11025d8556812Smrg # if we detect the quoting. 11026d8556812Smrg case $CONFIG_FILES in 11027d8556812Smrg *\'*) eval set x "$CONFIG_FILES" ;; 11028d8556812Smrg *) set x $CONFIG_FILES ;; 11029d8556812Smrg esac 11030d8556812Smrg shift 11031d8556812Smrg for mf 11032d8556812Smrg do 11033d8556812Smrg # Strip MF so we end up with the name of the file. 11034d8556812Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 11035d8556812Smrg # Check whether this is an Automake generated Makefile or not. 11036d8556812Smrg # We used to match only the files named `Makefile.in', but 11037d8556812Smrg # some people rename them; so instead we look at the file content. 11038d8556812Smrg # Grep'ing the first line is not enough: some people post-process 11039d8556812Smrg # each Makefile.in and add a new line on top of each file to say so. 11040d8556812Smrg # Grep'ing the whole file is not good either: AIX grep has a line 11041d8556812Smrg # limit of 2048, but all sed's we know have understand at least 4000. 11042d8556812Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11043d8556812Smrg dirpart=`AS_DIRNAME("$mf")` 11044d8556812Smrg else 11045d8556812Smrg continue 11046d8556812Smrg fi 11047d8556812Smrg # Extract the definition of DEPDIR, am__include, and am__quote 11048d8556812Smrg # from the Makefile without running `make'. 11049d8556812Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11050d8556812Smrg test -z "$DEPDIR" && continue 11051d8556812Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 11052d8556812Smrg test -z "am__include" && continue 11053d8556812Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11054d8556812Smrg # When using ansi2knr, U may be empty or an underscore; expand it 11055d8556812Smrg U=`sed -n 's/^U = //p' < "$mf"` 11056d8556812Smrg # Find all dependency output files, they are included files with 11057d8556812Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 11058d8556812Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 11059d8556812Smrg # expansion. 11060d8556812Smrg for file in `sed -n " 11061d8556812Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 11062d8556812Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 11063d8556812Smrg # Make sure the directory exists. 11064d8556812Smrg test -f "$dirpart/$file" && continue 11065d8556812Smrg fdir=`AS_DIRNAME(["$file"])` 11066d8556812Smrg AS_MKDIR_P([$dirpart/$fdir]) 11067d8556812Smrg # echo "creating $dirpart/$file" 11068d8556812Smrg echo '# dummy' > "$dirpart/$file" 11069d8556812Smrg done 1107086dafe34Smrg done 11071d8556812Smrg} 1107286dafe34Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1107376888252Smrg 110741ae1b5e8Smrg 1107586dafe34Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 1107686dafe34Smrg# ----------------------------- 1107786dafe34Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 1107886dafe34Smrg# 1107986dafe34Smrg# This code is only required when automatic dependency tracking 1108086dafe34Smrg# is enabled. FIXME. This creates each `.P' file that we will 1108186dafe34Smrg# need in order to bootstrap the dependency handling code. 1108286dafe34SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 1108386dafe34Smrg[AC_CONFIG_COMMANDS([depfiles], 1108486dafe34Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 1108586dafe34Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 1108686dafe34Smrg]) 110871ae1b5e8Smrg 1108886dafe34Smrg# Do all the work for Automake. -*- Autoconf -*- 1108976888252Smrg 1109086dafe34Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 11091d8556812Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 1109286dafe34Smrg# 1109386dafe34Smrg# This file is free software; the Free Software Foundation 1109486dafe34Smrg# gives unlimited permission to copy and/or distribute it, 1109586dafe34Smrg# with or without modifications, as long as this notice is preserved. 1109676888252Smrg 11097d8556812Smrg# serial 16 1109876888252Smrg 1109986dafe34Smrg# This macro actually does too much. Some checks are only needed if 1110086dafe34Smrg# your package does certain things. But this isn't really a big deal. 1110176888252Smrg 1110286dafe34Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 1110386dafe34Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 1110486dafe34Smrg# ----------------------------------------------- 1110586dafe34Smrg# The call with PACKAGE and VERSION arguments is the old style 1110686dafe34Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 1110786dafe34Smrg# and VERSION should now be passed to AC_INIT and removed from 1110886dafe34Smrg# the call to AM_INIT_AUTOMAKE. 1110986dafe34Smrg# We support both call styles for the transition. After 1111086dafe34Smrg# the next Automake release, Autoconf can make the AC_INIT 1111186dafe34Smrg# arguments mandatory, and then we can depend on a new Autoconf 1111286dafe34Smrg# release and drop the old call support. 1111386dafe34SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 11114d8556812Smrg[AC_PREREQ([2.62])dnl 1111586dafe34Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 1111686dafe34Smrgdnl the ones we care about. 1111786dafe34Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 1111886dafe34SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 1111986dafe34SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 1112086dafe34Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 1112186dafe34Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 1112286dafe34Smrg # is not polluted with repeated "-I." 1112386dafe34Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 1112486dafe34Smrg # test to see if srcdir already configured 1112586dafe34Smrg if test -f $srcdir/config.status; then 1112686dafe34Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 1112786dafe34Smrg fi 1112886dafe34Smrgfi 1112976888252Smrg 1113086dafe34Smrg# test whether we have cygpath 1113186dafe34Smrgif test -z "$CYGPATH_W"; then 1113286dafe34Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 1113386dafe34Smrg CYGPATH_W='cygpath -w' 1113486dafe34Smrg else 1113586dafe34Smrg CYGPATH_W=echo 1113686dafe34Smrg fi 1113786dafe34Smrgfi 1113886dafe34SmrgAC_SUBST([CYGPATH_W]) 1113976888252Smrg 1114086dafe34Smrg# Define the identity of the package. 1114186dafe34Smrgdnl Distinguish between old-style and new-style calls. 1114286dafe34Smrgm4_ifval([$2], 1114386dafe34Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 1114486dafe34Smrg AC_SUBST([PACKAGE], [$1])dnl 1114586dafe34Smrg AC_SUBST([VERSION], [$2])], 1114686dafe34Smrg[_AM_SET_OPTIONS([$1])dnl 1114786dafe34Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 1114886dafe34Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 1114986dafe34Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 1115086dafe34Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 1115186dafe34Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 1115276888252Smrg 1115386dafe34Smrg_AM_IF_OPTION([no-define],, 1115486dafe34Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 1115586dafe34Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 1115676888252Smrg 1115786dafe34Smrg# Some tools Automake needs. 1115886dafe34SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 1115986dafe34SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 1116086dafe34SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 1116186dafe34SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 1116286dafe34SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 1116386dafe34SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 1116486dafe34SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 11165d8556812SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11166d8556812SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 1116786dafe34SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 1116886dafe34Smrg# We need awk for the "check" target. The system "awk" is bad on 1116986dafe34Smrg# some platforms. 1117086dafe34SmrgAC_REQUIRE([AC_PROG_AWK])dnl 1117186dafe34SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 1117286dafe34SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 1117386dafe34Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11174d8556812Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11175d8556812Smrg [_AM_PROG_TAR([v7])])]) 1117686dafe34Smrg_AM_IF_OPTION([no-dependencies],, 1117786dafe34Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 11178d8556812Smrg [_AM_DEPENDENCIES(CC)], 11179d8556812Smrg [define([AC_PROG_CC], 11180d8556812Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 1118186dafe34SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 11182d8556812Smrg [_AM_DEPENDENCIES(CXX)], 11183d8556812Smrg [define([AC_PROG_CXX], 11184d8556812Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 1118586dafe34SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 11186d8556812Smrg [_AM_DEPENDENCIES(OBJC)], 11187d8556812Smrg [define([AC_PROG_OBJC], 11188d8556812Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 1118986dafe34Smrg]) 11190d8556812Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 11191d8556812Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 11192d8556812Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 11193d8556812Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 11194d8556812SmrgAC_CONFIG_COMMANDS_PRE(dnl 11195d8556812Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 11196d8556812Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 1119786dafe34Smrg]) 1119876888252Smrg 11199d8556812Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11200d8556812Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11201d8556812Smrgdnl mangled by Autoconf and run in a shell conditional statement. 11202d8556812Smrgm4_define([_AC_COMPILER_EXEEXT], 11203d8556812Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 11204d8556812Smrg 1120576888252Smrg 1120686dafe34Smrg# When config.status generates a header, we must update the stamp-h file. 1120786dafe34Smrg# This file resides in the same directory as the config header 1120886dafe34Smrg# that is generated. The stamp files are numbered to have different names. 1120976888252Smrg 1121086dafe34Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1121186dafe34Smrg# loop where config.status creates the headers, so we can generate 1121286dafe34Smrg# our stamp files there. 1121386dafe34SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1121486dafe34Smrg[# Compute $1's index in $config_headers. 1121586dafe34Smrg_am_arg=$1 1121686dafe34Smrg_am_stamp_count=1 1121786dafe34Smrgfor _am_header in $config_headers :; do 1121886dafe34Smrg case $_am_header in 1121986dafe34Smrg $_am_arg | $_am_arg:* ) 1122086dafe34Smrg break ;; 1122186dafe34Smrg * ) 1122286dafe34Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1122386dafe34Smrg esac 1122486dafe34Smrgdone 1122586dafe34Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 1122676888252Smrg 1122763847c39Smrg# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, 1122863847c39Smrg# Inc. 1122986dafe34Smrg# 1123086dafe34Smrg# This file is free software; the Free Software Foundation 1123186dafe34Smrg# gives unlimited permission to copy and/or distribute it, 1123286dafe34Smrg# with or without modifications, as long as this notice is preserved. 1123376888252Smrg 1123463847c39Smrg# serial 1 1123563847c39Smrg 1123686dafe34Smrg# AM_PROG_INSTALL_SH 1123786dafe34Smrg# ------------------ 1123886dafe34Smrg# Define $install_sh. 1123986dafe34SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 1124086dafe34Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11241d8556812Smrgif test x"${install_sh}" != xset; then 11242d8556812Smrg case $am_aux_dir in 11243d8556812Smrg *\ * | *\ *) 11244d8556812Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 11245d8556812Smrg *) 11246d8556812Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 11247d8556812Smrg esac 11248d8556812Smrgfi 1124986dafe34SmrgAC_SUBST(install_sh)]) 1125076888252Smrg 1125186dafe34Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 1125286dafe34Smrg# 1125386dafe34Smrg# This file is free software; the Free Software Foundation 1125486dafe34Smrg# gives unlimited permission to copy and/or distribute it, 1125586dafe34Smrg# with or without modifications, as long as this notice is preserved. 1125676888252Smrg 1125786dafe34Smrg# serial 2 1125876888252Smrg 1125986dafe34Smrg# Check whether the underlying file-system supports filenames 1126086dafe34Smrg# with a leading dot. For instance MS-DOS doesn't. 1126186dafe34SmrgAC_DEFUN([AM_SET_LEADING_DOT], 1126286dafe34Smrg[rm -rf .tst 2>/dev/null 1126386dafe34Smrgmkdir .tst 2>/dev/null 1126486dafe34Smrgif test -d .tst; then 1126586dafe34Smrg am__leading_dot=. 1126686dafe34Smrgelse 1126786dafe34Smrg am__leading_dot=_ 1126886dafe34Smrgfi 1126986dafe34Smrgrmdir .tst 2>/dev/null 1127086dafe34SmrgAC_SUBST([am__leading_dot])]) 1127176888252Smrg 1127286dafe34Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 1127386dafe34Smrg# From Jim Meyering 1127486dafe34Smrg 1127563847c39Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 1127663847c39Smrg# 2011 Free Software Foundation, Inc. 1127786dafe34Smrg# 1127886dafe34Smrg# This file is free software; the Free Software Foundation 1127986dafe34Smrg# gives unlimited permission to copy and/or distribute it, 1128086dafe34Smrg# with or without modifications, as long as this notice is preserved. 1128186dafe34Smrg 11282d8556812Smrg# serial 5 1128386dafe34Smrg 11284d8556812Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 11285d8556812Smrg# ---------------------------------- 11286d8556812Smrg# Control maintainer-specific portions of Makefiles. 11287d8556812Smrg# Default is to disable them, unless `enable' is passed literally. 11288d8556812Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 11289d8556812Smrg# can override the default with the --enable/--disable switch. 1129086dafe34SmrgAC_DEFUN([AM_MAINTAINER_MODE], 11291d8556812Smrg[m4_case(m4_default([$1], [disable]), 11292d8556812Smrg [enable], [m4_define([am_maintainer_other], [disable])], 11293d8556812Smrg [disable], [m4_define([am_maintainer_other], [enable])], 11294d8556812Smrg [m4_define([am_maintainer_other], [enable]) 11295d8556812Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 1129663847c39SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 11297d8556812Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 11298d8556812Smrg AC_ARG_ENABLE([maintainer-mode], 11299d8556812Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 1130086dafe34Smrg (and sometimes confusing) to the casual installer], 11301d8556812Smrg [USE_MAINTAINER_MODE=$enableval], 11302d8556812Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 1130386dafe34Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 11304d8556812Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 1130586dafe34Smrg MAINT=$MAINTAINER_MODE_TRUE 11306d8556812Smrg AC_SUBST([MAINT])dnl 1130786dafe34Smrg] 1130886dafe34Smrg) 1130976888252Smrg 1131086dafe34SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 1131176888252Smrg 1131286dafe34Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 1131376888252Smrg 11314d8556812Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 1131576888252Smrg# 1131686dafe34Smrg# This file is free software; the Free Software Foundation 1131786dafe34Smrg# gives unlimited permission to copy and/or distribute it, 1131886dafe34Smrg# with or without modifications, as long as this notice is preserved. 1131976888252Smrg 11320d8556812Smrg# serial 4 1132176888252Smrg 1132286dafe34Smrg# AM_MAKE_INCLUDE() 1132386dafe34Smrg# ----------------- 1132486dafe34Smrg# Check to see how make treats includes. 1132586dafe34SmrgAC_DEFUN([AM_MAKE_INCLUDE], 1132686dafe34Smrg[am_make=${MAKE-make} 1132786dafe34Smrgcat > confinc << 'END' 1132886dafe34Smrgam__doit: 11329d8556812Smrg @echo this is the am__doit target 1133086dafe34Smrg.PHONY: am__doit 1133186dafe34SmrgEND 1133286dafe34Smrg# If we don't find an include directive, just comment out the code. 1133386dafe34SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 1133486dafe34Smrgam__include="#" 1133586dafe34Smrgam__quote= 1133686dafe34Smrg_am_result=none 1133786dafe34Smrg# First try GNU make style include. 1133886dafe34Smrgecho "include confinc" > confmf 11339d8556812Smrg# Ignore all kinds of additional output from `make'. 11340d8556812Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 11341d8556812Smrg*the\ am__doit\ target*) 11342d8556812Smrg am__include=include 11343d8556812Smrg am__quote= 11344d8556812Smrg _am_result=GNU 11345d8556812Smrg ;; 11346d8556812Smrgesac 1134786dafe34Smrg# Now try BSD make style include. 1134886dafe34Smrgif test "$am__include" = "#"; then 1134986dafe34Smrg echo '.include "confinc"' > confmf 11350d8556812Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 11351d8556812Smrg *the\ am__doit\ target*) 11352d8556812Smrg am__include=.include 11353d8556812Smrg am__quote="\"" 11354d8556812Smrg _am_result=BSD 11355d8556812Smrg ;; 11356d8556812Smrg esac 1135786dafe34Smrgfi 1135886dafe34SmrgAC_SUBST([am__include]) 1135986dafe34SmrgAC_SUBST([am__quote]) 1136086dafe34SmrgAC_MSG_RESULT([$_am_result]) 1136186dafe34Smrgrm -f confinc confmf 1136286dafe34Smrg]) 1136376888252Smrg 1136486dafe34Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 1136576888252Smrg 11366d8556812Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 1136786dafe34Smrg# Free Software Foundation, Inc. 113681ae1b5e8Smrg# 1136986dafe34Smrg# This file is free software; the Free Software Foundation 1137086dafe34Smrg# gives unlimited permission to copy and/or distribute it, 1137186dafe34Smrg# with or without modifications, as long as this notice is preserved. 1137276888252Smrg 11373d8556812Smrg# serial 6 1137476888252Smrg 1137586dafe34Smrg# AM_MISSING_PROG(NAME, PROGRAM) 1137686dafe34Smrg# ------------------------------ 1137786dafe34SmrgAC_DEFUN([AM_MISSING_PROG], 1137886dafe34Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 1137986dafe34Smrg$1=${$1-"${am_missing_run}$2"} 1138086dafe34SmrgAC_SUBST($1)]) 1138176888252Smrg 1138276888252Smrg 1138386dafe34Smrg# AM_MISSING_HAS_RUN 1138486dafe34Smrg# ------------------ 1138586dafe34Smrg# Define MISSING if not defined so far and test if it supports --run. 1138686dafe34Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 1138786dafe34SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 1138886dafe34Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1138986dafe34SmrgAC_REQUIRE_AUX_FILE([missing])dnl 11390d8556812Smrgif test x"${MISSING+set}" != xset; then 11391d8556812Smrg case $am_aux_dir in 11392d8556812Smrg *\ * | *\ *) 11393d8556812Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 11394d8556812Smrg *) 11395d8556812Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 11396d8556812Smrg esac 11397d8556812Smrgfi 1139886dafe34Smrg# Use eval to expand $SHELL 1139986dafe34Smrgif eval "$MISSING --run true"; then 1140086dafe34Smrg am_missing_run="$MISSING --run " 1140186dafe34Smrgelse 1140286dafe34Smrg am_missing_run= 1140386dafe34Smrg AC_MSG_WARN([`missing' script is too old or missing]) 1140486dafe34Smrgfi 114051ae1b5e8Smrg]) 1140676888252Smrg 1140763847c39Smrg# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, 1140863847c39Smrg# Inc. 1140986dafe34Smrg# 1141086dafe34Smrg# This file is free software; the Free Software Foundation 1141186dafe34Smrg# gives unlimited permission to copy and/or distribute it, 1141286dafe34Smrg# with or without modifications, as long as this notice is preserved. 1141376888252Smrg 1141463847c39Smrg# serial 1 1141563847c39Smrg 1141686dafe34Smrg# AM_PROG_MKDIR_P 1141786dafe34Smrg# --------------- 1141886dafe34Smrg# Check for `mkdir -p'. 1141986dafe34SmrgAC_DEFUN([AM_PROG_MKDIR_P], 1142086dafe34Smrg[AC_PREREQ([2.60])dnl 1142186dafe34SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 1142286dafe34Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 1142386dafe34Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 1142486dafe34Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 1142586dafe34Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 1142686dafe34Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 1142786dafe34Smrgdnl adjustment using top_builddir (which is defined more often than 1142886dafe34Smrgdnl MKDIR_P). 1142986dafe34SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 1143086dafe34Smrgcase $mkdir_p in 1143186dafe34Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 1143286dafe34Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 1143386dafe34Smrgesac 114341ae1b5e8Smrg]) 1143576888252Smrg 1143686dafe34Smrg# Helper functions for option handling. -*- Autoconf -*- 1143776888252Smrg 1143863847c39Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software 1143963847c39Smrg# Foundation, Inc. 114401ae1b5e8Smrg# 1144186dafe34Smrg# This file is free software; the Free Software Foundation 1144286dafe34Smrg# gives unlimited permission to copy and/or distribute it, 1144386dafe34Smrg# with or without modifications, as long as this notice is preserved. 1144486dafe34Smrg 1144563847c39Smrg# serial 5 1144686dafe34Smrg 1144786dafe34Smrg# _AM_MANGLE_OPTION(NAME) 1144886dafe34Smrg# ----------------------- 1144986dafe34SmrgAC_DEFUN([_AM_MANGLE_OPTION], 1145086dafe34Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1145186dafe34Smrg 1145286dafe34Smrg# _AM_SET_OPTION(NAME) 1145363847c39Smrg# -------------------- 1145486dafe34Smrg# Set option NAME. Presently that only means defining a flag for this option. 1145586dafe34SmrgAC_DEFUN([_AM_SET_OPTION], 1145686dafe34Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 1145786dafe34Smrg 1145886dafe34Smrg# _AM_SET_OPTIONS(OPTIONS) 1145963847c39Smrg# ------------------------ 1146086dafe34Smrg# OPTIONS is a space-separated list of Automake options. 1146186dafe34SmrgAC_DEFUN([_AM_SET_OPTIONS], 1146286dafe34Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1146386dafe34Smrg 1146486dafe34Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1146586dafe34Smrg# ------------------------------------------- 1146686dafe34Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1146786dafe34SmrgAC_DEFUN([_AM_IF_OPTION], 1146886dafe34Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1146986dafe34Smrg 1147086dafe34Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 1147186dafe34Smrg 11472d8556812Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 1147386dafe34Smrg# Free Software Foundation, Inc. 114741ae1b5e8Smrg# 1147586dafe34Smrg# This file is free software; the Free Software Foundation 1147686dafe34Smrg# gives unlimited permission to copy and/or distribute it, 1147786dafe34Smrg# with or without modifications, as long as this notice is preserved. 1147876888252Smrg 11479d8556812Smrg# serial 5 1148076888252Smrg 1148186dafe34Smrg# AM_SANITY_CHECK 1148286dafe34Smrg# --------------- 1148386dafe34SmrgAC_DEFUN([AM_SANITY_CHECK], 1148486dafe34Smrg[AC_MSG_CHECKING([whether build environment is sane]) 1148586dafe34Smrg# Just in case 1148686dafe34Smrgsleep 1 1148786dafe34Smrgecho timestamp > conftest.file 11488d8556812Smrg# Reject unsafe characters in $srcdir or the absolute working directory 11489d8556812Smrg# name. Accept space and tab only in the latter. 11490d8556812Smrgam_lf=' 11491d8556812Smrg' 11492d8556812Smrgcase `pwd` in 11493d8556812Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 11494d8556812Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 11495d8556812Smrgesac 11496d8556812Smrgcase $srcdir in 11497d8556812Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 11498d8556812Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 11499d8556812Smrgesac 11500d8556812Smrg 1150186dafe34Smrg# Do `set' in a subshell so we don't clobber the current shell's 1150286dafe34Smrg# arguments. Must try -L first in case configure is actually a 1150386dafe34Smrg# symlink; some systems play weird games with the mod time of symlinks 1150486dafe34Smrg# (eg FreeBSD returns the mod time of the symlink's containing 1150586dafe34Smrg# directory). 1150686dafe34Smrgif ( 11507d8556812Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1150886dafe34Smrg if test "$[*]" = "X"; then 1150986dafe34Smrg # -L didn't work. 11510d8556812Smrg set X `ls -t "$srcdir/configure" conftest.file` 1151186dafe34Smrg fi 1151286dafe34Smrg rm -f conftest.file 1151386dafe34Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 1151486dafe34Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 1151586dafe34Smrg 1151686dafe34Smrg # If neither matched, then we have a broken ls. This can happen 1151786dafe34Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 1151886dafe34Smrg # broken ls alias from the environment. This has actually 1151986dafe34Smrg # happened. Such a system could not be considered "sane". 1152086dafe34Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1152186dafe34Smrgalias in your environment]) 1152286dafe34Smrg fi 1152386dafe34Smrg 1152486dafe34Smrg test "$[2]" = conftest.file 1152586dafe34Smrg ) 1152686dafe34Smrgthen 1152786dafe34Smrg # Ok. 1152886dafe34Smrg : 1152976888252Smrgelse 1153086dafe34Smrg AC_MSG_ERROR([newly created file is older than distributed files! 1153186dafe34SmrgCheck your system clock]) 1153286dafe34Smrgfi 1153386dafe34SmrgAC_MSG_RESULT(yes)]) 1153476888252Smrg 1153563847c39Smrg# Copyright (C) 2009, 2011 Free Software Foundation, Inc. 1153663847c39Smrg# 1153763847c39Smrg# This file is free software; the Free Software Foundation 1153863847c39Smrg# gives unlimited permission to copy and/or distribute it, 1153963847c39Smrg# with or without modifications, as long as this notice is preserved. 1154063847c39Smrg 1154163847c39Smrg# serial 2 1154263847c39Smrg 1154363847c39Smrg# AM_SILENT_RULES([DEFAULT]) 1154463847c39Smrg# -------------------------- 1154563847c39Smrg# Enable less verbose build rules; with the default set to DEFAULT 1154663847c39Smrg# (`yes' being less verbose, `no' or empty being verbose). 1154763847c39SmrgAC_DEFUN([AM_SILENT_RULES], 1154863847c39Smrg[AC_ARG_ENABLE([silent-rules], 1154963847c39Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 1155063847c39Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 1155163847c39Smrgcase $enable_silent_rules in 1155263847c39Smrgyes) AM_DEFAULT_VERBOSITY=0;; 1155363847c39Smrgno) AM_DEFAULT_VERBOSITY=1;; 1155463847c39Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 1155563847c39Smrgesac 1155663847c39Smrgdnl 1155763847c39Smrgdnl A few `make' implementations (e.g., NonStop OS and NextStep) 1155863847c39Smrgdnl do not support nested variable expansions. 1155963847c39Smrgdnl See automake bug#9928 and bug#10237. 1156063847c39Smrgam_make=${MAKE-make} 1156163847c39SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 1156263847c39Smrg [am_cv_make_support_nested_variables], 1156363847c39Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 1156463847c39SmrgBAR0=false 1156563847c39SmrgBAR1=true 1156663847c39SmrgV=1 1156763847c39Smrgam__doit: 1156863847c39Smrg @$(TRUE) 1156963847c39Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 1157063847c39Smrg am_cv_make_support_nested_variables=yes 1157163847c39Smrgelse 1157263847c39Smrg am_cv_make_support_nested_variables=no 1157363847c39Smrgfi]) 1157463847c39Smrgif test $am_cv_make_support_nested_variables = yes; then 1157563847c39Smrg dnl Using `$V' instead of `$(V)' breaks IRIX make. 1157663847c39Smrg AM_V='$(V)' 1157763847c39Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 1157863847c39Smrgelse 1157963847c39Smrg AM_V=$AM_DEFAULT_VERBOSITY 1158063847c39Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 1158163847c39Smrgfi 1158263847c39SmrgAC_SUBST([AM_V])dnl 1158363847c39SmrgAM_SUBST_NOTMAKE([AM_V])dnl 1158463847c39SmrgAC_SUBST([AM_DEFAULT_V])dnl 1158563847c39SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 1158663847c39SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 1158763847c39SmrgAM_BACKSLASH='\' 1158863847c39SmrgAC_SUBST([AM_BACKSLASH])dnl 1158963847c39Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 1159063847c39Smrg]) 1159163847c39Smrg 1159263847c39Smrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 115931ae1b5e8Smrg# 1159486dafe34Smrg# This file is free software; the Free Software Foundation 1159586dafe34Smrg# gives unlimited permission to copy and/or distribute it, 1159686dafe34Smrg# with or without modifications, as long as this notice is preserved. 1159786dafe34Smrg 1159863847c39Smrg# serial 1 1159963847c39Smrg 1160086dafe34Smrg# AM_PROG_INSTALL_STRIP 1160186dafe34Smrg# --------------------- 1160286dafe34Smrg# One issue with vendor `install' (even GNU) is that you can't 1160386dafe34Smrg# specify the program used to strip binaries. This is especially 1160486dafe34Smrg# annoying in cross-compiling environments, where the build's strip 1160586dafe34Smrg# is unlikely to handle the host's binaries. 1160686dafe34Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 1160786dafe34Smrg# always use install-sh in `make install-strip', and initialize 1160886dafe34Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 1160986dafe34SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 1161086dafe34Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1161186dafe34Smrg# Installed binaries are usually stripped using `strip' when the user 1161286dafe34Smrg# run `make install-strip'. However `strip' might not be the right 1161386dafe34Smrg# tool to use in cross-compilation environments, therefore Automake 1161486dafe34Smrg# will honor the `STRIP' environment variable to overrule this program. 1161586dafe34Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 1161686dafe34Smrgif test "$cross_compiling" != no; then 1161786dafe34Smrg AC_CHECK_TOOL([STRIP], [strip], :) 1161886dafe34Smrgfi 1161986dafe34SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1162086dafe34SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1162186dafe34Smrg 1162263847c39Smrg# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. 116231ae1b5e8Smrg# 1162486dafe34Smrg# This file is free software; the Free Software Foundation 1162586dafe34Smrg# gives unlimited permission to copy and/or distribute it, 1162686dafe34Smrg# with or without modifications, as long as this notice is preserved. 1162776888252Smrg 1162863847c39Smrg# serial 3 11629d8556812Smrg 1163086dafe34Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 1163186dafe34Smrg# --------------------------- 1163286dafe34Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1163386dafe34Smrg# This macro is traced by Automake. 1163486dafe34SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1163576888252Smrg 11636d8556812Smrg# AM_SUBST_NOTMAKE(VARIABLE) 1163763847c39Smrg# -------------------------- 11638d8556812Smrg# Public sister of _AM_SUBST_NOTMAKE. 11639d8556812SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 11640d8556812Smrg 1164186dafe34Smrg# Check how to create a tarball. -*- Autoconf -*- 1164276888252Smrg 1164363847c39Smrg# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. 1164486dafe34Smrg# 1164586dafe34Smrg# This file is free software; the Free Software Foundation 1164686dafe34Smrg# gives unlimited permission to copy and/or distribute it, 1164786dafe34Smrg# with or without modifications, as long as this notice is preserved. 1164876888252Smrg 1164986dafe34Smrg# serial 2 1165076888252Smrg 1165186dafe34Smrg# _AM_PROG_TAR(FORMAT) 1165286dafe34Smrg# -------------------- 1165386dafe34Smrg# Check how to create a tarball in format FORMAT. 1165486dafe34Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 1165586dafe34Smrg# 1165686dafe34Smrg# Substitute a variable $(am__tar) that is a command 1165786dafe34Smrg# writing to stdout a FORMAT-tarball containing the directory 1165886dafe34Smrg# $tardir. 1165986dafe34Smrg# tardir=directory && $(am__tar) > result.tar 1166086dafe34Smrg# 1166186dafe34Smrg# Substitute a variable $(am__untar) that extract such 1166286dafe34Smrg# a tarball read from stdin. 1166386dafe34Smrg# $(am__untar) < result.tar 1166486dafe34SmrgAC_DEFUN([_AM_PROG_TAR], 1166563847c39Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1166663847c39Smrg# in the wild :-( We should find a proper way to deprecate it ... 1166763847c39SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1166886dafe34Smrgm4_if([$1], [v7], 1166963847c39Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1167086dafe34Smrg [m4_case([$1], [ustar],, [pax],, 1167186dafe34Smrg [m4_fatal([Unknown tar format])]) 1167286dafe34SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 1167386dafe34Smrg# Loop over all known methods to create a tar archive until one works. 1167486dafe34Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1167586dafe34Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 1167686dafe34Smrg# Do not fold the above two line into one, because Tru64 sh and 1167786dafe34Smrg# Solaris sh will not grok spaces in the rhs of `-'. 1167886dafe34Smrgfor _am_tool in $_am_tools 1167986dafe34Smrgdo 1168086dafe34Smrg case $_am_tool in 1168186dafe34Smrg gnutar) 1168286dafe34Smrg for _am_tar in tar gnutar gtar; 1168386dafe34Smrg do 1168486dafe34Smrg AM_RUN_LOG([$_am_tar --version]) && break 1168586dafe34Smrg done 1168686dafe34Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1168786dafe34Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1168886dafe34Smrg am__untar="$_am_tar -xf -" 1168986dafe34Smrg ;; 1169086dafe34Smrg plaintar) 1169186dafe34Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 1169286dafe34Smrg # ustar tarball either. 1169386dafe34Smrg (tar --version) >/dev/null 2>&1 && continue 1169486dafe34Smrg am__tar='tar chf - "$$tardir"' 1169586dafe34Smrg am__tar_='tar chf - "$tardir"' 1169686dafe34Smrg am__untar='tar xf -' 1169786dafe34Smrg ;; 1169886dafe34Smrg pax) 1169986dafe34Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1170086dafe34Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1170186dafe34Smrg am__untar='pax -r' 1170286dafe34Smrg ;; 1170386dafe34Smrg cpio) 1170486dafe34Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1170586dafe34Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1170686dafe34Smrg am__untar='cpio -i -H $1 -d' 1170786dafe34Smrg ;; 1170886dafe34Smrg none) 1170986dafe34Smrg am__tar=false 1171086dafe34Smrg am__tar_=false 1171186dafe34Smrg am__untar=false 1171286dafe34Smrg ;; 1171386dafe34Smrg esac 1171476888252Smrg 1171586dafe34Smrg # If the value was cached, stop now. We just wanted to have am__tar 1171686dafe34Smrg # and am__untar set. 1171786dafe34Smrg test -n "${am_cv_prog_tar_$1}" && break 1171876888252Smrg 1171986dafe34Smrg # tar/untar a dummy directory, and stop if the command works 1172086dafe34Smrg rm -rf conftest.dir 1172186dafe34Smrg mkdir conftest.dir 1172286dafe34Smrg echo GrepMe > conftest.dir/file 1172386dafe34Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1172486dafe34Smrg rm -rf conftest.dir 1172586dafe34Smrg if test -s conftest.tar; then 1172686dafe34Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1172786dafe34Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1172886dafe34Smrg fi 1172986dafe34Smrgdone 1173086dafe34Smrgrm -rf conftest.dir 1173186dafe34Smrg 1173286dafe34SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1173386dafe34SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1173486dafe34SmrgAC_SUBST([am__tar]) 1173586dafe34SmrgAC_SUBST([am__untar]) 1173686dafe34Smrg]) # _AM_PROG_TAR 1173776888252Smrg 11738