aclocal.m4 revision 5a81ca49
15a81ca49Smrg# generated automatically by aclocal 1.15 -*- Autoconf -*- 25a81ca49Smrg 35a81ca49Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 432b578d3Smrg 532b578d3Smrg# This file is free software; the Free Software Foundation 632b578d3Smrg# gives unlimited permission to copy and/or distribute it, 732b578d3Smrg# with or without modifications, as long as this notice is preserved. 832b578d3Smrg 932b578d3Smrg# This program is distributed in the hope that it will be useful, 1032b578d3Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1132b578d3Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1232b578d3Smrg# PARTICULAR PURPOSE. 1332b578d3Smrg 145a81ca49Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 152a51b5beSmrgm4_ifndef([AC_AUTOCONF_VERSION], 162a51b5beSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 175a81ca49Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 185a81ca49Smrg[m4_warning([this file was generated for autoconf 2.69. 192a51b5beSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 202a51b5beSmrgIf you have problems, you may need to regenerate the build system entirely. 215a81ca49SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 2232b578d3Smrg 235a81ca49Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 241b12faf6Smrg# 255a81ca49Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 265a81ca49Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 275a81ca49Smrg# Foundation, Inc. 285a81ca49Smrg# Written by Gordon Matzigkeit, 1996 29e35d4d8eSmrg# 305a81ca49Smrg# This file is free software; the Free Software Foundation gives 315a81ca49Smrg# unlimited permission to copy and/or distribute it, with or without 325a81ca49Smrg# modifications, as long as this notice is preserved. 331b12faf6Smrg 345a81ca49Smrgm4_define([_LT_COPYING], [dnl 355a81ca49Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 365a81ca49Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 375a81ca49Smrg# Foundation, Inc. 385a81ca49Smrg# Written by Gordon Matzigkeit, 1996 39e35d4d8eSmrg# 405a81ca49Smrg# This file is part of GNU Libtool. 41e35d4d8eSmrg# 425a81ca49Smrg# GNU Libtool is free software; you can redistribute it and/or 435a81ca49Smrg# modify it under the terms of the GNU General Public License as 445a81ca49Smrg# published by the Free Software Foundation; either version 2 of 455a81ca49Smrg# the License, or (at your option) any later version. 46e35d4d8eSmrg# 475a81ca49Smrg# As a special exception to the GNU General Public License, 485a81ca49Smrg# if you distribute this file as part of a program or library that 495a81ca49Smrg# is built using GNU Libtool, you may include this file under the 505a81ca49Smrg# same distribution terms that you use for the rest of that program. 51e35d4d8eSmrg# 525a81ca49Smrg# GNU Libtool is distributed in the hope that it will be useful, 535a81ca49Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 545a81ca49Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 555a81ca49Smrg# GNU General Public License for more details. 56e35d4d8eSmrg# 575a81ca49Smrg# You should have received a copy of the GNU General Public License 585a81ca49Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 595a81ca49Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 605a81ca49Smrg# obtained by writing to the Free Software Foundation, Inc., 615a81ca49Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 62e35d4d8eSmrg]) 6332b578d3Smrg 645a81ca49Smrg# serial 57 LT_INIT 6532b578d3Smrg 6632b578d3Smrg 675a81ca49Smrg# LT_PREREQ(VERSION) 685a81ca49Smrg# ------------------ 695a81ca49Smrg# Complain and exit if this libtool version is less that VERSION. 705a81ca49Smrgm4_defun([LT_PREREQ], 715a81ca49Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 725a81ca49Smrg [m4_default([$3], 735a81ca49Smrg [m4_fatal([Libtool version $1 or higher is required], 745a81ca49Smrg 63)])], 755a81ca49Smrg [$2])]) 7632b578d3Smrg 7732b578d3Smrg 785a81ca49Smrg# _LT_CHECK_BUILDDIR 795a81ca49Smrg# ------------------ 805a81ca49Smrg# Complain if the absolute build directory name contains unusual characters 815a81ca49Smrgm4_defun([_LT_CHECK_BUILDDIR], 825a81ca49Smrg[case `pwd` in 835a81ca49Smrg *\ * | *\ *) 845a81ca49Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 855a81ca49Smrgesac 865a81ca49Smrg]) 871b12faf6Smrg 881b12faf6Smrg 895a81ca49Smrg# LT_INIT([OPTIONS]) 905a81ca49Smrg# ------------------ 915a81ca49SmrgAC_DEFUN([LT_INIT], 925a81ca49Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 935a81ca49SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 945a81ca49SmrgAC_BEFORE([$0], [LT_LANG])dnl 955a81ca49SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 965a81ca49SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 975a81ca49Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 981b12faf6Smrg 995a81ca49Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 1005a81ca49Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 1015a81ca49Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 1025a81ca49Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 1035a81ca49Smrgdnl unless we require an AC_DEFUNed macro: 1045a81ca49SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 1055a81ca49SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 1065a81ca49SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 1075a81ca49SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1085a81ca49Smrgm4_require([_LT_PROG_LTMAIN])dnl 1091b12faf6Smrg 1105a81ca49Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1111b12faf6Smrg 1125a81ca49Smrgdnl Parse OPTIONS 1135a81ca49Smrg_LT_SET_OPTIONS([$0], [$1]) 1141b12faf6Smrg 1155a81ca49Smrg# This can be used to rebuild libtool when needed 1165a81ca49SmrgLIBTOOL_DEPS="$ltmain" 11732b578d3Smrg 1185a81ca49Smrg# Always use our own libtool. 1195a81ca49SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1205a81ca49SmrgAC_SUBST(LIBTOOL)dnl 12132b578d3Smrg 1225a81ca49Smrg_LT_SETUP 12332b578d3Smrg 1245a81ca49Smrg# Only expand once: 1255a81ca49Smrgm4_define([LT_INIT]) 1265a81ca49Smrg])# LT_INIT 12732b578d3Smrg 1285a81ca49Smrg# Old names: 1295a81ca49SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1305a81ca49SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1315a81ca49Smrgdnl aclocal-1.4 backwards compatibility: 1325a81ca49Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1335a81ca49Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 13432b578d3Smrg 13532b578d3Smrg 1365a81ca49Smrg# _LT_CC_BASENAME(CC) 1375a81ca49Smrg# ------------------- 1385a81ca49Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1395a81ca49Smrgm4_defun([_LT_CC_BASENAME], 1405a81ca49Smrg[for cc_temp in $1""; do 1415a81ca49Smrg case $cc_temp in 1425a81ca49Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1435a81ca49Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1445a81ca49Smrg \-*) ;; 1455a81ca49Smrg *) break;; 1465a81ca49Smrg esac 1475a81ca49Smrgdone 1485a81ca49Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 149e35d4d8eSmrg]) 15032b578d3Smrg 15132b578d3Smrg 1525a81ca49Smrg# _LT_FILEUTILS_DEFAULTS 1535a81ca49Smrg# ---------------------- 1545a81ca49Smrg# It is okay to use these file commands and assume they have been set 1555a81ca49Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1565a81ca49Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1575a81ca49Smrg[: ${CP="cp -f"} 1585a81ca49Smrg: ${MV="mv -f"} 1595a81ca49Smrg: ${RM="rm -f"} 1605a81ca49Smrg])# _LT_FILEUTILS_DEFAULTS 1615a81ca49Smrg 1625a81ca49Smrg 1635a81ca49Smrg# _LT_SETUP 1645a81ca49Smrg# --------- 1655a81ca49Smrgm4_defun([_LT_SETUP], 1665a81ca49Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1675a81ca49SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1685a81ca49SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1695a81ca49SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1705a81ca49Smrg 1715a81ca49Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1725a81ca49Smrgdnl 1735a81ca49Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1745a81ca49Smrg_LT_DECL([], [host], [0])dnl 1755a81ca49Smrg_LT_DECL([], [host_os], [0])dnl 1765a81ca49Smrgdnl 1775a81ca49Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1785a81ca49Smrg_LT_DECL([], [build], [0])dnl 1795a81ca49Smrg_LT_DECL([], [build_os], [0])dnl 1805a81ca49Smrgdnl 1815a81ca49SmrgAC_REQUIRE([AC_PROG_CC])dnl 1825a81ca49SmrgAC_REQUIRE([LT_PATH_LD])dnl 1835a81ca49SmrgAC_REQUIRE([LT_PATH_NM])dnl 1845a81ca49Smrgdnl 1855a81ca49SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1865a81ca49Smrgtest -z "$LN_S" && LN_S="ln -s" 1875a81ca49Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1885a81ca49Smrgdnl 1895a81ca49SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1905a81ca49Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1915a81ca49Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1925a81ca49Smrgdnl 1935a81ca49Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1945a81ca49Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 1955a81ca49Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1965a81ca49Smrgm4_require([_LT_CMD_RELOAD])dnl 1975a81ca49Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 1985a81ca49Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1995a81ca49Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2005a81ca49Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 2015a81ca49Smrgm4_require([_LT_WITH_SYSROOT])dnl 2025a81ca49Smrg 2035a81ca49Smrg_LT_CONFIG_LIBTOOL_INIT([ 2045a81ca49Smrg# See if we are running on zsh, and set the options which allow our 2055a81ca49Smrg# commands through without removal of \ escapes INIT. 2065a81ca49Smrgif test -n "\${ZSH_VERSION+set}" ; then 2075a81ca49Smrg setopt NO_GLOB_SUBST 208e35d4d8eSmrgfi 209e35d4d8eSmrg]) 2105a81ca49Smrgif test -n "${ZSH_VERSION+set}" ; then 2115a81ca49Smrg setopt NO_GLOB_SUBST 2125a81ca49Smrgfi 21332b578d3Smrg 2145a81ca49Smrg_LT_CHECK_OBJDIR 2151b12faf6Smrg 2165a81ca49Smrgm4_require([_LT_TAG_COMPILER])dnl 2171b12faf6Smrg 2185a81ca49Smrgcase $host_os in 2195a81ca49Smrgaix3*) 2205a81ca49Smrg # AIX sometimes has problems with the GCC collect2 program. For some 2215a81ca49Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2225a81ca49Smrg # vanish in a puff of smoke. 2235a81ca49Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 2245a81ca49Smrg COLLECT_NAMES= 2255a81ca49Smrg export COLLECT_NAMES 2265a81ca49Smrg fi 2275a81ca49Smrg ;; 2285a81ca49Smrgesac 2291b12faf6Smrg 2305a81ca49Smrg# Global variables: 2315a81ca49Smrgofile=libtool 2325a81ca49Smrgcan_build_shared=yes 2331b12faf6Smrg 2345a81ca49Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 2355a81ca49Smrg# which needs '.lib'). 2365a81ca49Smrglibext=a 2371b12faf6Smrg 2385a81ca49Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 2391b12faf6Smrg 2405a81ca49Smrgold_CC="$CC" 2415a81ca49Smrgold_CFLAGS="$CFLAGS" 2421b12faf6Smrg 2435a81ca49Smrg# Set sane defaults for various variables 2445a81ca49Smrgtest -z "$CC" && CC=cc 2455a81ca49Smrgtest -z "$LTCC" && LTCC=$CC 2465a81ca49Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2475a81ca49Smrgtest -z "$LD" && LD=ld 2485a81ca49Smrgtest -z "$ac_objext" && ac_objext=o 2491b12faf6Smrg 2505a81ca49Smrg_LT_CC_BASENAME([$compiler]) 2511b12faf6Smrg 2525a81ca49Smrg# Only perform the check for file, if the check method requires it 2535a81ca49Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2545a81ca49Smrgcase $deplibs_check_method in 2555a81ca49Smrgfile_magic*) 2565a81ca49Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2575a81ca49Smrg _LT_PATH_MAGIC 2585a81ca49Smrg fi 2595a81ca49Smrg ;; 2605a81ca49Smrgesac 2611b12faf6Smrg 2625a81ca49Smrg# Use C for the default configuration in the libtool script 2635a81ca49SmrgLT_SUPPORTED_TAG([CC]) 2645a81ca49Smrg_LT_LANG_C_CONFIG 2655a81ca49Smrg_LT_LANG_DEFAULT_CONFIG 2665a81ca49Smrg_LT_CONFIG_COMMANDS 2675a81ca49Smrg])# _LT_SETUP 2681b12faf6Smrg 2691b12faf6Smrg 2705a81ca49Smrg# _LT_PREPARE_SED_QUOTE_VARS 2715a81ca49Smrg# -------------------------- 2725a81ca49Smrg# Define a few sed substitution that help us do robust quoting. 2735a81ca49Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2745a81ca49Smrg[# Backslashify metacharacters that are still active within 2755a81ca49Smrg# double-quoted strings. 2765a81ca49Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2771b12faf6Smrg 2785a81ca49Smrg# Same as above, but do not quote variable references. 2795a81ca49Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2801b12faf6Smrg 2815a81ca49Smrg# Sed substitution to delay expansion of an escaped shell variable in a 2825a81ca49Smrg# double_quote_subst'ed string. 2835a81ca49Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2845a81ca49Smrg 2855a81ca49Smrg# Sed substitution to delay expansion of an escaped single quote. 2865a81ca49Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2875a81ca49Smrg 2885a81ca49Smrg# Sed substitution to avoid accidental globbing in evaled expressions 2895a81ca49Smrgno_glob_subst='s/\*/\\\*/g' 2901b12faf6Smrg]) 2911b12faf6Smrg 2925a81ca49Smrg# _LT_PROG_LTMAIN 2935a81ca49Smrg# --------------- 2945a81ca49Smrg# Note that this code is called both from `configure', and `config.status' 2955a81ca49Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2965a81ca49Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 2975a81ca49Smrg# so we pass a copy along to make sure it has a sensible value anyway. 2985a81ca49Smrgm4_defun([_LT_PROG_LTMAIN], 2995a81ca49Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3005a81ca49Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3015a81ca49Smrgltmain="$ac_aux_dir/ltmain.sh" 3025a81ca49Smrg])# _LT_PROG_LTMAIN 3031b12faf6Smrg 3041b12faf6Smrg 3051b12faf6Smrg 3065a81ca49Smrg# So that we can recreate a full libtool script including additional 3075a81ca49Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3085a81ca49Smrg# in macros and then make a single call at the end using the `libtool' 3095a81ca49Smrg# label. 3101b12faf6Smrg 3111b12faf6Smrg 3125a81ca49Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3135a81ca49Smrg# ---------------------------------------- 3145a81ca49Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3155a81ca49Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3165a81ca49Smrg[m4_ifval([$1], 3175a81ca49Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3185a81ca49Smrg [$1 3195a81ca49Smrg])])]) 3201b12faf6Smrg 3215a81ca49Smrg# Initialize. 3225a81ca49Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3231b12faf6Smrg 3241b12faf6Smrg 3255a81ca49Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3265a81ca49Smrg# ------------------------------ 3275a81ca49Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3285a81ca49Smrgm4_define([_LT_CONFIG_LIBTOOL], 3295a81ca49Smrg[m4_ifval([$1], 3305a81ca49Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3315a81ca49Smrg [$1 3325a81ca49Smrg])])]) 3331b12faf6Smrg 3345a81ca49Smrg# Initialize. 3355a81ca49Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3361b12faf6Smrg 3371b12faf6Smrg 3385a81ca49Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3395a81ca49Smrg# ----------------------------------------------------- 3405a81ca49Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3415a81ca49Smrg[_LT_CONFIG_LIBTOOL([$1]) 3425a81ca49Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3435a81ca49Smrg]) 3441b12faf6Smrg 3451b12faf6Smrg 3465a81ca49Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3475a81ca49Smrg# ----------------------------- 3485a81ca49Smrg# Add leading comment marks to the start of each line, and a trailing 3495a81ca49Smrg# full-stop to the whole comment if one is not present already. 3505a81ca49Smrgm4_define([_LT_FORMAT_COMMENT], 3515a81ca49Smrg[m4_ifval([$1], [ 3525a81ca49Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3535a81ca49Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3545a81ca49Smrg)]) 3551b12faf6Smrg 3561b12faf6Smrg 35732b578d3Smrg 35832b578d3Smrg 3591b12faf6Smrg 3605a81ca49Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3615a81ca49Smrg# ------------------------------------------------------------------- 3625a81ca49Smrg# CONFIGNAME is the name given to the value in the libtool script. 3635a81ca49Smrg# VARNAME is the (base) name used in the configure script. 3645a81ca49Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3655a81ca49Smrg# VARNAME. Any other value will be used directly. 3665a81ca49Smrgm4_define([_LT_DECL], 3675a81ca49Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3685a81ca49Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3695a81ca49Smrg [m4_ifval([$1], [$1], [$2])]) 3705a81ca49Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3715a81ca49Smrg m4_ifval([$4], 3725a81ca49Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3735a81ca49Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3745a81ca49Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 375e35d4d8eSmrg]) 3761b12faf6Smrg 3771b12faf6Smrg 3785a81ca49Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3795a81ca49Smrg# -------------------------------------------------------- 3805a81ca49Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3811b12faf6Smrg 3821b12faf6Smrg 3835a81ca49Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3845a81ca49Smrg# ------------------------------------------------ 3855a81ca49Smrgm4_define([lt_decl_tag_varnames], 3865a81ca49Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 3871b12faf6Smrg 3881b12faf6Smrg 3895a81ca49Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3905a81ca49Smrg# --------------------------------------------------------- 3915a81ca49Smrgm4_define([_lt_decl_filter], 3925a81ca49Smrg[m4_case([$#], 3935a81ca49Smrg [0], [m4_fatal([$0: too few arguments: $#])], 3945a81ca49Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3955a81ca49Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3965a81ca49Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3975a81ca49Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 398e35d4d8eSmrg]) 3991b12faf6Smrg 4001b12faf6Smrg 4015a81ca49Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 4025a81ca49Smrg# -------------------------------------------------- 4035a81ca49Smrgm4_define([lt_decl_quote_varnames], 4045a81ca49Smrg[_lt_decl_filter([value], [1], $@)]) 4051b12faf6Smrg 4061b12faf6Smrg 4075a81ca49Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4085a81ca49Smrg# --------------------------------------------------- 4095a81ca49Smrgm4_define([lt_decl_dquote_varnames], 4105a81ca49Smrg[_lt_decl_filter([value], [2], $@)]) 4111b12faf6Smrg 4121b12faf6Smrg 4135a81ca49Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4145a81ca49Smrg# --------------------------------------------------- 4155a81ca49Smrgm4_define([lt_decl_varnames_tagged], 4165a81ca49Smrg[m4_assert([$# <= 2])dnl 4175a81ca49Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 4185a81ca49Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4195a81ca49Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4205a81ca49Smrgm4_define([_lt_decl_varnames_tagged], 4215a81ca49Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4221b12faf6Smrg 4231b12faf6Smrg 4245a81ca49Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4255a81ca49Smrg# ------------------------------------------------ 4265a81ca49Smrgm4_define([lt_decl_all_varnames], 4275a81ca49Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4285a81ca49Smrg m4_if([$2], [], 4295a81ca49Smrg m4_quote(lt_decl_varnames), 4305a81ca49Smrg m4_quote(m4_shift($@))))[]dnl 4315a81ca49Smrg]) 4325a81ca49Smrgm4_define([_lt_decl_all_varnames], 4335a81ca49Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 4345a81ca49Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4355a81ca49Smrg]) 4361b12faf6Smrg 4371b12faf6Smrg 4385a81ca49Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4395a81ca49Smrg# ------------------------------------ 4405a81ca49Smrg# Quote a variable value, and forward it to `config.status' so that its 4415a81ca49Smrg# declaration there will have the same value as in `configure'. VARNAME 4425a81ca49Smrg# must have a single quote delimited value for this to work. 4435a81ca49Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4445a81ca49Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 4451b12faf6Smrg 4461b12faf6Smrg 4475a81ca49Smrg# _LT_CONFIG_STATUS_DECLARATIONS 4485a81ca49Smrg# ------------------------------ 4495a81ca49Smrg# We delimit libtool config variables with single quotes, so when 4505a81ca49Smrg# we write them to config.status, we have to be sure to quote all 4515a81ca49Smrg# embedded single quotes properly. In configure, this macro expands 4525a81ca49Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 453e35d4d8eSmrg# 4545a81ca49Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4555a81ca49Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4565a81ca49Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4575a81ca49Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4581b12faf6Smrg 4591b12faf6Smrg 4605a81ca49Smrg# _LT_LIBTOOL_TAGS 4615a81ca49Smrg# ---------------- 4625a81ca49Smrg# Output comment and list of tags supported by the script 4635a81ca49Smrgm4_defun([_LT_LIBTOOL_TAGS], 4645a81ca49Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4655a81ca49Smrgavailable_tags="_LT_TAGS"dnl 4665a81ca49Smrg]) 4671b12faf6Smrg 4681b12faf6Smrg 4695a81ca49Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4705a81ca49Smrg# ----------------------------------- 4715a81ca49Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4725a81ca49Smrg# expand to a commented shell variable setting: 473e35d4d8eSmrg# 4745a81ca49Smrg# # Some comment about what VAR is for. 4755a81ca49Smrg# visible_name=$lt_internal_name 4765a81ca49Smrgm4_define([_LT_LIBTOOL_DECLARE], 4775a81ca49Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4785a81ca49Smrg [description])))[]dnl 4795a81ca49Smrgm4_pushdef([_libtool_name], 4805a81ca49Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4815a81ca49Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4825a81ca49Smrg [0], [_libtool_name=[$]$1], 4835a81ca49Smrg [1], [_libtool_name=$lt_[]$1], 4845a81ca49Smrg [2], [_libtool_name=$lt_[]$1], 4855a81ca49Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4865a81ca49Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 487e35d4d8eSmrg]) 4881b12faf6Smrg 4891b12faf6Smrg 4905a81ca49Smrg# _LT_LIBTOOL_CONFIG_VARS 4915a81ca49Smrg# ----------------------- 4925a81ca49Smrg# Produce commented declarations of non-tagged libtool config variables 4935a81ca49Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 4945a81ca49Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4955a81ca49Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4965a81ca49Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4975a81ca49Smrg[m4_foreach([_lt_var], 4985a81ca49Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4995a81ca49Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 5001b12faf6Smrg 5011b12faf6Smrg 5025a81ca49Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 5035a81ca49Smrg# ------------------------- 5045a81ca49Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 5055a81ca49Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5065a81ca49Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 5071b12faf6Smrg 5081b12faf6Smrg 5095a81ca49Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 5105a81ca49Smrg# ------------------------------ 5115a81ca49Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 5121b12faf6Smrg 513e35d4d8eSmrg 5145a81ca49Smrg# _LT_CONFIG_COMMANDS 5155a81ca49Smrg# ------------------- 5165a81ca49Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5175a81ca49Smrg# variables for single and double quote escaping we saved from calls 5185a81ca49Smrg# to _LT_DECL, we can put quote escaped variables declarations 5195a81ca49Smrg# into `config.status', and then the shell code to quote escape them in 5205a81ca49Smrg# for loops in `config.status'. Finally, any additional code accumulated 5215a81ca49Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5225a81ca49Smrgm4_defun([_LT_CONFIG_COMMANDS], 5235a81ca49Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5245a81ca49Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5255a81ca49Smrg dnl instead of duplicating it all over again into config.status, 5265a81ca49Smrg dnl then we will have config.status run $CONFIG_LT later, so it 5275a81ca49Smrg dnl needs to know what name is stored there: 5285a81ca49Smrg [AC_CONFIG_COMMANDS([libtool], 5295a81ca49Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5305a81ca49Smrg dnl If the libtool generation code is destined for config.status, 5315a81ca49Smrg dnl expand the accumulated commands and init code now: 5325a81ca49Smrg [AC_CONFIG_COMMANDS([libtool], 5335a81ca49Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5345a81ca49Smrg])#_LT_CONFIG_COMMANDS 535e35d4d8eSmrg 536e35d4d8eSmrg 5375a81ca49Smrg# Initialize. 5385a81ca49Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5395a81ca49Smrg[ 5405a81ca49Smrg 5415a81ca49Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5425a81ca49Smrg# if CDPATH is set. 5435a81ca49Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 544e35d4d8eSmrg 5455a81ca49Smrgsed_quote_subst='$sed_quote_subst' 5465a81ca49Smrgdouble_quote_subst='$double_quote_subst' 5475a81ca49Smrgdelay_variable_subst='$delay_variable_subst' 5485a81ca49Smrg_LT_CONFIG_STATUS_DECLARATIONS 5495a81ca49SmrgLTCC='$LTCC' 5505a81ca49SmrgLTCFLAGS='$LTCFLAGS' 5515a81ca49Smrgcompiler='$compiler_DEFAULT' 5521b12faf6Smrg 5535a81ca49Smrg# A function that is used when there is no print builtin or printf. 5545a81ca49Smrgfunc_fallback_echo () 5555a81ca49Smrg{ 5565a81ca49Smrg eval 'cat <<_LTECHO_EOF 5575a81ca49Smrg\$[]1 5585a81ca49Smrg_LTECHO_EOF' 5595a81ca49Smrg} 5601b12faf6Smrg 5615a81ca49Smrg# Quote evaled strings. 5625a81ca49Smrgfor var in lt_decl_all_varnames([[ \ 5635a81ca49Smrg]], lt_decl_quote_varnames); do 5645a81ca49Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5655a81ca49Smrg *[[\\\\\\\`\\"\\\$]]*) 5665a81ca49Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 5675a81ca49Smrg ;; 5685a81ca49Smrg *) 5695a81ca49Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5705a81ca49Smrg ;; 5715a81ca49Smrg esac 572e35d4d8eSmrgdone 5731b12faf6Smrg 5745a81ca49Smrg# Double-quote double-evaled strings. 5755a81ca49Smrgfor var in lt_decl_all_varnames([[ \ 5765a81ca49Smrg]], lt_decl_dquote_varnames); do 5775a81ca49Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5785a81ca49Smrg *[[\\\\\\\`\\"\\\$]]*) 5795a81ca49Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 5805a81ca49Smrg ;; 5815a81ca49Smrg *) 5825a81ca49Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5835a81ca49Smrg ;; 5845a81ca49Smrg esac 5855a81ca49Smrgdone 5861b12faf6Smrg 5875a81ca49Smrg_LT_OUTPUT_LIBTOOL_INIT 588e35d4d8eSmrg]) 5891b12faf6Smrg 5905a81ca49Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 5915a81ca49Smrg# ------------------------------------ 5925a81ca49Smrg# Generate a child script FILE with all initialization necessary to 5935a81ca49Smrg# reuse the environment learned by the parent script, and make the 5945a81ca49Smrg# file executable. If COMMENT is supplied, it is inserted after the 5955a81ca49Smrg# `#!' sequence but before initialization text begins. After this 5965a81ca49Smrg# macro, additional text can be appended to FILE to form the body of 5975a81ca49Smrg# the child script. The macro ends with non-zero status if the 5985a81ca49Smrg# file could not be fully written (such as if the disk is full). 5995a81ca49Smrgm4_ifdef([AS_INIT_GENERATED], 6005a81ca49Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 6015a81ca49Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 6025a81ca49Smrg[m4_require([AS_PREPARE])]dnl 6035a81ca49Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 6045a81ca49Smrg[lt_write_fail=0 6055a81ca49Smrgcat >$1 <<_ASEOF || lt_write_fail=1 6065a81ca49Smrg#! $SHELL 6075a81ca49Smrg# Generated by $as_me. 6085a81ca49Smrg$2 6095a81ca49SmrgSHELL=\${CONFIG_SHELL-$SHELL} 6105a81ca49Smrgexport SHELL 6115a81ca49Smrg_ASEOF 6125a81ca49Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 6135a81ca49SmrgAS_SHELL_SANITIZE 6145a81ca49Smrg_AS_PREPARE 6155a81ca49Smrgexec AS_MESSAGE_FD>&1 6165a81ca49Smrg_ASEOF 6175a81ca49Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 6185a81ca49Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6191b12faf6Smrg 6205a81ca49Smrg# LT_OUTPUT 6215a81ca49Smrg# --------- 6225a81ca49Smrg# This macro allows early generation of the libtool script (before 6235a81ca49Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 6245a81ca49Smrg# tests. 6255a81ca49SmrgAC_DEFUN([LT_OUTPUT], 6265a81ca49Smrg[: ${CONFIG_LT=./config.lt} 6275a81ca49SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 6285a81ca49Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 6295a81ca49Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 6301b12faf6Smrg 6315a81ca49Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6325a81ca49Smrglt_cl_silent=false 6335a81ca49Smrgexec AS_MESSAGE_LOG_FD>>config.log 6345a81ca49Smrg{ 6355a81ca49Smrg echo 6365a81ca49Smrg AS_BOX([Running $as_me.]) 6375a81ca49Smrg} >&AS_MESSAGE_LOG_FD 6381b12faf6Smrg 6395a81ca49Smrglt_cl_help="\ 6405a81ca49Smrg\`$as_me' creates a local libtool stub from the current configuration, 6415a81ca49Smrgfor use in further configure time tests before the real libtool is 6425a81ca49Smrggenerated. 6431b12faf6Smrg 6445a81ca49SmrgUsage: $[0] [[OPTIONS]] 6451b12faf6Smrg 6465a81ca49Smrg -h, --help print this help, then exit 6475a81ca49Smrg -V, --version print version number, then exit 6485a81ca49Smrg -q, --quiet do not print progress messages 6495a81ca49Smrg -d, --debug don't remove temporary files 6501b12faf6Smrg 6515a81ca49SmrgReport bugs to <bug-libtool@gnu.org>." 6521b12faf6Smrg 6535a81ca49Smrglt_cl_version="\ 6545a81ca49Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6555a81ca49Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6565a81ca49Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6571b12faf6Smrg 6585a81ca49SmrgCopyright (C) 2011 Free Software Foundation, Inc. 6595a81ca49SmrgThis config.lt script is free software; the Free Software Foundation 6605a81ca49Smrggives unlimited permision to copy, distribute and modify it." 6611b12faf6Smrg 6625a81ca49Smrgwhile test $[#] != 0 6635a81ca49Smrgdo 6645a81ca49Smrg case $[1] in 6655a81ca49Smrg --version | --v* | -V ) 6665a81ca49Smrg echo "$lt_cl_version"; exit 0 ;; 6675a81ca49Smrg --help | --h* | -h ) 6685a81ca49Smrg echo "$lt_cl_help"; exit 0 ;; 6695a81ca49Smrg --debug | --d* | -d ) 6705a81ca49Smrg debug=: ;; 6715a81ca49Smrg --quiet | --q* | --silent | --s* | -q ) 6725a81ca49Smrg lt_cl_silent=: ;; 6731b12faf6Smrg 6745a81ca49Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6755a81ca49SmrgTry \`$[0] --help' for more information.]) ;; 6761b12faf6Smrg 6775a81ca49Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6785a81ca49SmrgTry \`$[0] --help' for more information.]) ;; 679e35d4d8eSmrg esac 6805a81ca49Smrg shift 681e35d4d8eSmrgdone 68232b578d3Smrg 6835a81ca49Smrgif $lt_cl_silent; then 6845a81ca49Smrg exec AS_MESSAGE_FD>/dev/null 6855a81ca49Smrgfi 6865a81ca49Smrg_LTEOF 6871b12faf6Smrg 6885a81ca49Smrgcat >>"$CONFIG_LT" <<_LTEOF 6895a81ca49Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 6905a81ca49Smrg_LTEOF 69132b578d3Smrg 6925a81ca49Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6935a81ca49SmrgAC_MSG_NOTICE([creating $ofile]) 6945a81ca49Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 6955a81ca49SmrgAS_EXIT(0) 6965a81ca49Smrg_LTEOF 6975a81ca49Smrgchmod +x "$CONFIG_LT" 69832b578d3Smrg 6995a81ca49Smrg# configure is writing to config.log, but config.lt does its own redirection, 7005a81ca49Smrg# appending to config.log, which fails on DOS, as config.log is still kept 7015a81ca49Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 7025a81ca49Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 7035a81ca49Smrglt_cl_success=: 7045a81ca49Smrgtest "$silent" = yes && 7055a81ca49Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 7065a81ca49Smrgexec AS_MESSAGE_LOG_FD>/dev/null 7075a81ca49Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 7085a81ca49Smrgexec AS_MESSAGE_LOG_FD>>config.log 7095a81ca49Smrg$lt_cl_success || AS_EXIT(1) 7105a81ca49Smrg])# LT_OUTPUT 71132b578d3Smrg 71232b578d3Smrg 7135a81ca49Smrg# _LT_CONFIG(TAG) 7145a81ca49Smrg# --------------- 7155a81ca49Smrg# If TAG is the built-in tag, create an initial libtool script with a 7165a81ca49Smrg# default configuration from the untagged config vars. Otherwise add code 7175a81ca49Smrg# to config.status for appending the configuration named by TAG from the 7185a81ca49Smrg# matching tagged config vars. 7195a81ca49Smrgm4_defun([_LT_CONFIG], 7205a81ca49Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7215a81ca49Smrg_LT_CONFIG_SAVE_COMMANDS([ 7225a81ca49Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7235a81ca49Smrg m4_if(_LT_TAG, [C], [ 7245a81ca49Smrg # See if we are running on zsh, and set the options which allow our 7255a81ca49Smrg # commands through without removal of \ escapes. 7265a81ca49Smrg if test -n "${ZSH_VERSION+set}" ; then 7275a81ca49Smrg setopt NO_GLOB_SUBST 7285a81ca49Smrg fi 72932b578d3Smrg 7305a81ca49Smrg cfgfile="${ofile}T" 7315a81ca49Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7325a81ca49Smrg $RM "$cfgfile" 73332b578d3Smrg 7345a81ca49Smrg cat <<_LT_EOF >> "$cfgfile" 7355a81ca49Smrg#! $SHELL 73632b578d3Smrg 7375a81ca49Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 7385a81ca49Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 7395a81ca49Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7405a81ca49Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7415a81ca49Smrg# 7425a81ca49Smrg_LT_COPYING 7435a81ca49Smrg_LT_LIBTOOL_TAGS 74432b578d3Smrg 7455a81ca49Smrg# ### BEGIN LIBTOOL CONFIG 7465a81ca49Smrg_LT_LIBTOOL_CONFIG_VARS 7475a81ca49Smrg_LT_LIBTOOL_TAG_VARS 7485a81ca49Smrg# ### END LIBTOOL CONFIG 7491b12faf6Smrg 7505a81ca49Smrg_LT_EOF 7511b12faf6Smrg 7525a81ca49Smrg case $host_os in 7535a81ca49Smrg aix3*) 7545a81ca49Smrg cat <<\_LT_EOF >> "$cfgfile" 7555a81ca49Smrg# AIX sometimes has problems with the GCC collect2 program. For some 7565a81ca49Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7575a81ca49Smrg# vanish in a puff of smoke. 7585a81ca49Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 7595a81ca49Smrg COLLECT_NAMES= 7605a81ca49Smrg export COLLECT_NAMES 7615a81ca49Smrgfi 7625a81ca49Smrg_LT_EOF 7635a81ca49Smrg ;; 7645a81ca49Smrg esac 76532b578d3Smrg 7665a81ca49Smrg _LT_PROG_LTMAIN 76732b578d3Smrg 7685a81ca49Smrg # We use sed instead of cat because bash on DJGPP gets confused if 7695a81ca49Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7705a81ca49Smrg # text mode, it properly converts lines to CR/LF. This bash problem 7715a81ca49Smrg # is reportedly fixed, but why not run on old versions too? 7725a81ca49Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 7735a81ca49Smrg || (rm -f "$cfgfile"; exit 1) 77432b578d3Smrg 7755a81ca49Smrg _LT_PROG_REPLACE_SHELLFNS 77632b578d3Smrg 7775a81ca49Smrg mv -f "$cfgfile" "$ofile" || 7785a81ca49Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 7795a81ca49Smrg chmod +x "$ofile" 7805a81ca49Smrg], 7815a81ca49Smrg[cat <<_LT_EOF >> "$ofile" 782d31dbc53Smrg 7835a81ca49Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 7845a81ca49Smrgdnl in a comment (ie after a #). 7855a81ca49Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 7865a81ca49Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 7875a81ca49Smrg# ### END LIBTOOL TAG CONFIG: $1 7885a81ca49Smrg_LT_EOF 7895a81ca49Smrg])dnl /m4_if 7905a81ca49Smrg], 7915a81ca49Smrg[m4_if([$1], [], [ 7925a81ca49Smrg PACKAGE='$PACKAGE' 7935a81ca49Smrg VERSION='$VERSION' 7945a81ca49Smrg TIMESTAMP='$TIMESTAMP' 7955a81ca49Smrg RM='$RM' 7965a81ca49Smrg ofile='$ofile'], []) 7975a81ca49Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 7985a81ca49Smrg])# _LT_CONFIG 79932b578d3Smrg 80032b578d3Smrg 8015a81ca49Smrg# LT_SUPPORTED_TAG(TAG) 8025a81ca49Smrg# --------------------- 8035a81ca49Smrg# Trace this macro to discover what tags are supported by the libtool 8045a81ca49Smrg# --tag option, using: 8055a81ca49Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8065a81ca49SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 80732b578d3Smrg 80832b578d3Smrg 8095a81ca49Smrg# C support is built-in for now 8105a81ca49Smrgm4_define([_LT_LANG_C_enabled], []) 8115a81ca49Smrgm4_define([_LT_TAGS], []) 81232b578d3Smrg 81332b578d3Smrg 8145a81ca49Smrg# LT_LANG(LANG) 8155a81ca49Smrg# ------------- 8165a81ca49Smrg# Enable libtool support for the given language if not already enabled. 8175a81ca49SmrgAC_DEFUN([LT_LANG], 8185a81ca49Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8195a81ca49Smrgm4_case([$1], 8205a81ca49Smrg [C], [_LT_LANG(C)], 8215a81ca49Smrg [C++], [_LT_LANG(CXX)], 8225a81ca49Smrg [Go], [_LT_LANG(GO)], 8235a81ca49Smrg [Java], [_LT_LANG(GCJ)], 8245a81ca49Smrg [Fortran 77], [_LT_LANG(F77)], 8255a81ca49Smrg [Fortran], [_LT_LANG(FC)], 8265a81ca49Smrg [Windows Resource], [_LT_LANG(RC)], 8275a81ca49Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8285a81ca49Smrg [_LT_LANG($1)], 8295a81ca49Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8305a81ca49Smrg])# LT_LANG 83132b578d3Smrg 832d31dbc53Smrg 8335a81ca49Smrg# _LT_LANG(LANGNAME) 8345a81ca49Smrg# ------------------ 8355a81ca49Smrgm4_defun([_LT_LANG], 8365a81ca49Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8375a81ca49Smrg [LT_SUPPORTED_TAG([$1])dnl 8385a81ca49Smrg m4_append([_LT_TAGS], [$1 ])dnl 8395a81ca49Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8405a81ca49Smrg _LT_LANG_$1_CONFIG($1)])dnl 8415a81ca49Smrg])# _LT_LANG 84232b578d3Smrg 84332b578d3Smrg 8445a81ca49Smrgm4_ifndef([AC_PROG_GO], [ 8455a81ca49Smrg# NOTE: This macro has been submitted for inclusion into # 8465a81ca49Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 8475a81ca49Smrg# a released version of Autoconf we should remove this # 8485a81ca49Smrg# macro and use it instead. # 8495a81ca49Smrgm4_defun([AC_PROG_GO], 8505a81ca49Smrg[AC_LANG_PUSH(Go)dnl 8515a81ca49SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 8525a81ca49SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 8535a81ca49Smrg_AC_ARG_VAR_LDFLAGS()dnl 8545a81ca49SmrgAC_CHECK_TOOL(GOC, gccgo) 8555a81ca49Smrgif test -z "$GOC"; then 8565a81ca49Smrg if test -n "$ac_tool_prefix"; then 8575a81ca49Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 8585a81ca49Smrg fi 8595a81ca49Smrgfi 8605a81ca49Smrgif test -z "$GOC"; then 8615a81ca49Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 8625a81ca49Smrgfi 8635a81ca49Smrg])#m4_defun 8645a81ca49Smrg])#m4_ifndef 86532b578d3Smrg 8661b12faf6Smrg 8675a81ca49Smrg# _LT_LANG_DEFAULT_CONFIG 8685a81ca49Smrg# ----------------------- 8695a81ca49Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8705a81ca49Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8715a81ca49Smrg [LT_LANG(CXX)], 8725a81ca49Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8731b12faf6Smrg 8745a81ca49SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8755a81ca49Smrg [LT_LANG(F77)], 8765a81ca49Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8771b12faf6Smrg 8785a81ca49SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 8795a81ca49Smrg [LT_LANG(FC)], 8805a81ca49Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 8811b12faf6Smrg 8825a81ca49Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 8835a81ca49Smrgdnl pulling things in needlessly. 8845a81ca49SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 8855a81ca49Smrg [LT_LANG(GCJ)], 8865a81ca49Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 8875a81ca49Smrg [LT_LANG(GCJ)], 8885a81ca49Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 8895a81ca49Smrg [LT_LANG(GCJ)], 8905a81ca49Smrg [m4_ifdef([AC_PROG_GCJ], 8915a81ca49Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 8925a81ca49Smrg m4_ifdef([A][M_PROG_GCJ], 8935a81ca49Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 8945a81ca49Smrg m4_ifdef([LT_PROG_GCJ], 8955a81ca49Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 8961b12faf6Smrg 8975a81ca49SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 8985a81ca49Smrg [LT_LANG(GO)], 8995a81ca49Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 90032b578d3Smrg 9015a81ca49SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 9025a81ca49Smrg [LT_LANG(RC)], 9035a81ca49Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9045a81ca49Smrg])# _LT_LANG_DEFAULT_CONFIG 90532b578d3Smrg 9065a81ca49Smrg# Obsolete macros: 9075a81ca49SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9085a81ca49SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9095a81ca49SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9105a81ca49SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 9115a81ca49SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9125a81ca49Smrgdnl aclocal-1.4 backwards compatibility: 9135a81ca49Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9145a81ca49Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9155a81ca49Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9165a81ca49Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 9175a81ca49Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 91832b578d3Smrg 919e35d4d8eSmrg 9205a81ca49Smrg# _LT_TAG_COMPILER 9215a81ca49Smrg# ---------------- 9225a81ca49Smrgm4_defun([_LT_TAG_COMPILER], 9235a81ca49Smrg[AC_REQUIRE([AC_PROG_CC])dnl 92432b578d3Smrg 9255a81ca49Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9265a81ca49Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9275a81ca49Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9285a81ca49Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 92932b578d3Smrg 9305a81ca49Smrg# If no C compiler was specified, use CC. 9315a81ca49SmrgLTCC=${LTCC-"$CC"} 93232b578d3Smrg 9335a81ca49Smrg# If no C compiler flags were specified, use CFLAGS. 9345a81ca49SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 9351b12faf6Smrg 9365a81ca49Smrg# Allow CC to be a program name with arguments. 9375a81ca49Smrgcompiler=$CC 9385a81ca49Smrg])# _LT_TAG_COMPILER 939e35d4d8eSmrg 940e35d4d8eSmrg 9415a81ca49Smrg# _LT_COMPILER_BOILERPLATE 9425a81ca49Smrg# ------------------------ 9435a81ca49Smrg# Check for compiler boilerplate output or warnings with 9445a81ca49Smrg# the simple compiler test code. 9455a81ca49Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 9465a81ca49Smrg[m4_require([_LT_DECL_SED])dnl 9475a81ca49Smrgac_outfile=conftest.$ac_objext 9485a81ca49Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 9495a81ca49Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9505a81ca49Smrg_lt_compiler_boilerplate=`cat conftest.err` 9515a81ca49Smrg$RM conftest* 9525a81ca49Smrg])# _LT_COMPILER_BOILERPLATE 95332b578d3Smrg 95432b578d3Smrg 9555a81ca49Smrg# _LT_LINKER_BOILERPLATE 9565a81ca49Smrg# ---------------------- 9575a81ca49Smrg# Check for linker boilerplate output or warnings with 9585a81ca49Smrg# the simple link test code. 9595a81ca49Smrgm4_defun([_LT_LINKER_BOILERPLATE], 9605a81ca49Smrg[m4_require([_LT_DECL_SED])dnl 9615a81ca49Smrgac_outfile=conftest.$ac_objext 9625a81ca49Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 9635a81ca49Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9645a81ca49Smrg_lt_linker_boilerplate=`cat conftest.err` 9655a81ca49Smrg$RM -r conftest* 9665a81ca49Smrg])# _LT_LINKER_BOILERPLATE 96732b578d3Smrg 9685a81ca49Smrg# _LT_REQUIRED_DARWIN_CHECKS 9695a81ca49Smrg# ------------------------- 9705a81ca49Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9715a81ca49Smrg case $host_os in 9725a81ca49Smrg rhapsody* | darwin*) 9735a81ca49Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9745a81ca49Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9755a81ca49Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9765a81ca49Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9775a81ca49Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 9785a81ca49Smrg _LT_DECL([], [DSYMUTIL], [1], 9795a81ca49Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 9805a81ca49Smrg _LT_DECL([], [NMEDIT], [1], 9815a81ca49Smrg [Tool to change global to local symbols on Mac OS X]) 9825a81ca49Smrg _LT_DECL([], [LIPO], [1], 9835a81ca49Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 9845a81ca49Smrg _LT_DECL([], [OTOOL], [1], 9855a81ca49Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 9865a81ca49Smrg _LT_DECL([], [OTOOL64], [1], 9875a81ca49Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 9881b12faf6Smrg 9895a81ca49Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 9905a81ca49Smrg [lt_cv_apple_cc_single_mod=no 9915a81ca49Smrg if test -z "${LT_MULTI_MODULE}"; then 9925a81ca49Smrg # By default we will add the -single_module flag. You can override 9935a81ca49Smrg # by either setting the environment variable LT_MULTI_MODULE 9945a81ca49Smrg # non-empty at configure time, or by adding -multi_module to the 9955a81ca49Smrg # link flags. 9965a81ca49Smrg rm -rf libconftest.dylib* 9975a81ca49Smrg echo "int foo(void){return 1;}" > conftest.c 9985a81ca49Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 9995a81ca49Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10005a81ca49Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10015a81ca49Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10025a81ca49Smrg _lt_result=$? 10035a81ca49Smrg # If there is a non-empty error log, and "single_module" 10045a81ca49Smrg # appears in it, assume the flag caused a linker warning 10055a81ca49Smrg if test -s conftest.err && $GREP single_module conftest.err; then 10065a81ca49Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10075a81ca49Smrg # Otherwise, if the output was created with a 0 exit code from 10085a81ca49Smrg # the compiler, it worked. 10095a81ca49Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 10105a81ca49Smrg lt_cv_apple_cc_single_mod=yes 10115a81ca49Smrg else 10125a81ca49Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10135a81ca49Smrg fi 10145a81ca49Smrg rm -rf libconftest.dylib* 10155a81ca49Smrg rm -f conftest.* 10165a81ca49Smrg fi]) 101732b578d3Smrg 10185a81ca49Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10195a81ca49Smrg [lt_cv_ld_exported_symbols_list], 10205a81ca49Smrg [lt_cv_ld_exported_symbols_list=no 10215a81ca49Smrg save_LDFLAGS=$LDFLAGS 10225a81ca49Smrg echo "_main" > conftest.sym 10235a81ca49Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10245a81ca49Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10255a81ca49Smrg [lt_cv_ld_exported_symbols_list=yes], 10265a81ca49Smrg [lt_cv_ld_exported_symbols_list=no]) 10275a81ca49Smrg LDFLAGS="$save_LDFLAGS" 10285a81ca49Smrg ]) 102932b578d3Smrg 10305a81ca49Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 10315a81ca49Smrg [lt_cv_ld_force_load=no 10325a81ca49Smrg cat > conftest.c << _LT_EOF 10335a81ca49Smrgint forced_loaded() { return 2;} 10345a81ca49Smrg_LT_EOF 10355a81ca49Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 10365a81ca49Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 10375a81ca49Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 10385a81ca49Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 10395a81ca49Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 10405a81ca49Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 10415a81ca49Smrg cat > conftest.c << _LT_EOF 10425a81ca49Smrgint main() { return 0;} 10435a81ca49Smrg_LT_EOF 10445a81ca49Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 10455a81ca49Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 10465a81ca49Smrg _lt_result=$? 10475a81ca49Smrg if test -s conftest.err && $GREP force_load conftest.err; then 10485a81ca49Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10495a81ca49Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 10505a81ca49Smrg lt_cv_ld_force_load=yes 10515a81ca49Smrg else 10525a81ca49Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10535a81ca49Smrg fi 10545a81ca49Smrg rm -f conftest.err libconftest.a conftest conftest.c 10555a81ca49Smrg rm -rf conftest.dSYM 10565a81ca49Smrg ]) 10575a81ca49Smrg case $host_os in 10585a81ca49Smrg rhapsody* | darwin1.[[012]]) 10595a81ca49Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 10605a81ca49Smrg darwin1.*) 10615a81ca49Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10625a81ca49Smrg darwin*) # darwin 5.x on 10635a81ca49Smrg # if running on 10.5 or later, the deployment target defaults 10645a81ca49Smrg # to the OS version, if on x86, and 10.4, the deployment 10655a81ca49Smrg # target defaults to 10.4. Don't you love it? 10665a81ca49Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10675a81ca49Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 10685a81ca49Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10695a81ca49Smrg 10.[[012]]*) 10705a81ca49Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10715a81ca49Smrg 10.*) 10725a81ca49Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10735a81ca49Smrg esac 10745a81ca49Smrg ;; 10755a81ca49Smrg esac 10765a81ca49Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 10775a81ca49Smrg _lt_dar_single_mod='$single_module' 10785a81ca49Smrg fi 10795a81ca49Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 10805a81ca49Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 10815a81ca49Smrg else 10825a81ca49Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 10835a81ca49Smrg fi 10845a81ca49Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 10855a81ca49Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 10865a81ca49Smrg else 10875a81ca49Smrg _lt_dsymutil= 10885a81ca49Smrg fi 10895a81ca49Smrg ;; 10905a81ca49Smrg esac 10915a81ca49Smrg]) 109232b578d3Smrg 109332b578d3Smrg 10945a81ca49Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 10955a81ca49Smrg# --------------------------------- 10965a81ca49Smrg# Checks for linker and compiler features on darwin 10975a81ca49Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 10985a81ca49Smrg[ 10995a81ca49Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11005a81ca49Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11015a81ca49Smrg _LT_TAGVAR(hardcode_direct, $1)=no 11025a81ca49Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 11035a81ca49Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 11045a81ca49Smrg if test "$lt_cv_ld_force_load" = "yes"; then 11055a81ca49Smrg _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\"`' 11065a81ca49Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 11075a81ca49Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 11085a81ca49Smrg else 11095a81ca49Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 11105a81ca49Smrg fi 11115a81ca49Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11125a81ca49Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 11135a81ca49Smrg case $cc_basename in 11145a81ca49Smrg ifort*) _lt_dar_can_shared=yes ;; 11155a81ca49Smrg *) _lt_dar_can_shared=$GCC ;; 11165a81ca49Smrg esac 11175a81ca49Smrg if test "$_lt_dar_can_shared" = "yes"; then 11185a81ca49Smrg output_verbose_link_cmd=func_echo_all 11195a81ca49Smrg _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}" 11205a81ca49Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 11215a81ca49Smrg _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}" 11225a81ca49Smrg _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}" 11235a81ca49Smrg m4_if([$1], [CXX], 11245a81ca49Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 11255a81ca49Smrg _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}" 11265a81ca49Smrg _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}" 11275a81ca49Smrg fi 11285a81ca49Smrg],[]) 11295a81ca49Smrg else 11305a81ca49Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11315a81ca49Smrg fi 1132e35d4d8eSmrg]) 113332b578d3Smrg 11345a81ca49Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 11355a81ca49Smrg# ---------------------------------- 11365a81ca49Smrg# Links a minimal program and checks the executable 11375a81ca49Smrg# for the system default hardcoded library path. In most cases, 11385a81ca49Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 11395a81ca49Smrg# the location of the communication and MPI libs are included too. 11405a81ca49Smrg# If we don't find anything, use the default library path according 11415a81ca49Smrg# to the aix ld manual. 11425a81ca49Smrg# Store the results from the different compilers for each TAGNAME. 11435a81ca49Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 11445a81ca49Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11455a81ca49Smrg[m4_require([_LT_DECL_SED])dnl 11465a81ca49Smrgif test "${lt_cv_aix_libpath+set}" = set; then 11475a81ca49Smrg aix_libpath=$lt_cv_aix_libpath 11485a81ca49Smrgelse 11495a81ca49Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 11505a81ca49Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 11515a81ca49Smrg lt_aix_libpath_sed='[ 11525a81ca49Smrg /Import File Strings/,/^$/ { 11535a81ca49Smrg /^0/ { 11545a81ca49Smrg s/^0 *\([^ ]*\) *$/\1/ 11555a81ca49Smrg p 11565a81ca49Smrg } 11575a81ca49Smrg }]' 11585a81ca49Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11595a81ca49Smrg # Check for a 64-bit object if we didn't find anything. 11605a81ca49Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11615a81ca49Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11625a81ca49Smrg fi],[]) 11635a81ca49Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11645a81ca49Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 11655a81ca49Smrg fi 11665a81ca49Smrg ]) 11675a81ca49Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 11685a81ca49Smrgfi 11695a81ca49Smrg])# _LT_SYS_MODULE_PATH_AIX 117032b578d3Smrg 1171d31dbc53Smrg 11725a81ca49Smrg# _LT_SHELL_INIT(ARG) 11735a81ca49Smrg# ------------------- 11745a81ca49Smrgm4_define([_LT_SHELL_INIT], 11755a81ca49Smrg[m4_divert_text([M4SH-INIT], [$1 11765a81ca49Smrg])])# _LT_SHELL_INIT 117732b578d3Smrg 117832b578d3Smrg 11791b12faf6Smrg 11805a81ca49Smrg# _LT_PROG_ECHO_BACKSLASH 11815a81ca49Smrg# ----------------------- 11825a81ca49Smrg# Find how we can fake an echo command that does not interpret backslash. 11835a81ca49Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 11845a81ca49Smrg# of the generated configure script which will find a shell with a builtin 11855a81ca49Smrg# printf (which we can use as an echo command). 11865a81ca49Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 11875a81ca49Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 11885a81ca49SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 11895a81ca49SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 119032b578d3Smrg 11915a81ca49SmrgAC_MSG_CHECKING([how to print strings]) 11925a81ca49Smrg# Test print first, because it will be a builtin if present. 11935a81ca49Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 11945a81ca49Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 11955a81ca49Smrg ECHO='print -r --' 11965a81ca49Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 11975a81ca49Smrg ECHO='printf %s\n' 11985a81ca49Smrgelse 11995a81ca49Smrg # Use this function as a fallback that always works. 12005a81ca49Smrg func_fallback_echo () 12015a81ca49Smrg { 12025a81ca49Smrg eval 'cat <<_LTECHO_EOF 12035a81ca49Smrg$[]1 12045a81ca49Smrg_LTECHO_EOF' 12055a81ca49Smrg } 12065a81ca49Smrg ECHO='func_fallback_echo' 12075a81ca49Smrgfi 120832b578d3Smrg 1209e35d4d8eSmrg# func_echo_all arg... 1210e35d4d8eSmrg# Invoke $ECHO with all args, space-separated. 1211e35d4d8eSmrgfunc_echo_all () 1212e35d4d8eSmrg{ 1213e35d4d8eSmrg $ECHO "$*" 1214e35d4d8eSmrg} 121532b578d3Smrg 1216e35d4d8eSmrgcase "$ECHO" in 1217e35d4d8eSmrg printf*) AC_MSG_RESULT([printf]) ;; 1218e35d4d8eSmrg print*) AC_MSG_RESULT([print -r]) ;; 1219e35d4d8eSmrg *) AC_MSG_RESULT([cat]) ;; 1220e35d4d8eSmrgesac 12211b12faf6Smrg 1222e35d4d8eSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 1223e35d4d8eSmrg[_AS_DETECT_SUGGESTED([ 1224e35d4d8eSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1225e35d4d8eSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1226e35d4d8eSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1227e35d4d8eSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1228e35d4d8eSmrg PATH=/empty FPATH=/empty; export PATH FPATH 1229e35d4d8eSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1230e35d4d8eSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 12312a51b5beSmrg 1232e35d4d8eSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1233e35d4d8eSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1234e35d4d8eSmrg])# _LT_PROG_ECHO_BACKSLASH 12352a51b5beSmrg 12361b12faf6Smrg 1237e35d4d8eSmrg# _LT_WITH_SYSROOT 1238e35d4d8eSmrg# ---------------- 1239e35d4d8eSmrgAC_DEFUN([_LT_WITH_SYSROOT], 1240e35d4d8eSmrg[AC_MSG_CHECKING([for sysroot]) 1241e35d4d8eSmrgAC_ARG_WITH([sysroot], 1242e35d4d8eSmrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1243e35d4d8eSmrg (or the compiler's sysroot if not specified).], 1244e35d4d8eSmrg[], [with_sysroot=no]) 1245e35d4d8eSmrg 1246e35d4d8eSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 1247e35d4d8eSmrgdnl in case the user passed a directory name. 1248e35d4d8eSmrglt_sysroot= 1249e35d4d8eSmrgcase ${with_sysroot} in #( 1250e35d4d8eSmrg yes) 1251e35d4d8eSmrg if test "$GCC" = yes; then 1252e35d4d8eSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1253e35d4d8eSmrg fi 1254e35d4d8eSmrg ;; #( 1255e35d4d8eSmrg /*) 1256e35d4d8eSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1257e35d4d8eSmrg ;; #( 1258e35d4d8eSmrg no|'') 1259e35d4d8eSmrg ;; #( 1260e35d4d8eSmrg *) 1261e35d4d8eSmrg AC_MSG_RESULT([${with_sysroot}]) 1262e35d4d8eSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1263e35d4d8eSmrg ;; 1264e35d4d8eSmrgesac 12651b12faf6Smrg 1266e35d4d8eSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1267e35d4d8eSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1268e35d4d8eSmrg[dependent libraries, and in which our libraries should be installed.])]) 12691b12faf6Smrg 1270e35d4d8eSmrg# _LT_ENABLE_LOCK 1271e35d4d8eSmrg# --------------- 1272e35d4d8eSmrgm4_defun([_LT_ENABLE_LOCK], 1273e35d4d8eSmrg[AC_ARG_ENABLE([libtool-lock], 1274e35d4d8eSmrg [AS_HELP_STRING([--disable-libtool-lock], 1275e35d4d8eSmrg [avoid locking (might break parallel builds)])]) 1276e35d4d8eSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 12771b12faf6Smrg 1278e35d4d8eSmrg# Some flags need to be propagated to the compiler or linker for good 1279e35d4d8eSmrg# libtool support. 1280e35d4d8eSmrgcase $host in 1281e35d4d8eSmrgia64-*-hpux*) 1282e35d4d8eSmrg # Find out which ABI we are using. 1283e35d4d8eSmrg echo 'int i;' > conftest.$ac_ext 1284e35d4d8eSmrg if AC_TRY_EVAL(ac_compile); then 1285e35d4d8eSmrg case `/usr/bin/file conftest.$ac_objext` in 1286e35d4d8eSmrg *ELF-32*) 1287e35d4d8eSmrg HPUX_IA64_MODE="32" 1288e35d4d8eSmrg ;; 1289e35d4d8eSmrg *ELF-64*) 1290e35d4d8eSmrg HPUX_IA64_MODE="64" 1291e35d4d8eSmrg ;; 1292e35d4d8eSmrg esac 1293e35d4d8eSmrg fi 1294e35d4d8eSmrg rm -rf conftest* 12952a51b5beSmrg ;; 1296e35d4d8eSmrg*-*-irix6*) 1297e35d4d8eSmrg # Find out which ABI we are using. 1298e35d4d8eSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1299e35d4d8eSmrg if AC_TRY_EVAL(ac_compile); then 1300e35d4d8eSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 1301e35d4d8eSmrg case `/usr/bin/file conftest.$ac_objext` in 1302e35d4d8eSmrg *32-bit*) 1303e35d4d8eSmrg LD="${LD-ld} -melf32bsmip" 1304e35d4d8eSmrg ;; 1305e35d4d8eSmrg *N32*) 1306e35d4d8eSmrg LD="${LD-ld} -melf32bmipn32" 1307e35d4d8eSmrg ;; 1308e35d4d8eSmrg *64-bit*) 1309e35d4d8eSmrg LD="${LD-ld} -melf64bmip" 1310e35d4d8eSmrg ;; 1311e35d4d8eSmrg esac 13122a51b5beSmrg else 1313e35d4d8eSmrg case `/usr/bin/file conftest.$ac_objext` in 1314e35d4d8eSmrg *32-bit*) 1315e35d4d8eSmrg LD="${LD-ld} -32" 1316e35d4d8eSmrg ;; 1317e35d4d8eSmrg *N32*) 1318e35d4d8eSmrg LD="${LD-ld} -n32" 1319e35d4d8eSmrg ;; 1320e35d4d8eSmrg *64-bit*) 1321e35d4d8eSmrg LD="${LD-ld} -64" 1322e35d4d8eSmrg ;; 1323e35d4d8eSmrg esac 13242a51b5beSmrg fi 1325d31dbc53Smrg fi 1326e35d4d8eSmrg rm -rf conftest* 1327d31dbc53Smrg ;; 13282a51b5beSmrg 13295a81ca49Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1330e35d4d8eSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1331e35d4d8eSmrg # Find out which ABI we are using. 1332e35d4d8eSmrg echo 'int i;' > conftest.$ac_ext 1333e35d4d8eSmrg if AC_TRY_EVAL(ac_compile); then 1334e35d4d8eSmrg case `/usr/bin/file conftest.o` in 1335e35d4d8eSmrg *32-bit*) 1336e35d4d8eSmrg case $host in 1337e35d4d8eSmrg x86_64-*kfreebsd*-gnu) 1338e35d4d8eSmrg LD="${LD-ld} -m elf_i386_fbsd" 1339e35d4d8eSmrg ;; 1340e35d4d8eSmrg x86_64-*linux*) 1341e35d4d8eSmrg LD="${LD-ld} -m elf_i386" 1342e35d4d8eSmrg ;; 13435a81ca49Smrg powerpc64le-*linux*) 13445a81ca49Smrg LD="${LD-ld} -m elf32lppclinux" 13455a81ca49Smrg ;; 13465a81ca49Smrg powerpc64-*linux*) 1347e35d4d8eSmrg LD="${LD-ld} -m elf32ppclinux" 1348e35d4d8eSmrg ;; 1349e35d4d8eSmrg s390x-*linux*) 1350e35d4d8eSmrg LD="${LD-ld} -m elf_s390" 1351e35d4d8eSmrg ;; 1352e35d4d8eSmrg sparc64-*linux*) 1353e35d4d8eSmrg LD="${LD-ld} -m elf32_sparc" 1354e35d4d8eSmrg ;; 1355e35d4d8eSmrg esac 1356e35d4d8eSmrg ;; 1357e35d4d8eSmrg *64-bit*) 1358e35d4d8eSmrg case $host in 1359e35d4d8eSmrg x86_64-*kfreebsd*-gnu) 1360e35d4d8eSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 1361e35d4d8eSmrg ;; 1362e35d4d8eSmrg x86_64-*linux*) 1363e35d4d8eSmrg LD="${LD-ld} -m elf_x86_64" 1364e35d4d8eSmrg ;; 13655a81ca49Smrg powerpcle-*linux*) 13665a81ca49Smrg LD="${LD-ld} -m elf64lppc" 13675a81ca49Smrg ;; 13685a81ca49Smrg powerpc-*linux*) 1369e35d4d8eSmrg LD="${LD-ld} -m elf64ppc" 1370e35d4d8eSmrg ;; 1371e35d4d8eSmrg s390*-*linux*|s390*-*tpf*) 1372e35d4d8eSmrg LD="${LD-ld} -m elf64_s390" 1373e35d4d8eSmrg ;; 1374e35d4d8eSmrg sparc*-*linux*) 1375e35d4d8eSmrg LD="${LD-ld} -m elf64_sparc" 1376e35d4d8eSmrg ;; 1377e35d4d8eSmrg esac 1378e35d4d8eSmrg ;; 1379e35d4d8eSmrg esac 1380e35d4d8eSmrg fi 1381e35d4d8eSmrg rm -rf conftest* 13821b12faf6Smrg ;; 13831b12faf6Smrg 1384e35d4d8eSmrg*-*-sco3.2v5*) 1385e35d4d8eSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1386e35d4d8eSmrg SAVE_CFLAGS="$CFLAGS" 1387e35d4d8eSmrg CFLAGS="$CFLAGS -belf" 1388e35d4d8eSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1389e35d4d8eSmrg [AC_LANG_PUSH(C) 1390e35d4d8eSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1391e35d4d8eSmrg AC_LANG_POP]) 1392e35d4d8eSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1393e35d4d8eSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1394e35d4d8eSmrg CFLAGS="$SAVE_CFLAGS" 1395e35d4d8eSmrg fi 13962a51b5beSmrg ;; 1397e35d4d8eSmrg*-*solaris*) 1398e35d4d8eSmrg # Find out which ABI we are using. 1399e35d4d8eSmrg echo 'int i;' > conftest.$ac_ext 1400e35d4d8eSmrg if AC_TRY_EVAL(ac_compile); then 1401e35d4d8eSmrg case `/usr/bin/file conftest.o` in 1402e35d4d8eSmrg *64-bit*) 1403e35d4d8eSmrg case $lt_cv_prog_gnu_ld in 1404e35d4d8eSmrg yes*) 1405e35d4d8eSmrg case $host in 1406e35d4d8eSmrg i?86-*-solaris*) 1407e35d4d8eSmrg LD="${LD-ld} -m elf_x86_64" 1408e35d4d8eSmrg ;; 1409e35d4d8eSmrg sparc*-*-solaris*) 1410e35d4d8eSmrg LD="${LD-ld} -m elf64_sparc" 1411e35d4d8eSmrg ;; 1412e35d4d8eSmrg esac 1413e35d4d8eSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1414e35d4d8eSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1415e35d4d8eSmrg LD="${LD-ld}_sol2" 1416e35d4d8eSmrg fi 1417e35d4d8eSmrg ;; 1418e35d4d8eSmrg *) 1419e35d4d8eSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1420e35d4d8eSmrg LD="${LD-ld} -64" 1421e35d4d8eSmrg fi 1422e35d4d8eSmrg ;; 1423e35d4d8eSmrg esac 1424d31dbc53Smrg ;; 1425d31dbc53Smrg esac 1426d31dbc53Smrg fi 1427e35d4d8eSmrg rm -rf conftest* 1428d31dbc53Smrg ;; 1429e35d4d8eSmrgesac 143032b578d3Smrg 1431e35d4d8eSmrgneed_locks="$enable_libtool_lock" 1432e35d4d8eSmrg])# _LT_ENABLE_LOCK 143332b578d3Smrg 143432b578d3Smrg 1435e35d4d8eSmrg# _LT_PROG_AR 1436e35d4d8eSmrg# ----------- 1437e35d4d8eSmrgm4_defun([_LT_PROG_AR], 1438e35d4d8eSmrg[AC_CHECK_TOOLS(AR, [ar], false) 1439e35d4d8eSmrg: ${AR=ar} 1440e35d4d8eSmrg: ${AR_FLAGS=cru} 1441e35d4d8eSmrg_LT_DECL([], [AR], [1], [The archiver]) 1442e35d4d8eSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1443e35d4d8eSmrg 1444e35d4d8eSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1445e35d4d8eSmrg [lt_cv_ar_at_file=no 1446e35d4d8eSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1447e35d4d8eSmrg [echo conftest.$ac_objext > conftest.lst 1448e35d4d8eSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1449e35d4d8eSmrg AC_TRY_EVAL([lt_ar_try]) 1450e35d4d8eSmrg if test "$ac_status" -eq 0; then 1451e35d4d8eSmrg # Ensure the archiver fails upon bogus file names. 1452e35d4d8eSmrg rm -f conftest.$ac_objext libconftest.a 1453e35d4d8eSmrg AC_TRY_EVAL([lt_ar_try]) 1454e35d4d8eSmrg if test "$ac_status" -ne 0; then 1455e35d4d8eSmrg lt_cv_ar_at_file=@ 1456e35d4d8eSmrg fi 1457e35d4d8eSmrg fi 1458e35d4d8eSmrg rm -f conftest.* libconftest.a 1459e35d4d8eSmrg ]) 1460e35d4d8eSmrg ]) 146132b578d3Smrg 1462e35d4d8eSmrgif test "x$lt_cv_ar_at_file" = xno; then 1463e35d4d8eSmrg archiver_list_spec= 1464e35d4d8eSmrgelse 1465e35d4d8eSmrg archiver_list_spec=$lt_cv_ar_at_file 1466e35d4d8eSmrgfi 1467e35d4d8eSmrg_LT_DECL([], [archiver_list_spec], [1], 1468e35d4d8eSmrg [How to feed a file listing to the archiver]) 1469e35d4d8eSmrg])# _LT_PROG_AR 147032b578d3Smrg 147132b578d3Smrg 1472e35d4d8eSmrg# _LT_CMD_OLD_ARCHIVE 1473e35d4d8eSmrg# ------------------- 1474e35d4d8eSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1475e35d4d8eSmrg[_LT_PROG_AR 147632b578d3Smrg 1477e35d4d8eSmrgAC_CHECK_TOOL(STRIP, strip, :) 1478e35d4d8eSmrgtest -z "$STRIP" && STRIP=: 1479e35d4d8eSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1480d31dbc53Smrg 1481e35d4d8eSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1482e35d4d8eSmrgtest -z "$RANLIB" && RANLIB=: 1483e35d4d8eSmrg_LT_DECL([], [RANLIB], [1], 1484e35d4d8eSmrg [Commands used to install an old-style archive]) 1485d31dbc53Smrg 1486e35d4d8eSmrg# Determine commands to create old-style static archives. 1487e35d4d8eSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1488e35d4d8eSmrgold_postinstall_cmds='chmod 644 $oldlib' 1489e35d4d8eSmrgold_postuninstall_cmds= 14901b12faf6Smrg 1491e35d4d8eSmrgif test -n "$RANLIB"; then 1492e35d4d8eSmrg case $host_os in 1493e35d4d8eSmrg openbsd*) 1494e35d4d8eSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 149532b578d3Smrg ;; 1496e35d4d8eSmrg *) 1497e35d4d8eSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1498d31dbc53Smrg ;; 1499d31dbc53Smrg esac 1500e35d4d8eSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1501e35d4d8eSmrgfi 15022a51b5beSmrg 1503e35d4d8eSmrgcase $host_os in 1504e35d4d8eSmrg darwin*) 1505e35d4d8eSmrg lock_old_archive_extraction=yes ;; 1506e35d4d8eSmrg *) 1507e35d4d8eSmrg lock_old_archive_extraction=no ;; 15082a51b5beSmrgesac 1509e35d4d8eSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 1510e35d4d8eSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1511e35d4d8eSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 1512e35d4d8eSmrg [Commands used to build an old-style archive]) 1513e35d4d8eSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 1514e35d4d8eSmrg [Whether to use a lock for old archive extraction]) 1515e35d4d8eSmrg])# _LT_CMD_OLD_ARCHIVE 15161b12faf6Smrg 151732b578d3Smrg 1518e35d4d8eSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1519e35d4d8eSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1520e35d4d8eSmrg# ---------------------------------------------------------------- 1521e35d4d8eSmrg# Check whether the given compiler option works 1522e35d4d8eSmrgAC_DEFUN([_LT_COMPILER_OPTION], 1523e35d4d8eSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1524e35d4d8eSmrgm4_require([_LT_DECL_SED])dnl 1525e35d4d8eSmrgAC_CACHE_CHECK([$1], [$2], 1526e35d4d8eSmrg [$2=no 1527e35d4d8eSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1528e35d4d8eSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1529e35d4d8eSmrg lt_compiler_flag="$3" 1530e35d4d8eSmrg # Insert the option either (1) after the last *FLAGS variable, or 1531e35d4d8eSmrg # (2) before a word containing "conftest.", or (3) at the end. 1532e35d4d8eSmrg # Note that $ac_compile itself does not contain backslashes and begins 1533e35d4d8eSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1534e35d4d8eSmrg # The option is referenced via a variable to avoid confusing sed. 1535e35d4d8eSmrg lt_compile=`echo "$ac_compile" | $SED \ 1536e35d4d8eSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1537e35d4d8eSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1538e35d4d8eSmrg -e 's:$: $lt_compiler_flag:'` 1539e35d4d8eSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1540e35d4d8eSmrg (eval "$lt_compile" 2>conftest.err) 1541e35d4d8eSmrg ac_status=$? 1542e35d4d8eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1543e35d4d8eSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1544e35d4d8eSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 1545e35d4d8eSmrg # The compiler can only warn and ignore the option if not recognized 1546e35d4d8eSmrg # So say no if there are warnings other than the usual output. 1547e35d4d8eSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1548e35d4d8eSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1549e35d4d8eSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1550e35d4d8eSmrg $2=yes 1551e35d4d8eSmrg fi 1552e35d4d8eSmrg fi 1553e35d4d8eSmrg $RM conftest* 1554e35d4d8eSmrg]) 155532b578d3Smrg 1556e35d4d8eSmrgif test x"[$]$2" = xyes; then 1557e35d4d8eSmrg m4_if([$5], , :, [$5]) 15581b12faf6Smrgelse 1559e35d4d8eSmrg m4_if([$6], , :, [$6]) 15601b12faf6Smrgfi 1561e35d4d8eSmrg])# _LT_COMPILER_OPTION 156232b578d3Smrg 1563e35d4d8eSmrg# Old name: 1564e35d4d8eSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 15651b12faf6Smrgdnl aclocal-1.4 backwards compatibility: 1566e35d4d8eSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 156732b578d3Smrg 15681b12faf6Smrg 1569e35d4d8eSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1570e35d4d8eSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1571e35d4d8eSmrg# ---------------------------------------------------- 1572e35d4d8eSmrg# Check whether the given linker option works 1573e35d4d8eSmrgAC_DEFUN([_LT_LINKER_OPTION], 1574e35d4d8eSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1575e35d4d8eSmrgm4_require([_LT_DECL_SED])dnl 1576e35d4d8eSmrgAC_CACHE_CHECK([$1], [$2], 1577e35d4d8eSmrg [$2=no 1578e35d4d8eSmrg save_LDFLAGS="$LDFLAGS" 1579e35d4d8eSmrg LDFLAGS="$LDFLAGS $3" 1580e35d4d8eSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1581e35d4d8eSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1582e35d4d8eSmrg # The linker can only warn and ignore the option if not recognized 1583e35d4d8eSmrg # So say no if there are warnings 1584e35d4d8eSmrg if test -s conftest.err; then 1585e35d4d8eSmrg # Append any errors to the config.log. 1586e35d4d8eSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1587e35d4d8eSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1588e35d4d8eSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1589e35d4d8eSmrg if diff conftest.exp conftest.er2 >/dev/null; then 1590e35d4d8eSmrg $2=yes 1591e35d4d8eSmrg fi 1592e35d4d8eSmrg else 1593e35d4d8eSmrg $2=yes 1594e35d4d8eSmrg fi 1595e35d4d8eSmrg fi 1596e35d4d8eSmrg $RM -r conftest* 1597e35d4d8eSmrg LDFLAGS="$save_LDFLAGS" 1598e35d4d8eSmrg]) 1599e35d4d8eSmrg 1600e35d4d8eSmrgif test x"[$]$2" = xyes; then 1601e35d4d8eSmrg m4_if([$4], , :, [$4]) 1602e35d4d8eSmrgelse 1603e35d4d8eSmrg m4_if([$5], , :, [$5]) 1604e35d4d8eSmrgfi 1605e35d4d8eSmrg])# _LT_LINKER_OPTION 160632b578d3Smrg 16071b12faf6Smrg# Old name: 1608e35d4d8eSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16091b12faf6Smrgdnl aclocal-1.4 backwards compatibility: 1610e35d4d8eSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 161132b578d3Smrg 161232b578d3Smrg 1613e35d4d8eSmrg# LT_CMD_MAX_LEN 1614e35d4d8eSmrg#--------------- 1615e35d4d8eSmrgAC_DEFUN([LT_CMD_MAX_LEN], 16161b12faf6Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1617e35d4d8eSmrg# find the maximum length of command line arguments 1618e35d4d8eSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1619e35d4d8eSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1620e35d4d8eSmrg i=0 1621e35d4d8eSmrg teststring="ABCD" 162232b578d3Smrg 1623e35d4d8eSmrg case $build_os in 1624e35d4d8eSmrg msdosdjgpp*) 1625e35d4d8eSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1626e35d4d8eSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1627e35d4d8eSmrg # during glob expansion). Even if it were fixed, the result of this 1628e35d4d8eSmrg # check would be larger than it should be. 1629e35d4d8eSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1630e35d4d8eSmrg ;; 1631d31dbc53Smrg 1632e35d4d8eSmrg gnu*) 1633e35d4d8eSmrg # Under GNU Hurd, this test is not required because there is 1634e35d4d8eSmrg # no limit to the length of command line arguments. 1635e35d4d8eSmrg # Libtool will interpret -1 as no limit whatsoever 1636e35d4d8eSmrg lt_cv_sys_max_cmd_len=-1; 1637e35d4d8eSmrg ;; 16382a51b5beSmrg 1639e35d4d8eSmrg cygwin* | mingw* | cegcc*) 1640e35d4d8eSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1641e35d4d8eSmrg # about 5 minutes as the teststring grows exponentially. 1642e35d4d8eSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 1643e35d4d8eSmrg # you end up with a "frozen" computer, even though with patience 1644e35d4d8eSmrg # the test eventually succeeds (with a max line length of 256k). 1645e35d4d8eSmrg # Instead, let's just punt: use the minimum linelength reported by 1646e35d4d8eSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 1647e35d4d8eSmrg lt_cv_sys_max_cmd_len=8192; 1648e35d4d8eSmrg ;; 16492a51b5beSmrg 1650e35d4d8eSmrg mint*) 1651e35d4d8eSmrg # On MiNT this can take a long time and run out of memory. 1652e35d4d8eSmrg lt_cv_sys_max_cmd_len=8192; 1653e35d4d8eSmrg ;; 16542a51b5beSmrg 1655e35d4d8eSmrg amigaos*) 1656e35d4d8eSmrg # On AmigaOS with pdksh, this test takes hours, literally. 1657e35d4d8eSmrg # So we just punt and use a minimum line length of 8192. 1658e35d4d8eSmrg lt_cv_sys_max_cmd_len=8192; 1659e35d4d8eSmrg ;; 16602a51b5beSmrg 1661e35d4d8eSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1662e35d4d8eSmrg # This has been around since 386BSD, at least. Likely further. 1663e35d4d8eSmrg if test -x /sbin/sysctl; then 1664e35d4d8eSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1665e35d4d8eSmrg elif test -x /usr/sbin/sysctl; then 1666e35d4d8eSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1667e35d4d8eSmrg else 1668e35d4d8eSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1669e35d4d8eSmrg fi 1670e35d4d8eSmrg # And add a safety zone 1671e35d4d8eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1672e35d4d8eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1673e35d4d8eSmrg ;; 16742a51b5beSmrg 1675e35d4d8eSmrg interix*) 1676e35d4d8eSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1677e35d4d8eSmrg lt_cv_sys_max_cmd_len=196608 1678e35d4d8eSmrg ;; 16792a51b5beSmrg 1680e35d4d8eSmrg os2*) 1681e35d4d8eSmrg # The test takes a long time on OS/2. 1682e35d4d8eSmrg lt_cv_sys_max_cmd_len=8192 1683e35d4d8eSmrg ;; 168432b578d3Smrg 1685e35d4d8eSmrg osf*) 1686e35d4d8eSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1687e35d4d8eSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1688e35d4d8eSmrg # nice to cause kernel panics so lets avoid the loop below. 1689e35d4d8eSmrg # First set a reasonable default. 1690e35d4d8eSmrg lt_cv_sys_max_cmd_len=16384 1691e35d4d8eSmrg # 1692e35d4d8eSmrg if test -x /sbin/sysconfig; then 1693e35d4d8eSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1694e35d4d8eSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1695e35d4d8eSmrg esac 1696e35d4d8eSmrg fi 1697e35d4d8eSmrg ;; 1698e35d4d8eSmrg sco3.2v5*) 1699e35d4d8eSmrg lt_cv_sys_max_cmd_len=102400 1700e35d4d8eSmrg ;; 1701e35d4d8eSmrg sysv5* | sco5v6* | sysv4.2uw2*) 1702e35d4d8eSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1703e35d4d8eSmrg if test -n "$kargmax"; then 1704e35d4d8eSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1705e35d4d8eSmrg else 1706e35d4d8eSmrg lt_cv_sys_max_cmd_len=32768 1707e35d4d8eSmrg fi 1708e35d4d8eSmrg ;; 1709e35d4d8eSmrg *) 1710e35d4d8eSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1711e35d4d8eSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 1712e35d4d8eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1713e35d4d8eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1714e35d4d8eSmrg else 1715e35d4d8eSmrg # Make teststring a little bigger before we do anything with it. 1716e35d4d8eSmrg # a 1K string should be a reasonable start. 1717e35d4d8eSmrg for i in 1 2 3 4 5 6 7 8 ; do 1718e35d4d8eSmrg teststring=$teststring$teststring 1719e35d4d8eSmrg done 1720e35d4d8eSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1721e35d4d8eSmrg # If test is not a shell built-in, we'll probably end up computing a 1722e35d4d8eSmrg # maximum length that is only half of the actual maximum length, but 1723e35d4d8eSmrg # we can't tell. 1724e35d4d8eSmrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 1725e35d4d8eSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1726e35d4d8eSmrg test $i != 17 # 1/2 MB should be enough 1727e35d4d8eSmrg do 1728e35d4d8eSmrg i=`expr $i + 1` 1729e35d4d8eSmrg teststring=$teststring$teststring 1730e35d4d8eSmrg done 1731e35d4d8eSmrg # Only check the string length outside the loop. 1732e35d4d8eSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1733e35d4d8eSmrg teststring= 1734e35d4d8eSmrg # Add a significant safety factor because C++ compilers can tack on 1735e35d4d8eSmrg # massive amounts of additional arguments before passing them to the 1736e35d4d8eSmrg # linker. It appears as though 1/2 is a usable value. 1737e35d4d8eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1738e35d4d8eSmrg fi 1739e35d4d8eSmrg ;; 1740e35d4d8eSmrg esac 1741e35d4d8eSmrg]) 1742e35d4d8eSmrgif test -n $lt_cv_sys_max_cmd_len ; then 1743e35d4d8eSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1744e35d4d8eSmrgelse 1745e35d4d8eSmrg AC_MSG_RESULT(none) 1746e35d4d8eSmrgfi 1747e35d4d8eSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1748e35d4d8eSmrg_LT_DECL([], [max_cmd_len], [0], 1749e35d4d8eSmrg [What is the maximum length of a command?]) 1750e35d4d8eSmrg])# LT_CMD_MAX_LEN 175132b578d3Smrg 1752e35d4d8eSmrg# Old name: 1753e35d4d8eSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1754e35d4d8eSmrgdnl aclocal-1.4 backwards compatibility: 1755e35d4d8eSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 175632b578d3Smrg 1757d31dbc53Smrg 1758e35d4d8eSmrg# _LT_HEADER_DLFCN 1759e35d4d8eSmrg# ---------------- 1760e35d4d8eSmrgm4_defun([_LT_HEADER_DLFCN], 1761e35d4d8eSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1762e35d4d8eSmrg])# _LT_HEADER_DLFCN 1763d31dbc53Smrg 17642a51b5beSmrg 1765e35d4d8eSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1766e35d4d8eSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1767e35d4d8eSmrg# ---------------------------------------------------------------- 1768e35d4d8eSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 1769e35d4d8eSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1770e35d4d8eSmrgif test "$cross_compiling" = yes; then : 1771e35d4d8eSmrg [$4] 1772e35d4d8eSmrgelse 1773e35d4d8eSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1774e35d4d8eSmrg lt_status=$lt_dlunknown 1775e35d4d8eSmrg cat > conftest.$ac_ext <<_LT_EOF 1776e35d4d8eSmrg[#line $LINENO "configure" 1777e35d4d8eSmrg#include "confdefs.h" 1778e35d4d8eSmrg 1779e35d4d8eSmrg#if HAVE_DLFCN_H 1780e35d4d8eSmrg#include <dlfcn.h> 17811b12faf6Smrg#endif 17822a51b5beSmrg 1783e35d4d8eSmrg#include <stdio.h> 1784e35d4d8eSmrg 1785e35d4d8eSmrg#ifdef RTLD_GLOBAL 1786e35d4d8eSmrg# define LT_DLGLOBAL RTLD_GLOBAL 1787e35d4d8eSmrg#else 1788e35d4d8eSmrg# ifdef DL_GLOBAL 1789e35d4d8eSmrg# define LT_DLGLOBAL DL_GLOBAL 1790e35d4d8eSmrg# else 1791e35d4d8eSmrg# define LT_DLGLOBAL 0 1792e35d4d8eSmrg# endif 17931b12faf6Smrg#endif 1794e35d4d8eSmrg 1795e35d4d8eSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1796e35d4d8eSmrg find out it does not work in some platform. */ 1797e35d4d8eSmrg#ifndef LT_DLLAZY_OR_NOW 1798e35d4d8eSmrg# ifdef RTLD_LAZY 1799e35d4d8eSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1800e35d4d8eSmrg# else 1801e35d4d8eSmrg# ifdef DL_LAZY 1802e35d4d8eSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 1803e35d4d8eSmrg# else 1804e35d4d8eSmrg# ifdef RTLD_NOW 1805e35d4d8eSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1806e35d4d8eSmrg# else 1807e35d4d8eSmrg# ifdef DL_NOW 1808e35d4d8eSmrg# define LT_DLLAZY_OR_NOW DL_NOW 1809e35d4d8eSmrg# else 1810e35d4d8eSmrg# define LT_DLLAZY_OR_NOW 0 1811e35d4d8eSmrg# endif 1812e35d4d8eSmrg# endif 1813e35d4d8eSmrg# endif 1814e35d4d8eSmrg# endif 1815e35d4d8eSmrg#endif 1816e35d4d8eSmrg 1817e35d4d8eSmrg/* When -fvisbility=hidden is used, assume the code has been annotated 1818e35d4d8eSmrg correspondingly for the symbols needed. */ 1819e35d4d8eSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1820e35d4d8eSmrgint fnord () __attribute__((visibility("default"))); 1821e35d4d8eSmrg#endif 1822e35d4d8eSmrg 1823e35d4d8eSmrgint fnord () { return 42; } 1824e35d4d8eSmrgint main () 1825e35d4d8eSmrg{ 1826e35d4d8eSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1827e35d4d8eSmrg int status = $lt_dlunknown; 1828e35d4d8eSmrg 1829e35d4d8eSmrg if (self) 1830e35d4d8eSmrg { 1831e35d4d8eSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 18321b12faf6Smrg else 1833e35d4d8eSmrg { 1834e35d4d8eSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1835e35d4d8eSmrg else puts (dlerror ()); 1836e35d4d8eSmrg } 1837e35d4d8eSmrg /* dlclose (self); */ 1838e35d4d8eSmrg } 18392a51b5beSmrg else 1840e35d4d8eSmrg puts (dlerror ()); 184132b578d3Smrg 1842e35d4d8eSmrg return status; 1843e35d4d8eSmrg}] 1844e35d4d8eSmrg_LT_EOF 1845e35d4d8eSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1846e35d4d8eSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1847e35d4d8eSmrg lt_status=$? 1848e35d4d8eSmrg case x$lt_status in 1849e35d4d8eSmrg x$lt_dlno_uscore) $1 ;; 1850e35d4d8eSmrg x$lt_dlneed_uscore) $2 ;; 1851e35d4d8eSmrg x$lt_dlunknown|x*) $3 ;; 1852e35d4d8eSmrg esac 1853e35d4d8eSmrg else : 1854e35d4d8eSmrg # compilation failed 1855e35d4d8eSmrg $3 18561b12faf6Smrg fi 18572a51b5beSmrgfi 1858e35d4d8eSmrgrm -fr conftest* 1859e35d4d8eSmrg])# _LT_TRY_DLOPEN_SELF 186032b578d3Smrg 186132b578d3Smrg 1862e35d4d8eSmrg# LT_SYS_DLOPEN_SELF 1863e35d4d8eSmrg# ------------------ 1864e35d4d8eSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1865e35d4d8eSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1866e35d4d8eSmrgif test "x$enable_dlopen" != xyes; then 1867e35d4d8eSmrg enable_dlopen=unknown 1868e35d4d8eSmrg enable_dlopen_self=unknown 1869e35d4d8eSmrg enable_dlopen_self_static=unknown 1870e35d4d8eSmrgelse 1871e35d4d8eSmrg lt_cv_dlopen=no 1872e35d4d8eSmrg lt_cv_dlopen_libs= 187332b578d3Smrg 1874e35d4d8eSmrg case $host_os in 1875e35d4d8eSmrg beos*) 1876e35d4d8eSmrg lt_cv_dlopen="load_add_on" 1877e35d4d8eSmrg lt_cv_dlopen_libs= 1878e35d4d8eSmrg lt_cv_dlopen_self=yes 1879e35d4d8eSmrg ;; 188032b578d3Smrg 1881e35d4d8eSmrg mingw* | pw32* | cegcc*) 1882e35d4d8eSmrg lt_cv_dlopen="LoadLibrary" 1883e35d4d8eSmrg lt_cv_dlopen_libs= 1884e35d4d8eSmrg ;; 1885e35d4d8eSmrg 1886e35d4d8eSmrg cygwin*) 1887e35d4d8eSmrg lt_cv_dlopen="dlopen" 1888e35d4d8eSmrg lt_cv_dlopen_libs= 1889e35d4d8eSmrg ;; 1890e35d4d8eSmrg 1891e35d4d8eSmrg darwin*) 1892e35d4d8eSmrg # if libdl is installed we need to link against it 1893e35d4d8eSmrg AC_CHECK_LIB([dl], [dlopen], 1894e35d4d8eSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1895e35d4d8eSmrg lt_cv_dlopen="dyld" 1896e35d4d8eSmrg lt_cv_dlopen_libs= 1897e35d4d8eSmrg lt_cv_dlopen_self=yes 1898e35d4d8eSmrg ]) 1899e35d4d8eSmrg ;; 1900e35d4d8eSmrg 1901e35d4d8eSmrg *) 1902e35d4d8eSmrg AC_CHECK_FUNC([shl_load], 1903e35d4d8eSmrg [lt_cv_dlopen="shl_load"], 1904e35d4d8eSmrg [AC_CHECK_LIB([dld], [shl_load], 1905e35d4d8eSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1906e35d4d8eSmrg [AC_CHECK_FUNC([dlopen], 1907e35d4d8eSmrg [lt_cv_dlopen="dlopen"], 1908e35d4d8eSmrg [AC_CHECK_LIB([dl], [dlopen], 1909e35d4d8eSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1910e35d4d8eSmrg [AC_CHECK_LIB([svld], [dlopen], 1911e35d4d8eSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1912e35d4d8eSmrg [AC_CHECK_LIB([dld], [dld_link], 1913e35d4d8eSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1914e35d4d8eSmrg ]) 1915e35d4d8eSmrg ]) 1916e35d4d8eSmrg ]) 1917e35d4d8eSmrg ]) 1918e35d4d8eSmrg ]) 1919e35d4d8eSmrg ;; 1920e35d4d8eSmrg esac 1921e35d4d8eSmrg 1922e35d4d8eSmrg if test "x$lt_cv_dlopen" != xno; then 1923e35d4d8eSmrg enable_dlopen=yes 1924e35d4d8eSmrg else 1925e35d4d8eSmrg enable_dlopen=no 1926e35d4d8eSmrg fi 1927e35d4d8eSmrg 1928e35d4d8eSmrg case $lt_cv_dlopen in 1929e35d4d8eSmrg dlopen) 1930e35d4d8eSmrg save_CPPFLAGS="$CPPFLAGS" 1931e35d4d8eSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1932e35d4d8eSmrg 1933e35d4d8eSmrg save_LDFLAGS="$LDFLAGS" 1934e35d4d8eSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1935e35d4d8eSmrg 1936e35d4d8eSmrg save_LIBS="$LIBS" 1937e35d4d8eSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 1938e35d4d8eSmrg 1939e35d4d8eSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 1940e35d4d8eSmrg lt_cv_dlopen_self, [dnl 1941e35d4d8eSmrg _LT_TRY_DLOPEN_SELF( 1942e35d4d8eSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1943e35d4d8eSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1944e35d4d8eSmrg ]) 1945e35d4d8eSmrg 1946e35d4d8eSmrg if test "x$lt_cv_dlopen_self" = xyes; then 1947e35d4d8eSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1948e35d4d8eSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1949e35d4d8eSmrg lt_cv_dlopen_self_static, [dnl 1950e35d4d8eSmrg _LT_TRY_DLOPEN_SELF( 1951e35d4d8eSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1952e35d4d8eSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1953e35d4d8eSmrg ]) 1954e35d4d8eSmrg fi 1955e35d4d8eSmrg 1956e35d4d8eSmrg CPPFLAGS="$save_CPPFLAGS" 1957e35d4d8eSmrg LDFLAGS="$save_LDFLAGS" 1958e35d4d8eSmrg LIBS="$save_LIBS" 1959e35d4d8eSmrg ;; 1960e35d4d8eSmrg esac 1961e35d4d8eSmrg 1962e35d4d8eSmrg case $lt_cv_dlopen_self in 1963e35d4d8eSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1964e35d4d8eSmrg *) enable_dlopen_self=unknown ;; 1965e35d4d8eSmrg esac 1966e35d4d8eSmrg 1967e35d4d8eSmrg case $lt_cv_dlopen_self_static in 1968e35d4d8eSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1969e35d4d8eSmrg *) enable_dlopen_self_static=unknown ;; 1970e35d4d8eSmrg esac 1971e35d4d8eSmrgfi 1972e35d4d8eSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1973e35d4d8eSmrg [Whether dlopen is supported]) 1974e35d4d8eSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1975e35d4d8eSmrg [Whether dlopen of programs is supported]) 1976e35d4d8eSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1977e35d4d8eSmrg [Whether dlopen of statically linked programs is supported]) 1978e35d4d8eSmrg])# LT_SYS_DLOPEN_SELF 1979e35d4d8eSmrg 1980e35d4d8eSmrg# Old name: 1981e35d4d8eSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1982e35d4d8eSmrgdnl aclocal-1.4 backwards compatibility: 1983e35d4d8eSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1984e35d4d8eSmrg 1985e35d4d8eSmrg 1986e35d4d8eSmrg# _LT_COMPILER_C_O([TAGNAME]) 1987e35d4d8eSmrg# --------------------------- 1988e35d4d8eSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 1989e35d4d8eSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1990e35d4d8eSmrgm4_defun([_LT_COMPILER_C_O], 1991e35d4d8eSmrg[m4_require([_LT_DECL_SED])dnl 1992e35d4d8eSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1993e35d4d8eSmrgm4_require([_LT_TAG_COMPILER])dnl 1994e35d4d8eSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1995e35d4d8eSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1996e35d4d8eSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1997e35d4d8eSmrg $RM -r conftest 2>/dev/null 1998e35d4d8eSmrg mkdir conftest 1999e35d4d8eSmrg cd conftest 2000e35d4d8eSmrg mkdir out 2001e35d4d8eSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2002e35d4d8eSmrg 2003e35d4d8eSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 2004e35d4d8eSmrg # Insert the option either (1) after the last *FLAGS variable, or 2005e35d4d8eSmrg # (2) before a word containing "conftest.", or (3) at the end. 2006e35d4d8eSmrg # Note that $ac_compile itself does not contain backslashes and begins 2007e35d4d8eSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2008e35d4d8eSmrg lt_compile=`echo "$ac_compile" | $SED \ 2009e35d4d8eSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2010e35d4d8eSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2011e35d4d8eSmrg -e 's:$: $lt_compiler_flag:'` 2012e35d4d8eSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2013e35d4d8eSmrg (eval "$lt_compile" 2>out/conftest.err) 2014e35d4d8eSmrg ac_status=$? 2015e35d4d8eSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2016e35d4d8eSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2017e35d4d8eSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2018e35d4d8eSmrg then 2019e35d4d8eSmrg # The compiler can only warn and ignore the option if not recognized 2020e35d4d8eSmrg # So say no if there are warnings 2021e35d4d8eSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2022e35d4d8eSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2023e35d4d8eSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2024e35d4d8eSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2025e35d4d8eSmrg fi 2026e35d4d8eSmrg fi 2027e35d4d8eSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2028e35d4d8eSmrg $RM conftest* 2029e35d4d8eSmrg # SGI C++ compiler will create directory out/ii_files/ for 2030e35d4d8eSmrg # template instantiation 2031e35d4d8eSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2032e35d4d8eSmrg $RM out/* && rmdir out 2033e35d4d8eSmrg cd .. 2034e35d4d8eSmrg $RM -r conftest 2035e35d4d8eSmrg $RM conftest* 2036e35d4d8eSmrg]) 2037e35d4d8eSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2038e35d4d8eSmrg [Does compiler simultaneously support -c and -o options?]) 2039e35d4d8eSmrg])# _LT_COMPILER_C_O 2040e35d4d8eSmrg 2041e35d4d8eSmrg 2042e35d4d8eSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2043e35d4d8eSmrg# ---------------------------------- 2044e35d4d8eSmrg# Check to see if we can do hard links to lock some files if needed 2045e35d4d8eSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2046e35d4d8eSmrg[m4_require([_LT_ENABLE_LOCK])dnl 2047e35d4d8eSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2048e35d4d8eSmrg_LT_COMPILER_C_O([$1]) 2049e35d4d8eSmrg 2050e35d4d8eSmrghard_links="nottested" 2051e35d4d8eSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 2052e35d4d8eSmrg # do not overwrite the value of need_locks provided by the user 2053e35d4d8eSmrg AC_MSG_CHECKING([if we can lock with hard links]) 2054e35d4d8eSmrg hard_links=yes 2055e35d4d8eSmrg $RM conftest* 2056e35d4d8eSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2057e35d4d8eSmrg touch conftest.a 2058e35d4d8eSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 2059e35d4d8eSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2060e35d4d8eSmrg AC_MSG_RESULT([$hard_links]) 2061e35d4d8eSmrg if test "$hard_links" = no; then 2062e35d4d8eSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 2063e35d4d8eSmrg need_locks=warn 2064e35d4d8eSmrg fi 2065e35d4d8eSmrgelse 2066e35d4d8eSmrg need_locks=no 2067e35d4d8eSmrgfi 2068e35d4d8eSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2069e35d4d8eSmrg])# _LT_COMPILER_FILE_LOCKS 2070e35d4d8eSmrg 2071e35d4d8eSmrg 2072e35d4d8eSmrg# _LT_CHECK_OBJDIR 2073e35d4d8eSmrg# ---------------- 2074e35d4d8eSmrgm4_defun([_LT_CHECK_OBJDIR], 2075e35d4d8eSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2076e35d4d8eSmrg[rm -f .libs 2>/dev/null 2077e35d4d8eSmrgmkdir .libs 2>/dev/null 2078e35d4d8eSmrgif test -d .libs; then 2079e35d4d8eSmrg lt_cv_objdir=.libs 2080e35d4d8eSmrgelse 2081e35d4d8eSmrg # MS-DOS does not allow filenames that begin with a dot. 2082e35d4d8eSmrg lt_cv_objdir=_libs 2083e35d4d8eSmrgfi 2084e35d4d8eSmrgrmdir .libs 2>/dev/null]) 2085e35d4d8eSmrgobjdir=$lt_cv_objdir 2086e35d4d8eSmrg_LT_DECL([], [objdir], [0], 2087e35d4d8eSmrg [The name of the directory that contains temporary libtool files])dnl 2088e35d4d8eSmrgm4_pattern_allow([LT_OBJDIR])dnl 2089e35d4d8eSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 2090e35d4d8eSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 2091e35d4d8eSmrg])# _LT_CHECK_OBJDIR 2092e35d4d8eSmrg 2093e35d4d8eSmrg 2094e35d4d8eSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2095e35d4d8eSmrg# -------------------------------------- 2096e35d4d8eSmrg# Check hardcoding attributes. 2097e35d4d8eSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2098e35d4d8eSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2099e35d4d8eSmrg_LT_TAGVAR(hardcode_action, $1)= 2100e35d4d8eSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2101e35d4d8eSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2102e35d4d8eSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2103e35d4d8eSmrg 2104e35d4d8eSmrg # We can hardcode non-existent directories. 2105e35d4d8eSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 2106e35d4d8eSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2107e35d4d8eSmrg # have to relink, otherwise we might link with an installed library 2108e35d4d8eSmrg # when we should be linking with a yet-to-be-installed one 2109e35d4d8eSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2110e35d4d8eSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 2111e35d4d8eSmrg # Linking always hardcodes the temporary library directory. 2112e35d4d8eSmrg _LT_TAGVAR(hardcode_action, $1)=relink 2113e35d4d8eSmrg else 2114e35d4d8eSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2115e35d4d8eSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 2116e35d4d8eSmrg fi 2117e35d4d8eSmrgelse 2118e35d4d8eSmrg # We cannot hardcode anything, or else we can only hardcode existing 2119e35d4d8eSmrg # directories. 2120e35d4d8eSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 2121e35d4d8eSmrgfi 2122e35d4d8eSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2123e35d4d8eSmrg 2124e35d4d8eSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2125e35d4d8eSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2126e35d4d8eSmrg # Fast installation is not supported 2127e35d4d8eSmrg enable_fast_install=no 2128e35d4d8eSmrgelif test "$shlibpath_overrides_runpath" = yes || 2129e35d4d8eSmrg test "$enable_shared" = no; then 2130e35d4d8eSmrg # Fast installation is not necessary 2131e35d4d8eSmrg enable_fast_install=needless 2132e35d4d8eSmrgfi 2133e35d4d8eSmrg_LT_TAGDECL([], [hardcode_action], [0], 2134e35d4d8eSmrg [How to hardcode a shared library path into an executable]) 2135e35d4d8eSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2136e35d4d8eSmrg 2137e35d4d8eSmrg 2138e35d4d8eSmrg# _LT_CMD_STRIPLIB 2139e35d4d8eSmrg# ---------------- 2140e35d4d8eSmrgm4_defun([_LT_CMD_STRIPLIB], 2141e35d4d8eSmrg[m4_require([_LT_DECL_EGREP]) 2142e35d4d8eSmrgstriplib= 2143e35d4d8eSmrgold_striplib= 2144e35d4d8eSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2145e35d4d8eSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2146e35d4d8eSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2147e35d4d8eSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2148e35d4d8eSmrg AC_MSG_RESULT([yes]) 2149e35d4d8eSmrgelse 2150e35d4d8eSmrg# FIXME - insert some real tests, host_os isn't really good enough 2151e35d4d8eSmrg case $host_os in 2152e35d4d8eSmrg darwin*) 2153e35d4d8eSmrg if test -n "$STRIP" ; then 2154e35d4d8eSmrg striplib="$STRIP -x" 2155e35d4d8eSmrg old_striplib="$STRIP -S" 2156e35d4d8eSmrg AC_MSG_RESULT([yes]) 2157e35d4d8eSmrg else 2158e35d4d8eSmrg AC_MSG_RESULT([no]) 2159e35d4d8eSmrg fi 2160e35d4d8eSmrg ;; 2161e35d4d8eSmrg *) 2162e35d4d8eSmrg AC_MSG_RESULT([no]) 2163e35d4d8eSmrg ;; 2164e35d4d8eSmrg esac 2165e35d4d8eSmrgfi 2166e35d4d8eSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2167e35d4d8eSmrg_LT_DECL([], [striplib], [1]) 2168e35d4d8eSmrg])# _LT_CMD_STRIPLIB 2169e35d4d8eSmrg 2170e35d4d8eSmrg 2171e35d4d8eSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2172e35d4d8eSmrg# ----------------------------- 2173e35d4d8eSmrg# PORTME Fill in your ld.so characteristics 2174e35d4d8eSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2175e35d4d8eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2176e35d4d8eSmrgm4_require([_LT_DECL_EGREP])dnl 2177e35d4d8eSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2178e35d4d8eSmrgm4_require([_LT_DECL_OBJDUMP])dnl 2179e35d4d8eSmrgm4_require([_LT_DECL_SED])dnl 2180e35d4d8eSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2181e35d4d8eSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2182e35d4d8eSmrgm4_if([$1], 2183e35d4d8eSmrg [], [ 2184e35d4d8eSmrgif test "$GCC" = yes; then 2185e35d4d8eSmrg case $host_os in 2186e35d4d8eSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2187e35d4d8eSmrg *) lt_awk_arg="/^libraries:/" ;; 2188e35d4d8eSmrg esac 2189e35d4d8eSmrg case $host_os in 2190e35d4d8eSmrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2191e35d4d8eSmrg *) lt_sed_strip_eq="s,=/,/,g" ;; 2192e35d4d8eSmrg esac 2193e35d4d8eSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2194e35d4d8eSmrg case $lt_search_path_spec in 2195e35d4d8eSmrg *\;*) 2196e35d4d8eSmrg # if the path contains ";" then we assume it to be the separator 2197e35d4d8eSmrg # otherwise default to the standard path separator (i.e. ":") - it is 2198e35d4d8eSmrg # assumed that no part of a normal pathname contains ";" but that should 2199e35d4d8eSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2200e35d4d8eSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2201e35d4d8eSmrg ;; 2202e35d4d8eSmrg *) 2203e35d4d8eSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2204e35d4d8eSmrg ;; 2205e35d4d8eSmrg esac 2206e35d4d8eSmrg # Ok, now we have the path, separated by spaces, we can step through it 2207e35d4d8eSmrg # and add multilib dir if necessary. 2208e35d4d8eSmrg lt_tmp_lt_search_path_spec= 2209e35d4d8eSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2210e35d4d8eSmrg for lt_sys_path in $lt_search_path_spec; do 2211e35d4d8eSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2212e35d4d8eSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2213e35d4d8eSmrg else 2214e35d4d8eSmrg test -d "$lt_sys_path" && \ 2215e35d4d8eSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2216e35d4d8eSmrg fi 2217e35d4d8eSmrg done 2218e35d4d8eSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2219e35d4d8eSmrgBEGIN {RS=" "; FS="/|\n";} { 2220e35d4d8eSmrg lt_foo=""; 2221e35d4d8eSmrg lt_count=0; 2222e35d4d8eSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 2223e35d4d8eSmrg if ($lt_i != "" && $lt_i != ".") { 2224e35d4d8eSmrg if ($lt_i == "..") { 2225e35d4d8eSmrg lt_count++; 2226e35d4d8eSmrg } else { 2227e35d4d8eSmrg if (lt_count == 0) { 2228e35d4d8eSmrg lt_foo="/" $lt_i lt_foo; 2229e35d4d8eSmrg } else { 2230e35d4d8eSmrg lt_count--; 2231e35d4d8eSmrg } 2232e35d4d8eSmrg } 2233e35d4d8eSmrg } 2234e35d4d8eSmrg } 2235e35d4d8eSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2236e35d4d8eSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2237e35d4d8eSmrg}'` 2238e35d4d8eSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 2239e35d4d8eSmrg # for these hosts. 2240e35d4d8eSmrg case $host_os in 2241e35d4d8eSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2242e35d4d8eSmrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2243e35d4d8eSmrg esac 2244e35d4d8eSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2245e35d4d8eSmrgelse 2246e35d4d8eSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2247e35d4d8eSmrgfi]) 2248e35d4d8eSmrglibrary_names_spec= 2249e35d4d8eSmrglibname_spec='lib$name' 2250e35d4d8eSmrgsoname_spec= 2251e35d4d8eSmrgshrext_cmds=".so" 2252e35d4d8eSmrgpostinstall_cmds= 2253e35d4d8eSmrgpostuninstall_cmds= 2254e35d4d8eSmrgfinish_cmds= 2255e35d4d8eSmrgfinish_eval= 2256e35d4d8eSmrgshlibpath_var= 2257e35d4d8eSmrgshlibpath_overrides_runpath=unknown 2258e35d4d8eSmrgversion_type=none 2259e35d4d8eSmrgdynamic_linker="$host_os ld.so" 2260e35d4d8eSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2261e35d4d8eSmrgneed_lib_prefix=unknown 2262e35d4d8eSmrghardcode_into_libs=no 2263e35d4d8eSmrg 2264e35d4d8eSmrg# when you set need_version to no, make sure it does not cause -set_version 2265e35d4d8eSmrg# flags to be left without arguments 2266e35d4d8eSmrgneed_version=unknown 2267e35d4d8eSmrg 2268e35d4d8eSmrgcase $host_os in 2269e35d4d8eSmrgaix3*) 2270e35d4d8eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2271e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2272e35d4d8eSmrg shlibpath_var=LIBPATH 2273e35d4d8eSmrg 2274e35d4d8eSmrg # AIX 3 has no versioning support, so we append a major version to the name. 2275e35d4d8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2276e35d4d8eSmrg ;; 2277e35d4d8eSmrg 2278e35d4d8eSmrgaix[[4-9]]*) 2279e35d4d8eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2280e35d4d8eSmrg need_lib_prefix=no 2281e35d4d8eSmrg need_version=no 2282e35d4d8eSmrg hardcode_into_libs=yes 2283e35d4d8eSmrg if test "$host_cpu" = ia64; then 2284e35d4d8eSmrg # AIX 5 supports IA64 2285e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2286e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2287e35d4d8eSmrg else 2288e35d4d8eSmrg # With GCC up to 2.95.x, collect2 would create an import file 2289e35d4d8eSmrg # for dependence libraries. The import file would start with 2290e35d4d8eSmrg # the line `#! .'. This would cause the generated library to 2291e35d4d8eSmrg # depend on `.', always an invalid library. This was fixed in 2292e35d4d8eSmrg # development snapshots of GCC prior to 3.0. 2293e35d4d8eSmrg case $host_os in 2294e35d4d8eSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2295e35d4d8eSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2296e35d4d8eSmrg echo ' yes ' 2297e35d4d8eSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2298e35d4d8eSmrg : 2299e35d4d8eSmrg else 2300e35d4d8eSmrg can_build_shared=no 2301e35d4d8eSmrg fi 2302e35d4d8eSmrg ;; 2303e35d4d8eSmrg esac 2304e35d4d8eSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2305e35d4d8eSmrg # soname into executable. Probably we can add versioning support to 2306e35d4d8eSmrg # collect2, so additional links can be useful in future. 2307e35d4d8eSmrg if test "$aix_use_runtimelinking" = yes; then 2308e35d4d8eSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2309e35d4d8eSmrg # instead of lib<name>.a to let people know that these are not 2310e35d4d8eSmrg # typical AIX shared libraries. 2311e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2312e35d4d8eSmrg else 2313e35d4d8eSmrg # We preserve .a as extension for shared libraries through AIX4.2 2314e35d4d8eSmrg # and later when we are not doing run time linking. 2315e35d4d8eSmrg library_names_spec='${libname}${release}.a $libname.a' 2316e35d4d8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2317e35d4d8eSmrg fi 2318e35d4d8eSmrg shlibpath_var=LIBPATH 2319e35d4d8eSmrg fi 2320e35d4d8eSmrg ;; 2321e35d4d8eSmrg 2322e35d4d8eSmrgamigaos*) 2323e35d4d8eSmrg case $host_cpu in 2324e35d4d8eSmrg powerpc) 2325e35d4d8eSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2326e35d4d8eSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2327e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2328e35d4d8eSmrg ;; 2329e35d4d8eSmrg m68k) 2330e35d4d8eSmrg library_names_spec='$libname.ixlibrary $libname.a' 2331e35d4d8eSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2332e35d4d8eSmrg 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' 2333e35d4d8eSmrg ;; 2334e35d4d8eSmrg esac 2335e35d4d8eSmrg ;; 2336e35d4d8eSmrg 2337e35d4d8eSmrgbeos*) 2338e35d4d8eSmrg library_names_spec='${libname}${shared_ext}' 2339e35d4d8eSmrg dynamic_linker="$host_os ld.so" 2340e35d4d8eSmrg shlibpath_var=LIBRARY_PATH 2341e35d4d8eSmrg ;; 2342e35d4d8eSmrg 2343e35d4d8eSmrgbsdi[[45]]*) 2344e35d4d8eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2345e35d4d8eSmrg need_version=no 2346e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2347e35d4d8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2348e35d4d8eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2349e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2350e35d4d8eSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2351e35d4d8eSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2352e35d4d8eSmrg # the default ld.so.conf also contains /usr/contrib/lib and 2353e35d4d8eSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2354e35d4d8eSmrg # libtool to hard-code these into programs 2355e35d4d8eSmrg ;; 2356e35d4d8eSmrg 2357e35d4d8eSmrgcygwin* | mingw* | pw32* | cegcc*) 2358e35d4d8eSmrg version_type=windows 2359e35d4d8eSmrg shrext_cmds=".dll" 2360e35d4d8eSmrg need_version=no 2361e35d4d8eSmrg need_lib_prefix=no 2362e35d4d8eSmrg 2363e35d4d8eSmrg case $GCC,$cc_basename in 2364e35d4d8eSmrg yes,*) 2365e35d4d8eSmrg # gcc 2366e35d4d8eSmrg library_names_spec='$libname.dll.a' 2367e35d4d8eSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2368e35d4d8eSmrg postinstall_cmds='base_file=`basename \${file}`~ 2369e35d4d8eSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2370e35d4d8eSmrg dldir=$destdir/`dirname \$dlpath`~ 2371e35d4d8eSmrg test -d \$dldir || mkdir -p \$dldir~ 2372e35d4d8eSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2373e35d4d8eSmrg chmod a+x \$dldir/$dlname~ 2374e35d4d8eSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2375e35d4d8eSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2376e35d4d8eSmrg fi' 2377e35d4d8eSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2378e35d4d8eSmrg dlpath=$dir/\$dldll~ 2379e35d4d8eSmrg $RM \$dlpath' 2380e35d4d8eSmrg shlibpath_overrides_runpath=yes 2381e35d4d8eSmrg 2382e35d4d8eSmrg case $host_os in 2383e35d4d8eSmrg cygwin*) 2384e35d4d8eSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2385e35d4d8eSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2386e35d4d8eSmrgm4_if([$1], [],[ 2387e35d4d8eSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2388e35d4d8eSmrg ;; 2389e35d4d8eSmrg mingw* | cegcc*) 2390e35d4d8eSmrg # MinGW DLLs use traditional 'lib' prefix 2391e35d4d8eSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2392e35d4d8eSmrg ;; 2393e35d4d8eSmrg pw32*) 2394e35d4d8eSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2395e35d4d8eSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2396e35d4d8eSmrg ;; 2397e35d4d8eSmrg esac 2398e35d4d8eSmrg dynamic_linker='Win32 ld.exe' 2399e35d4d8eSmrg ;; 2400e35d4d8eSmrg 2401e35d4d8eSmrg *,cl*) 2402e35d4d8eSmrg # Native MSVC 2403e35d4d8eSmrg libname_spec='$name' 2404e35d4d8eSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2405e35d4d8eSmrg library_names_spec='${libname}.dll.lib' 2406e35d4d8eSmrg 2407e35d4d8eSmrg case $build_os in 2408e35d4d8eSmrg mingw*) 2409e35d4d8eSmrg sys_lib_search_path_spec= 2410e35d4d8eSmrg lt_save_ifs=$IFS 2411e35d4d8eSmrg IFS=';' 2412e35d4d8eSmrg for lt_path in $LIB 2413e35d4d8eSmrg do 2414e35d4d8eSmrg IFS=$lt_save_ifs 2415e35d4d8eSmrg # Let DOS variable expansion print the short 8.3 style file name. 2416e35d4d8eSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2417e35d4d8eSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2418e35d4d8eSmrg done 2419e35d4d8eSmrg IFS=$lt_save_ifs 2420e35d4d8eSmrg # Convert to MSYS style. 2421e35d4d8eSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2422e35d4d8eSmrg ;; 2423e35d4d8eSmrg cygwin*) 2424e35d4d8eSmrg # Convert to unix form, then to dos form, then back to unix form 2425e35d4d8eSmrg # but this time dos style (no spaces!) so that the unix form looks 2426e35d4d8eSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 2427e35d4d8eSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2428e35d4d8eSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2429e35d4d8eSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2430e35d4d8eSmrg ;; 2431e35d4d8eSmrg *) 2432e35d4d8eSmrg sys_lib_search_path_spec="$LIB" 2433e35d4d8eSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2434e35d4d8eSmrg # It is most probably a Windows format PATH. 2435e35d4d8eSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2436e35d4d8eSmrg else 2437e35d4d8eSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2438e35d4d8eSmrg fi 2439e35d4d8eSmrg # FIXME: find the short name or the path components, as spaces are 2440e35d4d8eSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 2441e35d4d8eSmrg ;; 2442e35d4d8eSmrg esac 2443e35d4d8eSmrg 2444e35d4d8eSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2445e35d4d8eSmrg postinstall_cmds='base_file=`basename \${file}`~ 2446e35d4d8eSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2447e35d4d8eSmrg dldir=$destdir/`dirname \$dlpath`~ 2448e35d4d8eSmrg test -d \$dldir || mkdir -p \$dldir~ 2449e35d4d8eSmrg $install_prog $dir/$dlname \$dldir/$dlname' 2450e35d4d8eSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2451e35d4d8eSmrg dlpath=$dir/\$dldll~ 2452e35d4d8eSmrg $RM \$dlpath' 2453e35d4d8eSmrg shlibpath_overrides_runpath=yes 2454e35d4d8eSmrg dynamic_linker='Win32 link.exe' 2455e35d4d8eSmrg ;; 2456e35d4d8eSmrg 2457e35d4d8eSmrg *) 2458e35d4d8eSmrg # Assume MSVC wrapper 2459e35d4d8eSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2460e35d4d8eSmrg dynamic_linker='Win32 ld.exe' 2461e35d4d8eSmrg ;; 2462e35d4d8eSmrg esac 2463e35d4d8eSmrg # FIXME: first we should search . and the directory the executable is in 2464e35d4d8eSmrg shlibpath_var=PATH 2465e35d4d8eSmrg ;; 2466e35d4d8eSmrg 2467e35d4d8eSmrgdarwin* | rhapsody*) 2468e35d4d8eSmrg dynamic_linker="$host_os dyld" 2469e35d4d8eSmrg version_type=darwin 2470e35d4d8eSmrg need_lib_prefix=no 2471e35d4d8eSmrg need_version=no 2472e35d4d8eSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2473e35d4d8eSmrg soname_spec='${libname}${release}${major}$shared_ext' 2474e35d4d8eSmrg shlibpath_overrides_runpath=yes 2475e35d4d8eSmrg shlibpath_var=DYLD_LIBRARY_PATH 2476e35d4d8eSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2477e35d4d8eSmrgm4_if([$1], [],[ 2478e35d4d8eSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2479e35d4d8eSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2480e35d4d8eSmrg ;; 2481e35d4d8eSmrg 2482e35d4d8eSmrgdgux*) 2483e35d4d8eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2484e35d4d8eSmrg need_lib_prefix=no 2485e35d4d8eSmrg need_version=no 2486e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2487e35d4d8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2488e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2489e35d4d8eSmrg ;; 2490e35d4d8eSmrg 2491e35d4d8eSmrgfreebsd* | dragonfly*) 2492e35d4d8eSmrg # DragonFly does not have aout. When/if they implement a new 2493e35d4d8eSmrg # versioning mechanism, adjust this. 2494e35d4d8eSmrg if test -x /usr/bin/objformat; then 2495e35d4d8eSmrg objformat=`/usr/bin/objformat` 2496e35d4d8eSmrg else 2497e35d4d8eSmrg case $host_os in 2498e35d4d8eSmrg freebsd[[23]].*) objformat=aout ;; 2499e35d4d8eSmrg *) objformat=elf ;; 2500e35d4d8eSmrg esac 2501e35d4d8eSmrg fi 2502e35d4d8eSmrg version_type=freebsd-$objformat 2503e35d4d8eSmrg case $version_type in 2504e35d4d8eSmrg freebsd-elf*) 2505e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2506e35d4d8eSmrg need_version=no 2507e35d4d8eSmrg need_lib_prefix=no 2508e35d4d8eSmrg ;; 2509e35d4d8eSmrg freebsd-*) 2510e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2511e35d4d8eSmrg need_version=yes 2512e35d4d8eSmrg ;; 2513e35d4d8eSmrg esac 2514e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2515e35d4d8eSmrg case $host_os in 2516e35d4d8eSmrg freebsd2.*) 2517e35d4d8eSmrg shlibpath_overrides_runpath=yes 2518e35d4d8eSmrg ;; 2519e35d4d8eSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2520e35d4d8eSmrg shlibpath_overrides_runpath=yes 2521e35d4d8eSmrg hardcode_into_libs=yes 2522e35d4d8eSmrg ;; 2523e35d4d8eSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2524e35d4d8eSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2525e35d4d8eSmrg shlibpath_overrides_runpath=no 2526e35d4d8eSmrg hardcode_into_libs=yes 2527e35d4d8eSmrg ;; 2528e35d4d8eSmrg *) # from 4.6 on, and DragonFly 2529e35d4d8eSmrg shlibpath_overrides_runpath=yes 2530e35d4d8eSmrg hardcode_into_libs=yes 2531e35d4d8eSmrg ;; 2532e35d4d8eSmrg esac 2533e35d4d8eSmrg ;; 2534e35d4d8eSmrg 2535e35d4d8eSmrggnu*) 2536e35d4d8eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2537e35d4d8eSmrg need_lib_prefix=no 2538e35d4d8eSmrg need_version=no 2539e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2540e35d4d8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2541e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2542e35d4d8eSmrg shlibpath_overrides_runpath=no 2543e35d4d8eSmrg hardcode_into_libs=yes 2544e35d4d8eSmrg ;; 2545e35d4d8eSmrg 2546e35d4d8eSmrghaiku*) 2547e35d4d8eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2548e35d4d8eSmrg need_lib_prefix=no 2549e35d4d8eSmrg need_version=no 2550e35d4d8eSmrg dynamic_linker="$host_os runtime_loader" 2551e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2552e35d4d8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2553e35d4d8eSmrg shlibpath_var=LIBRARY_PATH 2554e35d4d8eSmrg shlibpath_overrides_runpath=yes 2555e35d4d8eSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2556e35d4d8eSmrg hardcode_into_libs=yes 2557e35d4d8eSmrg ;; 2558e35d4d8eSmrg 2559e35d4d8eSmrghpux9* | hpux10* | hpux11*) 2560e35d4d8eSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 2561e35d4d8eSmrg # link against other versions. 2562e35d4d8eSmrg version_type=sunos 2563e35d4d8eSmrg need_lib_prefix=no 2564e35d4d8eSmrg need_version=no 2565e35d4d8eSmrg case $host_cpu in 2566e35d4d8eSmrg ia64*) 2567e35d4d8eSmrg shrext_cmds='.so' 2568e35d4d8eSmrg hardcode_into_libs=yes 2569e35d4d8eSmrg dynamic_linker="$host_os dld.so" 2570e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2571e35d4d8eSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2572e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2573e35d4d8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2574e35d4d8eSmrg if test "X$HPUX_IA64_MODE" = X32; then 2575e35d4d8eSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2576e35d4d8eSmrg else 2577e35d4d8eSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2578e35d4d8eSmrg fi 2579e35d4d8eSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2580e35d4d8eSmrg ;; 2581e35d4d8eSmrg hppa*64*) 2582e35d4d8eSmrg shrext_cmds='.sl' 2583e35d4d8eSmrg hardcode_into_libs=yes 2584e35d4d8eSmrg dynamic_linker="$host_os dld.sl" 2585e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2586e35d4d8eSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2587e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2588e35d4d8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2589e35d4d8eSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2590e35d4d8eSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2591e35d4d8eSmrg ;; 2592e35d4d8eSmrg *) 2593e35d4d8eSmrg shrext_cmds='.sl' 2594e35d4d8eSmrg dynamic_linker="$host_os dld.sl" 2595e35d4d8eSmrg shlibpath_var=SHLIB_PATH 2596e35d4d8eSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2597e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2598e35d4d8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2599e35d4d8eSmrg ;; 2600e35d4d8eSmrg esac 2601e35d4d8eSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2602e35d4d8eSmrg postinstall_cmds='chmod 555 $lib' 2603e35d4d8eSmrg # or fails outright, so override atomically: 2604e35d4d8eSmrg install_override_mode=555 2605e35d4d8eSmrg ;; 2606e35d4d8eSmrg 2607e35d4d8eSmrginterix[[3-9]]*) 2608e35d4d8eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2609e35d4d8eSmrg need_lib_prefix=no 2610e35d4d8eSmrg need_version=no 2611e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2612e35d4d8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2613e35d4d8eSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2614e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2615e35d4d8eSmrg shlibpath_overrides_runpath=no 2616e35d4d8eSmrg hardcode_into_libs=yes 2617e35d4d8eSmrg ;; 2618e35d4d8eSmrg 2619e35d4d8eSmrgirix5* | irix6* | nonstopux*) 2620e35d4d8eSmrg case $host_os in 2621e35d4d8eSmrg nonstopux*) version_type=nonstopux ;; 2622e35d4d8eSmrg *) 2623e35d4d8eSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 2624e35d4d8eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2625e35d4d8eSmrg else 2626e35d4d8eSmrg version_type=irix 2627e35d4d8eSmrg fi ;; 2628e35d4d8eSmrg esac 2629e35d4d8eSmrg need_lib_prefix=no 2630e35d4d8eSmrg need_version=no 2631e35d4d8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2632e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2633e35d4d8eSmrg case $host_os in 2634e35d4d8eSmrg irix5* | nonstopux*) 2635e35d4d8eSmrg libsuff= shlibsuff= 2636e35d4d8eSmrg ;; 2637e35d4d8eSmrg *) 2638e35d4d8eSmrg case $LD in # libtool.m4 will add one of these switches to LD 2639e35d4d8eSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2640e35d4d8eSmrg libsuff= shlibsuff= libmagic=32-bit;; 2641e35d4d8eSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2642e35d4d8eSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2643e35d4d8eSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2644e35d4d8eSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2645e35d4d8eSmrg *) libsuff= shlibsuff= libmagic=never-match;; 2646e35d4d8eSmrg esac 2647e35d4d8eSmrg ;; 2648e35d4d8eSmrg esac 2649e35d4d8eSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2650e35d4d8eSmrg shlibpath_overrides_runpath=no 2651e35d4d8eSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2652e35d4d8eSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2653e35d4d8eSmrg hardcode_into_libs=yes 2654e35d4d8eSmrg ;; 2655e35d4d8eSmrg 2656e35d4d8eSmrg# No shared lib support for Linux oldld, aout, or coff. 2657e35d4d8eSmrglinux*oldld* | linux*aout* | linux*coff*) 2658e35d4d8eSmrg dynamic_linker=no 2659e35d4d8eSmrg ;; 2660e35d4d8eSmrg 2661e35d4d8eSmrg# This must be glibc/ELF. 2662e35d4d8eSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 2663e35d4d8eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2664e35d4d8eSmrg need_lib_prefix=no 2665e35d4d8eSmrg need_version=no 2666e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2667e35d4d8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2668e35d4d8eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2669e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2670e35d4d8eSmrg shlibpath_overrides_runpath=no 2671e35d4d8eSmrg 2672e35d4d8eSmrg # Some binutils ld are patched to set DT_RUNPATH 2673e35d4d8eSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2674e35d4d8eSmrg [lt_cv_shlibpath_overrides_runpath=no 2675e35d4d8eSmrg save_LDFLAGS=$LDFLAGS 2676e35d4d8eSmrg save_libdir=$libdir 2677e35d4d8eSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2678e35d4d8eSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2679e35d4d8eSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2680e35d4d8eSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2681e35d4d8eSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2682e35d4d8eSmrg LDFLAGS=$save_LDFLAGS 2683e35d4d8eSmrg libdir=$save_libdir 2684e35d4d8eSmrg ]) 2685e35d4d8eSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2686e35d4d8eSmrg 2687e35d4d8eSmrg # This implies no fast_install, which is unacceptable. 2688e35d4d8eSmrg # Some rework will be needed to allow for fast_install 2689e35d4d8eSmrg # before this can be enabled. 2690e35d4d8eSmrg hardcode_into_libs=yes 2691e35d4d8eSmrg 26925a81ca49Smrg # Add ABI-specific directories to the system library path. 26935a81ca49Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 26945a81ca49Smrg 2695e35d4d8eSmrg # Append ld.so.conf contents to the search path 2696e35d4d8eSmrg if test -f /etc/ld.so.conf; then 2697e35d4d8eSmrg 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' ' '` 26985a81ca49Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 26995a81ca49Smrg 2700e35d4d8eSmrg fi 2701e35d4d8eSmrg 2702e35d4d8eSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2703e35d4d8eSmrg # powerpc, because MkLinux only supported shared libraries with the 2704e35d4d8eSmrg # GNU dynamic linker. Since this was broken with cross compilers, 2705e35d4d8eSmrg # most powerpc-linux boxes support dynamic linking these days and 2706e35d4d8eSmrg # people can always --disable-shared, the test was removed, and we 2707e35d4d8eSmrg # assume the GNU/Linux dynamic linker is in use. 2708e35d4d8eSmrg dynamic_linker='GNU/Linux ld.so' 2709e35d4d8eSmrg ;; 2710e35d4d8eSmrg 2711e35d4d8eSmrgnetbsd*) 2712e35d4d8eSmrg version_type=sunos 2713e35d4d8eSmrg need_lib_prefix=no 2714e35d4d8eSmrg need_version=no 2715e35d4d8eSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2716e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2717e35d4d8eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2718e35d4d8eSmrg dynamic_linker='NetBSD (a.out) ld.so' 2719e35d4d8eSmrg else 2720e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2721e35d4d8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2722e35d4d8eSmrg dynamic_linker='NetBSD ld.elf_so' 2723e35d4d8eSmrg fi 2724e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2725e35d4d8eSmrg shlibpath_overrides_runpath=yes 2726e35d4d8eSmrg hardcode_into_libs=yes 2727e35d4d8eSmrg ;; 2728e35d4d8eSmrg 2729e35d4d8eSmrgnewsos6) 2730e35d4d8eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2731e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2732e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2733e35d4d8eSmrg shlibpath_overrides_runpath=yes 2734e35d4d8eSmrg ;; 2735e35d4d8eSmrg 2736e35d4d8eSmrg*nto* | *qnx*) 2737e35d4d8eSmrg version_type=qnx 2738e35d4d8eSmrg need_lib_prefix=no 2739e35d4d8eSmrg need_version=no 2740e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2741e35d4d8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2742e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2743e35d4d8eSmrg shlibpath_overrides_runpath=no 2744e35d4d8eSmrg hardcode_into_libs=yes 2745e35d4d8eSmrg dynamic_linker='ldqnx.so' 2746e35d4d8eSmrg ;; 2747e35d4d8eSmrg 2748e35d4d8eSmrgopenbsd*) 2749e35d4d8eSmrg version_type=sunos 2750e35d4d8eSmrg sys_lib_dlsearch_path_spec="/usr/lib" 2751e35d4d8eSmrg need_lib_prefix=no 2752e35d4d8eSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2753e35d4d8eSmrg case $host_os in 2754e35d4d8eSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2755e35d4d8eSmrg *) need_version=no ;; 2756e35d4d8eSmrg esac 2757e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2758e35d4d8eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2759e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2760e35d4d8eSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2761e35d4d8eSmrg case $host_os in 2762e35d4d8eSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 2763e35d4d8eSmrg shlibpath_overrides_runpath=no 2764e35d4d8eSmrg ;; 2765e35d4d8eSmrg *) 2766e35d4d8eSmrg shlibpath_overrides_runpath=yes 2767e35d4d8eSmrg ;; 2768e35d4d8eSmrg esac 2769e35d4d8eSmrg else 2770e35d4d8eSmrg shlibpath_overrides_runpath=yes 2771e35d4d8eSmrg fi 2772e35d4d8eSmrg ;; 2773e35d4d8eSmrg 2774e35d4d8eSmrgos2*) 2775e35d4d8eSmrg libname_spec='$name' 2776e35d4d8eSmrg shrext_cmds=".dll" 2777e35d4d8eSmrg need_lib_prefix=no 2778e35d4d8eSmrg library_names_spec='$libname${shared_ext} $libname.a' 2779e35d4d8eSmrg dynamic_linker='OS/2 ld.exe' 2780e35d4d8eSmrg shlibpath_var=LIBPATH 2781e35d4d8eSmrg ;; 2782e35d4d8eSmrg 2783e35d4d8eSmrgosf3* | osf4* | osf5*) 2784e35d4d8eSmrg version_type=osf 2785e35d4d8eSmrg need_lib_prefix=no 2786e35d4d8eSmrg need_version=no 2787e35d4d8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2788e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2789e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2790e35d4d8eSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2791e35d4d8eSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2792e35d4d8eSmrg ;; 2793e35d4d8eSmrg 2794e35d4d8eSmrgrdos*) 2795e35d4d8eSmrg dynamic_linker=no 2796e35d4d8eSmrg ;; 2797e35d4d8eSmrg 2798e35d4d8eSmrgsolaris*) 2799e35d4d8eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2800e35d4d8eSmrg need_lib_prefix=no 2801e35d4d8eSmrg need_version=no 2802e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2803e35d4d8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2804e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2805e35d4d8eSmrg shlibpath_overrides_runpath=yes 2806e35d4d8eSmrg hardcode_into_libs=yes 2807e35d4d8eSmrg # ldd complains unless libraries are executable 2808e35d4d8eSmrg postinstall_cmds='chmod +x $lib' 2809e35d4d8eSmrg ;; 2810e35d4d8eSmrg 2811e35d4d8eSmrgsunos4*) 2812e35d4d8eSmrg version_type=sunos 2813e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2814e35d4d8eSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2815e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2816e35d4d8eSmrg shlibpath_overrides_runpath=yes 2817e35d4d8eSmrg if test "$with_gnu_ld" = yes; then 2818e35d4d8eSmrg need_lib_prefix=no 2819e35d4d8eSmrg fi 2820e35d4d8eSmrg need_version=yes 2821e35d4d8eSmrg ;; 2822e35d4d8eSmrg 2823e35d4d8eSmrgsysv4 | sysv4.3*) 2824e35d4d8eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2825e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2826e35d4d8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2827e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2828e35d4d8eSmrg case $host_vendor in 2829e35d4d8eSmrg sni) 2830e35d4d8eSmrg shlibpath_overrides_runpath=no 2831e35d4d8eSmrg need_lib_prefix=no 2832e35d4d8eSmrg runpath_var=LD_RUN_PATH 2833e35d4d8eSmrg ;; 2834e35d4d8eSmrg siemens) 2835e35d4d8eSmrg need_lib_prefix=no 2836e35d4d8eSmrg ;; 2837e35d4d8eSmrg motorola) 2838e35d4d8eSmrg need_lib_prefix=no 2839e35d4d8eSmrg need_version=no 2840e35d4d8eSmrg shlibpath_overrides_runpath=no 2841e35d4d8eSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2842e35d4d8eSmrg ;; 2843e35d4d8eSmrg esac 2844e35d4d8eSmrg ;; 2845e35d4d8eSmrg 2846e35d4d8eSmrgsysv4*MP*) 2847e35d4d8eSmrg if test -d /usr/nec ;then 2848e35d4d8eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2849e35d4d8eSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2850e35d4d8eSmrg soname_spec='$libname${shared_ext}.$major' 2851e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2852e35d4d8eSmrg fi 2853e35d4d8eSmrg ;; 2854e35d4d8eSmrg 2855e35d4d8eSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2856e35d4d8eSmrg version_type=freebsd-elf 2857e35d4d8eSmrg need_lib_prefix=no 2858e35d4d8eSmrg need_version=no 2859e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2860e35d4d8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2861e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2862e35d4d8eSmrg shlibpath_overrides_runpath=yes 2863e35d4d8eSmrg hardcode_into_libs=yes 2864e35d4d8eSmrg if test "$with_gnu_ld" = yes; then 2865e35d4d8eSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2866e35d4d8eSmrg else 2867e35d4d8eSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2868e35d4d8eSmrg case $host_os in 2869e35d4d8eSmrg sco3.2v5*) 2870e35d4d8eSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2871e35d4d8eSmrg ;; 2872e35d4d8eSmrg esac 2873e35d4d8eSmrg fi 2874e35d4d8eSmrg sys_lib_dlsearch_path_spec='/usr/lib' 2875e35d4d8eSmrg ;; 2876e35d4d8eSmrg 2877e35d4d8eSmrgtpf*) 2878e35d4d8eSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2879e35d4d8eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2880e35d4d8eSmrg need_lib_prefix=no 2881e35d4d8eSmrg need_version=no 2882e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2883e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2884e35d4d8eSmrg shlibpath_overrides_runpath=no 2885e35d4d8eSmrg hardcode_into_libs=yes 2886e35d4d8eSmrg ;; 2887e35d4d8eSmrg 2888e35d4d8eSmrguts4*) 2889e35d4d8eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2890e35d4d8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2891e35d4d8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2892e35d4d8eSmrg shlibpath_var=LD_LIBRARY_PATH 2893e35d4d8eSmrg ;; 2894e35d4d8eSmrg 2895e35d4d8eSmrg*) 2896e35d4d8eSmrg dynamic_linker=no 2897e35d4d8eSmrg ;; 2898e35d4d8eSmrgesac 2899e35d4d8eSmrgAC_MSG_RESULT([$dynamic_linker]) 2900e35d4d8eSmrgtest "$dynamic_linker" = no && can_build_shared=no 2901e35d4d8eSmrg 2902e35d4d8eSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2903e35d4d8eSmrgif test "$GCC" = yes; then 2904e35d4d8eSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2905e35d4d8eSmrgfi 2906e35d4d8eSmrg 2907e35d4d8eSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2908e35d4d8eSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2909e35d4d8eSmrgfi 2910e35d4d8eSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2911e35d4d8eSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2912e35d4d8eSmrgfi 2913e35d4d8eSmrg 2914e35d4d8eSmrg_LT_DECL([], [variables_saved_for_relink], [1], 2915e35d4d8eSmrg [Variables whose values should be saved in libtool wrapper scripts and 2916e35d4d8eSmrg restored at link time]) 2917e35d4d8eSmrg_LT_DECL([], [need_lib_prefix], [0], 2918e35d4d8eSmrg [Do we need the "lib" prefix for modules?]) 2919e35d4d8eSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2920e35d4d8eSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2921e35d4d8eSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2922e35d4d8eSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2923e35d4d8eSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2924e35d4d8eSmrg [Is shlibpath searched before the hard-coded library search path?]) 2925e35d4d8eSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2926e35d4d8eSmrg_LT_DECL([], [library_names_spec], [1], 2927e35d4d8eSmrg [[List of archive names. First name is the real one, the rest are links. 2928e35d4d8eSmrg The last name is the one that the linker finds with -lNAME]]) 2929e35d4d8eSmrg_LT_DECL([], [soname_spec], [1], 2930e35d4d8eSmrg [[The coded name of the library, if different from the real name]]) 2931e35d4d8eSmrg_LT_DECL([], [install_override_mode], [1], 2932e35d4d8eSmrg [Permission mode override for installation of shared libraries]) 2933e35d4d8eSmrg_LT_DECL([], [postinstall_cmds], [2], 2934e35d4d8eSmrg [Command to use after installation of a shared archive]) 2935e35d4d8eSmrg_LT_DECL([], [postuninstall_cmds], [2], 2936e35d4d8eSmrg [Command to use after uninstallation of a shared archive]) 2937e35d4d8eSmrg_LT_DECL([], [finish_cmds], [2], 2938e35d4d8eSmrg [Commands used to finish a libtool library installation in a directory]) 2939e35d4d8eSmrg_LT_DECL([], [finish_eval], [1], 2940e35d4d8eSmrg [[As "finish_cmds", except a single script fragment to be evaled but 2941e35d4d8eSmrg not shown]]) 2942e35d4d8eSmrg_LT_DECL([], [hardcode_into_libs], [0], 2943e35d4d8eSmrg [Whether we should hardcode library paths into libraries]) 2944e35d4d8eSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2945e35d4d8eSmrg [Compile-time system search path for libraries]) 2946e35d4d8eSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2947e35d4d8eSmrg [Run-time system search path for libraries]) 2948e35d4d8eSmrg])# _LT_SYS_DYNAMIC_LINKER 2949e35d4d8eSmrg 2950e35d4d8eSmrg 2951e35d4d8eSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 2952e35d4d8eSmrg# -------------------------- 2953e35d4d8eSmrg# find a file program which can recognize shared library 2954e35d4d8eSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2955e35d4d8eSmrg[m4_require([_LT_DECL_EGREP])dnl 2956e35d4d8eSmrgAC_MSG_CHECKING([for $1]) 2957e35d4d8eSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2958e35d4d8eSmrg[case $MAGIC_CMD in 2959e35d4d8eSmrg[[\\/*] | ?:[\\/]*]) 2960e35d4d8eSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2961e35d4d8eSmrg ;; 2962e35d4d8eSmrg*) 2963e35d4d8eSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2964e35d4d8eSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2965e35d4d8eSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2966e35d4d8eSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2967e35d4d8eSmrgdnl not every word. This closes a longstanding sh security hole. 2968e35d4d8eSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 2969e35d4d8eSmrg for ac_dir in $ac_dummy; do 2970e35d4d8eSmrg IFS="$lt_save_ifs" 2971e35d4d8eSmrg test -z "$ac_dir" && ac_dir=. 2972e35d4d8eSmrg if test -f $ac_dir/$1; then 2973e35d4d8eSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2974e35d4d8eSmrg if test -n "$file_magic_test_file"; then 2975e35d4d8eSmrg case $deplibs_check_method in 2976e35d4d8eSmrg "file_magic "*) 2977e35d4d8eSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2978e35d4d8eSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2979e35d4d8eSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2980e35d4d8eSmrg $EGREP "$file_magic_regex" > /dev/null; then 2981e35d4d8eSmrg : 2982e35d4d8eSmrg else 2983e35d4d8eSmrg cat <<_LT_EOF 1>&2 2984e35d4d8eSmrg 2985e35d4d8eSmrg*** Warning: the command libtool uses to detect shared libraries, 2986e35d4d8eSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2987e35d4d8eSmrg*** The result is that libtool may fail to recognize shared libraries 2988e35d4d8eSmrg*** as such. This will affect the creation of libtool libraries that 2989e35d4d8eSmrg*** depend on shared libraries, but programs linked with such libtool 2990e35d4d8eSmrg*** libraries will work regardless of this problem. Nevertheless, you 2991e35d4d8eSmrg*** may want to report the problem to your system manager and/or to 2992e35d4d8eSmrg*** bug-libtool@gnu.org 2993e35d4d8eSmrg 2994e35d4d8eSmrg_LT_EOF 2995e35d4d8eSmrg fi ;; 2996e35d4d8eSmrg esac 2997e35d4d8eSmrg fi 2998e35d4d8eSmrg break 2999e35d4d8eSmrg fi 3000e35d4d8eSmrg done 3001e35d4d8eSmrg IFS="$lt_save_ifs" 3002e35d4d8eSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 3003e35d4d8eSmrg ;; 3004e35d4d8eSmrgesac]) 3005e35d4d8eSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 3006e35d4d8eSmrgif test -n "$MAGIC_CMD"; then 3007e35d4d8eSmrg AC_MSG_RESULT($MAGIC_CMD) 3008e35d4d8eSmrgelse 3009e35d4d8eSmrg AC_MSG_RESULT(no) 3010e35d4d8eSmrgfi 3011e35d4d8eSmrg_LT_DECL([], [MAGIC_CMD], [0], 3012e35d4d8eSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3013e35d4d8eSmrg])# _LT_PATH_TOOL_PREFIX 3014e35d4d8eSmrg 3015e35d4d8eSmrg# Old name: 3016e35d4d8eSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3017e35d4d8eSmrgdnl aclocal-1.4 backwards compatibility: 3018e35d4d8eSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3019e35d4d8eSmrg 3020e35d4d8eSmrg 3021e35d4d8eSmrg# _LT_PATH_MAGIC 3022e35d4d8eSmrg# -------------- 3023e35d4d8eSmrg# find a file program which can recognize a shared library 3024e35d4d8eSmrgm4_defun([_LT_PATH_MAGIC], 3025e35d4d8eSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3026e35d4d8eSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3027e35d4d8eSmrg if test -n "$ac_tool_prefix"; then 3028e35d4d8eSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3029e35d4d8eSmrg else 3030e35d4d8eSmrg MAGIC_CMD=: 3031e35d4d8eSmrg fi 3032e35d4d8eSmrgfi 3033e35d4d8eSmrg])# _LT_PATH_MAGIC 3034e35d4d8eSmrg 3035e35d4d8eSmrg 3036e35d4d8eSmrg# LT_PATH_LD 3037e35d4d8eSmrg# ---------- 3038e35d4d8eSmrg# find the pathname to the GNU or non-GNU linker 3039e35d4d8eSmrgAC_DEFUN([LT_PATH_LD], 3040e35d4d8eSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3041e35d4d8eSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3042e35d4d8eSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3043e35d4d8eSmrgm4_require([_LT_DECL_SED])dnl 3044e35d4d8eSmrgm4_require([_LT_DECL_EGREP])dnl 3045e35d4d8eSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3046e35d4d8eSmrg 3047e35d4d8eSmrgAC_ARG_WITH([gnu-ld], 3048e35d4d8eSmrg [AS_HELP_STRING([--with-gnu-ld], 3049e35d4d8eSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3050e35d4d8eSmrg [test "$withval" = no || with_gnu_ld=yes], 3051e35d4d8eSmrg [with_gnu_ld=no])dnl 3052e35d4d8eSmrg 3053e35d4d8eSmrgac_prog=ld 3054e35d4d8eSmrgif test "$GCC" = yes; then 3055e35d4d8eSmrg # Check if gcc -print-prog-name=ld gives a path. 3056e35d4d8eSmrg AC_MSG_CHECKING([for ld used by $CC]) 3057e35d4d8eSmrg case $host in 3058e35d4d8eSmrg *-*-mingw*) 3059e35d4d8eSmrg # gcc leaves a trailing carriage return which upsets mingw 3060e35d4d8eSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3061e35d4d8eSmrg *) 3062e35d4d8eSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3063e35d4d8eSmrg esac 3064e35d4d8eSmrg case $ac_prog in 3065e35d4d8eSmrg # Accept absolute paths. 3066e35d4d8eSmrg [[\\/]]* | ?:[[\\/]]*) 3067e35d4d8eSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 3068e35d4d8eSmrg # Canonicalize the pathname of ld 3069e35d4d8eSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3070e35d4d8eSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3071e35d4d8eSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3072e35d4d8eSmrg done 3073e35d4d8eSmrg test -z "$LD" && LD="$ac_prog" 3074e35d4d8eSmrg ;; 3075e35d4d8eSmrg "") 3076e35d4d8eSmrg # If it fails, then pretend we aren't using GCC. 3077e35d4d8eSmrg ac_prog=ld 3078e35d4d8eSmrg ;; 3079e35d4d8eSmrg *) 3080e35d4d8eSmrg # If it is relative, then search for the first ld in PATH. 3081e35d4d8eSmrg with_gnu_ld=unknown 3082e35d4d8eSmrg ;; 3083e35d4d8eSmrg esac 3084e35d4d8eSmrgelif test "$with_gnu_ld" = yes; then 3085e35d4d8eSmrg AC_MSG_CHECKING([for GNU ld]) 3086e35d4d8eSmrgelse 3087e35d4d8eSmrg AC_MSG_CHECKING([for non-GNU ld]) 3088e35d4d8eSmrgfi 3089e35d4d8eSmrgAC_CACHE_VAL(lt_cv_path_LD, 3090e35d4d8eSmrg[if test -z "$LD"; then 3091e35d4d8eSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3092e35d4d8eSmrg for ac_dir in $PATH; do 3093e35d4d8eSmrg IFS="$lt_save_ifs" 3094e35d4d8eSmrg test -z "$ac_dir" && ac_dir=. 3095e35d4d8eSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3096e35d4d8eSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 3097e35d4d8eSmrg # Check to see if the program is GNU ld. I'd rather use --version, 3098e35d4d8eSmrg # but apparently some variants of GNU ld only accept -v. 3099e35d4d8eSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 3100e35d4d8eSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3101e35d4d8eSmrg *GNU* | *'with BFD'*) 3102e35d4d8eSmrg test "$with_gnu_ld" != no && break 3103e35d4d8eSmrg ;; 3104e35d4d8eSmrg *) 3105e35d4d8eSmrg test "$with_gnu_ld" != yes && break 3106e35d4d8eSmrg ;; 3107e35d4d8eSmrg esac 3108e35d4d8eSmrg fi 3109e35d4d8eSmrg done 3110e35d4d8eSmrg IFS="$lt_save_ifs" 3111e35d4d8eSmrgelse 3112e35d4d8eSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 3113e35d4d8eSmrgfi]) 3114e35d4d8eSmrgLD="$lt_cv_path_LD" 3115e35d4d8eSmrgif test -n "$LD"; then 3116e35d4d8eSmrg AC_MSG_RESULT($LD) 3117e35d4d8eSmrgelse 3118e35d4d8eSmrg AC_MSG_RESULT(no) 3119e35d4d8eSmrgfi 3120e35d4d8eSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3121e35d4d8eSmrg_LT_PATH_LD_GNU 3122e35d4d8eSmrgAC_SUBST([LD]) 3123e35d4d8eSmrg 3124e35d4d8eSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3125e35d4d8eSmrg])# LT_PATH_LD 3126e35d4d8eSmrg 3127e35d4d8eSmrg# Old names: 3128e35d4d8eSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3129e35d4d8eSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3130e35d4d8eSmrgdnl aclocal-1.4 backwards compatibility: 3131e35d4d8eSmrgdnl AC_DEFUN([AM_PROG_LD], []) 3132e35d4d8eSmrgdnl AC_DEFUN([AC_PROG_LD], []) 3133e35d4d8eSmrg 3134e35d4d8eSmrg 3135e35d4d8eSmrg# _LT_PATH_LD_GNU 3136e35d4d8eSmrg#- -------------- 3137e35d4d8eSmrgm4_defun([_LT_PATH_LD_GNU], 3138e35d4d8eSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3139e35d4d8eSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3140e35d4d8eSmrgcase `$LD -v 2>&1 </dev/null` in 3141e35d4d8eSmrg*GNU* | *'with BFD'*) 3142e35d4d8eSmrg lt_cv_prog_gnu_ld=yes 3143e35d4d8eSmrg ;; 3144e35d4d8eSmrg*) 3145e35d4d8eSmrg lt_cv_prog_gnu_ld=no 3146e35d4d8eSmrg ;; 3147e35d4d8eSmrgesac]) 3148e35d4d8eSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3149e35d4d8eSmrg])# _LT_PATH_LD_GNU 3150e35d4d8eSmrg 3151e35d4d8eSmrg 3152e35d4d8eSmrg# _LT_CMD_RELOAD 3153e35d4d8eSmrg# -------------- 3154e35d4d8eSmrg# find reload flag for linker 3155e35d4d8eSmrg# -- PORTME Some linkers may need a different reload flag. 3156e35d4d8eSmrgm4_defun([_LT_CMD_RELOAD], 3157e35d4d8eSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 3158e35d4d8eSmrg lt_cv_ld_reload_flag, 3159e35d4d8eSmrg [lt_cv_ld_reload_flag='-r']) 3160e35d4d8eSmrgreload_flag=$lt_cv_ld_reload_flag 3161e35d4d8eSmrgcase $reload_flag in 3162e35d4d8eSmrg"" | " "*) ;; 3163e35d4d8eSmrg*) reload_flag=" $reload_flag" ;; 3164e35d4d8eSmrgesac 3165e35d4d8eSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3166e35d4d8eSmrgcase $host_os in 3167e35d4d8eSmrg cygwin* | mingw* | pw32* | cegcc*) 3168e35d4d8eSmrg if test "$GCC" != yes; then 3169e35d4d8eSmrg reload_cmds=false 3170e35d4d8eSmrg fi 3171e35d4d8eSmrg ;; 3172e35d4d8eSmrg darwin*) 3173e35d4d8eSmrg if test "$GCC" = yes; then 3174e35d4d8eSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 3175e35d4d8eSmrg else 3176e35d4d8eSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3177e35d4d8eSmrg fi 3178e35d4d8eSmrg ;; 3179e35d4d8eSmrgesac 3180e35d4d8eSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3181e35d4d8eSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3182e35d4d8eSmrg])# _LT_CMD_RELOAD 3183e35d4d8eSmrg 3184e35d4d8eSmrg 3185e35d4d8eSmrg# _LT_CHECK_MAGIC_METHOD 3186e35d4d8eSmrg# ---------------------- 3187e35d4d8eSmrg# how to check for library dependencies 3188e35d4d8eSmrg# -- PORTME fill in with the dynamic library characteristics 3189e35d4d8eSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3190e35d4d8eSmrg[m4_require([_LT_DECL_EGREP]) 3191e35d4d8eSmrgm4_require([_LT_DECL_OBJDUMP]) 3192e35d4d8eSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3193e35d4d8eSmrglt_cv_deplibs_check_method, 3194e35d4d8eSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3195e35d4d8eSmrglt_cv_file_magic_test_file= 3196e35d4d8eSmrglt_cv_deplibs_check_method='unknown' 3197e35d4d8eSmrg# Need to set the preceding variable on all platforms that support 3198e35d4d8eSmrg# interlibrary dependencies. 3199e35d4d8eSmrg# 'none' -- dependencies not supported. 3200e35d4d8eSmrg# `unknown' -- same as none, but documents that we really don't know. 3201e35d4d8eSmrg# 'pass_all' -- all dependencies passed with no checks. 3202e35d4d8eSmrg# 'test_compile' -- check by making test program. 3203e35d4d8eSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 3204e35d4d8eSmrg# which responds to the $file_magic_cmd with a given extended regex. 3205e35d4d8eSmrg# If you have `file' or equivalent on your system and you're not sure 3206e35d4d8eSmrg# whether `pass_all' will *always* work, you probably want this one. 3207e35d4d8eSmrg 3208e35d4d8eSmrgcase $host_os in 3209e35d4d8eSmrgaix[[4-9]]*) 3210e35d4d8eSmrg lt_cv_deplibs_check_method=pass_all 3211e35d4d8eSmrg ;; 3212e35d4d8eSmrg 3213e35d4d8eSmrgbeos*) 3214e35d4d8eSmrg lt_cv_deplibs_check_method=pass_all 3215e35d4d8eSmrg ;; 3216e35d4d8eSmrg 3217e35d4d8eSmrgbsdi[[45]]*) 3218e35d4d8eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3219e35d4d8eSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3220e35d4d8eSmrg lt_cv_file_magic_test_file=/shlib/libc.so 3221e35d4d8eSmrg ;; 3222e35d4d8eSmrg 3223e35d4d8eSmrgcygwin*) 3224e35d4d8eSmrg # func_win32_libid is a shell function defined in ltmain.sh 3225e35d4d8eSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3226e35d4d8eSmrg lt_cv_file_magic_cmd='func_win32_libid' 3227e35d4d8eSmrg ;; 3228e35d4d8eSmrg 3229e35d4d8eSmrgmingw* | pw32*) 3230e35d4d8eSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3231e35d4d8eSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3232e35d4d8eSmrg # unless we find 'file', for example because we are cross-compiling. 3233e35d4d8eSmrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3234e35d4d8eSmrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 3235e35d4d8eSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3236e35d4d8eSmrg lt_cv_file_magic_cmd='func_win32_libid' 3237e35d4d8eSmrg else 3238e35d4d8eSmrg # Keep this pattern in sync with the one in func_win32_libid. 3239e35d4d8eSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3240e35d4d8eSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3241e35d4d8eSmrg fi 3242e35d4d8eSmrg ;; 3243e35d4d8eSmrg 3244e35d4d8eSmrgcegcc*) 3245e35d4d8eSmrg # use the weaker test based on 'objdump'. See mingw*. 3246e35d4d8eSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3247e35d4d8eSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3248e35d4d8eSmrg ;; 3249e35d4d8eSmrg 3250e35d4d8eSmrgdarwin* | rhapsody*) 3251e35d4d8eSmrg lt_cv_deplibs_check_method=pass_all 3252e35d4d8eSmrg ;; 3253e35d4d8eSmrg 3254e35d4d8eSmrgfreebsd* | dragonfly*) 3255e35d4d8eSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3256e35d4d8eSmrg case $host_cpu in 3257e35d4d8eSmrg i*86 ) 3258e35d4d8eSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3259e35d4d8eSmrg # Let's accept both of them until this is cleared up. 3260e35d4d8eSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3261e35d4d8eSmrg lt_cv_file_magic_cmd=/usr/bin/file 3262e35d4d8eSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3263e35d4d8eSmrg ;; 3264e35d4d8eSmrg esac 3265e35d4d8eSmrg else 3266e35d4d8eSmrg lt_cv_deplibs_check_method=pass_all 3267e35d4d8eSmrg fi 3268e35d4d8eSmrg ;; 3269e35d4d8eSmrg 3270e35d4d8eSmrggnu*) 3271e35d4d8eSmrg lt_cv_deplibs_check_method=pass_all 3272e35d4d8eSmrg ;; 3273e35d4d8eSmrg 3274e35d4d8eSmrghaiku*) 3275e35d4d8eSmrg lt_cv_deplibs_check_method=pass_all 3276e35d4d8eSmrg ;; 3277e35d4d8eSmrg 3278e35d4d8eSmrghpux10.20* | hpux11*) 3279e35d4d8eSmrg lt_cv_file_magic_cmd=/usr/bin/file 3280e35d4d8eSmrg case $host_cpu in 3281e35d4d8eSmrg ia64*) 3282e35d4d8eSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3283e35d4d8eSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3284e35d4d8eSmrg ;; 3285e35d4d8eSmrg hppa*64*) 3286e35d4d8eSmrg [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]'] 3287e35d4d8eSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3288e35d4d8eSmrg ;; 3289e35d4d8eSmrg *) 3290e35d4d8eSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3291e35d4d8eSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3292e35d4d8eSmrg ;; 3293e35d4d8eSmrg esac 3294e35d4d8eSmrg ;; 3295e35d4d8eSmrg 3296e35d4d8eSmrginterix[[3-9]]*) 3297e35d4d8eSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3298e35d4d8eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3299e35d4d8eSmrg ;; 3300e35d4d8eSmrg 3301e35d4d8eSmrgirix5* | irix6* | nonstopux*) 3302e35d4d8eSmrg case $LD in 3303e35d4d8eSmrg *-32|*"-32 ") libmagic=32-bit;; 3304e35d4d8eSmrg *-n32|*"-n32 ") libmagic=N32;; 3305e35d4d8eSmrg *-64|*"-64 ") libmagic=64-bit;; 3306e35d4d8eSmrg *) libmagic=never-match;; 3307e35d4d8eSmrg esac 3308e35d4d8eSmrg lt_cv_deplibs_check_method=pass_all 3309e35d4d8eSmrg ;; 3310e35d4d8eSmrg 3311e35d4d8eSmrg# This must be glibc/ELF. 3312e35d4d8eSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 3313e35d4d8eSmrg lt_cv_deplibs_check_method=pass_all 3314e35d4d8eSmrg ;; 3315e35d4d8eSmrg 3316e35d4d8eSmrgnetbsd*) 3317e35d4d8eSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3318e35d4d8eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3319e35d4d8eSmrg else 3320e35d4d8eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3321e35d4d8eSmrg fi 3322e35d4d8eSmrg ;; 3323e35d4d8eSmrg 3324e35d4d8eSmrgnewos6*) 3325e35d4d8eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3326e35d4d8eSmrg lt_cv_file_magic_cmd=/usr/bin/file 3327e35d4d8eSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3328e35d4d8eSmrg ;; 3329e35d4d8eSmrg 3330e35d4d8eSmrg*nto* | *qnx*) 3331e35d4d8eSmrg lt_cv_deplibs_check_method=pass_all 3332e35d4d8eSmrg ;; 3333e35d4d8eSmrg 3334e35d4d8eSmrgopenbsd*) 3335e35d4d8eSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3336e35d4d8eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3337e35d4d8eSmrg else 3338e35d4d8eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3339e35d4d8eSmrg fi 3340e35d4d8eSmrg ;; 3341e35d4d8eSmrg 3342e35d4d8eSmrgosf3* | osf4* | osf5*) 3343e35d4d8eSmrg lt_cv_deplibs_check_method=pass_all 3344e35d4d8eSmrg ;; 3345e35d4d8eSmrg 3346e35d4d8eSmrgrdos*) 3347e35d4d8eSmrg lt_cv_deplibs_check_method=pass_all 3348e35d4d8eSmrg ;; 3349e35d4d8eSmrg 3350e35d4d8eSmrgsolaris*) 3351e35d4d8eSmrg lt_cv_deplibs_check_method=pass_all 3352e35d4d8eSmrg ;; 3353e35d4d8eSmrg 3354e35d4d8eSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3355e35d4d8eSmrg lt_cv_deplibs_check_method=pass_all 3356e35d4d8eSmrg ;; 3357e35d4d8eSmrg 3358e35d4d8eSmrgsysv4 | sysv4.3*) 3359e35d4d8eSmrg case $host_vendor in 3360e35d4d8eSmrg motorola) 3361e35d4d8eSmrg 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]]' 3362e35d4d8eSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3363e35d4d8eSmrg ;; 3364e35d4d8eSmrg ncr) 3365e35d4d8eSmrg lt_cv_deplibs_check_method=pass_all 3366e35d4d8eSmrg ;; 3367e35d4d8eSmrg sequent) 3368e35d4d8eSmrg lt_cv_file_magic_cmd='/bin/file' 3369e35d4d8eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3370e35d4d8eSmrg ;; 3371e35d4d8eSmrg sni) 3372e35d4d8eSmrg lt_cv_file_magic_cmd='/bin/file' 3373e35d4d8eSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3374e35d4d8eSmrg lt_cv_file_magic_test_file=/lib/libc.so 3375e35d4d8eSmrg ;; 3376e35d4d8eSmrg siemens) 3377e35d4d8eSmrg lt_cv_deplibs_check_method=pass_all 3378e35d4d8eSmrg ;; 3379e35d4d8eSmrg pc) 3380e35d4d8eSmrg lt_cv_deplibs_check_method=pass_all 3381e35d4d8eSmrg ;; 3382e35d4d8eSmrg esac 3383e35d4d8eSmrg ;; 3384e35d4d8eSmrg 3385e35d4d8eSmrgtpf*) 3386e35d4d8eSmrg lt_cv_deplibs_check_method=pass_all 3387e35d4d8eSmrg ;; 3388e35d4d8eSmrgesac 3389e35d4d8eSmrg]) 3390e35d4d8eSmrg 3391e35d4d8eSmrgfile_magic_glob= 3392e35d4d8eSmrgwant_nocaseglob=no 3393e35d4d8eSmrgif test "$build" = "$host"; then 3394e35d4d8eSmrg case $host_os in 3395e35d4d8eSmrg mingw* | pw32*) 3396e35d4d8eSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3397e35d4d8eSmrg want_nocaseglob=yes 3398e35d4d8eSmrg else 3399e35d4d8eSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3400e35d4d8eSmrg fi 3401e35d4d8eSmrg ;; 3402e35d4d8eSmrg esac 3403e35d4d8eSmrgfi 3404e35d4d8eSmrg 3405e35d4d8eSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 3406e35d4d8eSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 3407e35d4d8eSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3408e35d4d8eSmrg 3409e35d4d8eSmrg_LT_DECL([], [deplibs_check_method], [1], 3410e35d4d8eSmrg [Method to check whether dependent libraries are shared objects]) 3411e35d4d8eSmrg_LT_DECL([], [file_magic_cmd], [1], 3412e35d4d8eSmrg [Command to use when deplibs_check_method = "file_magic"]) 3413e35d4d8eSmrg_LT_DECL([], [file_magic_glob], [1], 3414e35d4d8eSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 3415e35d4d8eSmrg_LT_DECL([], [want_nocaseglob], [1], 3416e35d4d8eSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3417e35d4d8eSmrg])# _LT_CHECK_MAGIC_METHOD 3418e35d4d8eSmrg 3419e35d4d8eSmrg 3420e35d4d8eSmrg# LT_PATH_NM 3421e35d4d8eSmrg# ---------- 3422e35d4d8eSmrg# find the pathname to a BSD- or MS-compatible name lister 3423e35d4d8eSmrgAC_DEFUN([LT_PATH_NM], 3424e35d4d8eSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3425e35d4d8eSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3426e35d4d8eSmrg[if test -n "$NM"; then 3427e35d4d8eSmrg # Let the user override the test. 3428e35d4d8eSmrg lt_cv_path_NM="$NM" 3429e35d4d8eSmrgelse 3430e35d4d8eSmrg lt_nm_to_check="${ac_tool_prefix}nm" 3431e35d4d8eSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3432e35d4d8eSmrg lt_nm_to_check="$lt_nm_to_check nm" 3433e35d4d8eSmrg fi 3434e35d4d8eSmrg for lt_tmp_nm in $lt_nm_to_check; do 3435e35d4d8eSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3436e35d4d8eSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3437e35d4d8eSmrg IFS="$lt_save_ifs" 3438e35d4d8eSmrg test -z "$ac_dir" && ac_dir=. 3439e35d4d8eSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 3440e35d4d8eSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3441e35d4d8eSmrg # Check to see if the nm accepts a BSD-compat flag. 3442e35d4d8eSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3443e35d4d8eSmrg # nm: unknown option "B" ignored 3444e35d4d8eSmrg # Tru64's nm complains that /dev/null is an invalid object file 3445e35d4d8eSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3446e35d4d8eSmrg */dev/null* | *'Invalid file or object type'*) 3447e35d4d8eSmrg lt_cv_path_NM="$tmp_nm -B" 3448e35d4d8eSmrg break 3449e35d4d8eSmrg ;; 3450e35d4d8eSmrg *) 3451e35d4d8eSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3452e35d4d8eSmrg */dev/null*) 3453e35d4d8eSmrg lt_cv_path_NM="$tmp_nm -p" 3454e35d4d8eSmrg break 3455e35d4d8eSmrg ;; 3456e35d4d8eSmrg *) 3457e35d4d8eSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3458e35d4d8eSmrg continue # so that we can try to find one that supports BSD flags 3459e35d4d8eSmrg ;; 3460e35d4d8eSmrg esac 3461e35d4d8eSmrg ;; 3462e35d4d8eSmrg esac 3463e35d4d8eSmrg fi 3464e35d4d8eSmrg done 3465e35d4d8eSmrg IFS="$lt_save_ifs" 3466e35d4d8eSmrg done 3467e35d4d8eSmrg : ${lt_cv_path_NM=no} 3468e35d4d8eSmrgfi]) 3469e35d4d8eSmrgif test "$lt_cv_path_NM" != "no"; then 3470e35d4d8eSmrg NM="$lt_cv_path_NM" 3471e35d4d8eSmrgelse 3472e35d4d8eSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 3473e35d4d8eSmrg if test -n "$DUMPBIN"; then : 3474e35d4d8eSmrg # Let the user override the test. 3475e35d4d8eSmrg else 3476e35d4d8eSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3477e35d4d8eSmrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3478e35d4d8eSmrg *COFF*) 3479e35d4d8eSmrg DUMPBIN="$DUMPBIN -symbols" 3480e35d4d8eSmrg ;; 3481e35d4d8eSmrg *) 3482e35d4d8eSmrg DUMPBIN=: 3483e35d4d8eSmrg ;; 3484e35d4d8eSmrg esac 3485e35d4d8eSmrg fi 3486e35d4d8eSmrg AC_SUBST([DUMPBIN]) 3487e35d4d8eSmrg if test "$DUMPBIN" != ":"; then 3488e35d4d8eSmrg NM="$DUMPBIN" 3489e35d4d8eSmrg fi 3490e35d4d8eSmrgfi 3491e35d4d8eSmrgtest -z "$NM" && NM=nm 3492e35d4d8eSmrgAC_SUBST([NM]) 3493e35d4d8eSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3494e35d4d8eSmrg 3495e35d4d8eSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3496e35d4d8eSmrg [lt_cv_nm_interface="BSD nm" 3497e35d4d8eSmrg echo "int some_variable = 0;" > conftest.$ac_ext 3498e35d4d8eSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3499e35d4d8eSmrg (eval "$ac_compile" 2>conftest.err) 3500e35d4d8eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3501e35d4d8eSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3502e35d4d8eSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3503e35d4d8eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3504e35d4d8eSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3505e35d4d8eSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 3506e35d4d8eSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3507e35d4d8eSmrg lt_cv_nm_interface="MS dumpbin" 3508e35d4d8eSmrg fi 3509e35d4d8eSmrg rm -f conftest*]) 3510e35d4d8eSmrg])# LT_PATH_NM 3511e35d4d8eSmrg 3512e35d4d8eSmrg# Old names: 3513e35d4d8eSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3514e35d4d8eSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3515e35d4d8eSmrgdnl aclocal-1.4 backwards compatibility: 3516e35d4d8eSmrgdnl AC_DEFUN([AM_PROG_NM], []) 3517e35d4d8eSmrgdnl AC_DEFUN([AC_PROG_NM], []) 3518e35d4d8eSmrg 3519e35d4d8eSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3520e35d4d8eSmrg# -------------------------------- 3521e35d4d8eSmrg# how to determine the name of the shared library 3522e35d4d8eSmrg# associated with a specific link library. 3523e35d4d8eSmrg# -- PORTME fill in with the dynamic library characteristics 3524e35d4d8eSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3525e35d4d8eSmrg[m4_require([_LT_DECL_EGREP]) 3526e35d4d8eSmrgm4_require([_LT_DECL_OBJDUMP]) 3527e35d4d8eSmrgm4_require([_LT_DECL_DLLTOOL]) 3528e35d4d8eSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3529e35d4d8eSmrglt_cv_sharedlib_from_linklib_cmd, 3530e35d4d8eSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3531e35d4d8eSmrg 3532e35d4d8eSmrgcase $host_os in 3533e35d4d8eSmrgcygwin* | mingw* | pw32* | cegcc*) 3534e35d4d8eSmrg # two different shell functions defined in ltmain.sh 3535e35d4d8eSmrg # decide which to use based on capabilities of $DLLTOOL 3536e35d4d8eSmrg case `$DLLTOOL --help 2>&1` in 3537e35d4d8eSmrg *--identify-strict*) 3538e35d4d8eSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3539e35d4d8eSmrg ;; 3540e35d4d8eSmrg *) 3541e35d4d8eSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3542e35d4d8eSmrg ;; 3543e35d4d8eSmrg esac 3544e35d4d8eSmrg ;; 3545e35d4d8eSmrg*) 3546e35d4d8eSmrg # fallback: assume linklib IS sharedlib 3547e35d4d8eSmrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3548e35d4d8eSmrg ;; 3549e35d4d8eSmrgesac 3550e35d4d8eSmrg]) 3551e35d4d8eSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3552e35d4d8eSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3553e35d4d8eSmrg 3554e35d4d8eSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3555e35d4d8eSmrg [Command to associate shared and link libraries]) 3556e35d4d8eSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3557e35d4d8eSmrg 3558e35d4d8eSmrg 3559e35d4d8eSmrg# _LT_PATH_MANIFEST_TOOL 3560e35d4d8eSmrg# ---------------------- 3561e35d4d8eSmrg# locate the manifest tool 3562e35d4d8eSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3563e35d4d8eSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3564e35d4d8eSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3565e35d4d8eSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3566e35d4d8eSmrg [lt_cv_path_mainfest_tool=no 3567e35d4d8eSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3568e35d4d8eSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3569e35d4d8eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3570e35d4d8eSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3571e35d4d8eSmrg lt_cv_path_mainfest_tool=yes 3572e35d4d8eSmrg fi 3573e35d4d8eSmrg rm -f conftest*]) 3574e35d4d8eSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 3575e35d4d8eSmrg MANIFEST_TOOL=: 3576e35d4d8eSmrgfi 3577e35d4d8eSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3578e35d4d8eSmrg])# _LT_PATH_MANIFEST_TOOL 3579e35d4d8eSmrg 3580e35d4d8eSmrg 3581e35d4d8eSmrg# LT_LIB_M 3582e35d4d8eSmrg# -------- 3583e35d4d8eSmrg# check for math library 3584e35d4d8eSmrgAC_DEFUN([LT_LIB_M], 3585e35d4d8eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3586e35d4d8eSmrgLIBM= 3587e35d4d8eSmrgcase $host in 3588e35d4d8eSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3589e35d4d8eSmrg # These system don't have libm, or don't need it 3590e35d4d8eSmrg ;; 3591e35d4d8eSmrg*-ncr-sysv4.3*) 3592e35d4d8eSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3593e35d4d8eSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3594e35d4d8eSmrg ;; 3595e35d4d8eSmrg*) 3596e35d4d8eSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3597e35d4d8eSmrg ;; 3598e35d4d8eSmrgesac 3599e35d4d8eSmrgAC_SUBST([LIBM]) 3600e35d4d8eSmrg])# LT_LIB_M 3601e35d4d8eSmrg 3602e35d4d8eSmrg# Old name: 3603e35d4d8eSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3604e35d4d8eSmrgdnl aclocal-1.4 backwards compatibility: 3605e35d4d8eSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3606e35d4d8eSmrg 3607e35d4d8eSmrg 3608e35d4d8eSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3609e35d4d8eSmrg# ------------------------------- 3610e35d4d8eSmrgm4_defun([_LT_COMPILER_NO_RTTI], 3611e35d4d8eSmrg[m4_require([_LT_TAG_COMPILER])dnl 3612e35d4d8eSmrg 3613e35d4d8eSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3614e35d4d8eSmrg 3615e35d4d8eSmrgif test "$GCC" = yes; then 3616e35d4d8eSmrg case $cc_basename in 3617e35d4d8eSmrg nvcc*) 3618e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3619e35d4d8eSmrg *) 3620e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3621e35d4d8eSmrg esac 3622e35d4d8eSmrg 3623e35d4d8eSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3624e35d4d8eSmrg lt_cv_prog_compiler_rtti_exceptions, 3625e35d4d8eSmrg [-fno-rtti -fno-exceptions], [], 3626e35d4d8eSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3627e35d4d8eSmrgfi 3628e35d4d8eSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3629e35d4d8eSmrg [Compiler flag to turn off builtin functions]) 3630e35d4d8eSmrg])# _LT_COMPILER_NO_RTTI 3631e35d4d8eSmrg 3632e35d4d8eSmrg 3633e35d4d8eSmrg# _LT_CMD_GLOBAL_SYMBOLS 3634e35d4d8eSmrg# ---------------------- 3635e35d4d8eSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3636e35d4d8eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3637e35d4d8eSmrgAC_REQUIRE([AC_PROG_CC])dnl 3638e35d4d8eSmrgAC_REQUIRE([AC_PROG_AWK])dnl 3639e35d4d8eSmrgAC_REQUIRE([LT_PATH_NM])dnl 3640e35d4d8eSmrgAC_REQUIRE([LT_PATH_LD])dnl 3641e35d4d8eSmrgm4_require([_LT_DECL_SED])dnl 3642e35d4d8eSmrgm4_require([_LT_DECL_EGREP])dnl 3643e35d4d8eSmrgm4_require([_LT_TAG_COMPILER])dnl 3644e35d4d8eSmrg 3645e35d4d8eSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3646e35d4d8eSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3647e35d4d8eSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3648e35d4d8eSmrg[ 3649e35d4d8eSmrg# These are sane defaults that work on at least a few old systems. 3650e35d4d8eSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3651e35d4d8eSmrg 3652e35d4d8eSmrg# Character class describing NM global symbol codes. 3653e35d4d8eSmrgsymcode='[[BCDEGRST]]' 3654e35d4d8eSmrg 3655e35d4d8eSmrg# Regexp to match symbols that can be accessed directly from C. 3656e35d4d8eSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3657e35d4d8eSmrg 3658e35d4d8eSmrg# Define system-specific variables. 3659e35d4d8eSmrgcase $host_os in 3660e35d4d8eSmrgaix*) 3661e35d4d8eSmrg symcode='[[BCDT]]' 3662e35d4d8eSmrg ;; 3663e35d4d8eSmrgcygwin* | mingw* | pw32* | cegcc*) 3664e35d4d8eSmrg symcode='[[ABCDGISTW]]' 3665e35d4d8eSmrg ;; 3666e35d4d8eSmrghpux*) 3667e35d4d8eSmrg if test "$host_cpu" = ia64; then 3668e35d4d8eSmrg symcode='[[ABCDEGRST]]' 3669e35d4d8eSmrg fi 3670e35d4d8eSmrg ;; 3671e35d4d8eSmrgirix* | nonstopux*) 3672e35d4d8eSmrg symcode='[[BCDEGRST]]' 3673e35d4d8eSmrg ;; 3674e35d4d8eSmrgosf*) 3675e35d4d8eSmrg symcode='[[BCDEGQRST]]' 3676e35d4d8eSmrg ;; 3677e35d4d8eSmrgsolaris*) 3678e35d4d8eSmrg symcode='[[BDRT]]' 3679e35d4d8eSmrg ;; 3680e35d4d8eSmrgsco3.2v5*) 3681e35d4d8eSmrg symcode='[[DT]]' 3682e35d4d8eSmrg ;; 3683e35d4d8eSmrgsysv4.2uw2*) 3684e35d4d8eSmrg symcode='[[DT]]' 3685e35d4d8eSmrg ;; 3686e35d4d8eSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3687e35d4d8eSmrg symcode='[[ABDT]]' 3688e35d4d8eSmrg ;; 3689e35d4d8eSmrgsysv4) 3690e35d4d8eSmrg symcode='[[DFNSTU]]' 3691e35d4d8eSmrg ;; 3692e35d4d8eSmrgesac 3693e35d4d8eSmrg 3694e35d4d8eSmrg# If we're using GNU nm, then use its standard symbol codes. 3695e35d4d8eSmrgcase `$NM -V 2>&1` in 3696e35d4d8eSmrg*GNU* | *'with BFD'*) 3697e35d4d8eSmrg symcode='[[ABCDGIRSTW]]' ;; 3698e35d4d8eSmrgesac 3699e35d4d8eSmrg 3700e35d4d8eSmrg# Transform an extracted symbol line into a proper C declaration. 3701e35d4d8eSmrg# Some systems (esp. on ia64) link data and code symbols differently, 3702e35d4d8eSmrg# so use this general approach. 3703e35d4d8eSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3704e35d4d8eSmrg 3705e35d4d8eSmrg# Transform an extracted symbol line into symbol name and symbol address 3706e35d4d8eSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3707e35d4d8eSmrglt_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'" 3708e35d4d8eSmrg 3709e35d4d8eSmrg# Handle CRLF in mingw tool chain 3710e35d4d8eSmrgopt_cr= 3711e35d4d8eSmrgcase $build_os in 3712e35d4d8eSmrgmingw*) 3713e35d4d8eSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3714e35d4d8eSmrg ;; 3715e35d4d8eSmrgesac 3716e35d4d8eSmrg 3717e35d4d8eSmrg# Try without a prefix underscore, then with it. 3718e35d4d8eSmrgfor ac_symprfx in "" "_"; do 3719e35d4d8eSmrg 3720e35d4d8eSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3721e35d4d8eSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 3722e35d4d8eSmrg 3723e35d4d8eSmrg # Write the raw and C identifiers. 3724e35d4d8eSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3725e35d4d8eSmrg # Fake it for dumpbin and say T for any non-static function 3726e35d4d8eSmrg # and D for any global variable. 3727e35d4d8eSmrg # Also find C++ and __fastcall symbols from MSVC++, 3728e35d4d8eSmrg # which start with @ or ?. 3729e35d4d8eSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3730e35d4d8eSmrg" {last_section=section; section=\$ 3};"\ 3731e35d4d8eSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 3732e35d4d8eSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3733e35d4d8eSmrg" \$ 0!~/External *\|/{next};"\ 3734e35d4d8eSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3735e35d4d8eSmrg" {if(hide[section]) next};"\ 3736e35d4d8eSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3737e35d4d8eSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3738e35d4d8eSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3739e35d4d8eSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3740e35d4d8eSmrg" ' prfx=^$ac_symprfx]" 3741e35d4d8eSmrg else 3742e35d4d8eSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3743e35d4d8eSmrg fi 3744e35d4d8eSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 3745e35d4d8eSmrg 3746e35d4d8eSmrg # Check to see that the pipe works correctly. 3747e35d4d8eSmrg pipe_works=no 3748e35d4d8eSmrg 3749e35d4d8eSmrg rm -f conftest* 3750e35d4d8eSmrg cat > conftest.$ac_ext <<_LT_EOF 3751e35d4d8eSmrg#ifdef __cplusplus 3752e35d4d8eSmrgextern "C" { 3753e35d4d8eSmrg#endif 3754e35d4d8eSmrgchar nm_test_var; 3755e35d4d8eSmrgvoid nm_test_func(void); 3756e35d4d8eSmrgvoid nm_test_func(void){} 3757e35d4d8eSmrg#ifdef __cplusplus 3758e35d4d8eSmrg} 3759e35d4d8eSmrg#endif 3760e35d4d8eSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 3761e35d4d8eSmrg_LT_EOF 3762e35d4d8eSmrg 3763e35d4d8eSmrg if AC_TRY_EVAL(ac_compile); then 3764e35d4d8eSmrg # Now try to grab the symbols. 3765e35d4d8eSmrg nlist=conftest.nm 3766e35d4d8eSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3767e35d4d8eSmrg # Try sorting and uniquifying the output. 3768e35d4d8eSmrg if sort "$nlist" | uniq > "$nlist"T; then 3769e35d4d8eSmrg mv -f "$nlist"T "$nlist" 3770e35d4d8eSmrg else 3771e35d4d8eSmrg rm -f "$nlist"T 3772e35d4d8eSmrg fi 3773e35d4d8eSmrg 3774e35d4d8eSmrg # Make sure that we snagged all the symbols we need. 3775e35d4d8eSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3776e35d4d8eSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3777e35d4d8eSmrg cat <<_LT_EOF > conftest.$ac_ext 3778e35d4d8eSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3779e35d4d8eSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3780e35d4d8eSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 3781e35d4d8eSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 3782e35d4d8eSmrg# define LT@&t@_DLSYM_CONST 3783e35d4d8eSmrg#elif defined(__osf__) 3784e35d4d8eSmrg/* This system does not cope well with relocations in const data. */ 3785e35d4d8eSmrg# define LT@&t@_DLSYM_CONST 3786e35d4d8eSmrg#else 3787e35d4d8eSmrg# define LT@&t@_DLSYM_CONST const 3788e35d4d8eSmrg#endif 3789e35d4d8eSmrg 3790e35d4d8eSmrg#ifdef __cplusplus 3791e35d4d8eSmrgextern "C" { 3792e35d4d8eSmrg#endif 3793e35d4d8eSmrg 3794e35d4d8eSmrg_LT_EOF 3795e35d4d8eSmrg # Now generate the symbol file. 3796e35d4d8eSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3797e35d4d8eSmrg 3798e35d4d8eSmrg cat <<_LT_EOF >> conftest.$ac_ext 3799e35d4d8eSmrg 3800e35d4d8eSmrg/* The mapping between symbol names and symbols. */ 3801e35d4d8eSmrgLT@&t@_DLSYM_CONST struct { 3802e35d4d8eSmrg const char *name; 3803e35d4d8eSmrg void *address; 3804e35d4d8eSmrg} 3805e35d4d8eSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3806e35d4d8eSmrg{ 3807e35d4d8eSmrg { "@PROGRAM@", (void *) 0 }, 3808e35d4d8eSmrg_LT_EOF 3809e35d4d8eSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3810e35d4d8eSmrg cat <<\_LT_EOF >> conftest.$ac_ext 3811e35d4d8eSmrg {0, (void *) 0} 3812e35d4d8eSmrg}; 3813e35d4d8eSmrg 3814e35d4d8eSmrg/* This works around a problem in FreeBSD linker */ 3815e35d4d8eSmrg#ifdef FREEBSD_WORKAROUND 3816e35d4d8eSmrgstatic const void *lt_preloaded_setup() { 3817e35d4d8eSmrg return lt__PROGRAM__LTX_preloaded_symbols; 3818e35d4d8eSmrg} 3819e35d4d8eSmrg#endif 3820e35d4d8eSmrg 3821e35d4d8eSmrg#ifdef __cplusplus 3822e35d4d8eSmrg} 3823e35d4d8eSmrg#endif 3824e35d4d8eSmrg_LT_EOF 3825e35d4d8eSmrg # Now try linking the two files. 3826e35d4d8eSmrg mv conftest.$ac_objext conftstm.$ac_objext 3827e35d4d8eSmrg lt_globsym_save_LIBS=$LIBS 3828e35d4d8eSmrg lt_globsym_save_CFLAGS=$CFLAGS 3829e35d4d8eSmrg LIBS="conftstm.$ac_objext" 3830e35d4d8eSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3831e35d4d8eSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3832e35d4d8eSmrg pipe_works=yes 3833e35d4d8eSmrg fi 3834e35d4d8eSmrg LIBS=$lt_globsym_save_LIBS 3835e35d4d8eSmrg CFLAGS=$lt_globsym_save_CFLAGS 3836e35d4d8eSmrg else 3837e35d4d8eSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3838e35d4d8eSmrg fi 3839e35d4d8eSmrg else 3840e35d4d8eSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3841e35d4d8eSmrg fi 3842e35d4d8eSmrg else 3843e35d4d8eSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3844e35d4d8eSmrg fi 3845e35d4d8eSmrg else 3846e35d4d8eSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3847e35d4d8eSmrg cat conftest.$ac_ext >&5 3848e35d4d8eSmrg fi 3849e35d4d8eSmrg rm -rf conftest* conftst* 3850e35d4d8eSmrg 3851e35d4d8eSmrg # Do not use the global_symbol_pipe unless it works. 3852e35d4d8eSmrg if test "$pipe_works" = yes; then 3853e35d4d8eSmrg break 3854e35d4d8eSmrg else 3855e35d4d8eSmrg lt_cv_sys_global_symbol_pipe= 3856e35d4d8eSmrg fi 3857e35d4d8eSmrgdone 3858e35d4d8eSmrg]) 3859e35d4d8eSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3860e35d4d8eSmrg lt_cv_sys_global_symbol_to_cdecl= 3861e35d4d8eSmrgfi 3862e35d4d8eSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3863e35d4d8eSmrg AC_MSG_RESULT(failed) 3864e35d4d8eSmrgelse 3865e35d4d8eSmrg AC_MSG_RESULT(ok) 3866e35d4d8eSmrgfi 3867e35d4d8eSmrg 3868e35d4d8eSmrg# Response file support. 3869e35d4d8eSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3870e35d4d8eSmrg nm_file_list_spec='@' 3871e35d4d8eSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3872e35d4d8eSmrg nm_file_list_spec='@' 3873e35d4d8eSmrgfi 3874e35d4d8eSmrg 3875e35d4d8eSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3876e35d4d8eSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 3877e35d4d8eSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3878e35d4d8eSmrg [Transform the output of nm in a proper C declaration]) 3879e35d4d8eSmrg_LT_DECL([global_symbol_to_c_name_address], 3880e35d4d8eSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3881e35d4d8eSmrg [Transform the output of nm in a C name address pair]) 3882e35d4d8eSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3883e35d4d8eSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3884e35d4d8eSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3885e35d4d8eSmrg_LT_DECL([], [nm_file_list_spec], [1], 3886e35d4d8eSmrg [Specify filename containing input files for $NM]) 3887e35d4d8eSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 3888e35d4d8eSmrg 3889e35d4d8eSmrg 3890e35d4d8eSmrg# _LT_COMPILER_PIC([TAGNAME]) 3891e35d4d8eSmrg# --------------------------- 3892e35d4d8eSmrgm4_defun([_LT_COMPILER_PIC], 3893e35d4d8eSmrg[m4_require([_LT_TAG_COMPILER])dnl 3894e35d4d8eSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3895e35d4d8eSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3896e35d4d8eSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3897e35d4d8eSmrg 3898e35d4d8eSmrgm4_if([$1], [CXX], [ 3899e35d4d8eSmrg # C++ specific cases for pic, static, wl, etc. 3900e35d4d8eSmrg if test "$GXX" = yes; then 39011b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 39021b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 390332b578d3Smrg 39041b12faf6Smrg case $host_os in 39051b12faf6Smrg aix*) 39061b12faf6Smrg # All AIX code is PIC. 39072a51b5beSmrg if test "$host_cpu" = ia64; then 39081b12faf6Smrg # AIX 5 now supports IA64 processor 39091b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39102a51b5beSmrg fi 391132b578d3Smrg ;; 391232b578d3Smrg 39131b12faf6Smrg amigaos*) 39142a51b5beSmrg case $host_cpu in 39151b12faf6Smrg powerpc) 39161b12faf6Smrg # see comment about AmigaOS4 .so support 39171b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39181b12faf6Smrg ;; 39191b12faf6Smrg m68k) 39201b12faf6Smrg # FIXME: we need at least 68020 code to build shared libraries, but 39211b12faf6Smrg # adding the `-m68020' flag to GCC prevents building anything better, 39221b12faf6Smrg # like `-m68040'. 39231b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 39242a51b5beSmrg ;; 39252a51b5beSmrg esac 39262a51b5beSmrg ;; 39271b12faf6Smrg 39281b12faf6Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 39291b12faf6Smrg # PIC is the default for these OSes. 39301b12faf6Smrg ;; 39311b12faf6Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 39321b12faf6Smrg # This hack is so that the source file can tell whether it is being 39331b12faf6Smrg # built for inclusion in a dll (and should export symbols for example). 39341b12faf6Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 39351b12faf6Smrg # (--disable-auto-import) libraries 39361b12faf6Smrg m4_if([$1], [GCJ], [], 39371b12faf6Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 39381b12faf6Smrg ;; 39391b12faf6Smrg darwin* | rhapsody*) 39401b12faf6Smrg # PIC is the default on this platform 39411b12faf6Smrg # Common symbols not allowed in MH_DYLIB files 39421b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 39431b12faf6Smrg ;; 39441b12faf6Smrg *djgpp*) 39451b12faf6Smrg # DJGPP does not support shared libraries at all 39461b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 39471b12faf6Smrg ;; 3948e35d4d8eSmrg haiku*) 3949e35d4d8eSmrg # PIC is the default for Haiku. 3950e35d4d8eSmrg # The "-static" flag exists, but is broken. 3951e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 3952e35d4d8eSmrg ;; 39531b12faf6Smrg interix[[3-9]]*) 39541b12faf6Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 39551b12faf6Smrg # Instead, we relocate shared libraries at runtime. 39561b12faf6Smrg ;; 39571b12faf6Smrg sysv4*MP*) 39581b12faf6Smrg if test -d /usr/nec; then 39591b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 39601b12faf6Smrg fi 39611b12faf6Smrg ;; 39621b12faf6Smrg hpux*) 39631b12faf6Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 39641b12faf6Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 39651b12faf6Smrg # sets the default TLS model and affects inlining. 39661b12faf6Smrg case $host_cpu in 39671b12faf6Smrg hppa*64*) 39681b12faf6Smrg ;; 39691b12faf6Smrg *) 39701b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39711b12faf6Smrg ;; 39721b12faf6Smrg esac 39731b12faf6Smrg ;; 39741b12faf6Smrg *qnx* | *nto*) 39751b12faf6Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 39761b12faf6Smrg # it will coredump. 39771b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 39781b12faf6Smrg ;; 39791b12faf6Smrg *) 39801b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39812a51b5beSmrg ;; 3982d31dbc53Smrg esac 39831b12faf6Smrg else 39841b12faf6Smrg case $host_os in 39851b12faf6Smrg aix[[4-9]]*) 39861b12faf6Smrg # All AIX code is PIC. 39871b12faf6Smrg if test "$host_cpu" = ia64; then 39881b12faf6Smrg # AIX 5 now supports IA64 processor 39891b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39901b12faf6Smrg else 39911b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 39921b12faf6Smrg fi 3993d31dbc53Smrg ;; 39941b12faf6Smrg chorus*) 39951b12faf6Smrg case $cc_basename in 39961b12faf6Smrg cxch68*) 39971b12faf6Smrg # Green Hills C++ Compiler 39981b12faf6Smrg # _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" 39992a51b5beSmrg ;; 40002a51b5beSmrg esac 4001d31dbc53Smrg ;; 4002e35d4d8eSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4003e35d4d8eSmrg # This hack is so that the source file can tell whether it is being 4004e35d4d8eSmrg # built for inclusion in a dll (and should export symbols for example). 4005e35d4d8eSmrg m4_if([$1], [GCJ], [], 4006e35d4d8eSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4007e35d4d8eSmrg ;; 40081b12faf6Smrg dgux*) 40091b12faf6Smrg case $cc_basename in 40101b12faf6Smrg ec++*) 40111b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40121b12faf6Smrg ;; 40131b12faf6Smrg ghcx*) 40141b12faf6Smrg # Green Hills C++ Compiler 40151b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 40161b12faf6Smrg ;; 40171b12faf6Smrg *) 40181b12faf6Smrg ;; 40191b12faf6Smrg esac 40201b12faf6Smrg ;; 40211b12faf6Smrg freebsd* | dragonfly*) 40221b12faf6Smrg # FreeBSD uses GNU C++ 40231b12faf6Smrg ;; 40241b12faf6Smrg hpux9* | hpux10* | hpux11*) 40251b12faf6Smrg case $cc_basename in 40261b12faf6Smrg CC*) 40271b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40281b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40291b12faf6Smrg if test "$host_cpu" != ia64; then 40301b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 40311b12faf6Smrg fi 40321b12faf6Smrg ;; 40331b12faf6Smrg aCC*) 40341b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40351b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40362a51b5beSmrg case $host_cpu in 40371b12faf6Smrg hppa*64*|ia64*) 40381b12faf6Smrg # +Z the default 40392a51b5beSmrg ;; 40402a51b5beSmrg *) 40411b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 40422a51b5beSmrg ;; 40432a51b5beSmrg esac 40441b12faf6Smrg ;; 40451b12faf6Smrg *) 40461b12faf6Smrg ;; 40472a51b5beSmrg esac 40482a51b5beSmrg ;; 40491b12faf6Smrg interix*) 40501b12faf6Smrg # This is c89, which is MS Visual C++ (no shared libs) 40511b12faf6Smrg # Anyone wants to do a port? 40522a51b5beSmrg ;; 40531b12faf6Smrg irix5* | irix6* | nonstopux*) 40541b12faf6Smrg case $cc_basename in 40551b12faf6Smrg CC*) 40561b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40571b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40581b12faf6Smrg # CC pic flag -KPIC is the default. 40591b12faf6Smrg ;; 40601b12faf6Smrg *) 40611b12faf6Smrg ;; 40622a51b5beSmrg esac 40632a51b5beSmrg ;; 40641b12faf6Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 40651b12faf6Smrg case $cc_basename in 40661b12faf6Smrg KCC*) 40671b12faf6Smrg # KAI C++ Compiler 40681b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 40691b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40701b12faf6Smrg ;; 40711b12faf6Smrg ecpc* ) 40721b12faf6Smrg # old Intel C++ for x86_64 which still supported -KPIC. 40731b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40741b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40751b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40761b12faf6Smrg ;; 40771b12faf6Smrg icpc* ) 40781b12faf6Smrg # Intel C++, used to be incompatible with GCC. 40791b12faf6Smrg # ICC 10 doesn't accept -KPIC any more. 40801b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40811b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40821b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40831b12faf6Smrg ;; 40841b12faf6Smrg pgCC* | pgcpp*) 40851b12faf6Smrg # Portland Group C++ compiler 40861b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40871b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 40881b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40891b12faf6Smrg ;; 40901b12faf6Smrg cxx*) 40911b12faf6Smrg # Compaq C++ 40921b12faf6Smrg # Make sure the PIC flag is empty. It appears that all Alpha 40931b12faf6Smrg # Linux and Compaq Tru64 Unix objects are PIC. 40941b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 40951b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40961b12faf6Smrg ;; 4097e35d4d8eSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4098e35d4d8eSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 40991b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41001b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 41011b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 41021b12faf6Smrg ;; 41031b12faf6Smrg *) 41041b12faf6Smrg case `$CC -V 2>&1 | sed 5q` in 41051b12faf6Smrg *Sun\ C*) 41061b12faf6Smrg # Sun C++ 5.9 41071b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41081b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41091b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41101b12faf6Smrg ;; 41111b12faf6Smrg esac 41121b12faf6Smrg ;; 41131b12faf6Smrg esac 41142a51b5beSmrg ;; 41151b12faf6Smrg lynxos*) 41162a51b5beSmrg ;; 41171b12faf6Smrg m88k*) 41182a51b5beSmrg ;; 41191b12faf6Smrg mvs*) 41201b12faf6Smrg case $cc_basename in 41211b12faf6Smrg cxx*) 41221b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 41231b12faf6Smrg ;; 41241b12faf6Smrg *) 41251b12faf6Smrg ;; 41261b12faf6Smrg esac 41272a51b5beSmrg ;; 4128e35d4d8eSmrg netbsd*) 41292a51b5beSmrg ;; 41301b12faf6Smrg *qnx* | *nto*) 41311b12faf6Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 41321b12faf6Smrg # it will coredump. 41331b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 41341b12faf6Smrg ;; 41351b12faf6Smrg osf3* | osf4* | osf5*) 41361b12faf6Smrg case $cc_basename in 41371b12faf6Smrg KCC*) 41381b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 41391b12faf6Smrg ;; 41401b12faf6Smrg RCC*) 41411b12faf6Smrg # Rational C++ 2.4.1 41421b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41431b12faf6Smrg ;; 41441b12faf6Smrg cxx*) 41451b12faf6Smrg # Digital/Compaq C++ 41461b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41471b12faf6Smrg # Make sure the PIC flag is empty. It appears that all Alpha 41481b12faf6Smrg # Linux and Compaq Tru64 Unix objects are PIC. 41491b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 41501b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 41511b12faf6Smrg ;; 41521b12faf6Smrg *) 41531b12faf6Smrg ;; 41541b12faf6Smrg esac 41552a51b5beSmrg ;; 41561b12faf6Smrg psos*) 41572a51b5beSmrg ;; 41581b12faf6Smrg solaris*) 41591b12faf6Smrg case $cc_basename in 4160e35d4d8eSmrg CC* | sunCC*) 41611b12faf6Smrg # Sun C++ 4.2, 5.x and Centerline C++ 41621b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41631b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41641b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41651b12faf6Smrg ;; 41661b12faf6Smrg gcx*) 41671b12faf6Smrg # Green Hills C++ Compiler 41681b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 41691b12faf6Smrg ;; 41701b12faf6Smrg *) 41711b12faf6Smrg ;; 41721b12faf6Smrg esac 41732a51b5beSmrg ;; 41741b12faf6Smrg sunos4*) 41751b12faf6Smrg case $cc_basename in 41761b12faf6Smrg CC*) 41771b12faf6Smrg # Sun C++ 4.x 41781b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41791b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41801b12faf6Smrg ;; 41811b12faf6Smrg lcc*) 41821b12faf6Smrg # Lucid 41831b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41841b12faf6Smrg ;; 41851b12faf6Smrg *) 41861b12faf6Smrg ;; 41871b12faf6Smrg esac 41882a51b5beSmrg ;; 41891b12faf6Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 41901b12faf6Smrg case $cc_basename in 41911b12faf6Smrg CC*) 41921b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41931b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41941b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41951b12faf6Smrg ;; 41961b12faf6Smrg esac 41972a51b5beSmrg ;; 41981b12faf6Smrg tandem*) 41991b12faf6Smrg case $cc_basename in 42001b12faf6Smrg NCC*) 42011b12faf6Smrg # NonStop-UX NCC 3.20 42021b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 42031b12faf6Smrg ;; 42042a51b5beSmrg *) 42052a51b5beSmrg ;; 4206d31dbc53Smrg esac 42072a51b5beSmrg ;; 42081b12faf6Smrg vxworks*) 42092a51b5beSmrg ;; 42102a51b5beSmrg *) 42111b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 42121b12faf6Smrg ;; 42131b12faf6Smrg esac 42141b12faf6Smrg fi 42151b12faf6Smrg], 42161b12faf6Smrg[ 42171b12faf6Smrg if test "$GCC" = yes; then 42181b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42191b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 422032b578d3Smrg 42211b12faf6Smrg case $host_os in 42221b12faf6Smrg aix*) 42231b12faf6Smrg # All AIX code is PIC. 42241b12faf6Smrg if test "$host_cpu" = ia64; then 42251b12faf6Smrg # AIX 5 now supports IA64 processor 42261b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42271b12faf6Smrg fi 42281b12faf6Smrg ;; 42292a51b5beSmrg 42301b12faf6Smrg amigaos*) 42311b12faf6Smrg case $host_cpu in 42321b12faf6Smrg powerpc) 42331b12faf6Smrg # see comment about AmigaOS4 .so support 42341b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42351b12faf6Smrg ;; 42361b12faf6Smrg m68k) 42371b12faf6Smrg # FIXME: we need at least 68020 code to build shared libraries, but 42381b12faf6Smrg # adding the `-m68020' flag to GCC prevents building anything better, 42391b12faf6Smrg # like `-m68040'. 42401b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42411b12faf6Smrg ;; 42421b12faf6Smrg esac 42431b12faf6Smrg ;; 42442a51b5beSmrg 42451b12faf6Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42461b12faf6Smrg # PIC is the default for these OSes. 42471b12faf6Smrg ;; 42481b12faf6Smrg 42491b12faf6Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 42501b12faf6Smrg # This hack is so that the source file can tell whether it is being 42511b12faf6Smrg # built for inclusion in a dll (and should export symbols for example). 42521b12faf6Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42531b12faf6Smrg # (--disable-auto-import) libraries 42541b12faf6Smrg m4_if([$1], [GCJ], [], 42551b12faf6Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 42561b12faf6Smrg ;; 42571b12faf6Smrg 42581b12faf6Smrg darwin* | rhapsody*) 42591b12faf6Smrg # PIC is the default on this platform 42601b12faf6Smrg # Common symbols not allowed in MH_DYLIB files 42611b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42621b12faf6Smrg ;; 42631b12faf6Smrg 4264e35d4d8eSmrg haiku*) 4265e35d4d8eSmrg # PIC is the default for Haiku. 4266e35d4d8eSmrg # The "-static" flag exists, but is broken. 4267e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4268e35d4d8eSmrg ;; 4269e35d4d8eSmrg 42701b12faf6Smrg hpux*) 42711b12faf6Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42721b12faf6Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42731b12faf6Smrg # sets the default TLS model and affects inlining. 42741b12faf6Smrg case $host_cpu in 42751b12faf6Smrg hppa*64*) 42761b12faf6Smrg # +Z the default 4277d31dbc53Smrg ;; 4278d31dbc53Smrg *) 42791b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4280d31dbc53Smrg ;; 42811b12faf6Smrg esac 42821b12faf6Smrg ;; 42831b12faf6Smrg 42841b12faf6Smrg interix[[3-9]]*) 42851b12faf6Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42861b12faf6Smrg # Instead, we relocate shared libraries at runtime. 42871b12faf6Smrg ;; 42881b12faf6Smrg 42891b12faf6Smrg msdosdjgpp*) 42901b12faf6Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 42911b12faf6Smrg # on systems that don't support them. 42921b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 42931b12faf6Smrg enable_shared=no 42941b12faf6Smrg ;; 42951b12faf6Smrg 42961b12faf6Smrg *nto* | *qnx*) 42971b12faf6Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 42981b12faf6Smrg # it will coredump. 42991b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 43001b12faf6Smrg ;; 43011b12faf6Smrg 43021b12faf6Smrg sysv4*MP*) 43031b12faf6Smrg if test -d /usr/nec; then 43041b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 43051b12faf6Smrg fi 43061b12faf6Smrg ;; 43071b12faf6Smrg 43081b12faf6Smrg *) 43091b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43101b12faf6Smrg ;; 43112a51b5beSmrg esac 4312e35d4d8eSmrg 4313e35d4d8eSmrg case $cc_basename in 4314e35d4d8eSmrg nvcc*) # Cuda Compiler Driver 2.2 4315e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4316e35d4d8eSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4317e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4318e35d4d8eSmrg fi 4319e35d4d8eSmrg ;; 4320e35d4d8eSmrg esac 43211b12faf6Smrg else 43221b12faf6Smrg # PORTME Check for flag to pass linker flags through the system compiler. 43231b12faf6Smrg case $host_os in 43241b12faf6Smrg aix*) 43251b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43261b12faf6Smrg if test "$host_cpu" = ia64; then 43271b12faf6Smrg # AIX 5 now supports IA64 processor 43281b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43291b12faf6Smrg else 43301b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43311b12faf6Smrg fi 43321b12faf6Smrg ;; 43331b12faf6Smrg 43341b12faf6Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 43351b12faf6Smrg # This hack is so that the source file can tell whether it is being 43361b12faf6Smrg # built for inclusion in a dll (and should export symbols for example). 43371b12faf6Smrg m4_if([$1], [GCJ], [], 43381b12faf6Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43391b12faf6Smrg ;; 43401b12faf6Smrg 43411b12faf6Smrg hpux9* | hpux10* | hpux11*) 43421b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43431b12faf6Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 43441b12faf6Smrg # not for PA HP-UX. 43451b12faf6Smrg case $host_cpu in 43461b12faf6Smrg hppa*64*|ia64*) 43471b12faf6Smrg # +Z the default 43482a51b5beSmrg ;; 43492a51b5beSmrg *) 43501b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43512a51b5beSmrg ;; 43521b12faf6Smrg esac 43531b12faf6Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 43541b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 43551b12faf6Smrg ;; 43561b12faf6Smrg 43571b12faf6Smrg irix5* | irix6* | nonstopux*) 43581b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43591b12faf6Smrg # PIC (with -KPIC) is the default. 43601b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43611b12faf6Smrg ;; 43621b12faf6Smrg 43631b12faf6Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 43641b12faf6Smrg case $cc_basename in 43651b12faf6Smrg # old Intel for x86_64 which still supported -KPIC. 43661b12faf6Smrg ecc*) 43671b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43681b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43691b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43701b12faf6Smrg ;; 43711b12faf6Smrg # icc used to be incompatible with GCC. 43721b12faf6Smrg # ICC 10 doesn't accept -KPIC any more. 43731b12faf6Smrg icc* | ifort*) 43741b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43751b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43761b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43771b12faf6Smrg ;; 43781b12faf6Smrg # Lahey Fortran 8.1. 43791b12faf6Smrg lf95*) 43801b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43811b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 43821b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 43831b12faf6Smrg ;; 4384e35d4d8eSmrg nagfor*) 4385e35d4d8eSmrg # NAG Fortran compiler 4386e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4387e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4388e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4389e35d4d8eSmrg ;; 4390e35d4d8eSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 43911b12faf6Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 43921b12faf6Smrg # which looks to be a dead project) 43931b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43941b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 43951b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43961b12faf6Smrg ;; 43971b12faf6Smrg ccc*) 43981b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43991b12faf6Smrg # All Alpha code is PIC. 44001b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44011b12faf6Smrg ;; 4402e35d4d8eSmrg xl* | bgxl* | bgf* | mpixl*) 4403e35d4d8eSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 44041b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44051b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44061b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44072a51b5beSmrg ;; 44082a51b5beSmrg *) 44091b12faf6Smrg case `$CC -V 2>&1 | sed 5q` in 4410e35d4d8eSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4411e35d4d8eSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4412e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4413e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4414e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4415e35d4d8eSmrg ;; 4416e35d4d8eSmrg *Sun\ F* | *Sun*Fortran*) 4417e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4418e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4419e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4420e35d4d8eSmrg ;; 44211b12faf6Smrg *Sun\ C*) 44221b12faf6Smrg # Sun C 5.9 44231b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44241b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44251b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44261b12faf6Smrg ;; 4427e35d4d8eSmrg *Intel*\ [[CF]]*Compiler*) 4428e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4429e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4430e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4431e35d4d8eSmrg ;; 4432e35d4d8eSmrg *Portland\ Group*) 4433e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4434e35d4d8eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44351b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44361b12faf6Smrg ;; 44371b12faf6Smrg esac 44382a51b5beSmrg ;; 44391b12faf6Smrg esac 44401b12faf6Smrg ;; 444132b578d3Smrg 44421b12faf6Smrg newsos6) 44431b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44441b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44451b12faf6Smrg ;; 444632b578d3Smrg 44471b12faf6Smrg *nto* | *qnx*) 44481b12faf6Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44491b12faf6Smrg # it will coredump. 44501b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44511b12faf6Smrg ;; 445232b578d3Smrg 44531b12faf6Smrg osf3* | osf4* | osf5*) 44541b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44551b12faf6Smrg # All OSF/1 code is PIC. 44561b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44571b12faf6Smrg ;; 445832b578d3Smrg 44591b12faf6Smrg rdos*) 44601b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44611b12faf6Smrg ;; 446232b578d3Smrg 44631b12faf6Smrg solaris*) 44641b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44651b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44661b12faf6Smrg case $cc_basename in 4467e35d4d8eSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 44681b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 44691b12faf6Smrg *) 44701b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 44711b12faf6Smrg esac 44721b12faf6Smrg ;; 447332b578d3Smrg 44741b12faf6Smrg sunos4*) 44751b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44761b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 44771b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44781b12faf6Smrg ;; 447932b578d3Smrg 44801b12faf6Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 44811b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44821b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44831b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44841b12faf6Smrg ;; 448532b578d3Smrg 44861b12faf6Smrg sysv4*MP*) 44871b12faf6Smrg if test -d /usr/nec ;then 44881b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 44891b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44901b12faf6Smrg fi 44911b12faf6Smrg ;; 449232b578d3Smrg 44931b12faf6Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 44941b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44951b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44961b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44971b12faf6Smrg ;; 449832b578d3Smrg 44991b12faf6Smrg unicos*) 45001b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45011b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45021b12faf6Smrg ;; 450332b578d3Smrg 45041b12faf6Smrg uts4*) 45051b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45061b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45071b12faf6Smrg ;; 450832b578d3Smrg 45091b12faf6Smrg *) 45101b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45111b12faf6Smrg ;; 45122a51b5beSmrg esac 45131b12faf6Smrg fi 45141b12faf6Smrg]) 45151b12faf6Smrgcase $host_os in 45161b12faf6Smrg # For platforms which do not support PIC, -DPIC is meaningless: 45171b12faf6Smrg *djgpp*) 45181b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 45191b12faf6Smrg ;; 45201b12faf6Smrg *) 45211b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 45221b12faf6Smrg ;; 45231b12faf6Smrgesac 4524e35d4d8eSmrg 4525e35d4d8eSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4526e35d4d8eSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4527e35d4d8eSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4528e35d4d8eSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 45292a51b5beSmrg 45301b12faf6Smrg# 45311b12faf6Smrg# Check to make sure the PIC flag actually works. 45321b12faf6Smrg# 45331b12faf6Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 45341b12faf6Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 45351b12faf6Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 45361b12faf6Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 45371b12faf6Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 45381b12faf6Smrg "" | " "*) ;; 45391b12faf6Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 45401b12faf6Smrg esac], 45411b12faf6Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 45421b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 45432a51b5beSmrgfi 45441b12faf6Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 45451b12faf6Smrg [Additional compiler flags for building library objects]) 45462a51b5beSmrg 4547e35d4d8eSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4548e35d4d8eSmrg [How to pass a linker flag through the compiler]) 45491b12faf6Smrg# 45501b12faf6Smrg# Check to make sure the static flag actually works. 45511b12faf6Smrg# 45521b12faf6Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 45531b12faf6Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 45541b12faf6Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 45551b12faf6Smrg $lt_tmp_static_flag, 45561b12faf6Smrg [], 45571b12faf6Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 45581b12faf6Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 45591b12faf6Smrg [Compiler flag to prevent dynamic linking]) 45601b12faf6Smrg])# _LT_COMPILER_PIC 456132b578d3Smrg 45621b12faf6Smrg 45631b12faf6Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 45641b12faf6Smrg# ---------------------------- 45651b12faf6Smrg# See if the linker supports building shared libraries. 45661b12faf6Smrgm4_defun([_LT_LINKER_SHLIBS], 45671b12faf6Smrg[AC_REQUIRE([LT_PATH_LD])dnl 45681b12faf6SmrgAC_REQUIRE([LT_PATH_NM])dnl 4569e35d4d8eSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 45701b12faf6Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 45711b12faf6Smrgm4_require([_LT_DECL_EGREP])dnl 45721b12faf6Smrgm4_require([_LT_DECL_SED])dnl 45731b12faf6Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 45741b12faf6Smrgm4_require([_LT_TAG_COMPILER])dnl 45751b12faf6SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 45761b12faf6Smrgm4_if([$1], [CXX], [ 45771b12faf6Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4578e35d4d8eSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 45791b12faf6Smrg case $host_os in 45801b12faf6Smrg aix[[4-9]]*) 45811b12faf6Smrg # If we're using GNU nm, then we don't want the "-C" option. 45821b12faf6Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4583e35d4d8eSmrg # Also, AIX nm treats weak defined symbols like other global defined 4584e35d4d8eSmrg # symbols, whereas GNU nm marks them as "W". 45851b12faf6Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4586e35d4d8eSmrg _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' 45871b12faf6Smrg else 45881b12faf6Smrg _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' 45892a51b5beSmrg fi 4590d31dbc53Smrg ;; 45911b12faf6Smrg pw32*) 45921b12faf6Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4593e35d4d8eSmrg ;; 45941b12faf6Smrg cygwin* | mingw* | cegcc*) 4595e35d4d8eSmrg case $cc_basename in 4596e35d4d8eSmrg cl*) 4597e35d4d8eSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4598e35d4d8eSmrg ;; 4599e35d4d8eSmrg *) 4600e35d4d8eSmrg _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' 4601e35d4d8eSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4602e35d4d8eSmrg ;; 4603e35d4d8eSmrg esac 4604e35d4d8eSmrg ;; 46051b12faf6Smrg *) 46061b12faf6Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4607e35d4d8eSmrg ;; 46081b12faf6Smrg esac 46091b12faf6Smrg], [ 46101b12faf6Smrg runpath_var= 46111b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 46121b12faf6Smrg _LT_TAGVAR(always_export_symbols, $1)=no 46131b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)= 46141b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 46151b12faf6Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 46161b12faf6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 46171b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 46181b12faf6Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 46191b12faf6Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 46201b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=no 46211b12faf6Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 46221b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 46231b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 46241b12faf6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 46251b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 46261b12faf6Smrg _LT_TAGVAR(inherit_rpath, $1)=no 46271b12faf6Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 46281b12faf6Smrg _LT_TAGVAR(module_cmds, $1)= 46291b12faf6Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 46301b12faf6Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 46311b12faf6Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 46321b12faf6Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 46331b12faf6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 46341b12faf6Smrg # include_expsyms should be a list of space-separated symbols to be *always* 46351b12faf6Smrg # included in the symbol list 46361b12faf6Smrg _LT_TAGVAR(include_expsyms, $1)= 46371b12faf6Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 46381b12faf6Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 46391b12faf6Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 46401b12faf6Smrg # as well as any symbol that contains `d'. 46411b12faf6Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 46421b12faf6Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 46431b12faf6Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 46441b12faf6Smrg # the symbol is explicitly referenced. Since portable code cannot 46451b12faf6Smrg # rely on this symbol name, it's probably fine to never include it in 46461b12faf6Smrg # preloaded symbol tables. 46471b12faf6Smrg # Exclude shared library initialization/finalization symbols. 46481b12faf6Smrgdnl Note also adjust exclude_expsyms for C++ above. 46491b12faf6Smrg extract_expsyms_cmds= 465032b578d3Smrg 46511b12faf6Smrg case $host_os in 46521b12faf6Smrg cygwin* | mingw* | pw32* | cegcc*) 46531b12faf6Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 46541b12faf6Smrg # When not using gcc, we currently assume that we are using 46551b12faf6Smrg # Microsoft Visual C++. 46561b12faf6Smrg if test "$GCC" != yes; then 46571b12faf6Smrg with_gnu_ld=no 46582a51b5beSmrg fi 46592a51b5beSmrg ;; 46601b12faf6Smrg interix*) 46611b12faf6Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 46621b12faf6Smrg with_gnu_ld=yes 46631b12faf6Smrg ;; 46641b12faf6Smrg openbsd*) 46651b12faf6Smrg with_gnu_ld=no 46661b12faf6Smrg ;; 46672a51b5beSmrg esac 466832b578d3Smrg 46691b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 4670e35d4d8eSmrg 4671e35d4d8eSmrg # On some targets, GNU ld is compatible enough with the native linker 4672e35d4d8eSmrg # that we're better off using the native interface for both. 4673e35d4d8eSmrg lt_use_gnu_ld_interface=no 46741b12faf6Smrg if test "$with_gnu_ld" = yes; then 4675e35d4d8eSmrg case $host_os in 4676e35d4d8eSmrg aix*) 4677e35d4d8eSmrg # The AIX port of GNU ld has always aspired to compatibility 4678e35d4d8eSmrg # with the native linker. However, as the warning in the GNU ld 4679e35d4d8eSmrg # block says, versions before 2.19.5* couldn't really create working 4680e35d4d8eSmrg # shared libraries, regardless of the interface used. 4681e35d4d8eSmrg case `$LD -v 2>&1` in 4682e35d4d8eSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4683e35d4d8eSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4684e35d4d8eSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4685e35d4d8eSmrg *) 4686e35d4d8eSmrg lt_use_gnu_ld_interface=yes 4687e35d4d8eSmrg ;; 4688e35d4d8eSmrg esac 4689e35d4d8eSmrg ;; 4690e35d4d8eSmrg *) 4691e35d4d8eSmrg lt_use_gnu_ld_interface=yes 4692e35d4d8eSmrg ;; 4693e35d4d8eSmrg esac 4694e35d4d8eSmrg fi 4695e35d4d8eSmrg 4696e35d4d8eSmrg if test "$lt_use_gnu_ld_interface" = yes; then 46971b12faf6Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 46981b12faf6Smrg wlarc='${wl}' 469932b578d3Smrg 47001b12faf6Smrg # Set some defaults for GNU ld with shared library support. These 47011b12faf6Smrg # are reset later if shared libraries are not supported. Putting them 47021b12faf6Smrg # here allows them to be overridden if necessary. 47031b12faf6Smrg runpath_var=LD_RUN_PATH 47041b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 47051b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 47061b12faf6Smrg # ancient GNU ld didn't support --whole-archive et. al. 47071b12faf6Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 47081b12faf6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 47091b12faf6Smrg else 47101b12faf6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 47111b12faf6Smrg fi 47121b12faf6Smrg supports_anon_versioning=no 47131b12faf6Smrg case `$LD -v 2>&1` in 47141b12faf6Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 47151b12faf6Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 47161b12faf6Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 47171b12faf6Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 47181b12faf6Smrg *\ 2.11.*) ;; # other 2.11 versions 47191b12faf6Smrg *) supports_anon_versioning=yes ;; 47201b12faf6Smrg esac 472132b578d3Smrg 47221b12faf6Smrg # See if GNU ld supports shared libraries. 47231b12faf6Smrg case $host_os in 47241b12faf6Smrg aix[[3-9]]*) 47251b12faf6Smrg # On AIX/PPC, the GNU linker is very broken 47261b12faf6Smrg if test "$host_cpu" != ia64; then 47271b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47281b12faf6Smrg cat <<_LT_EOF 1>&2 472932b578d3Smrg 4730e35d4d8eSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 47311b12faf6Smrg*** to be unable to reliably create shared libraries on AIX. 47321b12faf6Smrg*** Therefore, libtool is disabling shared libraries support. If you 4733e35d4d8eSmrg*** really care for shared libraries, you may want to install binutils 4734e35d4d8eSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4735e35d4d8eSmrg*** You will then need to restart the configuration process. 473632b578d3Smrg 47371b12faf6Smrg_LT_EOF 47381b12faf6Smrg fi 47391b12faf6Smrg ;; 474032b578d3Smrg 47411b12faf6Smrg amigaos*) 47421b12faf6Smrg case $host_cpu in 47431b12faf6Smrg powerpc) 47441b12faf6Smrg # see comment about AmigaOS4 .so support 47451b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47461b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 47471b12faf6Smrg ;; 47481b12faf6Smrg m68k) 47491b12faf6Smrg _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)' 47501b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 47511b12faf6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47521b12faf6Smrg ;; 47531b12faf6Smrg esac 47541b12faf6Smrg ;; 475532b578d3Smrg 47561b12faf6Smrg beos*) 47571b12faf6Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 47581b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47591b12faf6Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 47601b12faf6Smrg # support --undefined. This deserves some investigation. FIXME 47611b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47621b12faf6Smrg else 47631b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47641b12faf6Smrg fi 47651b12faf6Smrg ;; 476632b578d3Smrg 47671b12faf6Smrg cygwin* | mingw* | pw32* | cegcc*) 47681b12faf6Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 47691b12faf6Smrg # as there is no search path for DLLs. 47701b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4771e35d4d8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 47721b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47731b12faf6Smrg _LT_TAGVAR(always_export_symbols, $1)=no 47741b12faf6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4775e35d4d8eSmrg _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' 4776e35d4d8eSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 47771b12faf6Smrg 47781b12faf6Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 47791b12faf6Smrg _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' 47801b12faf6Smrg # If the export-symbols file already is a .def file (1st line 47811b12faf6Smrg # is EXPORTS), use it as is; otherwise, prepend... 47821b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 47831b12faf6Smrg cp $export_symbols $output_objdir/$soname.def; 47841b12faf6Smrg else 47851b12faf6Smrg echo EXPORTS > $output_objdir/$soname.def; 47861b12faf6Smrg cat $export_symbols >> $output_objdir/$soname.def; 47871b12faf6Smrg fi~ 47881b12faf6Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 47891b12faf6Smrg else 47901b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47911b12faf6Smrg fi 47921b12faf6Smrg ;; 479332b578d3Smrg 4794e35d4d8eSmrg haiku*) 4795e35d4d8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4796e35d4d8eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4797e35d4d8eSmrg ;; 4798e35d4d8eSmrg 47991b12faf6Smrg interix[[3-9]]*) 48001b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=no 48011b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48021b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 48031b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 48041b12faf6Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 48051b12faf6Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 48061b12faf6Smrg # default) and relocated if they conflict, which is a slow very memory 48071b12faf6Smrg # consuming and fragmenting process. To avoid this, we pick a random, 48081b12faf6Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 48091b12faf6Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 48101b12faf6Smrg _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' 48111b12faf6Smrg _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' 48121b12faf6Smrg ;; 481332b578d3Smrg 48141b12faf6Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 48151b12faf6Smrg tmp_diet=no 48161b12faf6Smrg if test "$host_os" = linux-dietlibc; then 48171b12faf6Smrg case $cc_basename in 48181b12faf6Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 48191b12faf6Smrg esac 48201b12faf6Smrg fi 48211b12faf6Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 48221b12faf6Smrg && test "$tmp_diet" = no 48231b12faf6Smrg then 4824e35d4d8eSmrg tmp_addflag=' $pic_flag' 48251b12faf6Smrg tmp_sharedflag='-shared' 48261b12faf6Smrg case $cc_basename,$host_cpu in 48271b12faf6Smrg pgcc*) # Portland Group C compiler 4828e35d4d8eSmrg _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' 48291b12faf6Smrg tmp_addflag=' $pic_flag' 48301b12faf6Smrg ;; 4831e35d4d8eSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 4832e35d4d8eSmrg # Portland Group f77 and f90 compilers 4833e35d4d8eSmrg _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' 48341b12faf6Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 48351b12faf6Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 48361b12faf6Smrg tmp_addflag=' -i_dynamic' ;; 48371b12faf6Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 48381b12faf6Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 48391b12faf6Smrg ifc* | ifort*) # Intel Fortran compiler 48401b12faf6Smrg tmp_addflag=' -nofor_main' ;; 48411b12faf6Smrg lf95*) # Lahey Fortran 8.1 48421b12faf6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 48431b12faf6Smrg tmp_sharedflag='--shared' ;; 4844e35d4d8eSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 48451b12faf6Smrg tmp_sharedflag='-qmkshrobj' 48461b12faf6Smrg tmp_addflag= ;; 4847e35d4d8eSmrg nvcc*) # Cuda Compiler Driver 2.2 4848e35d4d8eSmrg _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' 4849e35d4d8eSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4850e35d4d8eSmrg ;; 48511b12faf6Smrg esac 48521b12faf6Smrg case `$CC -V 2>&1 | sed 5q` in 48531b12faf6Smrg *Sun\ C*) # Sun C 5.9 4854e35d4d8eSmrg _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' 48551b12faf6Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 48561b12faf6Smrg tmp_sharedflag='-G' ;; 48571b12faf6Smrg *Sun\ F*) # Sun Fortran 8.3 48581b12faf6Smrg tmp_sharedflag='-G' ;; 48591b12faf6Smrg esac 48601b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 486132b578d3Smrg 48621b12faf6Smrg if test "x$supports_anon_versioning" = xyes; then 48631b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48641b12faf6Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48651b12faf6Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 48661b12faf6Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 48671b12faf6Smrg fi 486832b578d3Smrg 48691b12faf6Smrg case $cc_basename in 4870e35d4d8eSmrg xlf* | bgf* | bgxlf* | mpixlf*) 48711b12faf6Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 48721b12faf6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4873e35d4d8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4874e35d4d8eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 48751b12faf6Smrg if test "x$supports_anon_versioning" = xyes; then 48761b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48771b12faf6Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48781b12faf6Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4879e35d4d8eSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 48801b12faf6Smrg fi 48811b12faf6Smrg ;; 48821b12faf6Smrg esac 48831b12faf6Smrg else 48841b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 48851b12faf6Smrg fi 48861b12faf6Smrg ;; 488732b578d3Smrg 4888e35d4d8eSmrg netbsd*) 48891b12faf6Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 48901b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 48911b12faf6Smrg wlarc= 48921b12faf6Smrg else 4893e35d4d8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4894e35d4d8eSmrg _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' 48951b12faf6Smrg fi 48961b12faf6Smrg ;; 489732b578d3Smrg 48981b12faf6Smrg solaris*) 48991b12faf6Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 49001b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49011b12faf6Smrg cat <<_LT_EOF 1>&2 490232b578d3Smrg 49031b12faf6Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 49041b12faf6Smrg*** create shared libraries on Solaris systems. Therefore, libtool 49051b12faf6Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 49061b12faf6Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 49071b12faf6Smrg*** your PATH or compiler configuration so that the native linker is 49081b12faf6Smrg*** used, and then restart. 490932b578d3Smrg 49101b12faf6Smrg_LT_EOF 49111b12faf6Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4912e35d4d8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4913e35d4d8eSmrg _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' 49141b12faf6Smrg else 49151b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49161b12faf6Smrg fi 49171b12faf6Smrg ;; 491832b578d3Smrg 49191b12faf6Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 49201b12faf6Smrg case `$LD -v 2>&1` in 49211b12faf6Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 49221b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49231b12faf6Smrg cat <<_LT_EOF 1>&2 492432b578d3Smrg 49251b12faf6Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 49261b12faf6Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 49271b12faf6Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 49281b12faf6Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 49291b12faf6Smrg*** your PATH or compiler configuration so that the native linker is 49301b12faf6Smrg*** used, and then restart. 493132b578d3Smrg 49321b12faf6Smrg_LT_EOF 49331b12faf6Smrg ;; 49341b12faf6Smrg *) 49351b12faf6Smrg # For security reasons, it is highly recommended that you always 49361b12faf6Smrg # use absolute paths for naming shared libraries, and exclude the 49371b12faf6Smrg # DT_RUNPATH tag from executables and libraries. But doing so 49381b12faf6Smrg # requires that you compile everything twice, which is a pain. 49391b12faf6Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 49401b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49411b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 49421b12faf6Smrg _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' 49431b12faf6Smrg else 49441b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49451b12faf6Smrg fi 49461b12faf6Smrg ;; 49471b12faf6Smrg esac 49481b12faf6Smrg ;; 494932b578d3Smrg 49501b12faf6Smrg sunos4*) 49511b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 49521b12faf6Smrg wlarc= 49531b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 49541b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 49551b12faf6Smrg ;; 495632b578d3Smrg 49571b12faf6Smrg *) 49581b12faf6Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4959e35d4d8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4960e35d4d8eSmrg _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' 49611b12faf6Smrg else 49621b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49631b12faf6Smrg fi 49641b12faf6Smrg ;; 49651b12faf6Smrg esac 496632b578d3Smrg 49671b12faf6Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 49681b12faf6Smrg runpath_var= 49691b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49701b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49711b12faf6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 49721b12faf6Smrg fi 49731b12faf6Smrg else 49741b12faf6Smrg # PORTME fill in a description of your system's linker (not GNU ld) 49751b12faf6Smrg case $host_os in 49761b12faf6Smrg aix3*) 49771b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 49781b12faf6Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 49791b12faf6Smrg _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' 49801b12faf6Smrg # Note: this linker hardcodes the directories in LIBPATH if there 49811b12faf6Smrg # are no directories specified by -L. 49821b12faf6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 49831b12faf6Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 49841b12faf6Smrg # Neither direct hardcoding nor static linking is supported with a 49851b12faf6Smrg # broken collect2. 49861b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 49871b12faf6Smrg fi 49881b12faf6Smrg ;; 498932b578d3Smrg 49901b12faf6Smrg aix[[4-9]]*) 49911b12faf6Smrg if test "$host_cpu" = ia64; then 49921b12faf6Smrg # On IA64, the linker does run time linking by default, so we don't 49931b12faf6Smrg # have to do anything special. 49941b12faf6Smrg aix_use_runtimelinking=no 49951b12faf6Smrg exp_sym_flag='-Bexport' 49961b12faf6Smrg no_entry_flag="" 49971b12faf6Smrg else 49981b12faf6Smrg # If we're using GNU nm, then we don't want the "-C" option. 49991b12faf6Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5000e35d4d8eSmrg # Also, AIX nm treats weak defined symbols like other global 5001e35d4d8eSmrg # defined symbols, whereas GNU nm marks them as "W". 50021b12faf6Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5003e35d4d8eSmrg _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' 50041b12faf6Smrg else 50051b12faf6Smrg _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' 50061b12faf6Smrg fi 50071b12faf6Smrg aix_use_runtimelinking=no 500832b578d3Smrg 50091b12faf6Smrg # Test if we are trying to use run time linking or normal 50101b12faf6Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 50111b12faf6Smrg # need to do runtime linking. 50121b12faf6Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 50131b12faf6Smrg for ld_flag in $LDFLAGS; do 50141b12faf6Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 50151b12faf6Smrg aix_use_runtimelinking=yes 50161b12faf6Smrg break 50171b12faf6Smrg fi 50181b12faf6Smrg done 50191b12faf6Smrg ;; 50201b12faf6Smrg esac 502132b578d3Smrg 50221b12faf6Smrg exp_sym_flag='-bexport' 50231b12faf6Smrg no_entry_flag='-bnoentry' 50241b12faf6Smrg fi 50252a51b5beSmrg 50261b12faf6Smrg # When large executables or shared objects are built, AIX ld can 50271b12faf6Smrg # have problems creating the table of contents. If linking a library 50281b12faf6Smrg # or program results in "error TOC overflow" add -mminimal-toc to 50291b12faf6Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 50301b12faf6Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 50311b12faf6Smrg 50321b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='' 50331b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 50341b12faf6Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 50351b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 50361b12faf6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 50371b12faf6Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 50382a51b5beSmrg 50391b12faf6Smrg if test "$GCC" = yes; then 50401b12faf6Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 50411b12faf6Smrg # We only want to do this on AIX 4.2 and lower, the check 50421b12faf6Smrg # below for broken collect2 doesn't work under 4.3+ 50431b12faf6Smrg collect2name=`${CC} -print-prog-name=collect2` 50441b12faf6Smrg if test -f "$collect2name" && 50451b12faf6Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 50461b12faf6Smrg then 50471b12faf6Smrg # We have reworked collect2 50481b12faf6Smrg : 50491b12faf6Smrg else 50501b12faf6Smrg # We have old collect2 50511b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 50521b12faf6Smrg # It fails to find uninstalled libraries when the uninstalled 50531b12faf6Smrg # path is not listed in the libpath. Setting hardcode_minus_L 50541b12faf6Smrg # to unsupported forces relinking 50551b12faf6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 50561b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50571b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 50581b12faf6Smrg fi 50591b12faf6Smrg ;; 50601b12faf6Smrg esac 50611b12faf6Smrg shared_flag='-shared' 50621b12faf6Smrg if test "$aix_use_runtimelinking" = yes; then 50631b12faf6Smrg shared_flag="$shared_flag "'${wl}-G' 50641b12faf6Smrg fi 50651b12faf6Smrg else 50661b12faf6Smrg # not using gcc 50671b12faf6Smrg if test "$host_cpu" = ia64; then 50681b12faf6Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 50691b12faf6Smrg # chokes on -Wl,-G. The following line is correct: 50701b12faf6Smrg shared_flag='-G' 50711b12faf6Smrg else 50721b12faf6Smrg if test "$aix_use_runtimelinking" = yes; then 50731b12faf6Smrg shared_flag='${wl}-G' 50741b12faf6Smrg else 50751b12faf6Smrg shared_flag='${wl}-bM:SRE' 50761b12faf6Smrg fi 50771b12faf6Smrg fi 50781b12faf6Smrg fi 50792a51b5beSmrg 50801b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 50811b12faf6Smrg # It seems that -bexpall does not export symbols beginning with 50821b12faf6Smrg # underscore (_), so it is better to generate a list of symbols to export. 50831b12faf6Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 50841b12faf6Smrg if test "$aix_use_runtimelinking" = yes; then 50851b12faf6Smrg # Warning - without using the other runtime loading flags (-brtl), 50861b12faf6Smrg # -berok will link without error, but may produce a broken library. 50871b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 50881b12faf6Smrg # Determine the default libpath from the value encoded in an 50891b12faf6Smrg # empty executable. 5090e35d4d8eSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 50911b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5092e35d4d8eSmrg _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" 50931b12faf6Smrg else 50941b12faf6Smrg if test "$host_cpu" = ia64; then 50951b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 50961b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 50971b12faf6Smrg _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" 50981b12faf6Smrg else 50991b12faf6Smrg # Determine the default libpath from the value encoded in an 51001b12faf6Smrg # empty executable. 5101e35d4d8eSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 51021b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 51031b12faf6Smrg # Warning - without using the other run time loading flags, 51041b12faf6Smrg # -berok will link without error, but may produce a broken library. 51051b12faf6Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 51061b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5107e35d4d8eSmrg if test "$with_gnu_ld" = yes; then 5108e35d4d8eSmrg # We only use this code for GNU lds that support --whole-archive. 5109e35d4d8eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5110e35d4d8eSmrg else 5111e35d4d8eSmrg # Exported symbols can be pulled into shared objects from archives 5112e35d4d8eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5113e35d4d8eSmrg fi 51141b12faf6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 51151b12faf6Smrg # This is similar to how AIX traditionally builds its shared libraries. 51161b12faf6Smrg _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' 51171b12faf6Smrg fi 51181b12faf6Smrg fi 51191b12faf6Smrg ;; 5120d31dbc53Smrg 51211b12faf6Smrg amigaos*) 51221b12faf6Smrg case $host_cpu in 51231b12faf6Smrg powerpc) 51241b12faf6Smrg # see comment about AmigaOS4 .so support 51251b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 51261b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 51271b12faf6Smrg ;; 51281b12faf6Smrg m68k) 51291b12faf6Smrg _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)' 51301b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51311b12faf6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51321b12faf6Smrg ;; 51331b12faf6Smrg esac 51341b12faf6Smrg ;; 5135d31dbc53Smrg 51361b12faf6Smrg bsdi[[45]]*) 51371b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 51381b12faf6Smrg ;; 5139d31dbc53Smrg 51401b12faf6Smrg cygwin* | mingw* | pw32* | cegcc*) 51411b12faf6Smrg # When not using gcc, we currently assume that we are using 51421b12faf6Smrg # Microsoft Visual C++. 51431b12faf6Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 51441b12faf6Smrg # no search path for DLLs. 5145e35d4d8eSmrg case $cc_basename in 5146e35d4d8eSmrg cl*) 5147e35d4d8eSmrg # Native MSVC 5148e35d4d8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5149e35d4d8eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5150e35d4d8eSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5151e35d4d8eSmrg _LT_TAGVAR(file_list_spec, $1)='@' 5152e35d4d8eSmrg # Tell ltmain to make .lib files, not .a files. 5153e35d4d8eSmrg libext=lib 5154e35d4d8eSmrg # Tell ltmain to make .dll files, not .so files. 5155e35d4d8eSmrg shrext_cmds=".dll" 5156e35d4d8eSmrg # FIXME: Setting linknames here is a bad hack. 5157e35d4d8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5158e35d4d8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5159e35d4d8eSmrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5160e35d4d8eSmrg else 5161e35d4d8eSmrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5162e35d4d8eSmrg fi~ 5163e35d4d8eSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5164e35d4d8eSmrg linknames=' 5165e35d4d8eSmrg # The linker will not automatically build a static lib if we build a DLL. 5166e35d4d8eSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5167e35d4d8eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5168e35d4d8eSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5169e35d4d8eSmrg _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' 5170e35d4d8eSmrg # Don't use ranlib 5171e35d4d8eSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5172e35d4d8eSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5173e35d4d8eSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5174e35d4d8eSmrg case $lt_outputfile in 5175e35d4d8eSmrg *.exe|*.EXE) ;; 5176e35d4d8eSmrg *) 5177e35d4d8eSmrg lt_outputfile="$lt_outputfile.exe" 5178e35d4d8eSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 5179e35d4d8eSmrg ;; 5180e35d4d8eSmrg esac~ 5181e35d4d8eSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5182e35d4d8eSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5183e35d4d8eSmrg $RM "$lt_outputfile.manifest"; 5184e35d4d8eSmrg fi' 5185e35d4d8eSmrg ;; 5186e35d4d8eSmrg *) 5187e35d4d8eSmrg # Assume MSVC wrapper 5188e35d4d8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5189e35d4d8eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5190e35d4d8eSmrg # Tell ltmain to make .lib files, not .a files. 5191e35d4d8eSmrg libext=lib 5192e35d4d8eSmrg # Tell ltmain to make .dll files, not .so files. 5193e35d4d8eSmrg shrext_cmds=".dll" 5194e35d4d8eSmrg # FIXME: Setting linknames here is a bad hack. 5195e35d4d8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5196e35d4d8eSmrg # The linker will automatically build a .lib file if we build a DLL. 5197e35d4d8eSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5198e35d4d8eSmrg # FIXME: Should let the user specify the lib program. 5199e35d4d8eSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5200e35d4d8eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5201e35d4d8eSmrg ;; 5202e35d4d8eSmrg esac 52031b12faf6Smrg ;; 5204d31dbc53Smrg 52051b12faf6Smrg darwin* | rhapsody*) 52061b12faf6Smrg _LT_DARWIN_LINKER_FEATURES($1) 52071b12faf6Smrg ;; 5208d31dbc53Smrg 52091b12faf6Smrg dgux*) 52101b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 52111b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 52121b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52131b12faf6Smrg ;; 5214d31dbc53Smrg 52151b12faf6Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 52161b12faf6Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 52171b12faf6Smrg # does not break anything, and helps significantly (at the cost of a little 52181b12faf6Smrg # extra space). 52191b12faf6Smrg freebsd2.2*) 52201b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 52211b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52221b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52231b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52241b12faf6Smrg ;; 5225d31dbc53Smrg 52261b12faf6Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5227e35d4d8eSmrg freebsd2.*) 52281b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 52291b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52301b12faf6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52311b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52321b12faf6Smrg ;; 5233d31dbc53Smrg 52341b12faf6Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 52351b12faf6Smrg freebsd* | dragonfly*) 5236e35d4d8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 52371b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52381b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52391b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52401b12faf6Smrg ;; 5241d31dbc53Smrg 52421b12faf6Smrg hpux9*) 52431b12faf6Smrg if test "$GCC" = yes; then 5244e35d4d8eSmrg _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' 52451b12faf6Smrg else 52461b12faf6Smrg _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' 52471b12faf6Smrg fi 52481b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52491b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52501b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5251d31dbc53Smrg 52521b12faf6Smrg # hardcode_minus_L: Not really in the search PATH, 52531b12faf6Smrg # but as the default location of the library. 52541b12faf6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52551b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52561b12faf6Smrg ;; 525732b578d3Smrg 52581b12faf6Smrg hpux10*) 5259e35d4d8eSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5260e35d4d8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 52611b12faf6Smrg else 52621b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 52631b12faf6Smrg fi 52641b12faf6Smrg if test "$with_gnu_ld" = no; then 52651b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52661b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52671b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52681b12faf6Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 52691b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52701b12faf6Smrg # hardcode_minus_L: Not really in the search PATH, 52711b12faf6Smrg # but as the default location of the library. 52721b12faf6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52731b12faf6Smrg fi 52741b12faf6Smrg ;; 527532b578d3Smrg 52761b12faf6Smrg hpux11*) 5277e35d4d8eSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 52781b12faf6Smrg case $host_cpu in 52791b12faf6Smrg hppa*64*) 52801b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 52811b12faf6Smrg ;; 52821b12faf6Smrg ia64*) 5283e35d4d8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 52841b12faf6Smrg ;; 52851b12faf6Smrg *) 5286e35d4d8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 52871b12faf6Smrg ;; 52881b12faf6Smrg esac 52891b12faf6Smrg else 52901b12faf6Smrg case $host_cpu in 52911b12faf6Smrg hppa*64*) 52921b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 52931b12faf6Smrg ;; 52941b12faf6Smrg ia64*) 52951b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 52961b12faf6Smrg ;; 52971b12faf6Smrg *) 5298e35d4d8eSmrg m4_if($1, [], [ 5299e35d4d8eSmrg # Older versions of the 11.00 compiler do not understand -b yet 5300e35d4d8eSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5301e35d4d8eSmrg _LT_LINKER_OPTION([if $CC understands -b], 5302e35d4d8eSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5303e35d4d8eSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5304e35d4d8eSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5305e35d4d8eSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 53061b12faf6Smrg ;; 53071b12faf6Smrg esac 53081b12faf6Smrg fi 53091b12faf6Smrg if test "$with_gnu_ld" = no; then 53101b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 53111b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 531232b578d3Smrg 53131b12faf6Smrg case $host_cpu in 53141b12faf6Smrg hppa*64*|ia64*) 53151b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=no 53161b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53171b12faf6Smrg ;; 53181b12faf6Smrg *) 53191b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53201b12faf6Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 53211b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 532232b578d3Smrg 53231b12faf6Smrg # hardcode_minus_L: Not really in the search PATH, 53241b12faf6Smrg # but as the default location of the library. 53251b12faf6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 53261b12faf6Smrg ;; 53271b12faf6Smrg esac 53281b12faf6Smrg fi 53292a51b5beSmrg ;; 53301b12faf6Smrg 53311b12faf6Smrg irix5* | irix6* | nonstopux*) 53321b12faf6Smrg if test "$GCC" = yes; then 5333e35d4d8eSmrg _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' 53341b12faf6Smrg # Try to use the -exported_symbol ld option, if it does not 53351b12faf6Smrg # work, assume that -exports_file does not work either and 53361b12faf6Smrg # implicitly export all symbols. 5337e35d4d8eSmrg # This should be the same for all languages, so no per-tag cache variable. 5338e35d4d8eSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5339e35d4d8eSmrg [lt_cv_irix_exported_symbol], 5340e35d4d8eSmrg [save_LDFLAGS="$LDFLAGS" 5341e35d4d8eSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5342e35d4d8eSmrg AC_LINK_IFELSE( 5343e35d4d8eSmrg [AC_LANG_SOURCE( 5344e35d4d8eSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5345e35d4d8eSmrg [C++], [[int foo (void) { return 0; }]], 5346e35d4d8eSmrg [Fortran 77], [[ 5347e35d4d8eSmrg subroutine foo 5348e35d4d8eSmrg end]], 5349e35d4d8eSmrg [Fortran], [[ 5350e35d4d8eSmrg subroutine foo 5351e35d4d8eSmrg end]])])], 5352e35d4d8eSmrg [lt_cv_irix_exported_symbol=yes], 5353e35d4d8eSmrg [lt_cv_irix_exported_symbol=no]) 5354e35d4d8eSmrg LDFLAGS="$save_LDFLAGS"]) 5355e35d4d8eSmrg if test "$lt_cv_irix_exported_symbol" = yes; then 5356e35d4d8eSmrg _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' 5357e35d4d8eSmrg fi 53581b12faf6Smrg else 5359e35d4d8eSmrg _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' 5360e35d4d8eSmrg _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' 53611b12faf6Smrg fi 53621b12faf6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 53631b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53641b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53651b12faf6Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 53661b12faf6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 53672a51b5beSmrg ;; 5368d31dbc53Smrg 5369e35d4d8eSmrg netbsd*) 53701b12faf6Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 53711b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 53721b12faf6Smrg else 53731b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 53741b12faf6Smrg fi 53751b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 53761b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53771b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53781b12faf6Smrg ;; 5379d31dbc53Smrg 53801b12faf6Smrg newsos6) 53811b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 53821b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53831b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53841b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53851b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53861b12faf6Smrg ;; 538732b578d3Smrg 53881b12faf6Smrg *nto* | *qnx*) 53891b12faf6Smrg ;; 539032b578d3Smrg 53911b12faf6Smrg openbsd*) 53921b12faf6Smrg if test -f /usr/libexec/ld.so; then 53931b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53941b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53951b12faf6Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 53961b12faf6Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 53971b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 53981b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 53991b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 54001b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 54011b12faf6Smrg else 54021b12faf6Smrg case $host_os in 54031b12faf6Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 54041b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 54051b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54061b12faf6Smrg ;; 54071b12faf6Smrg *) 54081b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 54091b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 54101b12faf6Smrg ;; 54111b12faf6Smrg esac 54121b12faf6Smrg fi 54131b12faf6Smrg else 54141b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 54151b12faf6Smrg fi 54161b12faf6Smrg ;; 541732b578d3Smrg 54181b12faf6Smrg os2*) 54191b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54201b12faf6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54211b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5422e35d4d8eSmrg _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' 54231b12faf6Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 54241b12faf6Smrg ;; 542532b578d3Smrg 54261b12faf6Smrg osf3*) 54271b12faf6Smrg if test "$GCC" = yes; then 54281b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5429e35d4d8eSmrg _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' 54301b12faf6Smrg else 54311b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5432e35d4d8eSmrg _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' 54331b12faf6Smrg fi 54341b12faf6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54351b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54361b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 54371b12faf6Smrg ;; 543832b578d3Smrg 54391b12faf6Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 54401b12faf6Smrg if test "$GCC" = yes; then 54411b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5442e35d4d8eSmrg _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' 54431b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54441b12faf6Smrg else 54451b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5446e35d4d8eSmrg _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' 54471b12faf6Smrg _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~ 5448e35d4d8eSmrg $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' 544932b578d3Smrg 54501b12faf6Smrg # Both c and cxx compiler support -rpath directly 54511b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 54521b12faf6Smrg fi 54531b12faf6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54541b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 54551b12faf6Smrg ;; 545632b578d3Smrg 54571b12faf6Smrg solaris*) 54581b12faf6Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 54591b12faf6Smrg if test "$GCC" = yes; then 54601b12faf6Smrg wlarc='${wl}' 5461e35d4d8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 54621b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5463e35d4d8eSmrg $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' 54641b12faf6Smrg else 54651b12faf6Smrg case `$CC -V 2>&1` in 54661b12faf6Smrg *"Compilers 5.0"*) 54671b12faf6Smrg wlarc='' 54681b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 54691b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54701b12faf6Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 54711b12faf6Smrg ;; 54721b12faf6Smrg *) 54731b12faf6Smrg wlarc='${wl}' 54741b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 54751b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54761b12faf6Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 54771b12faf6Smrg ;; 54781b12faf6Smrg esac 54791b12faf6Smrg fi 54801b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54811b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 54821b12faf6Smrg case $host_os in 54831b12faf6Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 54841b12faf6Smrg *) 54851b12faf6Smrg # The compiler driver will combine and reorder linker options, 54861b12faf6Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 54871b12faf6Smrg # but is careful enough not to reorder. 54881b12faf6Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 54891b12faf6Smrg if test "$GCC" = yes; then 54901b12faf6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 54911b12faf6Smrg else 54921b12faf6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 54931b12faf6Smrg fi 54941b12faf6Smrg ;; 54951b12faf6Smrg esac 54961b12faf6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 54971b12faf6Smrg ;; 549832b578d3Smrg 54991b12faf6Smrg sunos4*) 55001b12faf6Smrg if test "x$host_vendor" = xsequent; then 55011b12faf6Smrg # Use $CC to link under sequent, because it throws in some extra .o 55021b12faf6Smrg # files that make .init and .fini sections work. 55031b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 55041b12faf6Smrg else 55051b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 55061b12faf6Smrg fi 55071b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55081b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 55091b12faf6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55101b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55111b12faf6Smrg ;; 551232b578d3Smrg 55131b12faf6Smrg sysv4) 55141b12faf6Smrg case $host_vendor in 55151b12faf6Smrg sni) 55161b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55171b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 55181b12faf6Smrg ;; 55191b12faf6Smrg siemens) 55201b12faf6Smrg ## LD is ld it makes a PLAMLIB 55211b12faf6Smrg ## CC just makes a GrossModule. 55221b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 55231b12faf6Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 55241b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=no 55251b12faf6Smrg ;; 55261b12faf6Smrg motorola) 55271b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55281b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 55291b12faf6Smrg ;; 55301b12faf6Smrg esac 55311b12faf6Smrg runpath_var='LD_RUN_PATH' 55321b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55331b12faf6Smrg ;; 5534d31dbc53Smrg 55351b12faf6Smrg sysv4.3*) 55361b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55371b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55381b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 55391b12faf6Smrg ;; 554032b578d3Smrg 55411b12faf6Smrg sysv4*MP*) 55421b12faf6Smrg if test -d /usr/nec; then 55431b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55441b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55451b12faf6Smrg runpath_var=LD_RUN_PATH 55461b12faf6Smrg hardcode_runpath_var=yes 55471b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 55481b12faf6Smrg fi 55491b12faf6Smrg ;; 555032b578d3Smrg 55511b12faf6Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 55521b12faf6Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55531b12faf6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55541b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55551b12faf6Smrg runpath_var='LD_RUN_PATH' 555632b578d3Smrg 55571b12faf6Smrg if test "$GCC" = yes; then 55581b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55591b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55601b12faf6Smrg else 55611b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55621b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55631b12faf6Smrg fi 55641b12faf6Smrg ;; 556532b578d3Smrg 55661b12faf6Smrg sysv5* | sco3.2v5* | sco5v6*) 55671b12faf6Smrg # Note: We can NOT use -z defs as we might desire, because we do not 55681b12faf6Smrg # link with -lc, and that would cause any symbols used from libc to 55691b12faf6Smrg # always be unresolved, which means just about no library would 55701b12faf6Smrg # ever link correctly. If we're not using GNU ld we use -z text 55711b12faf6Smrg # though, which does catch some bad symbols but isn't as heavy-handed 55721b12faf6Smrg # as -z defs. 55731b12faf6Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55741b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 55751b12faf6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55761b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55771b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 55781b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 55791b12faf6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 55801b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 55811b12faf6Smrg runpath_var='LD_RUN_PATH' 558232b578d3Smrg 55831b12faf6Smrg if test "$GCC" = yes; then 55841b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55851b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55861b12faf6Smrg else 55871b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55881b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55891b12faf6Smrg fi 55901b12faf6Smrg ;; 559132b578d3Smrg 55921b12faf6Smrg uts4*) 55931b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55941b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55951b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55961b12faf6Smrg ;; 559732b578d3Smrg 55981b12faf6Smrg *) 55991b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 56001b12faf6Smrg ;; 56011b12faf6Smrg esac 560232b578d3Smrg 56031b12faf6Smrg if test x$host_vendor = xsni; then 56041b12faf6Smrg case $host in 56051b12faf6Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 56061b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 56071b12faf6Smrg ;; 56081b12faf6Smrg esac 56091b12faf6Smrg fi 56101b12faf6Smrg fi 56111b12faf6Smrg]) 56121b12faf6SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 56131b12faf6Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 561432b578d3Smrg 56151b12faf6Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 561632b578d3Smrg 56171b12faf6Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 56181b12faf6Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 56191b12faf6Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 56201b12faf6Smrg [The commands to extract the exported symbol list from a shared archive]) 5621d31dbc53Smrg 56221b12faf6Smrg# 56231b12faf6Smrg# Do we need to explicitly link libc? 56241b12faf6Smrg# 56251b12faf6Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 56261b12faf6Smrgx|xyes) 56271b12faf6Smrg # Assume -lc should be added 56281b12faf6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5629d31dbc53Smrg 56301b12faf6Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 56311b12faf6Smrg case $_LT_TAGVAR(archive_cmds, $1) in 56321b12faf6Smrg *'~'*) 56331b12faf6Smrg # FIXME: we may have to deal with multi-command sequences. 56341b12faf6Smrg ;; 56351b12faf6Smrg '$CC '*) 56361b12faf6Smrg # Test whether the compiler implicitly links with -lc since on some 56371b12faf6Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 56381b12faf6Smrg # to ld, don't add -lc before -lgcc. 5639e35d4d8eSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5640e35d4d8eSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5641e35d4d8eSmrg [$RM conftest* 5642e35d4d8eSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5643e35d4d8eSmrg 5644e35d4d8eSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5645e35d4d8eSmrg soname=conftest 5646e35d4d8eSmrg lib=conftest 5647e35d4d8eSmrg libobjs=conftest.$ac_objext 5648e35d4d8eSmrg deplibs= 5649e35d4d8eSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5650e35d4d8eSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5651e35d4d8eSmrg compiler_flags=-v 5652e35d4d8eSmrg linker_flags=-v 5653e35d4d8eSmrg verstring= 5654e35d4d8eSmrg output_objdir=. 5655e35d4d8eSmrg libname=conftest 5656e35d4d8eSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5657e35d4d8eSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 5658e35d4d8eSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5659e35d4d8eSmrg then 5660e35d4d8eSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5661e35d4d8eSmrg else 5662e35d4d8eSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5663e35d4d8eSmrg fi 5664e35d4d8eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5665e35d4d8eSmrg else 5666e35d4d8eSmrg cat conftest.err 1>&5 5667e35d4d8eSmrg fi 5668e35d4d8eSmrg $RM conftest* 5669e35d4d8eSmrg ]) 5670e35d4d8eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 56711b12faf6Smrg ;; 56721b12faf6Smrg esac 56731b12faf6Smrg fi 56741b12faf6Smrg ;; 56751b12faf6Smrgesac 5676d31dbc53Smrg 56771b12faf6Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 56781b12faf6Smrg [Whether or not to add -lc for building shared libraries]) 56791b12faf6Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 56801b12faf6Smrg [enable_shared_with_static_runtimes], [0], 56811b12faf6Smrg [Whether or not to disallow shared libs when runtime libs are static]) 56821b12faf6Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 56831b12faf6Smrg [Compiler flag to allow reflexive dlopens]) 56841b12faf6Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 56851b12faf6Smrg [Compiler flag to generate shared objects directly from archives]) 56861b12faf6Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 56871b12faf6Smrg [Whether the compiler copes with passing no objects directly]) 56881b12faf6Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 56891b12faf6Smrg [Create an old-style archive from a shared archive]) 56901b12faf6Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 56911b12faf6Smrg [Create a temporary old-style archive to link instead of a shared archive]) 56921b12faf6Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 56931b12faf6Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 56941b12faf6Smrg_LT_TAGDECL([], [module_cmds], [2], 56951b12faf6Smrg [Commands used to build a loadable module if different from building 56961b12faf6Smrg a shared archive.]) 56971b12faf6Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 56981b12faf6Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 56991b12faf6Smrg [Whether we are building with GNU ld or not]) 57001b12faf6Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 57011b12faf6Smrg [Flag that allows shared libraries with undefined symbols to be built]) 57021b12faf6Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 57031b12faf6Smrg [Flag that enforces no undefined symbols]) 57041b12faf6Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 57051b12faf6Smrg [Flag to hardcode $libdir into a binary during linking. 57061b12faf6Smrg This must work even if $libdir does not exist]) 57071b12faf6Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 57081b12faf6Smrg [Whether we need a single "-rpath" flag with a separated argument]) 57091b12faf6Smrg_LT_TAGDECL([], [hardcode_direct], [0], 57101b12faf6Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57111b12faf6Smrg DIR into the resulting binary]) 57121b12faf6Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 57131b12faf6Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57141b12faf6Smrg DIR into the resulting binary and the resulting library dependency is 57151b12faf6Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 57161b12faf6Smrg library is relocated]) 57171b12faf6Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 57181b12faf6Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 57191b12faf6Smrg into the resulting binary]) 57201b12faf6Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 57211b12faf6Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 57221b12faf6Smrg into the resulting binary]) 57231b12faf6Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 57241b12faf6Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 57251b12faf6Smrg into the library and all subsequent libraries and executables linked 57261b12faf6Smrg against it]) 57271b12faf6Smrg_LT_TAGDECL([], [inherit_rpath], [0], 57281b12faf6Smrg [Set to yes if linker adds runtime paths of dependent libraries 57291b12faf6Smrg to runtime path list]) 57301b12faf6Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 57311b12faf6Smrg [Whether libtool must link a program against all its dependency libraries]) 57321b12faf6Smrg_LT_TAGDECL([], [always_export_symbols], [0], 57331b12faf6Smrg [Set to "yes" if exported symbols are required]) 57341b12faf6Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 57351b12faf6Smrg [The commands to list exported symbols]) 57361b12faf6Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 57371b12faf6Smrg [Symbols that should not be listed in the preloaded symbols]) 57381b12faf6Smrg_LT_TAGDECL([], [include_expsyms], [1], 57391b12faf6Smrg [Symbols that must always be exported]) 57401b12faf6Smrg_LT_TAGDECL([], [prelink_cmds], [2], 57411b12faf6Smrg [Commands necessary for linking programs (against libraries) with templates]) 5742e35d4d8eSmrg_LT_TAGDECL([], [postlink_cmds], [2], 5743e35d4d8eSmrg [Commands necessary for finishing linking programs]) 57441b12faf6Smrg_LT_TAGDECL([], [file_list_spec], [1], 57451b12faf6Smrg [Specify filename containing input files]) 57461b12faf6Smrgdnl FIXME: Not yet implemented 57471b12faf6Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 57481b12faf6Smrgdnl [Compiler flag to generate thread safe objects]) 57491b12faf6Smrg])# _LT_LINKER_SHLIBS 57501b12faf6Smrg 57511b12faf6Smrg 57521b12faf6Smrg# _LT_LANG_C_CONFIG([TAG]) 57531b12faf6Smrg# ------------------------ 57541b12faf6Smrg# Ensure that the configuration variables for a C compiler are suitably 57551b12faf6Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 57561b12faf6Smrg# the compiler configuration to `libtool'. 57571b12faf6Smrgm4_defun([_LT_LANG_C_CONFIG], 57581b12faf6Smrg[m4_require([_LT_DECL_EGREP])dnl 57591b12faf6Smrglt_save_CC="$CC" 57601b12faf6SmrgAC_LANG_PUSH(C) 5761d31dbc53Smrg 57621b12faf6Smrg# Source file extension for C test sources. 57631b12faf6Smrgac_ext=c 5764d31dbc53Smrg 57651b12faf6Smrg# Object file extension for compiled C test sources. 57661b12faf6Smrgobjext=o 57671b12faf6Smrg_LT_TAGVAR(objext, $1)=$objext 576832b578d3Smrg 57691b12faf6Smrg# Code to be used in simple compile tests 57701b12faf6Smrglt_simple_compile_test_code="int some_variable = 0;" 577132b578d3Smrg 57721b12faf6Smrg# Code to be used in simple link tests 57731b12faf6Smrglt_simple_link_test_code='int main(){return(0);}' 577432b578d3Smrg 57751b12faf6Smrg_LT_TAG_COMPILER 57761b12faf6Smrg# Save the default compiler, since it gets overwritten when the other 57771b12faf6Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 57781b12faf6Smrgcompiler_DEFAULT=$CC 577932b578d3Smrg 57801b12faf6Smrg# save warnings/boilerplate of simple test code 57811b12faf6Smrg_LT_COMPILER_BOILERPLATE 57821b12faf6Smrg_LT_LINKER_BOILERPLATE 578332b578d3Smrg 57841b12faf6Smrgif test -n "$compiler"; then 57851b12faf6Smrg _LT_COMPILER_NO_RTTI($1) 57861b12faf6Smrg _LT_COMPILER_PIC($1) 57871b12faf6Smrg _LT_COMPILER_C_O($1) 57881b12faf6Smrg _LT_COMPILER_FILE_LOCKS($1) 57891b12faf6Smrg _LT_LINKER_SHLIBS($1) 57901b12faf6Smrg _LT_SYS_DYNAMIC_LINKER($1) 57911b12faf6Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 57921b12faf6Smrg LT_SYS_DLOPEN_SELF 57931b12faf6Smrg _LT_CMD_STRIPLIB 57941b12faf6Smrg 57951b12faf6Smrg # Report which library types will actually be built 57961b12faf6Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 57971b12faf6Smrg AC_MSG_RESULT([$can_build_shared]) 57981b12faf6Smrg 57991b12faf6Smrg AC_MSG_CHECKING([whether to build shared libraries]) 58001b12faf6Smrg test "$can_build_shared" = "no" && enable_shared=no 58011b12faf6Smrg 58021b12faf6Smrg # On AIX, shared libraries and static libraries use the same namespace, and 58031b12faf6Smrg # are all built from PIC. 58041b12faf6Smrg case $host_os in 58051b12faf6Smrg aix3*) 58061b12faf6Smrg test "$enable_shared" = yes && enable_static=no 58071b12faf6Smrg if test -n "$RANLIB"; then 58081b12faf6Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 58091b12faf6Smrg postinstall_cmds='$RANLIB $lib' 58101b12faf6Smrg fi 58111b12faf6Smrg ;; 581232b578d3Smrg 58131b12faf6Smrg aix[[4-9]]*) 58141b12faf6Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 58151b12faf6Smrg test "$enable_shared" = yes && enable_static=no 58161b12faf6Smrg fi 58171b12faf6Smrg ;; 58181b12faf6Smrg esac 58191b12faf6Smrg AC_MSG_RESULT([$enable_shared]) 582032b578d3Smrg 58211b12faf6Smrg AC_MSG_CHECKING([whether to build static libraries]) 58221b12faf6Smrg # Make sure either enable_shared or enable_static is yes. 58231b12faf6Smrg test "$enable_shared" = yes || enable_static=yes 58241b12faf6Smrg AC_MSG_RESULT([$enable_static]) 582532b578d3Smrg 58261b12faf6Smrg _LT_CONFIG($1) 58271b12faf6Smrgfi 58281b12faf6SmrgAC_LANG_POP 58291b12faf6SmrgCC="$lt_save_CC" 58301b12faf6Smrg])# _LT_LANG_C_CONFIG 583132b578d3Smrg 583232b578d3Smrg 58331b12faf6Smrg# _LT_LANG_CXX_CONFIG([TAG]) 58341b12faf6Smrg# -------------------------- 58351b12faf6Smrg# Ensure that the configuration variables for a C++ compiler are suitably 58361b12faf6Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 58371b12faf6Smrg# the compiler configuration to `libtool'. 58381b12faf6Smrgm4_defun([_LT_LANG_CXX_CONFIG], 5839e35d4d8eSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 58401b12faf6Smrgm4_require([_LT_DECL_EGREP])dnl 5841e35d4d8eSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5842e35d4d8eSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5843e35d4d8eSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5844e35d4d8eSmrg (test "X$CXX" != "Xg++"))) ; then 5845e35d4d8eSmrg AC_PROG_CXXCPP 5846e35d4d8eSmrgelse 5847e35d4d8eSmrg _lt_caught_CXX_error=yes 5848e35d4d8eSmrgfi 58491b12faf6Smrg 58501b12faf6SmrgAC_LANG_PUSH(C++) 58511b12faf6Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 58521b12faf6Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 58531b12faf6Smrg_LT_TAGVAR(always_export_symbols, $1)=no 58541b12faf6Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 58551b12faf6Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 58561b12faf6Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 58571b12faf6Smrg_LT_TAGVAR(hardcode_direct, $1)=no 58581b12faf6Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 58591b12faf6Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 58601b12faf6Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 58611b12faf6Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 58621b12faf6Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 58631b12faf6Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 58641b12faf6Smrg_LT_TAGVAR(inherit_rpath, $1)=no 58651b12faf6Smrg_LT_TAGVAR(module_cmds, $1)= 58661b12faf6Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 58671b12faf6Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 58681b12faf6Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5869e35d4d8eSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 5870e35d4d8eSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 58711b12faf6Smrg_LT_TAGVAR(no_undefined_flag, $1)= 58721b12faf6Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 58731b12faf6Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 587432b578d3Smrg 58751b12faf6Smrg# Source file extension for C++ test sources. 58761b12faf6Smrgac_ext=cpp 587732b578d3Smrg 58781b12faf6Smrg# Object file extension for compiled C++ test sources. 58791b12faf6Smrgobjext=o 58801b12faf6Smrg_LT_TAGVAR(objext, $1)=$objext 58811b12faf6Smrg 58821b12faf6Smrg# No sense in running all these tests if we already determined that 58831b12faf6Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 58841b12faf6Smrg# are currently assumed to apply to all compilers on this platform, 58851b12faf6Smrg# and will be corrupted by setting them based on a non-working compiler. 58861b12faf6Smrgif test "$_lt_caught_CXX_error" != yes; then 58871b12faf6Smrg # Code to be used in simple compile tests 58881b12faf6Smrg lt_simple_compile_test_code="int some_variable = 0;" 58891b12faf6Smrg 58901b12faf6Smrg # Code to be used in simple link tests 58911b12faf6Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 58921b12faf6Smrg 58931b12faf6Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 58941b12faf6Smrg _LT_TAG_COMPILER 58951b12faf6Smrg 58961b12faf6Smrg # save warnings/boilerplate of simple test code 58971b12faf6Smrg _LT_COMPILER_BOILERPLATE 58981b12faf6Smrg _LT_LINKER_BOILERPLATE 58991b12faf6Smrg 59001b12faf6Smrg # Allow CC to be a program name with arguments. 59011b12faf6Smrg lt_save_CC=$CC 5902e35d4d8eSmrg lt_save_CFLAGS=$CFLAGS 59031b12faf6Smrg lt_save_LD=$LD 59041b12faf6Smrg lt_save_GCC=$GCC 59051b12faf6Smrg GCC=$GXX 59061b12faf6Smrg lt_save_with_gnu_ld=$with_gnu_ld 59071b12faf6Smrg lt_save_path_LD=$lt_cv_path_LD 59081b12faf6Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 59091b12faf6Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 59101b12faf6Smrg else 59111b12faf6Smrg $as_unset lt_cv_prog_gnu_ld 59121b12faf6Smrg fi 59131b12faf6Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 59141b12faf6Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 59151b12faf6Smrg else 59161b12faf6Smrg $as_unset lt_cv_path_LD 59171b12faf6Smrg fi 59181b12faf6Smrg test -z "${LDCXX+set}" || LD=$LDCXX 59191b12faf6Smrg CC=${CXX-"c++"} 5920e35d4d8eSmrg CFLAGS=$CXXFLAGS 59211b12faf6Smrg compiler=$CC 59221b12faf6Smrg _LT_TAGVAR(compiler, $1)=$CC 59231b12faf6Smrg _LT_CC_BASENAME([$compiler]) 592432b578d3Smrg 59251b12faf6Smrg if test -n "$compiler"; then 59261b12faf6Smrg # We don't want -fno-exception when compiling C++ code, so set the 59271b12faf6Smrg # no_builtin_flag separately 59281b12faf6Smrg if test "$GXX" = yes; then 59291b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 59301b12faf6Smrg else 59311b12faf6Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 59321b12faf6Smrg fi 593332b578d3Smrg 59341b12faf6Smrg if test "$GXX" = yes; then 59351b12faf6Smrg # Set up default GNU C++ configuration 593632b578d3Smrg 59371b12faf6Smrg LT_PATH_LD 593832b578d3Smrg 59391b12faf6Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 59401b12faf6Smrg # archiving commands below assume that GNU ld is being used. 59411b12faf6Smrg if test "$with_gnu_ld" = yes; then 5942e35d4d8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5943e35d4d8eSmrg _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' 594432b578d3Smrg 59451b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59461b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 594732b578d3Smrg 59481b12faf6Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 59491b12faf6Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 59501b12faf6Smrg # investigate it a little bit more. (MM) 59511b12faf6Smrg wlarc='${wl}' 5952d31dbc53Smrg 59531b12faf6Smrg # ancient GNU ld didn't support --whole-archive et. al. 59541b12faf6Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 59551b12faf6Smrg $GREP 'no-whole-archive' > /dev/null; then 59561b12faf6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 59571b12faf6Smrg else 59581b12faf6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59591b12faf6Smrg fi 59601b12faf6Smrg else 59611b12faf6Smrg with_gnu_ld=no 59621b12faf6Smrg wlarc= 59631b12faf6Smrg 59641b12faf6Smrg # A generic and very simple default shared library creation 59651b12faf6Smrg # command for GNU C++ for the case where it uses the native 59661b12faf6Smrg # linker, instead of GNU ld. If possible, this setting should 59671b12faf6Smrg # overridden to take advantage of the native linker features on 59681b12faf6Smrg # the platform it is being used on. 59691b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 59701b12faf6Smrg fi 597132b578d3Smrg 59721b12faf6Smrg # Commands to make compiler produce verbose output that lists 59731b12faf6Smrg # what "hidden" libraries, object files and flags are used when 59741b12faf6Smrg # linking a shared library. 5975e35d4d8eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 597632b578d3Smrg 59771b12faf6Smrg else 59781b12faf6Smrg GXX=no 59791b12faf6Smrg with_gnu_ld=no 59801b12faf6Smrg wlarc= 59811b12faf6Smrg fi 598232b578d3Smrg 59831b12faf6Smrg # PORTME: fill in a description of your system's C++ link characteristics 59841b12faf6Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 59851b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 59861b12faf6Smrg case $host_os in 59871b12faf6Smrg aix3*) 59881b12faf6Smrg # FIXME: insert proper C++ library support 59891b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 59901b12faf6Smrg ;; 59911b12faf6Smrg aix[[4-9]]*) 59921b12faf6Smrg if test "$host_cpu" = ia64; then 59931b12faf6Smrg # On IA64, the linker does run time linking by default, so we don't 59941b12faf6Smrg # have to do anything special. 59951b12faf6Smrg aix_use_runtimelinking=no 59961b12faf6Smrg exp_sym_flag='-Bexport' 59971b12faf6Smrg no_entry_flag="" 59981b12faf6Smrg else 59991b12faf6Smrg aix_use_runtimelinking=no 60001b12faf6Smrg 60011b12faf6Smrg # Test if we are trying to use run time linking or normal 60021b12faf6Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 60031b12faf6Smrg # need to do runtime linking. 60041b12faf6Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 60051b12faf6Smrg for ld_flag in $LDFLAGS; do 60061b12faf6Smrg case $ld_flag in 60071b12faf6Smrg *-brtl*) 60081b12faf6Smrg aix_use_runtimelinking=yes 60091b12faf6Smrg break 60101b12faf6Smrg ;; 60111b12faf6Smrg esac 60121b12faf6Smrg done 60131b12faf6Smrg ;; 60141b12faf6Smrg esac 601532b578d3Smrg 60161b12faf6Smrg exp_sym_flag='-bexport' 60171b12faf6Smrg no_entry_flag='-bnoentry' 60181b12faf6Smrg fi 601932b578d3Smrg 60201b12faf6Smrg # When large executables or shared objects are built, AIX ld can 60211b12faf6Smrg # have problems creating the table of contents. If linking a library 60221b12faf6Smrg # or program results in "error TOC overflow" add -mminimal-toc to 60231b12faf6Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 60241b12faf6Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 60251b12faf6Smrg 60261b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='' 60271b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 60281b12faf6Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 60291b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60301b12faf6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60311b12faf6Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 60321b12faf6Smrg 60331b12faf6Smrg if test "$GXX" = yes; then 60341b12faf6Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 60351b12faf6Smrg # We only want to do this on AIX 4.2 and lower, the check 60361b12faf6Smrg # below for broken collect2 doesn't work under 4.3+ 60371b12faf6Smrg collect2name=`${CC} -print-prog-name=collect2` 60381b12faf6Smrg if test -f "$collect2name" && 60391b12faf6Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 60401b12faf6Smrg then 60411b12faf6Smrg # We have reworked collect2 60421b12faf6Smrg : 60431b12faf6Smrg else 60441b12faf6Smrg # We have old collect2 60451b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 60461b12faf6Smrg # It fails to find uninstalled libraries when the uninstalled 60471b12faf6Smrg # path is not listed in the libpath. Setting hardcode_minus_L 60481b12faf6Smrg # to unsupported forces relinking 60491b12faf6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 60501b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60511b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 60521b12faf6Smrg fi 60531b12faf6Smrg esac 60541b12faf6Smrg shared_flag='-shared' 60551b12faf6Smrg if test "$aix_use_runtimelinking" = yes; then 60561b12faf6Smrg shared_flag="$shared_flag "'${wl}-G' 60571b12faf6Smrg fi 60581b12faf6Smrg else 60591b12faf6Smrg # not using gcc 60601b12faf6Smrg if test "$host_cpu" = ia64; then 60611b12faf6Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 60621b12faf6Smrg # chokes on -Wl,-G. The following line is correct: 60631b12faf6Smrg shared_flag='-G' 60641b12faf6Smrg else 60651b12faf6Smrg if test "$aix_use_runtimelinking" = yes; then 60661b12faf6Smrg shared_flag='${wl}-G' 60671b12faf6Smrg else 60681b12faf6Smrg shared_flag='${wl}-bM:SRE' 60691b12faf6Smrg fi 60701b12faf6Smrg fi 60711b12faf6Smrg fi 607232b578d3Smrg 60731b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 60741b12faf6Smrg # It seems that -bexpall does not export symbols beginning with 60751b12faf6Smrg # underscore (_), so it is better to generate a list of symbols to 60761b12faf6Smrg # export. 60771b12faf6Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 60781b12faf6Smrg if test "$aix_use_runtimelinking" = yes; then 60791b12faf6Smrg # Warning - without using the other runtime loading flags (-brtl), 60801b12faf6Smrg # -berok will link without error, but may produce a broken library. 60811b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 60821b12faf6Smrg # Determine the default libpath from the value encoded in an empty 60831b12faf6Smrg # executable. 6084e35d4d8eSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 60851b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60861b12faf6Smrg 6087e35d4d8eSmrg _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" 60881b12faf6Smrg else 60891b12faf6Smrg if test "$host_cpu" = ia64; then 60901b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 60911b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 60921b12faf6Smrg _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" 60931b12faf6Smrg else 60941b12faf6Smrg # Determine the default libpath from the value encoded in an 60951b12faf6Smrg # empty executable. 6096e35d4d8eSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 60971b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60981b12faf6Smrg # Warning - without using the other run time loading flags, 60991b12faf6Smrg # -berok will link without error, but may produce a broken library. 61001b12faf6Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 61011b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6102e35d4d8eSmrg if test "$with_gnu_ld" = yes; then 6103e35d4d8eSmrg # We only use this code for GNU lds that support --whole-archive. 6104e35d4d8eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6105e35d4d8eSmrg else 6106e35d4d8eSmrg # Exported symbols can be pulled into shared objects from archives 6107e35d4d8eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6108e35d4d8eSmrg fi 61091b12faf6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61101b12faf6Smrg # This is similar to how AIX traditionally builds its shared 61111b12faf6Smrg # libraries. 61121b12faf6Smrg _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' 61131b12faf6Smrg fi 61141b12faf6Smrg fi 61151b12faf6Smrg ;; 611632b578d3Smrg 61171b12faf6Smrg beos*) 61181b12faf6Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 61191b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61201b12faf6Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 61211b12faf6Smrg # support --undefined. This deserves some investigation. FIXME 61221b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 61231b12faf6Smrg else 61241b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61251b12faf6Smrg fi 61261b12faf6Smrg ;; 612732b578d3Smrg 61281b12faf6Smrg chorus*) 61291b12faf6Smrg case $cc_basename in 61301b12faf6Smrg *) 61311b12faf6Smrg # FIXME: insert proper C++ library support 61321b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61331b12faf6Smrg ;; 61341b12faf6Smrg esac 61351b12faf6Smrg ;; 613632b578d3Smrg 61371b12faf6Smrg cygwin* | mingw* | pw32* | cegcc*) 6138e35d4d8eSmrg case $GXX,$cc_basename in 6139e35d4d8eSmrg ,cl* | no,cl*) 6140e35d4d8eSmrg # Native MSVC 6141e35d4d8eSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6142e35d4d8eSmrg # no search path for DLLs. 6143e35d4d8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6144e35d4d8eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6145e35d4d8eSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6146e35d4d8eSmrg _LT_TAGVAR(file_list_spec, $1)='@' 6147e35d4d8eSmrg # Tell ltmain to make .lib files, not .a files. 6148e35d4d8eSmrg libext=lib 6149e35d4d8eSmrg # Tell ltmain to make .dll files, not .so files. 6150e35d4d8eSmrg shrext_cmds=".dll" 6151e35d4d8eSmrg # FIXME: Setting linknames here is a bad hack. 6152e35d4d8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6153e35d4d8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6154e35d4d8eSmrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6155e35d4d8eSmrg else 6156e35d4d8eSmrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6157e35d4d8eSmrg fi~ 6158e35d4d8eSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6159e35d4d8eSmrg linknames=' 6160e35d4d8eSmrg # The linker will not automatically build a static lib if we build a DLL. 6161e35d4d8eSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6162e35d4d8eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6163e35d4d8eSmrg # Don't use ranlib 6164e35d4d8eSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6165e35d4d8eSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6166e35d4d8eSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6167e35d4d8eSmrg case $lt_outputfile in 6168e35d4d8eSmrg *.exe|*.EXE) ;; 6169e35d4d8eSmrg *) 6170e35d4d8eSmrg lt_outputfile="$lt_outputfile.exe" 6171e35d4d8eSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 6172e35d4d8eSmrg ;; 6173e35d4d8eSmrg esac~ 6174e35d4d8eSmrg func_to_tool_file "$lt_outputfile"~ 6175e35d4d8eSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6176e35d4d8eSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6177e35d4d8eSmrg $RM "$lt_outputfile.manifest"; 6178e35d4d8eSmrg fi' 6179e35d4d8eSmrg ;; 6180e35d4d8eSmrg *) 6181e35d4d8eSmrg # g++ 6182e35d4d8eSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6183e35d4d8eSmrg # as there is no search path for DLLs. 6184e35d4d8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6185e35d4d8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6186e35d4d8eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6187e35d4d8eSmrg _LT_TAGVAR(always_export_symbols, $1)=no 6188e35d4d8eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6189e35d4d8eSmrg 6190e35d4d8eSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6191e35d4d8eSmrg _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' 6192e35d4d8eSmrg # If the export-symbols file already is a .def file (1st line 6193e35d4d8eSmrg # is EXPORTS), use it as is; otherwise, prepend... 6194e35d4d8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6195e35d4d8eSmrg cp $export_symbols $output_objdir/$soname.def; 6196e35d4d8eSmrg else 6197e35d4d8eSmrg echo EXPORTS > $output_objdir/$soname.def; 6198e35d4d8eSmrg cat $export_symbols >> $output_objdir/$soname.def; 6199e35d4d8eSmrg fi~ 6200e35d4d8eSmrg $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' 6201e35d4d8eSmrg else 6202e35d4d8eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6203e35d4d8eSmrg fi 6204e35d4d8eSmrg ;; 6205e35d4d8eSmrg esac 6206e35d4d8eSmrg ;; 62071b12faf6Smrg darwin* | rhapsody*) 62081b12faf6Smrg _LT_DARWIN_LINKER_FEATURES($1) 62091b12faf6Smrg ;; 621032b578d3Smrg 62111b12faf6Smrg dgux*) 62121b12faf6Smrg case $cc_basename in 62131b12faf6Smrg ec++*) 62141b12faf6Smrg # FIXME: insert proper C++ library support 62151b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62161b12faf6Smrg ;; 62171b12faf6Smrg ghcx*) 62181b12faf6Smrg # Green Hills C++ Compiler 62191b12faf6Smrg # FIXME: insert proper C++ library support 62201b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62211b12faf6Smrg ;; 62221b12faf6Smrg *) 62231b12faf6Smrg # FIXME: insert proper C++ library support 62241b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62251b12faf6Smrg ;; 62261b12faf6Smrg esac 62271b12faf6Smrg ;; 622832b578d3Smrg 6229e35d4d8eSmrg freebsd2.*) 62301b12faf6Smrg # C++ shared libraries reported to be fairly broken before 62311b12faf6Smrg # switch to ELF 62321b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62331b12faf6Smrg ;; 623432b578d3Smrg 62351b12faf6Smrg freebsd-elf*) 62361b12faf6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 62371b12faf6Smrg ;; 623832b578d3Smrg 62391b12faf6Smrg freebsd* | dragonfly*) 62401b12faf6Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 62411b12faf6Smrg # conventions 62421b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 62431b12faf6Smrg ;; 624432b578d3Smrg 62451b12faf6Smrg gnu*) 62461b12faf6Smrg ;; 624732b578d3Smrg 6248e35d4d8eSmrg haiku*) 6249e35d4d8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6250e35d4d8eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6251e35d4d8eSmrg ;; 6252e35d4d8eSmrg 62531b12faf6Smrg hpux9*) 62541b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62551b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62561b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62571b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 62581b12faf6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 62591b12faf6Smrg # but as the default 62601b12faf6Smrg # location of the library. 62611b12faf6Smrg 62621b12faf6Smrg case $cc_basename in 62631b12faf6Smrg CC*) 62641b12faf6Smrg # FIXME: insert proper C++ library support 62651b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62661b12faf6Smrg ;; 62671b12faf6Smrg aCC*) 62681b12faf6Smrg _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' 62691b12faf6Smrg # Commands to make compiler produce verbose output that lists 62701b12faf6Smrg # what "hidden" libraries, object files and flags are used when 62711b12faf6Smrg # linking a shared library. 62721b12faf6Smrg # 62731b12faf6Smrg # There doesn't appear to be a way to prevent this compiler from 62741b12faf6Smrg # explicitly linking system object files so we need to strip them 62751b12faf6Smrg # from the output so that they don't get included in the library 62761b12faf6Smrg # dependencies. 6277e35d4d8eSmrg 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"' 62781b12faf6Smrg ;; 62791b12faf6Smrg *) 62801b12faf6Smrg if test "$GXX" = yes; then 6281e35d4d8eSmrg _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' 62821b12faf6Smrg else 62831b12faf6Smrg # FIXME: insert proper C++ library support 62841b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62851b12faf6Smrg fi 62861b12faf6Smrg ;; 62871b12faf6Smrg esac 62881b12faf6Smrg ;; 628932b578d3Smrg 62901b12faf6Smrg hpux10*|hpux11*) 62911b12faf6Smrg if test $with_gnu_ld = no; then 62921b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62931b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62941b12faf6Smrg 62951b12faf6Smrg case $host_cpu in 62961b12faf6Smrg hppa*64*|ia64*) 62971b12faf6Smrg ;; 62981b12faf6Smrg *) 62991b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63001b12faf6Smrg ;; 63011b12faf6Smrg esac 63021b12faf6Smrg fi 63031b12faf6Smrg case $host_cpu in 63041b12faf6Smrg hppa*64*|ia64*) 63051b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=no 63061b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63071b12faf6Smrg ;; 63081b12faf6Smrg *) 63091b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63101b12faf6Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63111b12faf6Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 63121b12faf6Smrg # but as the default 63131b12faf6Smrg # location of the library. 63141b12faf6Smrg ;; 63151b12faf6Smrg esac 63161b12faf6Smrg 63171b12faf6Smrg case $cc_basename in 63181b12faf6Smrg CC*) 63191b12faf6Smrg # FIXME: insert proper C++ library support 63201b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 63211b12faf6Smrg ;; 63221b12faf6Smrg aCC*) 63231b12faf6Smrg case $host_cpu in 63241b12faf6Smrg hppa*64*) 63251b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63261b12faf6Smrg ;; 63271b12faf6Smrg ia64*) 63281b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63291b12faf6Smrg ;; 63301b12faf6Smrg *) 63311b12faf6Smrg _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' 63321b12faf6Smrg ;; 63331b12faf6Smrg esac 63341b12faf6Smrg # Commands to make compiler produce verbose output that lists 63351b12faf6Smrg # what "hidden" libraries, object files and flags are used when 63361b12faf6Smrg # linking a shared library. 63371b12faf6Smrg # 63381b12faf6Smrg # There doesn't appear to be a way to prevent this compiler from 63391b12faf6Smrg # explicitly linking system object files so we need to strip them 63401b12faf6Smrg # from the output so that they don't get included in the library 63411b12faf6Smrg # dependencies. 6342e35d4d8eSmrg 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"' 63431b12faf6Smrg ;; 63441b12faf6Smrg *) 63451b12faf6Smrg if test "$GXX" = yes; then 63461b12faf6Smrg if test $with_gnu_ld = no; then 63471b12faf6Smrg case $host_cpu in 63481b12faf6Smrg hppa*64*) 63491b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63501b12faf6Smrg ;; 63511b12faf6Smrg ia64*) 6352e35d4d8eSmrg _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' 63531b12faf6Smrg ;; 63541b12faf6Smrg *) 6355e35d4d8eSmrg _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' 63561b12faf6Smrg ;; 63571b12faf6Smrg esac 63581b12faf6Smrg fi 63591b12faf6Smrg else 63601b12faf6Smrg # FIXME: insert proper C++ library support 63611b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 63621b12faf6Smrg fi 63631b12faf6Smrg ;; 63641b12faf6Smrg esac 63651b12faf6Smrg ;; 636632b578d3Smrg 63671b12faf6Smrg interix[[3-9]]*) 63681b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=no 63691b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63701b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 63711b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63721b12faf6Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 63731b12faf6Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 63741b12faf6Smrg # default) and relocated if they conflict, which is a slow very memory 63751b12faf6Smrg # consuming and fragmenting process. To avoid this, we pick a random, 63761b12faf6Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 63771b12faf6Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 63781b12faf6Smrg _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' 63791b12faf6Smrg _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' 63801b12faf6Smrg ;; 63811b12faf6Smrg irix5* | irix6*) 63821b12faf6Smrg case $cc_basename in 63831b12faf6Smrg CC*) 63841b12faf6Smrg # SGI C++ 6385e35d4d8eSmrg _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' 63861b12faf6Smrg 63871b12faf6Smrg # Archives containing C++ object files must be created using 63881b12faf6Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 63891b12faf6Smrg # necessary to make sure instantiated templates are included 63901b12faf6Smrg # in the archive. 63911b12faf6Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 63921b12faf6Smrg ;; 63931b12faf6Smrg *) 63941b12faf6Smrg if test "$GXX" = yes; then 63951b12faf6Smrg if test "$with_gnu_ld" = no; then 6396e35d4d8eSmrg _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' 63971b12faf6Smrg else 6398e35d4d8eSmrg _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' 63991b12faf6Smrg fi 64001b12faf6Smrg fi 64011b12faf6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 64021b12faf6Smrg ;; 64031b12faf6Smrg esac 64041b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64051b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64061b12faf6Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 64071b12faf6Smrg ;; 640832b578d3Smrg 64091b12faf6Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 64101b12faf6Smrg case $cc_basename in 64111b12faf6Smrg KCC*) 64121b12faf6Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 641332b578d3Smrg 64141b12faf6Smrg # KCC will only create a shared library if the output file 64151b12faf6Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 64161b12faf6Smrg # to its proper name (with version) after linking. 64171b12faf6Smrg _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' 64181b12faf6Smrg _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' 64191b12faf6Smrg # Commands to make compiler produce verbose output that lists 64201b12faf6Smrg # what "hidden" libraries, object files and flags are used when 64211b12faf6Smrg # linking a shared library. 64221b12faf6Smrg # 64231b12faf6Smrg # There doesn't appear to be a way to prevent this compiler from 64241b12faf6Smrg # explicitly linking system object files so we need to strip them 64251b12faf6Smrg # from the output so that they don't get included in the library 64261b12faf6Smrg # dependencies. 6427e35d4d8eSmrg 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"' 64281b12faf6Smrg 64291b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64301b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64311b12faf6Smrg 64321b12faf6Smrg # Archives containing C++ object files must be created using 64331b12faf6Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 64341b12faf6Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 64351b12faf6Smrg ;; 64361b12faf6Smrg icpc* | ecpc* ) 64371b12faf6Smrg # Intel C++ 64381b12faf6Smrg with_gnu_ld=yes 64391b12faf6Smrg # version 8.0 and above of icpc choke on multiply defined symbols 64401b12faf6Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 64411b12faf6Smrg # earlier do not add the objects themselves. 64421b12faf6Smrg case `$CC -V 2>&1` in 64431b12faf6Smrg *"Version 7."*) 64441b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 64451b12faf6Smrg _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' 64461b12faf6Smrg ;; 64471b12faf6Smrg *) # Version 8.0 or newer 64481b12faf6Smrg tmp_idyn= 64491b12faf6Smrg case $host_cpu in 64501b12faf6Smrg ia64*) tmp_idyn=' -i_dynamic';; 64511b12faf6Smrg esac 64521b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 64531b12faf6Smrg _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' 64541b12faf6Smrg ;; 64551b12faf6Smrg esac 64561b12faf6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 64571b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64581b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64591b12faf6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 64601b12faf6Smrg ;; 64611b12faf6Smrg pgCC* | pgcpp*) 64621b12faf6Smrg # Portland Group C++ compiler 64631b12faf6Smrg case `$CC -V` in 6464e35d4d8eSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 64651b12faf6Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 64661b12faf6Smrg rm -rf $tpldir~ 64671b12faf6Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6468e35d4d8eSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 64691b12faf6Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 64701b12faf6Smrg rm -rf $tpldir~ 64711b12faf6Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6472e35d4d8eSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 64731b12faf6Smrg $RANLIB $oldlib' 64741b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 64751b12faf6Smrg rm -rf $tpldir~ 64761b12faf6Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6477e35d4d8eSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64781b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 64791b12faf6Smrg rm -rf $tpldir~ 64801b12faf6Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6481e35d4d8eSmrg $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' 64821b12faf6Smrg ;; 6483e35d4d8eSmrg *) # Version 6 and above use weak symbols 64841b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64851b12faf6Smrg _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' 64861b12faf6Smrg ;; 64871b12faf6Smrg esac 648832b578d3Smrg 64891b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 64901b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6491e35d4d8eSmrg _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' 64921b12faf6Smrg ;; 64931b12faf6Smrg cxx*) 64941b12faf6Smrg # Compaq C++ 64951b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 64961b12faf6Smrg _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' 649732b578d3Smrg 64981b12faf6Smrg runpath_var=LD_RUN_PATH 64991b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 65001b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 650132b578d3Smrg 65021b12faf6Smrg # Commands to make compiler produce verbose output that lists 65031b12faf6Smrg # what "hidden" libraries, object files and flags are used when 65041b12faf6Smrg # linking a shared library. 65051b12faf6Smrg # 65061b12faf6Smrg # There doesn't appear to be a way to prevent this compiler from 65071b12faf6Smrg # explicitly linking system object files so we need to strip them 65081b12faf6Smrg # from the output so that they don't get included in the library 65091b12faf6Smrg # dependencies. 6510e35d4d8eSmrg 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' 65111b12faf6Smrg ;; 6512e35d4d8eSmrg xl* | mpixl* | bgxl*) 65131b12faf6Smrg # IBM XL 8.0 on PPC, with GNU ld 65141b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65151b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 65161b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 65171b12faf6Smrg if test "x$supports_anon_versioning" = xyes; then 65181b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 65191b12faf6Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 65201b12faf6Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 65211b12faf6Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 65221b12faf6Smrg fi 65231b12faf6Smrg ;; 65241b12faf6Smrg *) 65251b12faf6Smrg case `$CC -V 2>&1 | sed 5q` in 65261b12faf6Smrg *Sun\ C*) 65271b12faf6Smrg # Sun C++ 5.9 65281b12faf6Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 65291b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 65301b12faf6Smrg _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' 65311b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6532e35d4d8eSmrg _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' 65331b12faf6Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 65341b12faf6Smrg 65351b12faf6Smrg # Not sure whether something based on 65361b12faf6Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 65371b12faf6Smrg # would be better. 6538e35d4d8eSmrg output_verbose_link_cmd='func_echo_all' 65391b12faf6Smrg 65401b12faf6Smrg # Archives containing C++ object files must be created using 65411b12faf6Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 65421b12faf6Smrg # necessary to make sure instantiated templates are included 65431b12faf6Smrg # in the archive. 65441b12faf6Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 65451b12faf6Smrg ;; 65461b12faf6Smrg esac 65471b12faf6Smrg ;; 65481b12faf6Smrg esac 65491b12faf6Smrg ;; 655032b578d3Smrg 65511b12faf6Smrg lynxos*) 65521b12faf6Smrg # FIXME: insert proper C++ library support 65531b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65541b12faf6Smrg ;; 655532b578d3Smrg 65561b12faf6Smrg m88k*) 65571b12faf6Smrg # FIXME: insert proper C++ library support 65581b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65591b12faf6Smrg ;; 656032b578d3Smrg 65611b12faf6Smrg mvs*) 65621b12faf6Smrg case $cc_basename in 65631b12faf6Smrg cxx*) 65641b12faf6Smrg # FIXME: insert proper C++ library support 65651b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65661b12faf6Smrg ;; 65671b12faf6Smrg *) 65681b12faf6Smrg # FIXME: insert proper C++ library support 65691b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65701b12faf6Smrg ;; 65711b12faf6Smrg esac 65721b12faf6Smrg ;; 657332b578d3Smrg 65741b12faf6Smrg netbsd*) 65751b12faf6Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 65761b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 65771b12faf6Smrg wlarc= 65781b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65791b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65801b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65811b12faf6Smrg fi 65821b12faf6Smrg # Workaround some broken pre-1.5 toolchains 65831b12faf6Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 65841b12faf6Smrg ;; 658532b578d3Smrg 65861b12faf6Smrg *nto* | *qnx*) 65871b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 65881b12faf6Smrg ;; 658932b578d3Smrg 65901b12faf6Smrg openbsd2*) 65911b12faf6Smrg # C++ shared libraries are fairly broken 65921b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65931b12faf6Smrg ;; 659432b578d3Smrg 65951b12faf6Smrg openbsd*) 65961b12faf6Smrg if test -f /usr/libexec/ld.so; then 65971b12faf6Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65981b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65991b12faf6Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 66001b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 66011b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 66021b12faf6Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 66031b12faf6Smrg _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' 66041b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 66051b12faf6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 66061b12faf6Smrg fi 6607e35d4d8eSmrg output_verbose_link_cmd=func_echo_all 66081b12faf6Smrg else 66091b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66101b12faf6Smrg fi 66111b12faf6Smrg ;; 661232b578d3Smrg 66131b12faf6Smrg osf3* | osf4* | osf5*) 66141b12faf6Smrg case $cc_basename in 66151b12faf6Smrg KCC*) 66161b12faf6Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 66171b12faf6Smrg 66181b12faf6Smrg # KCC will only create a shared library if the output file 66191b12faf6Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 66201b12faf6Smrg # to its proper name (with version) after linking. 66211b12faf6Smrg _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' 66221b12faf6Smrg 66231b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 66241b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66251b12faf6Smrg 66261b12faf6Smrg # Archives containing C++ object files must be created using 66271b12faf6Smrg # the KAI C++ compiler. 66281b12faf6Smrg case $host in 66291b12faf6Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 66301b12faf6Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 66311b12faf6Smrg esac 66321b12faf6Smrg ;; 66331b12faf6Smrg RCC*) 66341b12faf6Smrg # Rational C++ 2.4.1 66351b12faf6Smrg # FIXME: insert proper C++ library support 66361b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66371b12faf6Smrg ;; 66381b12faf6Smrg cxx*) 66391b12faf6Smrg case $host in 66401b12faf6Smrg osf3*) 66411b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6642e35d4d8eSmrg _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' 66431b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66441b12faf6Smrg ;; 66451b12faf6Smrg *) 66461b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6647e35d4d8eSmrg _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' 66481b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 66491b12faf6Smrg echo "-hidden">> $lib.exp~ 6650e35d4d8eSmrg $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~ 66511b12faf6Smrg $RM $lib.exp' 66521b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 66531b12faf6Smrg ;; 66541b12faf6Smrg esac 665532b578d3Smrg 66561b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 665732b578d3Smrg 66581b12faf6Smrg # Commands to make compiler produce verbose output that lists 66591b12faf6Smrg # what "hidden" libraries, object files and flags are used when 66601b12faf6Smrg # linking a shared library. 66611b12faf6Smrg # 66621b12faf6Smrg # There doesn't appear to be a way to prevent this compiler from 66631b12faf6Smrg # explicitly linking system object files so we need to strip them 66641b12faf6Smrg # from the output so that they don't get included in the library 66651b12faf6Smrg # dependencies. 6666e35d4d8eSmrg 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"' 66671b12faf6Smrg ;; 66681b12faf6Smrg *) 66691b12faf6Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 66701b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 66711b12faf6Smrg case $host in 66721b12faf6Smrg osf3*) 6673e35d4d8eSmrg _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' 66741b12faf6Smrg ;; 66751b12faf6Smrg *) 6676e35d4d8eSmrg _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' 66771b12faf6Smrg ;; 66781b12faf6Smrg esac 66791b12faf6Smrg 66801b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66811b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66821b12faf6Smrg 66831b12faf6Smrg # Commands to make compiler produce verbose output that lists 66841b12faf6Smrg # what "hidden" libraries, object files and flags are used when 66851b12faf6Smrg # linking a shared library. 6686e35d4d8eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 66871b12faf6Smrg 66881b12faf6Smrg else 66891b12faf6Smrg # FIXME: insert proper C++ library support 66901b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66911b12faf6Smrg fi 66921b12faf6Smrg ;; 66931b12faf6Smrg esac 66941b12faf6Smrg ;; 669532b578d3Smrg 66961b12faf6Smrg psos*) 66971b12faf6Smrg # FIXME: insert proper C++ library support 66981b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66991b12faf6Smrg ;; 670032b578d3Smrg 67011b12faf6Smrg sunos4*) 67021b12faf6Smrg case $cc_basename in 67031b12faf6Smrg CC*) 67041b12faf6Smrg # Sun C++ 4.x 67051b12faf6Smrg # FIXME: insert proper C++ library support 67061b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67071b12faf6Smrg ;; 67081b12faf6Smrg lcc*) 67091b12faf6Smrg # Lucid 67101b12faf6Smrg # FIXME: insert proper C++ library support 67111b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67121b12faf6Smrg ;; 67131b12faf6Smrg *) 67141b12faf6Smrg # FIXME: insert proper C++ library support 67151b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67161b12faf6Smrg ;; 67171b12faf6Smrg esac 67181b12faf6Smrg ;; 671932b578d3Smrg 67201b12faf6Smrg solaris*) 67211b12faf6Smrg case $cc_basename in 6722e35d4d8eSmrg CC* | sunCC*) 67231b12faf6Smrg # Sun C++ 4.2, 5.x and Centerline C++ 67241b12faf6Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 67251b12faf6Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 67261b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 67271b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67281b12faf6Smrg $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' 67291b12faf6Smrg 67301b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 67311b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67321b12faf6Smrg case $host_os in 67331b12faf6Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67341b12faf6Smrg *) 67351b12faf6Smrg # The compiler driver will combine and reorder linker options, 67361b12faf6Smrg # but understands `-z linker_flag'. 67371b12faf6Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 67381b12faf6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 67391b12faf6Smrg ;; 67401b12faf6Smrg esac 67411b12faf6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 674232b578d3Smrg 6743e35d4d8eSmrg output_verbose_link_cmd='func_echo_all' 674432b578d3Smrg 67451b12faf6Smrg # Archives containing C++ object files must be created using 67461b12faf6Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 67471b12faf6Smrg # necessary to make sure instantiated templates are included 67481b12faf6Smrg # in the archive. 67491b12faf6Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 67501b12faf6Smrg ;; 67511b12faf6Smrg gcx*) 67521b12faf6Smrg # Green Hills C++ Compiler 67531b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 675432b578d3Smrg 67551b12faf6Smrg # The C++ compiler must be used to create the archive. 67561b12faf6Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 67571b12faf6Smrg ;; 67581b12faf6Smrg *) 67591b12faf6Smrg # GNU C++ compiler with Solaris linker 67601b12faf6Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 67611b12faf6Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 67621b12faf6Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6763e35d4d8eSmrg _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' 67641b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6765e35d4d8eSmrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 67661b12faf6Smrg 67671b12faf6Smrg # Commands to make compiler produce verbose output that lists 67681b12faf6Smrg # what "hidden" libraries, object files and flags are used when 67691b12faf6Smrg # linking a shared library. 6770e35d4d8eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67711b12faf6Smrg else 67721b12faf6Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 67731b12faf6Smrg # platform. 67741b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 67751b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67761b12faf6Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 67771b12faf6Smrg 67781b12faf6Smrg # Commands to make compiler produce verbose output that lists 67791b12faf6Smrg # what "hidden" libraries, object files and flags are used when 67801b12faf6Smrg # linking a shared library. 6781e35d4d8eSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67821b12faf6Smrg fi 67831b12faf6Smrg 67841b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 67851b12faf6Smrg case $host_os in 67861b12faf6Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67871b12faf6Smrg *) 67881b12faf6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 67891b12faf6Smrg ;; 67901b12faf6Smrg esac 67911b12faf6Smrg fi 67921b12faf6Smrg ;; 67931b12faf6Smrg esac 67941b12faf6Smrg ;; 679532b578d3Smrg 67961b12faf6Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 67971b12faf6Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 67981b12faf6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 67991b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68001b12faf6Smrg runpath_var='LD_RUN_PATH' 6801d31dbc53Smrg 68021b12faf6Smrg case $cc_basename in 68031b12faf6Smrg CC*) 68041b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68051b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68061b12faf6Smrg ;; 68071b12faf6Smrg *) 68081b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68091b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68101b12faf6Smrg ;; 68111b12faf6Smrg esac 68121b12faf6Smrg ;; 6813d31dbc53Smrg 68141b12faf6Smrg sysv5* | sco3.2v5* | sco5v6*) 68151b12faf6Smrg # Note: We can NOT use -z defs as we might desire, because we do not 68161b12faf6Smrg # link with -lc, and that would cause any symbols used from libc to 68171b12faf6Smrg # always be unresolved, which means just about no library would 68181b12faf6Smrg # ever link correctly. If we're not using GNU ld we use -z text 68191b12faf6Smrg # though, which does catch some bad symbols but isn't as heavy-handed 68201b12faf6Smrg # as -z defs. 68211b12faf6Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 68221b12faf6Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 68231b12faf6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 68241b12faf6Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68251b12faf6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 68261b12faf6Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 68271b12faf6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 68281b12faf6Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 68291b12faf6Smrg runpath_var='LD_RUN_PATH' 6830d31dbc53Smrg 68311b12faf6Smrg case $cc_basename in 68321b12faf6Smrg CC*) 68331b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68341b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6835e35d4d8eSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6836e35d4d8eSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 6837e35d4d8eSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6838e35d4d8eSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 68391b12faf6Smrg ;; 68401b12faf6Smrg *) 68411b12faf6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68421b12faf6Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68431b12faf6Smrg ;; 68441b12faf6Smrg esac 68451b12faf6Smrg ;; 6846d31dbc53Smrg 68471b12faf6Smrg tandem*) 68481b12faf6Smrg case $cc_basename in 68491b12faf6Smrg NCC*) 68501b12faf6Smrg # NonStop-UX NCC 3.20 68511b12faf6Smrg # FIXME: insert proper C++ library support 68521b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68531b12faf6Smrg ;; 68541b12faf6Smrg *) 68551b12faf6Smrg # FIXME: insert proper C++ library support 68561b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68571b12faf6Smrg ;; 68581b12faf6Smrg esac 68591b12faf6Smrg ;; 6860d31dbc53Smrg 68611b12faf6Smrg vxworks*) 68621b12faf6Smrg # FIXME: insert proper C++ library support 68631b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68641b12faf6Smrg ;; 6865d31dbc53Smrg 68661b12faf6Smrg *) 68671b12faf6Smrg # FIXME: insert proper C++ library support 68681b12faf6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68691b12faf6Smrg ;; 68701b12faf6Smrg esac 6871d31dbc53Smrg 68721b12faf6Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 68731b12faf6Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 68741b12faf6Smrg 68751b12faf6Smrg _LT_TAGVAR(GCC, $1)="$GXX" 68761b12faf6Smrg _LT_TAGVAR(LD, $1)="$LD" 68771b12faf6Smrg 68781b12faf6Smrg ## CAVEAT EMPTOR: 68791b12faf6Smrg ## There is no encapsulation within the following macros, do not change 68801b12faf6Smrg ## the running order or otherwise move them around unless you know exactly 68811b12faf6Smrg ## what you are doing... 68821b12faf6Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 68831b12faf6Smrg _LT_COMPILER_PIC($1) 68841b12faf6Smrg _LT_COMPILER_C_O($1) 68851b12faf6Smrg _LT_COMPILER_FILE_LOCKS($1) 68861b12faf6Smrg _LT_LINKER_SHLIBS($1) 68871b12faf6Smrg _LT_SYS_DYNAMIC_LINKER($1) 68881b12faf6Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 68891b12faf6Smrg 68901b12faf6Smrg _LT_CONFIG($1) 68911b12faf6Smrg fi # test -n "$compiler" 68921b12faf6Smrg 68931b12faf6Smrg CC=$lt_save_CC 6894e35d4d8eSmrg CFLAGS=$lt_save_CFLAGS 68951b12faf6Smrg LDCXX=$LD 68961b12faf6Smrg LD=$lt_save_LD 68971b12faf6Smrg GCC=$lt_save_GCC 68981b12faf6Smrg with_gnu_ld=$lt_save_with_gnu_ld 68991b12faf6Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 69001b12faf6Smrg lt_cv_path_LD=$lt_save_path_LD 69011b12faf6Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 69021b12faf6Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 69031b12faf6Smrgfi # test "$_lt_caught_CXX_error" != yes 6904d31dbc53Smrg 69051b12faf6SmrgAC_LANG_POP 69061b12faf6Smrg])# _LT_LANG_CXX_CONFIG 6907d31dbc53Smrg 6908d31dbc53Smrg 6909e35d4d8eSmrg# _LT_FUNC_STRIPNAME_CNF 6910e35d4d8eSmrg# ---------------------- 6911e35d4d8eSmrg# func_stripname_cnf prefix suffix name 6912e35d4d8eSmrg# strip PREFIX and SUFFIX off of NAME. 6913e35d4d8eSmrg# PREFIX and SUFFIX must not contain globbing or regex special 6914e35d4d8eSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 6915e35d4d8eSmrg# dot (in which case that matches only a dot). 6916e35d4d8eSmrg# 6917e35d4d8eSmrg# This function is identical to the (non-XSI) version of func_stripname, 6918e35d4d8eSmrg# except this one can be used by m4 code that may be executed by configure, 6919e35d4d8eSmrg# rather than the libtool script. 6920e35d4d8eSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6921e35d4d8eSmrgAC_REQUIRE([_LT_DECL_SED]) 6922e35d4d8eSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6923e35d4d8eSmrgfunc_stripname_cnf () 6924e35d4d8eSmrg{ 6925e35d4d8eSmrg case ${2} in 6926e35d4d8eSmrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6927e35d4d8eSmrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6928e35d4d8eSmrg esac 6929e35d4d8eSmrg} # func_stripname_cnf 6930e35d4d8eSmrg])# _LT_FUNC_STRIPNAME_CNF 6931e35d4d8eSmrg 69321b12faf6Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 69331b12faf6Smrg# --------------------------------- 69341b12faf6Smrg# Figure out "hidden" library dependencies from verbose 69351b12faf6Smrg# compiler output when linking a shared library. 69361b12faf6Smrg# Parse the compiler output and extract the necessary 69371b12faf6Smrg# objects, libraries and library flags. 69381b12faf6Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 69391b12faf6Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6940e35d4d8eSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 69411b12faf6Smrg# Dependencies to place before and after the object being linked: 69421b12faf6Smrg_LT_TAGVAR(predep_objects, $1)= 69431b12faf6Smrg_LT_TAGVAR(postdep_objects, $1)= 69441b12faf6Smrg_LT_TAGVAR(predeps, $1)= 69451b12faf6Smrg_LT_TAGVAR(postdeps, $1)= 69461b12faf6Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6947d31dbc53Smrg 69481b12faf6Smrgdnl we can't use the lt_simple_compile_test_code here, 69491b12faf6Smrgdnl because it contains code intended for an executable, 69501b12faf6Smrgdnl not a library. It's possible we should let each 69511b12faf6Smrgdnl tag define a new lt_????_link_test_code variable, 69521b12faf6Smrgdnl but it's only used here... 69531b12faf6Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 69541b12faf6Smrgint a; 69551b12faf6Smrgvoid foo (void) { a = 0; } 69561b12faf6Smrg_LT_EOF 69571b12faf6Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 69581b12faf6Smrgclass Foo 69591b12faf6Smrg{ 69601b12faf6Smrgpublic: 69611b12faf6Smrg Foo (void) { a = 0; } 69621b12faf6Smrgprivate: 69631b12faf6Smrg int a; 69641b12faf6Smrg}; 69651b12faf6Smrg_LT_EOF 69661b12faf6Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 69671b12faf6Smrg subroutine foo 69681b12faf6Smrg implicit none 69691b12faf6Smrg integer*4 a 69701b12faf6Smrg a=0 69711b12faf6Smrg return 69721b12faf6Smrg end 69731b12faf6Smrg_LT_EOF 69741b12faf6Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 69751b12faf6Smrg subroutine foo 69761b12faf6Smrg implicit none 69771b12faf6Smrg integer a 69781b12faf6Smrg a=0 69791b12faf6Smrg return 69801b12faf6Smrg end 69811b12faf6Smrg_LT_EOF 69821b12faf6Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 69831b12faf6Smrgpublic class foo { 69841b12faf6Smrg private int a; 69851b12faf6Smrg public void bar (void) { 69861b12faf6Smrg a = 0; 69871b12faf6Smrg } 69881b12faf6Smrg}; 69891b12faf6Smrg_LT_EOF 6990e35d4d8eSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 6991e35d4d8eSmrgpackage foo 6992e35d4d8eSmrgfunc foo() { 6993e35d4d8eSmrg} 6994e35d4d8eSmrg_LT_EOF 69952a51b5beSmrg]) 6996e35d4d8eSmrg 6997e35d4d8eSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 6998e35d4d8eSmrgcase "$CC $CFLAGS " in #( 6999e35d4d8eSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7000e35d4d8eSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7001e35d4d8eSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7002e35d4d8eSmrgesac 7003e35d4d8eSmrg 70041b12faf6Smrgdnl Parse the compiler output and extract the necessary 70051b12faf6Smrgdnl objects, libraries and library flags. 70061b12faf6Smrgif AC_TRY_EVAL(ac_compile); then 70071b12faf6Smrg # Parse the compiler output and extract the necessary 70081b12faf6Smrg # objects, libraries and library flags. 7009d31dbc53Smrg 70101b12faf6Smrg # Sentinel used to keep track of whether or not we are before 70111b12faf6Smrg # the conftest object file. 70121b12faf6Smrg pre_test_object_deps_done=no 7013d31dbc53Smrg 70141b12faf6Smrg for p in `eval "$output_verbose_link_cmd"`; do 7015e35d4d8eSmrg case ${prev}${p} in 7016d31dbc53Smrg 70171b12faf6Smrg -L* | -R* | -l*) 70181b12faf6Smrg # Some compilers place space between "-{L,R}" and the path. 70191b12faf6Smrg # Remove the space. 70201b12faf6Smrg if test $p = "-L" || 70211b12faf6Smrg test $p = "-R"; then 70221b12faf6Smrg prev=$p 70231b12faf6Smrg continue 70241b12faf6Smrg fi 7025d31dbc53Smrg 7026e35d4d8eSmrg # Expand the sysroot to ease extracting the directories later. 7027e35d4d8eSmrg if test -z "$prev"; then 7028e35d4d8eSmrg case $p in 7029e35d4d8eSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7030e35d4d8eSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7031e35d4d8eSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7032e35d4d8eSmrg esac 7033e35d4d8eSmrg fi 7034e35d4d8eSmrg case $p in 7035e35d4d8eSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7036e35d4d8eSmrg esac 70371b12faf6Smrg if test "$pre_test_object_deps_done" = no; then 7038e35d4d8eSmrg case ${prev} in 7039e35d4d8eSmrg -L | -R) 70401b12faf6Smrg # Internal compiler library paths should come after those 70411b12faf6Smrg # provided the user. The postdeps already come after the 70421b12faf6Smrg # user supplied libs so there is no need to process them. 70431b12faf6Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 70441b12faf6Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 70451b12faf6Smrg else 70461b12faf6Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 70471b12faf6Smrg fi 70481b12faf6Smrg ;; 70491b12faf6Smrg # The "-l" case would never come before the object being 70501b12faf6Smrg # linked, so don't bother handling this case. 70511b12faf6Smrg esac 70521b12faf6Smrg else 70531b12faf6Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 70541b12faf6Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 70551b12faf6Smrg else 70561b12faf6Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 70571b12faf6Smrg fi 70581b12faf6Smrg fi 7059e35d4d8eSmrg prev= 70601b12faf6Smrg ;; 7061d31dbc53Smrg 7062e35d4d8eSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 70631b12faf6Smrg *.$objext) 70641b12faf6Smrg # This assumes that the test object file only shows up 70651b12faf6Smrg # once in the compiler output. 70661b12faf6Smrg if test "$p" = "conftest.$objext"; then 70671b12faf6Smrg pre_test_object_deps_done=yes 70681b12faf6Smrg continue 70691b12faf6Smrg fi 7070d31dbc53Smrg 70711b12faf6Smrg if test "$pre_test_object_deps_done" = no; then 70721b12faf6Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 70731b12faf6Smrg _LT_TAGVAR(predep_objects, $1)="$p" 70741b12faf6Smrg else 70751b12faf6Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 70761b12faf6Smrg fi 70771b12faf6Smrg else 70781b12faf6Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 70791b12faf6Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 70801b12faf6Smrg else 70811b12faf6Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 70821b12faf6Smrg fi 70831b12faf6Smrg fi 70841b12faf6Smrg ;; 708532b578d3Smrg 70861b12faf6Smrg *) ;; # Ignore the rest. 7087d31dbc53Smrg 70881b12faf6Smrg esac 70891b12faf6Smrg done 7090d31dbc53Smrg 70911b12faf6Smrg # Clean up. 70921b12faf6Smrg rm -f a.out a.exe 70931b12faf6Smrgelse 70941b12faf6Smrg echo "libtool.m4: error: problem compiling $1 test program" 70951b12faf6Smrgfi 7096d31dbc53Smrg 70971b12faf6Smrg$RM -f confest.$objext 7098e35d4d8eSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 70991b12faf6Smrg 71001b12faf6Smrg# PORTME: override above test on systems where it is broken 71011b12faf6Smrgm4_if([$1], [CXX], 71021b12faf6Smrg[case $host_os in 71031b12faf6Smrginterix[[3-9]]*) 71041b12faf6Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 71051b12faf6Smrg # hack all around it, let's just trust "g++" to DTRT. 71061b12faf6Smrg _LT_TAGVAR(predep_objects,$1)= 71071b12faf6Smrg _LT_TAGVAR(postdep_objects,$1)= 71081b12faf6Smrg _LT_TAGVAR(postdeps,$1)= 71092a51b5beSmrg ;; 71101b12faf6Smrg 71111b12faf6Smrglinux*) 71121b12faf6Smrg case `$CC -V 2>&1 | sed 5q` in 71131b12faf6Smrg *Sun\ C*) 71141b12faf6Smrg # Sun C++ 5.9 71151b12faf6Smrg 71161b12faf6Smrg # The more standards-conforming stlport4 library is 71171b12faf6Smrg # incompatible with the Cstd library. Avoid specifying 71181b12faf6Smrg # it if it's in CXXFLAGS. Ignore libCrun as 71191b12faf6Smrg # -library=stlport4 depends on it. 71201b12faf6Smrg case " $CXX $CXXFLAGS " in 71211b12faf6Smrg *" -library=stlport4 "*) 71221b12faf6Smrg solaris_use_stlport4=yes 71231b12faf6Smrg ;; 71241b12faf6Smrg esac 71251b12faf6Smrg 71261b12faf6Smrg if test "$solaris_use_stlport4" != yes; then 71271b12faf6Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 71281b12faf6Smrg fi 71291b12faf6Smrg ;; 71301b12faf6Smrg esac 71312a51b5beSmrg ;; 71321b12faf6Smrg 71332a51b5beSmrgsolaris*) 71341b12faf6Smrg case $cc_basename in 7135e35d4d8eSmrg CC* | sunCC*) 71361b12faf6Smrg # The more standards-conforming stlport4 library is 71371b12faf6Smrg # incompatible with the Cstd library. Avoid specifying 71381b12faf6Smrg # it if it's in CXXFLAGS. Ignore libCrun as 71391b12faf6Smrg # -library=stlport4 depends on it. 71401b12faf6Smrg case " $CXX $CXXFLAGS " in 71411b12faf6Smrg *" -library=stlport4 "*) 71421b12faf6Smrg solaris_use_stlport4=yes 71431b12faf6Smrg ;; 71441b12faf6Smrg esac 714532b578d3Smrg 7146e35d4d8eSmrg # Adding this requires a known-good setup of shared libraries for 7147e35d4d8eSmrg # Sun compiler versions before 5.6, else PIC objects from an old 7148e35d4d8eSmrg # archive will be linked into the output, leading to subtle bugs. 7149e35d4d8eSmrg if test "$solaris_use_stlport4" != yes; then 7150e35d4d8eSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7151e35d4d8eSmrg fi 7152e35d4d8eSmrg ;; 7153e35d4d8eSmrg esac 7154e35d4d8eSmrg ;; 7155e35d4d8eSmrgesac 7156e35d4d8eSmrg]) 71571b12faf6Smrg 7158e35d4d8eSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 7159e35d4d8eSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7160e35d4d8eSmrgesac 7161e35d4d8eSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7162e35d4d8eSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7163e35d4d8eSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 71642a51b5beSmrgfi 7165e35d4d8eSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7166e35d4d8eSmrg [The directories searched by this compiler when creating a shared library]) 7167e35d4d8eSmrg_LT_TAGDECL([], [predep_objects], [1], 7168e35d4d8eSmrg [Dependencies to place before and after the objects being linked to 7169e35d4d8eSmrg create a shared library]) 7170e35d4d8eSmrg_LT_TAGDECL([], [postdep_objects], [1]) 7171e35d4d8eSmrg_LT_TAGDECL([], [predeps], [1]) 7172e35d4d8eSmrg_LT_TAGDECL([], [postdeps], [1]) 7173e35d4d8eSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7174e35d4d8eSmrg [The library search path used internally by the compiler when linking 7175e35d4d8eSmrg a shared library]) 7176e35d4d8eSmrg])# _LT_SYS_HIDDEN_LIBDEPS 717732b578d3Smrg 717832b578d3Smrg 7179e35d4d8eSmrg# _LT_LANG_F77_CONFIG([TAG]) 7180e35d4d8eSmrg# -------------------------- 7181e35d4d8eSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 71821b12faf6Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 71831b12faf6Smrg# to write the compiler configuration to `libtool'. 7184e35d4d8eSmrgm4_defun([_LT_LANG_F77_CONFIG], 7185e35d4d8eSmrg[AC_LANG_PUSH(Fortran 77) 7186e35d4d8eSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 7187e35d4d8eSmrg _lt_disable_F77=yes 7188e35d4d8eSmrgfi 71891b12faf6Smrg 71901b12faf6Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 71911b12faf6Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 71921b12faf6Smrg_LT_TAGVAR(always_export_symbols, $1)=no 71931b12faf6Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 71941b12faf6Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 71951b12faf6Smrg_LT_TAGVAR(hardcode_direct, $1)=no 71961b12faf6Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 71971b12faf6Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 71981b12faf6Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 71991b12faf6Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 72001b12faf6Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 72011b12faf6Smrg_LT_TAGVAR(inherit_rpath, $1)=no 72021b12faf6Smrg_LT_TAGVAR(module_cmds, $1)= 72031b12faf6Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 72041b12faf6Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 72051b12faf6Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7206e35d4d8eSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7207e35d4d8eSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 72081b12faf6Smrg_LT_TAGVAR(no_undefined_flag, $1)= 72091b12faf6Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 72101b12faf6Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 72111b12faf6Smrg 7212e35d4d8eSmrg# Source file extension for f77 test sources. 7213e35d4d8eSmrgac_ext=f 72141b12faf6Smrg 7215e35d4d8eSmrg# Object file extension for compiled f77 test sources. 72161b12faf6Smrgobjext=o 72171b12faf6Smrg_LT_TAGVAR(objext, $1)=$objext 72181b12faf6Smrg 72191b12faf6Smrg# No sense in running all these tests if we already determined that 7220e35d4d8eSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 72211b12faf6Smrg# are currently assumed to apply to all compilers on this platform, 72221b12faf6Smrg# and will be corrupted by setting them based on a non-working compiler. 7223e35d4d8eSmrgif test "$_lt_disable_F77" != yes; then 72241b12faf6Smrg # Code to be used in simple compile tests 72251b12faf6Smrg lt_simple_compile_test_code="\ 72261b12faf6Smrg subroutine t 72271b12faf6Smrg return 72281b12faf6Smrg end 72291b12faf6Smrg" 72301b12faf6Smrg 72311b12faf6Smrg # Code to be used in simple link tests 72321b12faf6Smrg lt_simple_link_test_code="\ 72331b12faf6Smrg program t 72341b12faf6Smrg end 72351b12faf6Smrg" 723632b578d3Smrg 72371b12faf6Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 72381b12faf6Smrg _LT_TAG_COMPILER 72391b12faf6Smrg 72401b12faf6Smrg # save warnings/boilerplate of simple test code 72411b12faf6Smrg _LT_COMPILER_BOILERPLATE 72421b12faf6Smrg _LT_LINKER_BOILERPLATE 72431b12faf6Smrg 72441b12faf6Smrg # Allow CC to be a program name with arguments. 72451b12faf6Smrg lt_save_CC="$CC" 72461b12faf6Smrg lt_save_GCC=$GCC 7247e35d4d8eSmrg lt_save_CFLAGS=$CFLAGS 7248e35d4d8eSmrg CC=${F77-"f77"} 7249e35d4d8eSmrg CFLAGS=$FFLAGS 72501b12faf6Smrg compiler=$CC 72511b12faf6Smrg _LT_TAGVAR(compiler, $1)=$CC 72521b12faf6Smrg _LT_CC_BASENAME([$compiler]) 7253e35d4d8eSmrg GCC=$G77 72541b12faf6Smrg if test -n "$compiler"; then 72551b12faf6Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 72561b12faf6Smrg AC_MSG_RESULT([$can_build_shared]) 72571b12faf6Smrg 72581b12faf6Smrg AC_MSG_CHECKING([whether to build shared libraries]) 72591b12faf6Smrg test "$can_build_shared" = "no" && enable_shared=no 72601b12faf6Smrg 72611b12faf6Smrg # On AIX, shared libraries and static libraries use the same namespace, and 72621b12faf6Smrg # are all built from PIC. 72632a51b5beSmrg case $host_os in 72641b12faf6Smrg aix3*) 72651b12faf6Smrg test "$enable_shared" = yes && enable_static=no 72661b12faf6Smrg if test -n "$RANLIB"; then 72671b12faf6Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 72681b12faf6Smrg postinstall_cmds='$RANLIB $lib' 72691b12faf6Smrg fi 72701b12faf6Smrg ;; 72712a51b5beSmrg aix[[4-9]]*) 72721b12faf6Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 72731b12faf6Smrg test "$enable_shared" = yes && enable_static=no 72742a51b5beSmrg fi 72751b12faf6Smrg ;; 72762a51b5beSmrg esac 72771b12faf6Smrg AC_MSG_RESULT([$enable_shared]) 72781b12faf6Smrg 72791b12faf6Smrg AC_MSG_CHECKING([whether to build static libraries]) 72801b12faf6Smrg # Make sure either enable_shared or enable_static is yes. 72811b12faf6Smrg test "$enable_shared" = yes || enable_static=yes 72821b12faf6Smrg AC_MSG_RESULT([$enable_static]) 72831b12faf6Smrg 7284e35d4d8eSmrg _LT_TAGVAR(GCC, $1)="$G77" 7285e35d4d8eSmrg _LT_TAGVAR(LD, $1)="$LD" 728632b578d3Smrg 7287e35d4d8eSmrg ## CAVEAT EMPTOR: 7288e35d4d8eSmrg ## There is no encapsulation within the following macros, do not change 7289e35d4d8eSmrg ## the running order or otherwise move them around unless you know exactly 7290e35d4d8eSmrg ## what you are doing... 7291e35d4d8eSmrg _LT_COMPILER_PIC($1) 7292e35d4d8eSmrg _LT_COMPILER_C_O($1) 7293e35d4d8eSmrg _LT_COMPILER_FILE_LOCKS($1) 7294e35d4d8eSmrg _LT_LINKER_SHLIBS($1) 7295e35d4d8eSmrg _LT_SYS_DYNAMIC_LINKER($1) 7296e35d4d8eSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 729732b578d3Smrg 7298e35d4d8eSmrg _LT_CONFIG($1) 7299e35d4d8eSmrg fi # test -n "$compiler" 730032b578d3Smrg 7301e35d4d8eSmrg GCC=$lt_save_GCC 7302e35d4d8eSmrg CC="$lt_save_CC" 7303e35d4d8eSmrg CFLAGS="$lt_save_CFLAGS" 7304e35d4d8eSmrgfi # test "$_lt_disable_F77" != yes 730532b578d3Smrg 7306e35d4d8eSmrgAC_LANG_POP 7307e35d4d8eSmrg])# _LT_LANG_F77_CONFIG 730832b578d3Smrg 73091b12faf6Smrg 7310e35d4d8eSmrg# _LT_LANG_FC_CONFIG([TAG]) 7311e35d4d8eSmrg# ------------------------- 7312e35d4d8eSmrg# Ensure that the configuration variables for a Fortran compiler are 7313e35d4d8eSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7314e35d4d8eSmrg# to write the compiler configuration to `libtool'. 7315e35d4d8eSmrgm4_defun([_LT_LANG_FC_CONFIG], 7316e35d4d8eSmrg[AC_LANG_PUSH(Fortran) 73171b12faf6Smrg 7318e35d4d8eSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 7319e35d4d8eSmrg _lt_disable_FC=yes 73201b12faf6Smrgfi 73211b12faf6Smrg 7322e35d4d8eSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7323e35d4d8eSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7324e35d4d8eSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7325e35d4d8eSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7326e35d4d8eSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7327e35d4d8eSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7328e35d4d8eSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7329e35d4d8eSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7330e35d4d8eSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7331e35d4d8eSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7332e35d4d8eSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7333e35d4d8eSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7334e35d4d8eSmrg_LT_TAGVAR(module_cmds, $1)= 7335e35d4d8eSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7336e35d4d8eSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7337e35d4d8eSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7338e35d4d8eSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7339e35d4d8eSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7340e35d4d8eSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7341e35d4d8eSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7342e35d4d8eSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 734332b578d3Smrg 7344e35d4d8eSmrg# Source file extension for fc test sources. 7345e35d4d8eSmrgac_ext=${ac_fc_srcext-f} 734632b578d3Smrg 7347e35d4d8eSmrg# Object file extension for compiled fc test sources. 7348e35d4d8eSmrgobjext=o 7349e35d4d8eSmrg_LT_TAGVAR(objext, $1)=$objext 735032b578d3Smrg 7351e35d4d8eSmrg# No sense in running all these tests if we already determined that 7352e35d4d8eSmrg# the FC compiler isn't working. Some variables (like enable_shared) 7353e35d4d8eSmrg# are currently assumed to apply to all compilers on this platform, 7354e35d4d8eSmrg# and will be corrupted by setting them based on a non-working compiler. 7355e35d4d8eSmrgif test "$_lt_disable_FC" != yes; then 7356e35d4d8eSmrg # Code to be used in simple compile tests 7357e35d4d8eSmrg lt_simple_compile_test_code="\ 7358e35d4d8eSmrg subroutine t 7359e35d4d8eSmrg return 7360e35d4d8eSmrg end 7361e35d4d8eSmrg" 736232b578d3Smrg 7363e35d4d8eSmrg # Code to be used in simple link tests 7364e35d4d8eSmrg lt_simple_link_test_code="\ 7365e35d4d8eSmrg program t 7366e35d4d8eSmrg end 7367e35d4d8eSmrg" 7368d31dbc53Smrg 7369e35d4d8eSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7370e35d4d8eSmrg _LT_TAG_COMPILER 7371d31dbc53Smrg 7372e35d4d8eSmrg # save warnings/boilerplate of simple test code 7373e35d4d8eSmrg _LT_COMPILER_BOILERPLATE 7374e35d4d8eSmrg _LT_LINKER_BOILERPLATE 7375d31dbc53Smrg 7376e35d4d8eSmrg # Allow CC to be a program name with arguments. 7377e35d4d8eSmrg lt_save_CC="$CC" 7378e35d4d8eSmrg lt_save_GCC=$GCC 7379e35d4d8eSmrg lt_save_CFLAGS=$CFLAGS 7380e35d4d8eSmrg CC=${FC-"f95"} 7381e35d4d8eSmrg CFLAGS=$FCFLAGS 7382e35d4d8eSmrg compiler=$CC 7383e35d4d8eSmrg GCC=$ac_cv_fc_compiler_gnu 7384d31dbc53Smrg 7385e35d4d8eSmrg _LT_TAGVAR(compiler, $1)=$CC 7386e35d4d8eSmrg _LT_CC_BASENAME([$compiler]) 73872a51b5beSmrg 7388e35d4d8eSmrg if test -n "$compiler"; then 7389e35d4d8eSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7390e35d4d8eSmrg AC_MSG_RESULT([$can_build_shared]) 73912a51b5beSmrg 7392e35d4d8eSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7393e35d4d8eSmrg test "$can_build_shared" = "no" && enable_shared=no 73942a51b5beSmrg 7395e35d4d8eSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7396e35d4d8eSmrg # are all built from PIC. 7397e35d4d8eSmrg case $host_os in 7398e35d4d8eSmrg aix3*) 7399e35d4d8eSmrg test "$enable_shared" = yes && enable_static=no 7400e35d4d8eSmrg if test -n "$RANLIB"; then 7401e35d4d8eSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7402e35d4d8eSmrg postinstall_cmds='$RANLIB $lib' 7403e35d4d8eSmrg fi 7404e35d4d8eSmrg ;; 7405e35d4d8eSmrg aix[[4-9]]*) 7406e35d4d8eSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7407e35d4d8eSmrg test "$enable_shared" = yes && enable_static=no 7408e35d4d8eSmrg fi 7409e35d4d8eSmrg ;; 7410e35d4d8eSmrg esac 7411e35d4d8eSmrg AC_MSG_RESULT([$enable_shared]) 7412e35d4d8eSmrg 7413e35d4d8eSmrg AC_MSG_CHECKING([whether to build static libraries]) 7414e35d4d8eSmrg # Make sure either enable_shared or enable_static is yes. 7415e35d4d8eSmrg test "$enable_shared" = yes || enable_static=yes 7416e35d4d8eSmrg AC_MSG_RESULT([$enable_static]) 7417e35d4d8eSmrg 7418e35d4d8eSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 7419e35d4d8eSmrg _LT_TAGVAR(LD, $1)="$LD" 7420e35d4d8eSmrg 7421e35d4d8eSmrg ## CAVEAT EMPTOR: 7422e35d4d8eSmrg ## There is no encapsulation within the following macros, do not change 7423e35d4d8eSmrg ## the running order or otherwise move them around unless you know exactly 7424e35d4d8eSmrg ## what you are doing... 7425e35d4d8eSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 7426e35d4d8eSmrg _LT_COMPILER_PIC($1) 7427e35d4d8eSmrg _LT_COMPILER_C_O($1) 7428e35d4d8eSmrg _LT_COMPILER_FILE_LOCKS($1) 7429e35d4d8eSmrg _LT_LINKER_SHLIBS($1) 7430e35d4d8eSmrg _LT_SYS_DYNAMIC_LINKER($1) 7431e35d4d8eSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 74321b12faf6Smrg 7433e35d4d8eSmrg _LT_CONFIG($1) 7434e35d4d8eSmrg fi # test -n "$compiler" 74352a51b5beSmrg 7436e35d4d8eSmrg GCC=$lt_save_GCC 7437e35d4d8eSmrg CC=$lt_save_CC 7438e35d4d8eSmrg CFLAGS=$lt_save_CFLAGS 7439e35d4d8eSmrgfi # test "$_lt_disable_FC" != yes 7440d31dbc53Smrg 7441e35d4d8eSmrgAC_LANG_POP 7442e35d4d8eSmrg])# _LT_LANG_FC_CONFIG 74431b12faf6Smrg 7444d31dbc53Smrg 7445e35d4d8eSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 7446e35d4d8eSmrg# -------------------------- 7447e35d4d8eSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7448e35d4d8eSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7449e35d4d8eSmrg# to write the compiler configuration to `libtool'. 7450e35d4d8eSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 7451e35d4d8eSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7452e35d4d8eSmrgAC_LANG_SAVE 7453d31dbc53Smrg 7454e35d4d8eSmrg# Source file extension for Java test sources. 7455e35d4d8eSmrgac_ext=java 7456d31dbc53Smrg 7457e35d4d8eSmrg# Object file extension for compiled Java test sources. 7458e35d4d8eSmrgobjext=o 7459e35d4d8eSmrg_LT_TAGVAR(objext, $1)=$objext 7460d31dbc53Smrg 7461e35d4d8eSmrg# Code to be used in simple compile tests 7462e35d4d8eSmrglt_simple_compile_test_code="class foo {}" 7463d31dbc53Smrg 7464e35d4d8eSmrg# Code to be used in simple link tests 7465e35d4d8eSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7466d31dbc53Smrg 7467e35d4d8eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7468e35d4d8eSmrg_LT_TAG_COMPILER 7469d31dbc53Smrg 7470e35d4d8eSmrg# save warnings/boilerplate of simple test code 7471e35d4d8eSmrg_LT_COMPILER_BOILERPLATE 7472e35d4d8eSmrg_LT_LINKER_BOILERPLATE 7473d31dbc53Smrg 7474e35d4d8eSmrg# Allow CC to be a program name with arguments. 7475e35d4d8eSmrglt_save_CC=$CC 7476e35d4d8eSmrglt_save_CFLAGS=$CFLAGS 7477e35d4d8eSmrglt_save_GCC=$GCC 7478e35d4d8eSmrgGCC=yes 7479e35d4d8eSmrgCC=${GCJ-"gcj"} 7480e35d4d8eSmrgCFLAGS=$GCJFLAGS 7481e35d4d8eSmrgcompiler=$CC 7482e35d4d8eSmrg_LT_TAGVAR(compiler, $1)=$CC 7483e35d4d8eSmrg_LT_TAGVAR(LD, $1)="$LD" 7484e35d4d8eSmrg_LT_CC_BASENAME([$compiler]) 7485d31dbc53Smrg 7486e35d4d8eSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7487e35d4d8eSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7488d31dbc53Smrg 7489e35d4d8eSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7490e35d4d8eSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7491e35d4d8eSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7492d31dbc53Smrg 7493e35d4d8eSmrgif test -n "$compiler"; then 7494e35d4d8eSmrg _LT_COMPILER_NO_RTTI($1) 7495e35d4d8eSmrg _LT_COMPILER_PIC($1) 7496e35d4d8eSmrg _LT_COMPILER_C_O($1) 7497e35d4d8eSmrg _LT_COMPILER_FILE_LOCKS($1) 7498e35d4d8eSmrg _LT_LINKER_SHLIBS($1) 7499e35d4d8eSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7500d31dbc53Smrg 7501e35d4d8eSmrg _LT_CONFIG($1) 7502e35d4d8eSmrgfi 7503d31dbc53Smrg 7504e35d4d8eSmrgAC_LANG_RESTORE 7505d31dbc53Smrg 7506e35d4d8eSmrgGCC=$lt_save_GCC 7507e35d4d8eSmrgCC=$lt_save_CC 7508e35d4d8eSmrgCFLAGS=$lt_save_CFLAGS 7509e35d4d8eSmrg])# _LT_LANG_GCJ_CONFIG 7510d31dbc53Smrg 7511d31dbc53Smrg 7512e35d4d8eSmrg# _LT_LANG_GO_CONFIG([TAG]) 7513e35d4d8eSmrg# -------------------------- 7514e35d4d8eSmrg# Ensure that the configuration variables for the GNU Go compiler 7515e35d4d8eSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7516e35d4d8eSmrg# to write the compiler configuration to `libtool'. 7517e35d4d8eSmrgm4_defun([_LT_LANG_GO_CONFIG], 7518e35d4d8eSmrg[AC_REQUIRE([LT_PROG_GO])dnl 7519e35d4d8eSmrgAC_LANG_SAVE 7520d31dbc53Smrg 7521e35d4d8eSmrg# Source file extension for Go test sources. 7522e35d4d8eSmrgac_ext=go 7523d31dbc53Smrg 7524e35d4d8eSmrg# Object file extension for compiled Go test sources. 7525e35d4d8eSmrgobjext=o 7526e35d4d8eSmrg_LT_TAGVAR(objext, $1)=$objext 75271b12faf6Smrg 7528e35d4d8eSmrg# Code to be used in simple compile tests 7529e35d4d8eSmrglt_simple_compile_test_code="package main; func main() { }" 75301b12faf6Smrg 7531e35d4d8eSmrg# Code to be used in simple link tests 7532e35d4d8eSmrglt_simple_link_test_code='package main; func main() { }' 75331b12faf6Smrg 7534e35d4d8eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7535e35d4d8eSmrg_LT_TAG_COMPILER 75361b12faf6Smrg 7537e35d4d8eSmrg# save warnings/boilerplate of simple test code 7538e35d4d8eSmrg_LT_COMPILER_BOILERPLATE 7539e35d4d8eSmrg_LT_LINKER_BOILERPLATE 75401b12faf6Smrg 7541e35d4d8eSmrg# Allow CC to be a program name with arguments. 7542e35d4d8eSmrglt_save_CC=$CC 7543e35d4d8eSmrglt_save_CFLAGS=$CFLAGS 7544e35d4d8eSmrglt_save_GCC=$GCC 7545e35d4d8eSmrgGCC=yes 7546e35d4d8eSmrgCC=${GOC-"gccgo"} 7547e35d4d8eSmrgCFLAGS=$GOFLAGS 7548e35d4d8eSmrgcompiler=$CC 7549e35d4d8eSmrg_LT_TAGVAR(compiler, $1)=$CC 7550e35d4d8eSmrg_LT_TAGVAR(LD, $1)="$LD" 7551e35d4d8eSmrg_LT_CC_BASENAME([$compiler]) 75521b12faf6Smrg 7553e35d4d8eSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 7554e35d4d8eSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 75551b12faf6Smrg 7556e35d4d8eSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7557e35d4d8eSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7558e35d4d8eSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 75591b12faf6Smrg 7560e35d4d8eSmrgif test -n "$compiler"; then 7561e35d4d8eSmrg _LT_COMPILER_NO_RTTI($1) 7562e35d4d8eSmrg _LT_COMPILER_PIC($1) 7563e35d4d8eSmrg _LT_COMPILER_C_O($1) 7564e35d4d8eSmrg _LT_COMPILER_FILE_LOCKS($1) 7565e35d4d8eSmrg _LT_LINKER_SHLIBS($1) 7566e35d4d8eSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 75671b12faf6Smrg 7568e35d4d8eSmrg _LT_CONFIG($1) 7569e35d4d8eSmrgfi 75701b12faf6Smrg 7571e35d4d8eSmrgAC_LANG_RESTORE 75721b12faf6Smrg 7573e35d4d8eSmrgGCC=$lt_save_GCC 7574e35d4d8eSmrgCC=$lt_save_CC 7575e35d4d8eSmrgCFLAGS=$lt_save_CFLAGS 7576e35d4d8eSmrg])# _LT_LANG_GO_CONFIG 7577d31dbc53Smrg 7578d31dbc53Smrg 7579e35d4d8eSmrg# _LT_LANG_RC_CONFIG([TAG]) 7580e35d4d8eSmrg# ------------------------- 7581e35d4d8eSmrg# Ensure that the configuration variables for the Windows resource compiler 7582e35d4d8eSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7583e35d4d8eSmrg# to write the compiler configuration to `libtool'. 7584e35d4d8eSmrgm4_defun([_LT_LANG_RC_CONFIG], 7585e35d4d8eSmrg[AC_REQUIRE([LT_PROG_RC])dnl 7586e35d4d8eSmrgAC_LANG_SAVE 7587d31dbc53Smrg 7588e35d4d8eSmrg# Source file extension for RC test sources. 7589e35d4d8eSmrgac_ext=rc 7590d31dbc53Smrg 7591e35d4d8eSmrg# Object file extension for compiled RC test sources. 7592e35d4d8eSmrgobjext=o 7593e35d4d8eSmrg_LT_TAGVAR(objext, $1)=$objext 7594d31dbc53Smrg 7595e35d4d8eSmrg# Code to be used in simple compile tests 7596e35d4d8eSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 7597d31dbc53Smrg 7598e35d4d8eSmrg# Code to be used in simple link tests 7599e35d4d8eSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 7600d31dbc53Smrg 7601e35d4d8eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7602e35d4d8eSmrg_LT_TAG_COMPILER 7603d31dbc53Smrg 7604e35d4d8eSmrg# save warnings/boilerplate of simple test code 7605e35d4d8eSmrg_LT_COMPILER_BOILERPLATE 7606e35d4d8eSmrg_LT_LINKER_BOILERPLATE 7607d31dbc53Smrg 7608e35d4d8eSmrg# Allow CC to be a program name with arguments. 7609e35d4d8eSmrglt_save_CC="$CC" 7610e35d4d8eSmrglt_save_CFLAGS=$CFLAGS 7611e35d4d8eSmrglt_save_GCC=$GCC 7612e35d4d8eSmrgGCC= 7613e35d4d8eSmrgCC=${RC-"windres"} 7614e35d4d8eSmrgCFLAGS= 7615e35d4d8eSmrgcompiler=$CC 7616e35d4d8eSmrg_LT_TAGVAR(compiler, $1)=$CC 7617e35d4d8eSmrg_LT_CC_BASENAME([$compiler]) 7618e35d4d8eSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7619d31dbc53Smrg 7620e35d4d8eSmrgif test -n "$compiler"; then 7621e35d4d8eSmrg : 7622e35d4d8eSmrg _LT_CONFIG($1) 7623e35d4d8eSmrgfi 7624d31dbc53Smrg 7625e35d4d8eSmrgGCC=$lt_save_GCC 7626e35d4d8eSmrgAC_LANG_RESTORE 7627e35d4d8eSmrgCC=$lt_save_CC 7628e35d4d8eSmrgCFLAGS=$lt_save_CFLAGS 7629e35d4d8eSmrg])# _LT_LANG_RC_CONFIG 7630d31dbc53Smrg 7631e35d4d8eSmrg 7632e35d4d8eSmrg# LT_PROG_GCJ 7633e35d4d8eSmrg# ----------- 7634e35d4d8eSmrgAC_DEFUN([LT_PROG_GCJ], 7635e35d4d8eSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7636e35d4d8eSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7637e35d4d8eSmrg [AC_CHECK_TOOL(GCJ, gcj,) 7638e35d4d8eSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7639e35d4d8eSmrg AC_SUBST(GCJFLAGS)])])[]dnl 76401b12faf6Smrg]) 7641d31dbc53Smrg 7642e35d4d8eSmrg# Old name: 7643e35d4d8eSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 76441b12faf6Smrgdnl aclocal-1.4 backwards compatibility: 7645e35d4d8eSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 7646d31dbc53Smrg 7647d31dbc53Smrg 7648e35d4d8eSmrg# LT_PROG_GO 7649e35d4d8eSmrg# ---------- 7650e35d4d8eSmrgAC_DEFUN([LT_PROG_GO], 7651e35d4d8eSmrg[AC_CHECK_TOOL(GOC, gccgo,) 76521b12faf6Smrg]) 7653d31dbc53Smrg 7654d31dbc53Smrg 7655e35d4d8eSmrg# LT_PROG_RC 7656e35d4d8eSmrg# ---------- 7657e35d4d8eSmrgAC_DEFUN([LT_PROG_RC], 7658e35d4d8eSmrg[AC_CHECK_TOOL(RC, windres,) 7659e35d4d8eSmrg]) 76601b12faf6Smrg 7661e35d4d8eSmrg# Old name: 7662e35d4d8eSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 76631b12faf6Smrgdnl aclocal-1.4 backwards compatibility: 7664e35d4d8eSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 7665d31dbc53Smrg 76661b12faf6Smrg 7667e35d4d8eSmrg# _LT_DECL_EGREP 7668e35d4d8eSmrg# -------------- 7669e35d4d8eSmrg# If we don't have a new enough Autoconf to choose the best grep 7670e35d4d8eSmrg# available, choose the one first in the user's PATH. 7671e35d4d8eSmrgm4_defun([_LT_DECL_EGREP], 7672e35d4d8eSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7673e35d4d8eSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7674e35d4d8eSmrgtest -z "$GREP" && GREP=grep 7675e35d4d8eSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7676e35d4d8eSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7677e35d4d8eSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7678e35d4d8eSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7679e35d4d8eSmrgAC_SUBST([GREP]) 7680e35d4d8eSmrg]) 76811b12faf6Smrg 76821b12faf6Smrg 7683e35d4d8eSmrg# _LT_DECL_OBJDUMP 7684e35d4d8eSmrg# -------------- 7685e35d4d8eSmrg# If we don't have a new enough Autoconf to choose the best objdump 7686e35d4d8eSmrg# available, choose the one first in the user's PATH. 7687e35d4d8eSmrgm4_defun([_LT_DECL_OBJDUMP], 7688e35d4d8eSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7689e35d4d8eSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7690e35d4d8eSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7691e35d4d8eSmrgAC_SUBST([OBJDUMP]) 76922a51b5beSmrg]) 7693d31dbc53Smrg 7694e35d4d8eSmrg# _LT_DECL_DLLTOOL 7695e35d4d8eSmrg# ---------------- 7696e35d4d8eSmrg# Ensure DLLTOOL variable is set. 7697e35d4d8eSmrgm4_defun([_LT_DECL_DLLTOOL], 7698e35d4d8eSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7699e35d4d8eSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7700e35d4d8eSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7701e35d4d8eSmrgAC_SUBST([DLLTOOL]) 77021b12faf6Smrg]) 7703d31dbc53Smrg 7704e35d4d8eSmrg# _LT_DECL_SED 7705e35d4d8eSmrg# ------------ 7706e35d4d8eSmrg# Check for a fully-functional sed program, that truncates 7707e35d4d8eSmrg# as few characters as possible. Prefer GNU sed if found. 7708e35d4d8eSmrgm4_defun([_LT_DECL_SED], 7709e35d4d8eSmrg[AC_PROG_SED 7710e35d4d8eSmrgtest -z "$SED" && SED=sed 7711e35d4d8eSmrgXsed="$SED -e 1s/^X//" 7712e35d4d8eSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7713e35d4d8eSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7714e35d4d8eSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7715e35d4d8eSmrg])# _LT_DECL_SED 7716e35d4d8eSmrg 7717e35d4d8eSmrgm4_ifndef([AC_PROG_SED], [ 7718e35d4d8eSmrg# NOTE: This macro has been submitted for inclusion into # 7719e35d4d8eSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7720e35d4d8eSmrg# a released version of Autoconf we should remove this # 7721e35d4d8eSmrg# macro and use it instead. # 7722e35d4d8eSmrg 7723e35d4d8eSmrgm4_defun([AC_PROG_SED], 7724e35d4d8eSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7725e35d4d8eSmrgAC_CACHE_VAL(lt_cv_path_SED, 7726e35d4d8eSmrg[# Loop through the user's path and test for sed and gsed. 7727e35d4d8eSmrg# Then use that list of sed's as ones to test for truncation. 7728e35d4d8eSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7729e35d4d8eSmrgfor as_dir in $PATH 7730e35d4d8eSmrgdo 7731e35d4d8eSmrg IFS=$as_save_IFS 7732e35d4d8eSmrg test -z "$as_dir" && as_dir=. 7733e35d4d8eSmrg for lt_ac_prog in sed gsed; do 7734e35d4d8eSmrg for ac_exec_ext in '' $ac_executable_extensions; do 7735e35d4d8eSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7736e35d4d8eSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7737e35d4d8eSmrg fi 7738e35d4d8eSmrg done 7739e35d4d8eSmrg done 7740e35d4d8eSmrgdone 7741e35d4d8eSmrgIFS=$as_save_IFS 7742e35d4d8eSmrglt_ac_max=0 7743e35d4d8eSmrglt_ac_count=0 7744e35d4d8eSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7745e35d4d8eSmrg# along with /bin/sed that truncates output. 7746e35d4d8eSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7747e35d4d8eSmrg test ! -f $lt_ac_sed && continue 7748e35d4d8eSmrg cat /dev/null > conftest.in 7749e35d4d8eSmrg lt_ac_count=0 7750e35d4d8eSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7751e35d4d8eSmrg # Check for GNU sed and select it if it is found. 7752e35d4d8eSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7753e35d4d8eSmrg lt_cv_path_SED=$lt_ac_sed 7754e35d4d8eSmrg break 7755e35d4d8eSmrg fi 7756e35d4d8eSmrg while true; do 7757e35d4d8eSmrg cat conftest.in conftest.in >conftest.tmp 7758e35d4d8eSmrg mv conftest.tmp conftest.in 7759e35d4d8eSmrg cp conftest.in conftest.nl 7760e35d4d8eSmrg echo >>conftest.nl 7761e35d4d8eSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7762e35d4d8eSmrg cmp -s conftest.out conftest.nl || break 7763e35d4d8eSmrg # 10000 chars as input seems more than enough 7764e35d4d8eSmrg test $lt_ac_count -gt 10 && break 7765e35d4d8eSmrg lt_ac_count=`expr $lt_ac_count + 1` 7766e35d4d8eSmrg if test $lt_ac_count -gt $lt_ac_max; then 7767e35d4d8eSmrg lt_ac_max=$lt_ac_count 7768e35d4d8eSmrg lt_cv_path_SED=$lt_ac_sed 7769e35d4d8eSmrg fi 7770e35d4d8eSmrg done 7771e35d4d8eSmrgdone 7772e35d4d8eSmrg]) 7773e35d4d8eSmrgSED=$lt_cv_path_SED 7774e35d4d8eSmrgAC_SUBST([SED]) 7775e35d4d8eSmrgAC_MSG_RESULT([$SED]) 7776e35d4d8eSmrg])#AC_PROG_SED 7777e35d4d8eSmrg])#m4_ifndef 7778d31dbc53Smrg 7779e35d4d8eSmrg# Old name: 7780e35d4d8eSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 77811b12faf6Smrgdnl aclocal-1.4 backwards compatibility: 7782e35d4d8eSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7783e35d4d8eSmrg 77841b12faf6Smrg 7785e35d4d8eSmrg# _LT_CHECK_SHELL_FEATURES 7786e35d4d8eSmrg# ------------------------ 7787e35d4d8eSmrg# Find out whether the shell is Bourne or XSI compatible, 7788e35d4d8eSmrg# or has some other useful features. 7789e35d4d8eSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7790e35d4d8eSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7791e35d4d8eSmrg# Try some XSI features 7792e35d4d8eSmrgxsi_shell=no 7793e35d4d8eSmrg( _lt_dummy="a/b/c" 7794e35d4d8eSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7795e35d4d8eSmrg = c,a/b,b/c, \ 7796e35d4d8eSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7797e35d4d8eSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7798e35d4d8eSmrg && xsi_shell=yes 7799e35d4d8eSmrgAC_MSG_RESULT([$xsi_shell]) 7800e35d4d8eSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 78011b12faf6Smrg 7802e35d4d8eSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7803e35d4d8eSmrglt_shell_append=no 7804e35d4d8eSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7805e35d4d8eSmrg >/dev/null 2>&1 \ 7806e35d4d8eSmrg && lt_shell_append=yes 7807e35d4d8eSmrgAC_MSG_RESULT([$lt_shell_append]) 7808e35d4d8eSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 78091b12faf6Smrg 7810e35d4d8eSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7811e35d4d8eSmrg lt_unset=unset 7812e35d4d8eSmrgelse 7813e35d4d8eSmrg lt_unset=false 7814e35d4d8eSmrgfi 7815e35d4d8eSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7816d31dbc53Smrg 7817e35d4d8eSmrg# test EBCDIC or ASCII 7818e35d4d8eSmrgcase `echo X|tr X '\101'` in 7819e35d4d8eSmrg A) # ASCII based system 7820e35d4d8eSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7821e35d4d8eSmrg lt_SP2NL='tr \040 \012' 7822e35d4d8eSmrg lt_NL2SP='tr \015\012 \040\040' 7823e35d4d8eSmrg ;; 7824e35d4d8eSmrg *) # EBCDIC based system 7825e35d4d8eSmrg lt_SP2NL='tr \100 \n' 7826e35d4d8eSmrg lt_NL2SP='tr \r\n \100\100' 7827e35d4d8eSmrg ;; 7828e35d4d8eSmrgesac 7829e35d4d8eSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7830e35d4d8eSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7831e35d4d8eSmrg])# _LT_CHECK_SHELL_FEATURES 7832d31dbc53Smrg 78331b12faf6Smrg 7834e35d4d8eSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7835e35d4d8eSmrg# ------------------------------------------------------ 7836e35d4d8eSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7837e35d4d8eSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7838e35d4d8eSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 7839e35d4d8eSmrg[dnl { 7840e35d4d8eSmrgsed -e '/^$1 ()$/,/^} # $1 /c\ 7841e35d4d8eSmrg$1 ()\ 7842e35d4d8eSmrg{\ 7843e35d4d8eSmrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7844e35d4d8eSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7845e35d4d8eSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7846e35d4d8eSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7847e35d4d8eSmrgtest 0 -eq $? || _lt_function_replace_fail=: 78481b12faf6Smrg]) 7849d31dbc53Smrg 7850d31dbc53Smrg 7851e35d4d8eSmrg# _LT_PROG_REPLACE_SHELLFNS 7852e35d4d8eSmrg# ------------------------- 7853e35d4d8eSmrg# Replace existing portable implementations of several shell functions with 7854e35d4d8eSmrg# equivalent extended shell implementations where those features are available.. 7855e35d4d8eSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 7856e35d4d8eSmrg[if test x"$xsi_shell" = xyes; then 7857e35d4d8eSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7858e35d4d8eSmrg case ${1} in 7859e35d4d8eSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7860e35d4d8eSmrg * ) func_dirname_result="${3}" ;; 7861e35d4d8eSmrg esac]) 7862e35d4d8eSmrg 7863e35d4d8eSmrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7864e35d4d8eSmrg func_basename_result="${1##*/}"]) 7865e35d4d8eSmrg 7866e35d4d8eSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7867e35d4d8eSmrg case ${1} in 7868e35d4d8eSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7869e35d4d8eSmrg * ) func_dirname_result="${3}" ;; 7870e35d4d8eSmrg esac 7871e35d4d8eSmrg func_basename_result="${1##*/}"]) 7872d31dbc53Smrg 7873e35d4d8eSmrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7874e35d4d8eSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7875e35d4d8eSmrg # positional parameters, so assign one to ordinary parameter first. 7876e35d4d8eSmrg func_stripname_result=${3} 7877e35d4d8eSmrg func_stripname_result=${func_stripname_result#"${1}"} 7878e35d4d8eSmrg func_stripname_result=${func_stripname_result%"${2}"}]) 7879d31dbc53Smrg 7880e35d4d8eSmrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7881e35d4d8eSmrg func_split_long_opt_name=${1%%=*} 7882e35d4d8eSmrg func_split_long_opt_arg=${1#*=}]) 7883d31dbc53Smrg 7884e35d4d8eSmrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7885e35d4d8eSmrg func_split_short_opt_arg=${1#??} 7886e35d4d8eSmrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 78871b12faf6Smrg 7888e35d4d8eSmrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7889e35d4d8eSmrg case ${1} in 7890e35d4d8eSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7891e35d4d8eSmrg *) func_lo2o_result=${1} ;; 7892e35d4d8eSmrg esac]) 78931b12faf6Smrg 7894e35d4d8eSmrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 78951b12faf6Smrg 7896e35d4d8eSmrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 7897d31dbc53Smrg 7898e35d4d8eSmrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7899e35d4d8eSmrgfi 7900d31dbc53Smrg 7901e35d4d8eSmrgif test x"$lt_shell_append" = xyes; then 7902e35d4d8eSmrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 7903d31dbc53Smrg 7904e35d4d8eSmrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7905e35d4d8eSmrg func_quote_for_eval "${2}" 7906e35d4d8eSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7907e35d4d8eSmrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 7908d31dbc53Smrg 7909e35d4d8eSmrg # Save a `func_append' function call where possible by direct use of '+=' 7910e35d4d8eSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7911e35d4d8eSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7912e35d4d8eSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7913e35d4d8eSmrg test 0 -eq $? || _lt_function_replace_fail=: 7914e35d4d8eSmrgelse 7915e35d4d8eSmrg # Save a `func_append' function call even when '+=' is not available 7916e35d4d8eSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7917e35d4d8eSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7918e35d4d8eSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7919e35d4d8eSmrg test 0 -eq $? || _lt_function_replace_fail=: 7920e35d4d8eSmrgfi 7921d31dbc53Smrg 7922e35d4d8eSmrgif test x"$_lt_function_replace_fail" = x":"; then 7923e35d4d8eSmrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7924e35d4d8eSmrgfi 7925e35d4d8eSmrg]) 7926e35d4d8eSmrg 7927e35d4d8eSmrg# _LT_PATH_CONVERSION_FUNCTIONS 7928e35d4d8eSmrg# ----------------------------- 7929e35d4d8eSmrg# Determine which file name conversion functions should be used by 7930e35d4d8eSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7931e35d4d8eSmrg# for certain cross-compile configurations and native mingw. 7932e35d4d8eSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7933e35d4d8eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7934e35d4d8eSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7935e35d4d8eSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 7936e35d4d8eSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7937e35d4d8eSmrg[case $host in 7938e35d4d8eSmrg *-*-mingw* ) 7939e35d4d8eSmrg case $build in 7940e35d4d8eSmrg *-*-mingw* ) # actually msys 7941e35d4d8eSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7942e35d4d8eSmrg ;; 7943e35d4d8eSmrg *-*-cygwin* ) 7944e35d4d8eSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7945e35d4d8eSmrg ;; 7946e35d4d8eSmrg * ) # otherwise, assume *nix 7947e35d4d8eSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7948e35d4d8eSmrg ;; 7949e35d4d8eSmrg esac 7950e35d4d8eSmrg ;; 7951e35d4d8eSmrg *-*-cygwin* ) 7952e35d4d8eSmrg case $build in 7953e35d4d8eSmrg *-*-mingw* ) # actually msys 7954e35d4d8eSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7955e35d4d8eSmrg ;; 7956e35d4d8eSmrg *-*-cygwin* ) 7957e35d4d8eSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 7958e35d4d8eSmrg ;; 7959e35d4d8eSmrg * ) # otherwise, assume *nix 7960e35d4d8eSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7961e35d4d8eSmrg ;; 7962e35d4d8eSmrg esac 7963e35d4d8eSmrg ;; 7964e35d4d8eSmrg * ) # unhandled hosts (and "normal" native builds) 7965e35d4d8eSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 7966e35d4d8eSmrg ;; 7967e35d4d8eSmrgesac 7968e35d4d8eSmrg]) 7969e35d4d8eSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 7970e35d4d8eSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7971e35d4d8eSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7972e35d4d8eSmrg [0], [convert $build file names to $host format])dnl 7973e35d4d8eSmrg 7974e35d4d8eSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7975e35d4d8eSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7976e35d4d8eSmrg[#assume ordinary cross tools, or native build. 7977e35d4d8eSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 7978e35d4d8eSmrgcase $host in 7979e35d4d8eSmrg *-*-mingw* ) 7980e35d4d8eSmrg case $build in 7981e35d4d8eSmrg *-*-mingw* ) # actually msys 7982e35d4d8eSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7983e35d4d8eSmrg ;; 7984e35d4d8eSmrg esac 7985e35d4d8eSmrg ;; 7986e35d4d8eSmrgesac 7987e35d4d8eSmrg]) 7988e35d4d8eSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7989e35d4d8eSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7990e35d4d8eSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7991e35d4d8eSmrg [0], [convert $build files to toolchain format])dnl 7992e35d4d8eSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 7993e35d4d8eSmrg 7994e35d4d8eSmrg# Helper functions for option handling. -*- Autoconf -*- 79951b12faf6Smrg# 7996e35d4d8eSmrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 7997e35d4d8eSmrg# Inc. 7998e35d4d8eSmrg# Written by Gary V. Vaughan, 2004 79991b12faf6Smrg# 80001b12faf6Smrg# This file is free software; the Free Software Foundation gives 80011b12faf6Smrg# unlimited permission to copy and/or distribute it, with or without 80021b12faf6Smrg# modifications, as long as this notice is preserved. 80031b12faf6Smrg 8004e35d4d8eSmrg# serial 7 ltoptions.m4 80051b12faf6Smrg 80061b12faf6Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8007e35d4d8eSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 80081b12faf6Smrg 80091b12faf6Smrg 8010e35d4d8eSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 80111b12faf6Smrg# ------------------------------------------ 8012e35d4d8eSmrgm4_define([_LT_MANGLE_OPTION], 8013e35d4d8eSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 80141b12faf6Smrg 80151b12faf6Smrg 8016e35d4d8eSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8017e35d4d8eSmrg# --------------------------------------- 8018e35d4d8eSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8019e35d4d8eSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8020e35d4d8eSmrg# saved as a flag. 8021e35d4d8eSmrgm4_define([_LT_SET_OPTION], 8022e35d4d8eSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8023e35d4d8eSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8024e35d4d8eSmrg _LT_MANGLE_DEFUN([$1], [$2]), 8025e35d4d8eSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 8026e35d4d8eSmrg]) 80271b12faf6Smrg 80281b12faf6Smrg 8029e35d4d8eSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8030e35d4d8eSmrg# ------------------------------------------------------------ 8031e35d4d8eSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8032e35d4d8eSmrgm4_define([_LT_IF_OPTION], 8033e35d4d8eSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 80341b12faf6Smrg 80351b12faf6Smrg 8036e35d4d8eSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8037e35d4d8eSmrg# ------------------------------------------------------- 8038e35d4d8eSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8039e35d4d8eSmrg# are set. 8040e35d4d8eSmrgm4_define([_LT_UNLESS_OPTIONS], 8041e35d4d8eSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8042e35d4d8eSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8043e35d4d8eSmrg [m4_define([$0_found])])])[]dnl 8044e35d4d8eSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8045e35d4d8eSmrg])[]dnl 8046e35d4d8eSmrg]) 80471b12faf6Smrg 80481b12faf6Smrg 8049e35d4d8eSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8050e35d4d8eSmrg# ---------------------------------------- 8051e35d4d8eSmrg# OPTION-LIST is a space-separated list of Libtool options associated 8052e35d4d8eSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 8053e35d4d8eSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8054e35d4d8eSmrg# the unknown option and exit. 8055e35d4d8eSmrgm4_defun([_LT_SET_OPTIONS], 8056e35d4d8eSmrg[# Set options 8057e35d4d8eSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8058e35d4d8eSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 80591b12faf6Smrg 8060e35d4d8eSmrgm4_if([$1],[LT_INIT],[ 8061e35d4d8eSmrg dnl 8062e35d4d8eSmrg dnl Simply set some default values (i.e off) if boolean options were not 8063e35d4d8eSmrg dnl specified: 8064e35d4d8eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8065e35d4d8eSmrg ]) 8066e35d4d8eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8067e35d4d8eSmrg ]) 8068e35d4d8eSmrg dnl 8069e35d4d8eSmrg dnl If no reference was made to various pairs of opposing options, then 8070e35d4d8eSmrg dnl we run the default mode handler for the pair. For example, if neither 8071e35d4d8eSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 8072e35d4d8eSmrg dnl archives by default: 8073e35d4d8eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8074e35d4d8eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8075e35d4d8eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8076e35d4d8eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8077e35d4d8eSmrg [_LT_ENABLE_FAST_INSTALL]) 8078e35d4d8eSmrg ]) 8079e35d4d8eSmrg])# _LT_SET_OPTIONS 8080d31dbc53Smrg 80811b12faf6Smrg 80821b12faf6Smrg 8083e35d4d8eSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8084e35d4d8eSmrg# ----------------------------------------- 8085e35d4d8eSmrgm4_define([_LT_MANGLE_DEFUN], 8086e35d4d8eSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 80871b12faf6Smrg 80881b12faf6Smrg 8089e35d4d8eSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8090e35d4d8eSmrg# ----------------------------------------------- 8091e35d4d8eSmrgm4_define([LT_OPTION_DEFINE], 8092e35d4d8eSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8093e35d4d8eSmrg])# LT_OPTION_DEFINE 80941b12faf6Smrg 8095d31dbc53Smrg 8096e35d4d8eSmrg# dlopen 8097e35d4d8eSmrg# ------ 8098e35d4d8eSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8099e35d4d8eSmrg]) 81001b12faf6Smrg 8101e35d4d8eSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 8102e35d4d8eSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 8103e35d4d8eSmrgAC_DIAGNOSE([obsolete], 8104e35d4d8eSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8105e35d4d8eSmrgput the `dlopen' option into LT_INIT's first parameter.]) 8106e35d4d8eSmrg]) 8107d31dbc53Smrg 8108e35d4d8eSmrgdnl aclocal-1.4 backwards compatibility: 8109e35d4d8eSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8110d31dbc53Smrg 8111d31dbc53Smrg 8112e35d4d8eSmrg# win32-dll 8113e35d4d8eSmrg# --------- 8114e35d4d8eSmrg# Declare package support for building win32 dll's. 8115e35d4d8eSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 8116e35d4d8eSmrg[enable_win32_dll=yes 8117d31dbc53Smrg 8118e35d4d8eSmrgcase $host in 8119e35d4d8eSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8120e35d4d8eSmrg AC_CHECK_TOOL(AS, as, false) 8121e35d4d8eSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8122e35d4d8eSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 8123e35d4d8eSmrg ;; 8124e35d4d8eSmrgesac 8125d31dbc53Smrg 8126e35d4d8eSmrgtest -z "$AS" && AS=as 8127e35d4d8eSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 8128d31dbc53Smrg 8129e35d4d8eSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8130e35d4d8eSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8131d31dbc53Smrg 8132e35d4d8eSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8133e35d4d8eSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8134e35d4d8eSmrg])# win32-dll 8135d31dbc53Smrg 8136e35d4d8eSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8137e35d4d8eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8138e35d4d8eSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 8139e35d4d8eSmrgAC_DIAGNOSE([obsolete], 8140e35d4d8eSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8141e35d4d8eSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 8142e35d4d8eSmrg]) 8143d31dbc53Smrg 8144e35d4d8eSmrgdnl aclocal-1.4 backwards compatibility: 8145e35d4d8eSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8146d31dbc53Smrg 8147d31dbc53Smrg 8148e35d4d8eSmrg# _LT_ENABLE_SHARED([DEFAULT]) 8149e35d4d8eSmrg# ---------------------------- 8150e35d4d8eSmrg# implement the --enable-shared flag, and supports the `shared' and 8151e35d4d8eSmrg# `disable-shared' LT_INIT options. 8152e35d4d8eSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8153e35d4d8eSmrgm4_define([_LT_ENABLE_SHARED], 8154e35d4d8eSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8155e35d4d8eSmrgAC_ARG_ENABLE([shared], 8156e35d4d8eSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8157e35d4d8eSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8158e35d4d8eSmrg [p=${PACKAGE-default} 8159e35d4d8eSmrg case $enableval in 8160e35d4d8eSmrg yes) enable_shared=yes ;; 8161e35d4d8eSmrg no) enable_shared=no ;; 8162e35d4d8eSmrg *) 8163e35d4d8eSmrg enable_shared=no 8164e35d4d8eSmrg # Look at the argument we got. We use all the common list separators. 8165e35d4d8eSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8166e35d4d8eSmrg for pkg in $enableval; do 8167e35d4d8eSmrg IFS="$lt_save_ifs" 8168e35d4d8eSmrg if test "X$pkg" = "X$p"; then 8169e35d4d8eSmrg enable_shared=yes 8170e35d4d8eSmrg fi 8171e35d4d8eSmrg done 8172e35d4d8eSmrg IFS="$lt_save_ifs" 8173e35d4d8eSmrg ;; 8174e35d4d8eSmrg esac], 8175e35d4d8eSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8176d31dbc53Smrg 8177e35d4d8eSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8178e35d4d8eSmrg [Whether or not to build shared libraries]) 8179e35d4d8eSmrg])# _LT_ENABLE_SHARED 8180d31dbc53Smrg 8181e35d4d8eSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8182e35d4d8eSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8183d31dbc53Smrg 8184e35d4d8eSmrg# Old names: 8185e35d4d8eSmrgAC_DEFUN([AC_ENABLE_SHARED], 8186e35d4d8eSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8187e35d4d8eSmrg]) 8188d31dbc53Smrg 8189e35d4d8eSmrgAC_DEFUN([AC_DISABLE_SHARED], 8190e35d4d8eSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8191e35d4d8eSmrg]) 8192d31dbc53Smrg 8193e35d4d8eSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8194e35d4d8eSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8195d31dbc53Smrg 8196e35d4d8eSmrgdnl aclocal-1.4 backwards compatibility: 8197e35d4d8eSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8198e35d4d8eSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8199d31dbc53Smrg 82002a51b5beSmrg 82012a51b5beSmrg 8202e35d4d8eSmrg# _LT_ENABLE_STATIC([DEFAULT]) 8203e35d4d8eSmrg# ---------------------------- 8204e35d4d8eSmrg# implement the --enable-static flag, and support the `static' and 8205e35d4d8eSmrg# `disable-static' LT_INIT options. 8206e35d4d8eSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8207e35d4d8eSmrgm4_define([_LT_ENABLE_STATIC], 8208e35d4d8eSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8209e35d4d8eSmrgAC_ARG_ENABLE([static], 8210e35d4d8eSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8211e35d4d8eSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8212e35d4d8eSmrg [p=${PACKAGE-default} 8213e35d4d8eSmrg case $enableval in 8214e35d4d8eSmrg yes) enable_static=yes ;; 8215e35d4d8eSmrg no) enable_static=no ;; 8216e35d4d8eSmrg *) 8217e35d4d8eSmrg enable_static=no 8218e35d4d8eSmrg # Look at the argument we got. We use all the common list separators. 8219e35d4d8eSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8220e35d4d8eSmrg for pkg in $enableval; do 8221e35d4d8eSmrg IFS="$lt_save_ifs" 8222e35d4d8eSmrg if test "X$pkg" = "X$p"; then 8223e35d4d8eSmrg enable_static=yes 82242a51b5beSmrg fi 8225e35d4d8eSmrg done 8226e35d4d8eSmrg IFS="$lt_save_ifs" 8227e35d4d8eSmrg ;; 8228e35d4d8eSmrg esac], 8229e35d4d8eSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8230d31dbc53Smrg 8231e35d4d8eSmrg _LT_DECL([build_old_libs], [enable_static], [0], 8232e35d4d8eSmrg [Whether or not to build static libraries]) 8233e35d4d8eSmrg])# _LT_ENABLE_STATIC 8234d31dbc53Smrg 8235e35d4d8eSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8236e35d4d8eSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8237d31dbc53Smrg 8238e35d4d8eSmrg# Old names: 8239e35d4d8eSmrgAC_DEFUN([AC_ENABLE_STATIC], 8240e35d4d8eSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8241e35d4d8eSmrg]) 8242e35d4d8eSmrg 8243e35d4d8eSmrgAC_DEFUN([AC_DISABLE_STATIC], 8244e35d4d8eSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8245e35d4d8eSmrg]) 8246d31dbc53Smrg 8247e35d4d8eSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8248e35d4d8eSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 82492a51b5beSmrg 8250e35d4d8eSmrgdnl aclocal-1.4 backwards compatibility: 8251e35d4d8eSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8252e35d4d8eSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 82532a51b5beSmrg 8254d31dbc53Smrg 825532b578d3Smrg 8256e35d4d8eSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8257e35d4d8eSmrg# ---------------------------------- 8258e35d4d8eSmrg# implement the --enable-fast-install flag, and support the `fast-install' 8259e35d4d8eSmrg# and `disable-fast-install' LT_INIT options. 8260e35d4d8eSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8261e35d4d8eSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 8262e35d4d8eSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8263e35d4d8eSmrgAC_ARG_ENABLE([fast-install], 8264e35d4d8eSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8265e35d4d8eSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8266e35d4d8eSmrg [p=${PACKAGE-default} 8267e35d4d8eSmrg case $enableval in 8268e35d4d8eSmrg yes) enable_fast_install=yes ;; 8269e35d4d8eSmrg no) enable_fast_install=no ;; 8270e35d4d8eSmrg *) 8271e35d4d8eSmrg enable_fast_install=no 8272e35d4d8eSmrg # Look at the argument we got. We use all the common list separators. 8273e35d4d8eSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8274e35d4d8eSmrg for pkg in $enableval; do 8275e35d4d8eSmrg IFS="$lt_save_ifs" 8276e35d4d8eSmrg if test "X$pkg" = "X$p"; then 8277e35d4d8eSmrg enable_fast_install=yes 8278e35d4d8eSmrg fi 8279e35d4d8eSmrg done 8280e35d4d8eSmrg IFS="$lt_save_ifs" 8281e35d4d8eSmrg ;; 8282e35d4d8eSmrg esac], 8283e35d4d8eSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 828432b578d3Smrg 8285e35d4d8eSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 8286e35d4d8eSmrg [Whether or not to optimize for fast installation])dnl 8287e35d4d8eSmrg])# _LT_ENABLE_FAST_INSTALL 828832b578d3Smrg 8289e35d4d8eSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8290e35d4d8eSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 82911b12faf6Smrg 8292e35d4d8eSmrg# Old names: 8293e35d4d8eSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8294e35d4d8eSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8295e35d4d8eSmrgAC_DIAGNOSE([obsolete], 8296e35d4d8eSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8297e35d4d8eSmrgthe `fast-install' option into LT_INIT's first parameter.]) 8298e35d4d8eSmrg]) 82991b12faf6Smrg 8300e35d4d8eSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8301e35d4d8eSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8302e35d4d8eSmrgAC_DIAGNOSE([obsolete], 8303e35d4d8eSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8304e35d4d8eSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 8305e35d4d8eSmrg]) 830632b578d3Smrg 8307e35d4d8eSmrgdnl aclocal-1.4 backwards compatibility: 8308e35d4d8eSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8309e35d4d8eSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 83101b12faf6Smrg 83111b12faf6Smrg 8312e35d4d8eSmrg# _LT_WITH_PIC([MODE]) 8313e35d4d8eSmrg# -------------------- 8314e35d4d8eSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 8315e35d4d8eSmrg# LT_INIT options. 8316e35d4d8eSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 8317e35d4d8eSmrgm4_define([_LT_WITH_PIC], 8318e35d4d8eSmrg[AC_ARG_WITH([pic], 8319e35d4d8eSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8320e35d4d8eSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8321e35d4d8eSmrg [lt_p=${PACKAGE-default} 8322e35d4d8eSmrg case $withval in 8323e35d4d8eSmrg yes|no) pic_mode=$withval ;; 8324e35d4d8eSmrg *) 8325e35d4d8eSmrg pic_mode=default 8326e35d4d8eSmrg # Look at the argument we got. We use all the common list separators. 8327e35d4d8eSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8328e35d4d8eSmrg for lt_pkg in $withval; do 8329e35d4d8eSmrg IFS="$lt_save_ifs" 8330e35d4d8eSmrg if test "X$lt_pkg" = "X$lt_p"; then 8331e35d4d8eSmrg pic_mode=yes 8332e35d4d8eSmrg fi 8333e35d4d8eSmrg done 8334e35d4d8eSmrg IFS="$lt_save_ifs" 8335e35d4d8eSmrg ;; 8336e35d4d8eSmrg esac], 8337e35d4d8eSmrg [pic_mode=default]) 83381b12faf6Smrg 8339e35d4d8eSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 834032b578d3Smrg 8341e35d4d8eSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8342e35d4d8eSmrg])# _LT_WITH_PIC 834332b578d3Smrg 8344e35d4d8eSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8345e35d4d8eSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 834632b578d3Smrg 8347e35d4d8eSmrg# Old name: 8348e35d4d8eSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8349e35d4d8eSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8350e35d4d8eSmrgAC_DIAGNOSE([obsolete], 8351e35d4d8eSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8352e35d4d8eSmrgput the `pic-only' option into LT_INIT's first parameter.]) 8353e35d4d8eSmrg]) 835432b578d3Smrg 8355e35d4d8eSmrgdnl aclocal-1.4 backwards compatibility: 8356e35d4d8eSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 835732b578d3Smrg 835832b578d3Smrg 8359e35d4d8eSmrgm4_define([_LTDL_MODE], []) 8360e35d4d8eSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8361e35d4d8eSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8362e35d4d8eSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8363e35d4d8eSmrg [m4_define([_LTDL_MODE], [recursive])]) 8364e35d4d8eSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8365e35d4d8eSmrg [m4_define([_LTDL_MODE], [subproject])]) 836632b578d3Smrg 8367e35d4d8eSmrgm4_define([_LTDL_TYPE], []) 8368e35d4d8eSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8369e35d4d8eSmrg [m4_define([_LTDL_TYPE], [installable])]) 8370e35d4d8eSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8371e35d4d8eSmrg [m4_define([_LTDL_TYPE], [convenience])]) 83721b12faf6Smrg 8373e35d4d8eSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8374e35d4d8eSmrg# 8375e35d4d8eSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 8376e35d4d8eSmrg# Written by Gary V. Vaughan, 2004 8377e35d4d8eSmrg# 8378e35d4d8eSmrg# This file is free software; the Free Software Foundation gives 8379e35d4d8eSmrg# unlimited permission to copy and/or distribute it, with or without 8380e35d4d8eSmrg# modifications, as long as this notice is preserved. 83811b12faf6Smrg 8382e35d4d8eSmrg# serial 6 ltsugar.m4 83831b12faf6Smrg 8384e35d4d8eSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8385e35d4d8eSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 83861b12faf6Smrg 83871b12faf6Smrg 8388e35d4d8eSmrg# lt_join(SEP, ARG1, [ARG2...]) 8389e35d4d8eSmrg# ----------------------------- 8390e35d4d8eSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8391e35d4d8eSmrg# associated separator. 8392e35d4d8eSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8393e35d4d8eSmrg# versions in m4sugar had bugs. 8394e35d4d8eSmrgm4_define([lt_join], 8395e35d4d8eSmrg[m4_if([$#], [1], [], 8396e35d4d8eSmrg [$#], [2], [[$2]], 8397e35d4d8eSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8398e35d4d8eSmrgm4_define([_lt_join], 8399e35d4d8eSmrg[m4_if([$#$2], [2], [], 8400e35d4d8eSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8401e35d4d8eSmrg 84021b12faf6Smrg 8403e35d4d8eSmrg# lt_car(LIST) 8404e35d4d8eSmrg# lt_cdr(LIST) 8405e35d4d8eSmrg# ------------ 8406e35d4d8eSmrg# Manipulate m4 lists. 8407e35d4d8eSmrg# These macros are necessary as long as will still need to support 8408e35d4d8eSmrg# Autoconf-2.59 which quotes differently. 8409e35d4d8eSmrgm4_define([lt_car], [[$1]]) 8410e35d4d8eSmrgm4_define([lt_cdr], 8411e35d4d8eSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8412e35d4d8eSmrg [$#], 1, [], 8413e35d4d8eSmrg [m4_dquote(m4_shift($@))])]) 8414e35d4d8eSmrgm4_define([lt_unquote], $1) 84151b12faf6Smrg 84161b12faf6Smrg 8417e35d4d8eSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8418e35d4d8eSmrg# ------------------------------------------ 8419e35d4d8eSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 8420e35d4d8eSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8421e35d4d8eSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8422e35d4d8eSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8423e35d4d8eSmrg# than defined and empty). 8424e35d4d8eSmrg# 8425e35d4d8eSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8426e35d4d8eSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8427e35d4d8eSmrgm4_define([lt_append], 8428e35d4d8eSmrg[m4_define([$1], 8429e35d4d8eSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 84301b12faf6Smrg 84311b12faf6Smrg 84321b12faf6Smrg 8433e35d4d8eSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8434e35d4d8eSmrg# ---------------------------------------------------------- 8435e35d4d8eSmrg# Produce a SEP delimited list of all paired combinations of elements of 8436e35d4d8eSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8437e35d4d8eSmrg# has the form PREFIXmINFIXSUFFIXn. 8438e35d4d8eSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8439e35d4d8eSmrgm4_define([lt_combine], 8440e35d4d8eSmrg[m4_if(m4_eval([$# > 3]), [1], 8441e35d4d8eSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8442e35d4d8eSmrg[[m4_foreach([_Lt_prefix], [$2], 8443e35d4d8eSmrg [m4_foreach([_Lt_suffix], 8444e35d4d8eSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8445e35d4d8eSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 84461b12faf6Smrg 84471b12faf6Smrg 8448e35d4d8eSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8449e35d4d8eSmrg# ----------------------------------------------------------------------- 8450e35d4d8eSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8451e35d4d8eSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8452e35d4d8eSmrgm4_define([lt_if_append_uniq], 8453e35d4d8eSmrg[m4_ifdef([$1], 8454e35d4d8eSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8455e35d4d8eSmrg [lt_append([$1], [$2], [$3])$4], 8456e35d4d8eSmrg [$5])], 8457e35d4d8eSmrg [lt_append([$1], [$2], [$3])$4])]) 84581b12faf6Smrg 84591b12faf6Smrg 8460e35d4d8eSmrg# lt_dict_add(DICT, KEY, VALUE) 8461e35d4d8eSmrg# ----------------------------- 8462e35d4d8eSmrgm4_define([lt_dict_add], 8463e35d4d8eSmrg[m4_define([$1($2)], [$3])]) 84641b12faf6Smrg 84651b12faf6Smrg 8466e35d4d8eSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8467e35d4d8eSmrg# -------------------------------------------- 8468e35d4d8eSmrgm4_define([lt_dict_add_subkey], 8469e35d4d8eSmrg[m4_define([$1($2:$3)], [$4])]) 84701b12faf6Smrg 84711b12faf6Smrg 8472e35d4d8eSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8473e35d4d8eSmrg# ---------------------------------- 8474e35d4d8eSmrgm4_define([lt_dict_fetch], 8475e35d4d8eSmrg[m4_ifval([$3], 8476e35d4d8eSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8477e35d4d8eSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 84781b12faf6Smrg 8479e35d4d8eSmrg 8480e35d4d8eSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8481e35d4d8eSmrg# ----------------------------------------------------------------- 8482e35d4d8eSmrgm4_define([lt_if_dict_fetch], 8483e35d4d8eSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8484e35d4d8eSmrg [$5], 8485e35d4d8eSmrg [$6])]) 8486e35d4d8eSmrg 8487e35d4d8eSmrg 8488e35d4d8eSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8489e35d4d8eSmrg# -------------------------------------------------------------- 8490e35d4d8eSmrgm4_define([lt_dict_filter], 8491e35d4d8eSmrg[m4_if([$5], [], [], 8492e35d4d8eSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8493e35d4d8eSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8494e35d4d8eSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8495e35d4d8eSmrg]) 8496e35d4d8eSmrg 8497e35d4d8eSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 84981b12faf6Smrg# 8499e35d4d8eSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 8500e35d4d8eSmrg# Written by Scott James Remnant, 2004 85011b12faf6Smrg# 8502e35d4d8eSmrg# This file is free software; the Free Software Foundation gives 8503e35d4d8eSmrg# unlimited permission to copy and/or distribute it, with or without 8504e35d4d8eSmrg# modifications, as long as this notice is preserved. 85051b12faf6Smrg 8506e35d4d8eSmrg# @configure_input@ 85071b12faf6Smrg 8508e35d4d8eSmrg# serial 3337 ltversion.m4 8509e35d4d8eSmrg# This file is part of GNU Libtool 8510e35d4d8eSmrg 8511e35d4d8eSmrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 8512e35d4d8eSmrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 8513e35d4d8eSmrg 8514e35d4d8eSmrgAC_DEFUN([LTVERSION_VERSION], 8515e35d4d8eSmrg[macro_version='2.4.2' 8516e35d4d8eSmrgmacro_revision='1.3337' 8517e35d4d8eSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8518e35d4d8eSmrg_LT_DECL(, macro_revision, 0) 8519e35d4d8eSmrg]) 8520e35d4d8eSmrg 8521e35d4d8eSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 85221b12faf6Smrg# 8523e35d4d8eSmrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 8524e35d4d8eSmrg# Written by Scott James Remnant, 2004. 85251b12faf6Smrg# 8526e35d4d8eSmrg# This file is free software; the Free Software Foundation gives 8527e35d4d8eSmrg# unlimited permission to copy and/or distribute it, with or without 8528e35d4d8eSmrg# modifications, as long as this notice is preserved. 8529e35d4d8eSmrg 8530e35d4d8eSmrg# serial 5 lt~obsolete.m4 8531e35d4d8eSmrg 8532e35d4d8eSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 85331b12faf6Smrg# 8534e35d4d8eSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 8535e35d4d8eSmrg# which have later been changed to m4_define as they aren't part of the 8536e35d4d8eSmrg# exported API, or moved to Autoconf or Automake where they belong. 85371b12faf6Smrg# 8538e35d4d8eSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8539e35d4d8eSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8540e35d4d8eSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 8541e35d4d8eSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8542e35d4d8eSmrg# and doesn't know about Autoconf macros at all.) 85431b12faf6Smrg# 8544e35d4d8eSmrg# So we provide this file, which has a silly filename so it's always 8545e35d4d8eSmrg# included after everything else. This provides aclocal with the 8546e35d4d8eSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8547e35d4d8eSmrg# because those macros already exist, or will be overwritten later. 8548e35d4d8eSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 85491b12faf6Smrg# 8550e35d4d8eSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8551e35d4d8eSmrg# Yes, that means every name once taken will need to remain here until 8552e35d4d8eSmrg# we give up compatibility with versions before 1.7, at which point 8553e35d4d8eSmrg# we need to keep only those names which we still refer to. 855432b578d3Smrg 8555e35d4d8eSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8556e35d4d8eSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 855732b578d3Smrg 8558e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 8559e35d4d8eSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 8560e35d4d8eSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8561e35d4d8eSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8562e35d4d8eSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8563e35d4d8eSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8564e35d4d8eSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 8565e35d4d8eSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 8566e35d4d8eSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 8567e35d4d8eSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 8568e35d4d8eSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 8569e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 8570e35d4d8eSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 8571e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 8572e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 8573e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 8574e35d4d8eSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 8575e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 8576e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 8577e35d4d8eSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 8578e35d4d8eSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 8579e35d4d8eSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 8580e35d4d8eSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 8581e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 8582e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 8583e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 8584e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 8585e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 8586e35d4d8eSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 8587e35d4d8eSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 8588e35d4d8eSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 8589e35d4d8eSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 8590e35d4d8eSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 8591e35d4d8eSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 8592e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 8593e35d4d8eSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 8594e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 8595e35d4d8eSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 8596e35d4d8eSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 8597e35d4d8eSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 8598e35d4d8eSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 8599e35d4d8eSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 8600e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 8601e35d4d8eSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 8602e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 8603e35d4d8eSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 8604e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 8605e35d4d8eSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 8606e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 8607e35d4d8eSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 8608e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 8609e35d4d8eSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 8610e35d4d8eSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 8611e35d4d8eSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 8612e35d4d8eSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 8613e35d4d8eSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 8614e35d4d8eSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 8615e35d4d8eSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 8616e35d4d8eSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 8617e35d4d8eSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 8618e35d4d8eSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 861932b578d3Smrg 8620e35d4d8eSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 86215a81ca49Smrg# serial 1 (pkg-config-0.24) 8622e35d4d8eSmrg# 8623e35d4d8eSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 86242a51b5beSmrg# 8625e35d4d8eSmrg# This program is free software; you can redistribute it and/or modify 8626e35d4d8eSmrg# it under the terms of the GNU General Public License as published by 8627e35d4d8eSmrg# the Free Software Foundation; either version 2 of the License, or 8628e35d4d8eSmrg# (at your option) any later version. 86291b12faf6Smrg# 8630e35d4d8eSmrg# This program is distributed in the hope that it will be useful, but 8631e35d4d8eSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 8632e35d4d8eSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8633e35d4d8eSmrg# General Public License for more details. 86341b12faf6Smrg# 8635e35d4d8eSmrg# You should have received a copy of the GNU General Public License 8636e35d4d8eSmrg# along with this program; if not, write to the Free Software 8637e35d4d8eSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 86381b12faf6Smrg# 8639e35d4d8eSmrg# As a special exception to the GNU General Public License, if you 8640e35d4d8eSmrg# distribute this file as part of a program that contains a 8641e35d4d8eSmrg# configuration script generated by Autoconf, you may include it under 8642e35d4d8eSmrg# the same distribution terms that you use for the rest of that program. 86431b12faf6Smrg 8644e35d4d8eSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 8645e35d4d8eSmrg# ---------------------------------- 8646e35d4d8eSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 8647e35d4d8eSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 86485a81ca49Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 86495a81ca49Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 86505a81ca49SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 86515a81ca49SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 86525a81ca49SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 86535a81ca49Smrg 8654e35d4d8eSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8655e35d4d8eSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 86562a51b5beSmrgfi 8657e35d4d8eSmrgif test -n "$PKG_CONFIG"; then 8658e35d4d8eSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 8659e35d4d8eSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8660e35d4d8eSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8661e35d4d8eSmrg AC_MSG_RESULT([yes]) 8662e35d4d8eSmrg else 8663e35d4d8eSmrg AC_MSG_RESULT([no]) 8664e35d4d8eSmrg PKG_CONFIG="" 8665e35d4d8eSmrg fi 8666e35d4d8eSmrgfi[]dnl 8667e35d4d8eSmrg])# PKG_PROG_PKG_CONFIG 866832b578d3Smrg 8669e35d4d8eSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 86701b12faf6Smrg# 8671e35d4d8eSmrg# Check to see whether a particular set of modules exists. Similar 8672e35d4d8eSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 86731b12faf6Smrg# 86745a81ca49Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 86755a81ca49Smrg# only at the first occurence in configure.ac, so if the first place 86765a81ca49Smrg# it's called might be skipped (such as if it is within an "if", you 86775a81ca49Smrg# have to call PKG_CHECK_EXISTS manually 8678e35d4d8eSmrg# -------------------------------------------------------------- 8679e35d4d8eSmrgAC_DEFUN([PKG_CHECK_EXISTS], 8680e35d4d8eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8681e35d4d8eSmrgif test -n "$PKG_CONFIG" && \ 8682e35d4d8eSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 86835a81ca49Smrg m4_default([$2], [:]) 8684e35d4d8eSmrgm4_ifvaln([$3], [else 8685e35d4d8eSmrg $3])dnl 8686e35d4d8eSmrgfi]) 86871b12faf6Smrg 8688e35d4d8eSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8689e35d4d8eSmrg# --------------------------------------------- 8690e35d4d8eSmrgm4_define([_PKG_CONFIG], 8691e35d4d8eSmrg[if test -n "$$1"; then 8692e35d4d8eSmrg pkg_cv_[]$1="$$1" 8693e35d4d8eSmrg elif test -n "$PKG_CONFIG"; then 8694e35d4d8eSmrg PKG_CHECK_EXISTS([$3], 86955a81ca49Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 86965a81ca49Smrg test "x$?" != "x0" && pkg_failed=yes ], 8697e35d4d8eSmrg [pkg_failed=yes]) 8698e35d4d8eSmrg else 8699e35d4d8eSmrg pkg_failed=untried 8700e35d4d8eSmrgfi[]dnl 8701e35d4d8eSmrg])# _PKG_CONFIG 8702e35d4d8eSmrg 8703e35d4d8eSmrg# _PKG_SHORT_ERRORS_SUPPORTED 8704e35d4d8eSmrg# ----------------------------- 8705e35d4d8eSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 8706e35d4d8eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8707e35d4d8eSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8708e35d4d8eSmrg _pkg_short_errors_supported=yes 87091b12faf6Smrgelse 8710e35d4d8eSmrg _pkg_short_errors_supported=no 8711e35d4d8eSmrgfi[]dnl 8712e35d4d8eSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 871332b578d3Smrg 87141b12faf6Smrg 8715e35d4d8eSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8716e35d4d8eSmrg# [ACTION-IF-NOT-FOUND]) 87171b12faf6Smrg# 87181b12faf6Smrg# 8719e35d4d8eSmrg# Note that if there is a possibility the first call to 8720e35d4d8eSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 8721e35d4d8eSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 87221b12faf6Smrg# 87231b12faf6Smrg# 8724e35d4d8eSmrg# -------------------------------------------------------------- 8725e35d4d8eSmrgAC_DEFUN([PKG_CHECK_MODULES], 8726e35d4d8eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8727e35d4d8eSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8728e35d4d8eSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8729e35d4d8eSmrg 8730e35d4d8eSmrgpkg_failed=no 8731e35d4d8eSmrgAC_MSG_CHECKING([for $1]) 873232b578d3Smrg 8733e35d4d8eSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8734e35d4d8eSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 87352a51b5beSmrg 8736e35d4d8eSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 8737e35d4d8eSmrgand $1[]_LIBS to avoid the need to call pkg-config. 8738e35d4d8eSmrgSee the pkg-config man page for more details.]) 87392a51b5beSmrg 8740e35d4d8eSmrgif test $pkg_failed = yes; then 87415a81ca49Smrg AC_MSG_RESULT([no]) 8742e35d4d8eSmrg _PKG_SHORT_ERRORS_SUPPORTED 8743e35d4d8eSmrg if test $_pkg_short_errors_supported = yes; then 87445a81ca49Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 8745e35d4d8eSmrg else 87465a81ca49Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 8747e35d4d8eSmrg fi 8748e35d4d8eSmrg # Put the nasty error message in config.log where it belongs 8749e35d4d8eSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8750e35d4d8eSmrg 87515a81ca49Smrg m4_default([$4], [AC_MSG_ERROR( 8752e35d4d8eSmrg[Package requirements ($2) were not met: 8753e35d4d8eSmrg 8754e35d4d8eSmrg$$1_PKG_ERRORS 8755e35d4d8eSmrg 8756e35d4d8eSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 8757e35d4d8eSmrginstalled software in a non-standard prefix. 8758e35d4d8eSmrg 87595a81ca49Smrg_PKG_TEXT])[]dnl 87605a81ca49Smrg ]) 8761e35d4d8eSmrgelif test $pkg_failed = untried; then 87625a81ca49Smrg AC_MSG_RESULT([no]) 87635a81ca49Smrg m4_default([$4], [AC_MSG_FAILURE( 8764e35d4d8eSmrg[The pkg-config script could not be found or is too old. Make sure it 8765e35d4d8eSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 8766e35d4d8eSmrgpath to pkg-config. 8767e35d4d8eSmrg 8768e35d4d8eSmrg_PKG_TEXT 8769e35d4d8eSmrg 87705a81ca49SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 87715a81ca49Smrg ]) 87722a51b5beSmrgelse 8773e35d4d8eSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8774e35d4d8eSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8775e35d4d8eSmrg AC_MSG_RESULT([yes]) 87765a81ca49Smrg $3 8777e35d4d8eSmrgfi[]dnl 8778e35d4d8eSmrg])# PKG_CHECK_MODULES 87792a51b5beSmrg 87805a81ca49Smrg 87815a81ca49Smrg# PKG_INSTALLDIR(DIRECTORY) 87825a81ca49Smrg# ------------------------- 87835a81ca49Smrg# Substitutes the variable pkgconfigdir as the location where a module 87845a81ca49Smrg# should install pkg-config .pc files. By default the directory is 87855a81ca49Smrg# $libdir/pkgconfig, but the default can be changed by passing 87865a81ca49Smrg# DIRECTORY. The user can override through the --with-pkgconfigdir 87875a81ca49Smrg# parameter. 87885a81ca49SmrgAC_DEFUN([PKG_INSTALLDIR], 87895a81ca49Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 87905a81ca49Smrgm4_pushdef([pkg_description], 87915a81ca49Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 87925a81ca49SmrgAC_ARG_WITH([pkgconfigdir], 87935a81ca49Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 87945a81ca49Smrg [with_pkgconfigdir=]pkg_default) 87955a81ca49SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 87965a81ca49Smrgm4_popdef([pkg_default]) 87975a81ca49Smrgm4_popdef([pkg_description]) 87985a81ca49Smrg]) dnl PKG_INSTALLDIR 87995a81ca49Smrg 88005a81ca49Smrg 88015a81ca49Smrg# PKG_NOARCH_INSTALLDIR(DIRECTORY) 88025a81ca49Smrg# ------------------------- 88035a81ca49Smrg# Substitutes the variable noarch_pkgconfigdir as the location where a 88045a81ca49Smrg# module should install arch-independent pkg-config .pc files. By 88055a81ca49Smrg# default the directory is $datadir/pkgconfig, but the default can be 88065a81ca49Smrg# changed by passing DIRECTORY. The user can override through the 88075a81ca49Smrg# --with-noarch-pkgconfigdir parameter. 88085a81ca49SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 88095a81ca49Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 88105a81ca49Smrgm4_pushdef([pkg_description], 88115a81ca49Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 88125a81ca49SmrgAC_ARG_WITH([noarch-pkgconfigdir], 88135a81ca49Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 88145a81ca49Smrg [with_noarch_pkgconfigdir=]pkg_default) 88155a81ca49SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 88165a81ca49Smrgm4_popdef([pkg_default]) 88175a81ca49Smrgm4_popdef([pkg_description]) 88185a81ca49Smrg]) dnl PKG_NOARCH_INSTALLDIR 88195a81ca49Smrg 88205a81ca49Smrg 88215a81ca49Smrg# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 88225a81ca49Smrg# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 88235a81ca49Smrg# ------------------------------------------- 88245a81ca49Smrg# Retrieves the value of the pkg-config variable for the given module. 88255a81ca49SmrgAC_DEFUN([PKG_CHECK_VAR], 88265a81ca49Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 88275a81ca49SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 88285a81ca49Smrg 88295a81ca49Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 88305a81ca49SmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 88315a81ca49Smrg 88325a81ca49SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 88335a81ca49Smrg])# PKG_CHECK_VAR 88345a81ca49Smrg 8835e35d4d8eSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 8836e35d4d8eSmrgdnl 8837e35d4d8eSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 88385a81ca49Smrgdnl 8839e35d4d8eSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 8840e35d4d8eSmrgdnl copy of this software and associated documentation files (the "Software"), 8841e35d4d8eSmrgdnl to deal in the Software without restriction, including without limitation 8842e35d4d8eSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 8843e35d4d8eSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 8844e35d4d8eSmrgdnl Software is furnished to do so, subject to the following conditions: 8845e35d4d8eSmrgdnl 8846e35d4d8eSmrgdnl The above copyright notice and this permission notice (including the next 8847e35d4d8eSmrgdnl paragraph) shall be included in all copies or substantial portions of the 8848e35d4d8eSmrgdnl Software. 8849e35d4d8eSmrgdnl 8850e35d4d8eSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 8851e35d4d8eSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 8852e35d4d8eSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 8853e35d4d8eSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 8854e35d4d8eSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 8855e35d4d8eSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 8856e35d4d8eSmrgdnl DEALINGS IN THE SOFTWARE. 885732b578d3Smrg 8858e35d4d8eSmrg# XORG_MACROS_VERSION(required-version) 8859e35d4d8eSmrg# ------------------------------------- 88602a51b5beSmrg# Minimum version: 1.1.0 8861d31dbc53Smrg# 8862e35d4d8eSmrg# If you're using a macro added in Version 1.1 or newer, include this in 8863e35d4d8eSmrg# your configure.ac with the minimum required version, such as: 8864e35d4d8eSmrg# XORG_MACROS_VERSION(1.1) 88651b12faf6Smrg# 8866e35d4d8eSmrg# To ensure that this macro is defined, also add: 8867e35d4d8eSmrg# m4_ifndef([XORG_MACROS_VERSION], 8868e35d4d8eSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 88691b12faf6Smrg# 8870d31dbc53Smrg# 88715a81ca49Smrg# See the "minimum version" comment for each macro you use to see what 8872e35d4d8eSmrg# version you require. 8873e35d4d8eSmrgm4_defun([XORG_MACROS_VERSION],[ 88745a81ca49Smrgm4_define([vers_have], [1.19.0]) 8875e35d4d8eSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 8876e35d4d8eSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 8877e35d4d8eSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 8878e35d4d8eSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 8879e35d4d8eSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 8880e35d4d8eSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 8881e35d4d8eSmrgm4_undefine([vers_have]) 8882e35d4d8eSmrgm4_undefine([maj_have]) 8883e35d4d8eSmrgm4_undefine([maj_needed]) 8884e35d4d8eSmrg]) # XORG_MACROS_VERSION 88851b12faf6Smrg 8886e35d4d8eSmrg# XORG_PROG_RAWCPP() 8887e35d4d8eSmrg# ------------------ 8888e35d4d8eSmrg# Minimum version: 1.0.0 8889e35d4d8eSmrg# 8890e35d4d8eSmrg# Find cpp program and necessary flags for use in pre-processing text files 8891e35d4d8eSmrg# such as man pages and config files 8892e35d4d8eSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 8893e35d4d8eSmrgAC_REQUIRE([AC_PROG_CPP]) 88945a81ca49SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 8895e35d4d8eSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 88961b12faf6Smrg 8897e35d4d8eSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 8898e35d4d8eSmrg# which is not the best choice for supporting other OS'es, but covers most 8899e35d4d8eSmrg# of the ones we need for now. 8900e35d4d8eSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 8901e35d4d8eSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 8902e35d4d8eSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8903e35d4d8eSmrg AC_MSG_RESULT([no]) 89042a51b5beSmrgelse 8905e35d4d8eSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8906e35d4d8eSmrg RAWCPPFLAGS=-undef 8907e35d4d8eSmrg AC_MSG_RESULT([yes]) 8908e35d4d8eSmrg # under Cygwin unix is still defined even with -undef 8909e35d4d8eSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8910e35d4d8eSmrg RAWCPPFLAGS="-undef -ansi" 8911e35d4d8eSmrg AC_MSG_RESULT([yes, with -ansi]) 8912e35d4d8eSmrg else 8913e35d4d8eSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 8914e35d4d8eSmrg fi 89152a51b5beSmrgfi 8916e35d4d8eSmrgrm -f conftest.$ac_ext 89171b12faf6Smrg 8918e35d4d8eSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 8919e35d4d8eSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 8920e35d4d8eSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8921e35d4d8eSmrg AC_MSG_RESULT([no]) 8922e35d4d8eSmrgelse 8923e35d4d8eSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 89245a81ca49Smrg TRADITIONALCPPFLAGS="-traditional" 8925e35d4d8eSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 8926e35d4d8eSmrg AC_MSG_RESULT([yes]) 8927e35d4d8eSmrg else 8928e35d4d8eSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 8929e35d4d8eSmrg fi 89302a51b5beSmrgfi 8931e35d4d8eSmrgrm -f conftest.$ac_ext 8932e35d4d8eSmrgAC_SUBST(RAWCPPFLAGS) 89335a81ca49SmrgAC_SUBST(TRADITIONALCPPFLAGS) 8934e35d4d8eSmrg]) # XORG_PROG_RAWCPP 893532b578d3Smrg 8936e35d4d8eSmrg# XORG_MANPAGE_SECTIONS() 8937e35d4d8eSmrg# ----------------------- 8938e35d4d8eSmrg# Minimum version: 1.0.0 89391b12faf6Smrg# 8940e35d4d8eSmrg# Determine which sections man pages go in for the different man page types 8941e35d4d8eSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 8942e35d4d8eSmrg# Not sure if there's any better way than just hardcoding by OS name. 8943e35d4d8eSmrg# Override default settings by setting environment variables 8944e35d4d8eSmrg# Added MAN_SUBSTS in version 1.8 8945e35d4d8eSmrg# Added AC_PROG_SED in version 1.8 89462a51b5beSmrg 8947e35d4d8eSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 8948e35d4d8eSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 8949e35d4d8eSmrgAC_REQUIRE([AC_PROG_SED]) 89501b12faf6Smrg 8951e35d4d8eSmrgif test x$APP_MAN_SUFFIX = x ; then 8952e35d4d8eSmrg APP_MAN_SUFFIX=1 8953e35d4d8eSmrgfi 8954e35d4d8eSmrgif test x$APP_MAN_DIR = x ; then 8955e35d4d8eSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 8956e35d4d8eSmrgfi 8957e35d4d8eSmrg 8958e35d4d8eSmrgif test x$LIB_MAN_SUFFIX = x ; then 8959e35d4d8eSmrg LIB_MAN_SUFFIX=3 8960e35d4d8eSmrgfi 8961e35d4d8eSmrgif test x$LIB_MAN_DIR = x ; then 8962e35d4d8eSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 89632a51b5beSmrgfi 89641b12faf6Smrg 8965e35d4d8eSmrgif test x$FILE_MAN_SUFFIX = x ; then 8966e35d4d8eSmrg case $host_os in 8967e35d4d8eSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 8968e35d4d8eSmrg *) FILE_MAN_SUFFIX=5 ;; 8969e35d4d8eSmrg esac 8970e35d4d8eSmrgfi 8971e35d4d8eSmrgif test x$FILE_MAN_DIR = x ; then 8972e35d4d8eSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 8973e35d4d8eSmrgfi 897432b578d3Smrg 8975e35d4d8eSmrgif test x$MISC_MAN_SUFFIX = x ; then 8976e35d4d8eSmrg case $host_os in 8977e35d4d8eSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 8978e35d4d8eSmrg *) MISC_MAN_SUFFIX=7 ;; 89792a51b5beSmrg esac 89802a51b5beSmrgfi 8981e35d4d8eSmrgif test x$MISC_MAN_DIR = x ; then 8982e35d4d8eSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 8983e35d4d8eSmrgfi 89841b12faf6Smrg 8985e35d4d8eSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 8986e35d4d8eSmrg case $host_os in 8987e35d4d8eSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 8988e35d4d8eSmrg *) DRIVER_MAN_SUFFIX=4 ;; 8989e35d4d8eSmrg esac 8990e35d4d8eSmrgfi 8991e35d4d8eSmrgif test x$DRIVER_MAN_DIR = x ; then 8992e35d4d8eSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 8993e35d4d8eSmrgfi 89941b12faf6Smrg 89955a81ca49Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 89965a81ca49Smrg case $host_os in 89975a81ca49Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 89985a81ca49Smrg *) ADMIN_MAN_SUFFIX=8 ;; 89995a81ca49Smrg esac 90005a81ca49Smrgfi 90015a81ca49Smrgif test x$ADMIN_MAN_DIR = x ; then 90025a81ca49Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 90035a81ca49Smrgfi 90045a81ca49Smrg 90055a81ca49Smrg 90065a81ca49SmrgAC_SUBST([APP_MAN_SUFFIX]) 90075a81ca49SmrgAC_SUBST([LIB_MAN_SUFFIX]) 90085a81ca49SmrgAC_SUBST([FILE_MAN_SUFFIX]) 90095a81ca49SmrgAC_SUBST([MISC_MAN_SUFFIX]) 90105a81ca49SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 90115a81ca49SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 90125a81ca49SmrgAC_SUBST([APP_MAN_DIR]) 90135a81ca49SmrgAC_SUBST([LIB_MAN_DIR]) 90145a81ca49SmrgAC_SUBST([FILE_MAN_DIR]) 90155a81ca49SmrgAC_SUBST([MISC_MAN_DIR]) 90165a81ca49SmrgAC_SUBST([DRIVER_MAN_DIR]) 90175a81ca49SmrgAC_SUBST([ADMIN_MAN_DIR]) 90185a81ca49Smrg 90195a81ca49SmrgXORG_MAN_PAGE="X Version 11" 90205a81ca49SmrgAC_SUBST([XORG_MAN_PAGE]) 90215a81ca49SmrgMAN_SUBSTS="\ 90225a81ca49Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 90235a81ca49Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 90245a81ca49Smrg -e 's|__xservername__|Xorg|g' \ 90255a81ca49Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 90265a81ca49Smrg -e 's|__projectroot__|\$(prefix)|g' \ 90275a81ca49Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 90285a81ca49Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 90295a81ca49Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 90305a81ca49Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 90315a81ca49Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 90325a81ca49Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 90335a81ca49Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 90345a81ca49SmrgAC_SUBST([MAN_SUBSTS]) 90355a81ca49Smrg 90365a81ca49Smrg]) # XORG_MANPAGE_SECTIONS 90375a81ca49Smrg 90385a81ca49Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 90395a81ca49Smrg# ------------------------ 90405a81ca49Smrg# Minimum version: 1.7.0 90415a81ca49Smrg# 90425a81ca49Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 90435a81ca49Smrg# provided by xorg-sgml-doctools, if installed. 90445a81ca49SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 90455a81ca49SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 90465a81ca49SmrgXORG_SGML_PATH= 90475a81ca49SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 90485a81ca49Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 90495a81ca49Smrg [m4_ifval([$1],[:], 90505a81ca49Smrg [if test x"$cross_compiling" != x"yes" ; then 90515a81ca49Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 90525a81ca49Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 90535a81ca49Smrg fi]) 90545a81ca49Smrg ]) 90555a81ca49Smrg 90565a81ca49Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 90575a81ca49Smrg# the path and the name of the doc stylesheet 90585a81ca49Smrgif test "x$XORG_SGML_PATH" != "x" ; then 90595a81ca49Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 90605a81ca49Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 90615a81ca49Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 90625a81ca49Smrgelse 90635a81ca49Smrg AC_MSG_RESULT([no]) 90645a81ca49Smrgfi 90655a81ca49Smrg 90665a81ca49SmrgAC_SUBST(XORG_SGML_PATH) 90675a81ca49SmrgAC_SUBST(STYLESHEET_SRCDIR) 90685a81ca49SmrgAC_SUBST(XSL_STYLESHEET) 90695a81ca49SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 90705a81ca49Smrg]) # XORG_CHECK_SGML_DOCTOOLS 90715a81ca49Smrg 90725a81ca49Smrg# XORG_CHECK_LINUXDOC 90735a81ca49Smrg# ------------------- 90745a81ca49Smrg# Minimum version: 1.0.0 90755a81ca49Smrg# 90765a81ca49Smrg# Defines the variable MAKE_TEXT if the necessary tools and 90775a81ca49Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 90785a81ca49Smrg# Whether or not the necessary tools and files are found can be checked 90795a81ca49Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 90805a81ca49SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 90815a81ca49SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 90825a81ca49SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 90835a81ca49Smrg 90845a81ca49SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 90855a81ca49Smrg 90865a81ca49SmrgAC_MSG_CHECKING([whether to build documentation]) 90875a81ca49Smrg 90885a81ca49Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 90895a81ca49Smrg BUILDDOC=yes 90905a81ca49Smrgelse 90915a81ca49Smrg BUILDDOC=no 90925a81ca49Smrgfi 90935a81ca49Smrg 90945a81ca49SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 90955a81ca49Smrg 90965a81ca49SmrgAC_MSG_RESULT([$BUILDDOC]) 90975a81ca49Smrg 90985a81ca49SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 90995a81ca49Smrg 91005a81ca49Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 91015a81ca49Smrg BUILDPDFDOC=yes 91025a81ca49Smrgelse 91035a81ca49Smrg BUILDPDFDOC=no 91045a81ca49Smrgfi 91055a81ca49Smrg 91065a81ca49SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 91075a81ca49Smrg 91085a81ca49SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 91095a81ca49Smrg 91105a81ca49SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 91115a81ca49SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 91125a81ca49SmrgMAKE_PDF="$PS2PDF" 91135a81ca49SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 91145a81ca49Smrg 91155a81ca49SmrgAC_SUBST(MAKE_TEXT) 91165a81ca49SmrgAC_SUBST(MAKE_PS) 91175a81ca49SmrgAC_SUBST(MAKE_PDF) 91185a81ca49SmrgAC_SUBST(MAKE_HTML) 91195a81ca49Smrg]) # XORG_CHECK_LINUXDOC 91205a81ca49Smrg 91215a81ca49Smrg# XORG_CHECK_DOCBOOK 91225a81ca49Smrg# ------------------- 91235a81ca49Smrg# Minimum version: 1.0.0 91245a81ca49Smrg# 91255a81ca49Smrg# Checks for the ability to build output formats from SGML DocBook source. 91265a81ca49Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 91275a81ca49Smrg# indicates whether the necessary tools and files are found and, if set, 91285a81ca49Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 91295a81ca49SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 91305a81ca49SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 91315a81ca49Smrg 91325a81ca49SmrgBUILDTXTDOC=no 91335a81ca49SmrgBUILDPDFDOC=no 91345a81ca49SmrgBUILDPSDOC=no 91355a81ca49SmrgBUILDHTMLDOC=no 91365a81ca49Smrg 91375a81ca49SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 91385a81ca49SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 91395a81ca49SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 91405a81ca49SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 91415a81ca49Smrg 91425a81ca49SmrgAC_MSG_CHECKING([whether to build text documentation]) 91435a81ca49Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 91445a81ca49Smrg test x$BUILD_TXTDOC != xno; then 91455a81ca49Smrg BUILDTXTDOC=yes 91465a81ca49Smrgfi 91475a81ca49SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 91485a81ca49SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 91495a81ca49Smrg 91505a81ca49SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 91515a81ca49Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 91525a81ca49Smrg test x$BUILD_PDFDOC != xno; then 91535a81ca49Smrg BUILDPDFDOC=yes 91545a81ca49Smrgfi 91555a81ca49SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 91565a81ca49SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 91575a81ca49Smrg 91585a81ca49SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 91595a81ca49Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 91605a81ca49Smrg test x$BUILD_PSDOC != xno; then 91615a81ca49Smrg BUILDPSDOC=yes 91625a81ca49Smrgfi 91635a81ca49SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 91645a81ca49SmrgAC_MSG_RESULT([$BUILDPSDOC]) 91655a81ca49Smrg 91665a81ca49SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 91675a81ca49Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 91685a81ca49Smrg test x$BUILD_HTMLDOC != xno; then 91695a81ca49Smrg BUILDHTMLDOC=yes 91705a81ca49Smrgfi 91715a81ca49SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 91725a81ca49SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 91735a81ca49Smrg 91745a81ca49SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 91755a81ca49SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 91765a81ca49SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 91775a81ca49SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 91785a81ca49Smrg 91795a81ca49SmrgAC_SUBST(MAKE_TEXT) 91805a81ca49SmrgAC_SUBST(MAKE_PS) 91815a81ca49SmrgAC_SUBST(MAKE_PDF) 91825a81ca49SmrgAC_SUBST(MAKE_HTML) 91835a81ca49Smrg]) # XORG_CHECK_DOCBOOK 91845a81ca49Smrg 91855a81ca49Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 91865a81ca49Smrg# ---------------- 91875a81ca49Smrg# Minimum version: 1.5.0 91885a81ca49Smrg# Minimum version for optional DEFAULT argument: 1.11.0 91895a81ca49Smrg# 91905a81ca49Smrg# Documentation tools are not always available on all platforms and sometimes 91915a81ca49Smrg# not at the appropriate level. This macro enables a module to test for the 91925a81ca49Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 91935a81ca49Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 91945a81ca49Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 91955a81ca49Smrg# --with-xmlto assumes 'auto'. 91965a81ca49Smrg# 91975a81ca49Smrg# Interface to module: 91985a81ca49Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 91995a81ca49Smrg# XMLTO: returns the path of the xmlto program found 92005a81ca49Smrg# returns the path set by the user in the environment 92015a81ca49Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 92025a81ca49Smrg# 'no' user instructs the module not to use xmlto 92035a81ca49Smrg# 92045a81ca49Smrg# Added in version 1.10.0 92055a81ca49Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 92065a81ca49Smrg# xmlto for text output requires either lynx, links, or w3m browsers 92075a81ca49Smrg# 92085a81ca49Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 92095a81ca49Smrg# 92105a81ca49SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 92115a81ca49SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 92125a81ca49Smrgm4_define([_defopt], m4_default([$2], [auto])) 92135a81ca49SmrgAC_ARG_WITH(xmlto, 92145a81ca49Smrg AS_HELP_STRING([--with-xmlto], 92155a81ca49Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 92165a81ca49Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 92175a81ca49Smrgm4_undefine([_defopt]) 92185a81ca49Smrg 92195a81ca49Smrgif test "x$use_xmlto" = x"auto"; then 92205a81ca49Smrg AC_PATH_PROG([XMLTO], [xmlto]) 92215a81ca49Smrg if test "x$XMLTO" = "x"; then 92225a81ca49Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 92235a81ca49Smrg have_xmlto=no 92245a81ca49Smrg else 92255a81ca49Smrg have_xmlto=yes 92265a81ca49Smrg fi 92275a81ca49Smrgelif test "x$use_xmlto" = x"yes" ; then 92285a81ca49Smrg AC_PATH_PROG([XMLTO], [xmlto]) 92295a81ca49Smrg if test "x$XMLTO" = "x"; then 92305a81ca49Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 92315a81ca49Smrg fi 92325a81ca49Smrg have_xmlto=yes 92335a81ca49Smrgelif test "x$use_xmlto" = x"no" ; then 92345a81ca49Smrg if test "x$XMLTO" != "x"; then 92355a81ca49Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 92365a81ca49Smrg fi 92375a81ca49Smrg have_xmlto=no 92385a81ca49Smrgelse 92395a81ca49Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 92405a81ca49Smrgfi 92415a81ca49Smrg 92425a81ca49Smrg# Test for a minimum version of xmlto, if provided. 92435a81ca49Smrgm4_ifval([$1], 92445a81ca49Smrg[if test "$have_xmlto" = yes; then 92455a81ca49Smrg # scrape the xmlto version 92465a81ca49Smrg AC_MSG_CHECKING([the xmlto version]) 92475a81ca49Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 92485a81ca49Smrg AC_MSG_RESULT([$xmlto_version]) 92495a81ca49Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 92505a81ca49Smrg [if test "x$use_xmlto" = xauto; then 92515a81ca49Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 92525a81ca49Smrg have_xmlto=no 92535a81ca49Smrg else 92545a81ca49Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 92555a81ca49Smrg fi]) 92565a81ca49Smrgfi]) 92571b12faf6Smrg 92585a81ca49Smrg# Test for the ability of xmlto to generate a text target 92595a81ca49Smrghave_xmlto_text=no 92605a81ca49Smrgcat > conftest.xml << "EOF" 92615a81ca49SmrgEOF 92625a81ca49SmrgAS_IF([test "$have_xmlto" = yes], 92635a81ca49Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 92645a81ca49Smrg [have_xmlto_text=yes], 92655a81ca49Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 92665a81ca49Smrgrm -f conftest.xml 92675a81ca49SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 92685a81ca49SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 92695a81ca49Smrg]) # XORG_WITH_XMLTO 92701b12faf6Smrg 92715a81ca49Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 92725a81ca49Smrg# -------------------------------------------- 92735a81ca49Smrg# Minimum version: 1.12.0 92745a81ca49Smrg# Minimum version for optional DEFAULT argument: 1.12.0 92755a81ca49Smrg# 92765a81ca49Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 92775a81ca49Smrg# XML-based language used for the transformation of XML documents. 92785a81ca49Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 92795a81ca49Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 92805a81ca49Smrg# The XSLT processor is often used as a standalone tool for transformations. 92815a81ca49Smrg# It should not be assumed that this tool is used only to work with documnetation. 92825a81ca49Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 92835a81ca49Smrg# 92845a81ca49Smrg# Interface to module: 92855a81ca49Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 92865a81ca49Smrg# XSLTPROC: returns the path of the xsltproc program found 92875a81ca49Smrg# returns the path set by the user in the environment 92885a81ca49Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 92895a81ca49Smrg# 'no' user instructs the module not to use xsltproc 92905a81ca49Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 92915a81ca49Smrg# 92925a81ca49Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 92935a81ca49Smrg# 92945a81ca49SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 92955a81ca49SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 92965a81ca49Smrg# Preserves the interface, should it be implemented later 92975a81ca49Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 92985a81ca49Smrgm4_define([_defopt], m4_default([$2], [auto])) 92995a81ca49SmrgAC_ARG_WITH(xsltproc, 93005a81ca49Smrg AS_HELP_STRING([--with-xsltproc], 93015a81ca49Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 93025a81ca49Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 93035a81ca49Smrgm4_undefine([_defopt]) 930432b578d3Smrg 93055a81ca49Smrgif test "x$use_xsltproc" = x"auto"; then 93065a81ca49Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 93075a81ca49Smrg if test "x$XSLTPROC" = "x"; then 93085a81ca49Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 93095a81ca49Smrg have_xsltproc=no 93105a81ca49Smrg else 93115a81ca49Smrg have_xsltproc=yes 93125a81ca49Smrg fi 93135a81ca49Smrgelif test "x$use_xsltproc" = x"yes" ; then 93145a81ca49Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 93155a81ca49Smrg if test "x$XSLTPROC" = "x"; then 93165a81ca49Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 93175a81ca49Smrg fi 93185a81ca49Smrg have_xsltproc=yes 93195a81ca49Smrgelif test "x$use_xsltproc" = x"no" ; then 93205a81ca49Smrg if test "x$XSLTPROC" != "x"; then 93215a81ca49Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 93225a81ca49Smrg fi 93235a81ca49Smrg have_xsltproc=no 93245a81ca49Smrgelse 93255a81ca49Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 93265a81ca49Smrgfi 932732b578d3Smrg 93285a81ca49SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 93295a81ca49Smrg]) # XORG_WITH_XSLTPROC 9330e35d4d8eSmrg 93315a81ca49Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 93325a81ca49Smrg# ---------------------------------------- 93335a81ca49Smrg# Minimum version: 1.15.0 93342a51b5beSmrg# 93355a81ca49Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 93365a81ca49Smrg# scanning arbitrary text files, extracting information from those text files, 93375a81ca49Smrg# and printing reports based on that information. 93385a81ca49Smrg# 93395a81ca49Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 93405a81ca49Smrg# 93415a81ca49Smrg# Interface to module: 93425a81ca49Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 93435a81ca49Smrg# PERL: returns the path of the perl program found 93445a81ca49Smrg# returns the path set by the user in the environment 93455a81ca49Smrg# --with-perl: 'yes' user instructs the module to use perl 93465a81ca49Smrg# 'no' user instructs the module not to use perl 93475a81ca49Smrg# have_perl: returns yes if perl found in PATH or no 93485a81ca49Smrg# 93495a81ca49Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 93505a81ca49Smrg# 93515a81ca49SmrgAC_DEFUN([XORG_WITH_PERL],[ 93525a81ca49SmrgAC_ARG_VAR([PERL], [Path to perl command]) 93535a81ca49Smrg# Preserves the interface, should it be implemented later 93545a81ca49Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 93555a81ca49Smrgm4_define([_defopt], m4_default([$2], [auto])) 93565a81ca49SmrgAC_ARG_WITH(perl, 93575a81ca49Smrg AS_HELP_STRING([--with-perl], 93585a81ca49Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 93595a81ca49Smrg [use_perl=$withval], [use_perl=]_defopt) 93605a81ca49Smrgm4_undefine([_defopt]) 9361e35d4d8eSmrg 93625a81ca49Smrgif test "x$use_perl" = x"auto"; then 93635a81ca49Smrg AC_PATH_PROG([PERL], [perl]) 93645a81ca49Smrg if test "x$PERL" = "x"; then 93655a81ca49Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 93665a81ca49Smrg have_perl=no 93675a81ca49Smrg else 93685a81ca49Smrg have_perl=yes 93695a81ca49Smrg fi 93705a81ca49Smrgelif test "x$use_perl" = x"yes" ; then 93715a81ca49Smrg AC_PATH_PROG([PERL], [perl]) 93725a81ca49Smrg if test "x$PERL" = "x"; then 93735a81ca49Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 93745a81ca49Smrg fi 93755a81ca49Smrg have_perl=yes 93765a81ca49Smrgelif test "x$use_perl" = x"no" ; then 93775a81ca49Smrg if test "x$PERL" != "x"; then 93785a81ca49Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 93795a81ca49Smrg fi 93805a81ca49Smrg have_perl=no 9381e35d4d8eSmrgelse 93825a81ca49Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9383e35d4d8eSmrgfi 9384e35d4d8eSmrg 93855a81ca49SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 93865a81ca49Smrg]) # XORG_WITH_PERL 9387e35d4d8eSmrg 93885a81ca49Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 93895a81ca49Smrg# ---------------- 93905a81ca49Smrg# Minimum version: 1.5.0 93915a81ca49Smrg# Minimum version for optional DEFAULT argument: 1.11.0 93922a51b5beSmrg# 93935a81ca49Smrg# Documentation tools are not always available on all platforms and sometimes 93945a81ca49Smrg# not at the appropriate level. This macro enables a module to test for the 93955a81ca49Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 93965a81ca49Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 93975a81ca49Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 93985a81ca49Smrg# --with-asciidoc assumes 'auto'. 93995a81ca49Smrg# 94005a81ca49Smrg# Interface to module: 94015a81ca49Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 94025a81ca49Smrg# ASCIIDOC: returns the path of the asciidoc program found 94035a81ca49Smrg# returns the path set by the user in the environment 94045a81ca49Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 94055a81ca49Smrg# 'no' user instructs the module not to use asciidoc 94065a81ca49Smrg# 94075a81ca49Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 94085a81ca49Smrg# 94095a81ca49SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 94105a81ca49SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 94115a81ca49Smrgm4_define([_defopt], m4_default([$2], [auto])) 94125a81ca49SmrgAC_ARG_WITH(asciidoc, 94135a81ca49Smrg AS_HELP_STRING([--with-asciidoc], 94145a81ca49Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 94155a81ca49Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 94165a81ca49Smrgm4_undefine([_defopt]) 94171b12faf6Smrg 94185a81ca49Smrgif test "x$use_asciidoc" = x"auto"; then 94195a81ca49Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 94205a81ca49Smrg if test "x$ASCIIDOC" = "x"; then 94215a81ca49Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 94225a81ca49Smrg have_asciidoc=no 94235a81ca49Smrg else 94245a81ca49Smrg have_asciidoc=yes 94255a81ca49Smrg fi 94265a81ca49Smrgelif test "x$use_asciidoc" = x"yes" ; then 94275a81ca49Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 94285a81ca49Smrg if test "x$ASCIIDOC" = "x"; then 94295a81ca49Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 94305a81ca49Smrg fi 94315a81ca49Smrg have_asciidoc=yes 94325a81ca49Smrgelif test "x$use_asciidoc" = x"no" ; then 94335a81ca49Smrg if test "x$ASCIIDOC" != "x"; then 94345a81ca49Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 94355a81ca49Smrg fi 94365a81ca49Smrg have_asciidoc=no 9437e35d4d8eSmrgelse 94385a81ca49Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 9439e35d4d8eSmrgfi 94405a81ca49Smrgm4_ifval([$1], 94415a81ca49Smrg[if test "$have_asciidoc" = yes; then 94425a81ca49Smrg # scrape the asciidoc version 94435a81ca49Smrg AC_MSG_CHECKING([the asciidoc version]) 94445a81ca49Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 94455a81ca49Smrg AC_MSG_RESULT([$asciidoc_version]) 94465a81ca49Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 94475a81ca49Smrg [if test "x$use_asciidoc" = xauto; then 94485a81ca49Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 94495a81ca49Smrg have_asciidoc=no 94505a81ca49Smrg else 94515a81ca49Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 94525a81ca49Smrg fi]) 94535a81ca49Smrgfi]) 94545a81ca49SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 94555a81ca49Smrg]) # XORG_WITH_ASCIIDOC 94561b12faf6Smrg 94575a81ca49Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 94585a81ca49Smrg# ------------------------------------------- 94595a81ca49Smrg# Minimum version: 1.5.0 94605a81ca49Smrg# Minimum version for optional DEFAULT argument: 1.11.0 94615a81ca49Smrg# Minimum version for optional DOT checking: 1.18.0 94625a81ca49Smrg# 94635a81ca49Smrg# Documentation tools are not always available on all platforms and sometimes 94645a81ca49Smrg# not at the appropriate level. This macro enables a module to test for the 94655a81ca49Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 94665a81ca49Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 94675a81ca49Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 94685a81ca49Smrg# --with-doxygen assumes 'auto'. 94695a81ca49Smrg# 94705a81ca49Smrg# Interface to module: 94715a81ca49Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 94725a81ca49Smrg# DOXYGEN: returns the path of the doxygen program found 94735a81ca49Smrg# returns the path set by the user in the environment 94745a81ca49Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 94755a81ca49Smrg# 'no' user instructs the module not to use doxygen 94765a81ca49Smrg# 94775a81ca49Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 94785a81ca49Smrg# 94795a81ca49SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 94805a81ca49SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 94815a81ca49SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 94825a81ca49Smrgm4_define([_defopt], m4_default([$2], [auto])) 94835a81ca49SmrgAC_ARG_WITH(doxygen, 94845a81ca49Smrg AS_HELP_STRING([--with-doxygen], 94855a81ca49Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 94865a81ca49Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 94875a81ca49Smrgm4_undefine([_defopt]) 948832b578d3Smrg 94895a81ca49Smrgif test "x$use_doxygen" = x"auto"; then 94905a81ca49Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 94915a81ca49Smrg if test "x$DOXYGEN" = "x"; then 94925a81ca49Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 94935a81ca49Smrg have_doxygen=no 94945a81ca49Smrg else 94955a81ca49Smrg have_doxygen=yes 94965a81ca49Smrg fi 94975a81ca49Smrgelif test "x$use_doxygen" = x"yes" ; then 94985a81ca49Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 94995a81ca49Smrg if test "x$DOXYGEN" = "x"; then 95005a81ca49Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 95015a81ca49Smrg fi 95025a81ca49Smrg have_doxygen=yes 95035a81ca49Smrgelif test "x$use_doxygen" = x"no" ; then 95045a81ca49Smrg if test "x$DOXYGEN" != "x"; then 95055a81ca49Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 95065a81ca49Smrg fi 95075a81ca49Smrg have_doxygen=no 9508e35d4d8eSmrgelse 95095a81ca49Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 9510e35d4d8eSmrgfi 95115a81ca49Smrgm4_ifval([$1], 95125a81ca49Smrg[if test "$have_doxygen" = yes; then 95135a81ca49Smrg # scrape the doxygen version 95145a81ca49Smrg AC_MSG_CHECKING([the doxygen version]) 95155a81ca49Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 95165a81ca49Smrg AC_MSG_RESULT([$doxygen_version]) 95175a81ca49Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 95185a81ca49Smrg [if test "x$use_doxygen" = xauto; then 95195a81ca49Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 95205a81ca49Smrg have_doxygen=no 95215a81ca49Smrg else 95225a81ca49Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 95235a81ca49Smrg fi]) 95245a81ca49Smrgfi]) 952532b578d3Smrg 95265a81ca49Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 95275a81ca49Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 95285a81ca49Smrgdnl HAVE_DOT = @HAVE_DOT@ 95295a81ca49SmrgHAVE_DOT=no 95305a81ca49Smrgif test "x$have_doxygen" = "xyes"; then 95315a81ca49Smrg AC_PATH_PROG([DOT], [dot]) 95325a81ca49Smrg if test "x$DOT" != "x"; then 95335a81ca49Smrg HAVE_DOT=yes 95345a81ca49Smrg fi 95355a81ca49Smrgfi 9536e35d4d8eSmrg 95375a81ca49SmrgAC_SUBST([HAVE_DOT]) 95385a81ca49SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 95395a81ca49SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 95405a81ca49Smrg]) # XORG_WITH_DOXYGEN 954132b578d3Smrg 95425a81ca49Smrg# XORG_WITH_GROFF([DEFAULT]) 95435a81ca49Smrg# ---------------- 95445a81ca49Smrg# Minimum version: 1.6.0 95455a81ca49Smrg# Minimum version for optional DEFAULT argument: 1.11.0 95462a51b5beSmrg# 95475a81ca49Smrg# Documentation tools are not always available on all platforms and sometimes 95485a81ca49Smrg# not at the appropriate level. This macro enables a module to test for the 95495a81ca49Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 95505a81ca49Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 95515a81ca49Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 95525a81ca49Smrg# --with-groff assumes 'auto'. 95535a81ca49Smrg# 95545a81ca49Smrg# Interface to module: 95555a81ca49Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 95565a81ca49Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 95575a81ca49Smrg# HAVE_GROFF_MS: the -ms macros package 95585a81ca49Smrg# GROFF: returns the path of the groff program found 95595a81ca49Smrg# returns the path set by the user in the environment 95605a81ca49Smrg# --with-groff: 'yes' user instructs the module to use groff 95615a81ca49Smrg# 'no' user instructs the module not to use groff 95625a81ca49Smrg# 95635a81ca49Smrg# Added in version 1.9.0: 95645a81ca49Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 95655a81ca49Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 95665a81ca49Smrg# psselect from the psutils package. 95675a81ca49Smrg# the ghostcript package. Refer to the grohtml man pages 95685a81ca49Smrg# 95695a81ca49Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 95705a81ca49Smrg# 95715a81ca49Smrg# OS and distros often splits groff in a basic and full package, the former 95725a81ca49Smrg# having the groff program and the later having devices, fonts and macros 95735a81ca49Smrg# Checking for the groff executable is not enough. 95745a81ca49Smrg# 95755a81ca49Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 95765a81ca49Smrg# unset HAVE_GROFF or GROFF env variables. 95775a81ca49Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 95785a81ca49Smrg# 95795a81ca49SmrgAC_DEFUN([XORG_WITH_GROFF],[ 95805a81ca49SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 95815a81ca49Smrgm4_define([_defopt], m4_default([$1], [auto])) 95825a81ca49SmrgAC_ARG_WITH(groff, 95835a81ca49Smrg AS_HELP_STRING([--with-groff], 95845a81ca49Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 95855a81ca49Smrg [use_groff=$withval], [use_groff=]_defopt) 95865a81ca49Smrgm4_undefine([_defopt]) 9587e35d4d8eSmrg 95885a81ca49Smrgif test "x$use_groff" = x"auto"; then 95895a81ca49Smrg AC_PATH_PROG([GROFF], [groff]) 95905a81ca49Smrg if test "x$GROFF" = "x"; then 95915a81ca49Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 95925a81ca49Smrg have_groff=no 95935a81ca49Smrg else 95945a81ca49Smrg have_groff=yes 95955a81ca49Smrg fi 95965a81ca49Smrgelif test "x$use_groff" = x"yes" ; then 95975a81ca49Smrg AC_PATH_PROG([GROFF], [groff]) 95985a81ca49Smrg if test "x$GROFF" = "x"; then 95995a81ca49Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 96005a81ca49Smrg fi 96015a81ca49Smrg have_groff=yes 96025a81ca49Smrgelif test "x$use_groff" = x"no" ; then 96035a81ca49Smrg if test "x$GROFF" != "x"; then 96045a81ca49Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 96055a81ca49Smrg fi 96065a81ca49Smrg have_groff=no 96075a81ca49Smrgelse 96085a81ca49Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 96095a81ca49Smrgfi 9610e35d4d8eSmrg 96115a81ca49Smrg# We have groff, test for the presence of the macro packages 96125a81ca49Smrgif test "x$have_groff" = x"yes"; then 96135a81ca49Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 96145a81ca49Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 96155a81ca49Smrg groff_ms_works=yes 96165a81ca49Smrg else 96175a81ca49Smrg groff_ms_works=no 96185a81ca49Smrg fi 96195a81ca49Smrg AC_MSG_RESULT([$groff_ms_works]) 96205a81ca49Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 96215a81ca49Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 96225a81ca49Smrg groff_mm_works=yes 96235a81ca49Smrg else 96245a81ca49Smrg groff_mm_works=no 96255a81ca49Smrg fi 96265a81ca49Smrg AC_MSG_RESULT([$groff_mm_works]) 9627e35d4d8eSmrgfi 9628e35d4d8eSmrg 96295a81ca49Smrg# We have groff, test for HTML dependencies, one command per package 96305a81ca49Smrgif test "x$have_groff" = x"yes"; then 96315a81ca49Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 96325a81ca49Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 96335a81ca49Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 96345a81ca49Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 96355a81ca49Smrg have_groff_html=yes 96365a81ca49Smrg else 96375a81ca49Smrg have_groff_html=no 96385a81ca49Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 96395a81ca49Smrg fi 9640e35d4d8eSmrgfi 9641e35d4d8eSmrg 96425a81ca49Smrg# Set Automake conditionals for Makefiles 96435a81ca49SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 96445a81ca49SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 96455a81ca49SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 96465a81ca49SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 96475a81ca49Smrg]) # XORG_WITH_GROFF 96485a81ca49Smrg 96495a81ca49Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 96505a81ca49Smrg# --------------------------------------- 96515a81ca49Smrg# Minimum version: 1.6.0 96525a81ca49Smrg# Minimum version for optional DEFAULT argument: 1.11.0 96535a81ca49Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 96545a81ca49Smrg# 96555a81ca49Smrg# Documentation tools are not always available on all platforms and sometimes 96565a81ca49Smrg# not at the appropriate level. This macro enables a module to test for the 96575a81ca49Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 96585a81ca49Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 96595a81ca49Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 96605a81ca49Smrg# --with-fop assumes 'auto'. 96615a81ca49Smrg# 96625a81ca49Smrg# Interface to module: 96635a81ca49Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 96645a81ca49Smrg# FOP: returns the path of the fop program found 96655a81ca49Smrg# returns the path set by the user in the environment 96665a81ca49Smrg# --with-fop: 'yes' user instructs the module to use fop 96675a81ca49Smrg# 'no' user instructs the module not to use fop 96685a81ca49Smrg# 96695a81ca49Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 96705a81ca49Smrg# 96715a81ca49SmrgAC_DEFUN([XORG_WITH_FOP],[ 96725a81ca49SmrgAC_ARG_VAR([FOP], [Path to fop command]) 96735a81ca49Smrgm4_define([_defopt], m4_default([$2], [auto])) 96745a81ca49SmrgAC_ARG_WITH(fop, 96755a81ca49Smrg AS_HELP_STRING([--with-fop], 96765a81ca49Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 96775a81ca49Smrg [use_fop=$withval], [use_fop=]_defopt) 96785a81ca49Smrgm4_undefine([_defopt]) 96795a81ca49Smrg 96805a81ca49Smrgif test "x$use_fop" = x"auto"; then 96815a81ca49Smrg AC_PATH_PROG([FOP], [fop]) 96825a81ca49Smrg if test "x$FOP" = "x"; then 96835a81ca49Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 96845a81ca49Smrg have_fop=no 96855a81ca49Smrg else 96865a81ca49Smrg have_fop=yes 96875a81ca49Smrg fi 96885a81ca49Smrgelif test "x$use_fop" = x"yes" ; then 96895a81ca49Smrg AC_PATH_PROG([FOP], [fop]) 96905a81ca49Smrg if test "x$FOP" = "x"; then 96915a81ca49Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 96925a81ca49Smrg fi 96935a81ca49Smrg have_fop=yes 96945a81ca49Smrgelif test "x$use_fop" = x"no" ; then 96955a81ca49Smrg if test "x$FOP" != "x"; then 96965a81ca49Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 96975a81ca49Smrg fi 96985a81ca49Smrg have_fop=no 96995a81ca49Smrgelse 97005a81ca49Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 9701e35d4d8eSmrgfi 9702e35d4d8eSmrg 97035a81ca49Smrg# Test for a minimum version of fop, if provided. 97045a81ca49Smrgm4_ifval([$1], 97055a81ca49Smrg[if test "$have_fop" = yes; then 97065a81ca49Smrg # scrape the fop version 97075a81ca49Smrg AC_MSG_CHECKING([for fop minimum version]) 97085a81ca49Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 97095a81ca49Smrg AC_MSG_RESULT([$fop_version]) 97105a81ca49Smrg AS_VERSION_COMPARE([$fop_version], [$1], 97115a81ca49Smrg [if test "x$use_fop" = xauto; then 97125a81ca49Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 97135a81ca49Smrg have_fop=no 97145a81ca49Smrg else 97155a81ca49Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 97165a81ca49Smrg fi]) 97175a81ca49Smrgfi]) 97185a81ca49SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 97195a81ca49Smrg]) # XORG_WITH_FOP 9720e35d4d8eSmrg 97215a81ca49Smrg# XORG_WITH_M4([MIN-VERSION]) 97225a81ca49Smrg# --------------------------- 97235a81ca49Smrg# Minimum version: 1.19.0 97245a81ca49Smrg# 97255a81ca49Smrg# This macro attempts to locate an m4 macro processor which supports 97265a81ca49Smrg# -I option and is only useful for modules relying on M4 in order to 97275a81ca49Smrg# expand macros in source code files. 97285a81ca49Smrg# 97295a81ca49Smrg# Interface to module: 97305a81ca49Smrg# M4: returns the path of the m4 program found 97315a81ca49Smrg# returns the path set by the user in the environment 97325a81ca49Smrg# 97335a81ca49SmrgAC_DEFUN([XORG_WITH_M4], [ 97345a81ca49SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 97355a81ca49Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 97365a81ca49Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 97375a81ca49Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 97385a81ca49Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 97395a81ca49Smrg [$PATH:/usr/gnu/bin])]) 9740e35d4d8eSmrg 97415a81ca49SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 97425a81ca49Smrg]) # XORG_WITH_M4 9743e35d4d8eSmrg 97445a81ca49Smrg# XORG_WITH_PS2PDF([DEFAULT]) 9745e35d4d8eSmrg# ---------------- 97465a81ca49Smrg# Minimum version: 1.6.0 9747e35d4d8eSmrg# Minimum version for optional DEFAULT argument: 1.11.0 97482a51b5beSmrg# 9749e35d4d8eSmrg# Documentation tools are not always available on all platforms and sometimes 9750e35d4d8eSmrg# not at the appropriate level. This macro enables a module to test for the 9751e35d4d8eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 97525a81ca49Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 97535a81ca49Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 97545a81ca49Smrg# --with-ps2pdf assumes 'auto'. 97552a51b5beSmrg# 9756e35d4d8eSmrg# Interface to module: 97575a81ca49Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 97585a81ca49Smrg# PS2PDF: returns the path of the ps2pdf program found 9759e35d4d8eSmrg# returns the path set by the user in the environment 97605a81ca49Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 97615a81ca49Smrg# 'no' user instructs the module not to use ps2pdf 97625a81ca49Smrg# 97635a81ca49Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 97645a81ca49Smrg# 97655a81ca49SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 97665a81ca49SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 97675a81ca49Smrgm4_define([_defopt], m4_default([$1], [auto])) 97685a81ca49SmrgAC_ARG_WITH(ps2pdf, 97695a81ca49Smrg AS_HELP_STRING([--with-ps2pdf], 97705a81ca49Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 97715a81ca49Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 97725a81ca49Smrgm4_undefine([_defopt]) 97735a81ca49Smrg 97745a81ca49Smrgif test "x$use_ps2pdf" = x"auto"; then 97755a81ca49Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 97765a81ca49Smrg if test "x$PS2PDF" = "x"; then 97775a81ca49Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 97785a81ca49Smrg have_ps2pdf=no 97795a81ca49Smrg else 97805a81ca49Smrg have_ps2pdf=yes 97815a81ca49Smrg fi 97825a81ca49Smrgelif test "x$use_ps2pdf" = x"yes" ; then 97835a81ca49Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 97845a81ca49Smrg if test "x$PS2PDF" = "x"; then 97855a81ca49Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 97865a81ca49Smrg fi 97875a81ca49Smrg have_ps2pdf=yes 97885a81ca49Smrgelif test "x$use_ps2pdf" = x"no" ; then 97895a81ca49Smrg if test "x$PS2PDF" != "x"; then 97905a81ca49Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 97915a81ca49Smrg fi 97925a81ca49Smrg have_ps2pdf=no 97935a81ca49Smrgelse 97945a81ca49Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 97955a81ca49Smrgfi 97965a81ca49SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 97975a81ca49Smrg]) # XORG_WITH_PS2PDF 97985a81ca49Smrg 97995a81ca49Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 98005a81ca49Smrg# ---------------- 98015a81ca49Smrg# Minimum version: 1.6.0 98025a81ca49Smrg# 98035a81ca49Smrg# Documentation tools are not always available on all platforms and sometimes 98045a81ca49Smrg# not at the appropriate level. This macro enables a builder to skip all 98055a81ca49Smrg# documentation targets except traditional man pages. 98065a81ca49Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 98075a81ca49Smrg# maximum flexibilty in controlling documentation building. 98085a81ca49Smrg# Refer to: 98095a81ca49Smrg# XORG_WITH_XMLTO --with-xmlto 98105a81ca49Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 98115a81ca49Smrg# XORG_WITH_DOXYGEN --with-doxygen 98125a81ca49Smrg# XORG_WITH_FOP --with-fop 98135a81ca49Smrg# XORG_WITH_GROFF --with-groff 98145a81ca49Smrg# XORG_WITH_PS2PDF --with-ps2pdf 98155a81ca49Smrg# 98165a81ca49Smrg# Interface to module: 98175a81ca49Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 98185a81ca49Smrg# --enable-docs: 'yes' user instructs the module to generate docs 98195a81ca49Smrg# 'no' user instructs the module not to generate docs 98205a81ca49Smrg# parm1: specify the default value, yes or no. 98215a81ca49Smrg# 98225a81ca49SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 98235a81ca49Smrgm4_define([docs_default], m4_default([$1], [yes])) 98245a81ca49SmrgAC_ARG_ENABLE(docs, 98255a81ca49Smrg AS_HELP_STRING([--enable-docs], 98265a81ca49Smrg [Enable building the documentation (default: ]docs_default[)]), 98275a81ca49Smrg [build_docs=$enableval], [build_docs=]docs_default) 98285a81ca49Smrgm4_undefine([docs_default]) 98295a81ca49SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 98305a81ca49SmrgAC_MSG_CHECKING([whether to build documentation]) 98315a81ca49SmrgAC_MSG_RESULT([$build_docs]) 98325a81ca49Smrg]) # XORG_ENABLE_DOCS 98335a81ca49Smrg 98345a81ca49Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 98355a81ca49Smrg# ---------------- 98365a81ca49Smrg# Minimum version: 1.6.0 98375a81ca49Smrg# 98385a81ca49Smrg# This macro enables a builder to skip all developer documentation. 98395a81ca49Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 98405a81ca49Smrg# maximum flexibilty in controlling documentation building. 98415a81ca49Smrg# Refer to: 98425a81ca49Smrg# XORG_WITH_XMLTO --with-xmlto 98435a81ca49Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 98445a81ca49Smrg# XORG_WITH_DOXYGEN --with-doxygen 98455a81ca49Smrg# XORG_WITH_FOP --with-fop 98465a81ca49Smrg# XORG_WITH_GROFF --with-groff 98475a81ca49Smrg# XORG_WITH_PS2PDF --with-ps2pdf 98485a81ca49Smrg# 98495a81ca49Smrg# Interface to module: 98505a81ca49Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 98515a81ca49Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 98525a81ca49Smrg# 'no' user instructs the module not to generate developer docs 98535a81ca49Smrg# parm1: specify the default value, yes or no. 98545a81ca49Smrg# 98555a81ca49SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 98565a81ca49Smrgm4_define([devel_default], m4_default([$1], [yes])) 98575a81ca49SmrgAC_ARG_ENABLE(devel-docs, 98585a81ca49Smrg AS_HELP_STRING([--enable-devel-docs], 98595a81ca49Smrg [Enable building the developer documentation (default: ]devel_default[)]), 98605a81ca49Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 98615a81ca49Smrgm4_undefine([devel_default]) 98625a81ca49SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 98635a81ca49SmrgAC_MSG_CHECKING([whether to build developer documentation]) 98645a81ca49SmrgAC_MSG_RESULT([$build_devel_docs]) 98655a81ca49Smrg]) # XORG_ENABLE_DEVEL_DOCS 98665a81ca49Smrg 98675a81ca49Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 98685a81ca49Smrg# ---------------- 98695a81ca49Smrg# Minimum version: 1.6.0 98705a81ca49Smrg# 98715a81ca49Smrg# This macro enables a builder to skip all functional specification targets. 98725a81ca49Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 98735a81ca49Smrg# maximum flexibilty in controlling documentation building. 98745a81ca49Smrg# Refer to: 98755a81ca49Smrg# XORG_WITH_XMLTO --with-xmlto 98765a81ca49Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 98775a81ca49Smrg# XORG_WITH_DOXYGEN --with-doxygen 98785a81ca49Smrg# XORG_WITH_FOP --with-fop 98795a81ca49Smrg# XORG_WITH_GROFF --with-groff 98805a81ca49Smrg# XORG_WITH_PS2PDF --with-ps2pdf 98815a81ca49Smrg# 98825a81ca49Smrg# Interface to module: 98835a81ca49Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 98845a81ca49Smrg# --enable-specs: 'yes' user instructs the module to generate specs 98855a81ca49Smrg# 'no' user instructs the module not to generate specs 98865a81ca49Smrg# parm1: specify the default value, yes or no. 98875a81ca49Smrg# 98885a81ca49SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 98895a81ca49Smrgm4_define([spec_default], m4_default([$1], [yes])) 98905a81ca49SmrgAC_ARG_ENABLE(specs, 98915a81ca49Smrg AS_HELP_STRING([--enable-specs], 98925a81ca49Smrg [Enable building the specs (default: ]spec_default[)]), 98935a81ca49Smrg [build_specs=$enableval], [build_specs=]spec_default) 98945a81ca49Smrgm4_undefine([spec_default]) 98955a81ca49SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 98965a81ca49SmrgAC_MSG_CHECKING([whether to build functional specifications]) 98975a81ca49SmrgAC_MSG_RESULT([$build_specs]) 98985a81ca49Smrg]) # XORG_ENABLE_SPECS 98995a81ca49Smrg 99005a81ca49Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 99015a81ca49Smrg# ---------------------------------------------- 99025a81ca49Smrg# Minimum version: 1.13.0 99035a81ca49Smrg# 99045a81ca49Smrg# This macro enables a builder to enable/disable unit testing 99055a81ca49Smrg# It makes no assumption about the test cases implementation 99065a81ca49Smrg# Test cases may or may not use Automake "Support for test suites" 99075a81ca49Smrg# They may or may not use the software utility library GLib 99082a51b5beSmrg# 99095a81ca49Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 99105a81ca49Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 99115a81ca49Smrg# The variable enable_unit_tests is used by other macros in this file. 99122a51b5beSmrg# 99135a81ca49Smrg# Interface to module: 99145a81ca49Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 99155a81ca49Smrg# enable_unit_tests: used in configure.ac for additional configuration 99165a81ca49Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 99175a81ca49Smrg# 'no' user instructs the module not to build tests 99185a81ca49Smrg# parm1: specify the default value, yes or no. 99192a51b5beSmrg# 99205a81ca49SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 99215a81ca49SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 99225a81ca49SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 99235a81ca49SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 99245a81ca49Smrgm4_define([_defopt], m4_default([$1], [auto])) 99255a81ca49SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 99265a81ca49Smrg [Enable building unit test cases (default: ]_defopt[)]), 99275a81ca49Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 9928e35d4d8eSmrgm4_undefine([_defopt]) 99295a81ca49SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 99305a81ca49SmrgAC_MSG_CHECKING([whether to build unit test cases]) 99315a81ca49SmrgAC_MSG_RESULT([$enable_unit_tests]) 99325a81ca49Smrg]) # XORG_ENABLE_UNIT_TESTS 993332b578d3Smrg 99345a81ca49Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 99355a81ca49Smrg# ------------------------------------------------------ 99365a81ca49Smrg# Minimum version: 1.17.0 9937e35d4d8eSmrg# 99385a81ca49Smrg# This macro enables a builder to enable/disable integration testing 99395a81ca49Smrg# It makes no assumption about the test cases' implementation 99405a81ca49Smrg# Test cases may or may not use Automake "Support for test suites" 9941e35d4d8eSmrg# 99425a81ca49Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 99435a81ca49Smrg# usually requires less dependencies and may be built and run under less 99445a81ca49Smrg# stringent environments than integration tests. 9945e35d4d8eSmrg# 99465a81ca49Smrg# Interface to module: 99475a81ca49Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 99485a81ca49Smrg# enable_integration_tests: used in configure.ac for additional configuration 99495a81ca49Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 99505a81ca49Smrg# 'no' user instructs the module not to build tests 99515a81ca49Smrg# parm1: specify the default value, yes or no. 9952e35d4d8eSmrg# 99535a81ca49SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 99545a81ca49SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 99555a81ca49Smrgm4_define([_defopt], m4_default([$1], [auto])) 99565a81ca49SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 99575a81ca49Smrg [Enable building integration test cases (default: ]_defopt[)]), 99585a81ca49Smrg [enable_integration_tests=$enableval], 99595a81ca49Smrg [enable_integration_tests=]_defopt) 9960e35d4d8eSmrgm4_undefine([_defopt]) 99615a81ca49SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 99625a81ca49Smrg [test "x$enable_integration_tests" != xno]) 99635a81ca49SmrgAC_MSG_CHECKING([whether to build unit test cases]) 99645a81ca49SmrgAC_MSG_RESULT([$enable_integration_tests]) 99655a81ca49Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 9966e35d4d8eSmrg 99675a81ca49Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 9968e35d4d8eSmrg# ---------------------------------------- 99695a81ca49Smrg# Minimum version: 1.13.0 99702a51b5beSmrg# 99715a81ca49Smrg# GLib is a library which provides advanced data structures and functions. 99725a81ca49Smrg# This macro enables a module to test for the presence of Glib. 9973e35d4d8eSmrg# 99745a81ca49Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 99755a81ca49Smrg# Otherwise the value of $enable_unit_tests is blank. 9976e35d4d8eSmrg# 99775a81ca49Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 99785a81ca49Smrg# test support usually requires less dependencies and may be built and run under 99795a81ca49Smrg# less stringent environments than integration tests. 9980e35d4d8eSmrg# 99815a81ca49Smrg# Interface to module: 99825a81ca49Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 99835a81ca49Smrg# with_glib: used in configure.ac to know if GLib has been found 99845a81ca49Smrg# --with-glib: 'yes' user instructs the module to use glib 99855a81ca49Smrg# 'no' user instructs the module not to use glib 9986e35d4d8eSmrg# 99875a81ca49SmrgAC_DEFUN([XORG_WITH_GLIB],[ 99885a81ca49SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9989e35d4d8eSmrgm4_define([_defopt], m4_default([$2], [auto])) 99905a81ca49SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 99915a81ca49Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 99925a81ca49Smrg [with_glib=$withval], [with_glib=]_defopt) 9993e35d4d8eSmrgm4_undefine([_defopt]) 9994e35d4d8eSmrg 99955a81ca49Smrghave_glib=no 99965a81ca49Smrg# Do not probe GLib if user explicitly disabled unit testing 99975a81ca49Smrgif test "x$enable_unit_tests" != x"no"; then 99985a81ca49Smrg # Do not probe GLib if user explicitly disabled it 99995a81ca49Smrg if test "x$with_glib" != x"no"; then 100005a81ca49Smrg m4_ifval( 100015a81ca49Smrg [$1], 100025a81ca49Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 100035a81ca49Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 100045a81ca49Smrg ) 100055a81ca49Smrg fi 100065a81ca49Smrgfi 100075a81ca49Smrg 100085a81ca49Smrg# Not having GLib when unit testing has been explicitly requested is an error 100095a81ca49Smrgif test "x$enable_unit_tests" = x"yes"; then 100105a81ca49Smrg if test "x$have_glib" = x"no"; then 100115a81ca49Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 100125a81ca49Smrg fi 100135a81ca49Smrgfi 100145a81ca49Smrg 100155a81ca49Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 100165a81ca49Smrgif test "x$enable_unit_tests" = x"no"; then 100175a81ca49Smrg if test "x$with_glib" = x"yes"; then 100185a81ca49Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 100195a81ca49Smrg fi 10020e35d4d8eSmrgfi 1002132b578d3Smrg 100225a81ca49Smrg# Not having GLib when it has been explicitly requested is an error 100235a81ca49Smrgif test "x$with_glib" = x"yes"; then 100245a81ca49Smrg if test "x$have_glib" = x"no"; then 100255a81ca49Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 100265a81ca49Smrg fi 100275a81ca49Smrgfi 1002832b578d3Smrg 100295a81ca49SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 100305a81ca49Smrg]) # XORG_WITH_GLIB 100315a81ca49Smrg 100325a81ca49Smrg# XORG_LD_WRAP([required|optional]) 100335a81ca49Smrg# --------------------------------- 100345a81ca49Smrg# Minimum version: 1.13.0 10035e35d4d8eSmrg# 100365a81ca49Smrg# Check if linker supports -wrap, passed via compiler flags 10037e35d4d8eSmrg# 100385a81ca49Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 100395a81ca49Smrg# Otherwise the value of $enable_unit_tests is blank. 10040e35d4d8eSmrg# 100415a81ca49Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 100425a81ca49Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 100435a81ca49Smrg# available, an argument of "optional" allows use when some unit tests require 100445a81ca49Smrg# ld -wrap and others do not. 10045e35d4d8eSmrg# 100465a81ca49SmrgAC_DEFUN([XORG_LD_WRAP],[ 100475a81ca49SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 100485a81ca49Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 100495a81ca49Smrg void __wrap_exit(int status) { return; }], 100505a81ca49Smrg [exit(0);])]) 100515a81ca49Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 100525a81ca49Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 100535a81ca49Smrg if test "x$have_ld_wrap" = x"no"; then 100545a81ca49Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 100555a81ca49Smrg fi 10056e35d4d8eSmrgfi 100575a81ca49SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 100585a81ca49Smrg# 100595a81ca49Smrg]) # XORG_LD_WRAP 100602a51b5beSmrg 100615a81ca49Smrg# XORG_CHECK_LINKER_FLAGS 100625a81ca49Smrg# ----------------------- 100635a81ca49Smrg# SYNOPSIS 10064e35d4d8eSmrg# 100655a81ca49Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10066e35d4d8eSmrg# 100675a81ca49Smrg# DESCRIPTION 10068e35d4d8eSmrg# 100695a81ca49Smrg# Check whether the given linker FLAGS work with the current language's 100705a81ca49Smrg# linker, or whether they give an error. 10071e35d4d8eSmrg# 100725a81ca49Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 100735a81ca49Smrg# success/failure. 10074e35d4d8eSmrg# 100755a81ca49Smrg# PROGRAM-SOURCE is the program source to link with, if needed 10076e35d4d8eSmrg# 100775a81ca49Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10078e35d4d8eSmrg# 100795a81ca49Smrg# LICENSE 100805a81ca49Smrg# 100815a81ca49Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 100825a81ca49Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 100835a81ca49Smrg# Copyright (c) 2009 Matteo Frigo 100845a81ca49Smrg# 100855a81ca49Smrg# This program is free software: you can redistribute it and/or modify it 100865a81ca49Smrg# under the terms of the GNU General Public License as published by the 100875a81ca49Smrg# Free Software Foundation, either version 3 of the License, or (at your 100885a81ca49Smrg# option) any later version. 100895a81ca49Smrg# 100905a81ca49Smrg# This program is distributed in the hope that it will be useful, but 100915a81ca49Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 100925a81ca49Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 100935a81ca49Smrg# Public License for more details. 100945a81ca49Smrg# 100955a81ca49Smrg# You should have received a copy of the GNU General Public License along 100965a81ca49Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 100975a81ca49Smrg# 100985a81ca49Smrg# As a special exception, the respective Autoconf Macro's copyright owner 100995a81ca49Smrg# gives unlimited permission to copy, distribute and modify the configure 101005a81ca49Smrg# scripts that are the output of Autoconf when processing the Macro. You 101015a81ca49Smrg# need not follow the terms of the GNU General Public License when using 101025a81ca49Smrg# or distributing such scripts, even though portions of the text of the 101035a81ca49Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 101045a81ca49Smrg# all other use of the material that constitutes the Autoconf Macro. 101055a81ca49Smrg# 101065a81ca49Smrg# This special exception to the GPL applies to versions of the Autoconf 101075a81ca49Smrg# Macro released by the Autoconf Archive. When you make and distribute a 101085a81ca49Smrg# modified version of the Autoconf Macro, you may extend this special 101095a81ca49Smrg# exception to the GPL to apply to your modified version as well.# 101105a81ca49SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 101115a81ca49Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 101125a81ca49Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 101135a81ca49SmrgAS_LITERAL_IF([$1], 101145a81ca49Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 101155a81ca49Smrg ax_save_FLAGS=$LDFLAGS 101165a81ca49Smrg LDFLAGS="$1" 101175a81ca49Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 101185a81ca49Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 101195a81ca49Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 101205a81ca49Smrg LDFLAGS=$ax_save_FLAGS])], 101215a81ca49Smrg [ax_save_FLAGS=$LDFLAGS 101225a81ca49Smrg LDFLAGS="$1" 101235a81ca49Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 101245a81ca49Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 101255a81ca49Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 101265a81ca49Smrg LDFLAGS=$ax_save_FLAGS]) 101275a81ca49Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 101285a81ca49SmrgAC_MSG_RESULT($xorg_check_linker_flags) 101295a81ca49Smrgif test "x$xorg_check_linker_flags" = xyes; then 101305a81ca49Smrg m4_default([$2], :) 101315a81ca49Smrgelse 101325a81ca49Smrg m4_default([$3], :) 101335a81ca49Smrgfi 101345a81ca49Smrg]) # XORG_CHECK_LINKER_FLAGS 101355a81ca49Smrg 101365a81ca49Smrg# XORG_MEMORY_CHECK_FLAGS 101375a81ca49Smrg# ----------------------- 101385a81ca49Smrg# Minimum version: 1.16.0 10139e35d4d8eSmrg# 101405a81ca49Smrg# This macro attempts to find appropriate memory checking functionality 101415a81ca49Smrg# for various platforms which unit testing code may use to catch various 101425a81ca49Smrg# forms of memory allocation and access errors in testing. 10143e35d4d8eSmrg# 101445a81ca49Smrg# Interface to module: 101455a81ca49Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 101465a81ca49Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 10147e35d4d8eSmrg# 101485a81ca49Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10149e35d4d8eSmrg# 101505a81ca49SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 1015132b578d3Smrg 101525a81ca49SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 101535a81ca49SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 101545a81ca49Smrg [Environment variables to enable memory checking in tests]) 1015532b578d3Smrg 101565a81ca49Smrg# Check for different types of support on different platforms 101575a81ca49Smrgcase $host_os in 101585a81ca49Smrg solaris*) 101595a81ca49Smrg AC_CHECK_LIB([umem], [umem_alloc], 101605a81ca49Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 101615a81ca49Smrg ;; 101625a81ca49Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 101635a81ca49Smrg # both directly and inverted, so should not be 0 or 255. 101645a81ca49Smrg malloc_debug_env='MALLOC_PERTURB_=15' 101655a81ca49Smrg ;; 101665a81ca49Smrg darwin*) 101675a81ca49Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 101685a81ca49Smrg ;; 101695a81ca49Smrg *bsd*) 101705a81ca49Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 101715a81ca49Smrg ;; 101725a81ca49Smrgesac 1017332b578d3Smrg 101745a81ca49Smrg# User supplied flags override default flags 101755a81ca49Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 101765a81ca49Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 101772a51b5beSmrgfi 1017832b578d3Smrg 101795a81ca49SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 101805a81ca49Smrg]) # XORG_WITH_LINT 1018132b578d3Smrg 101825a81ca49Smrg# XORG_CHECK_MALLOC_ZERO 101835a81ca49Smrg# ---------------------- 101845a81ca49Smrg# Minimum version: 1.0.0 10185e35d4d8eSmrg# 101865a81ca49Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 101875a81ca49Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 101885a81ca49Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 101895a81ca49SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 101905a81ca49SmrgAC_ARG_ENABLE(malloc0returnsnull, 101915a81ca49Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 101925a81ca49Smrg [malloc(0) returns NULL (default: auto)]), 101935a81ca49Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 101945a81ca49Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 101952a51b5beSmrg 101965a81ca49SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 101975a81ca49Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 101985a81ca49SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 101995a81ca49Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 102005a81ca49Smrg#include <stdlib.h> 102015a81ca49Smrg],[ 102025a81ca49Smrg char *m0, *r0, *c0, *p; 102035a81ca49Smrg m0 = malloc(0); 102045a81ca49Smrg p = malloc(10); 102055a81ca49Smrg r0 = realloc(p,0); 102065a81ca49Smrg c0 = calloc(0,10); 102075a81ca49Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 102085a81ca49Smrg])], 102095a81ca49Smrg [xorg_cv_malloc0_returns_null=yes], 102105a81ca49Smrg [xorg_cv_malloc0_returns_null=no])]) 102115a81ca49SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 102125a81ca49Smrgfi 102135a81ca49SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 102145a81ca49Smrg 102155a81ca49Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 102165a81ca49Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 102175a81ca49Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 102185a81ca49Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10219e35d4d8eSmrgelse 102205a81ca49Smrg MALLOC_ZERO_CFLAGS="" 102215a81ca49Smrg XMALLOC_ZERO_CFLAGS="" 102225a81ca49Smrg XTMALLOC_ZERO_CFLAGS="" 10223e35d4d8eSmrgfi 1022432b578d3Smrg 102255a81ca49SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 102265a81ca49SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 102275a81ca49SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 102285a81ca49Smrg]) # XORG_CHECK_MALLOC_ZERO 1022932b578d3Smrg 102305a81ca49Smrg# XORG_WITH_LINT() 10231e35d4d8eSmrg# ---------------- 102325a81ca49Smrg# Minimum version: 1.1.0 102332a51b5beSmrg# 102345a81ca49Smrg# This macro enables the use of a tool that flags some suspicious and 102355a81ca49Smrg# non-portable constructs (likely to be bugs) in C language source code. 102365a81ca49Smrg# It will attempt to locate the tool and use appropriate options. 102375a81ca49Smrg# There are various lint type tools on different platforms. 102382a51b5beSmrg# 10239e35d4d8eSmrg# Interface to module: 102405a81ca49Smrg# LINT: returns the path to the tool found on the platform 102415a81ca49Smrg# or the value set to LINT on the configure cmd line 102425a81ca49Smrg# also an Automake conditional 102435a81ca49Smrg# LINT_FLAGS: an Automake variable with appropriate flags 10244e35d4d8eSmrg# 102455a81ca49Smrg# --with-lint: 'yes' user instructs the module to use lint 102465a81ca49Smrg# 'no' user instructs the module not to use lint (default) 10247e35d4d8eSmrg# 102485a81ca49Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 102495a81ca49Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 102505a81ca49Smrg# 102515a81ca49SmrgAC_DEFUN([XORG_WITH_LINT],[ 102525a81ca49Smrg 102535a81ca49SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 102545a81ca49SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 102555a81ca49SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 102565a81ca49Smrg [Use a lint-style source code checker (default: disabled)])], 102575a81ca49Smrg [use_lint=$withval], [use_lint=no]) 102585a81ca49Smrg 102595a81ca49Smrg# Obtain platform specific info like program name and options 102605a81ca49Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 102615a81ca49Smrgcase $host_os in 102625a81ca49Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 102635a81ca49Smrg lint_name=splint 102645a81ca49Smrg lint_options="-badflag" 102655a81ca49Smrg ;; 102665a81ca49Smrg *freebsd* | *netbsd*) 102675a81ca49Smrg lint_name=lint 102685a81ca49Smrg lint_options="-u -b" 102695a81ca49Smrg ;; 102705a81ca49Smrg *solaris*) 102715a81ca49Smrg lint_name=lint 102725a81ca49Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 102735a81ca49Smrg ;; 102745a81ca49Smrgesac 1027532b578d3Smrg 102765a81ca49Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 102775a81ca49Smrgif test "x$use_lint" = x"yes" ; then 102785a81ca49Smrg AC_PATH_PROG([LINT], [$lint_name]) 102795a81ca49Smrg if test "x$LINT" = "x"; then 102805a81ca49Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10281e35d4d8eSmrg fi 102825a81ca49Smrgelif test "x$use_lint" = x"no" ; then 102835a81ca49Smrg if test "x$LINT" != "x"; then 102845a81ca49Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10285e35d4d8eSmrg fi 10286e35d4d8eSmrgelse 102875a81ca49Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 102882a51b5beSmrgfi 1028932b578d3Smrg 102905a81ca49Smrg# User supplied flags override default flags 102915a81ca49Smrgif test "x$LINT_FLAGS" != "x"; then 102925a81ca49Smrg lint_options=$LINT_FLAGS 102935a81ca49Smrgfi 102945a81ca49Smrg 102955a81ca49SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 102965a81ca49SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 102975a81ca49Smrg 102985a81ca49Smrg]) # XORG_WITH_LINT 102995a81ca49Smrg 103005a81ca49Smrg# XORG_LINT_LIBRARY(LIBNAME) 103015a81ca49Smrg# -------------------------- 103025a81ca49Smrg# Minimum version: 1.1.0 10303e35d4d8eSmrg# 103045a81ca49Smrg# Sets up flags for building lint libraries for checking programs that call 103055a81ca49Smrg# functions in the library. 10306e35d4d8eSmrg# 10307e35d4d8eSmrg# Interface to module: 103085a81ca49Smrg# LINTLIB - Automake variable with the name of lint library file to make 103095a81ca49Smrg# MAKE_LINT_LIB - Automake conditional 10310e35d4d8eSmrg# 103115a81ca49Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 103125a81ca49Smrg# - 'no' user instructs the module not to create a lint library (default) 1031332b578d3Smrg 103145a81ca49SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 103155a81ca49SmrgAC_REQUIRE([XORG_WITH_LINT]) 103165a81ca49SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 103175a81ca49Smrg [Create lint library (default: disabled)])], 103185a81ca49Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 103195a81ca49Smrg 103205a81ca49Smrgif test "x$make_lint_lib" = x"yes" ; then 103215a81ca49Smrg LINTLIB=llib-l$1.ln 103225a81ca49Smrg if test "x$LINT" = "x"; then 103235a81ca49Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 103245a81ca49Smrg fi 103255a81ca49Smrgelif test "x$make_lint_lib" != x"no" ; then 103265a81ca49Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 103275a81ca49Smrgfi 103285a81ca49Smrg 103295a81ca49SmrgAC_SUBST(LINTLIB) 103305a81ca49SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 103315a81ca49Smrg 103325a81ca49Smrg]) # XORG_LINT_LIBRARY 103335a81ca49Smrg 103345a81ca49Smrg# XORG_COMPILER_BRAND 103355a81ca49Smrg# ------------------- 103365a81ca49Smrg# Minimum version: 1.14.0 10337e35d4d8eSmrg# 103385a81ca49Smrg# Checks for various brands of compilers and sets flags as appropriate: 103395a81ca49Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 103405a81ca49Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 103415a81ca49Smrg# clang compiler - sets CLANGCC to "yes" 103425a81ca49Smrg# Intel compiler - sets INTELCC to "yes" 103435a81ca49Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10344e35d4d8eSmrg# 103455a81ca49SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 103465a81ca49SmrgAC_LANG_CASE( 103475a81ca49Smrg [C], [ 103485a81ca49Smrg AC_REQUIRE([AC_PROG_CC_C99]) 103495a81ca49Smrg ], 103505a81ca49Smrg [C++], [ 103515a81ca49Smrg AC_REQUIRE([AC_PROG_CXX]) 103525a81ca49Smrg ] 103535a81ca49Smrg) 103545a81ca49SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 103555a81ca49SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 103565a81ca49SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 103575a81ca49Smrg]) # XORG_COMPILER_BRAND 1035832b578d3Smrg 103595a81ca49Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 103605a81ca49Smrg# --------------- 103615a81ca49Smrg# Minimum version: 1.16.0 10362e35d4d8eSmrg# 103635a81ca49Smrg# Test if the compiler works when passed the given flag as a command line argument. 103645a81ca49Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 103655a81ca49Smrg# next flag in the list until there are no more options. 10366e35d4d8eSmrg# 103675a81ca49Smrg# Note that this does not guarantee that the compiler supports the flag as some 103685a81ca49Smrg# compilers will simply ignore arguments that they do not understand, but we do 103695a81ca49Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 103705a81ca49Smrg# -Werror=unused-command-line-argument 10371e35d4d8eSmrg# 103725a81ca49SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 103735a81ca49Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 103745a81ca49Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 103755a81ca49Smrg 103765a81ca49SmrgAC_LANG_COMPILER_REQUIRE 103775a81ca49Smrg 103785a81ca49SmrgAC_LANG_CASE( 103795a81ca49Smrg [C], [ 103805a81ca49Smrg AC_REQUIRE([AC_PROG_CC_C99]) 103815a81ca49Smrg define([PREFIX], [C]) 103825a81ca49Smrg define([CACHE_PREFIX], [cc]) 103835a81ca49Smrg define([COMPILER], [$CC]) 103845a81ca49Smrg ], 103855a81ca49Smrg [C++], [ 103865a81ca49Smrg define([PREFIX], [CXX]) 103875a81ca49Smrg define([CACHE_PREFIX], [cxx]) 103885a81ca49Smrg define([COMPILER], [$CXX]) 103895a81ca49Smrg ] 103905a81ca49Smrg) 103915a81ca49Smrg 103925a81ca49Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 103935a81ca49Smrg 103945a81ca49Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 103955a81ca49Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 103965a81ca49Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 103975a81ca49Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 103985a81ca49Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 103995a81ca49Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 104005a81ca49Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 104015a81ca49Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 104025a81ca49Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 104035a81ca49Smrgfi 104045a81ca49Smrg 104055a81ca49Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 104065a81ca49Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 104075a81ca49Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 104085a81ca49Smrg fi 104095a81ca49Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 104105a81ca49Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 104115a81ca49Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 104125a81ca49Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 104135a81ca49Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 104145a81ca49Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 104155a81ca49Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 104165a81ca49Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 104175a81ca49Smrgfi 104185a81ca49Smrg 104195a81ca49Smrgfound="no" 104205a81ca49Smrgm4_foreach([flag], m4_cdr($@), [ 104215a81ca49Smrg if test $found = "no" ; then 104225a81ca49Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 104235a81ca49Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 104245a81ca49Smrg fi 104255a81ca49Smrg 104265a81ca49Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 104275a81ca49Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 104285a81ca49Smrg fi 1042932b578d3Smrg 104305a81ca49Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10431e35d4d8eSmrg 104325a81ca49Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 104335a81ca49Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 104345a81ca49Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 104355a81ca49Smrg AC_CACHE_VAL($cacheid, 104365a81ca49Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 104375a81ca49Smrg [eval $cacheid=yes], 104385a81ca49Smrg [eval $cacheid=no])]) 104395a81ca49Smrg 104405a81ca49Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 104415a81ca49Smrg 104425a81ca49Smrg eval supported=\$$cacheid 104435a81ca49Smrg AC_MSG_RESULT([$supported]) 104445a81ca49Smrg if test "$supported" = "yes" ; then 104455a81ca49Smrg $1="$$1 ]flag[" 104465a81ca49Smrg found="yes" 104475a81ca49Smrg fi 104485a81ca49Smrg fi 104495a81ca49Smrg]) 104505a81ca49Smrg]) # XORG_TESTSET_CFLAG 104515a81ca49Smrg 104525a81ca49Smrg# XORG_COMPILER_FLAGS 104535a81ca49Smrg# --------------- 104545a81ca49Smrg# Minimum version: 1.16.0 10455e35d4d8eSmrg# 104565a81ca49Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 104575a81ca49Smrg# arguments supported by the selected compiler which do NOT alter the generated 104585a81ca49Smrg# code. These arguments will cause the compiler to print various warnings 104595a81ca49Smrg# during compilation AND turn a conservative set of warnings into errors. 10460e35d4d8eSmrg# 104615a81ca49Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 104625a81ca49Smrg# future versions of util-macros as options are added to new compilers. 10463e35d4d8eSmrg# 104645a81ca49SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 104655a81ca49SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10466e35d4d8eSmrg 104675a81ca49SmrgAC_ARG_ENABLE(selective-werror, 104685a81ca49Smrg AS_HELP_STRING([--disable-selective-werror], 104695a81ca49Smrg [Turn off selective compiler errors. (default: enabled)]), 104705a81ca49Smrg [SELECTIVE_WERROR=$enableval], 104715a81ca49Smrg [SELECTIVE_WERROR=yes]) 104725a81ca49Smrg 104735a81ca49SmrgAC_LANG_CASE( 104745a81ca49Smrg [C], [ 104755a81ca49Smrg define([PREFIX], [C]) 104765a81ca49Smrg ], 104775a81ca49Smrg [C++], [ 104785a81ca49Smrg define([PREFIX], [CXX]) 104795a81ca49Smrg ] 104805a81ca49Smrg) 104815a81ca49Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 104825a81ca49Smrgif test "x$SUNCC" = "xyes"; then 104835a81ca49Smrg [BASE_]PREFIX[FLAGS]="-v" 104845a81ca49Smrgelse 104855a81ca49Smrg [BASE_]PREFIX[FLAGS]="" 104865a81ca49Smrgfi 104875a81ca49Smrg 104885a81ca49Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 104895a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 104905a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 104915a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 104925a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 104935a81ca49Smrg 104945a81ca49SmrgAC_LANG_CASE( 104955a81ca49Smrg [C], [ 104965a81ca49Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 104975a81ca49Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 104985a81ca49Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 104995a81ca49Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 105005a81ca49Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 105015a81ca49Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 105025a81ca49Smrg ] 105035a81ca49Smrg) 105045a81ca49Smrg 105055a81ca49Smrg# This chunk adds additional warnings that could catch undesired effects. 105065a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 105075a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 105085a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 105095a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 105105a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 105115a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 105125a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 105135a81ca49Smrg 105145a81ca49Smrg# These are currently disabled because they are noisy. They will be enabled 105155a81ca49Smrg# in the future once the codebase is sufficiently modernized to silence 105165a81ca49Smrg# them. For now, I don't want them to drown out the other warnings. 105175a81ca49Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 105185a81ca49Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 105195a81ca49Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 105205a81ca49Smrg 105215a81ca49Smrg# Turn some warnings into errors, so we don't accidently get successful builds 105225a81ca49Smrg# when there are problems that should be fixed. 105235a81ca49Smrg 105245a81ca49Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 105255a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 105265a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 105275a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 105285a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 105295a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 105305a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 105315a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 105325a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 105335a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 105345a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 105355a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 105365a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 105375a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 105385a81ca49Smrgelse 105395a81ca49SmrgAC_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]) 105405a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 105415a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 105425a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 105435a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 105445a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 105455a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 105465a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 105475a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 105485a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 105495a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 105505a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 105515a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 105525a81ca49SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 105535a81ca49Smrgfi 105545a81ca49Smrg 105555a81ca49SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 105565a81ca49Smrg]) # XORG_COMPILER_FLAGS 105575a81ca49Smrg 105585a81ca49Smrg# XORG_CWARNFLAGS 105595a81ca49Smrg# --------------- 105605a81ca49Smrg# Minimum version: 1.2.0 105615a81ca49Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 10562e35d4d8eSmrg# 105635a81ca49Smrg# Defines CWARNFLAGS to enable C compiler warnings. 10564e35d4d8eSmrg# 105655a81ca49Smrg# This function is deprecated because it defines -fno-strict-aliasing 105665a81ca49Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 105675a81ca49Smrg# is needed, then it should be added explicitly in the module when 105685a81ca49Smrg# it is updated to use BASE_CFLAGS. 10569e35d4d8eSmrg# 105705a81ca49SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 105715a81ca49SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 105725a81ca49SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 105735a81ca49SmrgAC_LANG_CASE( 105745a81ca49Smrg [C], [ 105755a81ca49Smrg CWARNFLAGS="$BASE_CFLAGS" 105765a81ca49Smrg if test "x$GCC" = xyes ; then 105775a81ca49Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 105785a81ca49Smrg fi 105795a81ca49Smrg AC_SUBST(CWARNFLAGS) 105805a81ca49Smrg ] 105815a81ca49Smrg) 105825a81ca49Smrg]) # XORG_CWARNFLAGS 105835a81ca49Smrg 105845a81ca49Smrg# XORG_STRICT_OPTION 105855a81ca49Smrg# ----------------------- 105865a81ca49Smrg# Minimum version: 1.3.0 10587e35d4d8eSmrg# 105885a81ca49Smrg# Add configure option to enable strict compilation flags, such as treating 105895a81ca49Smrg# warnings as fatal errors. 105905a81ca49Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 105915a81ca49Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 10592e35d4d8eSmrg# 105935a81ca49Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 105945a81ca49Smrg# when strict compilation is unconditionally desired. 105955a81ca49SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 105965a81ca49SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 105975a81ca49SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 10598e35d4d8eSmrg 105995a81ca49SmrgAC_ARG_ENABLE(strict-compilation, 106005a81ca49Smrg AS_HELP_STRING([--enable-strict-compilation], 106015a81ca49Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 106025a81ca49Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 1060332b578d3Smrg 106045a81ca49SmrgAC_LANG_CASE( 106055a81ca49Smrg [C], [ 106065a81ca49Smrg define([PREFIX], [C]) 106075a81ca49Smrg ], 106085a81ca49Smrg [C++], [ 106095a81ca49Smrg define([PREFIX], [CXX]) 106105a81ca49Smrg ] 106115a81ca49Smrg) 1061232b578d3Smrg 106135a81ca49Smrg[STRICT_]PREFIX[FLAGS]="" 106145a81ca49SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 106155a81ca49SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 1061632b578d3Smrg 106175a81ca49Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 106185a81ca49Smrg# activate it with -Werror, so we add it here explicitly. 106195a81ca49SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 1062032b578d3Smrg 106215a81ca49Smrgif test "x$STRICT_COMPILE" = "xyes"; then 106225a81ca49Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 106235a81ca49Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 106245a81ca49Smrgfi 106255a81ca49SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 106265a81ca49SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 106275a81ca49SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 106285a81ca49Smrg]) # XORG_STRICT_OPTION 1062932b578d3Smrg 106305a81ca49Smrg# XORG_DEFAULT_OPTIONS 106315a81ca49Smrg# -------------------- 106325a81ca49Smrg# Minimum version: 1.3.0 10633e35d4d8eSmrg# 106345a81ca49Smrg# Defines default options for X.Org modules. 106352a51b5beSmrg# 106365a81ca49SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 106375a81ca49SmrgAC_REQUIRE([AC_PROG_INSTALL]) 106385a81ca49SmrgXORG_COMPILER_FLAGS 106395a81ca49SmrgXORG_CWARNFLAGS 106405a81ca49SmrgXORG_STRICT_OPTION 106415a81ca49SmrgXORG_RELEASE_VERSION 106425a81ca49SmrgXORG_CHANGELOG 106435a81ca49SmrgXORG_INSTALL 106445a81ca49SmrgXORG_MANPAGE_SECTIONS 106455a81ca49Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 106465a81ca49Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 106475a81ca49Smrg]) # XORG_DEFAULT_OPTIONS 1064832b578d3Smrg 106495a81ca49Smrg# XORG_INSTALL() 106505a81ca49Smrg# ---------------- 106515a81ca49Smrg# Minimum version: 1.4.0 10652e35d4d8eSmrg# 106535a81ca49Smrg# Defines the variable INSTALL_CMD as the command to copy 106545a81ca49Smrg# INSTALL from $prefix/share/util-macros. 10655e35d4d8eSmrg# 106565a81ca49SmrgAC_DEFUN([XORG_INSTALL], [ 106575a81ca49SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 106585a81ca49Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 106595a81ca49SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 106605a81ca49Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 106615a81ca49Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 106625a81ca49Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 106635a81ca49SmrgAC_SUBST([INSTALL_CMD]) 106645a81ca49Smrg]) # XORG_INSTALL 106655a81ca49Smrgdnl Copyright 2005 Red Hat, Inc 106665a81ca49Smrgdnl 106675a81ca49Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 106685a81ca49Smrgdnl documentation for any purpose is hereby granted without fee, provided that 106695a81ca49Smrgdnl the above copyright notice appear in all copies and that both that 106705a81ca49Smrgdnl copyright notice and this permission notice appear in supporting 106715a81ca49Smrgdnl documentation. 106725a81ca49Smrgdnl 106735a81ca49Smrgdnl The above copyright notice and this permission notice shall be included 106745a81ca49Smrgdnl in all copies or substantial portions of the Software. 106755a81ca49Smrgdnl 106765a81ca49Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 106775a81ca49Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 106785a81ca49Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 106795a81ca49Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 106805a81ca49Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 106815a81ca49Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 106825a81ca49Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 106835a81ca49Smrgdnl 106845a81ca49Smrgdnl Except as contained in this notice, the name of the copyright holders shall 106855a81ca49Smrgdnl not be used in advertising or otherwise to promote the sale, use or 106865a81ca49Smrgdnl other dealings in this Software without prior written authorization 106875a81ca49Smrgdnl from the copyright holders. 106885a81ca49Smrgdnl 106895a81ca49Smrg 106905a81ca49Smrg# XORG_RELEASE_VERSION 106915a81ca49Smrg# -------------------- 106925a81ca49Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 106935a81ca49Smrg 106945a81ca49SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 106955a81ca49Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 106965a81ca49Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 106975a81ca49Smrg [Major version of this package]) 106985a81ca49Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 106995a81ca49Smrg if test "x$PVM" = "x"; then 107005a81ca49Smrg PVM="0" 107015a81ca49Smrg fi 107025a81ca49Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 107035a81ca49Smrg [$PVM], 107045a81ca49Smrg [Minor version of this package]) 107055a81ca49Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 107065a81ca49Smrg if test "x$PVP" = "x"; then 107075a81ca49Smrg PVP="0" 107085a81ca49Smrg fi 107095a81ca49Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 107105a81ca49Smrg [$PVP], 107115a81ca49Smrg [Patch version of this package]) 107125a81ca49Smrg]) 107135a81ca49Smrg 107145a81ca49Smrg# XORG_CHANGELOG() 107155a81ca49Smrg# ---------------- 107165a81ca49Smrg# Minimum version: 1.2.0 10717e35d4d8eSmrg# 107185a81ca49Smrg# Defines the variable CHANGELOG_CMD as the command to generate 107195a81ca49Smrg# ChangeLog from git. 10720e35d4d8eSmrg# 10721e35d4d8eSmrg# 107225a81ca49SmrgAC_DEFUN([XORG_CHANGELOG], [ 107235a81ca49SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 107245a81ca49Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 107255a81ca49Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 107265a81ca49Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 107275a81ca49SmrgAC_SUBST([CHANGELOG_CMD]) 107285a81ca49Smrg]) # XORG_CHANGELOG 107295a81ca49Smrg 107305a81ca49Smrgdnl Copyright 2005 Red Hat, Inc 107315a81ca49Smrgdnl 107325a81ca49Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 107335a81ca49Smrgdnl documentation for any purpose is hereby granted without fee, provided that 107345a81ca49Smrgdnl the above copyright notice appear in all copies and that both that 107355a81ca49Smrgdnl copyright notice and this permission notice appear in supporting 107365a81ca49Smrgdnl documentation. 107375a81ca49Smrgdnl 107385a81ca49Smrgdnl The above copyright notice and this permission notice shall be included 107395a81ca49Smrgdnl in all copies or substantial portions of the Software. 107405a81ca49Smrgdnl 107415a81ca49Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 107425a81ca49Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 107435a81ca49Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 107445a81ca49Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 107455a81ca49Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 107465a81ca49Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 107475a81ca49Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 107485a81ca49Smrgdnl 107495a81ca49Smrgdnl Except as contained in this notice, the name of the copyright holders shall 107505a81ca49Smrgdnl not be used in advertising or otherwise to promote the sale, use or 107515a81ca49Smrgdnl other dealings in this Software without prior written authorization 107525a81ca49Smrgdnl from the copyright holders. 107535a81ca49Smrgdnl 107545a81ca49Smrg 107555a81ca49Smrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 107565a81ca49Smrg# -------------------------- 107575a81ca49Smrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 107585a81ca49Smrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 107595a81ca49Smrg 107605a81ca49SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 107615a81ca49Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 107625a81ca49Smrg SAVE_CFLAGS="$CFLAGS" 107635a81ca49Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 107645a81ca49Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 107655a81ca49Smrg#include "xorg-server.h" 107665a81ca49Smrg#if !defined $1 107675a81ca49Smrg#error $1 not defined 107685a81ca49Smrg#endif 107695a81ca49Smrg ]])], 107705a81ca49Smrg [_EXT_CHECK=yes], 107715a81ca49Smrg [_EXT_CHECK=no]) 107725a81ca49Smrg CFLAGS="$SAVE_CFLAGS" 107735a81ca49Smrg AC_MSG_CHECKING([if $1 is defined]) 107745a81ca49Smrg AC_MSG_RESULT([$_EXT_CHECK]) 107755a81ca49Smrg if test "$_EXT_CHECK" != no; then 107765a81ca49Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 107775a81ca49Smrg fi 107785a81ca49Smrg]) 107795a81ca49Smrg 107805a81ca49Smrg# Copyright (C) 2002-2014 Free Software Foundation, Inc. 10781e35d4d8eSmrg# 107825a81ca49Smrg# This file is free software; the Free Software Foundation 107835a81ca49Smrg# gives unlimited permission to copy and/or distribute it, 107845a81ca49Smrg# with or without modifications, as long as this notice is preserved. 107855a81ca49Smrg 107865a81ca49Smrg# AM_AUTOMAKE_VERSION(VERSION) 107875a81ca49Smrg# ---------------------------- 107885a81ca49Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 107895a81ca49Smrg# generated from the m4 files accompanying Automake X.Y. 107905a81ca49Smrg# (This private macro should not be called outside this file.) 107915a81ca49SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 107925a81ca49Smrg[am__api_version='1.15' 107935a81ca49Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 107945a81ca49Smrgdnl require some minimum version. Point them to the right macro. 107955a81ca49Smrgm4_if([$1], [1.15], [], 107965a81ca49Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 107975a81ca49Smrg]) 107985a81ca49Smrg 107995a81ca49Smrg# _AM_AUTOCONF_VERSION(VERSION) 108005a81ca49Smrg# ----------------------------- 108015a81ca49Smrg# aclocal traces this macro to find the Autoconf version. 108025a81ca49Smrg# This is a private macro too. Using m4_define simplifies 108035a81ca49Smrg# the logic in aclocal, which can simply ignore this definition. 108045a81ca49Smrgm4_define([_AM_AUTOCONF_VERSION], []) 108055a81ca49Smrg 108065a81ca49Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 108075a81ca49Smrg# ------------------------------- 108085a81ca49Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 108095a81ca49Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 108105a81ca49SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 108115a81ca49Smrg[AM_AUTOMAKE_VERSION([1.15])dnl 108125a81ca49Smrgm4_ifndef([AC_AUTOCONF_VERSION], 108135a81ca49Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 108145a81ca49Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 108155a81ca49Smrg 108165a81ca49Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 108175a81ca49Smrg 108185a81ca49Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 10819e35d4d8eSmrg# 108205a81ca49Smrg# This file is free software; the Free Software Foundation 108215a81ca49Smrg# gives unlimited permission to copy and/or distribute it, 108225a81ca49Smrg# with or without modifications, as long as this notice is preserved. 108235a81ca49Smrg 108245a81ca49Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 108255a81ca49Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 108265a81ca49Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 10827e35d4d8eSmrg# 108285a81ca49Smrg# Of course, Automake must honor this variable whenever it calls a 108295a81ca49Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 108305a81ca49Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 108315a81ca49Smrg# depending on how configure is run. This is pretty annoying, since 108325a81ca49Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 108335a81ca49Smrg# source directory, any form will work fine, but in subdirectories a 108345a81ca49Smrg# relative path needs to be adjusted first. 10835e35d4d8eSmrg# 108365a81ca49Smrg# $ac_aux_dir/missing 108375a81ca49Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 108385a81ca49Smrg# $top_srcdir/$ac_aux_dir/missing 108395a81ca49Smrg# fails if $ac_aux_dir is absolute, 108405a81ca49Smrg# fails when called from a subdirectory in a VPATH build with 108415a81ca49Smrg# a relative $ac_aux_dir 10842e35d4d8eSmrg# 108435a81ca49Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 108445a81ca49Smrg# are both prefixed by $srcdir. In an in-source build this is usually 108455a81ca49Smrg# harmless because $srcdir is '.', but things will broke when you 108465a81ca49Smrg# start a VPATH build or use an absolute $srcdir. 10847e35d4d8eSmrg# 108485a81ca49Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 108495a81ca49Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 108505a81ca49Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 108515a81ca49Smrg# and then we would define $MISSING as 108525a81ca49Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 108535a81ca49Smrg# This will work as long as MISSING is not called from configure, because 108545a81ca49Smrg# unfortunately $(top_srcdir) has no meaning in configure. 108555a81ca49Smrg# However there are other variables, like CC, which are often used in 108565a81ca49Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 10857e35d4d8eSmrg# 108585a81ca49Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 108595a81ca49Smrg# absolute PATH. The drawback is that using absolute paths prevent a 108605a81ca49Smrg# configured tree to be moved without reconfiguration. 108615a81ca49Smrg 108625a81ca49SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 108635a81ca49Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 108645a81ca49Smrg# Expand $ac_aux_dir to an absolute path. 108655a81ca49Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 108665a81ca49Smrg]) 108675a81ca49Smrg 108685a81ca49Smrg# AM_CONDITIONAL -*- Autoconf -*- 108695a81ca49Smrg 108705a81ca49Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 10871e35d4d8eSmrg# 108725a81ca49Smrg# This file is free software; the Free Software Foundation 108735a81ca49Smrg# gives unlimited permission to copy and/or distribute it, 108745a81ca49Smrg# with or without modifications, as long as this notice is preserved. 108755a81ca49Smrg 108765a81ca49Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 108775a81ca49Smrg# ------------------------------------- 108785a81ca49Smrg# Define a conditional. 108795a81ca49SmrgAC_DEFUN([AM_CONDITIONAL], 108805a81ca49Smrg[AC_PREREQ([2.52])dnl 108815a81ca49Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 108825a81ca49Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 108835a81ca49SmrgAC_SUBST([$1_TRUE])dnl 108845a81ca49SmrgAC_SUBST([$1_FALSE])dnl 108855a81ca49Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 108865a81ca49Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 108875a81ca49Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 108885a81ca49Smrgif $2; then 108895a81ca49Smrg $1_TRUE= 108905a81ca49Smrg $1_FALSE='#' 108912a51b5beSmrgelse 108925a81ca49Smrg $1_TRUE='#' 108935a81ca49Smrg $1_FALSE= 108942a51b5beSmrgfi 108955a81ca49SmrgAC_CONFIG_COMMANDS_PRE( 108965a81ca49Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 108975a81ca49Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 108985a81ca49SmrgUsually this means the macro was only invoked conditionally.]]) 108995a81ca49Smrgfi])]) 1090032b578d3Smrg 109015a81ca49Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 10902e35d4d8eSmrg# 109035a81ca49Smrg# This file is free software; the Free Software Foundation 109045a81ca49Smrg# gives unlimited permission to copy and/or distribute it, 109055a81ca49Smrg# with or without modifications, as long as this notice is preserved. 109065a81ca49Smrg 109075a81ca49Smrg 109085a81ca49Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 109095a81ca49Smrg# written in clear, in which case automake, when reading aclocal.m4, 109105a81ca49Smrg# will think it sees a *use*, and therefore will trigger all it's 109115a81ca49Smrg# C support machinery. Also note that it means that autoscan, seeing 109125a81ca49Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 109135a81ca49Smrg 109145a81ca49Smrg 109155a81ca49Smrg# _AM_DEPENDENCIES(NAME) 109165a81ca49Smrg# ---------------------- 109175a81ca49Smrg# See how the compiler implements dependency checking. 109185a81ca49Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 109195a81ca49Smrg# We try a few techniques and use that to set a single cache variable. 10920e35d4d8eSmrg# 109215a81ca49Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 109225a81ca49Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 109235a81ca49Smrg# dependency, and given that the user is not expected to run this macro, 109245a81ca49Smrg# just rely on AC_PROG_CC. 109255a81ca49SmrgAC_DEFUN([_AM_DEPENDENCIES], 109265a81ca49Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 109275a81ca49SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 109285a81ca49SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 109295a81ca49SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1093032b578d3Smrg 109315a81ca49Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 109325a81ca49Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 109335a81ca49Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 109345a81ca49Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 109355a81ca49Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 109365a81ca49Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 109375a81ca49Smrg [depcc="$$1" am_compiler_list=]) 1093832b578d3Smrg 109395a81ca49SmrgAC_CACHE_CHECK([dependency style of $depcc], 109405a81ca49Smrg [am_cv_$1_dependencies_compiler_type], 109415a81ca49Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 109425a81ca49Smrg # We make a subdir and do the tests there. Otherwise we can end up 109435a81ca49Smrg # making bogus files that we don't know about and never remove. For 109445a81ca49Smrg # instance it was reported that on HP-UX the gcc test will end up 109455a81ca49Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 109465a81ca49Smrg # in D". 109475a81ca49Smrg rm -rf conftest.dir 109485a81ca49Smrg mkdir conftest.dir 109495a81ca49Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 109505a81ca49Smrg # using a relative directory. 109515a81ca49Smrg cp "$am_depcomp" conftest.dir 109525a81ca49Smrg cd conftest.dir 109535a81ca49Smrg # We will build objects and dependencies in a subdirectory because 109545a81ca49Smrg # it helps to detect inapplicable dependency modes. For instance 109555a81ca49Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 109565a81ca49Smrg # side effect of compilation, but ICC will put the dependencies in 109575a81ca49Smrg # the current directory while Tru64 will put them in the object 109585a81ca49Smrg # directory. 109595a81ca49Smrg mkdir sub 109605a81ca49Smrg 109615a81ca49Smrg am_cv_$1_dependencies_compiler_type=none 109625a81ca49Smrg if test "$am_compiler_list" = ""; then 109635a81ca49Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 109645a81ca49Smrg fi 109655a81ca49Smrg am__universal=false 109665a81ca49Smrg m4_case([$1], [CC], 109675a81ca49Smrg [case " $depcc " in #( 109685a81ca49Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 109695a81ca49Smrg esac], 109705a81ca49Smrg [CXX], 109715a81ca49Smrg [case " $depcc " in #( 109725a81ca49Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 109735a81ca49Smrg esac]) 109745a81ca49Smrg 109755a81ca49Smrg for depmode in $am_compiler_list; do 109765a81ca49Smrg # Setup a source with many dependencies, because some compilers 109775a81ca49Smrg # like to wrap large dependency lists on column 80 (with \), and 109785a81ca49Smrg # we should not choose a depcomp mode which is confused by this. 109795a81ca49Smrg # 109805a81ca49Smrg # We need to recreate these files for each test, as the compiler may 109815a81ca49Smrg # overwrite some of them when testing with obscure command lines. 109825a81ca49Smrg # This happens at least with the AIX C compiler. 109835a81ca49Smrg : > sub/conftest.c 109845a81ca49Smrg for i in 1 2 3 4 5 6; do 109855a81ca49Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 109865a81ca49Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 109875a81ca49Smrg # Solaris 10 /bin/sh. 109885a81ca49Smrg echo '/* dummy */' > sub/conftst$i.h 109895a81ca49Smrg done 109905a81ca49Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 109915a81ca49Smrg 109925a81ca49Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 109935a81ca49Smrg # mode. It turns out that the SunPro C++ compiler does not properly 109945a81ca49Smrg # handle '-M -o', and we need to detect this. Also, some Intel 109955a81ca49Smrg # versions had trouble with output in subdirs. 109965a81ca49Smrg am__obj=sub/conftest.${OBJEXT-o} 109975a81ca49Smrg am__minus_obj="-o $am__obj" 109985a81ca49Smrg case $depmode in 109995a81ca49Smrg gcc) 110005a81ca49Smrg # This depmode causes a compiler race in universal mode. 110015a81ca49Smrg test "$am__universal" = false || continue 110025a81ca49Smrg ;; 110035a81ca49Smrg nosideeffect) 110045a81ca49Smrg # After this tag, mechanisms are not by side-effect, so they'll 110055a81ca49Smrg # only be used when explicitly requested. 110065a81ca49Smrg if test "x$enable_dependency_tracking" = xyes; then 110075a81ca49Smrg continue 110085a81ca49Smrg else 110095a81ca49Smrg break 110105a81ca49Smrg fi 110115a81ca49Smrg ;; 110125a81ca49Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 110135a81ca49Smrg # This compiler won't grok '-c -o', but also, the minuso test has 110145a81ca49Smrg # not run yet. These depmodes are late enough in the game, and 110155a81ca49Smrg # so weak that their functioning should not be impacted. 110165a81ca49Smrg am__obj=conftest.${OBJEXT-o} 110175a81ca49Smrg am__minus_obj= 110185a81ca49Smrg ;; 110195a81ca49Smrg none) break ;; 110205a81ca49Smrg esac 110215a81ca49Smrg if depmode=$depmode \ 110225a81ca49Smrg source=sub/conftest.c object=$am__obj \ 110235a81ca49Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 110245a81ca49Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 110255a81ca49Smrg >/dev/null 2>conftest.err && 110265a81ca49Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 110275a81ca49Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 110285a81ca49Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 110295a81ca49Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 110305a81ca49Smrg # icc doesn't choke on unknown options, it will just issue warnings 110315a81ca49Smrg # or remarks (even with -Werror). So we grep stderr for any message 110325a81ca49Smrg # that says an option was ignored or not supported. 110335a81ca49Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 110345a81ca49Smrg # icc: Command line warning: ignoring option '-M'; no argument required 110355a81ca49Smrg # The diagnosis changed in icc 8.0: 110365a81ca49Smrg # icc: Command line remark: option '-MP' not supported 110375a81ca49Smrg if (grep 'ignoring option' conftest.err || 110385a81ca49Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 110395a81ca49Smrg am_cv_$1_dependencies_compiler_type=$depmode 110405a81ca49Smrg break 110415a81ca49Smrg fi 110425a81ca49Smrg fi 110435a81ca49Smrg done 1104432b578d3Smrg 110455a81ca49Smrg cd .. 110465a81ca49Smrg rm -rf conftest.dir 110475a81ca49Smrgelse 110485a81ca49Smrg am_cv_$1_dependencies_compiler_type=none 11049e35d4d8eSmrgfi 110505a81ca49Smrg]) 110515a81ca49SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 110525a81ca49SmrgAM_CONDITIONAL([am__fastdep$1], [ 110535a81ca49Smrg test "x$enable_dependency_tracking" != xno \ 110545a81ca49Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 110555a81ca49Smrg]) 1105632b578d3Smrg 1105732b578d3Smrg 110585a81ca49Smrg# AM_SET_DEPDIR 110595a81ca49Smrg# ------------- 110605a81ca49Smrg# Choose a directory name for dependency files. 110615a81ca49Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 110625a81ca49SmrgAC_DEFUN([AM_SET_DEPDIR], 110635a81ca49Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 110645a81ca49SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 110655a81ca49Smrg]) 1106632b578d3Smrg 1106732b578d3Smrg 110685a81ca49Smrg# AM_DEP_TRACK 110695a81ca49Smrg# ------------ 110705a81ca49SmrgAC_DEFUN([AM_DEP_TRACK], 110715a81ca49Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 110725a81ca49SmrgAS_HELP_STRING( 110735a81ca49Smrg [--enable-dependency-tracking], 110745a81ca49Smrg [do not reject slow dependency extractors]) 110755a81ca49SmrgAS_HELP_STRING( 110765a81ca49Smrg [--disable-dependency-tracking], 110775a81ca49Smrg [speeds up one-time build])]) 110785a81ca49Smrgif test "x$enable_dependency_tracking" != xno; then 110795a81ca49Smrg am_depcomp="$ac_aux_dir/depcomp" 110805a81ca49Smrg AMDEPBACKSLASH='\' 110815a81ca49Smrg am__nodep='_no' 110822a51b5beSmrgfi 110835a81ca49SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 110845a81ca49SmrgAC_SUBST([AMDEPBACKSLASH])dnl 110855a81ca49Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 110865a81ca49SmrgAC_SUBST([am__nodep])dnl 110875a81ca49Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 110885a81ca49Smrg]) 1108932b578d3Smrg 110905a81ca49Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 1109132b578d3Smrg 110925a81ca49Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 110932a51b5beSmrg# 110945a81ca49Smrg# This file is free software; the Free Software Foundation 110955a81ca49Smrg# gives unlimited permission to copy and/or distribute it, 110965a81ca49Smrg# with or without modifications, as long as this notice is preserved. 110975a81ca49Smrg 110985a81ca49Smrg 110995a81ca49Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 111005a81ca49Smrg# ------------------------------ 111015a81ca49SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 111025a81ca49Smrg[{ 111035a81ca49Smrg # Older Autoconf quotes --file arguments for eval, but not when files 111045a81ca49Smrg # are listed without --file. Let's play safe and only enable the eval 111055a81ca49Smrg # if we detect the quoting. 111065a81ca49Smrg case $CONFIG_FILES in 111075a81ca49Smrg *\'*) eval set x "$CONFIG_FILES" ;; 111085a81ca49Smrg *) set x $CONFIG_FILES ;; 111095a81ca49Smrg esac 111105a81ca49Smrg shift 111115a81ca49Smrg for mf 111125a81ca49Smrg do 111135a81ca49Smrg # Strip MF so we end up with the name of the file. 111145a81ca49Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 111155a81ca49Smrg # Check whether this is an Automake generated Makefile or not. 111165a81ca49Smrg # We used to match only the files named 'Makefile.in', but 111175a81ca49Smrg # some people rename them; so instead we look at the file content. 111185a81ca49Smrg # Grep'ing the first line is not enough: some people post-process 111195a81ca49Smrg # each Makefile.in and add a new line on top of each file to say so. 111205a81ca49Smrg # Grep'ing the whole file is not good either: AIX grep has a line 111215a81ca49Smrg # limit of 2048, but all sed's we know have understand at least 4000. 111225a81ca49Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 111235a81ca49Smrg dirpart=`AS_DIRNAME("$mf")` 111245a81ca49Smrg else 111255a81ca49Smrg continue 111265a81ca49Smrg fi 111275a81ca49Smrg # Extract the definition of DEPDIR, am__include, and am__quote 111285a81ca49Smrg # from the Makefile without running 'make'. 111295a81ca49Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 111305a81ca49Smrg test -z "$DEPDIR" && continue 111315a81ca49Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 111325a81ca49Smrg test -z "$am__include" && continue 111335a81ca49Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 111345a81ca49Smrg # Find all dependency output files, they are included files with 111355a81ca49Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 111365a81ca49Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 111375a81ca49Smrg # expansion. 111385a81ca49Smrg for file in `sed -n " 111395a81ca49Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 111405a81ca49Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 111415a81ca49Smrg # Make sure the directory exists. 111425a81ca49Smrg test -f "$dirpart/$file" && continue 111435a81ca49Smrg fdir=`AS_DIRNAME(["$file"])` 111445a81ca49Smrg AS_MKDIR_P([$dirpart/$fdir]) 111455a81ca49Smrg # echo "creating $dirpart/$file" 111465a81ca49Smrg echo '# dummy' > "$dirpart/$file" 111475a81ca49Smrg done 111485a81ca49Smrg done 111495a81ca49Smrg} 111505a81ca49Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 111515a81ca49Smrg 111525a81ca49Smrg 111535a81ca49Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 111545a81ca49Smrg# ----------------------------- 111555a81ca49Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 11156e35d4d8eSmrg# 111575a81ca49Smrg# This code is only required when automatic dependency tracking 111585a81ca49Smrg# is enabled. FIXME. This creates each '.P' file that we will 111595a81ca49Smrg# need in order to bootstrap the dependency handling code. 111605a81ca49SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 111615a81ca49Smrg[AC_CONFIG_COMMANDS([depfiles], 111625a81ca49Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 111635a81ca49Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 111645a81ca49Smrg]) 111655a81ca49Smrg 111665a81ca49Smrg# Do all the work for Automake. -*- Autoconf -*- 111675a81ca49Smrg 111685a81ca49Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 11169e35d4d8eSmrg# 111705a81ca49Smrg# This file is free software; the Free Software Foundation 111715a81ca49Smrg# gives unlimited permission to copy and/or distribute it, 111725a81ca49Smrg# with or without modifications, as long as this notice is preserved. 1117332b578d3Smrg 111745a81ca49Smrg# This macro actually does too much. Some checks are only needed if 111755a81ca49Smrg# your package does certain things. But this isn't really a big deal. 1117632b578d3Smrg 111775a81ca49Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 111785a81ca49Smrgm4_define([AC_PROG_CC], 111795a81ca49Smrgm4_defn([AC_PROG_CC]) 111805a81ca49Smrg[_AM_PROG_CC_C_O 111815a81ca49Smrg]) 1118232b578d3Smrg 111835a81ca49Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 111845a81ca49Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 111855a81ca49Smrg# ----------------------------------------------- 111865a81ca49Smrg# The call with PACKAGE and VERSION arguments is the old style 111875a81ca49Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 111885a81ca49Smrg# and VERSION should now be passed to AC_INIT and removed from 111895a81ca49Smrg# the call to AM_INIT_AUTOMAKE. 111905a81ca49Smrg# We support both call styles for the transition. After 111915a81ca49Smrg# the next Automake release, Autoconf can make the AC_INIT 111925a81ca49Smrg# arguments mandatory, and then we can depend on a new Autoconf 111935a81ca49Smrg# release and drop the old call support. 111945a81ca49SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 111955a81ca49Smrg[AC_PREREQ([2.65])dnl 111965a81ca49Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 111975a81ca49Smrgdnl the ones we care about. 111985a81ca49Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 111995a81ca49SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 112005a81ca49SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 112015a81ca49Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 112025a81ca49Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 112035a81ca49Smrg # is not polluted with repeated "-I." 112045a81ca49Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 112055a81ca49Smrg # test to see if srcdir already configured 112065a81ca49Smrg if test -f $srcdir/config.status; then 112075a81ca49Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 112085a81ca49Smrg fi 112092a51b5beSmrgfi 112102a51b5beSmrg 112115a81ca49Smrg# test whether we have cygpath 112125a81ca49Smrgif test -z "$CYGPATH_W"; then 112135a81ca49Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 112145a81ca49Smrg CYGPATH_W='cygpath -w' 112155a81ca49Smrg else 112165a81ca49Smrg CYGPATH_W=echo 112175a81ca49Smrg fi 11218e35d4d8eSmrgfi 112195a81ca49SmrgAC_SUBST([CYGPATH_W]) 112205a81ca49Smrg 112215a81ca49Smrg# Define the identity of the package. 112225a81ca49Smrgdnl Distinguish between old-style and new-style calls. 112235a81ca49Smrgm4_ifval([$2], 112245a81ca49Smrg[AC_DIAGNOSE([obsolete], 112255a81ca49Smrg [$0: two- and three-arguments forms are deprecated.]) 112265a81ca49Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 112275a81ca49Smrg AC_SUBST([PACKAGE], [$1])dnl 112285a81ca49Smrg AC_SUBST([VERSION], [$2])], 112295a81ca49Smrg[_AM_SET_OPTIONS([$1])dnl 112305a81ca49Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 112315a81ca49Smrgm4_if( 112325a81ca49Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 112335a81ca49Smrg [ok:ok],, 112345a81ca49Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 112355a81ca49Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 112365a81ca49Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 112375a81ca49Smrg 112385a81ca49Smrg_AM_IF_OPTION([no-define],, 112395a81ca49Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 112405a81ca49Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 112415a81ca49Smrg 112425a81ca49Smrg# Some tools Automake needs. 112435a81ca49SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 112445a81ca49SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 112455a81ca49SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 112465a81ca49SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 112475a81ca49SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 112485a81ca49SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 112495a81ca49SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 112505a81ca49SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 112515a81ca49SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 112525a81ca49SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 112535a81ca49Smrg# For better backward compatibility. To be removed once Automake 1.9.x 112545a81ca49Smrg# dies out for good. For more background, see: 112555a81ca49Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 112565a81ca49Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 112575a81ca49SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 112585a81ca49Smrg# We need awk for the "check" target (and possibly the TAP driver). The 112595a81ca49Smrg# system "awk" is bad on some platforms. 112605a81ca49SmrgAC_REQUIRE([AC_PROG_AWK])dnl 112615a81ca49SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 112625a81ca49SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 112635a81ca49Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 112645a81ca49Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 112655a81ca49Smrg [_AM_PROG_TAR([v7])])]) 112665a81ca49Smrg_AM_IF_OPTION([no-dependencies],, 112675a81ca49Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 112685a81ca49Smrg [_AM_DEPENDENCIES([CC])], 112695a81ca49Smrg [m4_define([AC_PROG_CC], 112705a81ca49Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 112715a81ca49SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 112725a81ca49Smrg [_AM_DEPENDENCIES([CXX])], 112735a81ca49Smrg [m4_define([AC_PROG_CXX], 112745a81ca49Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 112755a81ca49SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 112765a81ca49Smrg [_AM_DEPENDENCIES([OBJC])], 112775a81ca49Smrg [m4_define([AC_PROG_OBJC], 112785a81ca49Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 112795a81ca49SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 112805a81ca49Smrg [_AM_DEPENDENCIES([OBJCXX])], 112815a81ca49Smrg [m4_define([AC_PROG_OBJCXX], 112825a81ca49Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 112835a81ca49Smrg]) 112845a81ca49SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 112855a81ca49Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 112865a81ca49Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 112875a81ca49Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 112885a81ca49SmrgAC_CONFIG_COMMANDS_PRE(dnl 112895a81ca49Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 112905a81ca49Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 112912a51b5beSmrg 112925a81ca49Smrg# POSIX will say in a future version that running "rm -f" with no argument 112935a81ca49Smrg# is OK; and we want to be able to make that assumption in our Makefile 112945a81ca49Smrg# recipes. So use an aggressive probe to check that the usage we want is 112955a81ca49Smrg# actually supported "in the wild" to an acceptable degree. 112965a81ca49Smrg# See automake bug#10828. 112975a81ca49Smrg# To make any issue more visible, cause the running configure to be aborted 112985a81ca49Smrg# by default if the 'rm' program in use doesn't match our expectations; the 112995a81ca49Smrg# user can still override this though. 113005a81ca49Smrgif rm -f && rm -fr && rm -rf; then : OK; else 113015a81ca49Smrg cat >&2 <<'END' 113025a81ca49SmrgOops! 113035a81ca49Smrg 113045a81ca49SmrgYour 'rm' program seems unable to run without file operands specified 113055a81ca49Smrgon the command line, even when the '-f' option is present. This is contrary 113065a81ca49Smrgto the behaviour of most rm programs out there, and not conforming with 113075a81ca49Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 113085a81ca49Smrg 113095a81ca49SmrgPlease tell bug-automake@gnu.org about your system, including the value 113105a81ca49Smrgof your $PATH and any error possibly output before this message. This 113115a81ca49Smrgcan help us improve future automake versions. 1131232b578d3Smrg 113135a81ca49SmrgEND 113145a81ca49Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 113155a81ca49Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 113165a81ca49Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 113175a81ca49Smrg echo >&2 113185a81ca49Smrg else 113195a81ca49Smrg cat >&2 <<'END' 113205a81ca49SmrgAborting the configuration process, to ensure you take notice of the issue. 1132132b578d3Smrg 113225a81ca49SmrgYou can download and install GNU coreutils to get an 'rm' implementation 113235a81ca49Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 1132432b578d3Smrg 113255a81ca49SmrgIf you want to complete the configuration process using your problematic 113265a81ca49Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 113275a81ca49Smrgto "yes", and re-run configure. 1132832b578d3Smrg 113295a81ca49SmrgEND 113305a81ca49Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 113315a81ca49Smrg fi 11332e35d4d8eSmrgfi 113335a81ca49Smrgdnl The trailing newline in this macro's definition is deliberate, for 113345a81ca49Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 113355a81ca49Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 113365a81ca49Smrg]) 1133732b578d3Smrg 113385a81ca49Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 113395a81ca49Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 113405a81ca49Smrgdnl mangled by Autoconf and run in a shell conditional statement. 113415a81ca49Smrgm4_define([_AC_COMPILER_EXEEXT], 113425a81ca49Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 1134332b578d3Smrg 113445a81ca49Smrg# When config.status generates a header, we must update the stamp-h file. 113455a81ca49Smrg# This file resides in the same directory as the config header 113465a81ca49Smrg# that is generated. The stamp files are numbered to have different names. 1134732b578d3Smrg 113485a81ca49Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 113495a81ca49Smrg# loop where config.status creates the headers, so we can generate 113505a81ca49Smrg# our stamp files there. 113515a81ca49SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 113525a81ca49Smrg[# Compute $1's index in $config_headers. 113535a81ca49Smrg_am_arg=$1 113545a81ca49Smrg_am_stamp_count=1 113555a81ca49Smrgfor _am_header in $config_headers :; do 113565a81ca49Smrg case $_am_header in 113575a81ca49Smrg $_am_arg | $_am_arg:* ) 113585a81ca49Smrg break ;; 113595a81ca49Smrg * ) 113605a81ca49Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 113615a81ca49Smrg esac 113625a81ca49Smrgdone 113635a81ca49Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 1136432b578d3Smrg 113655a81ca49Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11366e35d4d8eSmrg# 113675a81ca49Smrg# This file is free software; the Free Software Foundation 113685a81ca49Smrg# gives unlimited permission to copy and/or distribute it, 113695a81ca49Smrg# with or without modifications, as long as this notice is preserved. 11370e35d4d8eSmrg 113715a81ca49Smrg# AM_PROG_INSTALL_SH 113725a81ca49Smrg# ------------------ 113735a81ca49Smrg# Define $install_sh. 113745a81ca49SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 113755a81ca49Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 113765a81ca49Smrgif test x"${install_sh+set}" != xset; then 113775a81ca49Smrg case $am_aux_dir in 113785a81ca49Smrg *\ * | *\ *) 113795a81ca49Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 113805a81ca49Smrg *) 113815a81ca49Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 113825a81ca49Smrg esac 11383e35d4d8eSmrgfi 113845a81ca49SmrgAC_SUBST([install_sh])]) 11385d31dbc53Smrg 113865a81ca49Smrg# Copyright (C) 2003-2014 Free Software Foundation, Inc. 113875a81ca49Smrg# 113885a81ca49Smrg# This file is free software; the Free Software Foundation 113895a81ca49Smrg# gives unlimited permission to copy and/or distribute it, 113905a81ca49Smrg# with or without modifications, as long as this notice is preserved. 113915a81ca49Smrg 113925a81ca49Smrg# Check whether the underlying file-system supports filenames 113935a81ca49Smrg# with a leading dot. For instance MS-DOS doesn't. 113945a81ca49SmrgAC_DEFUN([AM_SET_LEADING_DOT], 113955a81ca49Smrg[rm -rf .tst 2>/dev/null 113965a81ca49Smrgmkdir .tst 2>/dev/null 113975a81ca49Smrgif test -d .tst; then 113985a81ca49Smrg am__leading_dot=. 113995a81ca49Smrgelse 114005a81ca49Smrg am__leading_dot=_ 11401e35d4d8eSmrgfi 114025a81ca49Smrgrmdir .tst 2>/dev/null 114035a81ca49SmrgAC_SUBST([am__leading_dot])]) 11404d31dbc53Smrg 114055a81ca49Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 114065a81ca49Smrg# From Jim Meyering 11407e35d4d8eSmrg 114085a81ca49Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 114095a81ca49Smrg# 114105a81ca49Smrg# This file is free software; the Free Software Foundation 114115a81ca49Smrg# gives unlimited permission to copy and/or distribute it, 114125a81ca49Smrg# with or without modifications, as long as this notice is preserved. 11413e35d4d8eSmrg 114145a81ca49Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 114155a81ca49Smrg# ---------------------------------- 114165a81ca49Smrg# Control maintainer-specific portions of Makefiles. 114175a81ca49Smrg# Default is to disable them, unless 'enable' is passed literally. 114185a81ca49Smrg# For symmetry, 'disable' may be passed as well. Anyway, the user 114195a81ca49Smrg# can override the default with the --enable/--disable switch. 114205a81ca49SmrgAC_DEFUN([AM_MAINTAINER_MODE], 114215a81ca49Smrg[m4_case(m4_default([$1], [disable]), 114225a81ca49Smrg [enable], [m4_define([am_maintainer_other], [disable])], 114235a81ca49Smrg [disable], [m4_define([am_maintainer_other], [enable])], 114245a81ca49Smrg [m4_define([am_maintainer_other], [enable]) 114255a81ca49Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 114265a81ca49SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 114275a81ca49Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 114285a81ca49Smrg AC_ARG_ENABLE([maintainer-mode], 114295a81ca49Smrg [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 114305a81ca49Smrg am_maintainer_other[ make rules and dependencies not useful 114315a81ca49Smrg (and sometimes confusing) to the casual installer])], 114325a81ca49Smrg [USE_MAINTAINER_MODE=$enableval], 114335a81ca49Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 114345a81ca49Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 114355a81ca49Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 114365a81ca49Smrg MAINT=$MAINTAINER_MODE_TRUE 114375a81ca49Smrg AC_SUBST([MAINT])dnl 114385a81ca49Smrg] 114395a81ca49Smrg) 11440e35d4d8eSmrg 114415a81ca49Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 11442e35d4d8eSmrg 114435a81ca49Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 114445a81ca49Smrg# 114455a81ca49Smrg# This file is free software; the Free Software Foundation 114465a81ca49Smrg# gives unlimited permission to copy and/or distribute it, 114475a81ca49Smrg# with or without modifications, as long as this notice is preserved. 11448e35d4d8eSmrg 114495a81ca49Smrg# AM_MAKE_INCLUDE() 114505a81ca49Smrg# ----------------- 114515a81ca49Smrg# Check to see how make treats includes. 114525a81ca49SmrgAC_DEFUN([AM_MAKE_INCLUDE], 114535a81ca49Smrg[am_make=${MAKE-make} 114545a81ca49Smrgcat > confinc << 'END' 114555a81ca49Smrgam__doit: 114565a81ca49Smrg @echo this is the am__doit target 114575a81ca49Smrg.PHONY: am__doit 114585a81ca49SmrgEND 114595a81ca49Smrg# If we don't find an include directive, just comment out the code. 114605a81ca49SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 114615a81ca49Smrgam__include="#" 114625a81ca49Smrgam__quote= 114635a81ca49Smrg_am_result=none 114645a81ca49Smrg# First try GNU make style include. 114655a81ca49Smrgecho "include confinc" > confmf 114665a81ca49Smrg# Ignore all kinds of additional output from 'make'. 114675a81ca49Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 114685a81ca49Smrg*the\ am__doit\ target*) 114695a81ca49Smrg am__include=include 114705a81ca49Smrg am__quote= 114715a81ca49Smrg _am_result=GNU 114725a81ca49Smrg ;; 114735a81ca49Smrgesac 114745a81ca49Smrg# Now try BSD make style include. 114755a81ca49Smrgif test "$am__include" = "#"; then 114765a81ca49Smrg echo '.include "confinc"' > confmf 114775a81ca49Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 114785a81ca49Smrg *the\ am__doit\ target*) 114795a81ca49Smrg am__include=.include 114805a81ca49Smrg am__quote="\"" 114815a81ca49Smrg _am_result=BSD 114825a81ca49Smrg ;; 114835a81ca49Smrg esac 114845a81ca49Smrgfi 114855a81ca49SmrgAC_SUBST([am__include]) 114865a81ca49SmrgAC_SUBST([am__quote]) 114875a81ca49SmrgAC_MSG_RESULT([$_am_result]) 114885a81ca49Smrgrm -f confinc confmf 11489e35d4d8eSmrg]) 11490e35d4d8eSmrg 114915a81ca49Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 114925a81ca49Smrg 114935a81ca49Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 11494e35d4d8eSmrg# 114955a81ca49Smrg# This file is free software; the Free Software Foundation 114965a81ca49Smrg# gives unlimited permission to copy and/or distribute it, 114975a81ca49Smrg# with or without modifications, as long as this notice is preserved. 11498e35d4d8eSmrg 114995a81ca49Smrg# AM_MISSING_PROG(NAME, PROGRAM) 115005a81ca49Smrg# ------------------------------ 115015a81ca49SmrgAC_DEFUN([AM_MISSING_PROG], 115025a81ca49Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 115035a81ca49Smrg$1=${$1-"${am_missing_run}$2"} 115045a81ca49SmrgAC_SUBST($1)]) 11505e35d4d8eSmrg 115065a81ca49Smrg# AM_MISSING_HAS_RUN 115075a81ca49Smrg# ------------------ 115085a81ca49Smrg# Define MISSING if not defined so far and test if it is modern enough. 115095a81ca49Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 115105a81ca49SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 115115a81ca49Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 115125a81ca49SmrgAC_REQUIRE_AUX_FILE([missing])dnl 115135a81ca49Smrgif test x"${MISSING+set}" != xset; then 115145a81ca49Smrg case $am_aux_dir in 115155a81ca49Smrg *\ * | *\ *) 115165a81ca49Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 115175a81ca49Smrg *) 115185a81ca49Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 115195a81ca49Smrg esac 115205a81ca49Smrgfi 115215a81ca49Smrg# Use eval to expand $SHELL 115225a81ca49Smrgif eval "$MISSING --is-lightweight"; then 115235a81ca49Smrg am_missing_run="$MISSING " 115242a51b5beSmrgelse 115255a81ca49Smrg am_missing_run= 115265a81ca49Smrg AC_MSG_WARN(['missing' script is too old or missing]) 115272a51b5beSmrgfi 115285a81ca49Smrg]) 115292a51b5beSmrg 115305a81ca49Smrg# Helper functions for option handling. -*- Autoconf -*- 11531e35d4d8eSmrg 115325a81ca49Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 115335a81ca49Smrg# 115345a81ca49Smrg# This file is free software; the Free Software Foundation 115355a81ca49Smrg# gives unlimited permission to copy and/or distribute it, 115365a81ca49Smrg# with or without modifications, as long as this notice is preserved. 115371b12faf6Smrg 115385a81ca49Smrg# _AM_MANGLE_OPTION(NAME) 115395a81ca49Smrg# ----------------------- 115405a81ca49SmrgAC_DEFUN([_AM_MANGLE_OPTION], 115415a81ca49Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 11542e35d4d8eSmrg 115435a81ca49Smrg# _AM_SET_OPTION(NAME) 115445a81ca49Smrg# -------------------- 115455a81ca49Smrg# Set option NAME. Presently that only means defining a flag for this option. 115465a81ca49SmrgAC_DEFUN([_AM_SET_OPTION], 115475a81ca49Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 11548e35d4d8eSmrg 115495a81ca49Smrg# _AM_SET_OPTIONS(OPTIONS) 115505a81ca49Smrg# ------------------------ 115515a81ca49Smrg# OPTIONS is a space-separated list of Automake options. 115525a81ca49SmrgAC_DEFUN([_AM_SET_OPTIONS], 115535a81ca49Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 11554e35d4d8eSmrg 115555a81ca49Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 115565a81ca49Smrg# ------------------------------------------- 115575a81ca49Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 115585a81ca49SmrgAC_DEFUN([_AM_IF_OPTION], 115595a81ca49Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 115601b12faf6Smrg 115615a81ca49Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 115625a81ca49Smrg# 115635a81ca49Smrg# This file is free software; the Free Software Foundation 115645a81ca49Smrg# gives unlimited permission to copy and/or distribute it, 115655a81ca49Smrg# with or without modifications, as long as this notice is preserved. 1156632b578d3Smrg 115675a81ca49Smrg# _AM_PROG_CC_C_O 11568e35d4d8eSmrg# --------------- 115695a81ca49Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 115705a81ca49Smrg# to automatically call this. 115715a81ca49SmrgAC_DEFUN([_AM_PROG_CC_C_O], 115725a81ca49Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 115735a81ca49SmrgAC_REQUIRE_AUX_FILE([compile])dnl 115745a81ca49SmrgAC_LANG_PUSH([C])dnl 115755a81ca49SmrgAC_CACHE_CHECK( 115765a81ca49Smrg [whether $CC understands -c and -o together], 115775a81ca49Smrg [am_cv_prog_cc_c_o], 115785a81ca49Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 115795a81ca49Smrg # Make sure it works both with $CC and with simple cc. 115805a81ca49Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 115815a81ca49Smrg # compilers refuse to overwrite an existing .o file with -o, 115825a81ca49Smrg # though they will create one. 115835a81ca49Smrg am_cv_prog_cc_c_o=yes 115845a81ca49Smrg for am_i in 1 2; do 115855a81ca49Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 115865a81ca49Smrg && test -f conftest2.$ac_objext; then 115875a81ca49Smrg : OK 115885a81ca49Smrg else 115895a81ca49Smrg am_cv_prog_cc_c_o=no 115905a81ca49Smrg break 115915a81ca49Smrg fi 115925a81ca49Smrg done 115935a81ca49Smrg rm -f core conftest* 115945a81ca49Smrg unset am_i]) 115955a81ca49Smrgif test "$am_cv_prog_cc_c_o" != yes; then 115965a81ca49Smrg # Losing compiler, so override with the script. 115975a81ca49Smrg # FIXME: It is wrong to rewrite CC. 115985a81ca49Smrg # But if we don't then we get into trouble of one sort or another. 115995a81ca49Smrg # A longer-term fix would be to have automake use am__CC in this case, 116005a81ca49Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 116015a81ca49Smrg CC="$am_aux_dir/compile $CC" 116025a81ca49Smrgfi 116035a81ca49SmrgAC_LANG_POP([C])]) 1160432b578d3Smrg 116055a81ca49Smrg# For backward compatibility. 116065a81ca49SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 116075a81ca49Smrg 116085a81ca49Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11609d31dbc53Smrg# 116105a81ca49Smrg# This file is free software; the Free Software Foundation 116115a81ca49Smrg# gives unlimited permission to copy and/or distribute it, 116125a81ca49Smrg# with or without modifications, as long as this notice is preserved. 116135a81ca49Smrg 116145a81ca49Smrg# AM_RUN_LOG(COMMAND) 116155a81ca49Smrg# ------------------- 116165a81ca49Smrg# Run COMMAND, save the exit status in ac_status, and log it. 116175a81ca49Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 116185a81ca49SmrgAC_DEFUN([AM_RUN_LOG], 116195a81ca49Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 116205a81ca49Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 116215a81ca49Smrg ac_status=$? 116225a81ca49Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 116235a81ca49Smrg (exit $ac_status); }]) 116245a81ca49Smrg 116255a81ca49Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 116265a81ca49Smrg 116275a81ca49Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 11628e35d4d8eSmrg# 116295a81ca49Smrg# This file is free software; the Free Software Foundation 116305a81ca49Smrg# gives unlimited permission to copy and/or distribute it, 116315a81ca49Smrg# with or without modifications, as long as this notice is preserved. 1163232b578d3Smrg 116335a81ca49Smrg# AM_SANITY_CHECK 116345a81ca49Smrg# --------------- 116355a81ca49SmrgAC_DEFUN([AM_SANITY_CHECK], 116365a81ca49Smrg[AC_MSG_CHECKING([whether build environment is sane]) 116375a81ca49Smrg# Reject unsafe characters in $srcdir or the absolute working directory 116385a81ca49Smrg# name. Accept space and tab only in the latter. 116395a81ca49Smrgam_lf=' 116405a81ca49Smrg' 116415a81ca49Smrgcase `pwd` in 116425a81ca49Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 116435a81ca49Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 116445a81ca49Smrgesac 116455a81ca49Smrgcase $srcdir in 116465a81ca49Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 116475a81ca49Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 116485a81ca49Smrgesac 116495a81ca49Smrg 116505a81ca49Smrg# Do 'set' in a subshell so we don't clobber the current shell's 116515a81ca49Smrg# arguments. Must try -L first in case configure is actually a 116525a81ca49Smrg# symlink; some systems play weird games with the mod time of symlinks 116535a81ca49Smrg# (eg FreeBSD returns the mod time of the symlink's containing 116545a81ca49Smrg# directory). 116555a81ca49Smrgif ( 116565a81ca49Smrg am_has_slept=no 116575a81ca49Smrg for am_try in 1 2; do 116585a81ca49Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 116595a81ca49Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 116605a81ca49Smrg if test "$[*]" = "X"; then 116615a81ca49Smrg # -L didn't work. 116625a81ca49Smrg set X `ls -t "$srcdir/configure" conftest.file` 116635a81ca49Smrg fi 116645a81ca49Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 116655a81ca49Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 116665a81ca49Smrg 116675a81ca49Smrg # If neither matched, then we have a broken ls. This can happen 116685a81ca49Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 116695a81ca49Smrg # broken ls alias from the environment. This has actually 116705a81ca49Smrg # happened. Such a system could not be considered "sane". 116715a81ca49Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 116725a81ca49Smrg alias in your environment]) 116735a81ca49Smrg fi 116745a81ca49Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 116755a81ca49Smrg break 116765a81ca49Smrg fi 116775a81ca49Smrg # Just in case. 116785a81ca49Smrg sleep 1 116795a81ca49Smrg am_has_slept=yes 116805a81ca49Smrg done 116815a81ca49Smrg test "$[2]" = conftest.file 116825a81ca49Smrg ) 116835a81ca49Smrgthen 116845a81ca49Smrg # Ok. 116855a81ca49Smrg : 116865a81ca49Smrgelse 116875a81ca49Smrg AC_MSG_ERROR([newly created file is older than distributed files! 116885a81ca49SmrgCheck your system clock]) 116895a81ca49Smrgfi 116905a81ca49SmrgAC_MSG_RESULT([yes]) 116915a81ca49Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 116925a81ca49Smrg# generated files are strictly newer. 116935a81ca49Smrgam_sleep_pid= 116945a81ca49Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 116955a81ca49Smrg ( sleep 1 ) & 116965a81ca49Smrg am_sleep_pid=$! 116975a81ca49Smrgfi 116985a81ca49SmrgAC_CONFIG_COMMANDS_PRE( 116995a81ca49Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 117005a81ca49Smrg if test -n "$am_sleep_pid"; then 117015a81ca49Smrg # Hide warnings about reused PIDs. 117025a81ca49Smrg wait $am_sleep_pid 2>/dev/null 117035a81ca49Smrg fi 117045a81ca49Smrg AC_MSG_RESULT([done])]) 117055a81ca49Smrgrm -f conftest.file 117065a81ca49Smrg]) 1170732b578d3Smrg 117085a81ca49Smrg# Copyright (C) 2009-2014 Free Software Foundation, Inc. 117095a81ca49Smrg# 117105a81ca49Smrg# This file is free software; the Free Software Foundation 117115a81ca49Smrg# gives unlimited permission to copy and/or distribute it, 117125a81ca49Smrg# with or without modifications, as long as this notice is preserved. 1171332b578d3Smrg 117145a81ca49Smrg# AM_SILENT_RULES([DEFAULT]) 117155a81ca49Smrg# -------------------------- 117165a81ca49Smrg# Enable less verbose build rules; with the default set to DEFAULT 117175a81ca49Smrg# ("yes" being less verbose, "no" or empty being verbose). 117185a81ca49SmrgAC_DEFUN([AM_SILENT_RULES], 117195a81ca49Smrg[AC_ARG_ENABLE([silent-rules], [dnl 117205a81ca49SmrgAS_HELP_STRING( 117215a81ca49Smrg [--enable-silent-rules], 117225a81ca49Smrg [less verbose build output (undo: "make V=1")]) 117235a81ca49SmrgAS_HELP_STRING( 117245a81ca49Smrg [--disable-silent-rules], 117255a81ca49Smrg [verbose build output (undo: "make V=0")])dnl 117265a81ca49Smrg]) 117275a81ca49Smrgcase $enable_silent_rules in @%:@ ((( 117285a81ca49Smrg yes) AM_DEFAULT_VERBOSITY=0;; 117295a81ca49Smrg no) AM_DEFAULT_VERBOSITY=1;; 117305a81ca49Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 117315a81ca49Smrgesac 117325a81ca49Smrgdnl 117335a81ca49Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 117345a81ca49Smrgdnl do not support nested variable expansions. 117355a81ca49Smrgdnl See automake bug#9928 and bug#10237. 117365a81ca49Smrgam_make=${MAKE-make} 117375a81ca49SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 117385a81ca49Smrg [am_cv_make_support_nested_variables], 117395a81ca49Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 117405a81ca49SmrgBAR0=false 117415a81ca49SmrgBAR1=true 117425a81ca49SmrgV=1 117435a81ca49Smrgam__doit: 117445a81ca49Smrg @$(TRUE) 117455a81ca49Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 117465a81ca49Smrg am_cv_make_support_nested_variables=yes 117475a81ca49Smrgelse 117485a81ca49Smrg am_cv_make_support_nested_variables=no 117495a81ca49Smrgfi]) 117505a81ca49Smrgif test $am_cv_make_support_nested_variables = yes; then 117515a81ca49Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 117525a81ca49Smrg AM_V='$(V)' 117535a81ca49Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 117545a81ca49Smrgelse 117555a81ca49Smrg AM_V=$AM_DEFAULT_VERBOSITY 117565a81ca49Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 117575a81ca49Smrgfi 117585a81ca49SmrgAC_SUBST([AM_V])dnl 117595a81ca49SmrgAM_SUBST_NOTMAKE([AM_V])dnl 117605a81ca49SmrgAC_SUBST([AM_DEFAULT_V])dnl 117615a81ca49SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 117625a81ca49SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 117635a81ca49SmrgAM_BACKSLASH='\' 117645a81ca49SmrgAC_SUBST([AM_BACKSLASH])dnl 117655a81ca49Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 117665a81ca49Smrg]) 117672a51b5beSmrg 117685a81ca49Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 117695a81ca49Smrg# 117705a81ca49Smrg# This file is free software; the Free Software Foundation 117715a81ca49Smrg# gives unlimited permission to copy and/or distribute it, 117725a81ca49Smrg# with or without modifications, as long as this notice is preserved. 117732a51b5beSmrg 117745a81ca49Smrg# AM_PROG_INSTALL_STRIP 117755a81ca49Smrg# --------------------- 117765a81ca49Smrg# One issue with vendor 'install' (even GNU) is that you can't 117775a81ca49Smrg# specify the program used to strip binaries. This is especially 117785a81ca49Smrg# annoying in cross-compiling environments, where the build's strip 117795a81ca49Smrg# is unlikely to handle the host's binaries. 117805a81ca49Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 117815a81ca49Smrg# always use install-sh in "make install-strip", and initialize 117825a81ca49Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 117835a81ca49SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 117845a81ca49Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 117855a81ca49Smrg# Installed binaries are usually stripped using 'strip' when the user 117865a81ca49Smrg# run "make install-strip". However 'strip' might not be the right 117875a81ca49Smrg# tool to use in cross-compilation environments, therefore Automake 117885a81ca49Smrg# will honor the 'STRIP' environment variable to overrule this program. 117895a81ca49Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 117905a81ca49Smrgif test "$cross_compiling" != no; then 117915a81ca49Smrg AC_CHECK_TOOL([STRIP], [strip], :) 11792e35d4d8eSmrgfi 117935a81ca49SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 117945a81ca49SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 11795e35d4d8eSmrg 117965a81ca49Smrg# Copyright (C) 2006-2014 Free Software Foundation, Inc. 1179732b578d3Smrg# 117985a81ca49Smrg# This file is free software; the Free Software Foundation 117995a81ca49Smrg# gives unlimited permission to copy and/or distribute it, 118005a81ca49Smrg# with or without modifications, as long as this notice is preserved. 118012a51b5beSmrg 118025a81ca49Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 118035a81ca49Smrg# --------------------------- 118045a81ca49Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 118055a81ca49Smrg# This macro is traced by Automake. 118065a81ca49SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 118075a81ca49Smrg 118085a81ca49Smrg# AM_SUBST_NOTMAKE(VARIABLE) 118095a81ca49Smrg# -------------------------- 118105a81ca49Smrg# Public sister of _AM_SUBST_NOTMAKE. 118115a81ca49SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 118125a81ca49Smrg 118135a81ca49Smrg# Check how to create a tarball. -*- Autoconf -*- 118145a81ca49Smrg 118155a81ca49Smrg# Copyright (C) 2004-2014 Free Software Foundation, Inc. 11816e35d4d8eSmrg# 118175a81ca49Smrg# This file is free software; the Free Software Foundation 118185a81ca49Smrg# gives unlimited permission to copy and/or distribute it, 118195a81ca49Smrg# with or without modifications, as long as this notice is preserved. 118202a51b5beSmrg 118215a81ca49Smrg# _AM_PROG_TAR(FORMAT) 118222a51b5beSmrg# -------------------- 118235a81ca49Smrg# Check how to create a tarball in format FORMAT. 118245a81ca49Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 11825d31dbc53Smrg# 118265a81ca49Smrg# Substitute a variable $(am__tar) that is a command 118275a81ca49Smrg# writing to stdout a FORMAT-tarball containing the directory 118285a81ca49Smrg# $tardir. 118295a81ca49Smrg# tardir=directory && $(am__tar) > result.tar 11830d31dbc53Smrg# 118315a81ca49Smrg# Substitute a variable $(am__untar) that extract such 118325a81ca49Smrg# a tarball read from stdin. 118335a81ca49Smrg# $(am__untar) < result.tar 11834e35d4d8eSmrg# 118355a81ca49SmrgAC_DEFUN([_AM_PROG_TAR], 118365a81ca49Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 118375a81ca49Smrg# in the wild :-( We should find a proper way to deprecate it ... 118385a81ca49SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1183932b578d3Smrg 118405a81ca49Smrg# We'll loop over all known methods to create a tar archive until one works. 118415a81ca49Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1184232b578d3Smrg 118435a81ca49Smrgm4_if([$1], [v7], 118445a81ca49Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 118455a81ca49Smrg 118465a81ca49Smrg [m4_case([$1], 118475a81ca49Smrg [ustar], 118485a81ca49Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 118495a81ca49Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 118505a81ca49Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 118515a81ca49Smrg # and bug#13588). 118525a81ca49Smrg am_max_uid=2097151 # 2^21 - 1 118535a81ca49Smrg am_max_gid=$am_max_uid 118545a81ca49Smrg # The $UID and $GID variables are not portable, so we need to resort 118555a81ca49Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 118565a81ca49Smrg # below are definitely unexpected, so allow the users to see them 118575a81ca49Smrg # (that is, avoid stderr redirection). 118585a81ca49Smrg am_uid=`id -u || echo unknown` 118595a81ca49Smrg am_gid=`id -g || echo unknown` 118605a81ca49Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 118615a81ca49Smrg if test $am_uid -le $am_max_uid; then 118625a81ca49Smrg AC_MSG_RESULT([yes]) 118635a81ca49Smrg else 118645a81ca49Smrg AC_MSG_RESULT([no]) 118655a81ca49Smrg _am_tools=none 118665a81ca49Smrg fi 118675a81ca49Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 118685a81ca49Smrg if test $am_gid -le $am_max_gid; then 118695a81ca49Smrg AC_MSG_RESULT([yes]) 118705a81ca49Smrg else 118715a81ca49Smrg AC_MSG_RESULT([no]) 118725a81ca49Smrg _am_tools=none 118735a81ca49Smrg fi], 1187432b578d3Smrg 118755a81ca49Smrg [pax], 118765a81ca49Smrg [], 118775a81ca49Smrg 118785a81ca49Smrg [m4_fatal([Unknown tar format])]) 118795a81ca49Smrg 118805a81ca49Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 118815a81ca49Smrg 118825a81ca49Smrg # Go ahead even if we have the value already cached. We do so because we 118835a81ca49Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 118845a81ca49Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 118855a81ca49Smrg 118865a81ca49Smrg for _am_tool in $_am_tools; do 118875a81ca49Smrg case $_am_tool in 118885a81ca49Smrg gnutar) 118895a81ca49Smrg for _am_tar in tar gnutar gtar; do 118905a81ca49Smrg AM_RUN_LOG([$_am_tar --version]) && break 118915a81ca49Smrg done 118925a81ca49Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 118935a81ca49Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 118945a81ca49Smrg am__untar="$_am_tar -xf -" 118955a81ca49Smrg ;; 118965a81ca49Smrg plaintar) 118975a81ca49Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 118985a81ca49Smrg # ustar tarball either. 118995a81ca49Smrg (tar --version) >/dev/null 2>&1 && continue 119005a81ca49Smrg am__tar='tar chf - "$$tardir"' 119015a81ca49Smrg am__tar_='tar chf - "$tardir"' 119025a81ca49Smrg am__untar='tar xf -' 119035a81ca49Smrg ;; 119045a81ca49Smrg pax) 119055a81ca49Smrg am__tar='pax -L -x $1 -w "$$tardir"' 119065a81ca49Smrg am__tar_='pax -L -x $1 -w "$tardir"' 119075a81ca49Smrg am__untar='pax -r' 119085a81ca49Smrg ;; 119095a81ca49Smrg cpio) 119105a81ca49Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 119115a81ca49Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 119125a81ca49Smrg am__untar='cpio -i -H $1 -d' 119135a81ca49Smrg ;; 119145a81ca49Smrg none) 119155a81ca49Smrg am__tar=false 119165a81ca49Smrg am__tar_=false 119175a81ca49Smrg am__untar=false 119185a81ca49Smrg ;; 119195a81ca49Smrg esac 119205a81ca49Smrg 119215a81ca49Smrg # If the value was cached, stop now. We just wanted to have am__tar 119225a81ca49Smrg # and am__untar set. 119235a81ca49Smrg test -n "${am_cv_prog_tar_$1}" && break 119245a81ca49Smrg 119255a81ca49Smrg # tar/untar a dummy directory, and stop if the command works. 119265a81ca49Smrg rm -rf conftest.dir 119275a81ca49Smrg mkdir conftest.dir 119285a81ca49Smrg echo GrepMe > conftest.dir/file 119295a81ca49Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 119305a81ca49Smrg rm -rf conftest.dir 119315a81ca49Smrg if test -s conftest.tar; then 119325a81ca49Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 119335a81ca49Smrg AM_RUN_LOG([cat conftest.dir/file]) 119345a81ca49Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 119355a81ca49Smrg fi 119365a81ca49Smrg done 119375a81ca49Smrg rm -rf conftest.dir 119385a81ca49Smrg 119395a81ca49Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 119405a81ca49Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 119415a81ca49Smrg 119425a81ca49SmrgAC_SUBST([am__tar]) 119435a81ca49SmrgAC_SUBST([am__untar]) 119445a81ca49Smrg]) # _AM_PROG_TAR 1194532b578d3Smrg 11946