aclocal.m4 revision b0a0317a
1b0a0317aSmrg# generated automatically by aclocal 1.16.2 -*- Autoconf -*- 23e6c936aSmrg 3b0a0317aSmrg# Copyright (C) 1996-2020 Free Software Foundation, Inc. 44456fccdSmrg 54456fccdSmrg# This file is free software; the Free Software Foundation 64456fccdSmrg# gives unlimited permission to copy and/or distribute it, 74456fccdSmrg# with or without modifications, as long as this notice is preserved. 84456fccdSmrg 94456fccdSmrg# This program is distributed in the hope that it will be useful, 104456fccdSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 114456fccdSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 124456fccdSmrg# PARTICULAR PURPOSE. 134456fccdSmrg 143e6c936aSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 1542d69509Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1642d69509Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 170f1ac3bcSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 180f1ac3bcSmrg[m4_warning([this file was generated for autoconf 2.69. 1942d69509SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 2042d69509SmrgIf you have problems, you may need to regenerate the build system entirely. 213e6c936aSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 224456fccdSmrg 230f1ac3bcSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2442d69509Smrg# 25b0a0317aSmrg# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 260f1ac3bcSmrg# Written by Gordon Matzigkeit, 1996 2742d69509Smrg# 280f1ac3bcSmrg# This file is free software; the Free Software Foundation gives 290f1ac3bcSmrg# unlimited permission to copy and/or distribute it, with or without 300f1ac3bcSmrg# modifications, as long as this notice is preserved. 314456fccdSmrg 320f1ac3bcSmrgm4_define([_LT_COPYING], [dnl 33b0a0317aSmrg# Copyright (C) 2014 Free Software Foundation, Inc. 34b0a0317aSmrg# This is free software; see the source for copying conditions. There is NO 35b0a0317aSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 36b0a0317aSmrg 37b0a0317aSmrg# GNU Libtool is free software; you can redistribute it and/or modify 38b0a0317aSmrg# it under the terms of the GNU General Public License as published by 39b0a0317aSmrg# the Free Software Foundation; either version 2 of of the License, or 40b0a0317aSmrg# (at your option) any later version. 4142d69509Smrg# 42b0a0317aSmrg# As a special exception to the GNU General Public License, if you 43b0a0317aSmrg# distribute this file as part of a program or library that is built 44b0a0317aSmrg# using GNU Libtool, you may include this file under the same 45b0a0317aSmrg# distribution terms that you use for the rest of that program. 4642d69509Smrg# 47b0a0317aSmrg# GNU Libtool is distributed in the hope that it will be useful, but 48b0a0317aSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 490f1ac3bcSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 500f1ac3bcSmrg# GNU General Public License for more details. 5142d69509Smrg# 520f1ac3bcSmrg# You should have received a copy of the GNU General Public License 53b0a0317aSmrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 54ff63a143Smrg]) 554456fccdSmrg 56b0a0317aSmrg# serial 58 LT_INIT 574456fccdSmrg 584456fccdSmrg 590f1ac3bcSmrg# LT_PREREQ(VERSION) 600f1ac3bcSmrg# ------------------ 610f1ac3bcSmrg# Complain and exit if this libtool version is less that VERSION. 620f1ac3bcSmrgm4_defun([LT_PREREQ], 630f1ac3bcSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 640f1ac3bcSmrg [m4_default([$3], 650f1ac3bcSmrg [m4_fatal([Libtool version $1 or higher is required], 660f1ac3bcSmrg 63)])], 670f1ac3bcSmrg [$2])]) 684456fccdSmrg 694456fccdSmrg 700f1ac3bcSmrg# _LT_CHECK_BUILDDIR 710f1ac3bcSmrg# ------------------ 720f1ac3bcSmrg# Complain if the absolute build directory name contains unusual characters 730f1ac3bcSmrgm4_defun([_LT_CHECK_BUILDDIR], 740f1ac3bcSmrg[case `pwd` in 750f1ac3bcSmrg *\ * | *\ *) 760f1ac3bcSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 770f1ac3bcSmrgesac 780f1ac3bcSmrg]) 794456fccdSmrg 804456fccdSmrg 810f1ac3bcSmrg# LT_INIT([OPTIONS]) 820f1ac3bcSmrg# ------------------ 830f1ac3bcSmrgAC_DEFUN([LT_INIT], 84b0a0317aSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 850f1ac3bcSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 860f1ac3bcSmrgAC_BEFORE([$0], [LT_LANG])dnl 870f1ac3bcSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 880f1ac3bcSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 890f1ac3bcSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 904456fccdSmrg 910f1ac3bcSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 920f1ac3bcSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 930f1ac3bcSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 940f1ac3bcSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 950f1ac3bcSmrgdnl unless we require an AC_DEFUNed macro: 960f1ac3bcSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 970f1ac3bcSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 980f1ac3bcSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 990f1ac3bcSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1000f1ac3bcSmrgm4_require([_LT_PROG_LTMAIN])dnl 1014456fccdSmrg 1020f1ac3bcSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1034456fccdSmrg 1040f1ac3bcSmrgdnl Parse OPTIONS 1050f1ac3bcSmrg_LT_SET_OPTIONS([$0], [$1]) 1064456fccdSmrg 1070f1ac3bcSmrg# This can be used to rebuild libtool when needed 108b0a0317aSmrgLIBTOOL_DEPS=$ltmain 1094456fccdSmrg 1100f1ac3bcSmrg# Always use our own libtool. 1110f1ac3bcSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1120f1ac3bcSmrgAC_SUBST(LIBTOOL)dnl 1134456fccdSmrg 1140f1ac3bcSmrg_LT_SETUP 1154456fccdSmrg 1160f1ac3bcSmrg# Only expand once: 1170f1ac3bcSmrgm4_define([LT_INIT]) 1180f1ac3bcSmrg])# LT_INIT 1194456fccdSmrg 1200f1ac3bcSmrg# Old names: 1210f1ac3bcSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1220f1ac3bcSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1230f1ac3bcSmrgdnl aclocal-1.4 backwards compatibility: 1240f1ac3bcSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1250f1ac3bcSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1264456fccdSmrg 1274456fccdSmrg 128b0a0317aSmrg# _LT_PREPARE_CC_BASENAME 129b0a0317aSmrg# ----------------------- 130b0a0317aSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 131b0a0317aSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 132b0a0317aSmrgfunc_cc_basename () 133b0a0317aSmrg{ 134b0a0317aSmrg for cc_temp in @S|@*""; do 135b0a0317aSmrg case $cc_temp in 136b0a0317aSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 137b0a0317aSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 138b0a0317aSmrg \-*) ;; 139b0a0317aSmrg *) break;; 140b0a0317aSmrg esac 141b0a0317aSmrg done 142b0a0317aSmrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 143b0a0317aSmrg} 144b0a0317aSmrg])# _LT_PREPARE_CC_BASENAME 145b0a0317aSmrg 146b0a0317aSmrg 1470f1ac3bcSmrg# _LT_CC_BASENAME(CC) 1480f1ac3bcSmrg# ------------------- 149b0a0317aSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 150b0a0317aSmrg# but that macro is also expanded into generated libtool script, which 151b0a0317aSmrg# arranges for $SED and $ECHO to be set by different means. 1520f1ac3bcSmrgm4_defun([_LT_CC_BASENAME], 153b0a0317aSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 154b0a0317aSmrgAC_REQUIRE([_LT_DECL_SED])dnl 155b0a0317aSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 156b0a0317aSmrgfunc_cc_basename $1 157b0a0317aSmrgcc_basename=$func_cc_basename_result 1583e6c936aSmrg]) 1594456fccdSmrg 1604456fccdSmrg 1610f1ac3bcSmrg# _LT_FILEUTILS_DEFAULTS 1620f1ac3bcSmrg# ---------------------- 1630f1ac3bcSmrg# It is okay to use these file commands and assume they have been set 164b0a0317aSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 1650f1ac3bcSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1660f1ac3bcSmrg[: ${CP="cp -f"} 1670f1ac3bcSmrg: ${MV="mv -f"} 1680f1ac3bcSmrg: ${RM="rm -f"} 1690f1ac3bcSmrg])# _LT_FILEUTILS_DEFAULTS 1704456fccdSmrg 1714456fccdSmrg 1720f1ac3bcSmrg# _LT_SETUP 1730f1ac3bcSmrg# --------- 1740f1ac3bcSmrgm4_defun([_LT_SETUP], 1750f1ac3bcSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1760f1ac3bcSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1770f1ac3bcSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1780f1ac3bcSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1794456fccdSmrg 1800f1ac3bcSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1810f1ac3bcSmrgdnl 1820f1ac3bcSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1830f1ac3bcSmrg_LT_DECL([], [host], [0])dnl 1840f1ac3bcSmrg_LT_DECL([], [host_os], [0])dnl 1850f1ac3bcSmrgdnl 1860f1ac3bcSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1870f1ac3bcSmrg_LT_DECL([], [build], [0])dnl 1880f1ac3bcSmrg_LT_DECL([], [build_os], [0])dnl 1890f1ac3bcSmrgdnl 1900f1ac3bcSmrgAC_REQUIRE([AC_PROG_CC])dnl 1910f1ac3bcSmrgAC_REQUIRE([LT_PATH_LD])dnl 1920f1ac3bcSmrgAC_REQUIRE([LT_PATH_NM])dnl 1930f1ac3bcSmrgdnl 1940f1ac3bcSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1950f1ac3bcSmrgtest -z "$LN_S" && LN_S="ln -s" 1960f1ac3bcSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1970f1ac3bcSmrgdnl 1980f1ac3bcSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1990f1ac3bcSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 2000f1ac3bcSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 2010f1ac3bcSmrgdnl 2020f1ac3bcSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2030f1ac3bcSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2040f1ac3bcSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 2050f1ac3bcSmrgm4_require([_LT_CMD_RELOAD])dnl 2060f1ac3bcSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 2070f1ac3bcSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 2080f1ac3bcSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2090f1ac3bcSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 2100f1ac3bcSmrgm4_require([_LT_WITH_SYSROOT])dnl 211b0a0317aSmrgm4_require([_LT_CMD_TRUNCATE])dnl 212ff63a143Smrg 2130f1ac3bcSmrg_LT_CONFIG_LIBTOOL_INIT([ 214b0a0317aSmrg# See if we are running on zsh, and set the options that allow our 2150f1ac3bcSmrg# commands through without removal of \ escapes INIT. 216b0a0317aSmrgif test -n "\${ZSH_VERSION+set}"; then 2170f1ac3bcSmrg setopt NO_GLOB_SUBST 2180f1ac3bcSmrgfi 2193e6c936aSmrg]) 220b0a0317aSmrgif test -n "${ZSH_VERSION+set}"; then 2210f1ac3bcSmrg setopt NO_GLOB_SUBST 2220f1ac3bcSmrgfi 2234456fccdSmrg 2240f1ac3bcSmrg_LT_CHECK_OBJDIR 2254456fccdSmrg 2260f1ac3bcSmrgm4_require([_LT_TAG_COMPILER])dnl 227ff63a143Smrg 2280f1ac3bcSmrgcase $host_os in 2290f1ac3bcSmrgaix3*) 2300f1ac3bcSmrg # AIX sometimes has problems with the GCC collect2 program. For some 2310f1ac3bcSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2320f1ac3bcSmrg # vanish in a puff of smoke. 233b0a0317aSmrg if test set != "${COLLECT_NAMES+set}"; then 2340f1ac3bcSmrg COLLECT_NAMES= 2350f1ac3bcSmrg export COLLECT_NAMES 2363e6c936aSmrg fi 2370f1ac3bcSmrg ;; 2380f1ac3bcSmrgesac 239ff63a143Smrg 2400f1ac3bcSmrg# Global variables: 2410f1ac3bcSmrgofile=libtool 2420f1ac3bcSmrgcan_build_shared=yes 243ff63a143Smrg 244b0a0317aSmrg# All known linkers require a '.a' archive for static linking (except MSVC, 2450f1ac3bcSmrg# which needs '.lib'). 2460f1ac3bcSmrglibext=a 247ff63a143Smrg 248b0a0317aSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2494456fccdSmrg 250b0a0317aSmrgold_CC=$CC 251b0a0317aSmrgold_CFLAGS=$CFLAGS 2524456fccdSmrg 2530f1ac3bcSmrg# Set sane defaults for various variables 2540f1ac3bcSmrgtest -z "$CC" && CC=cc 2550f1ac3bcSmrgtest -z "$LTCC" && LTCC=$CC 2560f1ac3bcSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2570f1ac3bcSmrgtest -z "$LD" && LD=ld 2580f1ac3bcSmrgtest -z "$ac_objext" && ac_objext=o 2594456fccdSmrg 2600f1ac3bcSmrg_LT_CC_BASENAME([$compiler]) 2614456fccdSmrg 2620f1ac3bcSmrg# Only perform the check for file, if the check method requires it 2630f1ac3bcSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2640f1ac3bcSmrgcase $deplibs_check_method in 2650f1ac3bcSmrgfile_magic*) 2660f1ac3bcSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2670f1ac3bcSmrg _LT_PATH_MAGIC 2680f1ac3bcSmrg fi 2690f1ac3bcSmrg ;; 2700f1ac3bcSmrgesac 2714456fccdSmrg 2720f1ac3bcSmrg# Use C for the default configuration in the libtool script 2730f1ac3bcSmrgLT_SUPPORTED_TAG([CC]) 2740f1ac3bcSmrg_LT_LANG_C_CONFIG 2750f1ac3bcSmrg_LT_LANG_DEFAULT_CONFIG 2760f1ac3bcSmrg_LT_CONFIG_COMMANDS 2770f1ac3bcSmrg])# _LT_SETUP 2784456fccdSmrg 2794456fccdSmrg 2800f1ac3bcSmrg# _LT_PREPARE_SED_QUOTE_VARS 2810f1ac3bcSmrg# -------------------------- 2820f1ac3bcSmrg# Define a few sed substitution that help us do robust quoting. 2830f1ac3bcSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2840f1ac3bcSmrg[# Backslashify metacharacters that are still active within 2850f1ac3bcSmrg# double-quoted strings. 2860f1ac3bcSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2874456fccdSmrg 2880f1ac3bcSmrg# Same as above, but do not quote variable references. 2890f1ac3bcSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2904456fccdSmrg 2910f1ac3bcSmrg# Sed substitution to delay expansion of an escaped shell variable in a 2920f1ac3bcSmrg# double_quote_subst'ed string. 2930f1ac3bcSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2944456fccdSmrg 2950f1ac3bcSmrg# Sed substitution to delay expansion of an escaped single quote. 2960f1ac3bcSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2974456fccdSmrg 2980f1ac3bcSmrg# Sed substitution to avoid accidental globbing in evaled expressions 2990f1ac3bcSmrgno_glob_subst='s/\*/\\\*/g' 3000f1ac3bcSmrg]) 3014456fccdSmrg 3020f1ac3bcSmrg# _LT_PROG_LTMAIN 3030f1ac3bcSmrg# --------------- 304b0a0317aSmrg# Note that this code is called both from 'configure', and 'config.status' 3050f1ac3bcSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 306b0a0317aSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3070f1ac3bcSmrg# so we pass a copy along to make sure it has a sensible value anyway. 3080f1ac3bcSmrgm4_defun([_LT_PROG_LTMAIN], 3090f1ac3bcSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3100f1ac3bcSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 311b0a0317aSmrgltmain=$ac_aux_dir/ltmain.sh 3120f1ac3bcSmrg])# _LT_PROG_LTMAIN 3134456fccdSmrg 3144456fccdSmrg 31542d69509Smrg 3160f1ac3bcSmrg# So that we can recreate a full libtool script including additional 3170f1ac3bcSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 318b0a0317aSmrg# in macros and then make a single call at the end using the 'libtool' 3190f1ac3bcSmrg# label. 3200f1ac3bcSmrg 3210f1ac3bcSmrg 3220f1ac3bcSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3230f1ac3bcSmrg# ---------------------------------------- 3240f1ac3bcSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3250f1ac3bcSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3260f1ac3bcSmrg[m4_ifval([$1], 3270f1ac3bcSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3280f1ac3bcSmrg [$1 3290f1ac3bcSmrg])])]) 3300f1ac3bcSmrg 3310f1ac3bcSmrg# Initialize. 3320f1ac3bcSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3330f1ac3bcSmrg 3340f1ac3bcSmrg 3350f1ac3bcSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3363e6c936aSmrg# ------------------------------ 3370f1ac3bcSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3380f1ac3bcSmrgm4_define([_LT_CONFIG_LIBTOOL], 3390f1ac3bcSmrg[m4_ifval([$1], 3400f1ac3bcSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3410f1ac3bcSmrg [$1 3420f1ac3bcSmrg])])]) 343ff63a143Smrg 3440f1ac3bcSmrg# Initialize. 3450f1ac3bcSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3460f1ac3bcSmrg 3470f1ac3bcSmrg 3480f1ac3bcSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3490f1ac3bcSmrg# ----------------------------------------------------- 3500f1ac3bcSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3510f1ac3bcSmrg[_LT_CONFIG_LIBTOOL([$1]) 3520f1ac3bcSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 35342d69509Smrg]) 3544456fccdSmrg 3554456fccdSmrg 3560f1ac3bcSmrg# _LT_FORMAT_COMMENT([COMMENT]) 3570f1ac3bcSmrg# ----------------------------- 3580f1ac3bcSmrg# Add leading comment marks to the start of each line, and a trailing 3590f1ac3bcSmrg# full-stop to the whole comment if one is not present already. 3600f1ac3bcSmrgm4_define([_LT_FORMAT_COMMENT], 3610f1ac3bcSmrg[m4_ifval([$1], [ 3620f1ac3bcSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3630f1ac3bcSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3640f1ac3bcSmrg)]) 3654456fccdSmrg 36642d69509Smrg 3674456fccdSmrg 3684456fccdSmrg 3694456fccdSmrg 3700f1ac3bcSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3710f1ac3bcSmrg# ------------------------------------------------------------------- 3720f1ac3bcSmrg# CONFIGNAME is the name given to the value in the libtool script. 3730f1ac3bcSmrg# VARNAME is the (base) name used in the configure script. 3740f1ac3bcSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3750f1ac3bcSmrg# VARNAME. Any other value will be used directly. 3760f1ac3bcSmrgm4_define([_LT_DECL], 3770f1ac3bcSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3780f1ac3bcSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3790f1ac3bcSmrg [m4_ifval([$1], [$1], [$2])]) 3800f1ac3bcSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3810f1ac3bcSmrg m4_ifval([$4], 3820f1ac3bcSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3830f1ac3bcSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 3840f1ac3bcSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3850f1ac3bcSmrg]) 3864456fccdSmrg 3874456fccdSmrg 3880f1ac3bcSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3890f1ac3bcSmrg# -------------------------------------------------------- 3900f1ac3bcSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3914456fccdSmrg 3923e6c936aSmrg 3930f1ac3bcSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3940f1ac3bcSmrg# ------------------------------------------------ 3950f1ac3bcSmrgm4_define([lt_decl_tag_varnames], 3960f1ac3bcSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 3970f1ac3bcSmrg 3980f1ac3bcSmrg 3990f1ac3bcSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 4000f1ac3bcSmrg# --------------------------------------------------------- 4010f1ac3bcSmrgm4_define([_lt_decl_filter], 4020f1ac3bcSmrg[m4_case([$#], 4030f1ac3bcSmrg [0], [m4_fatal([$0: too few arguments: $#])], 4040f1ac3bcSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 4050f1ac3bcSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 4060f1ac3bcSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 4070f1ac3bcSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 4083e6c936aSmrg]) 4094456fccdSmrg 4104456fccdSmrg 4110f1ac3bcSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 4120f1ac3bcSmrg# -------------------------------------------------- 4130f1ac3bcSmrgm4_define([lt_decl_quote_varnames], 4140f1ac3bcSmrg[_lt_decl_filter([value], [1], $@)]) 4150f1ac3bcSmrg 4160f1ac3bcSmrg 4170f1ac3bcSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4180f1ac3bcSmrg# --------------------------------------------------- 4190f1ac3bcSmrgm4_define([lt_decl_dquote_varnames], 4200f1ac3bcSmrg[_lt_decl_filter([value], [2], $@)]) 4210f1ac3bcSmrg 4220f1ac3bcSmrg 4230f1ac3bcSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4240f1ac3bcSmrg# --------------------------------------------------- 4250f1ac3bcSmrgm4_define([lt_decl_varnames_tagged], 4260f1ac3bcSmrg[m4_assert([$# <= 2])dnl 4270f1ac3bcSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 4280f1ac3bcSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4290f1ac3bcSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4300f1ac3bcSmrgm4_define([_lt_decl_varnames_tagged], 4310f1ac3bcSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4320f1ac3bcSmrg 4330f1ac3bcSmrg 4340f1ac3bcSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4350f1ac3bcSmrg# ------------------------------------------------ 4360f1ac3bcSmrgm4_define([lt_decl_all_varnames], 4370f1ac3bcSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4380f1ac3bcSmrg m4_if([$2], [], 4390f1ac3bcSmrg m4_quote(lt_decl_varnames), 4400f1ac3bcSmrg m4_quote(m4_shift($@))))[]dnl 441ff63a143Smrg]) 4420f1ac3bcSmrgm4_define([_lt_decl_all_varnames], 4430f1ac3bcSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 4440f1ac3bcSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 445ff63a143Smrg]) 4464456fccdSmrg 4474456fccdSmrg 4480f1ac3bcSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4490f1ac3bcSmrg# ------------------------------------ 450b0a0317aSmrg# Quote a variable value, and forward it to 'config.status' so that its 451b0a0317aSmrg# declaration there will have the same value as in 'configure'. VARNAME 4520f1ac3bcSmrg# must have a single quote delimited value for this to work. 4530f1ac3bcSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4540f1ac3bcSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 455ff63a143Smrg 4564456fccdSmrg 4570f1ac3bcSmrg# _LT_CONFIG_STATUS_DECLARATIONS 4580f1ac3bcSmrg# ------------------------------ 4590f1ac3bcSmrg# We delimit libtool config variables with single quotes, so when 4600f1ac3bcSmrg# we write them to config.status, we have to be sure to quote all 4610f1ac3bcSmrg# embedded single quotes properly. In configure, this macro expands 4620f1ac3bcSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4630f1ac3bcSmrg# 4640f1ac3bcSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4650f1ac3bcSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4660f1ac3bcSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4670f1ac3bcSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4684456fccdSmrg 4694456fccdSmrg 4700f1ac3bcSmrg# _LT_LIBTOOL_TAGS 4710f1ac3bcSmrg# ---------------- 4720f1ac3bcSmrg# Output comment and list of tags supported by the script 4730f1ac3bcSmrgm4_defun([_LT_LIBTOOL_TAGS], 4740f1ac3bcSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 475b0a0317aSmrgavailable_tags='_LT_TAGS'dnl 4760f1ac3bcSmrg]) 4774456fccdSmrg 4784456fccdSmrg 4790f1ac3bcSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4800f1ac3bcSmrg# ----------------------------------- 4810f1ac3bcSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4820f1ac3bcSmrg# expand to a commented shell variable setting: 4833e6c936aSmrg# 4840f1ac3bcSmrg# # Some comment about what VAR is for. 4850f1ac3bcSmrg# visible_name=$lt_internal_name 4860f1ac3bcSmrgm4_define([_LT_LIBTOOL_DECLARE], 4870f1ac3bcSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4880f1ac3bcSmrg [description])))[]dnl 4890f1ac3bcSmrgm4_pushdef([_libtool_name], 4900f1ac3bcSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4910f1ac3bcSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4920f1ac3bcSmrg [0], [_libtool_name=[$]$1], 4930f1ac3bcSmrg [1], [_libtool_name=$lt_[]$1], 4940f1ac3bcSmrg [2], [_libtool_name=$lt_[]$1], 4950f1ac3bcSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4960f1ac3bcSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4970f1ac3bcSmrg]) 4984456fccdSmrg 4994456fccdSmrg 5000f1ac3bcSmrg# _LT_LIBTOOL_CONFIG_VARS 5010f1ac3bcSmrg# ----------------------- 5020f1ac3bcSmrg# Produce commented declarations of non-tagged libtool config variables 503b0a0317aSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 5040f1ac3bcSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 5050f1ac3bcSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 5060f1ac3bcSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 5070f1ac3bcSmrg[m4_foreach([_lt_var], 5080f1ac3bcSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 5090f1ac3bcSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 5103e6c936aSmrg 5114456fccdSmrg 5120f1ac3bcSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 5130f1ac3bcSmrg# ------------------------- 5140f1ac3bcSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 5150f1ac3bcSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5160f1ac3bcSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 51742d69509Smrg 5184456fccdSmrg 5190f1ac3bcSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 5200f1ac3bcSmrg# ------------------------------ 5210f1ac3bcSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 5224456fccdSmrg 5234456fccdSmrg 5240f1ac3bcSmrg# _LT_CONFIG_COMMANDS 5250f1ac3bcSmrg# ------------------- 5260f1ac3bcSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5270f1ac3bcSmrg# variables for single and double quote escaping we saved from calls 5280f1ac3bcSmrg# to _LT_DECL, we can put quote escaped variables declarations 529b0a0317aSmrg# into 'config.status', and then the shell code to quote escape them in 530b0a0317aSmrg# for loops in 'config.status'. Finally, any additional code accumulated 5310f1ac3bcSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5320f1ac3bcSmrgm4_defun([_LT_CONFIG_COMMANDS], 5330f1ac3bcSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5340f1ac3bcSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5350f1ac3bcSmrg dnl instead of duplicating it all over again into config.status, 5360f1ac3bcSmrg dnl then we will have config.status run $CONFIG_LT later, so it 5370f1ac3bcSmrg dnl needs to know what name is stored there: 5380f1ac3bcSmrg [AC_CONFIG_COMMANDS([libtool], 5390f1ac3bcSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5400f1ac3bcSmrg dnl If the libtool generation code is destined for config.status, 5410f1ac3bcSmrg dnl expand the accumulated commands and init code now: 5420f1ac3bcSmrg [AC_CONFIG_COMMANDS([libtool], 5430f1ac3bcSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5440f1ac3bcSmrg])#_LT_CONFIG_COMMANDS 5454456fccdSmrg 5464456fccdSmrg 5470f1ac3bcSmrg# Initialize. 5480f1ac3bcSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5490f1ac3bcSmrg[ 5504456fccdSmrg 5510f1ac3bcSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5520f1ac3bcSmrg# if CDPATH is set. 5530f1ac3bcSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5544456fccdSmrg 5550f1ac3bcSmrgsed_quote_subst='$sed_quote_subst' 5560f1ac3bcSmrgdouble_quote_subst='$double_quote_subst' 5570f1ac3bcSmrgdelay_variable_subst='$delay_variable_subst' 5580f1ac3bcSmrg_LT_CONFIG_STATUS_DECLARATIONS 5590f1ac3bcSmrgLTCC='$LTCC' 5600f1ac3bcSmrgLTCFLAGS='$LTCFLAGS' 5610f1ac3bcSmrgcompiler='$compiler_DEFAULT' 5624456fccdSmrg 5630f1ac3bcSmrg# A function that is used when there is no print builtin or printf. 5640f1ac3bcSmrgfunc_fallback_echo () 5650f1ac3bcSmrg{ 5660f1ac3bcSmrg eval 'cat <<_LTECHO_EOF 5670f1ac3bcSmrg\$[]1 5680f1ac3bcSmrg_LTECHO_EOF' 5690f1ac3bcSmrg} 5704456fccdSmrg 5710f1ac3bcSmrg# Quote evaled strings. 5720f1ac3bcSmrgfor var in lt_decl_all_varnames([[ \ 5730f1ac3bcSmrg]], lt_decl_quote_varnames); do 5740f1ac3bcSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5750f1ac3bcSmrg *[[\\\\\\\`\\"\\\$]]*) 576b0a0317aSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5770f1ac3bcSmrg ;; 5780f1ac3bcSmrg *) 5790f1ac3bcSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5800f1ac3bcSmrg ;; 5810f1ac3bcSmrg esac 5820f1ac3bcSmrgdone 58342d69509Smrg 5840f1ac3bcSmrg# Double-quote double-evaled strings. 5850f1ac3bcSmrgfor var in lt_decl_all_varnames([[ \ 5860f1ac3bcSmrg]], lt_decl_dquote_varnames); do 5870f1ac3bcSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5880f1ac3bcSmrg *[[\\\\\\\`\\"\\\$]]*) 589b0a0317aSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5900f1ac3bcSmrg ;; 5910f1ac3bcSmrg *) 5920f1ac3bcSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5930f1ac3bcSmrg ;; 5940f1ac3bcSmrg esac 5950f1ac3bcSmrgdone 5964456fccdSmrg 5970f1ac3bcSmrg_LT_OUTPUT_LIBTOOL_INIT 5983e6c936aSmrg]) 5994456fccdSmrg 6000f1ac3bcSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 6010f1ac3bcSmrg# ------------------------------------ 6020f1ac3bcSmrg# Generate a child script FILE with all initialization necessary to 6030f1ac3bcSmrg# reuse the environment learned by the parent script, and make the 6040f1ac3bcSmrg# file executable. If COMMENT is supplied, it is inserted after the 605b0a0317aSmrg# '#!' sequence but before initialization text begins. After this 6060f1ac3bcSmrg# macro, additional text can be appended to FILE to form the body of 6070f1ac3bcSmrg# the child script. The macro ends with non-zero status if the 6080f1ac3bcSmrg# file could not be fully written (such as if the disk is full). 6090f1ac3bcSmrgm4_ifdef([AS_INIT_GENERATED], 6100f1ac3bcSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 6110f1ac3bcSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 6120f1ac3bcSmrg[m4_require([AS_PREPARE])]dnl 6130f1ac3bcSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 6140f1ac3bcSmrg[lt_write_fail=0 6150f1ac3bcSmrgcat >$1 <<_ASEOF || lt_write_fail=1 6160f1ac3bcSmrg#! $SHELL 6170f1ac3bcSmrg# Generated by $as_me. 6180f1ac3bcSmrg$2 6190f1ac3bcSmrgSHELL=\${CONFIG_SHELL-$SHELL} 6200f1ac3bcSmrgexport SHELL 6210f1ac3bcSmrg_ASEOF 6220f1ac3bcSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 6230f1ac3bcSmrgAS_SHELL_SANITIZE 6240f1ac3bcSmrg_AS_PREPARE 6250f1ac3bcSmrgexec AS_MESSAGE_FD>&1 6260f1ac3bcSmrg_ASEOF 627b0a0317aSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 6280f1ac3bcSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6294456fccdSmrg 6300f1ac3bcSmrg# LT_OUTPUT 6310f1ac3bcSmrg# --------- 6320f1ac3bcSmrg# This macro allows early generation of the libtool script (before 6330f1ac3bcSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 6340f1ac3bcSmrg# tests. 6350f1ac3bcSmrgAC_DEFUN([LT_OUTPUT], 6360f1ac3bcSmrg[: ${CONFIG_LT=./config.lt} 6370f1ac3bcSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 6380f1ac3bcSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 6390f1ac3bcSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 6404456fccdSmrg 6410f1ac3bcSmrgcat >>"$CONFIG_LT" <<\_LTEOF 6420f1ac3bcSmrglt_cl_silent=false 6430f1ac3bcSmrgexec AS_MESSAGE_LOG_FD>>config.log 6440f1ac3bcSmrg{ 6450f1ac3bcSmrg echo 6460f1ac3bcSmrg AS_BOX([Running $as_me.]) 6470f1ac3bcSmrg} >&AS_MESSAGE_LOG_FD 648521070a0Smrg 6490f1ac3bcSmrglt_cl_help="\ 650b0a0317aSmrg'$as_me' creates a local libtool stub from the current configuration, 6510f1ac3bcSmrgfor use in further configure time tests before the real libtool is 6520f1ac3bcSmrggenerated. 653521070a0Smrg 6540f1ac3bcSmrgUsage: $[0] [[OPTIONS]] 655521070a0Smrg 6560f1ac3bcSmrg -h, --help print this help, then exit 6570f1ac3bcSmrg -V, --version print version number, then exit 6580f1ac3bcSmrg -q, --quiet do not print progress messages 6590f1ac3bcSmrg -d, --debug don't remove temporary files 6604456fccdSmrg 6610f1ac3bcSmrgReport bugs to <bug-libtool@gnu.org>." 6624456fccdSmrg 6630f1ac3bcSmrglt_cl_version="\ 6640f1ac3bcSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6650f1ac3bcSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6660f1ac3bcSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 66742d69509Smrg 6680f1ac3bcSmrgCopyright (C) 2011 Free Software Foundation, Inc. 6690f1ac3bcSmrgThis config.lt script is free software; the Free Software Foundation 6700f1ac3bcSmrggives unlimited permision to copy, distribute and modify it." 67142d69509Smrg 672b0a0317aSmrgwhile test 0 != $[#] 6730f1ac3bcSmrgdo 6740f1ac3bcSmrg case $[1] in 6750f1ac3bcSmrg --version | --v* | -V ) 6760f1ac3bcSmrg echo "$lt_cl_version"; exit 0 ;; 6770f1ac3bcSmrg --help | --h* | -h ) 6780f1ac3bcSmrg echo "$lt_cl_help"; exit 0 ;; 6790f1ac3bcSmrg --debug | --d* | -d ) 6800f1ac3bcSmrg debug=: ;; 6810f1ac3bcSmrg --quiet | --q* | --silent | --s* | -q ) 6820f1ac3bcSmrg lt_cl_silent=: ;; 6834456fccdSmrg 6840f1ac3bcSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 685b0a0317aSmrgTry '$[0] --help' for more information.]) ;; 6864456fccdSmrg 6870f1ac3bcSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 688b0a0317aSmrgTry '$[0] --help' for more information.]) ;; 689ff63a143Smrg esac 6900f1ac3bcSmrg shift 6913e6c936aSmrgdone 6924456fccdSmrg 6930f1ac3bcSmrgif $lt_cl_silent; then 6940f1ac3bcSmrg exec AS_MESSAGE_FD>/dev/null 6950f1ac3bcSmrgfi 6960f1ac3bcSmrg_LTEOF 6974456fccdSmrg 6980f1ac3bcSmrgcat >>"$CONFIG_LT" <<_LTEOF 6990f1ac3bcSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 7000f1ac3bcSmrg_LTEOF 7014456fccdSmrg 7020f1ac3bcSmrgcat >>"$CONFIG_LT" <<\_LTEOF 7030f1ac3bcSmrgAC_MSG_NOTICE([creating $ofile]) 7040f1ac3bcSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 7050f1ac3bcSmrgAS_EXIT(0) 7060f1ac3bcSmrg_LTEOF 7070f1ac3bcSmrgchmod +x "$CONFIG_LT" 708521070a0Smrg 7090f1ac3bcSmrg# configure is writing to config.log, but config.lt does its own redirection, 7100f1ac3bcSmrg# appending to config.log, which fails on DOS, as config.log is still kept 7110f1ac3bcSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 7120f1ac3bcSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 7130f1ac3bcSmrglt_cl_success=: 714b0a0317aSmrgtest yes = "$silent" && 7150f1ac3bcSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 7160f1ac3bcSmrgexec AS_MESSAGE_LOG_FD>/dev/null 7170f1ac3bcSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 7180f1ac3bcSmrgexec AS_MESSAGE_LOG_FD>>config.log 7190f1ac3bcSmrg$lt_cl_success || AS_EXIT(1) 7200f1ac3bcSmrg])# LT_OUTPUT 72142d69509Smrg 72242d69509Smrg 7230f1ac3bcSmrg# _LT_CONFIG(TAG) 7240f1ac3bcSmrg# --------------- 7250f1ac3bcSmrg# If TAG is the built-in tag, create an initial libtool script with a 7260f1ac3bcSmrg# default configuration from the untagged config vars. Otherwise add code 7270f1ac3bcSmrg# to config.status for appending the configuration named by TAG from the 7280f1ac3bcSmrg# matching tagged config vars. 7290f1ac3bcSmrgm4_defun([_LT_CONFIG], 7300f1ac3bcSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7310f1ac3bcSmrg_LT_CONFIG_SAVE_COMMANDS([ 7320f1ac3bcSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7330f1ac3bcSmrg m4_if(_LT_TAG, [C], [ 734b0a0317aSmrg # See if we are running on zsh, and set the options that allow our 7350f1ac3bcSmrg # commands through without removal of \ escapes. 736b0a0317aSmrg if test -n "${ZSH_VERSION+set}"; then 7370f1ac3bcSmrg setopt NO_GLOB_SUBST 7380f1ac3bcSmrg fi 7394456fccdSmrg 740b0a0317aSmrg cfgfile=${ofile}T 7410f1ac3bcSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7420f1ac3bcSmrg $RM "$cfgfile" 7434456fccdSmrg 7440f1ac3bcSmrg cat <<_LT_EOF >> "$cfgfile" 7450f1ac3bcSmrg#! $SHELL 746b0a0317aSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION 7470f1ac3bcSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7480f1ac3bcSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 749b0a0317aSmrg 750b0a0317aSmrg# Provide generalized library-building support services. 751b0a0317aSmrg# Written by Gordon Matzigkeit, 1996 752b0a0317aSmrg 7530f1ac3bcSmrg_LT_COPYING 7540f1ac3bcSmrg_LT_LIBTOOL_TAGS 7554456fccdSmrg 756b0a0317aSmrg# Configured defaults for sys_lib_dlsearch_path munging. 757b0a0317aSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 758b0a0317aSmrg 7590f1ac3bcSmrg# ### BEGIN LIBTOOL CONFIG 7600f1ac3bcSmrg_LT_LIBTOOL_CONFIG_VARS 7610f1ac3bcSmrg_LT_LIBTOOL_TAG_VARS 7620f1ac3bcSmrg# ### END LIBTOOL CONFIG 7634456fccdSmrg 764b0a0317aSmrg_LT_EOF 765b0a0317aSmrg 766b0a0317aSmrg cat <<'_LT_EOF' >> "$cfgfile" 767b0a0317aSmrg 768b0a0317aSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 769b0a0317aSmrg 770b0a0317aSmrg_LT_PREPARE_MUNGE_PATH_LIST 771b0a0317aSmrg_LT_PREPARE_CC_BASENAME 772b0a0317aSmrg 773b0a0317aSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE 774b0a0317aSmrg 7750f1ac3bcSmrg_LT_EOF 7764456fccdSmrg 7770f1ac3bcSmrg case $host_os in 7780f1ac3bcSmrg aix3*) 7790f1ac3bcSmrg cat <<\_LT_EOF >> "$cfgfile" 7800f1ac3bcSmrg# AIX sometimes has problems with the GCC collect2 program. For some 7810f1ac3bcSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7820f1ac3bcSmrg# vanish in a puff of smoke. 783b0a0317aSmrgif test set != "${COLLECT_NAMES+set}"; then 7840f1ac3bcSmrg COLLECT_NAMES= 7850f1ac3bcSmrg export COLLECT_NAMES 7860f1ac3bcSmrgfi 7870f1ac3bcSmrg_LT_EOF 7880f1ac3bcSmrg ;; 7890f1ac3bcSmrg esac 790521070a0Smrg 7910f1ac3bcSmrg _LT_PROG_LTMAIN 792521070a0Smrg 7930f1ac3bcSmrg # We use sed instead of cat because bash on DJGPP gets confused if 7940f1ac3bcSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7950f1ac3bcSmrg # text mode, it properly converts lines to CR/LF. This bash problem 7960f1ac3bcSmrg # is reportedly fixed, but why not run on old versions too? 7970f1ac3bcSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 7980f1ac3bcSmrg || (rm -f "$cfgfile"; exit 1) 799521070a0Smrg 8000f1ac3bcSmrg mv -f "$cfgfile" "$ofile" || 8010f1ac3bcSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 8020f1ac3bcSmrg chmod +x "$ofile" 8030f1ac3bcSmrg], 8040f1ac3bcSmrg[cat <<_LT_EOF >> "$ofile" 805521070a0Smrg 8060f1ac3bcSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 8070f1ac3bcSmrgdnl in a comment (ie after a #). 8080f1ac3bcSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 8090f1ac3bcSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 8100f1ac3bcSmrg# ### END LIBTOOL TAG CONFIG: $1 8110f1ac3bcSmrg_LT_EOF 8120f1ac3bcSmrg])dnl /m4_if 8130f1ac3bcSmrg], 8140f1ac3bcSmrg[m4_if([$1], [], [ 8150f1ac3bcSmrg PACKAGE='$PACKAGE' 8160f1ac3bcSmrg VERSION='$VERSION' 8170f1ac3bcSmrg RM='$RM' 8180f1ac3bcSmrg ofile='$ofile'], []) 8190f1ac3bcSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 8200f1ac3bcSmrg])# _LT_CONFIG 821521070a0Smrg 822521070a0Smrg 8230f1ac3bcSmrg# LT_SUPPORTED_TAG(TAG) 8240f1ac3bcSmrg# --------------------- 8250f1ac3bcSmrg# Trace this macro to discover what tags are supported by the libtool 8260f1ac3bcSmrg# --tag option, using: 8270f1ac3bcSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8280f1ac3bcSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 829521070a0Smrg 830521070a0Smrg 8310f1ac3bcSmrg# C support is built-in for now 8320f1ac3bcSmrgm4_define([_LT_LANG_C_enabled], []) 8330f1ac3bcSmrgm4_define([_LT_TAGS], []) 834521070a0Smrg 83542d69509Smrg 8360f1ac3bcSmrg# LT_LANG(LANG) 8370f1ac3bcSmrg# ------------- 8380f1ac3bcSmrg# Enable libtool support for the given language if not already enabled. 8390f1ac3bcSmrgAC_DEFUN([LT_LANG], 8400f1ac3bcSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8410f1ac3bcSmrgm4_case([$1], 8420f1ac3bcSmrg [C], [_LT_LANG(C)], 8430f1ac3bcSmrg [C++], [_LT_LANG(CXX)], 8440f1ac3bcSmrg [Go], [_LT_LANG(GO)], 8450f1ac3bcSmrg [Java], [_LT_LANG(GCJ)], 8460f1ac3bcSmrg [Fortran 77], [_LT_LANG(F77)], 8470f1ac3bcSmrg [Fortran], [_LT_LANG(FC)], 8480f1ac3bcSmrg [Windows Resource], [_LT_LANG(RC)], 8490f1ac3bcSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8500f1ac3bcSmrg [_LT_LANG($1)], 8510f1ac3bcSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8520f1ac3bcSmrg])# LT_LANG 853521070a0Smrg 854521070a0Smrg 8550f1ac3bcSmrg# _LT_LANG(LANGNAME) 8560f1ac3bcSmrg# ------------------ 8570f1ac3bcSmrgm4_defun([_LT_LANG], 8580f1ac3bcSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8590f1ac3bcSmrg [LT_SUPPORTED_TAG([$1])dnl 8600f1ac3bcSmrg m4_append([_LT_TAGS], [$1 ])dnl 8610f1ac3bcSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8620f1ac3bcSmrg _LT_LANG_$1_CONFIG($1)])dnl 8630f1ac3bcSmrg])# _LT_LANG 864521070a0Smrg 8653e6c936aSmrg 8660f1ac3bcSmrgm4_ifndef([AC_PROG_GO], [ 8670f1ac3bcSmrg# NOTE: This macro has been submitted for inclusion into # 8680f1ac3bcSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 8690f1ac3bcSmrg# a released version of Autoconf we should remove this # 8700f1ac3bcSmrg# macro and use it instead. # 8710f1ac3bcSmrgm4_defun([AC_PROG_GO], 8720f1ac3bcSmrg[AC_LANG_PUSH(Go)dnl 8730f1ac3bcSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 8740f1ac3bcSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 8750f1ac3bcSmrg_AC_ARG_VAR_LDFLAGS()dnl 8760f1ac3bcSmrgAC_CHECK_TOOL(GOC, gccgo) 8770f1ac3bcSmrgif test -z "$GOC"; then 8780f1ac3bcSmrg if test -n "$ac_tool_prefix"; then 8790f1ac3bcSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 8800f1ac3bcSmrg fi 8810f1ac3bcSmrgfi 8820f1ac3bcSmrgif test -z "$GOC"; then 8830f1ac3bcSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 8840f1ac3bcSmrgfi 8850f1ac3bcSmrg])#m4_defun 8860f1ac3bcSmrg])#m4_ifndef 8873e6c936aSmrg 8884456fccdSmrg 8890f1ac3bcSmrg# _LT_LANG_DEFAULT_CONFIG 8900f1ac3bcSmrg# ----------------------- 8910f1ac3bcSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8920f1ac3bcSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8930f1ac3bcSmrg [LT_LANG(CXX)], 8940f1ac3bcSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8954456fccdSmrg 8960f1ac3bcSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8970f1ac3bcSmrg [LT_LANG(F77)], 8980f1ac3bcSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8994456fccdSmrg 9000f1ac3bcSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 9010f1ac3bcSmrg [LT_LANG(FC)], 9020f1ac3bcSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 903521070a0Smrg 9040f1ac3bcSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 9050f1ac3bcSmrgdnl pulling things in needlessly. 9060f1ac3bcSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 9070f1ac3bcSmrg [LT_LANG(GCJ)], 9080f1ac3bcSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 9090f1ac3bcSmrg [LT_LANG(GCJ)], 9100f1ac3bcSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 9110f1ac3bcSmrg [LT_LANG(GCJ)], 9120f1ac3bcSmrg [m4_ifdef([AC_PROG_GCJ], 9130f1ac3bcSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 9140f1ac3bcSmrg m4_ifdef([A][M_PROG_GCJ], 9150f1ac3bcSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 9160f1ac3bcSmrg m4_ifdef([LT_PROG_GCJ], 9170f1ac3bcSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 918521070a0Smrg 9190f1ac3bcSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 9200f1ac3bcSmrg [LT_LANG(GO)], 9210f1ac3bcSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 92242d69509Smrg 9230f1ac3bcSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 9240f1ac3bcSmrg [LT_LANG(RC)], 9250f1ac3bcSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9260f1ac3bcSmrg])# _LT_LANG_DEFAULT_CONFIG 92742d69509Smrg 9280f1ac3bcSmrg# Obsolete macros: 9290f1ac3bcSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9300f1ac3bcSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9310f1ac3bcSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9320f1ac3bcSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 9330f1ac3bcSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9340f1ac3bcSmrgdnl aclocal-1.4 backwards compatibility: 9350f1ac3bcSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9360f1ac3bcSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9370f1ac3bcSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9380f1ac3bcSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 9390f1ac3bcSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 940ff63a143Smrg 941ff63a143Smrg 9420f1ac3bcSmrg# _LT_TAG_COMPILER 9430f1ac3bcSmrg# ---------------- 9440f1ac3bcSmrgm4_defun([_LT_TAG_COMPILER], 9450f1ac3bcSmrg[AC_REQUIRE([AC_PROG_CC])dnl 9464456fccdSmrg 9470f1ac3bcSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9480f1ac3bcSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9490f1ac3bcSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9500f1ac3bcSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 95142d69509Smrg 9520f1ac3bcSmrg# If no C compiler was specified, use CC. 9530f1ac3bcSmrgLTCC=${LTCC-"$CC"} 9544456fccdSmrg 9550f1ac3bcSmrg# If no C compiler flags were specified, use CFLAGS. 9560f1ac3bcSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 957521070a0Smrg 9580f1ac3bcSmrg# Allow CC to be a program name with arguments. 9590f1ac3bcSmrgcompiler=$CC 9600f1ac3bcSmrg])# _LT_TAG_COMPILER 9614456fccdSmrg 9624456fccdSmrg 9630f1ac3bcSmrg# _LT_COMPILER_BOILERPLATE 9640f1ac3bcSmrg# ------------------------ 9650f1ac3bcSmrg# Check for compiler boilerplate output or warnings with 9660f1ac3bcSmrg# the simple compiler test code. 9670f1ac3bcSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 9680f1ac3bcSmrg[m4_require([_LT_DECL_SED])dnl 9690f1ac3bcSmrgac_outfile=conftest.$ac_objext 9700f1ac3bcSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 9710f1ac3bcSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9720f1ac3bcSmrg_lt_compiler_boilerplate=`cat conftest.err` 9730f1ac3bcSmrg$RM conftest* 9740f1ac3bcSmrg])# _LT_COMPILER_BOILERPLATE 9754456fccdSmrg 9764456fccdSmrg 9770f1ac3bcSmrg# _LT_LINKER_BOILERPLATE 9780f1ac3bcSmrg# ---------------------- 9790f1ac3bcSmrg# Check for linker boilerplate output or warnings with 9800f1ac3bcSmrg# the simple link test code. 9810f1ac3bcSmrgm4_defun([_LT_LINKER_BOILERPLATE], 9820f1ac3bcSmrg[m4_require([_LT_DECL_SED])dnl 9830f1ac3bcSmrgac_outfile=conftest.$ac_objext 9840f1ac3bcSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 9850f1ac3bcSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9860f1ac3bcSmrg_lt_linker_boilerplate=`cat conftest.err` 9870f1ac3bcSmrg$RM -r conftest* 9880f1ac3bcSmrg])# _LT_LINKER_BOILERPLATE 9894456fccdSmrg 9900f1ac3bcSmrg# _LT_REQUIRED_DARWIN_CHECKS 9910f1ac3bcSmrg# ------------------------- 9920f1ac3bcSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9930f1ac3bcSmrg case $host_os in 9940f1ac3bcSmrg rhapsody* | darwin*) 9950f1ac3bcSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9960f1ac3bcSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9970f1ac3bcSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9980f1ac3bcSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9990f1ac3bcSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 10000f1ac3bcSmrg _LT_DECL([], [DSYMUTIL], [1], 10010f1ac3bcSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 10020f1ac3bcSmrg _LT_DECL([], [NMEDIT], [1], 10030f1ac3bcSmrg [Tool to change global to local symbols on Mac OS X]) 10040f1ac3bcSmrg _LT_DECL([], [LIPO], [1], 10050f1ac3bcSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 10060f1ac3bcSmrg _LT_DECL([], [OTOOL], [1], 10070f1ac3bcSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 10080f1ac3bcSmrg _LT_DECL([], [OTOOL64], [1], 10090f1ac3bcSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 10104456fccdSmrg 10110f1ac3bcSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 10120f1ac3bcSmrg [lt_cv_apple_cc_single_mod=no 1013b0a0317aSmrg if test -z "$LT_MULTI_MODULE"; then 10140f1ac3bcSmrg # By default we will add the -single_module flag. You can override 10150f1ac3bcSmrg # by either setting the environment variable LT_MULTI_MODULE 10160f1ac3bcSmrg # non-empty at configure time, or by adding -multi_module to the 10170f1ac3bcSmrg # link flags. 10180f1ac3bcSmrg rm -rf libconftest.dylib* 10190f1ac3bcSmrg echo "int foo(void){return 1;}" > conftest.c 10200f1ac3bcSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10210f1ac3bcSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10220f1ac3bcSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10230f1ac3bcSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10240f1ac3bcSmrg _lt_result=$? 10250f1ac3bcSmrg # If there is a non-empty error log, and "single_module" 10260f1ac3bcSmrg # appears in it, assume the flag caused a linker warning 10270f1ac3bcSmrg if test -s conftest.err && $GREP single_module conftest.err; then 10280f1ac3bcSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 10290f1ac3bcSmrg # Otherwise, if the output was created with a 0 exit code from 10300f1ac3bcSmrg # the compiler, it worked. 1031b0a0317aSmrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 10320f1ac3bcSmrg lt_cv_apple_cc_single_mod=yes 10330f1ac3bcSmrg else 10340f1ac3bcSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 10350f1ac3bcSmrg fi 10360f1ac3bcSmrg rm -rf libconftest.dylib* 10370f1ac3bcSmrg rm -f conftest.* 10380f1ac3bcSmrg fi]) 10394456fccdSmrg 10400f1ac3bcSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10410f1ac3bcSmrg [lt_cv_ld_exported_symbols_list], 10420f1ac3bcSmrg [lt_cv_ld_exported_symbols_list=no 10430f1ac3bcSmrg save_LDFLAGS=$LDFLAGS 10440f1ac3bcSmrg echo "_main" > conftest.sym 10450f1ac3bcSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10460f1ac3bcSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10470f1ac3bcSmrg [lt_cv_ld_exported_symbols_list=yes], 10480f1ac3bcSmrg [lt_cv_ld_exported_symbols_list=no]) 1049b0a0317aSmrg LDFLAGS=$save_LDFLAGS 10500f1ac3bcSmrg ]) 10514456fccdSmrg 10520f1ac3bcSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 10530f1ac3bcSmrg [lt_cv_ld_force_load=no 10540f1ac3bcSmrg cat > conftest.c << _LT_EOF 10550f1ac3bcSmrgint forced_loaded() { return 2;} 10560f1ac3bcSmrg_LT_EOF 10570f1ac3bcSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 10580f1ac3bcSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 10590f1ac3bcSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 10600f1ac3bcSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 10610f1ac3bcSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 10620f1ac3bcSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 10630f1ac3bcSmrg cat > conftest.c << _LT_EOF 10640f1ac3bcSmrgint main() { return 0;} 10650f1ac3bcSmrg_LT_EOF 10660f1ac3bcSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 10670f1ac3bcSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 10680f1ac3bcSmrg _lt_result=$? 10690f1ac3bcSmrg if test -s conftest.err && $GREP force_load conftest.err; then 10700f1ac3bcSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1071b0a0317aSmrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 10720f1ac3bcSmrg lt_cv_ld_force_load=yes 10730f1ac3bcSmrg else 10740f1ac3bcSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 10750f1ac3bcSmrg fi 10760f1ac3bcSmrg rm -f conftest.err libconftest.a conftest conftest.c 10770f1ac3bcSmrg rm -rf conftest.dSYM 10780f1ac3bcSmrg ]) 10790f1ac3bcSmrg case $host_os in 10800f1ac3bcSmrg rhapsody* | darwin1.[[012]]) 1081b0a0317aSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 10820f1ac3bcSmrg darwin1.*) 1083b0a0317aSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10840f1ac3bcSmrg darwin*) # darwin 5.x on 10850f1ac3bcSmrg # if running on 10.5 or later, the deployment target defaults 10860f1ac3bcSmrg # to the OS version, if on x86, and 10.4, the deployment 10870f1ac3bcSmrg # target defaults to 10.4. Don't you love it? 10880f1ac3bcSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10890f1ac3bcSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1090b0a0317aSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1091b0a0317aSmrg 10.[[012]][[,.]]*) 1092b0a0317aSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10930f1ac3bcSmrg 10.*) 1094b0a0317aSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10950f1ac3bcSmrg esac 10960f1ac3bcSmrg ;; 10970f1ac3bcSmrg esac 1098b0a0317aSmrg if test yes = "$lt_cv_apple_cc_single_mod"; then 10990f1ac3bcSmrg _lt_dar_single_mod='$single_module' 11000f1ac3bcSmrg fi 1101b0a0317aSmrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 1102b0a0317aSmrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 11030f1ac3bcSmrg else 1104b0a0317aSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 11050f1ac3bcSmrg fi 1106b0a0317aSmrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 11070f1ac3bcSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 11080f1ac3bcSmrg else 11090f1ac3bcSmrg _lt_dsymutil= 11100f1ac3bcSmrg fi 11110f1ac3bcSmrg ;; 11120f1ac3bcSmrg esac 11133e6c936aSmrg]) 11144456fccdSmrg 11154456fccdSmrg 11160f1ac3bcSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 11170f1ac3bcSmrg# --------------------------------- 11180f1ac3bcSmrg# Checks for linker and compiler features on darwin 11190f1ac3bcSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 11200f1ac3bcSmrg[ 11210f1ac3bcSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11220f1ac3bcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11230f1ac3bcSmrg _LT_TAGVAR(hardcode_direct, $1)=no 11240f1ac3bcSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 11250f1ac3bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1126b0a0317aSmrg if test yes = "$lt_cv_ld_force_load"; then 1127b0a0317aSmrg _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\"`' 11280f1ac3bcSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 11290f1ac3bcSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 11300f1ac3bcSmrg else 11310f1ac3bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 11320f1ac3bcSmrg fi 11330f1ac3bcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1134b0a0317aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 11350f1ac3bcSmrg case $cc_basename in 1136b0a0317aSmrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 11370f1ac3bcSmrg *) _lt_dar_can_shared=$GCC ;; 11380f1ac3bcSmrg esac 1139b0a0317aSmrg if test yes = "$_lt_dar_can_shared"; then 11400f1ac3bcSmrg output_verbose_link_cmd=func_echo_all 1141b0a0317aSmrg _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" 1142b0a0317aSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1143b0a0317aSmrg _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" 1144b0a0317aSmrg _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" 11450f1ac3bcSmrg m4_if([$1], [CXX], 1146b0a0317aSmrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1147b0a0317aSmrg _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" 1148b0a0317aSmrg _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" 11490f1ac3bcSmrg fi 11500f1ac3bcSmrg],[]) 11510f1ac3bcSmrg else 11520f1ac3bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 11530f1ac3bcSmrg fi 1154ff63a143Smrg]) 1155521070a0Smrg 11560f1ac3bcSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 11570f1ac3bcSmrg# ---------------------------------- 11580f1ac3bcSmrg# Links a minimal program and checks the executable 11590f1ac3bcSmrg# for the system default hardcoded library path. In most cases, 11600f1ac3bcSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 11610f1ac3bcSmrg# the location of the communication and MPI libs are included too. 11620f1ac3bcSmrg# If we don't find anything, use the default library path according 11630f1ac3bcSmrg# to the aix ld manual. 11640f1ac3bcSmrg# Store the results from the different compilers for each TAGNAME. 11650f1ac3bcSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 11660f1ac3bcSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11670f1ac3bcSmrg[m4_require([_LT_DECL_SED])dnl 1168b0a0317aSmrgif test set = "${lt_cv_aix_libpath+set}"; then 11690f1ac3bcSmrg aix_libpath=$lt_cv_aix_libpath 11700f1ac3bcSmrgelse 11710f1ac3bcSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 11720f1ac3bcSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 11730f1ac3bcSmrg lt_aix_libpath_sed='[ 11740f1ac3bcSmrg /Import File Strings/,/^$/ { 11750f1ac3bcSmrg /^0/ { 11760f1ac3bcSmrg s/^0 *\([^ ]*\) *$/\1/ 11770f1ac3bcSmrg p 11780f1ac3bcSmrg } 11790f1ac3bcSmrg }]' 11800f1ac3bcSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11810f1ac3bcSmrg # Check for a 64-bit object if we didn't find anything. 11820f1ac3bcSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11830f1ac3bcSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11840f1ac3bcSmrg fi],[]) 11850f1ac3bcSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1186b0a0317aSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 11870f1ac3bcSmrg fi 11880f1ac3bcSmrg ]) 11890f1ac3bcSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 11900f1ac3bcSmrgfi 11910f1ac3bcSmrg])# _LT_SYS_MODULE_PATH_AIX 1192521070a0Smrg 1193521070a0Smrg 11940f1ac3bcSmrg# _LT_SHELL_INIT(ARG) 11950f1ac3bcSmrg# ------------------- 11960f1ac3bcSmrgm4_define([_LT_SHELL_INIT], 11970f1ac3bcSmrg[m4_divert_text([M4SH-INIT], [$1 11980f1ac3bcSmrg])])# _LT_SHELL_INIT 1199521070a0Smrg 1200521070a0Smrg 1201521070a0Smrg 12020f1ac3bcSmrg# _LT_PROG_ECHO_BACKSLASH 12030f1ac3bcSmrg# ----------------------- 12040f1ac3bcSmrg# Find how we can fake an echo command that does not interpret backslash. 12050f1ac3bcSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 1206b0a0317aSmrg# of the generated configure script that will find a shell with a builtin 1207b0a0317aSmrg# printf (that we can use as an echo command). 12080f1ac3bcSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 12090f1ac3bcSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12100f1ac3bcSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12110f1ac3bcSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1212521070a0Smrg 12130f1ac3bcSmrgAC_MSG_CHECKING([how to print strings]) 12140f1ac3bcSmrg# Test print first, because it will be a builtin if present. 12150f1ac3bcSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 12160f1ac3bcSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 12170f1ac3bcSmrg ECHO='print -r --' 12180f1ac3bcSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 12190f1ac3bcSmrg ECHO='printf %s\n' 12200f1ac3bcSmrgelse 12210f1ac3bcSmrg # Use this function as a fallback that always works. 12220f1ac3bcSmrg func_fallback_echo () 12230f1ac3bcSmrg { 12240f1ac3bcSmrg eval 'cat <<_LTECHO_EOF 12250f1ac3bcSmrg$[]1 12260f1ac3bcSmrg_LTECHO_EOF' 12270f1ac3bcSmrg } 12280f1ac3bcSmrg ECHO='func_fallback_echo' 12290f1ac3bcSmrgfi 1230521070a0Smrg 12310f1ac3bcSmrg# func_echo_all arg... 12320f1ac3bcSmrg# Invoke $ECHO with all args, space-separated. 12330f1ac3bcSmrgfunc_echo_all () 12340f1ac3bcSmrg{ 1235b0a0317aSmrg $ECHO "$*" 12360f1ac3bcSmrg} 1237521070a0Smrg 1238b0a0317aSmrgcase $ECHO in 12390f1ac3bcSmrg printf*) AC_MSG_RESULT([printf]) ;; 12400f1ac3bcSmrg print*) AC_MSG_RESULT([print -r]) ;; 12410f1ac3bcSmrg *) AC_MSG_RESULT([cat]) ;; 12420f1ac3bcSmrgesac 1243521070a0Smrg 12440f1ac3bcSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 12450f1ac3bcSmrg[_AS_DETECT_SUGGESTED([ 12460f1ac3bcSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 12470f1ac3bcSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12480f1ac3bcSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12490f1ac3bcSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12500f1ac3bcSmrg PATH=/empty FPATH=/empty; export PATH FPATH 12510f1ac3bcSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 12520f1ac3bcSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1253521070a0Smrg 12540f1ac3bcSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12550f1ac3bcSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12560f1ac3bcSmrg])# _LT_PROG_ECHO_BACKSLASH 1257521070a0Smrg 1258521070a0Smrg 12590f1ac3bcSmrg# _LT_WITH_SYSROOT 12600f1ac3bcSmrg# ---------------- 12610f1ac3bcSmrgAC_DEFUN([_LT_WITH_SYSROOT], 12620f1ac3bcSmrg[AC_MSG_CHECKING([for sysroot]) 12630f1ac3bcSmrgAC_ARG_WITH([sysroot], 1264b0a0317aSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1265b0a0317aSmrg [Search for dependent libraries within DIR (or the compiler's sysroot 1266b0a0317aSmrg if not specified).])], 12670f1ac3bcSmrg[], [with_sysroot=no]) 12683e6c936aSmrg 12690f1ac3bcSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 12700f1ac3bcSmrgdnl in case the user passed a directory name. 12710f1ac3bcSmrglt_sysroot= 1272b0a0317aSmrgcase $with_sysroot in #( 12730f1ac3bcSmrg yes) 1274b0a0317aSmrg if test yes = "$GCC"; then 12750f1ac3bcSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 12760f1ac3bcSmrg fi 12770f1ac3bcSmrg ;; #( 12780f1ac3bcSmrg /*) 12790f1ac3bcSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 12800f1ac3bcSmrg ;; #( 12810f1ac3bcSmrg no|'') 12820f1ac3bcSmrg ;; #( 12830f1ac3bcSmrg *) 1284b0a0317aSmrg AC_MSG_RESULT([$with_sysroot]) 12850f1ac3bcSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 12860f1ac3bcSmrg ;; 12870f1ac3bcSmrgesac 12883e6c936aSmrg 12890f1ac3bcSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 12900f1ac3bcSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1291b0a0317aSmrg[dependent libraries, and where our libraries should be installed.])]) 12923e6c936aSmrg 12930f1ac3bcSmrg# _LT_ENABLE_LOCK 12940f1ac3bcSmrg# --------------- 12950f1ac3bcSmrgm4_defun([_LT_ENABLE_LOCK], 12960f1ac3bcSmrg[AC_ARG_ENABLE([libtool-lock], 12970f1ac3bcSmrg [AS_HELP_STRING([--disable-libtool-lock], 12980f1ac3bcSmrg [avoid locking (might break parallel builds)])]) 1299b0a0317aSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 13000f1ac3bcSmrg 13010f1ac3bcSmrg# Some flags need to be propagated to the compiler or linker for good 13020f1ac3bcSmrg# libtool support. 13030f1ac3bcSmrgcase $host in 13040f1ac3bcSmrgia64-*-hpux*) 1305b0a0317aSmrg # Find out what ABI is being produced by ac_compile, and set mode 1306b0a0317aSmrg # options accordingly. 13070f1ac3bcSmrg echo 'int i;' > conftest.$ac_ext 13080f1ac3bcSmrg if AC_TRY_EVAL(ac_compile); then 13090f1ac3bcSmrg case `/usr/bin/file conftest.$ac_objext` in 13100f1ac3bcSmrg *ELF-32*) 1311b0a0317aSmrg HPUX_IA64_MODE=32 13120f1ac3bcSmrg ;; 13130f1ac3bcSmrg *ELF-64*) 1314b0a0317aSmrg HPUX_IA64_MODE=64 13150f1ac3bcSmrg ;; 13163e6c936aSmrg esac 13170f1ac3bcSmrg fi 13180f1ac3bcSmrg rm -rf conftest* 13190f1ac3bcSmrg ;; 13200f1ac3bcSmrg*-*-irix6*) 1321b0a0317aSmrg # Find out what ABI is being produced by ac_compile, and set linker 1322b0a0317aSmrg # options accordingly. 13230f1ac3bcSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13240f1ac3bcSmrg if AC_TRY_EVAL(ac_compile); then 1325b0a0317aSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 13260f1ac3bcSmrg case `/usr/bin/file conftest.$ac_objext` in 13270f1ac3bcSmrg *32-bit*) 13280f1ac3bcSmrg LD="${LD-ld} -melf32bsmip" 13290f1ac3bcSmrg ;; 13300f1ac3bcSmrg *N32*) 13310f1ac3bcSmrg LD="${LD-ld} -melf32bmipn32" 13320f1ac3bcSmrg ;; 13330f1ac3bcSmrg *64-bit*) 13340f1ac3bcSmrg LD="${LD-ld} -melf64bmip" 13350f1ac3bcSmrg ;; 13360f1ac3bcSmrg esac 13370f1ac3bcSmrg else 13380f1ac3bcSmrg case `/usr/bin/file conftest.$ac_objext` in 13390f1ac3bcSmrg *32-bit*) 13400f1ac3bcSmrg LD="${LD-ld} -32" 13410f1ac3bcSmrg ;; 13420f1ac3bcSmrg *N32*) 13430f1ac3bcSmrg LD="${LD-ld} -n32" 13440f1ac3bcSmrg ;; 13450f1ac3bcSmrg *64-bit*) 13460f1ac3bcSmrg LD="${LD-ld} -64" 13470f1ac3bcSmrg ;; 13480f1ac3bcSmrg esac 13490f1ac3bcSmrg fi 13500f1ac3bcSmrg fi 13510f1ac3bcSmrg rm -rf conftest* 13520f1ac3bcSmrg ;; 13533e6c936aSmrg 1354b0a0317aSmrgmips64*-*linux*) 1355b0a0317aSmrg # Find out what ABI is being produced by ac_compile, and set linker 1356b0a0317aSmrg # options accordingly. 1357b0a0317aSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1358b0a0317aSmrg if AC_TRY_EVAL(ac_compile); then 1359b0a0317aSmrg emul=elf 1360b0a0317aSmrg case `/usr/bin/file conftest.$ac_objext` in 1361b0a0317aSmrg *32-bit*) 1362b0a0317aSmrg emul="${emul}32" 1363b0a0317aSmrg ;; 1364b0a0317aSmrg *64-bit*) 1365b0a0317aSmrg emul="${emul}64" 1366b0a0317aSmrg ;; 1367b0a0317aSmrg esac 1368b0a0317aSmrg case `/usr/bin/file conftest.$ac_objext` in 1369b0a0317aSmrg *MSB*) 1370b0a0317aSmrg emul="${emul}btsmip" 1371b0a0317aSmrg ;; 1372b0a0317aSmrg *LSB*) 1373b0a0317aSmrg emul="${emul}ltsmip" 1374b0a0317aSmrg ;; 1375b0a0317aSmrg esac 1376b0a0317aSmrg case `/usr/bin/file conftest.$ac_objext` in 1377b0a0317aSmrg *N32*) 1378b0a0317aSmrg emul="${emul}n32" 1379b0a0317aSmrg ;; 1380b0a0317aSmrg esac 1381b0a0317aSmrg LD="${LD-ld} -m $emul" 1382b0a0317aSmrg fi 1383b0a0317aSmrg rm -rf conftest* 1384b0a0317aSmrg ;; 1385b0a0317aSmrg 13860f1ac3bcSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 13870f1ac3bcSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1388b0a0317aSmrg # Find out what ABI is being produced by ac_compile, and set linker 1389b0a0317aSmrg # options accordingly. Note that the listed cases only cover the 1390b0a0317aSmrg # situations where additional linker options are needed (such as when 1391b0a0317aSmrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1392b0a0317aSmrg # vice versa); the common cases where no linker options are needed do 1393b0a0317aSmrg # not appear in the list. 13940f1ac3bcSmrg echo 'int i;' > conftest.$ac_ext 13950f1ac3bcSmrg if AC_TRY_EVAL(ac_compile); then 13960f1ac3bcSmrg case `/usr/bin/file conftest.o` in 13970f1ac3bcSmrg *32-bit*) 13980f1ac3bcSmrg case $host in 13990f1ac3bcSmrg x86_64-*kfreebsd*-gnu) 14000f1ac3bcSmrg LD="${LD-ld} -m elf_i386_fbsd" 14010f1ac3bcSmrg ;; 14020f1ac3bcSmrg x86_64-*linux*) 14030f1ac3bcSmrg case `/usr/bin/file conftest.o` in 14040f1ac3bcSmrg *x86-64*) 14050f1ac3bcSmrg LD="${LD-ld} -m elf32_x86_64" 14060f1ac3bcSmrg ;; 14070f1ac3bcSmrg *) 14080f1ac3bcSmrg LD="${LD-ld} -m elf_i386" 14090f1ac3bcSmrg ;; 14100f1ac3bcSmrg esac 14110f1ac3bcSmrg ;; 1412b0a0317aSmrg powerpc64le-*linux*) 14130f1ac3bcSmrg LD="${LD-ld} -m elf32lppclinux" 14140f1ac3bcSmrg ;; 1415b0a0317aSmrg powerpc64-*linux*) 14160f1ac3bcSmrg LD="${LD-ld} -m elf32ppclinux" 14170f1ac3bcSmrg ;; 14180f1ac3bcSmrg s390x-*linux*) 14190f1ac3bcSmrg LD="${LD-ld} -m elf_s390" 14200f1ac3bcSmrg ;; 14210f1ac3bcSmrg sparc64-*linux*) 14220f1ac3bcSmrg LD="${LD-ld} -m elf32_sparc" 14230f1ac3bcSmrg ;; 14240f1ac3bcSmrg esac 14250f1ac3bcSmrg ;; 14260f1ac3bcSmrg *64-bit*) 14270f1ac3bcSmrg case $host in 14280f1ac3bcSmrg x86_64-*kfreebsd*-gnu) 14290f1ac3bcSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 14300f1ac3bcSmrg ;; 14310f1ac3bcSmrg x86_64-*linux*) 14320f1ac3bcSmrg LD="${LD-ld} -m elf_x86_64" 14330f1ac3bcSmrg ;; 1434b0a0317aSmrg powerpcle-*linux*) 14350f1ac3bcSmrg LD="${LD-ld} -m elf64lppc" 14360f1ac3bcSmrg ;; 1437b0a0317aSmrg powerpc-*linux*) 14380f1ac3bcSmrg LD="${LD-ld} -m elf64ppc" 14390f1ac3bcSmrg ;; 14400f1ac3bcSmrg s390*-*linux*|s390*-*tpf*) 14410f1ac3bcSmrg LD="${LD-ld} -m elf64_s390" 14420f1ac3bcSmrg ;; 14430f1ac3bcSmrg sparc*-*linux*) 14440f1ac3bcSmrg LD="${LD-ld} -m elf64_sparc" 14450f1ac3bcSmrg ;; 14460f1ac3bcSmrg esac 14470f1ac3bcSmrg ;; 14483e6c936aSmrg esac 14490f1ac3bcSmrg fi 14500f1ac3bcSmrg rm -rf conftest* 14510f1ac3bcSmrg ;; 14523e6c936aSmrg 14530f1ac3bcSmrg*-*-sco3.2v5*) 14540f1ac3bcSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1455b0a0317aSmrg SAVE_CFLAGS=$CFLAGS 14560f1ac3bcSmrg CFLAGS="$CFLAGS -belf" 14570f1ac3bcSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 14580f1ac3bcSmrg [AC_LANG_PUSH(C) 14590f1ac3bcSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 14600f1ac3bcSmrg AC_LANG_POP]) 1461b0a0317aSmrg if test yes != "$lt_cv_cc_needs_belf"; then 14620f1ac3bcSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1463b0a0317aSmrg CFLAGS=$SAVE_CFLAGS 14640f1ac3bcSmrg fi 14650f1ac3bcSmrg ;; 14660f1ac3bcSmrg*-*solaris*) 1467b0a0317aSmrg # Find out what ABI is being produced by ac_compile, and set linker 1468b0a0317aSmrg # options accordingly. 14690f1ac3bcSmrg echo 'int i;' > conftest.$ac_ext 14700f1ac3bcSmrg if AC_TRY_EVAL(ac_compile); then 14710f1ac3bcSmrg case `/usr/bin/file conftest.o` in 14720f1ac3bcSmrg *64-bit*) 14730f1ac3bcSmrg case $lt_cv_prog_gnu_ld in 14740f1ac3bcSmrg yes*) 14750f1ac3bcSmrg case $host in 1476b0a0317aSmrg i?86-*-solaris*|x86_64-*-solaris*) 14770f1ac3bcSmrg LD="${LD-ld} -m elf_x86_64" 14780f1ac3bcSmrg ;; 14790f1ac3bcSmrg sparc*-*-solaris*) 14800f1ac3bcSmrg LD="${LD-ld} -m elf64_sparc" 14810f1ac3bcSmrg ;; 14820f1ac3bcSmrg esac 14830f1ac3bcSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 14840f1ac3bcSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1485b0a0317aSmrg LD=${LD-ld}_sol2 14860f1ac3bcSmrg fi 14870f1ac3bcSmrg ;; 14880f1ac3bcSmrg *) 14890f1ac3bcSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14900f1ac3bcSmrg LD="${LD-ld} -64" 14910f1ac3bcSmrg fi 14920f1ac3bcSmrg ;; 14930f1ac3bcSmrg esac 14940f1ac3bcSmrg ;; 14950f1ac3bcSmrg esac 14960f1ac3bcSmrg fi 14970f1ac3bcSmrg rm -rf conftest* 14980f1ac3bcSmrg ;; 14990f1ac3bcSmrgesac 1500521070a0Smrg 1501b0a0317aSmrgneed_locks=$enable_libtool_lock 15020f1ac3bcSmrg])# _LT_ENABLE_LOCK 1503521070a0Smrg 1504521070a0Smrg 15050f1ac3bcSmrg# _LT_PROG_AR 15060f1ac3bcSmrg# ----------- 15070f1ac3bcSmrgm4_defun([_LT_PROG_AR], 15080f1ac3bcSmrg[AC_CHECK_TOOLS(AR, [ar], false) 15090f1ac3bcSmrg: ${AR=ar} 15100f1ac3bcSmrg: ${AR_FLAGS=cru} 15110f1ac3bcSmrg_LT_DECL([], [AR], [1], [The archiver]) 15120f1ac3bcSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 151342d69509Smrg 15140f1ac3bcSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 15150f1ac3bcSmrg [lt_cv_ar_at_file=no 15160f1ac3bcSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 15170f1ac3bcSmrg [echo conftest.$ac_objext > conftest.lst 15180f1ac3bcSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 15190f1ac3bcSmrg AC_TRY_EVAL([lt_ar_try]) 1520b0a0317aSmrg if test 0 -eq "$ac_status"; then 15210f1ac3bcSmrg # Ensure the archiver fails upon bogus file names. 15220f1ac3bcSmrg rm -f conftest.$ac_objext libconftest.a 15230f1ac3bcSmrg AC_TRY_EVAL([lt_ar_try]) 1524b0a0317aSmrg if test 0 -ne "$ac_status"; then 15250f1ac3bcSmrg lt_cv_ar_at_file=@ 15260f1ac3bcSmrg fi 15270f1ac3bcSmrg fi 15280f1ac3bcSmrg rm -f conftest.* libconftest.a 15290f1ac3bcSmrg ]) 15300f1ac3bcSmrg ]) 153142d69509Smrg 1532b0a0317aSmrgif test no = "$lt_cv_ar_at_file"; then 15330f1ac3bcSmrg archiver_list_spec= 15340f1ac3bcSmrgelse 15350f1ac3bcSmrg archiver_list_spec=$lt_cv_ar_at_file 15360f1ac3bcSmrgfi 15370f1ac3bcSmrg_LT_DECL([], [archiver_list_spec], [1], 15380f1ac3bcSmrg [How to feed a file listing to the archiver]) 15390f1ac3bcSmrg])# _LT_PROG_AR 15404456fccdSmrg 15414456fccdSmrg 15420f1ac3bcSmrg# _LT_CMD_OLD_ARCHIVE 15430f1ac3bcSmrg# ------------------- 15440f1ac3bcSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 15450f1ac3bcSmrg[_LT_PROG_AR 15464456fccdSmrg 15470f1ac3bcSmrgAC_CHECK_TOOL(STRIP, strip, :) 15480f1ac3bcSmrgtest -z "$STRIP" && STRIP=: 15490f1ac3bcSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 15504456fccdSmrg 15510f1ac3bcSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 15520f1ac3bcSmrgtest -z "$RANLIB" && RANLIB=: 15530f1ac3bcSmrg_LT_DECL([], [RANLIB], [1], 15540f1ac3bcSmrg [Commands used to install an old-style archive]) 1555521070a0Smrg 15560f1ac3bcSmrg# Determine commands to create old-style static archives. 15570f1ac3bcSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 15580f1ac3bcSmrgold_postinstall_cmds='chmod 644 $oldlib' 15590f1ac3bcSmrgold_postuninstall_cmds= 15604456fccdSmrg 15610f1ac3bcSmrgif test -n "$RANLIB"; then 15620f1ac3bcSmrg case $host_os in 1563b0a0317aSmrg bitrig* | openbsd*) 15640f1ac3bcSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 15650f1ac3bcSmrg ;; 15660f1ac3bcSmrg *) 15670f1ac3bcSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 15680f1ac3bcSmrg ;; 15693e6c936aSmrg esac 15700f1ac3bcSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1571ff63a143Smrgfi 15724456fccdSmrg 15730f1ac3bcSmrgcase $host_os in 15740f1ac3bcSmrg darwin*) 15750f1ac3bcSmrg lock_old_archive_extraction=yes ;; 15760f1ac3bcSmrg *) 15770f1ac3bcSmrg lock_old_archive_extraction=no ;; 15780f1ac3bcSmrgesac 15790f1ac3bcSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 15800f1ac3bcSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15810f1ac3bcSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 15820f1ac3bcSmrg [Commands used to build an old-style archive]) 15830f1ac3bcSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 15840f1ac3bcSmrg [Whether to use a lock for old archive extraction]) 15850f1ac3bcSmrg])# _LT_CMD_OLD_ARCHIVE 15864456fccdSmrg 15874456fccdSmrg 15880f1ac3bcSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15890f1ac3bcSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 15900f1ac3bcSmrg# ---------------------------------------------------------------- 15910f1ac3bcSmrg# Check whether the given compiler option works 15920f1ac3bcSmrgAC_DEFUN([_LT_COMPILER_OPTION], 15933e6c936aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15940f1ac3bcSmrgm4_require([_LT_DECL_SED])dnl 15950f1ac3bcSmrgAC_CACHE_CHECK([$1], [$2], 15960f1ac3bcSmrg [$2=no 15970f1ac3bcSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 15980f1ac3bcSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1599b0a0317aSmrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 16000f1ac3bcSmrg # Insert the option either (1) after the last *FLAGS variable, or 16010f1ac3bcSmrg # (2) before a word containing "conftest.", or (3) at the end. 16020f1ac3bcSmrg # Note that $ac_compile itself does not contain backslashes and begins 16030f1ac3bcSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 16040f1ac3bcSmrg # The option is referenced via a variable to avoid confusing sed. 16050f1ac3bcSmrg lt_compile=`echo "$ac_compile" | $SED \ 16060f1ac3bcSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 16070f1ac3bcSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 16080f1ac3bcSmrg -e 's:$: $lt_compiler_flag:'` 16090f1ac3bcSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 16100f1ac3bcSmrg (eval "$lt_compile" 2>conftest.err) 16110f1ac3bcSmrg ac_status=$? 16120f1ac3bcSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 16130f1ac3bcSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 16140f1ac3bcSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 16150f1ac3bcSmrg # The compiler can only warn and ignore the option if not recognized 16160f1ac3bcSmrg # So say no if there are warnings other than the usual output. 16170f1ac3bcSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 16180f1ac3bcSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16190f1ac3bcSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 16200f1ac3bcSmrg $2=yes 16210f1ac3bcSmrg fi 16220f1ac3bcSmrg fi 16230f1ac3bcSmrg $RM conftest* 16240f1ac3bcSmrg]) 16254456fccdSmrg 1626b0a0317aSmrgif test yes = "[$]$2"; then 16270f1ac3bcSmrg m4_if([$5], , :, [$5]) 16280f1ac3bcSmrgelse 16290f1ac3bcSmrg m4_if([$6], , :, [$6]) 16303e6c936aSmrgfi 16310f1ac3bcSmrg])# _LT_COMPILER_OPTION 1632521070a0Smrg 16330f1ac3bcSmrg# Old name: 16340f1ac3bcSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 16350f1ac3bcSmrgdnl aclocal-1.4 backwards compatibility: 16360f1ac3bcSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1637521070a0Smrg 1638521070a0Smrg 16390f1ac3bcSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 16400f1ac3bcSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 16410f1ac3bcSmrg# ---------------------------------------------------- 16420f1ac3bcSmrg# Check whether the given linker option works 16430f1ac3bcSmrgAC_DEFUN([_LT_LINKER_OPTION], 16440f1ac3bcSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 16450f1ac3bcSmrgm4_require([_LT_DECL_SED])dnl 16460f1ac3bcSmrgAC_CACHE_CHECK([$1], [$2], 16470f1ac3bcSmrg [$2=no 1648b0a0317aSmrg save_LDFLAGS=$LDFLAGS 16490f1ac3bcSmrg LDFLAGS="$LDFLAGS $3" 16500f1ac3bcSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 16510f1ac3bcSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 16520f1ac3bcSmrg # The linker can only warn and ignore the option if not recognized 16530f1ac3bcSmrg # So say no if there are warnings 16540f1ac3bcSmrg if test -s conftest.err; then 16550f1ac3bcSmrg # Append any errors to the config.log. 16560f1ac3bcSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 16570f1ac3bcSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 16580f1ac3bcSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16590f1ac3bcSmrg if diff conftest.exp conftest.er2 >/dev/null; then 16600f1ac3bcSmrg $2=yes 16610f1ac3bcSmrg fi 16620f1ac3bcSmrg else 16630f1ac3bcSmrg $2=yes 16640f1ac3bcSmrg fi 16650f1ac3bcSmrg fi 16660f1ac3bcSmrg $RM -r conftest* 1667b0a0317aSmrg LDFLAGS=$save_LDFLAGS 16680f1ac3bcSmrg]) 16694456fccdSmrg 1670b0a0317aSmrgif test yes = "[$]$2"; then 16710f1ac3bcSmrg m4_if([$4], , :, [$4]) 16720f1ac3bcSmrgelse 16730f1ac3bcSmrg m4_if([$5], , :, [$5]) 16740f1ac3bcSmrgfi 16750f1ac3bcSmrg])# _LT_LINKER_OPTION 1676521070a0Smrg 16770f1ac3bcSmrg# Old name: 16780f1ac3bcSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16790f1ac3bcSmrgdnl aclocal-1.4 backwards compatibility: 16800f1ac3bcSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1681521070a0Smrg 1682521070a0Smrg 16830f1ac3bcSmrg# LT_CMD_MAX_LEN 16840f1ac3bcSmrg#--------------- 16850f1ac3bcSmrgAC_DEFUN([LT_CMD_MAX_LEN], 16860f1ac3bcSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16870f1ac3bcSmrg# find the maximum length of command line arguments 16880f1ac3bcSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 16890f1ac3bcSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 16900f1ac3bcSmrg i=0 1691b0a0317aSmrg teststring=ABCD 1692521070a0Smrg 16930f1ac3bcSmrg case $build_os in 16940f1ac3bcSmrg msdosdjgpp*) 16950f1ac3bcSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 16960f1ac3bcSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 16970f1ac3bcSmrg # during glob expansion). Even if it were fixed, the result of this 16980f1ac3bcSmrg # check would be larger than it should be. 16990f1ac3bcSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 17000f1ac3bcSmrg ;; 1701521070a0Smrg 17020f1ac3bcSmrg gnu*) 17030f1ac3bcSmrg # Under GNU Hurd, this test is not required because there is 17040f1ac3bcSmrg # no limit to the length of command line arguments. 17050f1ac3bcSmrg # Libtool will interpret -1 as no limit whatsoever 17060f1ac3bcSmrg lt_cv_sys_max_cmd_len=-1; 17070f1ac3bcSmrg ;; 17083e6c936aSmrg 17090f1ac3bcSmrg cygwin* | mingw* | cegcc*) 17100f1ac3bcSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 17110f1ac3bcSmrg # about 5 minutes as the teststring grows exponentially. 17120f1ac3bcSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 17130f1ac3bcSmrg # you end up with a "frozen" computer, even though with patience 17140f1ac3bcSmrg # the test eventually succeeds (with a max line length of 256k). 17150f1ac3bcSmrg # Instead, let's just punt: use the minimum linelength reported by 17160f1ac3bcSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 17170f1ac3bcSmrg lt_cv_sys_max_cmd_len=8192; 17180f1ac3bcSmrg ;; 171942d69509Smrg 17200f1ac3bcSmrg mint*) 17210f1ac3bcSmrg # On MiNT this can take a long time and run out of memory. 17220f1ac3bcSmrg lt_cv_sys_max_cmd_len=8192; 17230f1ac3bcSmrg ;; 17244456fccdSmrg 17250f1ac3bcSmrg amigaos*) 17260f1ac3bcSmrg # On AmigaOS with pdksh, this test takes hours, literally. 17270f1ac3bcSmrg # So we just punt and use a minimum line length of 8192. 17280f1ac3bcSmrg lt_cv_sys_max_cmd_len=8192; 17290f1ac3bcSmrg ;; 1730521070a0Smrg 1731b0a0317aSmrg bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 17320f1ac3bcSmrg # This has been around since 386BSD, at least. Likely further. 17330f1ac3bcSmrg if test -x /sbin/sysctl; then 17340f1ac3bcSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 17350f1ac3bcSmrg elif test -x /usr/sbin/sysctl; then 17360f1ac3bcSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 17370f1ac3bcSmrg else 17380f1ac3bcSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 17390f1ac3bcSmrg fi 17400f1ac3bcSmrg # And add a safety zone 17410f1ac3bcSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17420f1ac3bcSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17430f1ac3bcSmrg ;; 17443e6c936aSmrg 17450f1ac3bcSmrg interix*) 17460f1ac3bcSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 17470f1ac3bcSmrg lt_cv_sys_max_cmd_len=196608 17480f1ac3bcSmrg ;; 1749521070a0Smrg 17500f1ac3bcSmrg os2*) 17510f1ac3bcSmrg # The test takes a long time on OS/2. 17520f1ac3bcSmrg lt_cv_sys_max_cmd_len=8192 17530f1ac3bcSmrg ;; 1754521070a0Smrg 17550f1ac3bcSmrg osf*) 17560f1ac3bcSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 17570f1ac3bcSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 17580f1ac3bcSmrg # nice to cause kernel panics so lets avoid the loop below. 17590f1ac3bcSmrg # First set a reasonable default. 17600f1ac3bcSmrg lt_cv_sys_max_cmd_len=16384 17610f1ac3bcSmrg # 17620f1ac3bcSmrg if test -x /sbin/sysconfig; then 17630f1ac3bcSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 17640f1ac3bcSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 17650f1ac3bcSmrg esac 17660f1ac3bcSmrg fi 17670f1ac3bcSmrg ;; 17680f1ac3bcSmrg sco3.2v5*) 17690f1ac3bcSmrg lt_cv_sys_max_cmd_len=102400 17700f1ac3bcSmrg ;; 17710f1ac3bcSmrg sysv5* | sco5v6* | sysv4.2uw2*) 17720f1ac3bcSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 17730f1ac3bcSmrg if test -n "$kargmax"; then 17740f1ac3bcSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 17750f1ac3bcSmrg else 17760f1ac3bcSmrg lt_cv_sys_max_cmd_len=32768 17770f1ac3bcSmrg fi 17780f1ac3bcSmrg ;; 17790f1ac3bcSmrg *) 17800f1ac3bcSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 17810f1ac3bcSmrg if test -n "$lt_cv_sys_max_cmd_len" && \ 1782b0a0317aSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 17830f1ac3bcSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17840f1ac3bcSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17850f1ac3bcSmrg else 17860f1ac3bcSmrg # Make teststring a little bigger before we do anything with it. 17870f1ac3bcSmrg # a 1K string should be a reasonable start. 1788b0a0317aSmrg for i in 1 2 3 4 5 6 7 8; do 17890f1ac3bcSmrg teststring=$teststring$teststring 17900f1ac3bcSmrg done 17910f1ac3bcSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17920f1ac3bcSmrg # If test is not a shell built-in, we'll probably end up computing a 17930f1ac3bcSmrg # maximum length that is only half of the actual maximum length, but 17940f1ac3bcSmrg # we can't tell. 1795b0a0317aSmrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 17960f1ac3bcSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1797b0a0317aSmrg test 17 != "$i" # 1/2 MB should be enough 17980f1ac3bcSmrg do 17990f1ac3bcSmrg i=`expr $i + 1` 18000f1ac3bcSmrg teststring=$teststring$teststring 18010f1ac3bcSmrg done 18020f1ac3bcSmrg # Only check the string length outside the loop. 18030f1ac3bcSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 18040f1ac3bcSmrg teststring= 18050f1ac3bcSmrg # Add a significant safety factor because C++ compilers can tack on 18060f1ac3bcSmrg # massive amounts of additional arguments before passing them to the 18070f1ac3bcSmrg # linker. It appears as though 1/2 is a usable value. 18080f1ac3bcSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 18090f1ac3bcSmrg fi 18100f1ac3bcSmrg ;; 18110f1ac3bcSmrg esac 18120f1ac3bcSmrg]) 1813b0a0317aSmrgif test -n "$lt_cv_sys_max_cmd_len"; then 18140f1ac3bcSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 18150f1ac3bcSmrgelse 18160f1ac3bcSmrg AC_MSG_RESULT(none) 18170f1ac3bcSmrgfi 18180f1ac3bcSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 18190f1ac3bcSmrg_LT_DECL([], [max_cmd_len], [0], 18200f1ac3bcSmrg [What is the maximum length of a command?]) 18210f1ac3bcSmrg])# LT_CMD_MAX_LEN 1822521070a0Smrg 18230f1ac3bcSmrg# Old name: 18240f1ac3bcSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 18250f1ac3bcSmrgdnl aclocal-1.4 backwards compatibility: 18260f1ac3bcSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1827521070a0Smrg 1828521070a0Smrg 18290f1ac3bcSmrg# _LT_HEADER_DLFCN 18300f1ac3bcSmrg# ---------------- 18310f1ac3bcSmrgm4_defun([_LT_HEADER_DLFCN], 18320f1ac3bcSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 18330f1ac3bcSmrg])# _LT_HEADER_DLFCN 1834521070a0Smrg 1835521070a0Smrg 18360f1ac3bcSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 18370f1ac3bcSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 18380f1ac3bcSmrg# ---------------------------------------------------------------- 18390f1ac3bcSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 18400f1ac3bcSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1841b0a0317aSmrgif test yes = "$cross_compiling"; then : 18420f1ac3bcSmrg [$4] 18430f1ac3bcSmrgelse 18440f1ac3bcSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 18450f1ac3bcSmrg lt_status=$lt_dlunknown 18460f1ac3bcSmrg cat > conftest.$ac_ext <<_LT_EOF 18470f1ac3bcSmrg[#line $LINENO "configure" 18480f1ac3bcSmrg#include "confdefs.h" 1849521070a0Smrg 18500f1ac3bcSmrg#if HAVE_DLFCN_H 18510f1ac3bcSmrg#include <dlfcn.h> 18520f1ac3bcSmrg#endif 1853521070a0Smrg 18540f1ac3bcSmrg#include <stdio.h> 1855521070a0Smrg 18560f1ac3bcSmrg#ifdef RTLD_GLOBAL 18570f1ac3bcSmrg# define LT_DLGLOBAL RTLD_GLOBAL 18580f1ac3bcSmrg#else 18590f1ac3bcSmrg# ifdef DL_GLOBAL 18600f1ac3bcSmrg# define LT_DLGLOBAL DL_GLOBAL 18610f1ac3bcSmrg# else 18620f1ac3bcSmrg# define LT_DLGLOBAL 0 18630f1ac3bcSmrg# endif 18640f1ac3bcSmrg#endif 1865521070a0Smrg 18660f1ac3bcSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 18670f1ac3bcSmrg find out it does not work in some platform. */ 18680f1ac3bcSmrg#ifndef LT_DLLAZY_OR_NOW 18690f1ac3bcSmrg# ifdef RTLD_LAZY 18700f1ac3bcSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 18710f1ac3bcSmrg# else 18720f1ac3bcSmrg# ifdef DL_LAZY 18730f1ac3bcSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 18740f1ac3bcSmrg# else 18750f1ac3bcSmrg# ifdef RTLD_NOW 18760f1ac3bcSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 18770f1ac3bcSmrg# else 18780f1ac3bcSmrg# ifdef DL_NOW 18790f1ac3bcSmrg# define LT_DLLAZY_OR_NOW DL_NOW 18800f1ac3bcSmrg# else 18810f1ac3bcSmrg# define LT_DLLAZY_OR_NOW 0 18820f1ac3bcSmrg# endif 18830f1ac3bcSmrg# endif 18840f1ac3bcSmrg# endif 18850f1ac3bcSmrg# endif 18860f1ac3bcSmrg#endif 1887521070a0Smrg 1888b0a0317aSmrg/* When -fvisibility=hidden is used, assume the code has been annotated 18890f1ac3bcSmrg correspondingly for the symbols needed. */ 1890b0a0317aSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 18910f1ac3bcSmrgint fnord () __attribute__((visibility("default"))); 18920f1ac3bcSmrg#endif 1893521070a0Smrg 18940f1ac3bcSmrgint fnord () { return 42; } 18950f1ac3bcSmrgint main () 18960f1ac3bcSmrg{ 18970f1ac3bcSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 18980f1ac3bcSmrg int status = $lt_dlunknown; 1899521070a0Smrg 19000f1ac3bcSmrg if (self) 19010f1ac3bcSmrg { 19020f1ac3bcSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 19030f1ac3bcSmrg else 19040f1ac3bcSmrg { 19050f1ac3bcSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 19060f1ac3bcSmrg else puts (dlerror ()); 19070f1ac3bcSmrg } 19080f1ac3bcSmrg /* dlclose (self); */ 19090f1ac3bcSmrg } 19100f1ac3bcSmrg else 19110f1ac3bcSmrg puts (dlerror ()); 1912521070a0Smrg 19130f1ac3bcSmrg return status; 19140f1ac3bcSmrg}] 19150f1ac3bcSmrg_LT_EOF 1916b0a0317aSmrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 19170f1ac3bcSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 19180f1ac3bcSmrg lt_status=$? 19190f1ac3bcSmrg case x$lt_status in 19200f1ac3bcSmrg x$lt_dlno_uscore) $1 ;; 19210f1ac3bcSmrg x$lt_dlneed_uscore) $2 ;; 19220f1ac3bcSmrg x$lt_dlunknown|x*) $3 ;; 19230f1ac3bcSmrg esac 19240f1ac3bcSmrg else : 19250f1ac3bcSmrg # compilation failed 19260f1ac3bcSmrg $3 19270f1ac3bcSmrg fi 19280f1ac3bcSmrgfi 19290f1ac3bcSmrgrm -fr conftest* 19300f1ac3bcSmrg])# _LT_TRY_DLOPEN_SELF 1931521070a0Smrg 1932521070a0Smrg 19330f1ac3bcSmrg# LT_SYS_DLOPEN_SELF 19340f1ac3bcSmrg# ------------------ 19350f1ac3bcSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 19360f1ac3bcSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1937b0a0317aSmrgif test yes != "$enable_dlopen"; then 19380f1ac3bcSmrg enable_dlopen=unknown 19390f1ac3bcSmrg enable_dlopen_self=unknown 19400f1ac3bcSmrg enable_dlopen_self_static=unknown 19410f1ac3bcSmrgelse 19420f1ac3bcSmrg lt_cv_dlopen=no 19430f1ac3bcSmrg lt_cv_dlopen_libs= 1944521070a0Smrg 1945ff63a143Smrg case $host_os in 19460f1ac3bcSmrg beos*) 1947b0a0317aSmrg lt_cv_dlopen=load_add_on 19480f1ac3bcSmrg lt_cv_dlopen_libs= 19490f1ac3bcSmrg lt_cv_dlopen_self=yes 19500f1ac3bcSmrg ;; 1951521070a0Smrg 19520f1ac3bcSmrg mingw* | pw32* | cegcc*) 1953b0a0317aSmrg lt_cv_dlopen=LoadLibrary 19540f1ac3bcSmrg lt_cv_dlopen_libs= 19550f1ac3bcSmrg ;; 1956521070a0Smrg 19570f1ac3bcSmrg cygwin*) 1958b0a0317aSmrg lt_cv_dlopen=dlopen 19590f1ac3bcSmrg lt_cv_dlopen_libs= 19600f1ac3bcSmrg ;; 1961521070a0Smrg 19620f1ac3bcSmrg darwin*) 1963b0a0317aSmrg # if libdl is installed we need to link against it 19640f1ac3bcSmrg AC_CHECK_LIB([dl], [dlopen], 1965b0a0317aSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1966b0a0317aSmrg lt_cv_dlopen=dyld 19670f1ac3bcSmrg lt_cv_dlopen_libs= 19680f1ac3bcSmrg lt_cv_dlopen_self=yes 19693e6c936aSmrg ]) 19703e6c936aSmrg ;; 19710f1ac3bcSmrg 1972b0a0317aSmrg tpf*) 1973b0a0317aSmrg # Don't try to run any link tests for TPF. We know it's impossible 1974b0a0317aSmrg # because TPF is a cross-compiler, and we know how we open DSOs. 1975b0a0317aSmrg lt_cv_dlopen=dlopen 1976b0a0317aSmrg lt_cv_dlopen_libs= 1977b0a0317aSmrg lt_cv_dlopen_self=no 1978b0a0317aSmrg ;; 1979b0a0317aSmrg 19800f1ac3bcSmrg *) 19810f1ac3bcSmrg AC_CHECK_FUNC([shl_load], 1982b0a0317aSmrg [lt_cv_dlopen=shl_load], 19830f1ac3bcSmrg [AC_CHECK_LIB([dld], [shl_load], 1984b0a0317aSmrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 19850f1ac3bcSmrg [AC_CHECK_FUNC([dlopen], 1986b0a0317aSmrg [lt_cv_dlopen=dlopen], 19870f1ac3bcSmrg [AC_CHECK_LIB([dl], [dlopen], 1988b0a0317aSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 19890f1ac3bcSmrg [AC_CHECK_LIB([svld], [dlopen], 1990b0a0317aSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 19910f1ac3bcSmrg [AC_CHECK_LIB([dld], [dld_link], 1992b0a0317aSmrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 19930f1ac3bcSmrg ]) 19940f1ac3bcSmrg ]) 19950f1ac3bcSmrg ]) 19960f1ac3bcSmrg ]) 19970f1ac3bcSmrg ]) 1998ff63a143Smrg ;; 1999ff63a143Smrg esac 2000521070a0Smrg 2001b0a0317aSmrg if test no = "$lt_cv_dlopen"; then 20020f1ac3bcSmrg enable_dlopen=no 2003b0a0317aSmrg else 2004b0a0317aSmrg enable_dlopen=yes 20053e6c936aSmrg fi 2006521070a0Smrg 20070f1ac3bcSmrg case $lt_cv_dlopen in 20080f1ac3bcSmrg dlopen) 2009b0a0317aSmrg save_CPPFLAGS=$CPPFLAGS 2010b0a0317aSmrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2011521070a0Smrg 2012b0a0317aSmrg save_LDFLAGS=$LDFLAGS 20130f1ac3bcSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2014521070a0Smrg 2015b0a0317aSmrg save_LIBS=$LIBS 20160f1ac3bcSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 2017521070a0Smrg 20180f1ac3bcSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 20190f1ac3bcSmrg lt_cv_dlopen_self, [dnl 20200f1ac3bcSmrg _LT_TRY_DLOPEN_SELF( 20210f1ac3bcSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 20220f1ac3bcSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 20230f1ac3bcSmrg ]) 2024521070a0Smrg 2025b0a0317aSmrg if test yes = "$lt_cv_dlopen_self"; then 20260f1ac3bcSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 20270f1ac3bcSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 20280f1ac3bcSmrg lt_cv_dlopen_self_static, [dnl 20290f1ac3bcSmrg _LT_TRY_DLOPEN_SELF( 20300f1ac3bcSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 20310f1ac3bcSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 20320f1ac3bcSmrg ]) 20330f1ac3bcSmrg fi 2034521070a0Smrg 2035b0a0317aSmrg CPPFLAGS=$save_CPPFLAGS 2036b0a0317aSmrg LDFLAGS=$save_LDFLAGS 2037b0a0317aSmrg LIBS=$save_LIBS 20380f1ac3bcSmrg ;; 20390f1ac3bcSmrg esac 2040521070a0Smrg 20410f1ac3bcSmrg case $lt_cv_dlopen_self in 20420f1ac3bcSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 20430f1ac3bcSmrg *) enable_dlopen_self=unknown ;; 20440f1ac3bcSmrg esac 2045521070a0Smrg 20460f1ac3bcSmrg case $lt_cv_dlopen_self_static in 20470f1ac3bcSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 20480f1ac3bcSmrg *) enable_dlopen_self_static=unknown ;; 20490f1ac3bcSmrg esac 20500f1ac3bcSmrgfi 20510f1ac3bcSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 20520f1ac3bcSmrg [Whether dlopen is supported]) 20530f1ac3bcSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 20540f1ac3bcSmrg [Whether dlopen of programs is supported]) 20550f1ac3bcSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 20560f1ac3bcSmrg [Whether dlopen of statically linked programs is supported]) 20570f1ac3bcSmrg])# LT_SYS_DLOPEN_SELF 2058521070a0Smrg 20590f1ac3bcSmrg# Old name: 20600f1ac3bcSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 20610f1ac3bcSmrgdnl aclocal-1.4 backwards compatibility: 20620f1ac3bcSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2063521070a0Smrg 2064521070a0Smrg 20650f1ac3bcSmrg# _LT_COMPILER_C_O([TAGNAME]) 20660f1ac3bcSmrg# --------------------------- 20670f1ac3bcSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 20680f1ac3bcSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 20690f1ac3bcSmrgm4_defun([_LT_COMPILER_C_O], 20700f1ac3bcSmrg[m4_require([_LT_DECL_SED])dnl 20710f1ac3bcSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20720f1ac3bcSmrgm4_require([_LT_TAG_COMPILER])dnl 20730f1ac3bcSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 20740f1ac3bcSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 20750f1ac3bcSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 20760f1ac3bcSmrg $RM -r conftest 2>/dev/null 20770f1ac3bcSmrg mkdir conftest 20780f1ac3bcSmrg cd conftest 20790f1ac3bcSmrg mkdir out 20800f1ac3bcSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 20813e6c936aSmrg 20820f1ac3bcSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 20830f1ac3bcSmrg # Insert the option either (1) after the last *FLAGS variable, or 20840f1ac3bcSmrg # (2) before a word containing "conftest.", or (3) at the end. 20850f1ac3bcSmrg # Note that $ac_compile itself does not contain backslashes and begins 20860f1ac3bcSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 20870f1ac3bcSmrg lt_compile=`echo "$ac_compile" | $SED \ 20880f1ac3bcSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 20890f1ac3bcSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 20900f1ac3bcSmrg -e 's:$: $lt_compiler_flag:'` 20910f1ac3bcSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 20920f1ac3bcSmrg (eval "$lt_compile" 2>out/conftest.err) 20930f1ac3bcSmrg ac_status=$? 20940f1ac3bcSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 20950f1ac3bcSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 20960f1ac3bcSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 20970f1ac3bcSmrg then 20980f1ac3bcSmrg # The compiler can only warn and ignore the option if not recognized 20990f1ac3bcSmrg # So say no if there are warnings 21000f1ac3bcSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 21010f1ac3bcSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 21020f1ac3bcSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 21030f1ac3bcSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 21040f1ac3bcSmrg fi 21053e6c936aSmrg fi 21060f1ac3bcSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 21070f1ac3bcSmrg $RM conftest* 21080f1ac3bcSmrg # SGI C++ compiler will create directory out/ii_files/ for 21090f1ac3bcSmrg # template instantiation 21100f1ac3bcSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 21110f1ac3bcSmrg $RM out/* && rmdir out 21120f1ac3bcSmrg cd .. 21130f1ac3bcSmrg $RM -r conftest 21140f1ac3bcSmrg $RM conftest* 21150f1ac3bcSmrg]) 21160f1ac3bcSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 21170f1ac3bcSmrg [Does compiler simultaneously support -c and -o options?]) 21180f1ac3bcSmrg])# _LT_COMPILER_C_O 2119521070a0Smrg 2120521070a0Smrg 21210f1ac3bcSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 21220f1ac3bcSmrg# ---------------------------------- 21230f1ac3bcSmrg# Check to see if we can do hard links to lock some files if needed 21240f1ac3bcSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 21250f1ac3bcSmrg[m4_require([_LT_ENABLE_LOCK])dnl 21260f1ac3bcSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21270f1ac3bcSmrg_LT_COMPILER_C_O([$1]) 2128521070a0Smrg 2129b0a0317aSmrghard_links=nottested 2130b0a0317aSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 21310f1ac3bcSmrg # do not overwrite the value of need_locks provided by the user 21320f1ac3bcSmrg AC_MSG_CHECKING([if we can lock with hard links]) 21330f1ac3bcSmrg hard_links=yes 21340f1ac3bcSmrg $RM conftest* 21350f1ac3bcSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21360f1ac3bcSmrg touch conftest.a 21370f1ac3bcSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 21380f1ac3bcSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21390f1ac3bcSmrg AC_MSG_RESULT([$hard_links]) 2140b0a0317aSmrg if test no = "$hard_links"; then 2141b0a0317aSmrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 21420f1ac3bcSmrg need_locks=warn 2143ff63a143Smrg fi 21440f1ac3bcSmrgelse 21450f1ac3bcSmrg need_locks=no 21460f1ac3bcSmrgfi 21470f1ac3bcSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 21480f1ac3bcSmrg])# _LT_COMPILER_FILE_LOCKS 2149521070a0Smrg 2150521070a0Smrg 21510f1ac3bcSmrg# _LT_CHECK_OBJDIR 21520f1ac3bcSmrg# ---------------- 21530f1ac3bcSmrgm4_defun([_LT_CHECK_OBJDIR], 21540f1ac3bcSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 21550f1ac3bcSmrg[rm -f .libs 2>/dev/null 21560f1ac3bcSmrgmkdir .libs 2>/dev/null 21570f1ac3bcSmrgif test -d .libs; then 21580f1ac3bcSmrg lt_cv_objdir=.libs 21593e6c936aSmrgelse 21600f1ac3bcSmrg # MS-DOS does not allow filenames that begin with a dot. 21610f1ac3bcSmrg lt_cv_objdir=_libs 2162ff63a143Smrgfi 21630f1ac3bcSmrgrmdir .libs 2>/dev/null]) 21640f1ac3bcSmrgobjdir=$lt_cv_objdir 21650f1ac3bcSmrg_LT_DECL([], [objdir], [0], 21660f1ac3bcSmrg [The name of the directory that contains temporary libtool files])dnl 21670f1ac3bcSmrgm4_pattern_allow([LT_OBJDIR])dnl 2168b0a0317aSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2169b0a0317aSmrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 21700f1ac3bcSmrg])# _LT_CHECK_OBJDIR 2171521070a0Smrg 2172521070a0Smrg 21730f1ac3bcSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 21740f1ac3bcSmrg# -------------------------------------- 21750f1ac3bcSmrg# Check hardcoding attributes. 21760f1ac3bcSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 21770f1ac3bcSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 21780f1ac3bcSmrg_LT_TAGVAR(hardcode_action, $1)= 21790f1ac3bcSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 21800f1ac3bcSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2181b0a0317aSmrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2182521070a0Smrg 21830f1ac3bcSmrg # We can hardcode non-existent directories. 2184b0a0317aSmrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 21850f1ac3bcSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 21860f1ac3bcSmrg # have to relink, otherwise we might link with an installed library 21870f1ac3bcSmrg # when we should be linking with a yet-to-be-installed one 2188b0a0317aSmrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2189b0a0317aSmrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 21900f1ac3bcSmrg # Linking always hardcodes the temporary library directory. 21910f1ac3bcSmrg _LT_TAGVAR(hardcode_action, $1)=relink 21920f1ac3bcSmrg else 21930f1ac3bcSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 21940f1ac3bcSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 21950f1ac3bcSmrg fi 21960f1ac3bcSmrgelse 21970f1ac3bcSmrg # We cannot hardcode anything, or else we can only hardcode existing 21980f1ac3bcSmrg # directories. 21990f1ac3bcSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 22000f1ac3bcSmrgfi 22010f1ac3bcSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2202521070a0Smrg 2203b0a0317aSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2204b0a0317aSmrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 22050f1ac3bcSmrg # Fast installation is not supported 22060f1ac3bcSmrg enable_fast_install=no 2207b0a0317aSmrgelif test yes = "$shlibpath_overrides_runpath" || 2208b0a0317aSmrg test no = "$enable_shared"; then 22090f1ac3bcSmrg # Fast installation is not necessary 22100f1ac3bcSmrg enable_fast_install=needless 22110f1ac3bcSmrgfi 22120f1ac3bcSmrg_LT_TAGDECL([], [hardcode_action], [0], 22130f1ac3bcSmrg [How to hardcode a shared library path into an executable]) 22140f1ac3bcSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2215521070a0Smrg 2216521070a0Smrg 22170f1ac3bcSmrg# _LT_CMD_STRIPLIB 22180f1ac3bcSmrg# ---------------- 22190f1ac3bcSmrgm4_defun([_LT_CMD_STRIPLIB], 22200f1ac3bcSmrg[m4_require([_LT_DECL_EGREP]) 22210f1ac3bcSmrgstriplib= 22220f1ac3bcSmrgold_striplib= 22230f1ac3bcSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 22240f1ac3bcSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 22250f1ac3bcSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 22260f1ac3bcSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 22270f1ac3bcSmrg AC_MSG_RESULT([yes]) 22280f1ac3bcSmrgelse 22290f1ac3bcSmrg# FIXME - insert some real tests, host_os isn't really good enough 22303e6c936aSmrg case $host_os in 22310f1ac3bcSmrg darwin*) 2232b0a0317aSmrg if test -n "$STRIP"; then 22330f1ac3bcSmrg striplib="$STRIP -x" 22340f1ac3bcSmrg old_striplib="$STRIP -S" 22350f1ac3bcSmrg AC_MSG_RESULT([yes]) 22360f1ac3bcSmrg else 22370f1ac3bcSmrg AC_MSG_RESULT([no]) 22380f1ac3bcSmrg fi 22393e6c936aSmrg ;; 22403e6c936aSmrg *) 22410f1ac3bcSmrg AC_MSG_RESULT([no]) 22423e6c936aSmrg ;; 22433e6c936aSmrg esac 22443e6c936aSmrgfi 22450f1ac3bcSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 22460f1ac3bcSmrg_LT_DECL([], [striplib], [1]) 22470f1ac3bcSmrg])# _LT_CMD_STRIPLIB 22483e6c936aSmrg 22493e6c936aSmrg 2250b0a0317aSmrg# _LT_PREPARE_MUNGE_PATH_LIST 2251b0a0317aSmrg# --------------------------- 2252b0a0317aSmrg# Make sure func_munge_path_list() is defined correctly. 2253b0a0317aSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2254b0a0317aSmrg[[# func_munge_path_list VARIABLE PATH 2255b0a0317aSmrg# ----------------------------------- 2256b0a0317aSmrg# VARIABLE is name of variable containing _space_ separated list of 2257b0a0317aSmrg# directories to be munged by the contents of PATH, which is string 2258b0a0317aSmrg# having a format: 2259b0a0317aSmrg# "DIR[:DIR]:" 2260b0a0317aSmrg# string "DIR[ DIR]" will be prepended to VARIABLE 2261b0a0317aSmrg# ":DIR[:DIR]" 2262b0a0317aSmrg# string "DIR[ DIR]" will be appended to VARIABLE 2263b0a0317aSmrg# "DIRP[:DIRP]::[DIRA:]DIRA" 2264b0a0317aSmrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2265b0a0317aSmrg# "DIRA[ DIRA]" will be appended to VARIABLE 2266b0a0317aSmrg# "DIR[:DIR]" 2267b0a0317aSmrg# VARIABLE will be replaced by "DIR[ DIR]" 2268b0a0317aSmrgfunc_munge_path_list () 2269b0a0317aSmrg{ 2270b0a0317aSmrg case x@S|@2 in 2271b0a0317aSmrg x) 2272b0a0317aSmrg ;; 2273b0a0317aSmrg *:) 2274b0a0317aSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2275b0a0317aSmrg ;; 2276b0a0317aSmrg x:*) 2277b0a0317aSmrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2278b0a0317aSmrg ;; 2279b0a0317aSmrg *::*) 2280b0a0317aSmrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2281b0a0317aSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2282b0a0317aSmrg ;; 2283b0a0317aSmrg *) 2284b0a0317aSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2285b0a0317aSmrg ;; 2286b0a0317aSmrg esac 2287b0a0317aSmrg} 2288b0a0317aSmrg]])# _LT_PREPARE_PATH_LIST 2289b0a0317aSmrg 2290b0a0317aSmrg 22910f1ac3bcSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 22920f1ac3bcSmrg# ----------------------------- 22930f1ac3bcSmrg# PORTME Fill in your ld.so characteristics 22940f1ac3bcSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 22950f1ac3bcSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 22960f1ac3bcSmrgm4_require([_LT_DECL_EGREP])dnl 22970f1ac3bcSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 22980f1ac3bcSmrgm4_require([_LT_DECL_OBJDUMP])dnl 22993e6c936aSmrgm4_require([_LT_DECL_SED])dnl 23000f1ac3bcSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2301b0a0317aSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 23020f1ac3bcSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 23030f1ac3bcSmrgm4_if([$1], 23040f1ac3bcSmrg [], [ 2305b0a0317aSmrgif test yes = "$GCC"; then 23060f1ac3bcSmrg case $host_os in 2307b0a0317aSmrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2308b0a0317aSmrg *) lt_awk_arg='/^libraries:/' ;; 23090f1ac3bcSmrg esac 23100f1ac3bcSmrg case $host_os in 2311b0a0317aSmrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2312b0a0317aSmrg *) lt_sed_strip_eq='s|=/|/|g' ;; 23130f1ac3bcSmrg esac 23140f1ac3bcSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 23150f1ac3bcSmrg case $lt_search_path_spec in 23160f1ac3bcSmrg *\;*) 23170f1ac3bcSmrg # if the path contains ";" then we assume it to be the separator 23180f1ac3bcSmrg # otherwise default to the standard path separator (i.e. ":") - it is 23190f1ac3bcSmrg # assumed that no part of a normal pathname contains ";" but that should 23200f1ac3bcSmrg # okay in the real world where ";" in dirpaths is itself problematic. 23210f1ac3bcSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 23220f1ac3bcSmrg ;; 23230f1ac3bcSmrg *) 23240f1ac3bcSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 23250f1ac3bcSmrg ;; 23260f1ac3bcSmrg esac 23270f1ac3bcSmrg # Ok, now we have the path, separated by spaces, we can step through it 2328b0a0317aSmrg # and add multilib dir if necessary... 23290f1ac3bcSmrg lt_tmp_lt_search_path_spec= 2330b0a0317aSmrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2331b0a0317aSmrg # ...but if some path component already ends with the multilib dir we assume 2332b0a0317aSmrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2333b0a0317aSmrg case "$lt_multi_os_dir; $lt_search_path_spec " in 2334b0a0317aSmrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2335b0a0317aSmrg lt_multi_os_dir= 2336b0a0317aSmrg ;; 2337b0a0317aSmrg esac 23380f1ac3bcSmrg for lt_sys_path in $lt_search_path_spec; do 2339b0a0317aSmrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 2340b0a0317aSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2341b0a0317aSmrg elif test -n "$lt_multi_os_dir"; then 23420f1ac3bcSmrg test -d "$lt_sys_path" && \ 23430f1ac3bcSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 23440f1ac3bcSmrg fi 23450f1ac3bcSmrg done 23460f1ac3bcSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2347b0a0317aSmrgBEGIN {RS = " "; FS = "/|\n";} { 2348b0a0317aSmrg lt_foo = ""; 2349b0a0317aSmrg lt_count = 0; 23500f1ac3bcSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 23510f1ac3bcSmrg if ($lt_i != "" && $lt_i != ".") { 23520f1ac3bcSmrg if ($lt_i == "..") { 23530f1ac3bcSmrg lt_count++; 23540f1ac3bcSmrg } else { 23550f1ac3bcSmrg if (lt_count == 0) { 2356b0a0317aSmrg lt_foo = "/" $lt_i lt_foo; 23570f1ac3bcSmrg } else { 23580f1ac3bcSmrg lt_count--; 23590f1ac3bcSmrg } 23600f1ac3bcSmrg } 23610f1ac3bcSmrg } 23620f1ac3bcSmrg } 23630f1ac3bcSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 23640f1ac3bcSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 23650f1ac3bcSmrg}'` 23660f1ac3bcSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 23670f1ac3bcSmrg # for these hosts. 23680f1ac3bcSmrg case $host_os in 23690f1ac3bcSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2370b0a0317aSmrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 23710f1ac3bcSmrg esac 23720f1ac3bcSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 23733e6c936aSmrgelse 23740f1ac3bcSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 23750f1ac3bcSmrgfi]) 23760f1ac3bcSmrglibrary_names_spec= 23770f1ac3bcSmrglibname_spec='lib$name' 23780f1ac3bcSmrgsoname_spec= 2379b0a0317aSmrgshrext_cmds=.so 23800f1ac3bcSmrgpostinstall_cmds= 23810f1ac3bcSmrgpostuninstall_cmds= 23820f1ac3bcSmrgfinish_cmds= 23830f1ac3bcSmrgfinish_eval= 23840f1ac3bcSmrgshlibpath_var= 23850f1ac3bcSmrgshlibpath_overrides_runpath=unknown 23860f1ac3bcSmrgversion_type=none 23870f1ac3bcSmrgdynamic_linker="$host_os ld.so" 23880f1ac3bcSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 23890f1ac3bcSmrgneed_lib_prefix=unknown 23900f1ac3bcSmrghardcode_into_libs=no 2391521070a0Smrg 23920f1ac3bcSmrg# when you set need_version to no, make sure it does not cause -set_version 23930f1ac3bcSmrg# flags to be left without arguments 23940f1ac3bcSmrgneed_version=unknown 23954456fccdSmrg 2396b0a0317aSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2397b0a0317aSmrg[User-defined run-time library search path.]) 2398b0a0317aSmrg 23990f1ac3bcSmrgcase $host_os in 24000f1ac3bcSmrgaix3*) 24010f1ac3bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 2402b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 24030f1ac3bcSmrg shlibpath_var=LIBPATH 2404521070a0Smrg 24050f1ac3bcSmrg # AIX 3 has no versioning support, so we append a major version to the name. 2406b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 24070f1ac3bcSmrg ;; 2408521070a0Smrg 24090f1ac3bcSmrgaix[[4-9]]*) 24100f1ac3bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 24110f1ac3bcSmrg need_lib_prefix=no 24120f1ac3bcSmrg need_version=no 24130f1ac3bcSmrg hardcode_into_libs=yes 2414b0a0317aSmrg if test ia64 = "$host_cpu"; then 24150f1ac3bcSmrg # AIX 5 supports IA64 2416b0a0317aSmrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 24170f1ac3bcSmrg shlibpath_var=LD_LIBRARY_PATH 24180f1ac3bcSmrg else 24190f1ac3bcSmrg # With GCC up to 2.95.x, collect2 would create an import file 24200f1ac3bcSmrg # for dependence libraries. The import file would start with 2421b0a0317aSmrg # the line '#! .'. This would cause the generated library to 2422b0a0317aSmrg # depend on '.', always an invalid library. This was fixed in 24230f1ac3bcSmrg # development snapshots of GCC prior to 3.0. 24240f1ac3bcSmrg case $host_os in 24250f1ac3bcSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 24260f1ac3bcSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 24270f1ac3bcSmrg echo ' yes ' 2428b0a0317aSmrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 24290f1ac3bcSmrg : 24300f1ac3bcSmrg else 24310f1ac3bcSmrg can_build_shared=no 24320f1ac3bcSmrg fi 24330f1ac3bcSmrg ;; 24340f1ac3bcSmrg esac 2435b0a0317aSmrg # Using Import Files as archive members, it is possible to support 2436b0a0317aSmrg # filename-based versioning of shared library archives on AIX. While 2437b0a0317aSmrg # this would work for both with and without runtime linking, it will 2438b0a0317aSmrg # prevent static linking of such archives. So we do filename-based 2439b0a0317aSmrg # shared library versioning with .so extension only, which is used 2440b0a0317aSmrg # when both runtime linking and shared linking is enabled. 2441b0a0317aSmrg # Unfortunately, runtime linking may impact performance, so we do 2442b0a0317aSmrg # not want this to be the default eventually. Also, we use the 2443b0a0317aSmrg # versioned .so libs for executables only if there is the -brtl 2444b0a0317aSmrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2445b0a0317aSmrg # To allow for filename-based versioning support, we need to create 2446b0a0317aSmrg # libNAME.so.V as an archive file, containing: 2447b0a0317aSmrg # *) an Import File, referring to the versioned filename of the 2448b0a0317aSmrg # archive as well as the shared archive member, telling the 2449b0a0317aSmrg # bitwidth (32 or 64) of that shared object, and providing the 2450b0a0317aSmrg # list of exported symbols of that shared object, eventually 2451b0a0317aSmrg # decorated with the 'weak' keyword 2452b0a0317aSmrg # *) the shared object with the F_LOADONLY flag set, to really avoid 2453b0a0317aSmrg # it being seen by the linker. 2454b0a0317aSmrg # At run time we better use the real file rather than another symlink, 2455b0a0317aSmrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 2456b0a0317aSmrg 2457b0a0317aSmrg case $with_aix_soname,$aix_use_runtimelinking in 2458b0a0317aSmrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 24590f1ac3bcSmrg # soname into executable. Probably we can add versioning support to 24600f1ac3bcSmrg # collect2, so additional links can be useful in future. 2461b0a0317aSmrg aix,yes) # traditional libtool 2462b0a0317aSmrg dynamic_linker='AIX unversionable lib.so' 24630f1ac3bcSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 24640f1ac3bcSmrg # instead of lib<name>.a to let people know that these are not 24650f1ac3bcSmrg # typical AIX shared libraries. 2466b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2467b0a0317aSmrg ;; 2468b0a0317aSmrg aix,no) # traditional AIX only 2469b0a0317aSmrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 24700f1ac3bcSmrg # We preserve .a as extension for shared libraries through AIX4.2 24710f1ac3bcSmrg # and later when we are not doing run time linking. 2472b0a0317aSmrg library_names_spec='$libname$release.a $libname.a' 2473b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 2474b0a0317aSmrg ;; 2475b0a0317aSmrg svr4,*) # full svr4 only 2476b0a0317aSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2477b0a0317aSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2478b0a0317aSmrg # We do not specify a path in Import Files, so LIBPATH fires. 2479b0a0317aSmrg shlibpath_overrides_runpath=yes 2480b0a0317aSmrg ;; 2481b0a0317aSmrg *,yes) # both, prefer svr4 2482b0a0317aSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2483b0a0317aSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2484b0a0317aSmrg # unpreferred sharedlib libNAME.a needs extra handling 2485b0a0317aSmrg postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' 2486b0a0317aSmrg postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' 2487b0a0317aSmrg # We do not specify a path in Import Files, so LIBPATH fires. 2488b0a0317aSmrg shlibpath_overrides_runpath=yes 2489b0a0317aSmrg ;; 2490b0a0317aSmrg *,no) # both, prefer aix 2491b0a0317aSmrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2492b0a0317aSmrg library_names_spec='$libname$release.a $libname.a' 2493b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 2494b0a0317aSmrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2495b0a0317aSmrg postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' 2496b0a0317aSmrg postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' 2497b0a0317aSmrg ;; 2498b0a0317aSmrg esac 24990f1ac3bcSmrg shlibpath_var=LIBPATH 25000f1ac3bcSmrg fi 25010f1ac3bcSmrg ;; 2502521070a0Smrg 25030f1ac3bcSmrgamigaos*) 25040f1ac3bcSmrg case $host_cpu in 25050f1ac3bcSmrg powerpc) 25060f1ac3bcSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 25070f1ac3bcSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2508b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25093e6c936aSmrg ;; 25100f1ac3bcSmrg m68k) 25110f1ac3bcSmrg library_names_spec='$libname.ixlibrary $libname.a' 25120f1ac3bcSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2513b0a0317aSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 25143e6c936aSmrg ;; 25150f1ac3bcSmrg esac 25160f1ac3bcSmrg ;; 25174456fccdSmrg 25180f1ac3bcSmrgbeos*) 2519b0a0317aSmrg library_names_spec='$libname$shared_ext' 25200f1ac3bcSmrg dynamic_linker="$host_os ld.so" 25210f1ac3bcSmrg shlibpath_var=LIBRARY_PATH 25220f1ac3bcSmrg ;; 25234456fccdSmrg 25240f1ac3bcSmrgbsdi[[45]]*) 25250f1ac3bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 25260f1ac3bcSmrg need_version=no 2527b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2528b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 25290f1ac3bcSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 25300f1ac3bcSmrg shlibpath_var=LD_LIBRARY_PATH 25310f1ac3bcSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 25320f1ac3bcSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 25330f1ac3bcSmrg # the default ld.so.conf also contains /usr/contrib/lib and 25340f1ac3bcSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 25350f1ac3bcSmrg # libtool to hard-code these into programs 25360f1ac3bcSmrg ;; 25374456fccdSmrg 25380f1ac3bcSmrgcygwin* | mingw* | pw32* | cegcc*) 25390f1ac3bcSmrg version_type=windows 2540b0a0317aSmrg shrext_cmds=.dll 25410f1ac3bcSmrg need_version=no 25420f1ac3bcSmrg need_lib_prefix=no 25434456fccdSmrg 25440f1ac3bcSmrg case $GCC,$cc_basename in 25450f1ac3bcSmrg yes,*) 25460f1ac3bcSmrg # gcc 25470f1ac3bcSmrg library_names_spec='$libname.dll.a' 25480f1ac3bcSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2549b0a0317aSmrg postinstall_cmds='base_file=`basename \$file`~ 2550b0a0317aSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 25510f1ac3bcSmrg dldir=$destdir/`dirname \$dlpath`~ 25520f1ac3bcSmrg test -d \$dldir || mkdir -p \$dldir~ 25530f1ac3bcSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 25540f1ac3bcSmrg chmod a+x \$dldir/$dlname~ 25550f1ac3bcSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 25560f1ac3bcSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 25570f1ac3bcSmrg fi' 25580f1ac3bcSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 25590f1ac3bcSmrg dlpath=$dir/\$dldll~ 25600f1ac3bcSmrg $RM \$dlpath' 25610f1ac3bcSmrg shlibpath_overrides_runpath=yes 25624456fccdSmrg 25630f1ac3bcSmrg case $host_os in 25640f1ac3bcSmrg cygwin*) 25650f1ac3bcSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2566b0a0317aSmrg soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25670f1ac3bcSmrgm4_if([$1], [],[ 25680f1ac3bcSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 25690f1ac3bcSmrg ;; 25700f1ac3bcSmrg mingw* | cegcc*) 25710f1ac3bcSmrg # MinGW DLLs use traditional 'lib' prefix 2572b0a0317aSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25730f1ac3bcSmrg ;; 25740f1ac3bcSmrg pw32*) 25750f1ac3bcSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2576b0a0317aSmrg library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25770f1ac3bcSmrg ;; 25780f1ac3bcSmrg esac 25790f1ac3bcSmrg dynamic_linker='Win32 ld.exe' 25803e6c936aSmrg ;; 25814456fccdSmrg 25820f1ac3bcSmrg *,cl*) 25830f1ac3bcSmrg # Native MSVC 25840f1ac3bcSmrg libname_spec='$name' 2585b0a0317aSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2586b0a0317aSmrg library_names_spec='$libname.dll.lib' 25870f1ac3bcSmrg 25880f1ac3bcSmrg case $build_os in 25890f1ac3bcSmrg mingw*) 25900f1ac3bcSmrg sys_lib_search_path_spec= 25910f1ac3bcSmrg lt_save_ifs=$IFS 25920f1ac3bcSmrg IFS=';' 25930f1ac3bcSmrg for lt_path in $LIB 25943e6c936aSmrg do 25950f1ac3bcSmrg IFS=$lt_save_ifs 25960f1ac3bcSmrg # Let DOS variable expansion print the short 8.3 style file name. 25970f1ac3bcSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 25980f1ac3bcSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 25993e6c936aSmrg done 26000f1ac3bcSmrg IFS=$lt_save_ifs 26010f1ac3bcSmrg # Convert to MSYS style. 26020f1ac3bcSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 26030f1ac3bcSmrg ;; 26040f1ac3bcSmrg cygwin*) 26050f1ac3bcSmrg # Convert to unix form, then to dos form, then back to unix form 26060f1ac3bcSmrg # but this time dos style (no spaces!) so that the unix form looks 26070f1ac3bcSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 26080f1ac3bcSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 26090f1ac3bcSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 26100f1ac3bcSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26110f1ac3bcSmrg ;; 26120f1ac3bcSmrg *) 2613b0a0317aSmrg sys_lib_search_path_spec=$LIB 26140f1ac3bcSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 26150f1ac3bcSmrg # It is most probably a Windows format PATH. 26160f1ac3bcSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 26170f1ac3bcSmrg else 26180f1ac3bcSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26190f1ac3bcSmrg fi 26200f1ac3bcSmrg # FIXME: find the short name or the path components, as spaces are 26210f1ac3bcSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 26220f1ac3bcSmrg ;; 26230f1ac3bcSmrg esac 26244456fccdSmrg 26250f1ac3bcSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2626b0a0317aSmrg postinstall_cmds='base_file=`basename \$file`~ 2627b0a0317aSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 26280f1ac3bcSmrg dldir=$destdir/`dirname \$dlpath`~ 26290f1ac3bcSmrg test -d \$dldir || mkdir -p \$dldir~ 26300f1ac3bcSmrg $install_prog $dir/$dlname \$dldir/$dlname' 26310f1ac3bcSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 26320f1ac3bcSmrg dlpath=$dir/\$dldll~ 26330f1ac3bcSmrg $RM \$dlpath' 26340f1ac3bcSmrg shlibpath_overrides_runpath=yes 26350f1ac3bcSmrg dynamic_linker='Win32 link.exe' 26360f1ac3bcSmrg ;; 2637ff63a143Smrg 26380f1ac3bcSmrg *) 26390f1ac3bcSmrg # Assume MSVC wrapper 2640b0a0317aSmrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 26410f1ac3bcSmrg dynamic_linker='Win32 ld.exe' 26420f1ac3bcSmrg ;; 26430f1ac3bcSmrg esac 26440f1ac3bcSmrg # FIXME: first we should search . and the directory the executable is in 26450f1ac3bcSmrg shlibpath_var=PATH 26460f1ac3bcSmrg ;; 26474456fccdSmrg 26480f1ac3bcSmrgdarwin* | rhapsody*) 26490f1ac3bcSmrg dynamic_linker="$host_os dyld" 26500f1ac3bcSmrg version_type=darwin 26510f1ac3bcSmrg need_lib_prefix=no 26520f1ac3bcSmrg need_version=no 2653b0a0317aSmrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2654b0a0317aSmrg soname_spec='$libname$release$major$shared_ext' 26550f1ac3bcSmrg shlibpath_overrides_runpath=yes 26560f1ac3bcSmrg shlibpath_var=DYLD_LIBRARY_PATH 26570f1ac3bcSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 26580f1ac3bcSmrgm4_if([$1], [],[ 26590f1ac3bcSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 26600f1ac3bcSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 26610f1ac3bcSmrg ;; 26624456fccdSmrg 26630f1ac3bcSmrgdgux*) 26640f1ac3bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 26650f1ac3bcSmrg need_lib_prefix=no 26660f1ac3bcSmrg need_version=no 2667b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2668b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 26690f1ac3bcSmrg shlibpath_var=LD_LIBRARY_PATH 26700f1ac3bcSmrg ;; 2671ff63a143Smrg 26720f1ac3bcSmrgfreebsd* | dragonfly*) 26730f1ac3bcSmrg # DragonFly does not have aout. When/if they implement a new 26740f1ac3bcSmrg # versioning mechanism, adjust this. 26750f1ac3bcSmrg if test -x /usr/bin/objformat; then 26760f1ac3bcSmrg objformat=`/usr/bin/objformat` 2677ff63a143Smrg else 26780f1ac3bcSmrg case $host_os in 26790f1ac3bcSmrg freebsd[[23]].*) objformat=aout ;; 26800f1ac3bcSmrg *) objformat=elf ;; 26813e6c936aSmrg esac 268242d69509Smrg fi 26830f1ac3bcSmrg version_type=freebsd-$objformat 26840f1ac3bcSmrg case $version_type in 26850f1ac3bcSmrg freebsd-elf*) 2686b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2687b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 26880f1ac3bcSmrg need_version=no 26890f1ac3bcSmrg need_lib_prefix=no 26900f1ac3bcSmrg ;; 26910f1ac3bcSmrg freebsd-*) 2692b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 26930f1ac3bcSmrg need_version=yes 26940f1ac3bcSmrg ;; 26950f1ac3bcSmrg esac 26960f1ac3bcSmrg shlibpath_var=LD_LIBRARY_PATH 26973e6c936aSmrg case $host_os in 26980f1ac3bcSmrg freebsd2.*) 26990f1ac3bcSmrg shlibpath_overrides_runpath=yes 2700521070a0Smrg ;; 27010f1ac3bcSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 27020f1ac3bcSmrg shlibpath_overrides_runpath=yes 27030f1ac3bcSmrg hardcode_into_libs=yes 2704521070a0Smrg ;; 27050f1ac3bcSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 27060f1ac3bcSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 27070f1ac3bcSmrg shlibpath_overrides_runpath=no 27080f1ac3bcSmrg hardcode_into_libs=yes 27093e6c936aSmrg ;; 27100f1ac3bcSmrg *) # from 4.6 on, and DragonFly 27110f1ac3bcSmrg shlibpath_overrides_runpath=yes 27120f1ac3bcSmrg hardcode_into_libs=yes 27133e6c936aSmrg ;; 2714ff63a143Smrg esac 27150f1ac3bcSmrg ;; 27164456fccdSmrg 27170f1ac3bcSmrghaiku*) 27180f1ac3bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 27190f1ac3bcSmrg need_lib_prefix=no 27200f1ac3bcSmrg need_version=no 27210f1ac3bcSmrg dynamic_linker="$host_os runtime_loader" 2722b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2723b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 27240f1ac3bcSmrg shlibpath_var=LIBRARY_PATH 2725b0a0317aSmrg shlibpath_overrides_runpath=no 27260f1ac3bcSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 27270f1ac3bcSmrg hardcode_into_libs=yes 27280f1ac3bcSmrg ;; 2729521070a0Smrg 27300f1ac3bcSmrghpux9* | hpux10* | hpux11*) 27310f1ac3bcSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 27320f1ac3bcSmrg # link against other versions. 27330f1ac3bcSmrg version_type=sunos 27340f1ac3bcSmrg need_lib_prefix=no 27350f1ac3bcSmrg need_version=no 27360f1ac3bcSmrg case $host_cpu in 27370f1ac3bcSmrg ia64*) 27380f1ac3bcSmrg shrext_cmds='.so' 27390f1ac3bcSmrg hardcode_into_libs=yes 27400f1ac3bcSmrg dynamic_linker="$host_os dld.so" 27410f1ac3bcSmrg shlibpath_var=LD_LIBRARY_PATH 27420f1ac3bcSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2743b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2744b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 2745b0a0317aSmrg if test 32 = "$HPUX_IA64_MODE"; then 27460f1ac3bcSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2747b0a0317aSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 27480f1ac3bcSmrg else 27490f1ac3bcSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2750b0a0317aSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 27513e6c936aSmrg fi 27520f1ac3bcSmrg ;; 27530f1ac3bcSmrg hppa*64*) 27540f1ac3bcSmrg shrext_cmds='.sl' 27550f1ac3bcSmrg hardcode_into_libs=yes 27560f1ac3bcSmrg dynamic_linker="$host_os dld.sl" 27570f1ac3bcSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 27580f1ac3bcSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2759b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2760b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 27610f1ac3bcSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 27620f1ac3bcSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 27630f1ac3bcSmrg ;; 27640f1ac3bcSmrg *) 27650f1ac3bcSmrg shrext_cmds='.sl' 27660f1ac3bcSmrg dynamic_linker="$host_os dld.sl" 27670f1ac3bcSmrg shlibpath_var=SHLIB_PATH 27680f1ac3bcSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2769b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2770b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 2771ff63a143Smrg ;; 2772ff63a143Smrg esac 27730f1ac3bcSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 27740f1ac3bcSmrg postinstall_cmds='chmod 555 $lib' 27750f1ac3bcSmrg # or fails outright, so override atomically: 27760f1ac3bcSmrg install_override_mode=555 27770f1ac3bcSmrg ;; 2778ff63a143Smrg 27790f1ac3bcSmrginterix[[3-9]]*) 27800f1ac3bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 27810f1ac3bcSmrg need_lib_prefix=no 27820f1ac3bcSmrg need_version=no 2783b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2784b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 27850f1ac3bcSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 27860f1ac3bcSmrg shlibpath_var=LD_LIBRARY_PATH 27870f1ac3bcSmrg shlibpath_overrides_runpath=no 27880f1ac3bcSmrg hardcode_into_libs=yes 27890f1ac3bcSmrg ;; 2790ff63a143Smrg 27910f1ac3bcSmrgirix5* | irix6* | nonstopux*) 27920f1ac3bcSmrg case $host_os in 27930f1ac3bcSmrg nonstopux*) version_type=nonstopux ;; 27940f1ac3bcSmrg *) 2795b0a0317aSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 27960f1ac3bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 27970f1ac3bcSmrg else 27980f1ac3bcSmrg version_type=irix 27990f1ac3bcSmrg fi ;; 28003e6c936aSmrg esac 28010f1ac3bcSmrg need_lib_prefix=no 28020f1ac3bcSmrg need_version=no 2803b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 2804b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 28050f1ac3bcSmrg case $host_os in 28060f1ac3bcSmrg irix5* | nonstopux*) 28070f1ac3bcSmrg libsuff= shlibsuff= 28080f1ac3bcSmrg ;; 28090f1ac3bcSmrg *) 28100f1ac3bcSmrg case $LD in # libtool.m4 will add one of these switches to LD 28110f1ac3bcSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 28120f1ac3bcSmrg libsuff= shlibsuff= libmagic=32-bit;; 28130f1ac3bcSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 28140f1ac3bcSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 28150f1ac3bcSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 28160f1ac3bcSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 28170f1ac3bcSmrg *) libsuff= shlibsuff= libmagic=never-match;; 28180f1ac3bcSmrg esac 28190f1ac3bcSmrg ;; 28200f1ac3bcSmrg esac 28210f1ac3bcSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 28220f1ac3bcSmrg shlibpath_overrides_runpath=no 2823b0a0317aSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2824b0a0317aSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 28250f1ac3bcSmrg hardcode_into_libs=yes 28260f1ac3bcSmrg ;; 28274456fccdSmrg 28280f1ac3bcSmrg# No shared lib support for Linux oldld, aout, or coff. 28290f1ac3bcSmrglinux*oldld* | linux*aout* | linux*coff*) 28300f1ac3bcSmrg dynamic_linker=no 28310f1ac3bcSmrg ;; 28324456fccdSmrg 2833b0a0317aSmrglinux*android*) 2834b0a0317aSmrg version_type=none # Android doesn't support versioned libraries. 2835b0a0317aSmrg need_lib_prefix=no 2836b0a0317aSmrg need_version=no 2837b0a0317aSmrg library_names_spec='$libname$release$shared_ext' 2838b0a0317aSmrg soname_spec='$libname$release$shared_ext' 2839b0a0317aSmrg finish_cmds= 2840b0a0317aSmrg shlibpath_var=LD_LIBRARY_PATH 2841b0a0317aSmrg shlibpath_overrides_runpath=yes 2842b0a0317aSmrg 2843b0a0317aSmrg # This implies no fast_install, which is unacceptable. 2844b0a0317aSmrg # Some rework will be needed to allow for fast_install 2845b0a0317aSmrg # before this can be enabled. 2846b0a0317aSmrg hardcode_into_libs=yes 2847b0a0317aSmrg 2848b0a0317aSmrg dynamic_linker='Android linker' 2849b0a0317aSmrg # Don't embed -rpath directories since the linker doesn't support them. 2850b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2851b0a0317aSmrg ;; 2852b0a0317aSmrg 28530f1ac3bcSmrg# This must be glibc/ELF. 28540f1ac3bcSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 28550f1ac3bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 28560f1ac3bcSmrg need_lib_prefix=no 28570f1ac3bcSmrg need_version=no 2858b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2859b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 28600f1ac3bcSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 28610f1ac3bcSmrg shlibpath_var=LD_LIBRARY_PATH 28620f1ac3bcSmrg shlibpath_overrides_runpath=no 28634456fccdSmrg 28640f1ac3bcSmrg # Some binutils ld are patched to set DT_RUNPATH 28650f1ac3bcSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 28660f1ac3bcSmrg [lt_cv_shlibpath_overrides_runpath=no 28670f1ac3bcSmrg save_LDFLAGS=$LDFLAGS 28680f1ac3bcSmrg save_libdir=$libdir 28690f1ac3bcSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 28700f1ac3bcSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 28710f1ac3bcSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 28720f1ac3bcSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 28730f1ac3bcSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 28740f1ac3bcSmrg LDFLAGS=$save_LDFLAGS 28750f1ac3bcSmrg libdir=$save_libdir 28760f1ac3bcSmrg ]) 28770f1ac3bcSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 28784456fccdSmrg 28790f1ac3bcSmrg # This implies no fast_install, which is unacceptable. 28800f1ac3bcSmrg # Some rework will be needed to allow for fast_install 28810f1ac3bcSmrg # before this can be enabled. 28820f1ac3bcSmrg hardcode_into_libs=yes 28834456fccdSmrg 2884b0a0317aSmrg # Add ABI-specific directories to the system library path. 2885b0a0317aSmrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 2886b0a0317aSmrg 2887b0a0317aSmrg # Ideally, we could use ldconfig to report *all* directores which are 2888b0a0317aSmrg # searched for libraries, however this is still not possible. Aside from not 2889b0a0317aSmrg # being certain /sbin/ldconfig is available, command 2890b0a0317aSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2891b0a0317aSmrg # even though it is searched at run-time. Try to do the best guess by 2892b0a0317aSmrg # appending ld.so.conf contents (and includes) to the search path. 28930f1ac3bcSmrg if test -f /etc/ld.so.conf; then 28940f1ac3bcSmrg 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' ' '` 2895b0a0317aSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 28963e6c936aSmrg fi 28974456fccdSmrg 28980f1ac3bcSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 28990f1ac3bcSmrg # powerpc, because MkLinux only supported shared libraries with the 29000f1ac3bcSmrg # GNU dynamic linker. Since this was broken with cross compilers, 29010f1ac3bcSmrg # most powerpc-linux boxes support dynamic linking these days and 29020f1ac3bcSmrg # people can always --disable-shared, the test was removed, and we 29030f1ac3bcSmrg # assume the GNU/Linux dynamic linker is in use. 29040f1ac3bcSmrg dynamic_linker='GNU/Linux ld.so' 29050f1ac3bcSmrg ;; 2906ff63a143Smrg 29070f1ac3bcSmrgnetbsd*) 29080f1ac3bcSmrg version_type=sunos 29090f1ac3bcSmrg need_lib_prefix=no 29100f1ac3bcSmrg need_version=no 29110f1ac3bcSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2912b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29130f1ac3bcSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29140f1ac3bcSmrg dynamic_linker='NetBSD (a.out) ld.so' 291542d69509Smrg else 2916b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2917b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 29180f1ac3bcSmrg dynamic_linker='NetBSD ld.elf_so' 291942d69509Smrg fi 29200f1ac3bcSmrg shlibpath_var=LD_LIBRARY_PATH 29210f1ac3bcSmrg shlibpath_overrides_runpath=yes 29220f1ac3bcSmrg hardcode_into_libs=yes 29230f1ac3bcSmrg ;; 29244456fccdSmrg 29250f1ac3bcSmrgnewsos6) 29260f1ac3bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 2927b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29280f1ac3bcSmrg shlibpath_var=LD_LIBRARY_PATH 29290f1ac3bcSmrg shlibpath_overrides_runpath=yes 29300f1ac3bcSmrg ;; 29314456fccdSmrg 29320f1ac3bcSmrg*nto* | *qnx*) 29330f1ac3bcSmrg version_type=qnx 29340f1ac3bcSmrg need_lib_prefix=no 29350f1ac3bcSmrg need_version=no 2936b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2937b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 29380f1ac3bcSmrg shlibpath_var=LD_LIBRARY_PATH 29390f1ac3bcSmrg shlibpath_overrides_runpath=no 29400f1ac3bcSmrg hardcode_into_libs=yes 29410f1ac3bcSmrg dynamic_linker='ldqnx.so' 29420f1ac3bcSmrg ;; 29434456fccdSmrg 2944b0a0317aSmrgopenbsd* | bitrig*) 29450f1ac3bcSmrg version_type=sunos 2946b0a0317aSmrg sys_lib_dlsearch_path_spec=/usr/lib 29470f1ac3bcSmrg need_lib_prefix=no 2948b0a0317aSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2949b0a0317aSmrg need_version=no 29500f1ac3bcSmrg else 2951b0a0317aSmrg need_version=yes 29520f1ac3bcSmrg fi 2953b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2954b0a0317aSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2955b0a0317aSmrg shlibpath_var=LD_LIBRARY_PATH 2956b0a0317aSmrg shlibpath_overrides_runpath=yes 29570f1ac3bcSmrg ;; 29584456fccdSmrg 29590f1ac3bcSmrgos2*) 29600f1ac3bcSmrg libname_spec='$name' 2961b0a0317aSmrg version_type=windows 2962b0a0317aSmrg shrext_cmds=.dll 2963b0a0317aSmrg need_version=no 29640f1ac3bcSmrg need_lib_prefix=no 2965b0a0317aSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 2966b0a0317aSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2967b0a0317aSmrg v=$($ECHO $release$versuffix | tr -d .-); 2968b0a0317aSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2969b0a0317aSmrg $ECHO $n$v`$shared_ext' 2970b0a0317aSmrg library_names_spec='${libname}_dll.$libext' 29710f1ac3bcSmrg dynamic_linker='OS/2 ld.exe' 2972b0a0317aSmrg shlibpath_var=BEGINLIBPATH 2973b0a0317aSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2974b0a0317aSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2975b0a0317aSmrg postinstall_cmds='base_file=`basename \$file`~ 2976b0a0317aSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2977b0a0317aSmrg dldir=$destdir/`dirname \$dlpath`~ 2978b0a0317aSmrg test -d \$dldir || mkdir -p \$dldir~ 2979b0a0317aSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2980b0a0317aSmrg chmod a+x \$dldir/$dlname~ 2981b0a0317aSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2982b0a0317aSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2983b0a0317aSmrg fi' 2984b0a0317aSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 2985b0a0317aSmrg dlpath=$dir/\$dldll~ 2986b0a0317aSmrg $RM \$dlpath' 29870f1ac3bcSmrg ;; 29884456fccdSmrg 29890f1ac3bcSmrgosf3* | osf4* | osf5*) 29900f1ac3bcSmrg version_type=osf 29910f1ac3bcSmrg need_lib_prefix=no 29920f1ac3bcSmrg need_version=no 2993b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 2994b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29950f1ac3bcSmrg shlibpath_var=LD_LIBRARY_PATH 29960f1ac3bcSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2997b0a0317aSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 29983e6c936aSmrg ;; 2999ff63a143Smrg 30000f1ac3bcSmrgrdos*) 30010f1ac3bcSmrg dynamic_linker=no 30020f1ac3bcSmrg ;; 30030f1ac3bcSmrg 30040f1ac3bcSmrgsolaris*) 30053e6c936aSmrg version_type=linux # correct to gnu/linux during the next big refactor 30063e6c936aSmrg need_lib_prefix=no 30073e6c936aSmrg need_version=no 3008b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3009b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 30100f1ac3bcSmrg shlibpath_var=LD_LIBRARY_PATH 30110f1ac3bcSmrg shlibpath_overrides_runpath=yes 30123e6c936aSmrg hardcode_into_libs=yes 30130f1ac3bcSmrg # ldd complains unless libraries are executable 30140f1ac3bcSmrg postinstall_cmds='chmod +x $lib' 30153e6c936aSmrg ;; 3016ff63a143Smrg 30170f1ac3bcSmrgsunos4*) 30180f1ac3bcSmrg version_type=sunos 3019b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 30200f1ac3bcSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 30210f1ac3bcSmrg shlibpath_var=LD_LIBRARY_PATH 30220f1ac3bcSmrg shlibpath_overrides_runpath=yes 3023b0a0317aSmrg if test yes = "$with_gnu_ld"; then 30240f1ac3bcSmrg need_lib_prefix=no 30250f1ac3bcSmrg fi 30260f1ac3bcSmrg need_version=yes 30273e6c936aSmrg ;; 30284456fccdSmrg 30290f1ac3bcSmrgsysv4 | sysv4.3*) 30303e6c936aSmrg version_type=linux # correct to gnu/linux during the next big refactor 3031b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3032b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 30333e6c936aSmrg shlibpath_var=LD_LIBRARY_PATH 30340f1ac3bcSmrg case $host_vendor in 30350f1ac3bcSmrg sni) 30360f1ac3bcSmrg shlibpath_overrides_runpath=no 30370f1ac3bcSmrg need_lib_prefix=no 30380f1ac3bcSmrg runpath_var=LD_RUN_PATH 3039ff63a143Smrg ;; 30400f1ac3bcSmrg siemens) 30410f1ac3bcSmrg need_lib_prefix=no 3042ff63a143Smrg ;; 30430f1ac3bcSmrg motorola) 30440f1ac3bcSmrg need_lib_prefix=no 30450f1ac3bcSmrg need_version=no 30460f1ac3bcSmrg shlibpath_overrides_runpath=no 30470f1ac3bcSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3048ff63a143Smrg ;; 30493e6c936aSmrg esac 30503e6c936aSmrg ;; 30513e6c936aSmrg 30520f1ac3bcSmrgsysv4*MP*) 3053b0a0317aSmrg if test -d /usr/nec; then 30540f1ac3bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 3055b0a0317aSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3056b0a0317aSmrg soname_spec='$libname$shared_ext.$major' 30570f1ac3bcSmrg shlibpath_var=LD_LIBRARY_PATH 30580f1ac3bcSmrg fi 30593e6c936aSmrg ;; 30603e6c936aSmrg 30610f1ac3bcSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3062b0a0317aSmrg version_type=sco 30633e6c936aSmrg need_lib_prefix=no 30643e6c936aSmrg need_version=no 3065b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3066b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 30673e6c936aSmrg shlibpath_var=LD_LIBRARY_PATH 30680f1ac3bcSmrg shlibpath_overrides_runpath=yes 30690f1ac3bcSmrg hardcode_into_libs=yes 3070b0a0317aSmrg if test yes = "$with_gnu_ld"; then 30710f1ac3bcSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3072ff63a143Smrg else 30730f1ac3bcSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3074ff63a143Smrg case $host_os in 30750f1ac3bcSmrg sco3.2v5*) 30760f1ac3bcSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 30770f1ac3bcSmrg ;; 3078ff63a143Smrg esac 307942d69509Smrg fi 30800f1ac3bcSmrg sys_lib_dlsearch_path_spec='/usr/lib' 30813e6c936aSmrg ;; 30824456fccdSmrg 30830f1ac3bcSmrgtpf*) 30840f1ac3bcSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 30853e6c936aSmrg version_type=linux # correct to gnu/linux during the next big refactor 30863e6c936aSmrg need_lib_prefix=no 30873e6c936aSmrg need_version=no 3088b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30893e6c936aSmrg shlibpath_var=LD_LIBRARY_PATH 30903e6c936aSmrg shlibpath_overrides_runpath=no 30913e6c936aSmrg hardcode_into_libs=yes 30923e6c936aSmrg ;; 30934456fccdSmrg 30940f1ac3bcSmrguts4*) 30953e6c936aSmrg version_type=linux # correct to gnu/linux during the next big refactor 3096b0a0317aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3097b0a0317aSmrg soname_spec='$libname$release$shared_ext$major' 30980f1ac3bcSmrg shlibpath_var=LD_LIBRARY_PATH 30993e6c936aSmrg ;; 31004456fccdSmrg 31010f1ac3bcSmrg*) 31023e6c936aSmrg dynamic_linker=no 31033e6c936aSmrg ;; 31040f1ac3bcSmrgesac 31050f1ac3bcSmrgAC_MSG_RESULT([$dynamic_linker]) 3106b0a0317aSmrgtest no = "$dynamic_linker" && can_build_shared=no 31073e6c936aSmrg 31080f1ac3bcSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3109b0a0317aSmrgif test yes = "$GCC"; then 31100f1ac3bcSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 31110f1ac3bcSmrgfi 31123e6c936aSmrg 3113b0a0317aSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3114b0a0317aSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 31150f1ac3bcSmrgfi 3116b0a0317aSmrg 3117b0a0317aSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3118b0a0317aSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 31190f1ac3bcSmrgfi 31203e6c936aSmrg 3121b0a0317aSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3122b0a0317aSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3123b0a0317aSmrg 3124b0a0317aSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3125b0a0317aSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3126b0a0317aSmrg 3127b0a0317aSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3128b0a0317aSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3129b0a0317aSmrg 31300f1ac3bcSmrg_LT_DECL([], [variables_saved_for_relink], [1], 31310f1ac3bcSmrg [Variables whose values should be saved in libtool wrapper scripts and 31320f1ac3bcSmrg restored at link time]) 31330f1ac3bcSmrg_LT_DECL([], [need_lib_prefix], [0], 31340f1ac3bcSmrg [Do we need the "lib" prefix for modules?]) 31350f1ac3bcSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 31360f1ac3bcSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 31370f1ac3bcSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 31380f1ac3bcSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 31390f1ac3bcSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 31400f1ac3bcSmrg [Is shlibpath searched before the hard-coded library search path?]) 31410f1ac3bcSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 31420f1ac3bcSmrg_LT_DECL([], [library_names_spec], [1], 31430f1ac3bcSmrg [[List of archive names. First name is the real one, the rest are links. 31440f1ac3bcSmrg The last name is the one that the linker finds with -lNAME]]) 31450f1ac3bcSmrg_LT_DECL([], [soname_spec], [1], 31460f1ac3bcSmrg [[The coded name of the library, if different from the real name]]) 31470f1ac3bcSmrg_LT_DECL([], [install_override_mode], [1], 31480f1ac3bcSmrg [Permission mode override for installation of shared libraries]) 31490f1ac3bcSmrg_LT_DECL([], [postinstall_cmds], [2], 31500f1ac3bcSmrg [Command to use after installation of a shared archive]) 31510f1ac3bcSmrg_LT_DECL([], [postuninstall_cmds], [2], 31520f1ac3bcSmrg [Command to use after uninstallation of a shared archive]) 31530f1ac3bcSmrg_LT_DECL([], [finish_cmds], [2], 31540f1ac3bcSmrg [Commands used to finish a libtool library installation in a directory]) 31550f1ac3bcSmrg_LT_DECL([], [finish_eval], [1], 31560f1ac3bcSmrg [[As "finish_cmds", except a single script fragment to be evaled but 31570f1ac3bcSmrg not shown]]) 31580f1ac3bcSmrg_LT_DECL([], [hardcode_into_libs], [0], 31590f1ac3bcSmrg [Whether we should hardcode library paths into libraries]) 31600f1ac3bcSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 31610f1ac3bcSmrg [Compile-time system search path for libraries]) 3162b0a0317aSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3163b0a0317aSmrg [Detected run-time system search path for libraries]) 3164b0a0317aSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3165b0a0317aSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 31660f1ac3bcSmrg])# _LT_SYS_DYNAMIC_LINKER 31673e6c936aSmrg 31683e6c936aSmrg 31690f1ac3bcSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 31700f1ac3bcSmrg# -------------------------- 3171b0a0317aSmrg# find a file program that can recognize shared library 31720f1ac3bcSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 31730f1ac3bcSmrg[m4_require([_LT_DECL_EGREP])dnl 31740f1ac3bcSmrgAC_MSG_CHECKING([for $1]) 31750f1ac3bcSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 31760f1ac3bcSmrg[case $MAGIC_CMD in 31770f1ac3bcSmrg[[\\/*] | ?:[\\/]*]) 3178b0a0317aSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 31793e6c936aSmrg ;; 31800f1ac3bcSmrg*) 3181b0a0317aSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 3182b0a0317aSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 31830f1ac3bcSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 31840f1ac3bcSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 31850f1ac3bcSmrgdnl not every word. This closes a longstanding sh security hole. 31860f1ac3bcSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 31870f1ac3bcSmrg for ac_dir in $ac_dummy; do 3188b0a0317aSmrg IFS=$lt_save_ifs 31890f1ac3bcSmrg test -z "$ac_dir" && ac_dir=. 3190b0a0317aSmrg if test -f "$ac_dir/$1"; then 3191b0a0317aSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 31920f1ac3bcSmrg if test -n "$file_magic_test_file"; then 31930f1ac3bcSmrg case $deplibs_check_method in 31940f1ac3bcSmrg "file_magic "*) 31950f1ac3bcSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3196b0a0317aSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 31970f1ac3bcSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 31980f1ac3bcSmrg $EGREP "$file_magic_regex" > /dev/null; then 31990f1ac3bcSmrg : 32000f1ac3bcSmrg else 32010f1ac3bcSmrg cat <<_LT_EOF 1>&2 32023e6c936aSmrg 32030f1ac3bcSmrg*** Warning: the command libtool uses to detect shared libraries, 32040f1ac3bcSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 32050f1ac3bcSmrg*** The result is that libtool may fail to recognize shared libraries 32060f1ac3bcSmrg*** as such. This will affect the creation of libtool libraries that 32070f1ac3bcSmrg*** depend on shared libraries, but programs linked with such libtool 32080f1ac3bcSmrg*** libraries will work regardless of this problem. Nevertheless, you 32090f1ac3bcSmrg*** may want to report the problem to your system manager and/or to 32100f1ac3bcSmrg*** bug-libtool@gnu.org 32114456fccdSmrg 32120f1ac3bcSmrg_LT_EOF 32130f1ac3bcSmrg fi ;; 32140f1ac3bcSmrg esac 32150f1ac3bcSmrg fi 32160f1ac3bcSmrg break 32170f1ac3bcSmrg fi 32180f1ac3bcSmrg done 3219b0a0317aSmrg IFS=$lt_save_ifs 3220b0a0317aSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 32213e6c936aSmrg ;; 32220f1ac3bcSmrgesac]) 3223b0a0317aSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 32240f1ac3bcSmrgif test -n "$MAGIC_CMD"; then 32250f1ac3bcSmrg AC_MSG_RESULT($MAGIC_CMD) 32260f1ac3bcSmrgelse 32270f1ac3bcSmrg AC_MSG_RESULT(no) 32280f1ac3bcSmrgfi 32290f1ac3bcSmrg_LT_DECL([], [MAGIC_CMD], [0], 32300f1ac3bcSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 32310f1ac3bcSmrg])# _LT_PATH_TOOL_PREFIX 32324456fccdSmrg 32330f1ac3bcSmrg# Old name: 32340f1ac3bcSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 32350f1ac3bcSmrgdnl aclocal-1.4 backwards compatibility: 32360f1ac3bcSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 32373e6c936aSmrg 32380f1ac3bcSmrg 32390f1ac3bcSmrg# _LT_PATH_MAGIC 32400f1ac3bcSmrg# -------------- 3241b0a0317aSmrg# find a file program that can recognize a shared library 32420f1ac3bcSmrgm4_defun([_LT_PATH_MAGIC], 32430f1ac3bcSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 32440f1ac3bcSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 32450f1ac3bcSmrg if test -n "$ac_tool_prefix"; then 32460f1ac3bcSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 32470f1ac3bcSmrg else 32480f1ac3bcSmrg MAGIC_CMD=: 32490f1ac3bcSmrg fi 32500f1ac3bcSmrgfi 32510f1ac3bcSmrg])# _LT_PATH_MAGIC 32520f1ac3bcSmrg 32530f1ac3bcSmrg 32540f1ac3bcSmrg# LT_PATH_LD 32550f1ac3bcSmrg# ---------- 32560f1ac3bcSmrg# find the pathname to the GNU or non-GNU linker 32570f1ac3bcSmrgAC_DEFUN([LT_PATH_LD], 32580f1ac3bcSmrg[AC_REQUIRE([AC_PROG_CC])dnl 32590f1ac3bcSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 32600f1ac3bcSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 32610f1ac3bcSmrgm4_require([_LT_DECL_SED])dnl 32620f1ac3bcSmrgm4_require([_LT_DECL_EGREP])dnl 32630f1ac3bcSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 32640f1ac3bcSmrg 32650f1ac3bcSmrgAC_ARG_WITH([gnu-ld], 32660f1ac3bcSmrg [AS_HELP_STRING([--with-gnu-ld], 32670f1ac3bcSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3268b0a0317aSmrg [test no = "$withval" || with_gnu_ld=yes], 32690f1ac3bcSmrg [with_gnu_ld=no])dnl 32700f1ac3bcSmrg 32710f1ac3bcSmrgac_prog=ld 3272b0a0317aSmrgif test yes = "$GCC"; then 32730f1ac3bcSmrg # Check if gcc -print-prog-name=ld gives a path. 32740f1ac3bcSmrg AC_MSG_CHECKING([for ld used by $CC]) 32750f1ac3bcSmrg case $host in 32760f1ac3bcSmrg *-*-mingw*) 3277b0a0317aSmrg # gcc leaves a trailing carriage return, which upsets mingw 32780f1ac3bcSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 32790f1ac3bcSmrg *) 32800f1ac3bcSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 32813e6c936aSmrg esac 32820f1ac3bcSmrg case $ac_prog in 32830f1ac3bcSmrg # Accept absolute paths. 32840f1ac3bcSmrg [[\\/]]* | ?:[[\\/]]*) 32850f1ac3bcSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 32860f1ac3bcSmrg # Canonicalize the pathname of ld 32870f1ac3bcSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 32880f1ac3bcSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 32890f1ac3bcSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 32900f1ac3bcSmrg done 3291b0a0317aSmrg test -z "$LD" && LD=$ac_prog 32920f1ac3bcSmrg ;; 32930f1ac3bcSmrg "") 32940f1ac3bcSmrg # If it fails, then pretend we aren't using GCC. 32950f1ac3bcSmrg ac_prog=ld 32960f1ac3bcSmrg ;; 32970f1ac3bcSmrg *) 32980f1ac3bcSmrg # If it is relative, then search for the first ld in PATH. 32990f1ac3bcSmrg with_gnu_ld=unknown 33000f1ac3bcSmrg ;; 33010f1ac3bcSmrg esac 3302b0a0317aSmrgelif test yes = "$with_gnu_ld"; then 33030f1ac3bcSmrg AC_MSG_CHECKING([for GNU ld]) 33040f1ac3bcSmrgelse 33050f1ac3bcSmrg AC_MSG_CHECKING([for non-GNU ld]) 33060f1ac3bcSmrgfi 33070f1ac3bcSmrgAC_CACHE_VAL(lt_cv_path_LD, 33080f1ac3bcSmrg[if test -z "$LD"; then 3309b0a0317aSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 33100f1ac3bcSmrg for ac_dir in $PATH; do 3311b0a0317aSmrg IFS=$lt_save_ifs 33120f1ac3bcSmrg test -z "$ac_dir" && ac_dir=. 33130f1ac3bcSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3314b0a0317aSmrg lt_cv_path_LD=$ac_dir/$ac_prog 33150f1ac3bcSmrg # Check to see if the program is GNU ld. I'd rather use --version, 33160f1ac3bcSmrg # but apparently some variants of GNU ld only accept -v. 33170f1ac3bcSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 33180f1ac3bcSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 33190f1ac3bcSmrg *GNU* | *'with BFD'*) 3320b0a0317aSmrg test no != "$with_gnu_ld" && break 3321ff63a143Smrg ;; 3322ff63a143Smrg *) 3323b0a0317aSmrg test yes != "$with_gnu_ld" && break 3324ff63a143Smrg ;; 3325ff63a143Smrg esac 33260f1ac3bcSmrg fi 33270f1ac3bcSmrg done 3328b0a0317aSmrg IFS=$lt_save_ifs 33290f1ac3bcSmrgelse 3330b0a0317aSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 33310f1ac3bcSmrgfi]) 3332b0a0317aSmrgLD=$lt_cv_path_LD 33330f1ac3bcSmrgif test -n "$LD"; then 33340f1ac3bcSmrg AC_MSG_RESULT($LD) 33350f1ac3bcSmrgelse 33360f1ac3bcSmrg AC_MSG_RESULT(no) 33370f1ac3bcSmrgfi 33380f1ac3bcSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 33390f1ac3bcSmrg_LT_PATH_LD_GNU 33400f1ac3bcSmrgAC_SUBST([LD]) 33414456fccdSmrg 33420f1ac3bcSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 33430f1ac3bcSmrg])# LT_PATH_LD 33440f1ac3bcSmrg 33450f1ac3bcSmrg# Old names: 33460f1ac3bcSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 33470f1ac3bcSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 33480f1ac3bcSmrgdnl aclocal-1.4 backwards compatibility: 33490f1ac3bcSmrgdnl AC_DEFUN([AM_PROG_LD], []) 33500f1ac3bcSmrgdnl AC_DEFUN([AC_PROG_LD], []) 33510f1ac3bcSmrg 33520f1ac3bcSmrg 33530f1ac3bcSmrg# _LT_PATH_LD_GNU 33540f1ac3bcSmrg#- -------------- 33550f1ac3bcSmrgm4_defun([_LT_PATH_LD_GNU], 33560f1ac3bcSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 33570f1ac3bcSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 33580f1ac3bcSmrgcase `$LD -v 2>&1 </dev/null` in 33590f1ac3bcSmrg*GNU* | *'with BFD'*) 33600f1ac3bcSmrg lt_cv_prog_gnu_ld=yes 33610f1ac3bcSmrg ;; 33620f1ac3bcSmrg*) 33630f1ac3bcSmrg lt_cv_prog_gnu_ld=no 33643e6c936aSmrg ;; 33650f1ac3bcSmrgesac]) 33660f1ac3bcSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 33670f1ac3bcSmrg])# _LT_PATH_LD_GNU 33684456fccdSmrg 33690f1ac3bcSmrg 33700f1ac3bcSmrg# _LT_CMD_RELOAD 33710f1ac3bcSmrg# -------------- 33720f1ac3bcSmrg# find reload flag for linker 33730f1ac3bcSmrg# -- PORTME Some linkers may need a different reload flag. 33740f1ac3bcSmrgm4_defun([_LT_CMD_RELOAD], 33750f1ac3bcSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 33760f1ac3bcSmrg lt_cv_ld_reload_flag, 33770f1ac3bcSmrg [lt_cv_ld_reload_flag='-r']) 33780f1ac3bcSmrgreload_flag=$lt_cv_ld_reload_flag 33790f1ac3bcSmrgcase $reload_flag in 33800f1ac3bcSmrg"" | " "*) ;; 33810f1ac3bcSmrg*) reload_flag=" $reload_flag" ;; 33820f1ac3bcSmrgesac 33830f1ac3bcSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 33840f1ac3bcSmrgcase $host_os in 33850f1ac3bcSmrg cygwin* | mingw* | pw32* | cegcc*) 3386b0a0317aSmrg if test yes != "$GCC"; then 33870f1ac3bcSmrg reload_cmds=false 33880f1ac3bcSmrg fi 33890f1ac3bcSmrg ;; 33900f1ac3bcSmrg darwin*) 3391b0a0317aSmrg if test yes = "$GCC"; then 3392b0a0317aSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 33930f1ac3bcSmrg else 33940f1ac3bcSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 33950f1ac3bcSmrg fi 33960f1ac3bcSmrg ;; 33970f1ac3bcSmrgesac 33980f1ac3bcSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 33990f1ac3bcSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 34000f1ac3bcSmrg])# _LT_CMD_RELOAD 34010f1ac3bcSmrg 34020f1ac3bcSmrg 3403b0a0317aSmrg# _LT_PATH_DD 3404b0a0317aSmrg# ----------- 3405b0a0317aSmrg# find a working dd 3406b0a0317aSmrgm4_defun([_LT_PATH_DD], 3407b0a0317aSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3408b0a0317aSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3409b0a0317aSmrgcat conftest.i conftest.i >conftest2.i 3410b0a0317aSmrg: ${lt_DD:=$DD} 3411b0a0317aSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3412b0a0317aSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3413b0a0317aSmrg cmp -s conftest.i conftest.out \ 3414b0a0317aSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3415b0a0317aSmrgfi]) 3416b0a0317aSmrgrm -f conftest.i conftest2.i conftest.out]) 3417b0a0317aSmrg])# _LT_PATH_DD 3418b0a0317aSmrg 3419b0a0317aSmrg 3420b0a0317aSmrg# _LT_CMD_TRUNCATE 3421b0a0317aSmrg# ---------------- 3422b0a0317aSmrg# find command to truncate a binary pipe 3423b0a0317aSmrgm4_defun([_LT_CMD_TRUNCATE], 3424b0a0317aSmrg[m4_require([_LT_PATH_DD]) 3425b0a0317aSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3426b0a0317aSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3427b0a0317aSmrgcat conftest.i conftest.i >conftest2.i 3428b0a0317aSmrglt_cv_truncate_bin= 3429b0a0317aSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3430b0a0317aSmrg cmp -s conftest.i conftest.out \ 3431b0a0317aSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3432b0a0317aSmrgfi 3433b0a0317aSmrgrm -f conftest.i conftest2.i conftest.out 3434b0a0317aSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3435b0a0317aSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3436b0a0317aSmrg [Command to truncate a binary pipe]) 3437b0a0317aSmrg])# _LT_CMD_TRUNCATE 3438b0a0317aSmrg 3439b0a0317aSmrg 34400f1ac3bcSmrg# _LT_CHECK_MAGIC_METHOD 34410f1ac3bcSmrg# ---------------------- 34420f1ac3bcSmrg# how to check for library dependencies 34430f1ac3bcSmrg# -- PORTME fill in with the dynamic library characteristics 34440f1ac3bcSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 34450f1ac3bcSmrg[m4_require([_LT_DECL_EGREP]) 34460f1ac3bcSmrgm4_require([_LT_DECL_OBJDUMP]) 34470f1ac3bcSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 34480f1ac3bcSmrglt_cv_deplibs_check_method, 34490f1ac3bcSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 34500f1ac3bcSmrglt_cv_file_magic_test_file= 34510f1ac3bcSmrglt_cv_deplibs_check_method='unknown' 34520f1ac3bcSmrg# Need to set the preceding variable on all platforms that support 34530f1ac3bcSmrg# interlibrary dependencies. 34540f1ac3bcSmrg# 'none' -- dependencies not supported. 3455b0a0317aSmrg# 'unknown' -- same as none, but documents that we really don't know. 34560f1ac3bcSmrg# 'pass_all' -- all dependencies passed with no checks. 34570f1ac3bcSmrg# 'test_compile' -- check by making test program. 34580f1ac3bcSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 3459b0a0317aSmrg# that responds to the $file_magic_cmd with a given extended regex. 3460b0a0317aSmrg# If you have 'file' or equivalent on your system and you're not sure 3461b0a0317aSmrg# whether 'pass_all' will *always* work, you probably want this one. 34620f1ac3bcSmrg 34630f1ac3bcSmrgcase $host_os in 34640f1ac3bcSmrgaix[[4-9]]*) 34650f1ac3bcSmrg lt_cv_deplibs_check_method=pass_all 34663e6c936aSmrg ;; 3467ff63a143Smrg 34680f1ac3bcSmrgbeos*) 34690f1ac3bcSmrg lt_cv_deplibs_check_method=pass_all 34703e6c936aSmrg ;; 3471ff63a143Smrg 34720f1ac3bcSmrgbsdi[[45]]*) 34730f1ac3bcSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 34740f1ac3bcSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 34750f1ac3bcSmrg lt_cv_file_magic_test_file=/shlib/libc.so 34763e6c936aSmrg ;; 3477ff63a143Smrg 34780f1ac3bcSmrgcygwin*) 34790f1ac3bcSmrg # func_win32_libid is a shell function defined in ltmain.sh 34800f1ac3bcSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 34810f1ac3bcSmrg lt_cv_file_magic_cmd='func_win32_libid' 34820f1ac3bcSmrg ;; 34830f1ac3bcSmrg 34840f1ac3bcSmrgmingw* | pw32*) 34850f1ac3bcSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 34860f1ac3bcSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 34870f1ac3bcSmrg # unless we find 'file', for example because we are cross-compiling. 3488b0a0317aSmrg if ( file / ) >/dev/null 2>&1; then 34890f1ac3bcSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 34900f1ac3bcSmrg lt_cv_file_magic_cmd='func_win32_libid' 34910f1ac3bcSmrg else 34920f1ac3bcSmrg # Keep this pattern in sync with the one in func_win32_libid. 34930f1ac3bcSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 34940f1ac3bcSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 34953e6c936aSmrg fi 34963e6c936aSmrg ;; 3497ff63a143Smrg 34980f1ac3bcSmrgcegcc*) 34990f1ac3bcSmrg # use the weaker test based on 'objdump'. See mingw*. 35000f1ac3bcSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 35010f1ac3bcSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35023e6c936aSmrg ;; 3503ff63a143Smrg 35040f1ac3bcSmrgdarwin* | rhapsody*) 35050f1ac3bcSmrg lt_cv_deplibs_check_method=pass_all 35063e6c936aSmrg ;; 3507ff63a143Smrg 35080f1ac3bcSmrgfreebsd* | dragonfly*) 35090f1ac3bcSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 35100f1ac3bcSmrg case $host_cpu in 35110f1ac3bcSmrg i*86 ) 35120f1ac3bcSmrg # Not sure whether the presence of OpenBSD here was a mistake. 35130f1ac3bcSmrg # Let's accept both of them until this is cleared up. 35140f1ac3bcSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 35150f1ac3bcSmrg lt_cv_file_magic_cmd=/usr/bin/file 35160f1ac3bcSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 35170f1ac3bcSmrg ;; 35183e6c936aSmrg esac 35190f1ac3bcSmrg else 35200f1ac3bcSmrg lt_cv_deplibs_check_method=pass_all 35213e6c936aSmrg fi 35223e6c936aSmrg ;; 35234456fccdSmrg 35240f1ac3bcSmrghaiku*) 35250f1ac3bcSmrg lt_cv_deplibs_check_method=pass_all 35263e6c936aSmrg ;; 3527ff63a143Smrg 35280f1ac3bcSmrghpux10.20* | hpux11*) 35290f1ac3bcSmrg lt_cv_file_magic_cmd=/usr/bin/file 35300f1ac3bcSmrg case $host_cpu in 35310f1ac3bcSmrg ia64*) 35320f1ac3bcSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 35330f1ac3bcSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 35340f1ac3bcSmrg ;; 35350f1ac3bcSmrg hppa*64*) 35360f1ac3bcSmrg [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]'] 35370f1ac3bcSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 35380f1ac3bcSmrg ;; 35390f1ac3bcSmrg *) 35400f1ac3bcSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 35410f1ac3bcSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 35420f1ac3bcSmrg ;; 35430f1ac3bcSmrg esac 35443e6c936aSmrg ;; 3545ff63a143Smrg 35460f1ac3bcSmrginterix[[3-9]]*) 35470f1ac3bcSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 35480f1ac3bcSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 35493e6c936aSmrg ;; 35504456fccdSmrg 35510f1ac3bcSmrgirix5* | irix6* | nonstopux*) 35520f1ac3bcSmrg case $LD in 35530f1ac3bcSmrg *-32|*"-32 ") libmagic=32-bit;; 35540f1ac3bcSmrg *-n32|*"-n32 ") libmagic=N32;; 35550f1ac3bcSmrg *-64|*"-64 ") libmagic=64-bit;; 35560f1ac3bcSmrg *) libmagic=never-match;; 35570f1ac3bcSmrg esac 35580f1ac3bcSmrg lt_cv_deplibs_check_method=pass_all 35590f1ac3bcSmrg ;; 35604456fccdSmrg 35610f1ac3bcSmrg# This must be glibc/ELF. 35620f1ac3bcSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 35630f1ac3bcSmrg lt_cv_deplibs_check_method=pass_all 35640f1ac3bcSmrg ;; 356542d69509Smrg 3566b0a0317aSmrgnetbsd*) 35670f1ac3bcSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 35680f1ac3bcSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 35690f1ac3bcSmrg else 35700f1ac3bcSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 35710f1ac3bcSmrg fi 35720f1ac3bcSmrg ;; 35734456fccdSmrg 35740f1ac3bcSmrgnewos6*) 35750f1ac3bcSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 35760f1ac3bcSmrg lt_cv_file_magic_cmd=/usr/bin/file 35770f1ac3bcSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 35780f1ac3bcSmrg ;; 357942d69509Smrg 35800f1ac3bcSmrg*nto* | *qnx*) 35810f1ac3bcSmrg lt_cv_deplibs_check_method=pass_all 35823e6c936aSmrg ;; 35834456fccdSmrg 3584b0a0317aSmrgopenbsd* | bitrig*) 3585b0a0317aSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 35860f1ac3bcSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 35870f1ac3bcSmrg else 35880f1ac3bcSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 35890f1ac3bcSmrg fi 35900f1ac3bcSmrg ;; 35914456fccdSmrg 35920f1ac3bcSmrgosf3* | osf4* | osf5*) 35930f1ac3bcSmrg lt_cv_deplibs_check_method=pass_all 35943e6c936aSmrg ;; 3595ff63a143Smrg 35960f1ac3bcSmrgrdos*) 35970f1ac3bcSmrg lt_cv_deplibs_check_method=pass_all 35980f1ac3bcSmrg ;; 3599ff63a143Smrg 36000f1ac3bcSmrgsolaris*) 36010f1ac3bcSmrg lt_cv_deplibs_check_method=pass_all 36020f1ac3bcSmrg ;; 3603ff63a143Smrg 36040f1ac3bcSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 36050f1ac3bcSmrg lt_cv_deplibs_check_method=pass_all 36060f1ac3bcSmrg ;; 3607ff63a143Smrg 36080f1ac3bcSmrgsysv4 | sysv4.3*) 36090f1ac3bcSmrg case $host_vendor in 36100f1ac3bcSmrg motorola) 36110f1ac3bcSmrg 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]]' 36120f1ac3bcSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 36133e6c936aSmrg ;; 36140f1ac3bcSmrg ncr) 36150f1ac3bcSmrg lt_cv_deplibs_check_method=pass_all 36160f1ac3bcSmrg ;; 36170f1ac3bcSmrg sequent) 36180f1ac3bcSmrg lt_cv_file_magic_cmd='/bin/file' 36190f1ac3bcSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 36200f1ac3bcSmrg ;; 36210f1ac3bcSmrg sni) 36220f1ac3bcSmrg lt_cv_file_magic_cmd='/bin/file' 36230f1ac3bcSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 36240f1ac3bcSmrg lt_cv_file_magic_test_file=/lib/libc.so 36250f1ac3bcSmrg ;; 36260f1ac3bcSmrg siemens) 36270f1ac3bcSmrg lt_cv_deplibs_check_method=pass_all 36280f1ac3bcSmrg ;; 36290f1ac3bcSmrg pc) 36300f1ac3bcSmrg lt_cv_deplibs_check_method=pass_all 36313e6c936aSmrg ;; 36323e6c936aSmrg esac 36333e6c936aSmrg ;; 36344456fccdSmrg 36350f1ac3bcSmrgtpf*) 36360f1ac3bcSmrg lt_cv_deplibs_check_method=pass_all 36370f1ac3bcSmrg ;; 3638b0a0317aSmrgos2*) 3639b0a0317aSmrg lt_cv_deplibs_check_method=pass_all 3640b0a0317aSmrg ;; 36413e6c936aSmrgesac 36420f1ac3bcSmrg]) 36430f1ac3bcSmrg 36440f1ac3bcSmrgfile_magic_glob= 36450f1ac3bcSmrgwant_nocaseglob=no 36460f1ac3bcSmrgif test "$build" = "$host"; then 36470f1ac3bcSmrg case $host_os in 36480f1ac3bcSmrg mingw* | pw32*) 36490f1ac3bcSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 36500f1ac3bcSmrg want_nocaseglob=yes 36513e6c936aSmrg else 36520f1ac3bcSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 36533e6c936aSmrg fi 36543e6c936aSmrg ;; 36550f1ac3bcSmrg esac 36560f1ac3bcSmrgfi 365742d69509Smrg 36580f1ac3bcSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 36590f1ac3bcSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 36600f1ac3bcSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 366142d69509Smrg 36620f1ac3bcSmrg_LT_DECL([], [deplibs_check_method], [1], 36630f1ac3bcSmrg [Method to check whether dependent libraries are shared objects]) 36640f1ac3bcSmrg_LT_DECL([], [file_magic_cmd], [1], 36650f1ac3bcSmrg [Command to use when deplibs_check_method = "file_magic"]) 36660f1ac3bcSmrg_LT_DECL([], [file_magic_glob], [1], 36670f1ac3bcSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 36680f1ac3bcSmrg_LT_DECL([], [want_nocaseglob], [1], 36690f1ac3bcSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 36700f1ac3bcSmrg])# _LT_CHECK_MAGIC_METHOD 36714456fccdSmrg 36724456fccdSmrg 36733e6c936aSmrg# LT_PATH_NM 36743e6c936aSmrg# ---------- 36753e6c936aSmrg# find the pathname to a BSD- or MS-compatible name lister 36763e6c936aSmrgAC_DEFUN([LT_PATH_NM], 36773e6c936aSmrg[AC_REQUIRE([AC_PROG_CC])dnl 36783e6c936aSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 36793e6c936aSmrg[if test -n "$NM"; then 36803e6c936aSmrg # Let the user override the test. 3681b0a0317aSmrg lt_cv_path_NM=$NM 36823e6c936aSmrgelse 3683b0a0317aSmrg lt_nm_to_check=${ac_tool_prefix}nm 36843e6c936aSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 36853e6c936aSmrg lt_nm_to_check="$lt_nm_to_check nm" 36863e6c936aSmrg fi 36873e6c936aSmrg for lt_tmp_nm in $lt_nm_to_check; do 3688b0a0317aSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 36893e6c936aSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3690b0a0317aSmrg IFS=$lt_save_ifs 36913e6c936aSmrg test -z "$ac_dir" && ac_dir=. 3692b0a0317aSmrg tmp_nm=$ac_dir/$lt_tmp_nm 3693b0a0317aSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 36943e6c936aSmrg # Check to see if the nm accepts a BSD-compat flag. 3695b0a0317aSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 36963e6c936aSmrg # nm: unknown option "B" ignored 36973e6c936aSmrg # Tru64's nm complains that /dev/null is an invalid object file 3698b0a0317aSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3699b0a0317aSmrg case $build_os in 3700b0a0317aSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 3701b0a0317aSmrg *) lt_bad_file=/dev/null ;; 3702b0a0317aSmrg esac 3703b0a0317aSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 3704b0a0317aSmrg *$lt_bad_file* | *'Invalid file or object type'*) 37053e6c936aSmrg lt_cv_path_NM="$tmp_nm -B" 3706b0a0317aSmrg break 2 3707ff63a143Smrg ;; 3708ff63a143Smrg *) 37093e6c936aSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 37103e6c936aSmrg */dev/null*) 37113e6c936aSmrg lt_cv_path_NM="$tmp_nm -p" 3712b0a0317aSmrg break 2 37133e6c936aSmrg ;; 37143e6c936aSmrg *) 37153e6c936aSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 37163e6c936aSmrg continue # so that we can try to find one that supports BSD flags 37173e6c936aSmrg ;; 37183e6c936aSmrg esac 3719ff63a143Smrg ;; 3720ff63a143Smrg esac 3721ff63a143Smrg fi 37223e6c936aSmrg done 3723b0a0317aSmrg IFS=$lt_save_ifs 37243e6c936aSmrg done 37253e6c936aSmrg : ${lt_cv_path_NM=no} 37263e6c936aSmrgfi]) 3727b0a0317aSmrgif test no != "$lt_cv_path_NM"; then 3728b0a0317aSmrg NM=$lt_cv_path_NM 37293e6c936aSmrgelse 37303e6c936aSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 37313e6c936aSmrg if test -n "$DUMPBIN"; then : 37323e6c936aSmrg # Let the user override the test. 37333e6c936aSmrg else 37343e6c936aSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3735b0a0317aSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 37363e6c936aSmrg *COFF*) 3737b0a0317aSmrg DUMPBIN="$DUMPBIN -symbols -headers" 3738ff63a143Smrg ;; 37393e6c936aSmrg *) 37403e6c936aSmrg DUMPBIN=: 3741ff63a143Smrg ;; 37423e6c936aSmrg esac 37433e6c936aSmrg fi 37443e6c936aSmrg AC_SUBST([DUMPBIN]) 3745b0a0317aSmrg if test : != "$DUMPBIN"; then 3746b0a0317aSmrg NM=$DUMPBIN 37473e6c936aSmrg fi 37483e6c936aSmrgfi 37493e6c936aSmrgtest -z "$NM" && NM=nm 37503e6c936aSmrgAC_SUBST([NM]) 37513e6c936aSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 37524456fccdSmrg 37533e6c936aSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 37543e6c936aSmrg [lt_cv_nm_interface="BSD nm" 37553e6c936aSmrg echo "int some_variable = 0;" > conftest.$ac_ext 37563e6c936aSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 37573e6c936aSmrg (eval "$ac_compile" 2>conftest.err) 37583e6c936aSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 37593e6c936aSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 37603e6c936aSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 37613e6c936aSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 37623e6c936aSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 37633e6c936aSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 37643e6c936aSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 37653e6c936aSmrg lt_cv_nm_interface="MS dumpbin" 37663e6c936aSmrg fi 37673e6c936aSmrg rm -f conftest*]) 37683e6c936aSmrg])# LT_PATH_NM 37694456fccdSmrg 37703e6c936aSmrg# Old names: 37713e6c936aSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 37723e6c936aSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 37733e6c936aSmrgdnl aclocal-1.4 backwards compatibility: 37743e6c936aSmrgdnl AC_DEFUN([AM_PROG_NM], []) 37753e6c936aSmrgdnl AC_DEFUN([AC_PROG_NM], []) 37764456fccdSmrg 37773e6c936aSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 37783e6c936aSmrg# -------------------------------- 37793e6c936aSmrg# how to determine the name of the shared library 37803e6c936aSmrg# associated with a specific link library. 37813e6c936aSmrg# -- PORTME fill in with the dynamic library characteristics 37823e6c936aSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 37833e6c936aSmrg[m4_require([_LT_DECL_EGREP]) 37843e6c936aSmrgm4_require([_LT_DECL_OBJDUMP]) 37853e6c936aSmrgm4_require([_LT_DECL_DLLTOOL]) 37863e6c936aSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 37873e6c936aSmrglt_cv_sharedlib_from_linklib_cmd, 37883e6c936aSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3789521070a0Smrg 37903e6c936aSmrgcase $host_os in 37913e6c936aSmrgcygwin* | mingw* | pw32* | cegcc*) 3792b0a0317aSmrg # two different shell functions defined in ltmain.sh; 3793b0a0317aSmrg # decide which one to use based on capabilities of $DLLTOOL 37943e6c936aSmrg case `$DLLTOOL --help 2>&1` in 37953e6c936aSmrg *--identify-strict*) 37963e6c936aSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 37973e6c936aSmrg ;; 37983e6c936aSmrg *) 37993e6c936aSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 38003e6c936aSmrg ;; 38013e6c936aSmrg esac 38023e6c936aSmrg ;; 38033e6c936aSmrg*) 38043e6c936aSmrg # fallback: assume linklib IS sharedlib 3805b0a0317aSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 38063e6c936aSmrg ;; 38073e6c936aSmrgesac 38083e6c936aSmrg]) 38093e6c936aSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 38103e6c936aSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 38114456fccdSmrg 38123e6c936aSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 38133e6c936aSmrg [Command to associate shared and link libraries]) 38143e6c936aSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 38154456fccdSmrg 38164456fccdSmrg 38173e6c936aSmrg# _LT_PATH_MANIFEST_TOOL 38183e6c936aSmrg# ---------------------- 38193e6c936aSmrg# locate the manifest tool 38203e6c936aSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 38213e6c936aSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 38223e6c936aSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 38233e6c936aSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 38243e6c936aSmrg [lt_cv_path_mainfest_tool=no 38253e6c936aSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 38263e6c936aSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 38273e6c936aSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 38283e6c936aSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 38293e6c936aSmrg lt_cv_path_mainfest_tool=yes 38303e6c936aSmrg fi 38313e6c936aSmrg rm -f conftest*]) 3832b0a0317aSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 38333e6c936aSmrg MANIFEST_TOOL=: 38343e6c936aSmrgfi 38353e6c936aSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 38363e6c936aSmrg])# _LT_PATH_MANIFEST_TOOL 38374456fccdSmrg 38384456fccdSmrg 3839b0a0317aSmrg# _LT_DLL_DEF_P([FILE]) 3840b0a0317aSmrg# --------------------- 3841b0a0317aSmrg# True iff FILE is a Windows DLL '.def' file. 3842b0a0317aSmrg# Keep in sync with func_dll_def_p in the libtool script 3843b0a0317aSmrgAC_DEFUN([_LT_DLL_DEF_P], 3844b0a0317aSmrg[dnl 3845b0a0317aSmrg test DEF = "`$SED -n dnl 3846b0a0317aSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3847b0a0317aSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3848b0a0317aSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3849b0a0317aSmrg -e q dnl Only consider the first "real" line 3850b0a0317aSmrg $1`" dnl 3851b0a0317aSmrg])# _LT_DLL_DEF_P 3852b0a0317aSmrg 3853b0a0317aSmrg 38543e6c936aSmrg# LT_LIB_M 38553e6c936aSmrg# -------- 38563e6c936aSmrg# check for math library 38573e6c936aSmrgAC_DEFUN([LT_LIB_M], 38583e6c936aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 38593e6c936aSmrgLIBM= 38603e6c936aSmrgcase $host in 38613e6c936aSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 38623e6c936aSmrg # These system don't have libm, or don't need it 38633e6c936aSmrg ;; 38643e6c936aSmrg*-ncr-sysv4.3*) 3865b0a0317aSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 38663e6c936aSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 38673e6c936aSmrg ;; 38683e6c936aSmrg*) 3869b0a0317aSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 38703e6c936aSmrg ;; 38713e6c936aSmrgesac 38723e6c936aSmrgAC_SUBST([LIBM]) 38733e6c936aSmrg])# LT_LIB_M 38744456fccdSmrg 38753e6c936aSmrg# Old name: 38763e6c936aSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 38773e6c936aSmrgdnl aclocal-1.4 backwards compatibility: 38783e6c936aSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 38794456fccdSmrg 38804456fccdSmrg 38813e6c936aSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 38823e6c936aSmrg# ------------------------------- 38833e6c936aSmrgm4_defun([_LT_COMPILER_NO_RTTI], 38843e6c936aSmrg[m4_require([_LT_TAG_COMPILER])dnl 38854456fccdSmrg 38863e6c936aSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 38874456fccdSmrg 3888b0a0317aSmrgif test yes = "$GCC"; then 38893e6c936aSmrg case $cc_basename in 38903e6c936aSmrg nvcc*) 38913e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 38923e6c936aSmrg *) 38933e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 38943e6c936aSmrg esac 38954456fccdSmrg 38963e6c936aSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 38973e6c936aSmrg lt_cv_prog_compiler_rtti_exceptions, 38983e6c936aSmrg [-fno-rtti -fno-exceptions], [], 38993e6c936aSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 39003e6c936aSmrgfi 39013e6c936aSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 39023e6c936aSmrg [Compiler flag to turn off builtin functions]) 39033e6c936aSmrg])# _LT_COMPILER_NO_RTTI 39044456fccdSmrg 39054456fccdSmrg 39063e6c936aSmrg# _LT_CMD_GLOBAL_SYMBOLS 39073e6c936aSmrg# ---------------------- 39083e6c936aSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 39093e6c936aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 39103e6c936aSmrgAC_REQUIRE([AC_PROG_CC])dnl 39113e6c936aSmrgAC_REQUIRE([AC_PROG_AWK])dnl 39123e6c936aSmrgAC_REQUIRE([LT_PATH_NM])dnl 39133e6c936aSmrgAC_REQUIRE([LT_PATH_LD])dnl 39143e6c936aSmrgm4_require([_LT_DECL_SED])dnl 39153e6c936aSmrgm4_require([_LT_DECL_EGREP])dnl 39163e6c936aSmrgm4_require([_LT_TAG_COMPILER])dnl 39174456fccdSmrg 39183e6c936aSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 39193e6c936aSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 39203e6c936aSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 39213e6c936aSmrg[ 39223e6c936aSmrg# These are sane defaults that work on at least a few old systems. 39233e6c936aSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3924521070a0Smrg 39253e6c936aSmrg# Character class describing NM global symbol codes. 39263e6c936aSmrgsymcode='[[BCDEGRST]]' 392742d69509Smrg 39283e6c936aSmrg# Regexp to match symbols that can be accessed directly from C. 39293e6c936aSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 39303e6c936aSmrg 39313e6c936aSmrg# Define system-specific variables. 39323e6c936aSmrgcase $host_os in 39333e6c936aSmrgaix*) 39343e6c936aSmrg symcode='[[BCDT]]' 39353e6c936aSmrg ;; 39363e6c936aSmrgcygwin* | mingw* | pw32* | cegcc*) 39373e6c936aSmrg symcode='[[ABCDGISTW]]' 39383e6c936aSmrg ;; 39393e6c936aSmrghpux*) 3940b0a0317aSmrg if test ia64 = "$host_cpu"; then 39413e6c936aSmrg symcode='[[ABCDEGRST]]' 3942ff63a143Smrg fi 39433e6c936aSmrg ;; 39443e6c936aSmrgirix* | nonstopux*) 39453e6c936aSmrg symcode='[[BCDEGRST]]' 39463e6c936aSmrg ;; 39473e6c936aSmrgosf*) 39483e6c936aSmrg symcode='[[BCDEGQRST]]' 39493e6c936aSmrg ;; 39503e6c936aSmrgsolaris*) 39513e6c936aSmrg symcode='[[BDRT]]' 39523e6c936aSmrg ;; 39533e6c936aSmrgsco3.2v5*) 39543e6c936aSmrg symcode='[[DT]]' 39553e6c936aSmrg ;; 39563e6c936aSmrgsysv4.2uw2*) 39573e6c936aSmrg symcode='[[DT]]' 39583e6c936aSmrg ;; 39593e6c936aSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 39603e6c936aSmrg symcode='[[ABDT]]' 39613e6c936aSmrg ;; 39623e6c936aSmrgsysv4) 39633e6c936aSmrg symcode='[[DFNSTU]]' 39643e6c936aSmrg ;; 39653e6c936aSmrgesac 39664456fccdSmrg 39673e6c936aSmrg# If we're using GNU nm, then use its standard symbol codes. 39683e6c936aSmrgcase `$NM -V 2>&1` in 39693e6c936aSmrg*GNU* | *'with BFD'*) 39703e6c936aSmrg symcode='[[ABCDGIRSTW]]' ;; 39713e6c936aSmrgesac 39724456fccdSmrg 3973b0a0317aSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3974b0a0317aSmrg # Gets list of data symbols to import. 3975b0a0317aSmrg lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 3976b0a0317aSmrg # Adjust the below global symbol transforms to fixup imported variables. 3977b0a0317aSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3978b0a0317aSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3979b0a0317aSmrg lt_c_name_lib_hook="\ 3980b0a0317aSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 3981b0a0317aSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 3982b0a0317aSmrgelse 3983b0a0317aSmrg # Disable hooks by default. 3984b0a0317aSmrg lt_cv_sys_global_symbol_to_import= 3985b0a0317aSmrg lt_cdecl_hook= 3986b0a0317aSmrg lt_c_name_hook= 3987b0a0317aSmrg lt_c_name_lib_hook= 3988b0a0317aSmrgfi 3989b0a0317aSmrg 39903e6c936aSmrg# Transform an extracted symbol line into a proper C declaration. 39913e6c936aSmrg# Some systems (esp. on ia64) link data and code symbols differently, 39923e6c936aSmrg# so use this general approach. 3993b0a0317aSmrglt_cv_sys_global_symbol_to_cdecl="sed -n"\ 3994b0a0317aSmrg$lt_cdecl_hook\ 3995b0a0317aSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 3996b0a0317aSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 3997521070a0Smrg 39983e6c936aSmrg# Transform an extracted symbol line into symbol name and symbol address 3999b0a0317aSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 4000b0a0317aSmrg$lt_c_name_hook\ 4001b0a0317aSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4002b0a0317aSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4003b0a0317aSmrg 4004b0a0317aSmrg# Transform an extracted symbol line into symbol name with lib prefix and 4005b0a0317aSmrg# symbol address. 4006b0a0317aSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 4007b0a0317aSmrg$lt_c_name_lib_hook\ 4008b0a0317aSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4009b0a0317aSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4010b0a0317aSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4011521070a0Smrg 40123e6c936aSmrg# Handle CRLF in mingw tool chain 40133e6c936aSmrgopt_cr= 40143e6c936aSmrgcase $build_os in 40153e6c936aSmrgmingw*) 40163e6c936aSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 40173e6c936aSmrg ;; 40183e6c936aSmrgesac 4019ff63a143Smrg 40203e6c936aSmrg# Try without a prefix underscore, then with it. 40213e6c936aSmrgfor ac_symprfx in "" "_"; do 40223e6c936aSmrg 40233e6c936aSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 40243e6c936aSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 40253e6c936aSmrg 40263e6c936aSmrg # Write the raw and C identifiers. 40273e6c936aSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4028b0a0317aSmrg # Fake it for dumpbin and say T for any non-static function, 4029b0a0317aSmrg # D for any global variable and I for any imported variable. 40303e6c936aSmrg # Also find C++ and __fastcall symbols from MSVC++, 40313e6c936aSmrg # which start with @ or ?. 40323e6c936aSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 40333e6c936aSmrg" {last_section=section; section=\$ 3};"\ 40343e6c936aSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 40353e6c936aSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4036b0a0317aSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4037b0a0317aSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4038b0a0317aSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 40393e6c936aSmrg" \$ 0!~/External *\|/{next};"\ 40403e6c936aSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 40413e6c936aSmrg" {if(hide[section]) next};"\ 4042b0a0317aSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4043b0a0317aSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4044b0a0317aSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4045b0a0317aSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 40463e6c936aSmrg" ' prfx=^$ac_symprfx]" 40473e6c936aSmrg else 40483e6c936aSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 40493e6c936aSmrg fi 40503e6c936aSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 40513e6c936aSmrg 40523e6c936aSmrg # Check to see that the pipe works correctly. 40533e6c936aSmrg pipe_works=no 40543e6c936aSmrg 40553e6c936aSmrg rm -f conftest* 40563e6c936aSmrg cat > conftest.$ac_ext <<_LT_EOF 40573e6c936aSmrg#ifdef __cplusplus 40583e6c936aSmrgextern "C" { 40593e6c936aSmrg#endif 40603e6c936aSmrgchar nm_test_var; 40613e6c936aSmrgvoid nm_test_func(void); 40623e6c936aSmrgvoid nm_test_func(void){} 40633e6c936aSmrg#ifdef __cplusplus 40643e6c936aSmrg} 40653e6c936aSmrg#endif 40663e6c936aSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 40673e6c936aSmrg_LT_EOF 40683e6c936aSmrg 40693e6c936aSmrg if AC_TRY_EVAL(ac_compile); then 40703e6c936aSmrg # Now try to grab the symbols. 40713e6c936aSmrg nlist=conftest.nm 40723e6c936aSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 40733e6c936aSmrg # Try sorting and uniquifying the output. 40743e6c936aSmrg if sort "$nlist" | uniq > "$nlist"T; then 40753e6c936aSmrg mv -f "$nlist"T "$nlist" 40763e6c936aSmrg else 40773e6c936aSmrg rm -f "$nlist"T 40783e6c936aSmrg fi 40793e6c936aSmrg 40803e6c936aSmrg # Make sure that we snagged all the symbols we need. 40813e6c936aSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 40823e6c936aSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 40833e6c936aSmrg cat <<_LT_EOF > conftest.$ac_ext 40843e6c936aSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4085b0a0317aSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4086b0a0317aSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 40873e6c936aSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 40883e6c936aSmrg# define LT@&t@_DLSYM_CONST 4089b0a0317aSmrg#elif defined __osf__ 40903e6c936aSmrg/* This system does not cope well with relocations in const data. */ 40913e6c936aSmrg# define LT@&t@_DLSYM_CONST 40923e6c936aSmrg#else 40933e6c936aSmrg# define LT@&t@_DLSYM_CONST const 40943e6c936aSmrg#endif 40953e6c936aSmrg 40963e6c936aSmrg#ifdef __cplusplus 40973e6c936aSmrgextern "C" { 40983e6c936aSmrg#endif 40993e6c936aSmrg 41003e6c936aSmrg_LT_EOF 41013e6c936aSmrg # Now generate the symbol file. 41023e6c936aSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 41033e6c936aSmrg 41043e6c936aSmrg cat <<_LT_EOF >> conftest.$ac_ext 41053e6c936aSmrg 41063e6c936aSmrg/* The mapping between symbol names and symbols. */ 41073e6c936aSmrgLT@&t@_DLSYM_CONST struct { 41083e6c936aSmrg const char *name; 41093e6c936aSmrg void *address; 41103e6c936aSmrg} 41113e6c936aSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 41123e6c936aSmrg{ 41133e6c936aSmrg { "@PROGRAM@", (void *) 0 }, 41143e6c936aSmrg_LT_EOF 4115b0a0317aSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 41163e6c936aSmrg cat <<\_LT_EOF >> conftest.$ac_ext 41173e6c936aSmrg {0, (void *) 0} 41183e6c936aSmrg}; 41193e6c936aSmrg 41203e6c936aSmrg/* This works around a problem in FreeBSD linker */ 41213e6c936aSmrg#ifdef FREEBSD_WORKAROUND 41223e6c936aSmrgstatic const void *lt_preloaded_setup() { 41233e6c936aSmrg return lt__PROGRAM__LTX_preloaded_symbols; 41243e6c936aSmrg} 41253e6c936aSmrg#endif 41263e6c936aSmrg 41273e6c936aSmrg#ifdef __cplusplus 41283e6c936aSmrg} 41293e6c936aSmrg#endif 41303e6c936aSmrg_LT_EOF 41313e6c936aSmrg # Now try linking the two files. 41323e6c936aSmrg mv conftest.$ac_objext conftstm.$ac_objext 41333e6c936aSmrg lt_globsym_save_LIBS=$LIBS 41343e6c936aSmrg lt_globsym_save_CFLAGS=$CFLAGS 4135b0a0317aSmrg LIBS=conftstm.$ac_objext 41363e6c936aSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4137b0a0317aSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 41383e6c936aSmrg pipe_works=yes 4139ff63a143Smrg fi 41403e6c936aSmrg LIBS=$lt_globsym_save_LIBS 41413e6c936aSmrg CFLAGS=$lt_globsym_save_CFLAGS 4142ff63a143Smrg else 41433e6c936aSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4144ff63a143Smrg fi 41453e6c936aSmrg else 41463e6c936aSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 41473e6c936aSmrg fi 41483e6c936aSmrg else 41493e6c936aSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 41503e6c936aSmrg fi 41513e6c936aSmrg else 41523e6c936aSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 41533e6c936aSmrg cat conftest.$ac_ext >&5 41543e6c936aSmrg fi 41553e6c936aSmrg rm -rf conftest* conftst* 41563e6c936aSmrg 41573e6c936aSmrg # Do not use the global_symbol_pipe unless it works. 4158b0a0317aSmrg if test yes = "$pipe_works"; then 41593e6c936aSmrg break 41603e6c936aSmrg else 41613e6c936aSmrg lt_cv_sys_global_symbol_pipe= 41623e6c936aSmrg fi 41633e6c936aSmrgdone 41643e6c936aSmrg]) 41653e6c936aSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 41663e6c936aSmrg lt_cv_sys_global_symbol_to_cdecl= 41673e6c936aSmrgfi 41683e6c936aSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 41693e6c936aSmrg AC_MSG_RESULT(failed) 41703e6c936aSmrgelse 41713e6c936aSmrg AC_MSG_RESULT(ok) 41723e6c936aSmrgfi 41733e6c936aSmrg 41743e6c936aSmrg# Response file support. 41753e6c936aSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 41763e6c936aSmrg nm_file_list_spec='@' 41773e6c936aSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 41783e6c936aSmrg nm_file_list_spec='@' 41793e6c936aSmrgfi 41803e6c936aSmrg 41813e6c936aSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 41823e6c936aSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 41833e6c936aSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 41843e6c936aSmrg [Transform the output of nm in a proper C declaration]) 4185b0a0317aSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4186b0a0317aSmrg [Transform the output of nm into a list of symbols to manually relocate]) 41873e6c936aSmrg_LT_DECL([global_symbol_to_c_name_address], 41883e6c936aSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 41893e6c936aSmrg [Transform the output of nm in a C name address pair]) 41903e6c936aSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 41913e6c936aSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 41923e6c936aSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 4193b0a0317aSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4194b0a0317aSmrg [The name lister interface]) 41953e6c936aSmrg_LT_DECL([], [nm_file_list_spec], [1], 41963e6c936aSmrg [Specify filename containing input files for $NM]) 41973e6c936aSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 41983e6c936aSmrg 41993e6c936aSmrg 42003e6c936aSmrg# _LT_COMPILER_PIC([TAGNAME]) 42013e6c936aSmrg# --------------------------- 42023e6c936aSmrgm4_defun([_LT_COMPILER_PIC], 42033e6c936aSmrg[m4_require([_LT_TAG_COMPILER])dnl 42043e6c936aSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 42053e6c936aSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 42063e6c936aSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 42073e6c936aSmrg 42083e6c936aSmrgm4_if([$1], [CXX], [ 42093e6c936aSmrg # C++ specific cases for pic, static, wl, etc. 4210b0a0317aSmrg if test yes = "$GXX"; then 42113e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42123e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42133e6c936aSmrg 42143e6c936aSmrg case $host_os in 42153e6c936aSmrg aix*) 42163e6c936aSmrg # All AIX code is PIC. 4217b0a0317aSmrg if test ia64 = "$host_cpu"; then 42183e6c936aSmrg # AIX 5 now supports IA64 processor 42193e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42203e6c936aSmrg fi 4221b0a0317aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42223e6c936aSmrg ;; 42233e6c936aSmrg 42243e6c936aSmrg amigaos*) 42253e6c936aSmrg case $host_cpu in 42263e6c936aSmrg powerpc) 42273e6c936aSmrg # see comment about AmigaOS4 .so support 42283e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42293e6c936aSmrg ;; 42303e6c936aSmrg m68k) 42313e6c936aSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4232b0a0317aSmrg # adding the '-m68020' flag to GCC prevents building anything better, 4233b0a0317aSmrg # like '-m68040'. 42343e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42353e6c936aSmrg ;; 42363e6c936aSmrg esac 42373e6c936aSmrg ;; 42383e6c936aSmrg 42393e6c936aSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42403e6c936aSmrg # PIC is the default for these OSes. 4241ff63a143Smrg ;; 42423e6c936aSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 42433e6c936aSmrg # This hack is so that the source file can tell whether it is being 42443e6c936aSmrg # built for inclusion in a dll (and should export symbols for example). 42453e6c936aSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42463e6c936aSmrg # (--disable-auto-import) libraries 42473e6c936aSmrg m4_if([$1], [GCJ], [], 42483e6c936aSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4249b0a0317aSmrg case $host_os in 4250b0a0317aSmrg os2*) 4251b0a0317aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4252b0a0317aSmrg ;; 4253b0a0317aSmrg esac 42543e6c936aSmrg ;; 42553e6c936aSmrg darwin* | rhapsody*) 42563e6c936aSmrg # PIC is the default on this platform 42573e6c936aSmrg # Common symbols not allowed in MH_DYLIB files 42583e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42593e6c936aSmrg ;; 42603e6c936aSmrg *djgpp*) 42613e6c936aSmrg # DJGPP does not support shared libraries at all 42623e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 42633e6c936aSmrg ;; 42643e6c936aSmrg haiku*) 42653e6c936aSmrg # PIC is the default for Haiku. 42663e6c936aSmrg # The "-static" flag exists, but is broken. 42673e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 42683e6c936aSmrg ;; 42693e6c936aSmrg interix[[3-9]]*) 42703e6c936aSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42713e6c936aSmrg # Instead, we relocate shared libraries at runtime. 42723e6c936aSmrg ;; 42733e6c936aSmrg sysv4*MP*) 42743e6c936aSmrg if test -d /usr/nec; then 42753e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 42763e6c936aSmrg fi 42773e6c936aSmrg ;; 42783e6c936aSmrg hpux*) 42793e6c936aSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42803e6c936aSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42813e6c936aSmrg # sets the default TLS model and affects inlining. 42823e6c936aSmrg case $host_cpu in 42833e6c936aSmrg hppa*64*) 42843e6c936aSmrg ;; 42853e6c936aSmrg *) 42863e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42873e6c936aSmrg ;; 42883e6c936aSmrg esac 42893e6c936aSmrg ;; 42903e6c936aSmrg *qnx* | *nto*) 42913e6c936aSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 42923e6c936aSmrg # it will coredump. 42933e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 42943e6c936aSmrg ;; 42953e6c936aSmrg *) 42963e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42973e6c936aSmrg ;; 42983e6c936aSmrg esac 42993e6c936aSmrg else 43003e6c936aSmrg case $host_os in 43013e6c936aSmrg aix[[4-9]]*) 43023e6c936aSmrg # All AIX code is PIC. 4303b0a0317aSmrg if test ia64 = "$host_cpu"; then 43043e6c936aSmrg # AIX 5 now supports IA64 processor 43053e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43063e6c936aSmrg else 43073e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43083e6c936aSmrg fi 43093e6c936aSmrg ;; 43103e6c936aSmrg chorus*) 43113e6c936aSmrg case $cc_basename in 43123e6c936aSmrg cxch68*) 43133e6c936aSmrg # Green Hills C++ Compiler 43143e6c936aSmrg # _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" 43153e6c936aSmrg ;; 43163e6c936aSmrg esac 43173e6c936aSmrg ;; 43183e6c936aSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 43193e6c936aSmrg # This hack is so that the source file can tell whether it is being 43203e6c936aSmrg # built for inclusion in a dll (and should export symbols for example). 43213e6c936aSmrg m4_if([$1], [GCJ], [], 43223e6c936aSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43233e6c936aSmrg ;; 43243e6c936aSmrg dgux*) 43253e6c936aSmrg case $cc_basename in 43263e6c936aSmrg ec++*) 43273e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43283e6c936aSmrg ;; 43293e6c936aSmrg ghcx*) 43303e6c936aSmrg # Green Hills C++ Compiler 43313e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 43323e6c936aSmrg ;; 43333e6c936aSmrg *) 43343e6c936aSmrg ;; 43353e6c936aSmrg esac 43363e6c936aSmrg ;; 43373e6c936aSmrg freebsd* | dragonfly*) 43383e6c936aSmrg # FreeBSD uses GNU C++ 43393e6c936aSmrg ;; 43403e6c936aSmrg hpux9* | hpux10* | hpux11*) 43413e6c936aSmrg case $cc_basename in 43423e6c936aSmrg CC*) 43433e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4344b0a0317aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4345b0a0317aSmrg if test ia64 != "$host_cpu"; then 43463e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43473e6c936aSmrg fi 43483e6c936aSmrg ;; 43493e6c936aSmrg aCC*) 43503e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4351b0a0317aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43523e6c936aSmrg case $host_cpu in 43533e6c936aSmrg hppa*64*|ia64*) 43543e6c936aSmrg # +Z the default 43553e6c936aSmrg ;; 43563e6c936aSmrg *) 43573e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43583e6c936aSmrg ;; 43593e6c936aSmrg esac 43603e6c936aSmrg ;; 43613e6c936aSmrg *) 43623e6c936aSmrg ;; 43633e6c936aSmrg esac 43643e6c936aSmrg ;; 43653e6c936aSmrg interix*) 43663e6c936aSmrg # This is c89, which is MS Visual C++ (no shared libs) 43673e6c936aSmrg # Anyone wants to do a port? 43683e6c936aSmrg ;; 43693e6c936aSmrg irix5* | irix6* | nonstopux*) 43703e6c936aSmrg case $cc_basename in 43713e6c936aSmrg CC*) 43723e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43733e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43743e6c936aSmrg # CC pic flag -KPIC is the default. 43753e6c936aSmrg ;; 43763e6c936aSmrg *) 43773e6c936aSmrg ;; 43783e6c936aSmrg esac 43793e6c936aSmrg ;; 43800f1ac3bcSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 43813e6c936aSmrg case $cc_basename in 43823e6c936aSmrg KCC*) 43833e6c936aSmrg # KAI C++ Compiler 43843e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 43853e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43863e6c936aSmrg ;; 43873e6c936aSmrg ecpc* ) 4388b0a0317aSmrg # old Intel C++ for x86_64, which still supported -KPIC. 43893e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43903e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43913e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43923e6c936aSmrg ;; 43933e6c936aSmrg icpc* ) 43943e6c936aSmrg # Intel C++, used to be incompatible with GCC. 43953e6c936aSmrg # ICC 10 doesn't accept -KPIC any more. 43963e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43973e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43983e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43993e6c936aSmrg ;; 44003e6c936aSmrg pgCC* | pgcpp*) 44013e6c936aSmrg # Portland Group C++ compiler 44023e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44033e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44043e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44053e6c936aSmrg ;; 44063e6c936aSmrg cxx*) 44073e6c936aSmrg # Compaq C++ 44083e6c936aSmrg # Make sure the PIC flag is empty. It appears that all Alpha 44093e6c936aSmrg # Linux and Compaq Tru64 Unix objects are PIC. 44103e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44113e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44123e6c936aSmrg ;; 44133e6c936aSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 44143e6c936aSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 44153e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44163e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44173e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44183e6c936aSmrg ;; 44193e6c936aSmrg *) 44203e6c936aSmrg case `$CC -V 2>&1 | sed 5q` in 44213e6c936aSmrg *Sun\ C*) 44223e6c936aSmrg # Sun C++ 5.9 44233e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44243e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44253e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44263e6c936aSmrg ;; 44273e6c936aSmrg esac 44283e6c936aSmrg ;; 44293e6c936aSmrg esac 44303e6c936aSmrg ;; 44313e6c936aSmrg lynxos*) 44323e6c936aSmrg ;; 44333e6c936aSmrg m88k*) 44343e6c936aSmrg ;; 44353e6c936aSmrg mvs*) 44363e6c936aSmrg case $cc_basename in 44373e6c936aSmrg cxx*) 44383e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 44393e6c936aSmrg ;; 44403e6c936aSmrg *) 44413e6c936aSmrg ;; 44423e6c936aSmrg esac 44433e6c936aSmrg ;; 4444b0a0317aSmrg netbsd*) 44453e6c936aSmrg ;; 44463e6c936aSmrg *qnx* | *nto*) 44473e6c936aSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44483e6c936aSmrg # it will coredump. 44493e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44503e6c936aSmrg ;; 44513e6c936aSmrg osf3* | osf4* | osf5*) 44523e6c936aSmrg case $cc_basename in 44533e6c936aSmrg KCC*) 44543e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 44553e6c936aSmrg ;; 44563e6c936aSmrg RCC*) 44573e6c936aSmrg # Rational C++ 2.4.1 44583e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44593e6c936aSmrg ;; 44603e6c936aSmrg cxx*) 44613e6c936aSmrg # Digital/Compaq C++ 44623e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44633e6c936aSmrg # Make sure the PIC flag is empty. It appears that all Alpha 44643e6c936aSmrg # Linux and Compaq Tru64 Unix objects are PIC. 44653e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44663e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44673e6c936aSmrg ;; 44683e6c936aSmrg *) 44693e6c936aSmrg ;; 44703e6c936aSmrg esac 44713e6c936aSmrg ;; 44723e6c936aSmrg psos*) 44733e6c936aSmrg ;; 44743e6c936aSmrg solaris*) 44753e6c936aSmrg case $cc_basename in 44763e6c936aSmrg CC* | sunCC*) 44773e6c936aSmrg # Sun C++ 4.2, 5.x and Centerline C++ 44783e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44793e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44803e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44813e6c936aSmrg ;; 44823e6c936aSmrg gcx*) 44833e6c936aSmrg # Green Hills C++ Compiler 44843e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 44853e6c936aSmrg ;; 44863e6c936aSmrg *) 44873e6c936aSmrg ;; 44883e6c936aSmrg esac 44893e6c936aSmrg ;; 44903e6c936aSmrg sunos4*) 44913e6c936aSmrg case $cc_basename in 44923e6c936aSmrg CC*) 44933e6c936aSmrg # Sun C++ 4.x 44943e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44953e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44963e6c936aSmrg ;; 44973e6c936aSmrg lcc*) 44983e6c936aSmrg # Lucid 44993e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45003e6c936aSmrg ;; 45013e6c936aSmrg *) 45023e6c936aSmrg ;; 45033e6c936aSmrg esac 45043e6c936aSmrg ;; 45053e6c936aSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 45063e6c936aSmrg case $cc_basename in 45073e6c936aSmrg CC*) 45083e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45093e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45103e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45113e6c936aSmrg ;; 45123e6c936aSmrg esac 45133e6c936aSmrg ;; 45143e6c936aSmrg tandem*) 45153e6c936aSmrg case $cc_basename in 45163e6c936aSmrg NCC*) 45173e6c936aSmrg # NonStop-UX NCC 3.20 45183e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45193e6c936aSmrg ;; 45203e6c936aSmrg *) 45213e6c936aSmrg ;; 45223e6c936aSmrg esac 45233e6c936aSmrg ;; 45243e6c936aSmrg vxworks*) 45253e6c936aSmrg ;; 45263e6c936aSmrg *) 45273e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45283e6c936aSmrg ;; 4529ff63a143Smrg esac 4530521070a0Smrg fi 45313e6c936aSmrg], 45323e6c936aSmrg[ 4533b0a0317aSmrg if test yes = "$GCC"; then 45343e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45353e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 45364456fccdSmrg 45373e6c936aSmrg case $host_os in 45383e6c936aSmrg aix*) 45393e6c936aSmrg # All AIX code is PIC. 4540b0a0317aSmrg if test ia64 = "$host_cpu"; then 45413e6c936aSmrg # AIX 5 now supports IA64 processor 45423e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45433e6c936aSmrg fi 4544b0a0317aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45453e6c936aSmrg ;; 45464456fccdSmrg 45473e6c936aSmrg amigaos*) 45483e6c936aSmrg case $host_cpu in 45493e6c936aSmrg powerpc) 45503e6c936aSmrg # see comment about AmigaOS4 .so support 45513e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45523e6c936aSmrg ;; 45533e6c936aSmrg m68k) 45543e6c936aSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4555b0a0317aSmrg # adding the '-m68020' flag to GCC prevents building anything better, 4556b0a0317aSmrg # like '-m68040'. 45573e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 45583e6c936aSmrg ;; 45593e6c936aSmrg esac 45603e6c936aSmrg ;; 45614456fccdSmrg 45623e6c936aSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 45633e6c936aSmrg # PIC is the default for these OSes. 45643e6c936aSmrg ;; 45654456fccdSmrg 45663e6c936aSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 45673e6c936aSmrg # This hack is so that the source file can tell whether it is being 45683e6c936aSmrg # built for inclusion in a dll (and should export symbols for example). 45693e6c936aSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 45703e6c936aSmrg # (--disable-auto-import) libraries 45713e6c936aSmrg m4_if([$1], [GCJ], [], 45723e6c936aSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4573b0a0317aSmrg case $host_os in 4574b0a0317aSmrg os2*) 4575b0a0317aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4576b0a0317aSmrg ;; 4577b0a0317aSmrg esac 45783e6c936aSmrg ;; 45794456fccdSmrg 45803e6c936aSmrg darwin* | rhapsody*) 45813e6c936aSmrg # PIC is the default on this platform 45823e6c936aSmrg # Common symbols not allowed in MH_DYLIB files 45833e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 45843e6c936aSmrg ;; 45854456fccdSmrg 45863e6c936aSmrg haiku*) 45873e6c936aSmrg # PIC is the default for Haiku. 45883e6c936aSmrg # The "-static" flag exists, but is broken. 45893e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 45903e6c936aSmrg ;; 45914456fccdSmrg 45923e6c936aSmrg hpux*) 45933e6c936aSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 45943e6c936aSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 45953e6c936aSmrg # sets the default TLS model and affects inlining. 45963e6c936aSmrg case $host_cpu in 45973e6c936aSmrg hppa*64*) 45983e6c936aSmrg # +Z the default 45993e6c936aSmrg ;; 46003e6c936aSmrg *) 46013e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46023e6c936aSmrg ;; 46033e6c936aSmrg esac 46043e6c936aSmrg ;; 46054456fccdSmrg 46063e6c936aSmrg interix[[3-9]]*) 46073e6c936aSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 46083e6c936aSmrg # Instead, we relocate shared libraries at runtime. 46093e6c936aSmrg ;; 46104456fccdSmrg 46113e6c936aSmrg msdosdjgpp*) 46123e6c936aSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 46133e6c936aSmrg # on systems that don't support them. 46143e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 46153e6c936aSmrg enable_shared=no 46163e6c936aSmrg ;; 46174456fccdSmrg 46183e6c936aSmrg *nto* | *qnx*) 46193e6c936aSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 46203e6c936aSmrg # it will coredump. 46213e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 46223e6c936aSmrg ;; 46234456fccdSmrg 46243e6c936aSmrg sysv4*MP*) 46253e6c936aSmrg if test -d /usr/nec; then 46263e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 46273e6c936aSmrg fi 46283e6c936aSmrg ;; 46294456fccdSmrg 46303e6c936aSmrg *) 46313e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46323e6c936aSmrg ;; 46333e6c936aSmrg esac 4634ff63a143Smrg 46353e6c936aSmrg case $cc_basename in 46363e6c936aSmrg nvcc*) # Cuda Compiler Driver 2.2 46373e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 46383e6c936aSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 46393e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 46403e6c936aSmrg fi 46413e6c936aSmrg ;; 46423e6c936aSmrg esac 46433e6c936aSmrg else 46443e6c936aSmrg # PORTME Check for flag to pass linker flags through the system compiler. 46453e6c936aSmrg case $host_os in 46463e6c936aSmrg aix*) 46473e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4648b0a0317aSmrg if test ia64 = "$host_cpu"; then 46493e6c936aSmrg # AIX 5 now supports IA64 processor 46503e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46513e6c936aSmrg else 46523e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 46533e6c936aSmrg fi 46543e6c936aSmrg ;; 465542d69509Smrg 4656b0a0317aSmrg darwin* | rhapsody*) 4657b0a0317aSmrg # PIC is the default on this platform 4658b0a0317aSmrg # Common symbols not allowed in MH_DYLIB files 4659b0a0317aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4660b0a0317aSmrg case $cc_basename in 4661b0a0317aSmrg nagfor*) 4662b0a0317aSmrg # NAG Fortran compiler 4663b0a0317aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4664b0a0317aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4665b0a0317aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4666b0a0317aSmrg ;; 4667b0a0317aSmrg esac 4668b0a0317aSmrg ;; 4669b0a0317aSmrg 46703e6c936aSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 46713e6c936aSmrg # This hack is so that the source file can tell whether it is being 46723e6c936aSmrg # built for inclusion in a dll (and should export symbols for example). 46733e6c936aSmrg m4_if([$1], [GCJ], [], 46743e6c936aSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4675b0a0317aSmrg case $host_os in 4676b0a0317aSmrg os2*) 4677b0a0317aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4678b0a0317aSmrg ;; 4679b0a0317aSmrg esac 46803e6c936aSmrg ;; 468142d69509Smrg 46823e6c936aSmrg hpux9* | hpux10* | hpux11*) 46833e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46843e6c936aSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 46853e6c936aSmrg # not for PA HP-UX. 46863e6c936aSmrg case $host_cpu in 46873e6c936aSmrg hppa*64*|ia64*) 46883e6c936aSmrg # +Z the default 46893e6c936aSmrg ;; 46903e6c936aSmrg *) 46913e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 46923e6c936aSmrg ;; 46933e6c936aSmrg esac 46943e6c936aSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4695b0a0317aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 46963e6c936aSmrg ;; 469742d69509Smrg 46983e6c936aSmrg irix5* | irix6* | nonstopux*) 46993e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47003e6c936aSmrg # PIC (with -KPIC) is the default. 47013e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47023e6c936aSmrg ;; 470342d69509Smrg 47040f1ac3bcSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 47053e6c936aSmrg case $cc_basename in 4706b0a0317aSmrg # old Intel for x86_64, which still supported -KPIC. 47073e6c936aSmrg ecc*) 47083e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47093e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47103e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47113e6c936aSmrg ;; 47123e6c936aSmrg # icc used to be incompatible with GCC. 47133e6c936aSmrg # ICC 10 doesn't accept -KPIC any more. 47143e6c936aSmrg icc* | ifort*) 47153e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47163e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47173e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47183e6c936aSmrg ;; 47193e6c936aSmrg # Lahey Fortran 8.1. 47203e6c936aSmrg lf95*) 47213e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47223e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 47233e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 47243e6c936aSmrg ;; 47253e6c936aSmrg nagfor*) 47263e6c936aSmrg # NAG Fortran compiler 47273e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 47283e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 47293e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47303e6c936aSmrg ;; 4731b0a0317aSmrg tcc*) 4732b0a0317aSmrg # Fabrice Bellard et al's Tiny C Compiler 4733b0a0317aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4734b0a0317aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4735b0a0317aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4736b0a0317aSmrg ;; 47373e6c936aSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 47383e6c936aSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 47393e6c936aSmrg # which looks to be a dead project) 47403e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47413e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47423e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47433e6c936aSmrg ;; 47443e6c936aSmrg ccc*) 47453e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47463e6c936aSmrg # All Alpha code is PIC. 47473e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47483e6c936aSmrg ;; 47493e6c936aSmrg xl* | bgxl* | bgf* | mpixl*) 47503e6c936aSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 47513e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47523e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 47533e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 47543e6c936aSmrg ;; 47553e6c936aSmrg *) 47563e6c936aSmrg case `$CC -V 2>&1 | sed 5q` in 47573e6c936aSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 47583e6c936aSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 47593e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47603e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47613e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 47623e6c936aSmrg ;; 47633e6c936aSmrg *Sun\ F* | *Sun*Fortran*) 47643e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47653e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47663e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 47673e6c936aSmrg ;; 47683e6c936aSmrg *Sun\ C*) 47693e6c936aSmrg # Sun C 5.9 47703e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47713e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47723e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47733e6c936aSmrg ;; 47743e6c936aSmrg *Intel*\ [[CF]]*Compiler*) 47753e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47763e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47773e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47783e6c936aSmrg ;; 47793e6c936aSmrg *Portland\ Group*) 47803e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47813e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47823e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47833e6c936aSmrg ;; 47843e6c936aSmrg esac 47853e6c936aSmrg ;; 47863e6c936aSmrg esac 47873e6c936aSmrg ;; 478842d69509Smrg 47893e6c936aSmrg newsos6) 47903e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47913e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47923e6c936aSmrg ;; 479342d69509Smrg 47943e6c936aSmrg *nto* | *qnx*) 47953e6c936aSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 47963e6c936aSmrg # it will coredump. 47973e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 47983e6c936aSmrg ;; 479942d69509Smrg 48003e6c936aSmrg osf3* | osf4* | osf5*) 48013e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48023e6c936aSmrg # All OSF/1 code is PIC. 48033e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48043e6c936aSmrg ;; 48054456fccdSmrg 48063e6c936aSmrg rdos*) 48073e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48083e6c936aSmrg ;; 48094456fccdSmrg 48103e6c936aSmrg solaris*) 48113e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48123e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48133e6c936aSmrg case $cc_basename in 48143e6c936aSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 48153e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 48163e6c936aSmrg *) 48173e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 48183e6c936aSmrg esac 48193e6c936aSmrg ;; 48204456fccdSmrg 48213e6c936aSmrg sunos4*) 48223e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 48233e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 48243e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48253e6c936aSmrg ;; 48264456fccdSmrg 48273e6c936aSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 48283e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48293e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48303e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48313e6c936aSmrg ;; 48324456fccdSmrg 48333e6c936aSmrg sysv4*MP*) 4834b0a0317aSmrg if test -d /usr/nec; then 48353e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 48363e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48373e6c936aSmrg fi 48383e6c936aSmrg ;; 48394456fccdSmrg 48403e6c936aSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 48413e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48423e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48433e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48443e6c936aSmrg ;; 48454456fccdSmrg 48463e6c936aSmrg unicos*) 48473e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48483e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48493e6c936aSmrg ;; 48504456fccdSmrg 48513e6c936aSmrg uts4*) 48523e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 48533e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48543e6c936aSmrg ;; 48553e6c936aSmrg 48563e6c936aSmrg *) 48573e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48583e6c936aSmrg ;; 48593e6c936aSmrg esac 48603e6c936aSmrg fi 48613e6c936aSmrg]) 48623e6c936aSmrgcase $host_os in 4863b0a0317aSmrg # For platforms that do not support PIC, -DPIC is meaningless: 48643e6c936aSmrg *djgpp*) 48653e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 48663e6c936aSmrg ;; 48673e6c936aSmrg *) 48683e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 48693e6c936aSmrg ;; 48703e6c936aSmrgesac 48714456fccdSmrg 48723e6c936aSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 48733e6c936aSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 48743e6c936aSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 48753e6c936aSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4876ff63a143Smrg 48773e6c936aSmrg# 48783e6c936aSmrg# Check to make sure the PIC flag actually works. 48793e6c936aSmrg# 48803e6c936aSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 48813e6c936aSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 48823e6c936aSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 48833e6c936aSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 48843e6c936aSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 48853e6c936aSmrg "" | " "*) ;; 48863e6c936aSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 48873e6c936aSmrg esac], 48883e6c936aSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 48893e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 48903e6c936aSmrgfi 48913e6c936aSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 48923e6c936aSmrg [Additional compiler flags for building library objects]) 4893ff63a143Smrg 48943e6c936aSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 48953e6c936aSmrg [How to pass a linker flag through the compiler]) 48963e6c936aSmrg# 48973e6c936aSmrg# Check to make sure the static flag actually works. 48983e6c936aSmrg# 48993e6c936aSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 49003e6c936aSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 49013e6c936aSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 49023e6c936aSmrg $lt_tmp_static_flag, 49033e6c936aSmrg [], 49043e6c936aSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 49053e6c936aSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 49063e6c936aSmrg [Compiler flag to prevent dynamic linking]) 49073e6c936aSmrg])# _LT_COMPILER_PIC 4908ff63a143Smrg 4909ff63a143Smrg 49103e6c936aSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 49113e6c936aSmrg# ---------------------------- 49123e6c936aSmrg# See if the linker supports building shared libraries. 49133e6c936aSmrgm4_defun([_LT_LINKER_SHLIBS], 49143e6c936aSmrg[AC_REQUIRE([LT_PATH_LD])dnl 49153e6c936aSmrgAC_REQUIRE([LT_PATH_NM])dnl 49163e6c936aSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 49173e6c936aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 49183e6c936aSmrgm4_require([_LT_DECL_EGREP])dnl 49193e6c936aSmrgm4_require([_LT_DECL_SED])dnl 49203e6c936aSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 49213e6c936aSmrgm4_require([_LT_TAG_COMPILER])dnl 49223e6c936aSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 49233e6c936aSmrgm4_if([$1], [CXX], [ 49243e6c936aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49253e6c936aSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49263e6c936aSmrg case $host_os in 49273e6c936aSmrg aix[[4-9]]*) 49283e6c936aSmrg # If we're using GNU nm, then we don't want the "-C" option. 4929b0a0317aSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4930b0a0317aSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 4931b0a0317aSmrg # weak defined symbols like other global defined symbols, whereas 4932b0a0317aSmrg # GNU nm marks them as "W". 4933b0a0317aSmrg # While the 'weak' keyword is ignored in the Export File, we need 4934b0a0317aSmrg # it in the Import File for the 'aix-soname' feature, so we have 4935b0a0317aSmrg # to replace the "-B" option with "-P" for AIX nm. 49363e6c936aSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4937b0a0317aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 493842d69509Smrg else 4939b0a0317aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 49403e6c936aSmrg fi 49413e6c936aSmrg ;; 49423e6c936aSmrg pw32*) 4943b0a0317aSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 49443e6c936aSmrg ;; 49453e6c936aSmrg cygwin* | mingw* | cegcc*) 49463e6c936aSmrg case $cc_basename in 49473e6c936aSmrg cl*) 49483e6c936aSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 49493e6c936aSmrg ;; 49503e6c936aSmrg *) 49513e6c936aSmrg _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' 49523e6c936aSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 49533e6c936aSmrg ;; 49543e6c936aSmrg esac 49553e6c936aSmrg ;; 49563e6c936aSmrg *) 49573e6c936aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49583e6c936aSmrg ;; 49593e6c936aSmrg esac 49603e6c936aSmrg], [ 49613e6c936aSmrg runpath_var= 49623e6c936aSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 49633e6c936aSmrg _LT_TAGVAR(always_export_symbols, $1)=no 49643e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)= 49653e6c936aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 49663e6c936aSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 49673e6c936aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 49683e6c936aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49693e6c936aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49703e6c936aSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 49713e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 49723e6c936aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 49733e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49743e6c936aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 49753e6c936aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 49763e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 49773e6c936aSmrg _LT_TAGVAR(inherit_rpath, $1)=no 49783e6c936aSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 49793e6c936aSmrg _LT_TAGVAR(module_cmds, $1)= 49803e6c936aSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 49813e6c936aSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 49823e6c936aSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 49833e6c936aSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 49843e6c936aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 49853e6c936aSmrg # include_expsyms should be a list of space-separated symbols to be *always* 49863e6c936aSmrg # included in the symbol list 49873e6c936aSmrg _LT_TAGVAR(include_expsyms, $1)= 49883e6c936aSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 4989b0a0317aSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 4990b0a0317aSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 4991b0a0317aSmrg # as well as any symbol that contains 'd'. 49923e6c936aSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49933e6c936aSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 49943e6c936aSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 49953e6c936aSmrg # the symbol is explicitly referenced. Since portable code cannot 49963e6c936aSmrg # rely on this symbol name, it's probably fine to never include it in 49973e6c936aSmrg # preloaded symbol tables. 49983e6c936aSmrg # Exclude shared library initialization/finalization symbols. 49993e6c936aSmrgdnl Note also adjust exclude_expsyms for C++ above. 50003e6c936aSmrg extract_expsyms_cmds= 50013e6c936aSmrg 50023e6c936aSmrg case $host_os in 50033e6c936aSmrg cygwin* | mingw* | pw32* | cegcc*) 50043e6c936aSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 50053e6c936aSmrg # When not using gcc, we currently assume that we are using 50063e6c936aSmrg # Microsoft Visual C++. 5007b0a0317aSmrg if test yes != "$GCC"; then 5008ff63a143Smrg with_gnu_ld=no 500942d69509Smrg fi 50103e6c936aSmrg ;; 50113e6c936aSmrg interix*) 50123e6c936aSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 50133e6c936aSmrg with_gnu_ld=yes 50143e6c936aSmrg ;; 5015b0a0317aSmrg openbsd* | bitrig*) 50163e6c936aSmrg with_gnu_ld=no 50173e6c936aSmrg ;; 50183e6c936aSmrg esac 50194456fccdSmrg 50203e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5021ff63a143Smrg 50223e6c936aSmrg # On some targets, GNU ld is compatible enough with the native linker 50233e6c936aSmrg # that we're better off using the native interface for both. 50243e6c936aSmrg lt_use_gnu_ld_interface=no 5025b0a0317aSmrg if test yes = "$with_gnu_ld"; then 50263e6c936aSmrg case $host_os in 50273e6c936aSmrg aix*) 50283e6c936aSmrg # The AIX port of GNU ld has always aspired to compatibility 50293e6c936aSmrg # with the native linker. However, as the warning in the GNU ld 50303e6c936aSmrg # block says, versions before 2.19.5* couldn't really create working 50313e6c936aSmrg # shared libraries, regardless of the interface used. 50323e6c936aSmrg case `$LD -v 2>&1` in 50333e6c936aSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 50343e6c936aSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 50353e6c936aSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 50363e6c936aSmrg *) 50373e6c936aSmrg lt_use_gnu_ld_interface=yes 5038ff63a143Smrg ;; 50393e6c936aSmrg esac 50403e6c936aSmrg ;; 50413e6c936aSmrg *) 50423e6c936aSmrg lt_use_gnu_ld_interface=yes 50433e6c936aSmrg ;; 50443e6c936aSmrg esac 50453e6c936aSmrg fi 50464456fccdSmrg 5047b0a0317aSmrg if test yes = "$lt_use_gnu_ld_interface"; then 50483e6c936aSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5049b0a0317aSmrg wlarc='$wl' 50504456fccdSmrg 50513e6c936aSmrg # Set some defaults for GNU ld with shared library support. These 50523e6c936aSmrg # are reset later if shared libraries are not supported. Putting them 50533e6c936aSmrg # here allows them to be overridden if necessary. 50543e6c936aSmrg runpath_var=LD_RUN_PATH 5055b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5056b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 50573e6c936aSmrg # ancient GNU ld didn't support --whole-archive et. al. 50583e6c936aSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5059b0a0317aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 50603e6c936aSmrg else 50613e6c936aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 50623e6c936aSmrg fi 50633e6c936aSmrg supports_anon_versioning=no 5064b0a0317aSmrg case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 50653e6c936aSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 50663e6c936aSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 50673e6c936aSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 50683e6c936aSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 50693e6c936aSmrg *\ 2.11.*) ;; # other 2.11 versions 50703e6c936aSmrg *) supports_anon_versioning=yes ;; 50713e6c936aSmrg esac 50724456fccdSmrg 50733e6c936aSmrg # See if GNU ld supports shared libraries. 50743e6c936aSmrg case $host_os in 50753e6c936aSmrg aix[[3-9]]*) 50763e6c936aSmrg # On AIX/PPC, the GNU linker is very broken 5077b0a0317aSmrg if test ia64 != "$host_cpu"; then 50783e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 50793e6c936aSmrg cat <<_LT_EOF 1>&2 50804456fccdSmrg 50813e6c936aSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 50823e6c936aSmrg*** to be unable to reliably create shared libraries on AIX. 50833e6c936aSmrg*** Therefore, libtool is disabling shared libraries support. If you 50843e6c936aSmrg*** really care for shared libraries, you may want to install binutils 50853e6c936aSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 50863e6c936aSmrg*** You will then need to restart the configuration process. 50874456fccdSmrg 50883e6c936aSmrg_LT_EOF 50893e6c936aSmrg fi 50903e6c936aSmrg ;; 50914456fccdSmrg 50923e6c936aSmrg amigaos*) 50933e6c936aSmrg case $host_cpu in 50943e6c936aSmrg powerpc) 50953e6c936aSmrg # see comment about AmigaOS4 .so support 5096b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 50973e6c936aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 50983e6c936aSmrg ;; 50993e6c936aSmrg m68k) 51003e6c936aSmrg _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)' 51013e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51023e6c936aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 510342d69509Smrg ;; 51043e6c936aSmrg esac 51053e6c936aSmrg ;; 51064456fccdSmrg 51073e6c936aSmrg beos*) 51083e6c936aSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 51093e6c936aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51103e6c936aSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 51113e6c936aSmrg # support --undefined. This deserves some investigation. FIXME 5112b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51133e6c936aSmrg else 51143e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 51153e6c936aSmrg fi 51163e6c936aSmrg ;; 5117ff63a143Smrg 51183e6c936aSmrg cygwin* | mingw* | pw32* | cegcc*) 51193e6c936aSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 51203e6c936aSmrg # as there is no search path for DLLs. 51213e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5122b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 51233e6c936aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51243e6c936aSmrg _LT_TAGVAR(always_export_symbols, $1)=no 51253e6c936aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51263e6c936aSmrg _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' 51273e6c936aSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5128ff63a143Smrg 51293e6c936aSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5130b0a0317aSmrg _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' 5131b0a0317aSmrg # If the export-symbols file already is a .def file, use it as 5132b0a0317aSmrg # is; otherwise, prepend EXPORTS... 5133b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5134b0a0317aSmrg cp $export_symbols $output_objdir/$soname.def; 5135b0a0317aSmrg else 5136b0a0317aSmrg echo EXPORTS > $output_objdir/$soname.def; 5137b0a0317aSmrg cat $export_symbols >> $output_objdir/$soname.def; 5138b0a0317aSmrg fi~ 5139b0a0317aSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 51403e6c936aSmrg else 51413e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 51423e6c936aSmrg fi 51433e6c936aSmrg ;; 5144ff63a143Smrg 51453e6c936aSmrg haiku*) 5146b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51473e6c936aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 51483e6c936aSmrg ;; 5149ff63a143Smrg 5150b0a0317aSmrg os2*) 5151b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5152b0a0317aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5153b0a0317aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5154b0a0317aSmrg shrext_cmds=.dll 5155b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5156b0a0317aSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5157b0a0317aSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5158b0a0317aSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5159b0a0317aSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5160b0a0317aSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5161b0a0317aSmrg emximp -o $lib $output_objdir/$libname.def' 5162b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5163b0a0317aSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5164b0a0317aSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5165b0a0317aSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5166b0a0317aSmrg prefix_cmds="$SED"~ 5167b0a0317aSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5168b0a0317aSmrg prefix_cmds="$prefix_cmds -e 1d"; 5169b0a0317aSmrg fi~ 5170b0a0317aSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5171b0a0317aSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5172b0a0317aSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5173b0a0317aSmrg emximp -o $lib $output_objdir/$libname.def' 5174b0a0317aSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5175b0a0317aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5176b0a0317aSmrg ;; 5177b0a0317aSmrg 51783e6c936aSmrg interix[[3-9]]*) 51793e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 51803e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5181b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5182b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 51833e6c936aSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 51843e6c936aSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 51853e6c936aSmrg # default) and relocated if they conflict, which is a slow very memory 51863e6c936aSmrg # consuming and fragmenting process. To avoid this, we pick a random, 51873e6c936aSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 51883e6c936aSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5189b0a0317aSmrg _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' 5190b0a0317aSmrg _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' 51913e6c936aSmrg ;; 5192ff63a143Smrg 51933e6c936aSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 51943e6c936aSmrg tmp_diet=no 5195b0a0317aSmrg if test linux-dietlibc = "$host_os"; then 51963e6c936aSmrg case $cc_basename in 51973e6c936aSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 51983e6c936aSmrg esac 51993e6c936aSmrg fi 52003e6c936aSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5201b0a0317aSmrg && test no = "$tmp_diet" 52023e6c936aSmrg then 52033e6c936aSmrg tmp_addflag=' $pic_flag' 52043e6c936aSmrg tmp_sharedflag='-shared' 52053e6c936aSmrg case $cc_basename,$host_cpu in 52063e6c936aSmrg pgcc*) # Portland Group C compiler 5207b0a0317aSmrg _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' 52083e6c936aSmrg tmp_addflag=' $pic_flag' 52093e6c936aSmrg ;; 52103e6c936aSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 52113e6c936aSmrg # Portland Group f77 and f90 compilers 5212b0a0317aSmrg _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' 52133e6c936aSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 52143e6c936aSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 52153e6c936aSmrg tmp_addflag=' -i_dynamic' ;; 52163e6c936aSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 52173e6c936aSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 52183e6c936aSmrg ifc* | ifort*) # Intel Fortran compiler 52193e6c936aSmrg tmp_addflag=' -nofor_main' ;; 52203e6c936aSmrg lf95*) # Lahey Fortran 8.1 52213e6c936aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 52223e6c936aSmrg tmp_sharedflag='--shared' ;; 5223b0a0317aSmrg nagfor*) # NAGFOR 5.3 5224b0a0317aSmrg tmp_sharedflag='-Wl,-shared' ;; 52253e6c936aSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 52263e6c936aSmrg tmp_sharedflag='-qmkshrobj' 52273e6c936aSmrg tmp_addflag= ;; 52283e6c936aSmrg nvcc*) # Cuda Compiler Driver 2.2 5229b0a0317aSmrg _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' 52303e6c936aSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52313e6c936aSmrg ;; 52323e6c936aSmrg esac 52333e6c936aSmrg case `$CC -V 2>&1 | sed 5q` in 52343e6c936aSmrg *Sun\ C*) # Sun C 5.9 5235b0a0317aSmrg _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' 52363e6c936aSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52373e6c936aSmrg tmp_sharedflag='-G' ;; 52383e6c936aSmrg *Sun\ F*) # Sun Fortran 8.3 52393e6c936aSmrg tmp_sharedflag='-G' ;; 52403e6c936aSmrg esac 5241b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52423e6c936aSmrg 5243b0a0317aSmrg if test yes = "$supports_anon_versioning"; then 52443e6c936aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5245b0a0317aSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5246b0a0317aSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5247b0a0317aSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 52483e6c936aSmrg fi 5249ff63a143Smrg 52503e6c936aSmrg case $cc_basename in 5251b0a0317aSmrg tcc*) 5252b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5253b0a0317aSmrg ;; 52543e6c936aSmrg xlf* | bgf* | bgxlf* | mpixlf*) 52553e6c936aSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 52563e6c936aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5257b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 52583e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5259b0a0317aSmrg if test yes = "$supports_anon_versioning"; then 52603e6c936aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5261b0a0317aSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5262b0a0317aSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5263b0a0317aSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 52643e6c936aSmrg fi 52653e6c936aSmrg ;; 52663e6c936aSmrg esac 52673e6c936aSmrg else 52683e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 52693e6c936aSmrg fi 52703e6c936aSmrg ;; 5271ff63a143Smrg 5272b0a0317aSmrg netbsd*) 52733e6c936aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 52743e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 52753e6c936aSmrg wlarc= 52763e6c936aSmrg else 5277b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5278b0a0317aSmrg _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' 52793e6c936aSmrg fi 52803e6c936aSmrg ;; 5281ff63a143Smrg 52823e6c936aSmrg solaris*) 52833e6c936aSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 52843e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 52853e6c936aSmrg cat <<_LT_EOF 1>&2 5286ff63a143Smrg 52873e6c936aSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 52883e6c936aSmrg*** create shared libraries on Solaris systems. Therefore, libtool 52893e6c936aSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 52903e6c936aSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 52913e6c936aSmrg*** your PATH or compiler configuration so that the native linker is 52923e6c936aSmrg*** used, and then restart. 5293ff63a143Smrg 52943e6c936aSmrg_LT_EOF 52953e6c936aSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5296b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5297b0a0317aSmrg _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' 52983e6c936aSmrg else 52993e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53003e6c936aSmrg fi 53013e6c936aSmrg ;; 5302ff63a143Smrg 53033e6c936aSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 53043e6c936aSmrg case `$LD -v 2>&1` in 53053e6c936aSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 53063e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53073e6c936aSmrg cat <<_LT_EOF 1>&2 5308ff63a143Smrg 5309b0a0317aSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 53103e6c936aSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 53113e6c936aSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 53123e6c936aSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 53133e6c936aSmrg*** your PATH or compiler configuration so that the native linker is 53143e6c936aSmrg*** used, and then restart. 5315ff63a143Smrg 53163e6c936aSmrg_LT_EOF 53173e6c936aSmrg ;; 53183e6c936aSmrg *) 53193e6c936aSmrg # For security reasons, it is highly recommended that you always 53203e6c936aSmrg # use absolute paths for naming shared libraries, and exclude the 53213e6c936aSmrg # DT_RUNPATH tag from executables and libraries. But doing so 53223e6c936aSmrg # requires that you compile everything twice, which is a pain. 53233e6c936aSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5324b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5325b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5326b0a0317aSmrg _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' 53273e6c936aSmrg else 5328ff63a143Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53293e6c936aSmrg fi 533042d69509Smrg ;; 53313e6c936aSmrg esac 53323e6c936aSmrg ;; 5333ff63a143Smrg 53343e6c936aSmrg sunos4*) 53353e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 53363e6c936aSmrg wlarc= 53373e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53383e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53393e6c936aSmrg ;; 53403e6c936aSmrg 53413e6c936aSmrg *) 53423e6c936aSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5343b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5344b0a0317aSmrg _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' 53453e6c936aSmrg else 53463e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53473e6c936aSmrg fi 53483e6c936aSmrg ;; 53493e6c936aSmrg esac 53503e6c936aSmrg 5351b0a0317aSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 53523e6c936aSmrg runpath_var= 53533e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 53543e6c936aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 53553e6c936aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 53563e6c936aSmrg fi 53573e6c936aSmrg else 53583e6c936aSmrg # PORTME fill in a description of your system's linker (not GNU ld) 53593e6c936aSmrg case $host_os in 53603e6c936aSmrg aix3*) 53613e6c936aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 53623e6c936aSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 53633e6c936aSmrg _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' 53643e6c936aSmrg # Note: this linker hardcodes the directories in LIBPATH if there 53653e6c936aSmrg # are no directories specified by -L. 53663e6c936aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5367b0a0317aSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 53683e6c936aSmrg # Neither direct hardcoding nor static linking is supported with a 53693e6c936aSmrg # broken collect2. 53703e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 53713e6c936aSmrg fi 53723e6c936aSmrg ;; 53734456fccdSmrg 53743e6c936aSmrg aix[[4-9]]*) 5375b0a0317aSmrg if test ia64 = "$host_cpu"; then 53763e6c936aSmrg # On IA64, the linker does run time linking by default, so we don't 53773e6c936aSmrg # have to do anything special. 53783e6c936aSmrg aix_use_runtimelinking=no 53793e6c936aSmrg exp_sym_flag='-Bexport' 5380b0a0317aSmrg no_entry_flag= 53813e6c936aSmrg else 53823e6c936aSmrg # If we're using GNU nm, then we don't want the "-C" option. 5383b0a0317aSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5384b0a0317aSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 5385b0a0317aSmrg # weak defined symbols like other global defined symbols, whereas 5386b0a0317aSmrg # GNU nm marks them as "W". 5387b0a0317aSmrg # While the 'weak' keyword is ignored in the Export File, we need 5388b0a0317aSmrg # it in the Import File for the 'aix-soname' feature, so we have 5389b0a0317aSmrg # to replace the "-B" option with "-P" for AIX nm. 53903e6c936aSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5391b0a0317aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 53923e6c936aSmrg else 5393b0a0317aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 53943e6c936aSmrg fi 53953e6c936aSmrg aix_use_runtimelinking=no 53964456fccdSmrg 53973e6c936aSmrg # Test if we are trying to use run time linking or normal 53983e6c936aSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5399b0a0317aSmrg # have runtime linking enabled, and use it for executables. 5400b0a0317aSmrg # For shared libraries, we enable/disable runtime linking 5401b0a0317aSmrg # depending on the kind of the shared library created - 5402b0a0317aSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 5403b0a0317aSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5404b0a0317aSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 5405b0a0317aSmrg # lib.a static archive 5406b0a0317aSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 5407b0a0317aSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 5408b0a0317aSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5409b0a0317aSmrg # lib.a(lib.so.V) shared, rtl:no 5410b0a0317aSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5411b0a0317aSmrg # lib.a static archive 54123e6c936aSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 54133e6c936aSmrg for ld_flag in $LDFLAGS; do 5414b0a0317aSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 54153e6c936aSmrg aix_use_runtimelinking=yes 54163e6c936aSmrg break 54173e6c936aSmrg fi 54183e6c936aSmrg done 5419b0a0317aSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5420b0a0317aSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 5421b0a0317aSmrg # so we don't have lib.a shared libs to link our executables. 5422b0a0317aSmrg # We have to force runtime linking in this case. 5423b0a0317aSmrg aix_use_runtimelinking=yes 5424b0a0317aSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 5425b0a0317aSmrg fi 54263e6c936aSmrg ;; 54273e6c936aSmrg esac 54284456fccdSmrg 54293e6c936aSmrg exp_sym_flag='-bexport' 54303e6c936aSmrg no_entry_flag='-bnoentry' 54313e6c936aSmrg fi 54324456fccdSmrg 54333e6c936aSmrg # When large executables or shared objects are built, AIX ld can 54343e6c936aSmrg # have problems creating the table of contents. If linking a library 54353e6c936aSmrg # or program results in "error TOC overflow" add -mminimal-toc to 54363e6c936aSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 54373e6c936aSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 54384456fccdSmrg 54393e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='' 54403e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 54413e6c936aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 54423e6c936aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 54433e6c936aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5444b0a0317aSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5445b0a0317aSmrg case $with_aix_soname,$aix_use_runtimelinking in 5446b0a0317aSmrg aix,*) ;; # traditional, no import file 5447b0a0317aSmrg svr4,* | *,yes) # use import file 5448b0a0317aSmrg # The Import File defines what to hardcode. 5449b0a0317aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5450b0a0317aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5451b0a0317aSmrg ;; 5452b0a0317aSmrg esac 54534456fccdSmrg 5454b0a0317aSmrg if test yes = "$GCC"; then 54553e6c936aSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 54563e6c936aSmrg # We only want to do this on AIX 4.2 and lower, the check 54573e6c936aSmrg # below for broken collect2 doesn't work under 4.3+ 5458b0a0317aSmrg collect2name=`$CC -print-prog-name=collect2` 54593e6c936aSmrg if test -f "$collect2name" && 54603e6c936aSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 54613e6c936aSmrg then 54623e6c936aSmrg # We have reworked collect2 54633e6c936aSmrg : 54643e6c936aSmrg else 54653e6c936aSmrg # We have old collect2 54663e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 54673e6c936aSmrg # It fails to find uninstalled libraries when the uninstalled 54683e6c936aSmrg # path is not listed in the libpath. Setting hardcode_minus_L 54693e6c936aSmrg # to unsupported forces relinking 54703e6c936aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54713e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54723e6c936aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 54733e6c936aSmrg fi 54743e6c936aSmrg ;; 54753e6c936aSmrg esac 54763e6c936aSmrg shared_flag='-shared' 5477b0a0317aSmrg if test yes = "$aix_use_runtimelinking"; then 5478b0a0317aSmrg shared_flag="$shared_flag "'$wl-G' 54793e6c936aSmrg fi 5480b0a0317aSmrg # Need to ensure runtime linking is disabled for the traditional 5481b0a0317aSmrg # shared library, or the linker may eventually find shared libraries 5482b0a0317aSmrg # /with/ Import File - we do not want to mix them. 5483b0a0317aSmrg shared_flag_aix='-shared' 5484b0a0317aSmrg shared_flag_svr4='-shared $wl-G' 54853e6c936aSmrg else 54863e6c936aSmrg # not using gcc 5487b0a0317aSmrg if test ia64 = "$host_cpu"; then 54883e6c936aSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 54893e6c936aSmrg # chokes on -Wl,-G. The following line is correct: 54903e6c936aSmrg shared_flag='-G' 54913e6c936aSmrg else 5492b0a0317aSmrg if test yes = "$aix_use_runtimelinking"; then 5493b0a0317aSmrg shared_flag='$wl-G' 54943e6c936aSmrg else 5495b0a0317aSmrg shared_flag='$wl-bM:SRE' 54963e6c936aSmrg fi 5497b0a0317aSmrg shared_flag_aix='$wl-bM:SRE' 5498b0a0317aSmrg shared_flag_svr4='$wl-G' 54993e6c936aSmrg fi 55003e6c936aSmrg fi 55014456fccdSmrg 5502b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 55033e6c936aSmrg # It seems that -bexpall does not export symbols beginning with 55043e6c936aSmrg # underscore (_), so it is better to generate a list of symbols to export. 55053e6c936aSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5506b0a0317aSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 55073e6c936aSmrg # Warning - without using the other runtime loading flags (-brtl), 55083e6c936aSmrg # -berok will link without error, but may produce a broken library. 55093e6c936aSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 55103e6c936aSmrg # Determine the default libpath from the value encoded in an 55113e6c936aSmrg # empty executable. 55123e6c936aSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5513b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5514b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 55153e6c936aSmrg else 5516b0a0317aSmrg if test ia64 = "$host_cpu"; then 5517b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 55183e6c936aSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5519b0a0317aSmrg _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" 55203e6c936aSmrg else 55213e6c936aSmrg # Determine the default libpath from the value encoded in an 55223e6c936aSmrg # empty executable. 55233e6c936aSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5524b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55253e6c936aSmrg # Warning - without using the other run time loading flags, 55263e6c936aSmrg # -berok will link without error, but may produce a broken library. 5527b0a0317aSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5528b0a0317aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5529b0a0317aSmrg if test yes = "$with_gnu_ld"; then 55303e6c936aSmrg # We only use this code for GNU lds that support --whole-archive. 5531b0a0317aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 55323e6c936aSmrg else 55333e6c936aSmrg # Exported symbols can be pulled into shared objects from archives 55343e6c936aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 55353e6c936aSmrg fi 55363e6c936aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5537b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5538b0a0317aSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 5539b0a0317aSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5540b0a0317aSmrg if test svr4 != "$with_aix_soname"; then 5541b0a0317aSmrg # This is similar to how AIX traditionally builds its shared libraries. 5542b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 5543b0a0317aSmrg fi 5544b0a0317aSmrg if test aix != "$with_aix_soname"; then 5545b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 5546b0a0317aSmrg else 5547b0a0317aSmrg # used by -dlpreopen to get the symbols 5548b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5549b0a0317aSmrg fi 5550b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 55513e6c936aSmrg fi 55523e6c936aSmrg fi 55533e6c936aSmrg ;; 55543e6c936aSmrg 55553e6c936aSmrg amigaos*) 55563e6c936aSmrg case $host_cpu in 55573e6c936aSmrg powerpc) 55583e6c936aSmrg # see comment about AmigaOS4 .so support 5559b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 55603e6c936aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 55613e6c936aSmrg ;; 55623e6c936aSmrg m68k) 55633e6c936aSmrg _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)' 55643e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55653e6c936aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55663e6c936aSmrg ;; 55673e6c936aSmrg esac 55683e6c936aSmrg ;; 55694456fccdSmrg 55703e6c936aSmrg bsdi[[45]]*) 55713e6c936aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 55723e6c936aSmrg ;; 55734456fccdSmrg 55743e6c936aSmrg cygwin* | mingw* | pw32* | cegcc*) 55753e6c936aSmrg # When not using gcc, we currently assume that we are using 55763e6c936aSmrg # Microsoft Visual C++. 55773e6c936aSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 55783e6c936aSmrg # no search path for DLLs. 55793e6c936aSmrg case $cc_basename in 55803e6c936aSmrg cl*) 55813e6c936aSmrg # Native MSVC 55823e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 55833e6c936aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 55843e6c936aSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 55853e6c936aSmrg _LT_TAGVAR(file_list_spec, $1)='@' 55863e6c936aSmrg # Tell ltmain to make .lib files, not .a files. 55873e6c936aSmrg libext=lib 55883e6c936aSmrg # Tell ltmain to make .dll files, not .so files. 5589b0a0317aSmrg shrext_cmds=.dll 55903e6c936aSmrg # FIXME: Setting linknames here is a bad hack. 5591b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5592b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5593b0a0317aSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 5594b0a0317aSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5595b0a0317aSmrg else 5596b0a0317aSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5597b0a0317aSmrg fi~ 5598b0a0317aSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5599b0a0317aSmrg linknames=' 56003e6c936aSmrg # The linker will not automatically build a static lib if we build a DLL. 56013e6c936aSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56023e6c936aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56033e6c936aSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 56043e6c936aSmrg _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' 56053e6c936aSmrg # Don't use ranlib 56063e6c936aSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 56073e6c936aSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5608b0a0317aSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5609b0a0317aSmrg case $lt_outputfile in 5610b0a0317aSmrg *.exe|*.EXE) ;; 5611b0a0317aSmrg *) 5612b0a0317aSmrg lt_outputfile=$lt_outputfile.exe 5613b0a0317aSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 5614b0a0317aSmrg ;; 5615b0a0317aSmrg esac~ 5616b0a0317aSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5617b0a0317aSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5618b0a0317aSmrg $RM "$lt_outputfile.manifest"; 5619b0a0317aSmrg fi' 5620521070a0Smrg ;; 56213e6c936aSmrg *) 56223e6c936aSmrg # Assume MSVC wrapper 56233e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 56243e6c936aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56253e6c936aSmrg # Tell ltmain to make .lib files, not .a files. 56263e6c936aSmrg libext=lib 56273e6c936aSmrg # Tell ltmain to make .dll files, not .so files. 5628b0a0317aSmrg shrext_cmds=.dll 56293e6c936aSmrg # FIXME: Setting linknames here is a bad hack. 56303e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 56313e6c936aSmrg # The linker will automatically build a .lib file if we build a DLL. 56323e6c936aSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56333e6c936aSmrg # FIXME: Should let the user specify the lib program. 56343e6c936aSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 56353e6c936aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5636521070a0Smrg ;; 56373e6c936aSmrg esac 56383e6c936aSmrg ;; 5639ff63a143Smrg 56403e6c936aSmrg darwin* | rhapsody*) 56413e6c936aSmrg _LT_DARWIN_LINKER_FEATURES($1) 56423e6c936aSmrg ;; 56434456fccdSmrg 56443e6c936aSmrg dgux*) 56453e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 56463e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56473e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56483e6c936aSmrg ;; 56494456fccdSmrg 56503e6c936aSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 56513e6c936aSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 56523e6c936aSmrg # does not break anything, and helps significantly (at the cost of a little 56533e6c936aSmrg # extra space). 56543e6c936aSmrg freebsd2.2*) 56553e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 56563e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56573e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 56583e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56593e6c936aSmrg ;; 56604456fccdSmrg 56613e6c936aSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 56623e6c936aSmrg freebsd2.*) 56633e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 56643e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 56653e6c936aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 56663e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56673e6c936aSmrg ;; 56684456fccdSmrg 56693e6c936aSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 56703e6c936aSmrg freebsd* | dragonfly*) 56713e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 56723e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56733e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 56743e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56753e6c936aSmrg ;; 56764456fccdSmrg 56773e6c936aSmrg hpux9*) 5678b0a0317aSmrg if test yes = "$GCC"; then 5679b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 56803e6c936aSmrg else 5681b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 56823e6c936aSmrg fi 5683b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 56843e6c936aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 56853e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 56864456fccdSmrg 56873e6c936aSmrg # hardcode_minus_L: Not really in the search PATH, 56883e6c936aSmrg # but as the default location of the library. 56893e6c936aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5690b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 56913e6c936aSmrg ;; 56924456fccdSmrg 56933e6c936aSmrg hpux10*) 5694b0a0317aSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 5695b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 56963e6c936aSmrg else 56973e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 56983e6c936aSmrg fi 5699b0a0317aSmrg if test no = "$with_gnu_ld"; then 5700b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57013e6c936aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57023e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 57033e6c936aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5704b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57053e6c936aSmrg # hardcode_minus_L: Not really in the search PATH, 57063e6c936aSmrg # but as the default location of the library. 57073e6c936aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57083e6c936aSmrg fi 57093e6c936aSmrg ;; 57104456fccdSmrg 57113e6c936aSmrg hpux11*) 5712b0a0317aSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 57133e6c936aSmrg case $host_cpu in 57143e6c936aSmrg hppa*64*) 5715b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57163e6c936aSmrg ;; 57173e6c936aSmrg ia64*) 5718b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57193e6c936aSmrg ;; 57203e6c936aSmrg *) 5721b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57223e6c936aSmrg ;; 57233e6c936aSmrg esac 57243e6c936aSmrg else 57253e6c936aSmrg case $host_cpu in 57263e6c936aSmrg hppa*64*) 5727b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57283e6c936aSmrg ;; 57293e6c936aSmrg ia64*) 5730b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57313e6c936aSmrg ;; 57323e6c936aSmrg *) 57333e6c936aSmrg m4_if($1, [], [ 57343e6c936aSmrg # Older versions of the 11.00 compiler do not understand -b yet 57353e6c936aSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 57363e6c936aSmrg _LT_LINKER_OPTION([if $CC understands -b], 57373e6c936aSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5738b0a0317aSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 57393e6c936aSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5740b0a0317aSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 57413e6c936aSmrg ;; 57423e6c936aSmrg esac 57433e6c936aSmrg fi 5744b0a0317aSmrg if test no = "$with_gnu_ld"; then 5745b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57463e6c936aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57474456fccdSmrg 57483e6c936aSmrg case $host_cpu in 57493e6c936aSmrg hppa*64*|ia64*) 57503e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 57513e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57523e6c936aSmrg ;; 57533e6c936aSmrg *) 57543e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 57553e6c936aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5756b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57574456fccdSmrg 57583e6c936aSmrg # hardcode_minus_L: Not really in the search PATH, 57593e6c936aSmrg # but as the default location of the library. 57603e6c936aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57613e6c936aSmrg ;; 57623e6c936aSmrg esac 57633e6c936aSmrg fi 57643e6c936aSmrg ;; 57654456fccdSmrg 57663e6c936aSmrg irix5* | irix6* | nonstopux*) 5767b0a0317aSmrg if test yes = "$GCC"; then 5768b0a0317aSmrg _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' 57693e6c936aSmrg # Try to use the -exported_symbol ld option, if it does not 57703e6c936aSmrg # work, assume that -exports_file does not work either and 57713e6c936aSmrg # implicitly export all symbols. 57723e6c936aSmrg # This should be the same for all languages, so no per-tag cache variable. 57733e6c936aSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 57743e6c936aSmrg [lt_cv_irix_exported_symbol], 5775b0a0317aSmrg [save_LDFLAGS=$LDFLAGS 5776b0a0317aSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 57773e6c936aSmrg AC_LINK_IFELSE( 57783e6c936aSmrg [AC_LANG_SOURCE( 57793e6c936aSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 57803e6c936aSmrg [C++], [[int foo (void) { return 0; }]], 57813e6c936aSmrg [Fortran 77], [[ 57823e6c936aSmrg subroutine foo 57833e6c936aSmrg end]], 57843e6c936aSmrg [Fortran], [[ 57853e6c936aSmrg subroutine foo 57863e6c936aSmrg end]])])], 57873e6c936aSmrg [lt_cv_irix_exported_symbol=yes], 57883e6c936aSmrg [lt_cv_irix_exported_symbol=no]) 5789b0a0317aSmrg LDFLAGS=$save_LDFLAGS]) 5790b0a0317aSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 5791b0a0317aSmrg _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' 57923e6c936aSmrg fi 57933e6c936aSmrg else 5794b0a0317aSmrg _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' 5795b0a0317aSmrg _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' 57963e6c936aSmrg fi 57973e6c936aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5798b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 57993e6c936aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58003e6c936aSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 58013e6c936aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58023e6c936aSmrg ;; 58034456fccdSmrg 5804b0a0317aSmrg linux*) 5805b0a0317aSmrg case $cc_basename in 5806b0a0317aSmrg tcc*) 5807b0a0317aSmrg # Fabrice Bellard et al's Tiny C Compiler 5808b0a0317aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5809b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5810b0a0317aSmrg ;; 5811b0a0317aSmrg esac 5812b0a0317aSmrg ;; 5813b0a0317aSmrg 5814b0a0317aSmrg netbsd*) 58153e6c936aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 58163e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 58173e6c936aSmrg else 58183e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 58193e6c936aSmrg fi 58203e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 58213e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 58223e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58233e6c936aSmrg ;; 58244456fccdSmrg 58253e6c936aSmrg newsos6) 58263e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 58273e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5828b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58293e6c936aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58303e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58313e6c936aSmrg ;; 58324456fccdSmrg 58333e6c936aSmrg *nto* | *qnx*) 58343e6c936aSmrg ;; 58354456fccdSmrg 5836b0a0317aSmrg openbsd* | bitrig*) 58373e6c936aSmrg if test -f /usr/libexec/ld.so; then 58383e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 58393e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58403e6c936aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5841b0a0317aSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 58423e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5843b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5844b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5845b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 58463e6c936aSmrg else 5847b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5848b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58493e6c936aSmrg fi 58503e6c936aSmrg else 58513e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 58523e6c936aSmrg fi 58533e6c936aSmrg ;; 58544456fccdSmrg 58553e6c936aSmrg os2*) 58563e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58573e6c936aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58583e6c936aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5859b0a0317aSmrg shrext_cmds=.dll 5860b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5861b0a0317aSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5862b0a0317aSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5863b0a0317aSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5864b0a0317aSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5865b0a0317aSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5866b0a0317aSmrg emximp -o $lib $output_objdir/$libname.def' 5867b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5868b0a0317aSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5869b0a0317aSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5870b0a0317aSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5871b0a0317aSmrg prefix_cmds="$SED"~ 5872b0a0317aSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5873b0a0317aSmrg prefix_cmds="$prefix_cmds -e 1d"; 5874b0a0317aSmrg fi~ 5875b0a0317aSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5876b0a0317aSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5877b0a0317aSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5878b0a0317aSmrg emximp -o $lib $output_objdir/$libname.def' 5879b0a0317aSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5880b0a0317aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 58813e6c936aSmrg ;; 58824456fccdSmrg 58833e6c936aSmrg osf3*) 5884b0a0317aSmrg if test yes = "$GCC"; then 5885b0a0317aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5886b0a0317aSmrg _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' 58873e6c936aSmrg else 58883e6c936aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5889b0a0317aSmrg _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' 58903e6c936aSmrg fi 58913e6c936aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5892b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58933e6c936aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58943e6c936aSmrg ;; 58954456fccdSmrg 58963e6c936aSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5897b0a0317aSmrg if test yes = "$GCC"; then 5898b0a0317aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5899b0a0317aSmrg _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' 5900b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59013e6c936aSmrg else 59023e6c936aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5903b0a0317aSmrg _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' 59043e6c936aSmrg _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~ 5905b0a0317aSmrg $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' 59064456fccdSmrg 59073e6c936aSmrg # Both c and cxx compiler support -rpath directly 59083e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 59093e6c936aSmrg fi 59103e6c936aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59113e6c936aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59123e6c936aSmrg ;; 59134456fccdSmrg 59143e6c936aSmrg solaris*) 59153e6c936aSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5916b0a0317aSmrg if test yes = "$GCC"; then 5917b0a0317aSmrg wlarc='$wl' 5918b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 59193e6c936aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5920b0a0317aSmrg $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' 59213e6c936aSmrg else 59223e6c936aSmrg case `$CC -V 2>&1` in 59233e6c936aSmrg *"Compilers 5.0"*) 59243e6c936aSmrg wlarc='' 5925b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 59263e6c936aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5927b0a0317aSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 59283e6c936aSmrg ;; 59293e6c936aSmrg *) 5930b0a0317aSmrg wlarc='$wl' 5931b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 59323e6c936aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5933b0a0317aSmrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 59343e6c936aSmrg ;; 59353e6c936aSmrg esac 59363e6c936aSmrg fi 59373e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 59383e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59393e6c936aSmrg case $host_os in 59403e6c936aSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 59413e6c936aSmrg *) 59423e6c936aSmrg # The compiler driver will combine and reorder linker options, 5943b0a0317aSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 59443e6c936aSmrg # but is careful enough not to reorder. 59453e6c936aSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5946b0a0317aSmrg if test yes = "$GCC"; then 5947b0a0317aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 59483e6c936aSmrg else 59493e6c936aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 59503e6c936aSmrg fi 59513e6c936aSmrg ;; 59523e6c936aSmrg esac 59533e6c936aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 59543e6c936aSmrg ;; 59554456fccdSmrg 59563e6c936aSmrg sunos4*) 5957b0a0317aSmrg if test sequent = "$host_vendor"; then 59583e6c936aSmrg # Use $CC to link under sequent, because it throws in some extra .o 59593e6c936aSmrg # files that make .init and .fini sections work. 5960b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 59613e6c936aSmrg else 59623e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 59633e6c936aSmrg fi 59643e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 59653e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 59663e6c936aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 59673e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59683e6c936aSmrg ;; 59693e6c936aSmrg 59703e6c936aSmrg sysv4) 59713e6c936aSmrg case $host_vendor in 59723e6c936aSmrg sni) 59733e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59743e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 59753e6c936aSmrg ;; 59763e6c936aSmrg siemens) 59773e6c936aSmrg ## LD is ld it makes a PLAMLIB 59783e6c936aSmrg ## CC just makes a GrossModule. 59793e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 59803e6c936aSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 59813e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 59823e6c936aSmrg ;; 59833e6c936aSmrg motorola) 59843e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59853e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 59863e6c936aSmrg ;; 59873e6c936aSmrg esac 59883e6c936aSmrg runpath_var='LD_RUN_PATH' 59893e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59903e6c936aSmrg ;; 5991521070a0Smrg 59923e6c936aSmrg sysv4.3*) 59933e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59943e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59953e6c936aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 59963e6c936aSmrg ;; 59974456fccdSmrg 59983e6c936aSmrg sysv4*MP*) 59993e6c936aSmrg if test -d /usr/nec; then 60003e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60013e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60023e6c936aSmrg runpath_var=LD_RUN_PATH 60033e6c936aSmrg hardcode_runpath_var=yes 60043e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 60053e6c936aSmrg fi 60063e6c936aSmrg ;; 6007ff63a143Smrg 6008ff63a143Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6009b0a0317aSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6010ff63a143Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6011521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6012ff63a143Smrg runpath_var='LD_RUN_PATH' 60134456fccdSmrg 6014b0a0317aSmrg if test yes = "$GCC"; then 6015b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6016b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60173e6c936aSmrg else 6018b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6019b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60203e6c936aSmrg fi 6021ff63a143Smrg ;; 60224456fccdSmrg 60233e6c936aSmrg sysv5* | sco3.2v5* | sco5v6*) 6024b0a0317aSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 60253e6c936aSmrg # link with -lc, and that would cause any symbols used from libc to 60263e6c936aSmrg # always be unresolved, which means just about no library would 60273e6c936aSmrg # ever link correctly. If we're not using GNU ld we use -z text 60283e6c936aSmrg # though, which does catch some bad symbols but isn't as heavy-handed 60293e6c936aSmrg # as -z defs. 6030b0a0317aSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6031b0a0317aSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 60323e6c936aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60333e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6034b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 60353e6c936aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60363e6c936aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6037b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 60383e6c936aSmrg runpath_var='LD_RUN_PATH' 60394456fccdSmrg 6040b0a0317aSmrg if test yes = "$GCC"; then 6041b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6042b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60433e6c936aSmrg else 6044b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6045b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60463e6c936aSmrg fi 6047ff63a143Smrg ;; 6048ff63a143Smrg 60493e6c936aSmrg uts4*) 60503e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60513e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60523e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60533e6c936aSmrg ;; 60544456fccdSmrg 60553e6c936aSmrg *) 60563e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60573e6c936aSmrg ;; 6058ff63a143Smrg esac 60594456fccdSmrg 6060b0a0317aSmrg if test sni = "$host_vendor"; then 60613e6c936aSmrg case $host in 60623e6c936aSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6063b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 60643e6c936aSmrg ;; 60653e6c936aSmrg esac 60663e6c936aSmrg fi 60673e6c936aSmrg fi 6068ff63a143Smrg]) 60693e6c936aSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6070b0a0317aSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 60714456fccdSmrg 60723e6c936aSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6073521070a0Smrg 60743e6c936aSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 60753e6c936aSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 60763e6c936aSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 60773e6c936aSmrg [The commands to extract the exported symbol list from a shared archive]) 60783e6c936aSmrg 60793e6c936aSmrg# 60803e6c936aSmrg# Do we need to explicitly link libc? 60813e6c936aSmrg# 60823e6c936aSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 60833e6c936aSmrgx|xyes) 60843e6c936aSmrg # Assume -lc should be added 60853e6c936aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 60864456fccdSmrg 6087b0a0317aSmrg if test yes,yes = "$GCC,$enable_shared"; then 60883e6c936aSmrg case $_LT_TAGVAR(archive_cmds, $1) in 60893e6c936aSmrg *'~'*) 60903e6c936aSmrg # FIXME: we may have to deal with multi-command sequences. 60913e6c936aSmrg ;; 60923e6c936aSmrg '$CC '*) 60933e6c936aSmrg # Test whether the compiler implicitly links with -lc since on some 60943e6c936aSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 60953e6c936aSmrg # to ld, don't add -lc before -lgcc. 60963e6c936aSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 60973e6c936aSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 60983e6c936aSmrg [$RM conftest* 60993e6c936aSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 61004456fccdSmrg 61013e6c936aSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 61023e6c936aSmrg soname=conftest 61033e6c936aSmrg lib=conftest 61043e6c936aSmrg libobjs=conftest.$ac_objext 61053e6c936aSmrg deplibs= 61063e6c936aSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 61073e6c936aSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 61083e6c936aSmrg compiler_flags=-v 61093e6c936aSmrg linker_flags=-v 61103e6c936aSmrg verstring= 61113e6c936aSmrg output_objdir=. 61123e6c936aSmrg libname=conftest 61133e6c936aSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 61143e6c936aSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 61153e6c936aSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 61163e6c936aSmrg then 61173e6c936aSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 61183e6c936aSmrg else 61193e6c936aSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61203e6c936aSmrg fi 61213e6c936aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 61223e6c936aSmrg else 61233e6c936aSmrg cat conftest.err 1>&5 61243e6c936aSmrg fi 61253e6c936aSmrg $RM conftest* 61263e6c936aSmrg ]) 61273e6c936aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 61283e6c936aSmrg ;; 61293e6c936aSmrg esac 61303e6c936aSmrg fi 61313e6c936aSmrg ;; 61323e6c936aSmrgesac 6133ff63a143Smrg 61343e6c936aSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 61353e6c936aSmrg [Whether or not to add -lc for building shared libraries]) 61363e6c936aSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 61373e6c936aSmrg [enable_shared_with_static_runtimes], [0], 61383e6c936aSmrg [Whether or not to disallow shared libs when runtime libs are static]) 61393e6c936aSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 61403e6c936aSmrg [Compiler flag to allow reflexive dlopens]) 61413e6c936aSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 61423e6c936aSmrg [Compiler flag to generate shared objects directly from archives]) 61433e6c936aSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 61443e6c936aSmrg [Whether the compiler copes with passing no objects directly]) 61453e6c936aSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 61463e6c936aSmrg [Create an old-style archive from a shared archive]) 61473e6c936aSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 61483e6c936aSmrg [Create a temporary old-style archive to link instead of a shared archive]) 61493e6c936aSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 61503e6c936aSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 61513e6c936aSmrg_LT_TAGDECL([], [module_cmds], [2], 61523e6c936aSmrg [Commands used to build a loadable module if different from building 61533e6c936aSmrg a shared archive.]) 61543e6c936aSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 61553e6c936aSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 61563e6c936aSmrg [Whether we are building with GNU ld or not]) 61573e6c936aSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 61583e6c936aSmrg [Flag that allows shared libraries with undefined symbols to be built]) 61593e6c936aSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 61603e6c936aSmrg [Flag that enforces no undefined symbols]) 61613e6c936aSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 61623e6c936aSmrg [Flag to hardcode $libdir into a binary during linking. 61633e6c936aSmrg This must work even if $libdir does not exist]) 61643e6c936aSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 61653e6c936aSmrg [Whether we need a single "-rpath" flag with a separated argument]) 61663e6c936aSmrg_LT_TAGDECL([], [hardcode_direct], [0], 6167b0a0317aSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61683e6c936aSmrg DIR into the resulting binary]) 61693e6c936aSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6170b0a0317aSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61713e6c936aSmrg DIR into the resulting binary and the resulting library dependency is 6172b0a0317aSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 61733e6c936aSmrg library is relocated]) 61743e6c936aSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 61753e6c936aSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 61763e6c936aSmrg into the resulting binary]) 61773e6c936aSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 61783e6c936aSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 61793e6c936aSmrg into the resulting binary]) 61803e6c936aSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 61813e6c936aSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 61823e6c936aSmrg into the library and all subsequent libraries and executables linked 61833e6c936aSmrg against it]) 61843e6c936aSmrg_LT_TAGDECL([], [inherit_rpath], [0], 61853e6c936aSmrg [Set to yes if linker adds runtime paths of dependent libraries 61863e6c936aSmrg to runtime path list]) 61873e6c936aSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 61883e6c936aSmrg [Whether libtool must link a program against all its dependency libraries]) 61893e6c936aSmrg_LT_TAGDECL([], [always_export_symbols], [0], 61903e6c936aSmrg [Set to "yes" if exported symbols are required]) 61913e6c936aSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 61923e6c936aSmrg [The commands to list exported symbols]) 61933e6c936aSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 61943e6c936aSmrg [Symbols that should not be listed in the preloaded symbols]) 61953e6c936aSmrg_LT_TAGDECL([], [include_expsyms], [1], 61963e6c936aSmrg [Symbols that must always be exported]) 61973e6c936aSmrg_LT_TAGDECL([], [prelink_cmds], [2], 61983e6c936aSmrg [Commands necessary for linking programs (against libraries) with templates]) 61993e6c936aSmrg_LT_TAGDECL([], [postlink_cmds], [2], 62003e6c936aSmrg [Commands necessary for finishing linking programs]) 62013e6c936aSmrg_LT_TAGDECL([], [file_list_spec], [1], 62023e6c936aSmrg [Specify filename containing input files]) 62033e6c936aSmrgdnl FIXME: Not yet implemented 62043e6c936aSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 62053e6c936aSmrgdnl [Compiler flag to generate thread safe objects]) 62063e6c936aSmrg])# _LT_LINKER_SHLIBS 62074456fccdSmrg 62084456fccdSmrg 62093e6c936aSmrg# _LT_LANG_C_CONFIG([TAG]) 62103e6c936aSmrg# ------------------------ 62113e6c936aSmrg# Ensure that the configuration variables for a C compiler are suitably 62123e6c936aSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6213b0a0317aSmrg# the compiler configuration to 'libtool'. 62143e6c936aSmrgm4_defun([_LT_LANG_C_CONFIG], 62153e6c936aSmrg[m4_require([_LT_DECL_EGREP])dnl 6216b0a0317aSmrglt_save_CC=$CC 62173e6c936aSmrgAC_LANG_PUSH(C) 62184456fccdSmrg 62193e6c936aSmrg# Source file extension for C test sources. 62203e6c936aSmrgac_ext=c 62214456fccdSmrg 62223e6c936aSmrg# Object file extension for compiled C test sources. 62233e6c936aSmrgobjext=o 62243e6c936aSmrg_LT_TAGVAR(objext, $1)=$objext 62254456fccdSmrg 62263e6c936aSmrg# Code to be used in simple compile tests 62273e6c936aSmrglt_simple_compile_test_code="int some_variable = 0;" 62284456fccdSmrg 62293e6c936aSmrg# Code to be used in simple link tests 62303e6c936aSmrglt_simple_link_test_code='int main(){return(0);}' 62314456fccdSmrg 62323e6c936aSmrg_LT_TAG_COMPILER 62333e6c936aSmrg# Save the default compiler, since it gets overwritten when the other 62343e6c936aSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 62353e6c936aSmrgcompiler_DEFAULT=$CC 62364456fccdSmrg 62373e6c936aSmrg# save warnings/boilerplate of simple test code 62383e6c936aSmrg_LT_COMPILER_BOILERPLATE 62393e6c936aSmrg_LT_LINKER_BOILERPLATE 62404456fccdSmrg 62413e6c936aSmrgif test -n "$compiler"; then 62423e6c936aSmrg _LT_COMPILER_NO_RTTI($1) 62433e6c936aSmrg _LT_COMPILER_PIC($1) 62443e6c936aSmrg _LT_COMPILER_C_O($1) 62453e6c936aSmrg _LT_COMPILER_FILE_LOCKS($1) 62463e6c936aSmrg _LT_LINKER_SHLIBS($1) 62473e6c936aSmrg _LT_SYS_DYNAMIC_LINKER($1) 62483e6c936aSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 62493e6c936aSmrg LT_SYS_DLOPEN_SELF 62503e6c936aSmrg _LT_CMD_STRIPLIB 62514456fccdSmrg 6252b0a0317aSmrg # Report what library types will actually be built 62533e6c936aSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 62543e6c936aSmrg AC_MSG_RESULT([$can_build_shared]) 62554456fccdSmrg 62563e6c936aSmrg AC_MSG_CHECKING([whether to build shared libraries]) 6257b0a0317aSmrg test no = "$can_build_shared" && enable_shared=no 62583e6c936aSmrg 62593e6c936aSmrg # On AIX, shared libraries and static libraries use the same namespace, and 62603e6c936aSmrg # are all built from PIC. 62613e6c936aSmrg case $host_os in 62623e6c936aSmrg aix3*) 6263b0a0317aSmrg test yes = "$enable_shared" && enable_static=no 62643e6c936aSmrg if test -n "$RANLIB"; then 62653e6c936aSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 62663e6c936aSmrg postinstall_cmds='$RANLIB $lib' 62673e6c936aSmrg fi 62683e6c936aSmrg ;; 62693e6c936aSmrg 62703e6c936aSmrg aix[[4-9]]*) 6271b0a0317aSmrg if test ia64 != "$host_cpu"; then 6272b0a0317aSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6273b0a0317aSmrg yes,aix,yes) ;; # shared object as lib.so file only 6274b0a0317aSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 6275b0a0317aSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 6276b0a0317aSmrg esac 6277ff63a143Smrg fi 6278ff63a143Smrg ;; 6279ff63a143Smrg esac 62803e6c936aSmrg AC_MSG_RESULT([$enable_shared]) 62814456fccdSmrg 62823e6c936aSmrg AC_MSG_CHECKING([whether to build static libraries]) 62833e6c936aSmrg # Make sure either enable_shared or enable_static is yes. 6284b0a0317aSmrg test yes = "$enable_shared" || enable_static=yes 62853e6c936aSmrg AC_MSG_RESULT([$enable_static]) 62863e6c936aSmrg 62873e6c936aSmrg _LT_CONFIG($1) 6288ff63a143Smrgfi 62893e6c936aSmrgAC_LANG_POP 6290b0a0317aSmrgCC=$lt_save_CC 62913e6c936aSmrg])# _LT_LANG_C_CONFIG 62924456fccdSmrg 62934456fccdSmrg 62943e6c936aSmrg# _LT_LANG_CXX_CONFIG([TAG]) 6295ff63a143Smrg# -------------------------- 62963e6c936aSmrg# Ensure that the configuration variables for a C++ compiler are suitably 62973e6c936aSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6298b0a0317aSmrg# the compiler configuration to 'libtool'. 62993e6c936aSmrgm4_defun([_LT_LANG_CXX_CONFIG], 63003e6c936aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 63013e6c936aSmrgm4_require([_LT_DECL_EGREP])dnl 63023e6c936aSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6303b0a0317aSmrgif test -n "$CXX" && ( test no != "$CXX" && 6304b0a0317aSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6305b0a0317aSmrg (test g++ != "$CXX"))); then 63063e6c936aSmrg AC_PROG_CXXCPP 63073e6c936aSmrgelse 63083e6c936aSmrg _lt_caught_CXX_error=yes 6309ff63a143Smrgfi 6310ff63a143Smrg 63113e6c936aSmrgAC_LANG_PUSH(C++) 6312ff63a143Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6313ff63a143Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6314ff63a143Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6315ff63a143Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 63163e6c936aSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 6317ff63a143Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6318ff63a143Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6319ff63a143Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6320ff63a143Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6321ff63a143Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6322ff63a143Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 63233e6c936aSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6324ff63a143Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6325ff63a143Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6326ff63a143Smrg_LT_TAGVAR(module_cmds, $1)= 6327ff63a143Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6328ff63a143Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6329ff63a143Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6330ff63a143Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 6331ff63a143Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6332ff63a143Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6333ff63a143Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6334ff63a143Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 63354456fccdSmrg 63363e6c936aSmrg# Source file extension for C++ test sources. 63373e6c936aSmrgac_ext=cpp 63384456fccdSmrg 63393e6c936aSmrg# Object file extension for compiled C++ test sources. 6340ff63a143Smrgobjext=o 6341ff63a143Smrg_LT_TAGVAR(objext, $1)=$objext 63424456fccdSmrg 6343ff63a143Smrg# No sense in running all these tests if we already determined that 63443e6c936aSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 6345ff63a143Smrg# are currently assumed to apply to all compilers on this platform, 6346ff63a143Smrg# and will be corrupted by setting them based on a non-working compiler. 6347b0a0317aSmrgif test yes != "$_lt_caught_CXX_error"; then 6348ff63a143Smrg # Code to be used in simple compile tests 63493e6c936aSmrg lt_simple_compile_test_code="int some_variable = 0;" 63504456fccdSmrg 6351ff63a143Smrg # Code to be used in simple link tests 63523e6c936aSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 63534456fccdSmrg 6354ff63a143Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6355ff63a143Smrg _LT_TAG_COMPILER 63564456fccdSmrg 6357ff63a143Smrg # save warnings/boilerplate of simple test code 6358ff63a143Smrg _LT_COMPILER_BOILERPLATE 6359ff63a143Smrg _LT_LINKER_BOILERPLATE 63604456fccdSmrg 6361ff63a143Smrg # Allow CC to be a program name with arguments. 63623e6c936aSmrg lt_save_CC=$CC 63633e6c936aSmrg lt_save_CFLAGS=$CFLAGS 63643e6c936aSmrg lt_save_LD=$LD 6365ff63a143Smrg lt_save_GCC=$GCC 63663e6c936aSmrg GCC=$GXX 63673e6c936aSmrg lt_save_with_gnu_ld=$with_gnu_ld 63683e6c936aSmrg lt_save_path_LD=$lt_cv_path_LD 63693e6c936aSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 63703e6c936aSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 63713e6c936aSmrg else 63723e6c936aSmrg $as_unset lt_cv_prog_gnu_ld 63733e6c936aSmrg fi 63743e6c936aSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 63753e6c936aSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 63763e6c936aSmrg else 63773e6c936aSmrg $as_unset lt_cv_path_LD 63783e6c936aSmrg fi 63793e6c936aSmrg test -z "${LDCXX+set}" || LD=$LDCXX 63803e6c936aSmrg CC=${CXX-"c++"} 63813e6c936aSmrg CFLAGS=$CXXFLAGS 6382ff63a143Smrg compiler=$CC 6383ff63a143Smrg _LT_TAGVAR(compiler, $1)=$CC 6384ff63a143Smrg _LT_CC_BASENAME([$compiler]) 63853e6c936aSmrg 6386ff63a143Smrg if test -n "$compiler"; then 63873e6c936aSmrg # We don't want -fno-exception when compiling C++ code, so set the 63883e6c936aSmrg # no_builtin_flag separately 6389b0a0317aSmrg if test yes = "$GXX"; then 63903e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 63913e6c936aSmrg else 63923e6c936aSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 63933e6c936aSmrg fi 63944456fccdSmrg 6395b0a0317aSmrg if test yes = "$GXX"; then 63963e6c936aSmrg # Set up default GNU C++ configuration 63974456fccdSmrg 63983e6c936aSmrg LT_PATH_LD 63994456fccdSmrg 64003e6c936aSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 64013e6c936aSmrg # archiving commands below assume that GNU ld is being used. 6402b0a0317aSmrg if test yes = "$with_gnu_ld"; then 6403b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6404b0a0317aSmrg _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' 64054456fccdSmrg 6406b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6407b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 64084456fccdSmrg 64093e6c936aSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 64103e6c936aSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 64113e6c936aSmrg # investigate it a little bit more. (MM) 6412b0a0317aSmrg wlarc='$wl' 64134456fccdSmrg 64143e6c936aSmrg # ancient GNU ld didn't support --whole-archive et. al. 64153e6c936aSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 64163e6c936aSmrg $GREP 'no-whole-archive' > /dev/null; then 6417b0a0317aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 64183e6c936aSmrg else 64193e6c936aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 64203e6c936aSmrg fi 64213e6c936aSmrg else 64223e6c936aSmrg with_gnu_ld=no 64233e6c936aSmrg wlarc= 6424ff63a143Smrg 64253e6c936aSmrg # A generic and very simple default shared library creation 64263e6c936aSmrg # command for GNU C++ for the case where it uses the native 64273e6c936aSmrg # linker, instead of GNU ld. If possible, this setting should 64283e6c936aSmrg # overridden to take advantage of the native linker features on 64293e6c936aSmrg # the platform it is being used on. 64303e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 64313e6c936aSmrg fi 64324456fccdSmrg 64333e6c936aSmrg # Commands to make compiler produce verbose output that lists 64343e6c936aSmrg # what "hidden" libraries, object files and flags are used when 64353e6c936aSmrg # linking a shared library. 64363e6c936aSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 64374456fccdSmrg 64383e6c936aSmrg else 64393e6c936aSmrg GXX=no 64403e6c936aSmrg with_gnu_ld=no 64413e6c936aSmrg wlarc= 64423e6c936aSmrg fi 64434456fccdSmrg 64443e6c936aSmrg # PORTME: fill in a description of your system's C++ link characteristics 64453e6c936aSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 64463e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 64473e6c936aSmrg case $host_os in 64483e6c936aSmrg aix3*) 64493e6c936aSmrg # FIXME: insert proper C++ library support 64503e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 64513e6c936aSmrg ;; 64523e6c936aSmrg aix[[4-9]]*) 6453b0a0317aSmrg if test ia64 = "$host_cpu"; then 64543e6c936aSmrg # On IA64, the linker does run time linking by default, so we don't 64553e6c936aSmrg # have to do anything special. 64563e6c936aSmrg aix_use_runtimelinking=no 64573e6c936aSmrg exp_sym_flag='-Bexport' 6458b0a0317aSmrg no_entry_flag= 64593e6c936aSmrg else 64603e6c936aSmrg aix_use_runtimelinking=no 64613e6c936aSmrg 64623e6c936aSmrg # Test if we are trying to use run time linking or normal 64633e6c936aSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6464b0a0317aSmrg # have runtime linking enabled, and use it for executables. 6465b0a0317aSmrg # For shared libraries, we enable/disable runtime linking 6466b0a0317aSmrg # depending on the kind of the shared library created - 6467b0a0317aSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 6468b0a0317aSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6469b0a0317aSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 6470b0a0317aSmrg # lib.a static archive 6471b0a0317aSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 6472b0a0317aSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 6473b0a0317aSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6474b0a0317aSmrg # lib.a(lib.so.V) shared, rtl:no 6475b0a0317aSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6476b0a0317aSmrg # lib.a static archive 64773e6c936aSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 64783e6c936aSmrg for ld_flag in $LDFLAGS; do 64793e6c936aSmrg case $ld_flag in 64803e6c936aSmrg *-brtl*) 64813e6c936aSmrg aix_use_runtimelinking=yes 64823e6c936aSmrg break 64833e6c936aSmrg ;; 64843e6c936aSmrg esac 64853e6c936aSmrg done 6486b0a0317aSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6487b0a0317aSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 6488b0a0317aSmrg # so we don't have lib.a shared libs to link our executables. 6489b0a0317aSmrg # We have to force runtime linking in this case. 6490b0a0317aSmrg aix_use_runtimelinking=yes 6491b0a0317aSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 6492b0a0317aSmrg fi 64933e6c936aSmrg ;; 64943e6c936aSmrg esac 64953e6c936aSmrg 64963e6c936aSmrg exp_sym_flag='-bexport' 64973e6c936aSmrg no_entry_flag='-bnoentry' 64983e6c936aSmrg fi 64993e6c936aSmrg 65003e6c936aSmrg # When large executables or shared objects are built, AIX ld can 65013e6c936aSmrg # have problems creating the table of contents. If linking a library 65023e6c936aSmrg # or program results in "error TOC overflow" add -mminimal-toc to 65033e6c936aSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 65043e6c936aSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 65054456fccdSmrg 65063e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='' 65073e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 65083e6c936aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65093e6c936aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 65103e6c936aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6511b0a0317aSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6512b0a0317aSmrg case $with_aix_soname,$aix_use_runtimelinking in 6513b0a0317aSmrg aix,*) ;; # no import file 6514b0a0317aSmrg svr4,* | *,yes) # use import file 6515b0a0317aSmrg # The Import File defines what to hardcode. 6516b0a0317aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6517b0a0317aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6518b0a0317aSmrg ;; 6519b0a0317aSmrg esac 65204456fccdSmrg 6521b0a0317aSmrg if test yes = "$GXX"; then 65223e6c936aSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 65233e6c936aSmrg # We only want to do this on AIX 4.2 and lower, the check 65243e6c936aSmrg # below for broken collect2 doesn't work under 4.3+ 6525b0a0317aSmrg collect2name=`$CC -print-prog-name=collect2` 65263e6c936aSmrg if test -f "$collect2name" && 65273e6c936aSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 65283e6c936aSmrg then 65293e6c936aSmrg # We have reworked collect2 65303e6c936aSmrg : 65313e6c936aSmrg else 65323e6c936aSmrg # We have old collect2 65333e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 65343e6c936aSmrg # It fails to find uninstalled libraries when the uninstalled 65353e6c936aSmrg # path is not listed in the libpath. Setting hardcode_minus_L 65363e6c936aSmrg # to unsupported forces relinking 65373e6c936aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65383e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65393e6c936aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 65403e6c936aSmrg fi 65413e6c936aSmrg esac 65423e6c936aSmrg shared_flag='-shared' 6543b0a0317aSmrg if test yes = "$aix_use_runtimelinking"; then 6544b0a0317aSmrg shared_flag=$shared_flag' $wl-G' 65453e6c936aSmrg fi 6546b0a0317aSmrg # Need to ensure runtime linking is disabled for the traditional 6547b0a0317aSmrg # shared library, or the linker may eventually find shared libraries 6548b0a0317aSmrg # /with/ Import File - we do not want to mix them. 6549b0a0317aSmrg shared_flag_aix='-shared' 6550b0a0317aSmrg shared_flag_svr4='-shared $wl-G' 65513e6c936aSmrg else 65523e6c936aSmrg # not using gcc 6553b0a0317aSmrg if test ia64 = "$host_cpu"; then 65543e6c936aSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 65553e6c936aSmrg # chokes on -Wl,-G. The following line is correct: 65563e6c936aSmrg shared_flag='-G' 65573e6c936aSmrg else 6558b0a0317aSmrg if test yes = "$aix_use_runtimelinking"; then 6559b0a0317aSmrg shared_flag='$wl-G' 65603e6c936aSmrg else 6561b0a0317aSmrg shared_flag='$wl-bM:SRE' 65623e6c936aSmrg fi 6563b0a0317aSmrg shared_flag_aix='$wl-bM:SRE' 6564b0a0317aSmrg shared_flag_svr4='$wl-G' 65653e6c936aSmrg fi 65663e6c936aSmrg fi 65674456fccdSmrg 6568b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 65693e6c936aSmrg # It seems that -bexpall does not export symbols beginning with 65703e6c936aSmrg # underscore (_), so it is better to generate a list of symbols to 65713e6c936aSmrg # export. 65723e6c936aSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6573b0a0317aSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 65743e6c936aSmrg # Warning - without using the other runtime loading flags (-brtl), 65753e6c936aSmrg # -berok will link without error, but may produce a broken library. 6576b0a0317aSmrg # The "-G" linker flag allows undefined symbols. 6577b0a0317aSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 65783e6c936aSmrg # Determine the default libpath from the value encoded in an empty 65793e6c936aSmrg # executable. 65803e6c936aSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6581b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 65824456fccdSmrg 6583b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 65843e6c936aSmrg else 6585b0a0317aSmrg if test ia64 = "$host_cpu"; then 6586b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 65873e6c936aSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6588b0a0317aSmrg _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" 65893e6c936aSmrg else 65903e6c936aSmrg # Determine the default libpath from the value encoded in an 65913e6c936aSmrg # empty executable. 65923e6c936aSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6593b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 65943e6c936aSmrg # Warning - without using the other run time loading flags, 65953e6c936aSmrg # -berok will link without error, but may produce a broken library. 6596b0a0317aSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6597b0a0317aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6598b0a0317aSmrg if test yes = "$with_gnu_ld"; then 65993e6c936aSmrg # We only use this code for GNU lds that support --whole-archive. 6600b0a0317aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 66013e6c936aSmrg else 66023e6c936aSmrg # Exported symbols can be pulled into shared objects from archives 66033e6c936aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 66043e6c936aSmrg fi 66053e6c936aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6606b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6607b0a0317aSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 6608b0a0317aSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6609b0a0317aSmrg if test svr4 != "$with_aix_soname"; then 6610b0a0317aSmrg # This is similar to how AIX traditionally builds its shared 6611b0a0317aSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6612b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 6613b0a0317aSmrg fi 6614b0a0317aSmrg if test aix != "$with_aix_soname"; then 6615b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 6616b0a0317aSmrg else 6617b0a0317aSmrg # used by -dlpreopen to get the symbols 6618b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6619b0a0317aSmrg fi 6620b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 66213e6c936aSmrg fi 66223e6c936aSmrg fi 66233e6c936aSmrg ;; 66244456fccdSmrg 66253e6c936aSmrg beos*) 66263e6c936aSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 66273e6c936aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66283e6c936aSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 66293e6c936aSmrg # support --undefined. This deserves some investigation. FIXME 6630b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 66313e6c936aSmrg else 66323e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66333e6c936aSmrg fi 66343e6c936aSmrg ;; 66354456fccdSmrg 66363e6c936aSmrg chorus*) 66373e6c936aSmrg case $cc_basename in 66383e6c936aSmrg *) 66393e6c936aSmrg # FIXME: insert proper C++ library support 66403e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66413e6c936aSmrg ;; 66423e6c936aSmrg esac 66433e6c936aSmrg ;; 66444456fccdSmrg 66453e6c936aSmrg cygwin* | mingw* | pw32* | cegcc*) 66463e6c936aSmrg case $GXX,$cc_basename in 66473e6c936aSmrg ,cl* | no,cl*) 66483e6c936aSmrg # Native MSVC 66493e6c936aSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 66503e6c936aSmrg # no search path for DLLs. 66513e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 66523e6c936aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66533e6c936aSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 66543e6c936aSmrg _LT_TAGVAR(file_list_spec, $1)='@' 66553e6c936aSmrg # Tell ltmain to make .lib files, not .a files. 66563e6c936aSmrg libext=lib 66573e6c936aSmrg # Tell ltmain to make .dll files, not .so files. 6658b0a0317aSmrg shrext_cmds=.dll 66593e6c936aSmrg # FIXME: Setting linknames here is a bad hack. 6660b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6661b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6662b0a0317aSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 6663b0a0317aSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6664b0a0317aSmrg else 6665b0a0317aSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6666b0a0317aSmrg fi~ 6667b0a0317aSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6668b0a0317aSmrg linknames=' 66693e6c936aSmrg # The linker will not automatically build a static lib if we build a DLL. 66703e6c936aSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 66713e6c936aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 66723e6c936aSmrg # Don't use ranlib 66733e6c936aSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 66743e6c936aSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6675b0a0317aSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6676b0a0317aSmrg case $lt_outputfile in 6677b0a0317aSmrg *.exe|*.EXE) ;; 6678b0a0317aSmrg *) 6679b0a0317aSmrg lt_outputfile=$lt_outputfile.exe 6680b0a0317aSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 6681b0a0317aSmrg ;; 6682b0a0317aSmrg esac~ 6683b0a0317aSmrg func_to_tool_file "$lt_outputfile"~ 6684b0a0317aSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6685b0a0317aSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6686b0a0317aSmrg $RM "$lt_outputfile.manifest"; 6687b0a0317aSmrg fi' 66883e6c936aSmrg ;; 66893e6c936aSmrg *) 66903e6c936aSmrg # g++ 66913e6c936aSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 66923e6c936aSmrg # as there is no search path for DLLs. 66933e6c936aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6694b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 66953e6c936aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66963e6c936aSmrg _LT_TAGVAR(always_export_symbols, $1)=no 66973e6c936aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 66983e6c936aSmrg 66993e6c936aSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6700b0a0317aSmrg _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' 6701b0a0317aSmrg # If the export-symbols file already is a .def file, use it as 6702b0a0317aSmrg # is; otherwise, prepend EXPORTS... 6703b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6704b0a0317aSmrg cp $export_symbols $output_objdir/$soname.def; 6705b0a0317aSmrg else 6706b0a0317aSmrg echo EXPORTS > $output_objdir/$soname.def; 6707b0a0317aSmrg cat $export_symbols >> $output_objdir/$soname.def; 6708b0a0317aSmrg fi~ 6709b0a0317aSmrg $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' 67103e6c936aSmrg else 67113e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67123e6c936aSmrg fi 67133e6c936aSmrg ;; 67143e6c936aSmrg esac 67153e6c936aSmrg ;; 67163e6c936aSmrg darwin* | rhapsody*) 67173e6c936aSmrg _LT_DARWIN_LINKER_FEATURES($1) 67183e6c936aSmrg ;; 67194456fccdSmrg 6720b0a0317aSmrg os2*) 6721b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6722b0a0317aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6723b0a0317aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6724b0a0317aSmrg shrext_cmds=.dll 6725b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6726b0a0317aSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6727b0a0317aSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6728b0a0317aSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6729b0a0317aSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6730b0a0317aSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6731b0a0317aSmrg emximp -o $lib $output_objdir/$libname.def' 6732b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6733b0a0317aSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6734b0a0317aSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6735b0a0317aSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6736b0a0317aSmrg prefix_cmds="$SED"~ 6737b0a0317aSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 6738b0a0317aSmrg prefix_cmds="$prefix_cmds -e 1d"; 6739b0a0317aSmrg fi~ 6740b0a0317aSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6741b0a0317aSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6742b0a0317aSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6743b0a0317aSmrg emximp -o $lib $output_objdir/$libname.def' 6744b0a0317aSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6745b0a0317aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6746b0a0317aSmrg ;; 6747b0a0317aSmrg 67483e6c936aSmrg dgux*) 67493e6c936aSmrg case $cc_basename in 67503e6c936aSmrg ec++*) 67513e6c936aSmrg # FIXME: insert proper C++ library support 67523e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67533e6c936aSmrg ;; 67543e6c936aSmrg ghcx*) 67553e6c936aSmrg # Green Hills C++ Compiler 67563e6c936aSmrg # FIXME: insert proper C++ library support 67573e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67583e6c936aSmrg ;; 67593e6c936aSmrg *) 67603e6c936aSmrg # FIXME: insert proper C++ library support 67613e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67623e6c936aSmrg ;; 67633e6c936aSmrg esac 67643e6c936aSmrg ;; 67654456fccdSmrg 67663e6c936aSmrg freebsd2.*) 67673e6c936aSmrg # C++ shared libraries reported to be fairly broken before 67683e6c936aSmrg # switch to ELF 67693e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67703e6c936aSmrg ;; 67714456fccdSmrg 67723e6c936aSmrg freebsd-elf*) 67733e6c936aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 67743e6c936aSmrg ;; 67754456fccdSmrg 67763e6c936aSmrg freebsd* | dragonfly*) 67773e6c936aSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 67783e6c936aSmrg # conventions 67793e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 67803e6c936aSmrg ;; 67814456fccdSmrg 67823e6c936aSmrg haiku*) 6783b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 67843e6c936aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6785ff63a143Smrg ;; 67863e6c936aSmrg 67873e6c936aSmrg hpux9*) 6788b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 67893e6c936aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6790b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 67913e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 67923e6c936aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 67933e6c936aSmrg # but as the default 67943e6c936aSmrg # location of the library. 67953e6c936aSmrg 67963e6c936aSmrg case $cc_basename in 67973e6c936aSmrg CC*) 67983e6c936aSmrg # FIXME: insert proper C++ library support 67993e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68003e6c936aSmrg ;; 68013e6c936aSmrg aCC*) 6802b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 68033e6c936aSmrg # Commands to make compiler produce verbose output that lists 68043e6c936aSmrg # what "hidden" libraries, object files and flags are used when 68053e6c936aSmrg # linking a shared library. 68063e6c936aSmrg # 68073e6c936aSmrg # There doesn't appear to be a way to prevent this compiler from 68083e6c936aSmrg # explicitly linking system object files so we need to strip them 68093e6c936aSmrg # from the output so that they don't get included in the library 68103e6c936aSmrg # dependencies. 6811b0a0317aSmrg 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"' 68123e6c936aSmrg ;; 68133e6c936aSmrg *) 6814b0a0317aSmrg if test yes = "$GXX"; then 6815b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 68163e6c936aSmrg else 68173e6c936aSmrg # FIXME: insert proper C++ library support 68183e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68193e6c936aSmrg fi 68203e6c936aSmrg ;; 68213e6c936aSmrg esac 6822ff63a143Smrg ;; 68234456fccdSmrg 68243e6c936aSmrg hpux10*|hpux11*) 6825b0a0317aSmrg if test no = "$with_gnu_ld"; then 6826b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 68273e6c936aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 68284456fccdSmrg 68293e6c936aSmrg case $host_cpu in 68303e6c936aSmrg hppa*64*|ia64*) 68313e6c936aSmrg ;; 68323e6c936aSmrg *) 6833b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68343e6c936aSmrg ;; 68353e6c936aSmrg esac 68363e6c936aSmrg fi 68373e6c936aSmrg case $host_cpu in 68383e6c936aSmrg hppa*64*|ia64*) 68393e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 68403e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68413e6c936aSmrg ;; 68423e6c936aSmrg *) 68433e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 68443e6c936aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 68453e6c936aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68463e6c936aSmrg # but as the default 68473e6c936aSmrg # location of the library. 68483e6c936aSmrg ;; 68493e6c936aSmrg esac 68504456fccdSmrg 68513e6c936aSmrg case $cc_basename in 68523e6c936aSmrg CC*) 68533e6c936aSmrg # FIXME: insert proper C++ library support 68543e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68553e6c936aSmrg ;; 68563e6c936aSmrg aCC*) 68573e6c936aSmrg case $host_cpu in 68583e6c936aSmrg hppa*64*) 6859b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68603e6c936aSmrg ;; 68613e6c936aSmrg ia64*) 6862b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68633e6c936aSmrg ;; 68643e6c936aSmrg *) 6865b0a0317aSmrg _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' 68663e6c936aSmrg ;; 68673e6c936aSmrg esac 68683e6c936aSmrg # Commands to make compiler produce verbose output that lists 68693e6c936aSmrg # what "hidden" libraries, object files and flags are used when 68703e6c936aSmrg # linking a shared library. 68713e6c936aSmrg # 68723e6c936aSmrg # There doesn't appear to be a way to prevent this compiler from 68733e6c936aSmrg # explicitly linking system object files so we need to strip them 68743e6c936aSmrg # from the output so that they don't get included in the library 68753e6c936aSmrg # dependencies. 6876b0a0317aSmrg 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"' 68773e6c936aSmrg ;; 68783e6c936aSmrg *) 6879b0a0317aSmrg if test yes = "$GXX"; then 6880b0a0317aSmrg if test no = "$with_gnu_ld"; then 68813e6c936aSmrg case $host_cpu in 68823e6c936aSmrg hppa*64*) 6883b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68843e6c936aSmrg ;; 68853e6c936aSmrg ia64*) 6886b0a0317aSmrg _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' 68873e6c936aSmrg ;; 68883e6c936aSmrg *) 6889b0a0317aSmrg _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' 68903e6c936aSmrg ;; 68913e6c936aSmrg esac 68923e6c936aSmrg fi 68933e6c936aSmrg else 68943e6c936aSmrg # FIXME: insert proper C++ library support 68953e6c936aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68963e6c936aSmrg fi 68973e6c936aSmrg ;; 68983e6c936aSmrg esac 68993e6c936aSmrg ;; 6900521070a0Smrg 69013e6c936aSmrg interix[[3-9]]*) 69023e6c936aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 69033e6c936aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6904b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6905b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 69063e6c936aSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 69073e6c936aSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 69083e6c936aSmrg # default) and relocated if they conflict, which is a slow very memory 69093e6c936aSmrg # consuming and fragmenting process. To avoid this, we pick a random, 69103e6c936aSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 69113e6c936aSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6912b0a0317aSmrg _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' 6913b0a0317aSmrg _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' 69143e6c936aSmrg ;; 69153e6c936aSmrg irix5* | irix6*) 69163e6c936aSmrg case $cc_basename in 69173e6c936aSmrg CC*) 69183e6c936aSmrg # SGI C++ 6919b0a0317aSmrg _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' 6920521070a0Smrg 69213e6c936aSmrg # Archives containing C++ object files must be created using 69223e6c936aSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 69233e6c936aSmrg # necessary to make sure instantiated templates are included 69243e6c936aSmrg # in the archive. 69253e6c936aSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 69263e6c936aSmrg ;; 69273e6c936aSmrg *) 6928b0a0317aSmrg if test yes = "$GXX"; then 6929b0a0317aSmrg if test no = "$with_gnu_ld"; then 6930b0a0317aSmrg _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' 69313e6c936aSmrg else 6932b0a0317aSmrg _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' 69333e6c936aSmrg fi 69343e6c936aSmrg fi 69353e6c936aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 69363e6c936aSmrg ;; 69373e6c936aSmrg esac 6938b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 69393e6c936aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 69403e6c936aSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 69413e6c936aSmrg ;; 69424456fccdSmrg 69430f1ac3bcSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 69443e6c936aSmrg case $cc_basename in 69453e6c936aSmrg KCC*) 69463e6c936aSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 69474456fccdSmrg 69483e6c936aSmrg # KCC will only create a shared library if the output file 69493e6c936aSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 69503e6c936aSmrg # to its proper name (with version) after linking. 6951b0a0317aSmrg _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' 6952b0a0317aSmrg _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' 69533e6c936aSmrg # Commands to make compiler produce verbose output that lists 69543e6c936aSmrg # what "hidden" libraries, object files and flags are used when 69553e6c936aSmrg # linking a shared library. 69563e6c936aSmrg # 69573e6c936aSmrg # There doesn't appear to be a way to prevent this compiler from 69583e6c936aSmrg # explicitly linking system object files so we need to strip them 69593e6c936aSmrg # from the output so that they don't get included in the library 69603e6c936aSmrg # dependencies. 6961b0a0317aSmrg 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"' 6962ff63a143Smrg 6963b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6964b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 69654456fccdSmrg 69663e6c936aSmrg # Archives containing C++ object files must be created using 69673e6c936aSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 69683e6c936aSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 69693e6c936aSmrg ;; 69703e6c936aSmrg icpc* | ecpc* ) 69713e6c936aSmrg # Intel C++ 69723e6c936aSmrg with_gnu_ld=yes 69733e6c936aSmrg # version 8.0 and above of icpc choke on multiply defined symbols 69743e6c936aSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 69753e6c936aSmrg # earlier do not add the objects themselves. 69763e6c936aSmrg case `$CC -V 2>&1` in 69773e6c936aSmrg *"Version 7."*) 6978b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6979b0a0317aSmrg _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' 69803e6c936aSmrg ;; 69813e6c936aSmrg *) # Version 8.0 or newer 69823e6c936aSmrg tmp_idyn= 69833e6c936aSmrg case $host_cpu in 69843e6c936aSmrg ia64*) tmp_idyn=' -i_dynamic';; 69853e6c936aSmrg esac 6986b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6987b0a0317aSmrg _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' 69883e6c936aSmrg ;; 69893e6c936aSmrg esac 69903e6c936aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6991b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6992b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6993b0a0317aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 69943e6c936aSmrg ;; 69953e6c936aSmrg pgCC* | pgcpp*) 69963e6c936aSmrg # Portland Group C++ compiler 69973e6c936aSmrg case `$CC -V` in 69983e6c936aSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 69993e6c936aSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7000b0a0317aSmrg rm -rf $tpldir~ 7001b0a0317aSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7002b0a0317aSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 70033e6c936aSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7004b0a0317aSmrg rm -rf $tpldir~ 7005b0a0317aSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7006b0a0317aSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7007b0a0317aSmrg $RANLIB $oldlib' 70083e6c936aSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7009b0a0317aSmrg rm -rf $tpldir~ 7010b0a0317aSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7011b0a0317aSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70123e6c936aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7013b0a0317aSmrg rm -rf $tpldir~ 7014b0a0317aSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7015b0a0317aSmrg $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' 70163e6c936aSmrg ;; 70173e6c936aSmrg *) # Version 6 and above use weak symbols 7018b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7019b0a0317aSmrg _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' 70203e6c936aSmrg ;; 70213e6c936aSmrg esac 70224456fccdSmrg 7023b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7024b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7025b0a0317aSmrg _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' 70260f1ac3bcSmrg ;; 70270f1ac3bcSmrg cxx*) 70280f1ac3bcSmrg # Compaq C++ 7029b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7030b0a0317aSmrg _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' 70310f1ac3bcSmrg 70320f1ac3bcSmrg runpath_var=LD_RUN_PATH 70330f1ac3bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 70340f1ac3bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 70350f1ac3bcSmrg 70360f1ac3bcSmrg # Commands to make compiler produce verbose output that lists 70370f1ac3bcSmrg # what "hidden" libraries, object files and flags are used when 70380f1ac3bcSmrg # linking a shared library. 70390f1ac3bcSmrg # 70400f1ac3bcSmrg # There doesn't appear to be a way to prevent this compiler from 70410f1ac3bcSmrg # explicitly linking system object files so we need to strip them 70420f1ac3bcSmrg # from the output so that they don't get included in the library 70430f1ac3bcSmrg # dependencies. 7044b0a0317aSmrg 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' 70450f1ac3bcSmrg ;; 70460f1ac3bcSmrg xl* | mpixl* | bgxl*) 70470f1ac3bcSmrg # IBM XL 8.0 on PPC, with GNU ld 7048b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7049b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7050b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7051b0a0317aSmrg if test yes = "$supports_anon_versioning"; then 70520f1ac3bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7053b0a0317aSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7054b0a0317aSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7055b0a0317aSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 70560f1ac3bcSmrg fi 70570f1ac3bcSmrg ;; 70580f1ac3bcSmrg *) 70590f1ac3bcSmrg case `$CC -V 2>&1 | sed 5q` in 70600f1ac3bcSmrg *Sun\ C*) 70610f1ac3bcSmrg # Sun C++ 5.9 70620f1ac3bcSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7063b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7064b0a0317aSmrg _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' 70650f1ac3bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7066b0a0317aSmrg _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' 70670f1ac3bcSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 70680f1ac3bcSmrg 70690f1ac3bcSmrg # Not sure whether something based on 70700f1ac3bcSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 70710f1ac3bcSmrg # would be better. 70720f1ac3bcSmrg output_verbose_link_cmd='func_echo_all' 70730f1ac3bcSmrg 70740f1ac3bcSmrg # Archives containing C++ object files must be created using 70750f1ac3bcSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 70760f1ac3bcSmrg # necessary to make sure instantiated templates are included 70770f1ac3bcSmrg # in the archive. 70780f1ac3bcSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 70790f1ac3bcSmrg ;; 70800f1ac3bcSmrg esac 70810f1ac3bcSmrg ;; 70820f1ac3bcSmrg esac 70830f1ac3bcSmrg ;; 70840f1ac3bcSmrg 70850f1ac3bcSmrg lynxos*) 70860f1ac3bcSmrg # FIXME: insert proper C++ library support 70870f1ac3bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 70880f1ac3bcSmrg ;; 70890f1ac3bcSmrg 70900f1ac3bcSmrg m88k*) 70910f1ac3bcSmrg # FIXME: insert proper C++ library support 70920f1ac3bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 70930f1ac3bcSmrg ;; 70940f1ac3bcSmrg 70950f1ac3bcSmrg mvs*) 70960f1ac3bcSmrg case $cc_basename in 70970f1ac3bcSmrg cxx*) 70980f1ac3bcSmrg # FIXME: insert proper C++ library support 70990f1ac3bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71000f1ac3bcSmrg ;; 71010f1ac3bcSmrg *) 71020f1ac3bcSmrg # FIXME: insert proper C++ library support 71030f1ac3bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71040f1ac3bcSmrg ;; 71050f1ac3bcSmrg esac 71060f1ac3bcSmrg ;; 71070f1ac3bcSmrg 71080f1ac3bcSmrg netbsd*) 71090f1ac3bcSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 71100f1ac3bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 71110f1ac3bcSmrg wlarc= 71120f1ac3bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 71130f1ac3bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 71140f1ac3bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71150f1ac3bcSmrg fi 71160f1ac3bcSmrg # Workaround some broken pre-1.5 toolchains 71170f1ac3bcSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 71180f1ac3bcSmrg ;; 71190f1ac3bcSmrg 71200f1ac3bcSmrg *nto* | *qnx*) 71210f1ac3bcSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 71220f1ac3bcSmrg ;; 71230f1ac3bcSmrg 7124b0a0317aSmrg openbsd* | bitrig*) 71250f1ac3bcSmrg if test -f /usr/libexec/ld.so; then 71260f1ac3bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 71270f1ac3bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71280f1ac3bcSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71290f1ac3bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7130b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7131b0a0317aSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7132b0a0317aSmrg _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' 7133b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7134b0a0317aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 71350f1ac3bcSmrg fi 71360f1ac3bcSmrg output_verbose_link_cmd=func_echo_all 71370f1ac3bcSmrg else 71380f1ac3bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71390f1ac3bcSmrg fi 71400f1ac3bcSmrg ;; 71410f1ac3bcSmrg 71420f1ac3bcSmrg osf3* | osf4* | osf5*) 71430f1ac3bcSmrg case $cc_basename in 71440f1ac3bcSmrg KCC*) 71450f1ac3bcSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 71460f1ac3bcSmrg 71470f1ac3bcSmrg # KCC will only create a shared library if the output file 71480f1ac3bcSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 71490f1ac3bcSmrg # to its proper name (with version) after linking. 7150b0a0317aSmrg _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' 71510f1ac3bcSmrg 7152b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71530f1ac3bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71540f1ac3bcSmrg 71550f1ac3bcSmrg # Archives containing C++ object files must be created using 71560f1ac3bcSmrg # the KAI C++ compiler. 71570f1ac3bcSmrg case $host in 71580f1ac3bcSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 71590f1ac3bcSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 71600f1ac3bcSmrg esac 71610f1ac3bcSmrg ;; 71620f1ac3bcSmrg RCC*) 71630f1ac3bcSmrg # Rational C++ 2.4.1 71640f1ac3bcSmrg # FIXME: insert proper C++ library support 71650f1ac3bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71660f1ac3bcSmrg ;; 71670f1ac3bcSmrg cxx*) 71680f1ac3bcSmrg case $host in 71690f1ac3bcSmrg osf3*) 7170b0a0317aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7171b0a0317aSmrg _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' 7172b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 71730f1ac3bcSmrg ;; 71740f1ac3bcSmrg *) 71750f1ac3bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7176b0a0317aSmrg _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' 71770f1ac3bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7178b0a0317aSmrg echo "-hidden">> $lib.exp~ 7179b0a0317aSmrg $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~ 7180b0a0317aSmrg $RM $lib.exp' 71810f1ac3bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 71820f1ac3bcSmrg ;; 71830f1ac3bcSmrg esac 71840f1ac3bcSmrg 71850f1ac3bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71860f1ac3bcSmrg 71870f1ac3bcSmrg # Commands to make compiler produce verbose output that lists 71880f1ac3bcSmrg # what "hidden" libraries, object files and flags are used when 71890f1ac3bcSmrg # linking a shared library. 71900f1ac3bcSmrg # 71910f1ac3bcSmrg # There doesn't appear to be a way to prevent this compiler from 71920f1ac3bcSmrg # explicitly linking system object files so we need to strip them 71930f1ac3bcSmrg # from the output so that they don't get included in the library 71940f1ac3bcSmrg # dependencies. 7195b0a0317aSmrg 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"' 71960f1ac3bcSmrg ;; 71970f1ac3bcSmrg *) 7198b0a0317aSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 7199b0a0317aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 72000f1ac3bcSmrg case $host in 72010f1ac3bcSmrg osf3*) 7202b0a0317aSmrg _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' 72030f1ac3bcSmrg ;; 72040f1ac3bcSmrg *) 7205b0a0317aSmrg _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' 72060f1ac3bcSmrg ;; 72070f1ac3bcSmrg esac 72080f1ac3bcSmrg 7209b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 72100f1ac3bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 72110f1ac3bcSmrg 72120f1ac3bcSmrg # Commands to make compiler produce verbose output that lists 72130f1ac3bcSmrg # what "hidden" libraries, object files and flags are used when 72140f1ac3bcSmrg # linking a shared library. 72150f1ac3bcSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 72160f1ac3bcSmrg 72170f1ac3bcSmrg else 72180f1ac3bcSmrg # FIXME: insert proper C++ library support 72190f1ac3bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72200f1ac3bcSmrg fi 72210f1ac3bcSmrg ;; 72220f1ac3bcSmrg esac 72230f1ac3bcSmrg ;; 72240f1ac3bcSmrg 72250f1ac3bcSmrg psos*) 72260f1ac3bcSmrg # FIXME: insert proper C++ library support 72270f1ac3bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72280f1ac3bcSmrg ;; 72290f1ac3bcSmrg 72300f1ac3bcSmrg sunos4*) 72310f1ac3bcSmrg case $cc_basename in 72320f1ac3bcSmrg CC*) 72330f1ac3bcSmrg # Sun C++ 4.x 72340f1ac3bcSmrg # FIXME: insert proper C++ library support 72350f1ac3bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72360f1ac3bcSmrg ;; 72370f1ac3bcSmrg lcc*) 72380f1ac3bcSmrg # Lucid 72390f1ac3bcSmrg # FIXME: insert proper C++ library support 72400f1ac3bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72410f1ac3bcSmrg ;; 72420f1ac3bcSmrg *) 72430f1ac3bcSmrg # FIXME: insert proper C++ library support 72440f1ac3bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72450f1ac3bcSmrg ;; 72460f1ac3bcSmrg esac 72470f1ac3bcSmrg ;; 72480f1ac3bcSmrg 72490f1ac3bcSmrg solaris*) 72500f1ac3bcSmrg case $cc_basename in 72510f1ac3bcSmrg CC* | sunCC*) 72520f1ac3bcSmrg # Sun C++ 4.2, 5.x and Centerline C++ 72530f1ac3bcSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 72540f1ac3bcSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7255b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 72560f1ac3bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7257b0a0317aSmrg $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' 72580f1ac3bcSmrg 72590f1ac3bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 72600f1ac3bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 72610f1ac3bcSmrg case $host_os in 72620f1ac3bcSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 72630f1ac3bcSmrg *) 72640f1ac3bcSmrg # The compiler driver will combine and reorder linker options, 7265b0a0317aSmrg # but understands '-z linker_flag'. 72660f1ac3bcSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 72670f1ac3bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 72680f1ac3bcSmrg ;; 72690f1ac3bcSmrg esac 72700f1ac3bcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 72710f1ac3bcSmrg 72720f1ac3bcSmrg output_verbose_link_cmd='func_echo_all' 72730f1ac3bcSmrg 72740f1ac3bcSmrg # Archives containing C++ object files must be created using 72750f1ac3bcSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 72760f1ac3bcSmrg # necessary to make sure instantiated templates are included 72770f1ac3bcSmrg # in the archive. 72780f1ac3bcSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 72790f1ac3bcSmrg ;; 72800f1ac3bcSmrg gcx*) 72810f1ac3bcSmrg # Green Hills C++ Compiler 7282b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 72830f1ac3bcSmrg 72840f1ac3bcSmrg # The C++ compiler must be used to create the archive. 72850f1ac3bcSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 72860f1ac3bcSmrg ;; 72870f1ac3bcSmrg *) 72880f1ac3bcSmrg # GNU C++ compiler with Solaris linker 7289b0a0317aSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 7290b0a0317aSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 72910f1ac3bcSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7292b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 72930f1ac3bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7294b0a0317aSmrg $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 72950f1ac3bcSmrg 72960f1ac3bcSmrg # Commands to make compiler produce verbose output that lists 72970f1ac3bcSmrg # what "hidden" libraries, object files and flags are used when 72980f1ac3bcSmrg # linking a shared library. 72990f1ac3bcSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73000f1ac3bcSmrg else 7301b0a0317aSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 73020f1ac3bcSmrg # platform. 7303b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73040f1ac3bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7305b0a0317aSmrg $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 73060f1ac3bcSmrg 73070f1ac3bcSmrg # Commands to make compiler produce verbose output that lists 73080f1ac3bcSmrg # what "hidden" libraries, object files and flags are used when 73090f1ac3bcSmrg # linking a shared library. 73100f1ac3bcSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73110f1ac3bcSmrg fi 73120f1ac3bcSmrg 7313b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 73140f1ac3bcSmrg case $host_os in 73150f1ac3bcSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 73160f1ac3bcSmrg *) 7317b0a0317aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 73180f1ac3bcSmrg ;; 73190f1ac3bcSmrg esac 73200f1ac3bcSmrg fi 73210f1ac3bcSmrg ;; 73220f1ac3bcSmrg esac 73230f1ac3bcSmrg ;; 73240f1ac3bcSmrg 73250f1ac3bcSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7326b0a0317aSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73270f1ac3bcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73280f1ac3bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73290f1ac3bcSmrg runpath_var='LD_RUN_PATH' 73300f1ac3bcSmrg 73310f1ac3bcSmrg case $cc_basename in 73320f1ac3bcSmrg CC*) 7333b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7334b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73350f1ac3bcSmrg ;; 73360f1ac3bcSmrg *) 7337b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7338b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73390f1ac3bcSmrg ;; 73400f1ac3bcSmrg esac 73410f1ac3bcSmrg ;; 73420f1ac3bcSmrg 73430f1ac3bcSmrg sysv5* | sco3.2v5* | sco5v6*) 7344b0a0317aSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 73450f1ac3bcSmrg # link with -lc, and that would cause any symbols used from libc to 73460f1ac3bcSmrg # always be unresolved, which means just about no library would 73470f1ac3bcSmrg # ever link correctly. If we're not using GNU ld we use -z text 73480f1ac3bcSmrg # though, which does catch some bad symbols but isn't as heavy-handed 73490f1ac3bcSmrg # as -z defs. 7350b0a0317aSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7351b0a0317aSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 73520f1ac3bcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73530f1ac3bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7354b0a0317aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 73550f1ac3bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 73560f1ac3bcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7357b0a0317aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 73580f1ac3bcSmrg runpath_var='LD_RUN_PATH' 73590f1ac3bcSmrg 73600f1ac3bcSmrg case $cc_basename in 73610f1ac3bcSmrg CC*) 7362b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7363b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73640f1ac3bcSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7365b0a0317aSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 73660f1ac3bcSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7367b0a0317aSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 73680f1ac3bcSmrg ;; 73690f1ac3bcSmrg *) 7370b0a0317aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7371b0a0317aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73720f1ac3bcSmrg ;; 73730f1ac3bcSmrg esac 73740f1ac3bcSmrg ;; 73750f1ac3bcSmrg 73760f1ac3bcSmrg tandem*) 73770f1ac3bcSmrg case $cc_basename in 73780f1ac3bcSmrg NCC*) 73790f1ac3bcSmrg # NonStop-UX NCC 3.20 73800f1ac3bcSmrg # FIXME: insert proper C++ library support 73810f1ac3bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73820f1ac3bcSmrg ;; 73830f1ac3bcSmrg *) 73840f1ac3bcSmrg # FIXME: insert proper C++ library support 73850f1ac3bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73860f1ac3bcSmrg ;; 73870f1ac3bcSmrg esac 73880f1ac3bcSmrg ;; 73890f1ac3bcSmrg 73900f1ac3bcSmrg vxworks*) 73910f1ac3bcSmrg # FIXME: insert proper C++ library support 73920f1ac3bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73930f1ac3bcSmrg ;; 73940f1ac3bcSmrg 73950f1ac3bcSmrg *) 73960f1ac3bcSmrg # FIXME: insert proper C++ library support 73970f1ac3bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73980f1ac3bcSmrg ;; 73990f1ac3bcSmrg esac 74000f1ac3bcSmrg 74010f1ac3bcSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7402b0a0317aSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 74030f1ac3bcSmrg 7404b0a0317aSmrg _LT_TAGVAR(GCC, $1)=$GXX 7405b0a0317aSmrg _LT_TAGVAR(LD, $1)=$LD 74060f1ac3bcSmrg 74070f1ac3bcSmrg ## CAVEAT EMPTOR: 74080f1ac3bcSmrg ## There is no encapsulation within the following macros, do not change 74090f1ac3bcSmrg ## the running order or otherwise move them around unless you know exactly 74100f1ac3bcSmrg ## what you are doing... 74110f1ac3bcSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 74120f1ac3bcSmrg _LT_COMPILER_PIC($1) 74130f1ac3bcSmrg _LT_COMPILER_C_O($1) 74140f1ac3bcSmrg _LT_COMPILER_FILE_LOCKS($1) 74150f1ac3bcSmrg _LT_LINKER_SHLIBS($1) 74160f1ac3bcSmrg _LT_SYS_DYNAMIC_LINKER($1) 74170f1ac3bcSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 74180f1ac3bcSmrg 74190f1ac3bcSmrg _LT_CONFIG($1) 74200f1ac3bcSmrg fi # test -n "$compiler" 74210f1ac3bcSmrg 74220f1ac3bcSmrg CC=$lt_save_CC 74230f1ac3bcSmrg CFLAGS=$lt_save_CFLAGS 74240f1ac3bcSmrg LDCXX=$LD 74250f1ac3bcSmrg LD=$lt_save_LD 74260f1ac3bcSmrg GCC=$lt_save_GCC 74270f1ac3bcSmrg with_gnu_ld=$lt_save_with_gnu_ld 74280f1ac3bcSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 74290f1ac3bcSmrg lt_cv_path_LD=$lt_save_path_LD 74300f1ac3bcSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 74310f1ac3bcSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7432b0a0317aSmrgfi # test yes != "$_lt_caught_CXX_error" 74330f1ac3bcSmrg 74340f1ac3bcSmrgAC_LANG_POP 74350f1ac3bcSmrg])# _LT_LANG_CXX_CONFIG 74360f1ac3bcSmrg 74370f1ac3bcSmrg 74380f1ac3bcSmrg# _LT_FUNC_STRIPNAME_CNF 74390f1ac3bcSmrg# ---------------------- 74400f1ac3bcSmrg# func_stripname_cnf prefix suffix name 74410f1ac3bcSmrg# strip PREFIX and SUFFIX off of NAME. 74420f1ac3bcSmrg# PREFIX and SUFFIX must not contain globbing or regex special 74430f1ac3bcSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 74440f1ac3bcSmrg# dot (in which case that matches only a dot). 74450f1ac3bcSmrg# 74460f1ac3bcSmrg# This function is identical to the (non-XSI) version of func_stripname, 74470f1ac3bcSmrg# except this one can be used by m4 code that may be executed by configure, 74480f1ac3bcSmrg# rather than the libtool script. 74490f1ac3bcSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 74500f1ac3bcSmrgAC_REQUIRE([_LT_DECL_SED]) 74510f1ac3bcSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 74520f1ac3bcSmrgfunc_stripname_cnf () 74530f1ac3bcSmrg{ 7454b0a0317aSmrg case @S|@2 in 7455b0a0317aSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7456b0a0317aSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 74570f1ac3bcSmrg esac 74580f1ac3bcSmrg} # func_stripname_cnf 74590f1ac3bcSmrg])# _LT_FUNC_STRIPNAME_CNF 74600f1ac3bcSmrg 7461b0a0317aSmrg 74620f1ac3bcSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 74630f1ac3bcSmrg# --------------------------------- 74640f1ac3bcSmrg# Figure out "hidden" library dependencies from verbose 74650f1ac3bcSmrg# compiler output when linking a shared library. 74660f1ac3bcSmrg# Parse the compiler output and extract the necessary 74670f1ac3bcSmrg# objects, libraries and library flags. 74680f1ac3bcSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 74690f1ac3bcSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 74700f1ac3bcSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 74710f1ac3bcSmrg# Dependencies to place before and after the object being linked: 74720f1ac3bcSmrg_LT_TAGVAR(predep_objects, $1)= 74730f1ac3bcSmrg_LT_TAGVAR(postdep_objects, $1)= 74740f1ac3bcSmrg_LT_TAGVAR(predeps, $1)= 74750f1ac3bcSmrg_LT_TAGVAR(postdeps, $1)= 74760f1ac3bcSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 74770f1ac3bcSmrg 74780f1ac3bcSmrgdnl we can't use the lt_simple_compile_test_code here, 74790f1ac3bcSmrgdnl because it contains code intended for an executable, 74800f1ac3bcSmrgdnl not a library. It's possible we should let each 74810f1ac3bcSmrgdnl tag define a new lt_????_link_test_code variable, 74820f1ac3bcSmrgdnl but it's only used here... 74830f1ac3bcSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 74840f1ac3bcSmrgint a; 74850f1ac3bcSmrgvoid foo (void) { a = 0; } 74860f1ac3bcSmrg_LT_EOF 74870f1ac3bcSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 74880f1ac3bcSmrgclass Foo 74890f1ac3bcSmrg{ 74900f1ac3bcSmrgpublic: 74910f1ac3bcSmrg Foo (void) { a = 0; } 74920f1ac3bcSmrgprivate: 74930f1ac3bcSmrg int a; 74940f1ac3bcSmrg}; 74950f1ac3bcSmrg_LT_EOF 74960f1ac3bcSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 74970f1ac3bcSmrg subroutine foo 74980f1ac3bcSmrg implicit none 74990f1ac3bcSmrg integer*4 a 75000f1ac3bcSmrg a=0 75010f1ac3bcSmrg return 75020f1ac3bcSmrg end 75030f1ac3bcSmrg_LT_EOF 75040f1ac3bcSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 75050f1ac3bcSmrg subroutine foo 75060f1ac3bcSmrg implicit none 75070f1ac3bcSmrg integer a 75080f1ac3bcSmrg a=0 75090f1ac3bcSmrg return 75100f1ac3bcSmrg end 75110f1ac3bcSmrg_LT_EOF 75120f1ac3bcSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 75130f1ac3bcSmrgpublic class foo { 75140f1ac3bcSmrg private int a; 75150f1ac3bcSmrg public void bar (void) { 75160f1ac3bcSmrg a = 0; 75170f1ac3bcSmrg } 75180f1ac3bcSmrg}; 75190f1ac3bcSmrg_LT_EOF 75200f1ac3bcSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 75210f1ac3bcSmrgpackage foo 75220f1ac3bcSmrgfunc foo() { 75230f1ac3bcSmrg} 75240f1ac3bcSmrg_LT_EOF 75250f1ac3bcSmrg]) 75260f1ac3bcSmrg 75270f1ac3bcSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 75280f1ac3bcSmrgcase "$CC $CFLAGS " in #( 75290f1ac3bcSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 75300f1ac3bcSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 75310f1ac3bcSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 75320f1ac3bcSmrgesac 75330f1ac3bcSmrg 75340f1ac3bcSmrgdnl Parse the compiler output and extract the necessary 75350f1ac3bcSmrgdnl objects, libraries and library flags. 75360f1ac3bcSmrgif AC_TRY_EVAL(ac_compile); then 75370f1ac3bcSmrg # Parse the compiler output and extract the necessary 75380f1ac3bcSmrg # objects, libraries and library flags. 75390f1ac3bcSmrg 75400f1ac3bcSmrg # Sentinel used to keep track of whether or not we are before 75410f1ac3bcSmrg # the conftest object file. 75420f1ac3bcSmrg pre_test_object_deps_done=no 75430f1ac3bcSmrg 75440f1ac3bcSmrg for p in `eval "$output_verbose_link_cmd"`; do 7545b0a0317aSmrg case $prev$p in 75460f1ac3bcSmrg 75470f1ac3bcSmrg -L* | -R* | -l*) 75480f1ac3bcSmrg # Some compilers place space between "-{L,R}" and the path. 75490f1ac3bcSmrg # Remove the space. 7550b0a0317aSmrg if test x-L = "$p" || 7551b0a0317aSmrg test x-R = "$p"; then 75520f1ac3bcSmrg prev=$p 75530f1ac3bcSmrg continue 75540f1ac3bcSmrg fi 75550f1ac3bcSmrg 75560f1ac3bcSmrg # Expand the sysroot to ease extracting the directories later. 75570f1ac3bcSmrg if test -z "$prev"; then 75580f1ac3bcSmrg case $p in 75590f1ac3bcSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 75600f1ac3bcSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 75610f1ac3bcSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 75620f1ac3bcSmrg esac 75630f1ac3bcSmrg fi 75640f1ac3bcSmrg case $p in 75650f1ac3bcSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 75660f1ac3bcSmrg esac 7567b0a0317aSmrg if test no = "$pre_test_object_deps_done"; then 7568b0a0317aSmrg case $prev in 75690f1ac3bcSmrg -L | -R) 75700f1ac3bcSmrg # Internal compiler library paths should come after those 75710f1ac3bcSmrg # provided the user. The postdeps already come after the 75720f1ac3bcSmrg # user supplied libs so there is no need to process them. 75730f1ac3bcSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7574b0a0317aSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 75750f1ac3bcSmrg else 7576b0a0317aSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 75770f1ac3bcSmrg fi 75780f1ac3bcSmrg ;; 75790f1ac3bcSmrg # The "-l" case would never come before the object being 75800f1ac3bcSmrg # linked, so don't bother handling this case. 75810f1ac3bcSmrg esac 75820f1ac3bcSmrg else 75830f1ac3bcSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7584b0a0317aSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 75850f1ac3bcSmrg else 7586b0a0317aSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 75870f1ac3bcSmrg fi 75880f1ac3bcSmrg fi 75890f1ac3bcSmrg prev= 75900f1ac3bcSmrg ;; 75910f1ac3bcSmrg 75920f1ac3bcSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 75930f1ac3bcSmrg *.$objext) 75940f1ac3bcSmrg # This assumes that the test object file only shows up 75950f1ac3bcSmrg # once in the compiler output. 75960f1ac3bcSmrg if test "$p" = "conftest.$objext"; then 75970f1ac3bcSmrg pre_test_object_deps_done=yes 75980f1ac3bcSmrg continue 75990f1ac3bcSmrg fi 76004456fccdSmrg 7601b0a0317aSmrg if test no = "$pre_test_object_deps_done"; then 76020f1ac3bcSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7603b0a0317aSmrg _LT_TAGVAR(predep_objects, $1)=$p 76040f1ac3bcSmrg else 76050f1ac3bcSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 76060f1ac3bcSmrg fi 76070f1ac3bcSmrg else 76080f1ac3bcSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7609b0a0317aSmrg _LT_TAGVAR(postdep_objects, $1)=$p 76100f1ac3bcSmrg else 76110f1ac3bcSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 76120f1ac3bcSmrg fi 76130f1ac3bcSmrg fi 76140f1ac3bcSmrg ;; 76154456fccdSmrg 76160f1ac3bcSmrg *) ;; # Ignore the rest. 76174456fccdSmrg 76180f1ac3bcSmrg esac 76190f1ac3bcSmrg done 7620ff63a143Smrg 76210f1ac3bcSmrg # Clean up. 76220f1ac3bcSmrg rm -f a.out a.exe 76230f1ac3bcSmrgelse 76240f1ac3bcSmrg echo "libtool.m4: error: problem compiling $1 test program" 76250f1ac3bcSmrgfi 7626ff63a143Smrg 76270f1ac3bcSmrg$RM -f confest.$objext 76280f1ac3bcSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 7629ff63a143Smrg 76300f1ac3bcSmrg# PORTME: override above test on systems where it is broken 76310f1ac3bcSmrgm4_if([$1], [CXX], 76320f1ac3bcSmrg[case $host_os in 76330f1ac3bcSmrginterix[[3-9]]*) 76340f1ac3bcSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 76350f1ac3bcSmrg # hack all around it, let's just trust "g++" to DTRT. 76360f1ac3bcSmrg _LT_TAGVAR(predep_objects,$1)= 76370f1ac3bcSmrg _LT_TAGVAR(postdep_objects,$1)= 76380f1ac3bcSmrg _LT_TAGVAR(postdeps,$1)= 76390f1ac3bcSmrg ;; 76400f1ac3bcSmrgesac 76410f1ac3bcSmrg]) 76420f1ac3bcSmrg 76430f1ac3bcSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 76440f1ac3bcSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 76450f1ac3bcSmrgesac 76460f1ac3bcSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 76470f1ac3bcSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7648b0a0317aSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 76490f1ac3bcSmrgfi 76500f1ac3bcSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 76510f1ac3bcSmrg [The directories searched by this compiler when creating a shared library]) 76520f1ac3bcSmrg_LT_TAGDECL([], [predep_objects], [1], 76530f1ac3bcSmrg [Dependencies to place before and after the objects being linked to 76540f1ac3bcSmrg create a shared library]) 76550f1ac3bcSmrg_LT_TAGDECL([], [postdep_objects], [1]) 76560f1ac3bcSmrg_LT_TAGDECL([], [predeps], [1]) 76570f1ac3bcSmrg_LT_TAGDECL([], [postdeps], [1]) 76580f1ac3bcSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 76590f1ac3bcSmrg [The library search path used internally by the compiler when linking 76600f1ac3bcSmrg a shared library]) 76610f1ac3bcSmrg])# _LT_SYS_HIDDEN_LIBDEPS 76620f1ac3bcSmrg 76630f1ac3bcSmrg 76640f1ac3bcSmrg# _LT_LANG_F77_CONFIG([TAG]) 76650f1ac3bcSmrg# -------------------------- 76660f1ac3bcSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 76670f1ac3bcSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7668b0a0317aSmrg# to write the compiler configuration to 'libtool'. 76690f1ac3bcSmrgm4_defun([_LT_LANG_F77_CONFIG], 76700f1ac3bcSmrg[AC_LANG_PUSH(Fortran 77) 7671b0a0317aSmrgif test -z "$F77" || test no = "$F77"; then 76720f1ac3bcSmrg _lt_disable_F77=yes 76730f1ac3bcSmrgfi 76740f1ac3bcSmrg 76750f1ac3bcSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 76760f1ac3bcSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 76770f1ac3bcSmrg_LT_TAGVAR(always_export_symbols, $1)=no 76780f1ac3bcSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 76790f1ac3bcSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 76800f1ac3bcSmrg_LT_TAGVAR(hardcode_direct, $1)=no 76810f1ac3bcSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 76820f1ac3bcSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 76830f1ac3bcSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 76840f1ac3bcSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 76850f1ac3bcSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 76860f1ac3bcSmrg_LT_TAGVAR(inherit_rpath, $1)=no 76870f1ac3bcSmrg_LT_TAGVAR(module_cmds, $1)= 76880f1ac3bcSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 76890f1ac3bcSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 76900f1ac3bcSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 76910f1ac3bcSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 76920f1ac3bcSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 76930f1ac3bcSmrg_LT_TAGVAR(no_undefined_flag, $1)= 76940f1ac3bcSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 76950f1ac3bcSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7696ff63a143Smrg 76970f1ac3bcSmrg# Source file extension for f77 test sources. 76980f1ac3bcSmrgac_ext=f 7699ff63a143Smrg 77000f1ac3bcSmrg# Object file extension for compiled f77 test sources. 77010f1ac3bcSmrgobjext=o 77020f1ac3bcSmrg_LT_TAGVAR(objext, $1)=$objext 7703ff63a143Smrg 77040f1ac3bcSmrg# No sense in running all these tests if we already determined that 77050f1ac3bcSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 77060f1ac3bcSmrg# are currently assumed to apply to all compilers on this platform, 77070f1ac3bcSmrg# and will be corrupted by setting them based on a non-working compiler. 7708b0a0317aSmrgif test yes != "$_lt_disable_F77"; then 77090f1ac3bcSmrg # Code to be used in simple compile tests 77100f1ac3bcSmrg lt_simple_compile_test_code="\ 77110f1ac3bcSmrg subroutine t 77120f1ac3bcSmrg return 77130f1ac3bcSmrg end 77140f1ac3bcSmrg" 7715ff63a143Smrg 77160f1ac3bcSmrg # Code to be used in simple link tests 77170f1ac3bcSmrg lt_simple_link_test_code="\ 77180f1ac3bcSmrg program t 77190f1ac3bcSmrg end 77200f1ac3bcSmrg" 7721ff63a143Smrg 77220f1ac3bcSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 77230f1ac3bcSmrg _LT_TAG_COMPILER 7724ff63a143Smrg 77250f1ac3bcSmrg # save warnings/boilerplate of simple test code 77260f1ac3bcSmrg _LT_COMPILER_BOILERPLATE 77270f1ac3bcSmrg _LT_LINKER_BOILERPLATE 7728ff63a143Smrg 77290f1ac3bcSmrg # Allow CC to be a program name with arguments. 7730b0a0317aSmrg lt_save_CC=$CC 77310f1ac3bcSmrg lt_save_GCC=$GCC 77320f1ac3bcSmrg lt_save_CFLAGS=$CFLAGS 77330f1ac3bcSmrg CC=${F77-"f77"} 77340f1ac3bcSmrg CFLAGS=$FFLAGS 77350f1ac3bcSmrg compiler=$CC 77360f1ac3bcSmrg _LT_TAGVAR(compiler, $1)=$CC 77370f1ac3bcSmrg _LT_CC_BASENAME([$compiler]) 77380f1ac3bcSmrg GCC=$G77 77390f1ac3bcSmrg if test -n "$compiler"; then 77400f1ac3bcSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 77410f1ac3bcSmrg AC_MSG_RESULT([$can_build_shared]) 77424456fccdSmrg 77430f1ac3bcSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7744b0a0317aSmrg test no = "$can_build_shared" && enable_shared=no 7745ff63a143Smrg 77460f1ac3bcSmrg # On AIX, shared libraries and static libraries use the same namespace, and 77470f1ac3bcSmrg # are all built from PIC. 77480f1ac3bcSmrg case $host_os in 77490f1ac3bcSmrg aix3*) 7750b0a0317aSmrg test yes = "$enable_shared" && enable_static=no 77510f1ac3bcSmrg if test -n "$RANLIB"; then 77520f1ac3bcSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 77530f1ac3bcSmrg postinstall_cmds='$RANLIB $lib' 77540f1ac3bcSmrg fi 77553e6c936aSmrg ;; 77560f1ac3bcSmrg aix[[4-9]]*) 7757b0a0317aSmrg if test ia64 != "$host_cpu"; then 7758b0a0317aSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7759b0a0317aSmrg yes,aix,yes) ;; # shared object as lib.so file only 7760b0a0317aSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 7761b0a0317aSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7762b0a0317aSmrg esac 77630f1ac3bcSmrg fi 77643e6c936aSmrg ;; 77650f1ac3bcSmrg esac 77660f1ac3bcSmrg AC_MSG_RESULT([$enable_shared]) 77674456fccdSmrg 77680f1ac3bcSmrg AC_MSG_CHECKING([whether to build static libraries]) 77690f1ac3bcSmrg # Make sure either enable_shared or enable_static is yes. 7770b0a0317aSmrg test yes = "$enable_shared" || enable_static=yes 77710f1ac3bcSmrg AC_MSG_RESULT([$enable_static]) 77724456fccdSmrg 7773b0a0317aSmrg _LT_TAGVAR(GCC, $1)=$G77 7774b0a0317aSmrg _LT_TAGVAR(LD, $1)=$LD 77754456fccdSmrg 77760f1ac3bcSmrg ## CAVEAT EMPTOR: 77770f1ac3bcSmrg ## There is no encapsulation within the following macros, do not change 77780f1ac3bcSmrg ## the running order or otherwise move them around unless you know exactly 77790f1ac3bcSmrg ## what you are doing... 77800f1ac3bcSmrg _LT_COMPILER_PIC($1) 77810f1ac3bcSmrg _LT_COMPILER_C_O($1) 77820f1ac3bcSmrg _LT_COMPILER_FILE_LOCKS($1) 77830f1ac3bcSmrg _LT_LINKER_SHLIBS($1) 77840f1ac3bcSmrg _LT_SYS_DYNAMIC_LINKER($1) 77850f1ac3bcSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 77864456fccdSmrg 77870f1ac3bcSmrg _LT_CONFIG($1) 77880f1ac3bcSmrg fi # test -n "$compiler" 7789521070a0Smrg 77900f1ac3bcSmrg GCC=$lt_save_GCC 7791b0a0317aSmrg CC=$lt_save_CC 7792b0a0317aSmrg CFLAGS=$lt_save_CFLAGS 7793b0a0317aSmrgfi # test yes != "$_lt_disable_F77" 77944456fccdSmrg 77950f1ac3bcSmrgAC_LANG_POP 77960f1ac3bcSmrg])# _LT_LANG_F77_CONFIG 77970f1ac3bcSmrg 77980f1ac3bcSmrg 77990f1ac3bcSmrg# _LT_LANG_FC_CONFIG([TAG]) 78000f1ac3bcSmrg# ------------------------- 78010f1ac3bcSmrg# Ensure that the configuration variables for a Fortran compiler are 78020f1ac3bcSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7803b0a0317aSmrg# to write the compiler configuration to 'libtool'. 78040f1ac3bcSmrgm4_defun([_LT_LANG_FC_CONFIG], 78050f1ac3bcSmrg[AC_LANG_PUSH(Fortran) 78060f1ac3bcSmrg 7807b0a0317aSmrgif test -z "$FC" || test no = "$FC"; then 78080f1ac3bcSmrg _lt_disable_FC=yes 78090f1ac3bcSmrgfi 78100f1ac3bcSmrg 78110f1ac3bcSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 78120f1ac3bcSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 78130f1ac3bcSmrg_LT_TAGVAR(always_export_symbols, $1)=no 78140f1ac3bcSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 78150f1ac3bcSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 78160f1ac3bcSmrg_LT_TAGVAR(hardcode_direct, $1)=no 78170f1ac3bcSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 78180f1ac3bcSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 78190f1ac3bcSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 78200f1ac3bcSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 78210f1ac3bcSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 78220f1ac3bcSmrg_LT_TAGVAR(inherit_rpath, $1)=no 78230f1ac3bcSmrg_LT_TAGVAR(module_cmds, $1)= 78240f1ac3bcSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 78250f1ac3bcSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 78260f1ac3bcSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 78270f1ac3bcSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 78280f1ac3bcSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 78290f1ac3bcSmrg_LT_TAGVAR(no_undefined_flag, $1)= 78300f1ac3bcSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 78310f1ac3bcSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 78320f1ac3bcSmrg 78330f1ac3bcSmrg# Source file extension for fc test sources. 78340f1ac3bcSmrgac_ext=${ac_fc_srcext-f} 78354456fccdSmrg 78360f1ac3bcSmrg# Object file extension for compiled fc test sources. 78370f1ac3bcSmrgobjext=o 78380f1ac3bcSmrg_LT_TAGVAR(objext, $1)=$objext 7839521070a0Smrg 78400f1ac3bcSmrg# No sense in running all these tests if we already determined that 78410f1ac3bcSmrg# the FC compiler isn't working. Some variables (like enable_shared) 78420f1ac3bcSmrg# are currently assumed to apply to all compilers on this platform, 78430f1ac3bcSmrg# and will be corrupted by setting them based on a non-working compiler. 7844b0a0317aSmrgif test yes != "$_lt_disable_FC"; then 78450f1ac3bcSmrg # Code to be used in simple compile tests 78460f1ac3bcSmrg lt_simple_compile_test_code="\ 78470f1ac3bcSmrg subroutine t 78480f1ac3bcSmrg return 78490f1ac3bcSmrg end 78500f1ac3bcSmrg" 7851521070a0Smrg 78520f1ac3bcSmrg # Code to be used in simple link tests 78530f1ac3bcSmrg lt_simple_link_test_code="\ 78540f1ac3bcSmrg program t 78550f1ac3bcSmrg end 78560f1ac3bcSmrg" 7857521070a0Smrg 78580f1ac3bcSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 78590f1ac3bcSmrg _LT_TAG_COMPILER 7860521070a0Smrg 78610f1ac3bcSmrg # save warnings/boilerplate of simple test code 78620f1ac3bcSmrg _LT_COMPILER_BOILERPLATE 78630f1ac3bcSmrg _LT_LINKER_BOILERPLATE 7864521070a0Smrg 78650f1ac3bcSmrg # Allow CC to be a program name with arguments. 7866b0a0317aSmrg lt_save_CC=$CC 78670f1ac3bcSmrg lt_save_GCC=$GCC 78680f1ac3bcSmrg lt_save_CFLAGS=$CFLAGS 78690f1ac3bcSmrg CC=${FC-"f95"} 78700f1ac3bcSmrg CFLAGS=$FCFLAGS 78710f1ac3bcSmrg compiler=$CC 78720f1ac3bcSmrg GCC=$ac_cv_fc_compiler_gnu 78734456fccdSmrg 78740f1ac3bcSmrg _LT_TAGVAR(compiler, $1)=$CC 78750f1ac3bcSmrg _LT_CC_BASENAME([$compiler]) 78764456fccdSmrg 78770f1ac3bcSmrg if test -n "$compiler"; then 78780f1ac3bcSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 78790f1ac3bcSmrg AC_MSG_RESULT([$can_build_shared]) 78804456fccdSmrg 78810f1ac3bcSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7882b0a0317aSmrg test no = "$can_build_shared" && enable_shared=no 78834456fccdSmrg 78840f1ac3bcSmrg # On AIX, shared libraries and static libraries use the same namespace, and 78850f1ac3bcSmrg # are all built from PIC. 78860f1ac3bcSmrg case $host_os in 78870f1ac3bcSmrg aix3*) 7888b0a0317aSmrg test yes = "$enable_shared" && enable_static=no 78890f1ac3bcSmrg if test -n "$RANLIB"; then 78900f1ac3bcSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 78910f1ac3bcSmrg postinstall_cmds='$RANLIB $lib' 78920f1ac3bcSmrg fi 78930f1ac3bcSmrg ;; 78940f1ac3bcSmrg aix[[4-9]]*) 7895b0a0317aSmrg if test ia64 != "$host_cpu"; then 7896b0a0317aSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7897b0a0317aSmrg yes,aix,yes) ;; # shared object as lib.so file only 7898b0a0317aSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 7899b0a0317aSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7900b0a0317aSmrg esac 79010f1ac3bcSmrg fi 79023e6c936aSmrg ;; 79033e6c936aSmrg esac 79040f1ac3bcSmrg AC_MSG_RESULT([$enable_shared]) 79054456fccdSmrg 79060f1ac3bcSmrg AC_MSG_CHECKING([whether to build static libraries]) 79070f1ac3bcSmrg # Make sure either enable_shared or enable_static is yes. 7908b0a0317aSmrg test yes = "$enable_shared" || enable_static=yes 79090f1ac3bcSmrg AC_MSG_RESULT([$enable_static]) 7910521070a0Smrg 7911b0a0317aSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7912b0a0317aSmrg _LT_TAGVAR(LD, $1)=$LD 79134456fccdSmrg 79143e6c936aSmrg ## CAVEAT EMPTOR: 79153e6c936aSmrg ## There is no encapsulation within the following macros, do not change 79163e6c936aSmrg ## the running order or otherwise move them around unless you know exactly 79173e6c936aSmrg ## what you are doing... 79183e6c936aSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 79193e6c936aSmrg _LT_COMPILER_PIC($1) 79203e6c936aSmrg _LT_COMPILER_C_O($1) 79213e6c936aSmrg _LT_COMPILER_FILE_LOCKS($1) 79223e6c936aSmrg _LT_LINKER_SHLIBS($1) 79233e6c936aSmrg _LT_SYS_DYNAMIC_LINKER($1) 79243e6c936aSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 79254456fccdSmrg 79263e6c936aSmrg _LT_CONFIG($1) 79273e6c936aSmrg fi # test -n "$compiler" 79284456fccdSmrg 79290f1ac3bcSmrg GCC=$lt_save_GCC 79300f1ac3bcSmrg CC=$lt_save_CC 79310f1ac3bcSmrg CFLAGS=$lt_save_CFLAGS 7932b0a0317aSmrgfi # test yes != "$_lt_disable_FC" 79330f1ac3bcSmrg 79340f1ac3bcSmrgAC_LANG_POP 79350f1ac3bcSmrg])# _LT_LANG_FC_CONFIG 79360f1ac3bcSmrg 79370f1ac3bcSmrg 79380f1ac3bcSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 79390f1ac3bcSmrg# -------------------------- 79400f1ac3bcSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 79410f1ac3bcSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7942b0a0317aSmrg# to write the compiler configuration to 'libtool'. 79430f1ac3bcSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 79440f1ac3bcSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 79450f1ac3bcSmrgAC_LANG_SAVE 79460f1ac3bcSmrg 79470f1ac3bcSmrg# Source file extension for Java test sources. 79480f1ac3bcSmrgac_ext=java 79490f1ac3bcSmrg 79500f1ac3bcSmrg# Object file extension for compiled Java test sources. 79510f1ac3bcSmrgobjext=o 79520f1ac3bcSmrg_LT_TAGVAR(objext, $1)=$objext 79530f1ac3bcSmrg 79540f1ac3bcSmrg# Code to be used in simple compile tests 79550f1ac3bcSmrglt_simple_compile_test_code="class foo {}" 79560f1ac3bcSmrg 79570f1ac3bcSmrg# Code to be used in simple link tests 79580f1ac3bcSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 79590f1ac3bcSmrg 79600f1ac3bcSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 79610f1ac3bcSmrg_LT_TAG_COMPILER 79620f1ac3bcSmrg 79630f1ac3bcSmrg# save warnings/boilerplate of simple test code 79640f1ac3bcSmrg_LT_COMPILER_BOILERPLATE 79650f1ac3bcSmrg_LT_LINKER_BOILERPLATE 79660f1ac3bcSmrg 79670f1ac3bcSmrg# Allow CC to be a program name with arguments. 79680f1ac3bcSmrglt_save_CC=$CC 79690f1ac3bcSmrglt_save_CFLAGS=$CFLAGS 79700f1ac3bcSmrglt_save_GCC=$GCC 79710f1ac3bcSmrgGCC=yes 79720f1ac3bcSmrgCC=${GCJ-"gcj"} 79730f1ac3bcSmrgCFLAGS=$GCJFLAGS 79740f1ac3bcSmrgcompiler=$CC 79750f1ac3bcSmrg_LT_TAGVAR(compiler, $1)=$CC 7976b0a0317aSmrg_LT_TAGVAR(LD, $1)=$LD 79770f1ac3bcSmrg_LT_CC_BASENAME([$compiler]) 79780f1ac3bcSmrg 79790f1ac3bcSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 79800f1ac3bcSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 79810f1ac3bcSmrg 79820f1ac3bcSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 79830f1ac3bcSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 79840f1ac3bcSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 79850f1ac3bcSmrg 79860f1ac3bcSmrgif test -n "$compiler"; then 79870f1ac3bcSmrg _LT_COMPILER_NO_RTTI($1) 79880f1ac3bcSmrg _LT_COMPILER_PIC($1) 79890f1ac3bcSmrg _LT_COMPILER_C_O($1) 79900f1ac3bcSmrg _LT_COMPILER_FILE_LOCKS($1) 79910f1ac3bcSmrg _LT_LINKER_SHLIBS($1) 79920f1ac3bcSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 79930f1ac3bcSmrg 79940f1ac3bcSmrg _LT_CONFIG($1) 79950f1ac3bcSmrgfi 79960f1ac3bcSmrg 79970f1ac3bcSmrgAC_LANG_RESTORE 79980f1ac3bcSmrg 79990f1ac3bcSmrgGCC=$lt_save_GCC 80000f1ac3bcSmrgCC=$lt_save_CC 80010f1ac3bcSmrgCFLAGS=$lt_save_CFLAGS 80020f1ac3bcSmrg])# _LT_LANG_GCJ_CONFIG 80030f1ac3bcSmrg 80040f1ac3bcSmrg 80050f1ac3bcSmrg# _LT_LANG_GO_CONFIG([TAG]) 80060f1ac3bcSmrg# -------------------------- 80070f1ac3bcSmrg# Ensure that the configuration variables for the GNU Go compiler 80080f1ac3bcSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8009b0a0317aSmrg# to write the compiler configuration to 'libtool'. 80100f1ac3bcSmrgm4_defun([_LT_LANG_GO_CONFIG], 80110f1ac3bcSmrg[AC_REQUIRE([LT_PROG_GO])dnl 80120f1ac3bcSmrgAC_LANG_SAVE 80130f1ac3bcSmrg 80140f1ac3bcSmrg# Source file extension for Go test sources. 80150f1ac3bcSmrgac_ext=go 80160f1ac3bcSmrg 80170f1ac3bcSmrg# Object file extension for compiled Go test sources. 80180f1ac3bcSmrgobjext=o 80190f1ac3bcSmrg_LT_TAGVAR(objext, $1)=$objext 80200f1ac3bcSmrg 80210f1ac3bcSmrg# Code to be used in simple compile tests 80220f1ac3bcSmrglt_simple_compile_test_code="package main; func main() { }" 80230f1ac3bcSmrg 80240f1ac3bcSmrg# Code to be used in simple link tests 80250f1ac3bcSmrglt_simple_link_test_code='package main; func main() { }' 80260f1ac3bcSmrg 80270f1ac3bcSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 80280f1ac3bcSmrg_LT_TAG_COMPILER 80290f1ac3bcSmrg 80300f1ac3bcSmrg# save warnings/boilerplate of simple test code 80310f1ac3bcSmrg_LT_COMPILER_BOILERPLATE 80320f1ac3bcSmrg_LT_LINKER_BOILERPLATE 80334456fccdSmrg 80340f1ac3bcSmrg# Allow CC to be a program name with arguments. 80350f1ac3bcSmrglt_save_CC=$CC 80360f1ac3bcSmrglt_save_CFLAGS=$CFLAGS 80370f1ac3bcSmrglt_save_GCC=$GCC 80380f1ac3bcSmrgGCC=yes 80390f1ac3bcSmrgCC=${GOC-"gccgo"} 80400f1ac3bcSmrgCFLAGS=$GOFLAGS 80410f1ac3bcSmrgcompiler=$CC 80420f1ac3bcSmrg_LT_TAGVAR(compiler, $1)=$CC 8043b0a0317aSmrg_LT_TAGVAR(LD, $1)=$LD 80440f1ac3bcSmrg_LT_CC_BASENAME([$compiler]) 80454456fccdSmrg 80460f1ac3bcSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 80470f1ac3bcSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8048521070a0Smrg 80490f1ac3bcSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 80500f1ac3bcSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 80510f1ac3bcSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8052521070a0Smrg 80530f1ac3bcSmrgif test -n "$compiler"; then 80540f1ac3bcSmrg _LT_COMPILER_NO_RTTI($1) 80550f1ac3bcSmrg _LT_COMPILER_PIC($1) 80560f1ac3bcSmrg _LT_COMPILER_C_O($1) 80570f1ac3bcSmrg _LT_COMPILER_FILE_LOCKS($1) 80580f1ac3bcSmrg _LT_LINKER_SHLIBS($1) 80590f1ac3bcSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 80604456fccdSmrg 80610f1ac3bcSmrg _LT_CONFIG($1) 80620f1ac3bcSmrgfi 8063ff63a143Smrg 80640f1ac3bcSmrgAC_LANG_RESTORE 80654456fccdSmrg 80660f1ac3bcSmrgGCC=$lt_save_GCC 80670f1ac3bcSmrgCC=$lt_save_CC 80680f1ac3bcSmrgCFLAGS=$lt_save_CFLAGS 80690f1ac3bcSmrg])# _LT_LANG_GO_CONFIG 80704456fccdSmrg 8071521070a0Smrg 80720f1ac3bcSmrg# _LT_LANG_RC_CONFIG([TAG]) 80730f1ac3bcSmrg# ------------------------- 80740f1ac3bcSmrg# Ensure that the configuration variables for the Windows resource compiler 80750f1ac3bcSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8076b0a0317aSmrg# to write the compiler configuration to 'libtool'. 80770f1ac3bcSmrgm4_defun([_LT_LANG_RC_CONFIG], 80780f1ac3bcSmrg[AC_REQUIRE([LT_PROG_RC])dnl 80790f1ac3bcSmrgAC_LANG_SAVE 80804456fccdSmrg 80810f1ac3bcSmrg# Source file extension for RC test sources. 80820f1ac3bcSmrgac_ext=rc 80834456fccdSmrg 80840f1ac3bcSmrg# Object file extension for compiled RC test sources. 80850f1ac3bcSmrgobjext=o 80860f1ac3bcSmrg_LT_TAGVAR(objext, $1)=$objext 80873e6c936aSmrg 80880f1ac3bcSmrg# Code to be used in simple compile tests 80890f1ac3bcSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 80904456fccdSmrg 80910f1ac3bcSmrg# Code to be used in simple link tests 8092b0a0317aSmrglt_simple_link_test_code=$lt_simple_compile_test_code 80934456fccdSmrg 80940f1ac3bcSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 80950f1ac3bcSmrg_LT_TAG_COMPILER 80964456fccdSmrg 80970f1ac3bcSmrg# save warnings/boilerplate of simple test code 80980f1ac3bcSmrg_LT_COMPILER_BOILERPLATE 80990f1ac3bcSmrg_LT_LINKER_BOILERPLATE 81004456fccdSmrg 81010f1ac3bcSmrg# Allow CC to be a program name with arguments. 8102b0a0317aSmrglt_save_CC=$CC 81030f1ac3bcSmrglt_save_CFLAGS=$CFLAGS 81040f1ac3bcSmrglt_save_GCC=$GCC 81050f1ac3bcSmrgGCC= 81060f1ac3bcSmrgCC=${RC-"windres"} 81070f1ac3bcSmrgCFLAGS= 81080f1ac3bcSmrgcompiler=$CC 81090f1ac3bcSmrg_LT_TAGVAR(compiler, $1)=$CC 81100f1ac3bcSmrg_LT_CC_BASENAME([$compiler]) 81110f1ac3bcSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 81120f1ac3bcSmrg 81130f1ac3bcSmrgif test -n "$compiler"; then 81140f1ac3bcSmrg : 81150f1ac3bcSmrg _LT_CONFIG($1) 81163e6c936aSmrgfi 8117521070a0Smrg 81180f1ac3bcSmrgGCC=$lt_save_GCC 81190f1ac3bcSmrgAC_LANG_RESTORE 81200f1ac3bcSmrgCC=$lt_save_CC 81210f1ac3bcSmrgCFLAGS=$lt_save_CFLAGS 81220f1ac3bcSmrg])# _LT_LANG_RC_CONFIG 8123521070a0Smrg 8124521070a0Smrg 81250f1ac3bcSmrg# LT_PROG_GCJ 81260f1ac3bcSmrg# ----------- 81270f1ac3bcSmrgAC_DEFUN([LT_PROG_GCJ], 81280f1ac3bcSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 81290f1ac3bcSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 81300f1ac3bcSmrg [AC_CHECK_TOOL(GCJ, gcj,) 8131b0a0317aSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 81320f1ac3bcSmrg AC_SUBST(GCJFLAGS)])])[]dnl 81330f1ac3bcSmrg]) 8134ff63a143Smrg 81350f1ac3bcSmrg# Old name: 81360f1ac3bcSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 81370f1ac3bcSmrgdnl aclocal-1.4 backwards compatibility: 81380f1ac3bcSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8139ff63a143Smrg 81404456fccdSmrg 81410f1ac3bcSmrg# LT_PROG_GO 81420f1ac3bcSmrg# ---------- 81430f1ac3bcSmrgAC_DEFUN([LT_PROG_GO], 81440f1ac3bcSmrg[AC_CHECK_TOOL(GOC, gccgo,) 8145ff63a143Smrg]) 8146521070a0Smrg 81474456fccdSmrg 81480f1ac3bcSmrg# LT_PROG_RC 81490f1ac3bcSmrg# ---------- 81500f1ac3bcSmrgAC_DEFUN([LT_PROG_RC], 81510f1ac3bcSmrg[AC_CHECK_TOOL(RC, windres,) 81520f1ac3bcSmrg]) 8153521070a0Smrg 81540f1ac3bcSmrg# Old name: 81550f1ac3bcSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 81560f1ac3bcSmrgdnl aclocal-1.4 backwards compatibility: 81570f1ac3bcSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 81583e6c936aSmrg 8159521070a0Smrg 81600f1ac3bcSmrg# _LT_DECL_EGREP 81610f1ac3bcSmrg# -------------- 81620f1ac3bcSmrg# If we don't have a new enough Autoconf to choose the best grep 81630f1ac3bcSmrg# available, choose the one first in the user's PATH. 81640f1ac3bcSmrgm4_defun([_LT_DECL_EGREP], 81650f1ac3bcSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 81660f1ac3bcSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 81670f1ac3bcSmrgtest -z "$GREP" && GREP=grep 81680f1ac3bcSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 81690f1ac3bcSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 81700f1ac3bcSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 81710f1ac3bcSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 81720f1ac3bcSmrgAC_SUBST([GREP]) 81730f1ac3bcSmrg]) 8174521070a0Smrg 81754456fccdSmrg 81760f1ac3bcSmrg# _LT_DECL_OBJDUMP 81770f1ac3bcSmrg# -------------- 81780f1ac3bcSmrg# If we don't have a new enough Autoconf to choose the best objdump 81790f1ac3bcSmrg# available, choose the one first in the user's PATH. 81800f1ac3bcSmrgm4_defun([_LT_DECL_OBJDUMP], 81810f1ac3bcSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 81820f1ac3bcSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 81830f1ac3bcSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 81840f1ac3bcSmrgAC_SUBST([OBJDUMP]) 81850f1ac3bcSmrg]) 81864456fccdSmrg 81870f1ac3bcSmrg# _LT_DECL_DLLTOOL 81880f1ac3bcSmrg# ---------------- 81890f1ac3bcSmrg# Ensure DLLTOOL variable is set. 81900f1ac3bcSmrgm4_defun([_LT_DECL_DLLTOOL], 81910f1ac3bcSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 81920f1ac3bcSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 81930f1ac3bcSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 81940f1ac3bcSmrgAC_SUBST([DLLTOOL]) 81950f1ac3bcSmrg]) 81964456fccdSmrg 81970f1ac3bcSmrg# _LT_DECL_SED 81980f1ac3bcSmrg# ------------ 81990f1ac3bcSmrg# Check for a fully-functional sed program, that truncates 82000f1ac3bcSmrg# as few characters as possible. Prefer GNU sed if found. 82010f1ac3bcSmrgm4_defun([_LT_DECL_SED], 82020f1ac3bcSmrg[AC_PROG_SED 82030f1ac3bcSmrgtest -z "$SED" && SED=sed 82040f1ac3bcSmrgXsed="$SED -e 1s/^X//" 82050f1ac3bcSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 82060f1ac3bcSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 82070f1ac3bcSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 82080f1ac3bcSmrg])# _LT_DECL_SED 8209521070a0Smrg 82100f1ac3bcSmrgm4_ifndef([AC_PROG_SED], [ 82110f1ac3bcSmrg# NOTE: This macro has been submitted for inclusion into # 82120f1ac3bcSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 82130f1ac3bcSmrg# a released version of Autoconf we should remove this # 82140f1ac3bcSmrg# macro and use it instead. # 8215521070a0Smrg 82160f1ac3bcSmrgm4_defun([AC_PROG_SED], 82170f1ac3bcSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 82180f1ac3bcSmrgAC_CACHE_VAL(lt_cv_path_SED, 82190f1ac3bcSmrg[# Loop through the user's path and test for sed and gsed. 82200f1ac3bcSmrg# Then use that list of sed's as ones to test for truncation. 82210f1ac3bcSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 82220f1ac3bcSmrgfor as_dir in $PATH 82230f1ac3bcSmrgdo 82240f1ac3bcSmrg IFS=$as_save_IFS 82250f1ac3bcSmrg test -z "$as_dir" && as_dir=. 82260f1ac3bcSmrg for lt_ac_prog in sed gsed; do 82270f1ac3bcSmrg for ac_exec_ext in '' $ac_executable_extensions; do 82280f1ac3bcSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 82290f1ac3bcSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 82300f1ac3bcSmrg fi 82310f1ac3bcSmrg done 82320f1ac3bcSmrg done 82330f1ac3bcSmrgdone 82340f1ac3bcSmrgIFS=$as_save_IFS 82350f1ac3bcSmrglt_ac_max=0 82360f1ac3bcSmrglt_ac_count=0 82370f1ac3bcSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 82380f1ac3bcSmrg# along with /bin/sed that truncates output. 82390f1ac3bcSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8240b0a0317aSmrg test ! -f "$lt_ac_sed" && continue 82410f1ac3bcSmrg cat /dev/null > conftest.in 82420f1ac3bcSmrg lt_ac_count=0 82430f1ac3bcSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 82440f1ac3bcSmrg # Check for GNU sed and select it if it is found. 82450f1ac3bcSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 82460f1ac3bcSmrg lt_cv_path_SED=$lt_ac_sed 82470f1ac3bcSmrg break 82480f1ac3bcSmrg fi 82490f1ac3bcSmrg while true; do 82500f1ac3bcSmrg cat conftest.in conftest.in >conftest.tmp 82510f1ac3bcSmrg mv conftest.tmp conftest.in 82520f1ac3bcSmrg cp conftest.in conftest.nl 82530f1ac3bcSmrg echo >>conftest.nl 82540f1ac3bcSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 82550f1ac3bcSmrg cmp -s conftest.out conftest.nl || break 82560f1ac3bcSmrg # 10000 chars as input seems more than enough 8257b0a0317aSmrg test 10 -lt "$lt_ac_count" && break 82580f1ac3bcSmrg lt_ac_count=`expr $lt_ac_count + 1` 8259b0a0317aSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 82600f1ac3bcSmrg lt_ac_max=$lt_ac_count 82610f1ac3bcSmrg lt_cv_path_SED=$lt_ac_sed 82620f1ac3bcSmrg fi 82630f1ac3bcSmrg done 82640f1ac3bcSmrgdone 82650f1ac3bcSmrg]) 82660f1ac3bcSmrgSED=$lt_cv_path_SED 82670f1ac3bcSmrgAC_SUBST([SED]) 82680f1ac3bcSmrgAC_MSG_RESULT([$SED]) 82690f1ac3bcSmrg])#AC_PROG_SED 82700f1ac3bcSmrg])#m4_ifndef 82714456fccdSmrg 82720f1ac3bcSmrg# Old name: 82730f1ac3bcSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 82740f1ac3bcSmrgdnl aclocal-1.4 backwards compatibility: 82750f1ac3bcSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 82764456fccdSmrg 82774456fccdSmrg 82780f1ac3bcSmrg# _LT_CHECK_SHELL_FEATURES 82790f1ac3bcSmrg# ------------------------ 82800f1ac3bcSmrg# Find out whether the shell is Bourne or XSI compatible, 82810f1ac3bcSmrg# or has some other useful features. 82820f1ac3bcSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 8283b0a0317aSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 82840f1ac3bcSmrg lt_unset=unset 82850f1ac3bcSmrgelse 82860f1ac3bcSmrg lt_unset=false 82870f1ac3bcSmrgfi 82880f1ac3bcSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 82894456fccdSmrg 82900f1ac3bcSmrg# test EBCDIC or ASCII 82910f1ac3bcSmrgcase `echo X|tr X '\101'` in 82920f1ac3bcSmrg A) # ASCII based system 82930f1ac3bcSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 82940f1ac3bcSmrg lt_SP2NL='tr \040 \012' 82950f1ac3bcSmrg lt_NL2SP='tr \015\012 \040\040' 82960f1ac3bcSmrg ;; 82970f1ac3bcSmrg *) # EBCDIC based system 82980f1ac3bcSmrg lt_SP2NL='tr \100 \n' 82990f1ac3bcSmrg lt_NL2SP='tr \r\n \100\100' 83000f1ac3bcSmrg ;; 83010f1ac3bcSmrgesac 83020f1ac3bcSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 83030f1ac3bcSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 83040f1ac3bcSmrg])# _LT_CHECK_SHELL_FEATURES 830542d69509Smrg 830642d69509Smrg 83070f1ac3bcSmrg# _LT_PATH_CONVERSION_FUNCTIONS 83080f1ac3bcSmrg# ----------------------------- 8309b0a0317aSmrg# Determine what file name conversion functions should be used by 83100f1ac3bcSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 83110f1ac3bcSmrg# for certain cross-compile configurations and native mingw. 83120f1ac3bcSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 83130f1ac3bcSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 83140f1ac3bcSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 83150f1ac3bcSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 83160f1ac3bcSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 83170f1ac3bcSmrg[case $host in 83180f1ac3bcSmrg *-*-mingw* ) 83190f1ac3bcSmrg case $build in 83200f1ac3bcSmrg *-*-mingw* ) # actually msys 83210f1ac3bcSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 83223e6c936aSmrg ;; 83230f1ac3bcSmrg *-*-cygwin* ) 83240f1ac3bcSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 83250f1ac3bcSmrg ;; 83260f1ac3bcSmrg * ) # otherwise, assume *nix 83270f1ac3bcSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 83283e6c936aSmrg ;; 83293e6c936aSmrg esac 83300f1ac3bcSmrg ;; 83310f1ac3bcSmrg *-*-cygwin* ) 83320f1ac3bcSmrg case $build in 83330f1ac3bcSmrg *-*-mingw* ) # actually msys 83340f1ac3bcSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 83350f1ac3bcSmrg ;; 83360f1ac3bcSmrg *-*-cygwin* ) 83370f1ac3bcSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 83380f1ac3bcSmrg ;; 83390f1ac3bcSmrg * ) # otherwise, assume *nix 83400f1ac3bcSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 83410f1ac3bcSmrg ;; 83420f1ac3bcSmrg esac 83430f1ac3bcSmrg ;; 83440f1ac3bcSmrg * ) # unhandled hosts (and "normal" native builds) 83450f1ac3bcSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 83460f1ac3bcSmrg ;; 83470f1ac3bcSmrgesac 83480f1ac3bcSmrg]) 83490f1ac3bcSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 83500f1ac3bcSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 83510f1ac3bcSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 83520f1ac3bcSmrg [0], [convert $build file names to $host format])dnl 8353521070a0Smrg 83540f1ac3bcSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 83550f1ac3bcSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 83560f1ac3bcSmrg[#assume ordinary cross tools, or native build. 83570f1ac3bcSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 83580f1ac3bcSmrgcase $host in 83590f1ac3bcSmrg *-*-mingw* ) 83600f1ac3bcSmrg case $build in 83610f1ac3bcSmrg *-*-mingw* ) # actually msys 83620f1ac3bcSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 83630f1ac3bcSmrg ;; 83640f1ac3bcSmrg esac 83650f1ac3bcSmrg ;; 83660f1ac3bcSmrgesac 83670f1ac3bcSmrg]) 83680f1ac3bcSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 83690f1ac3bcSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 83700f1ac3bcSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 83710f1ac3bcSmrg [0], [convert $build files to toolchain format])dnl 83720f1ac3bcSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 8373ff63a143Smrg 83740f1ac3bcSmrg# Helper functions for option handling. -*- Autoconf -*- 83750f1ac3bcSmrg# 8376b0a0317aSmrg# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 8377b0a0317aSmrg# Foundation, Inc. 83780f1ac3bcSmrg# Written by Gary V. Vaughan, 2004 83790f1ac3bcSmrg# 83800f1ac3bcSmrg# This file is free software; the Free Software Foundation gives 83810f1ac3bcSmrg# unlimited permission to copy and/or distribute it, with or without 83820f1ac3bcSmrg# modifications, as long as this notice is preserved. 8383ff63a143Smrg 8384b0a0317aSmrg# serial 8 ltoptions.m4 8385521070a0Smrg 83860f1ac3bcSmrg# This is to help aclocal find these macros, as it can't see m4_define. 83870f1ac3bcSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 838842d69509Smrg 838942d69509Smrg 83900f1ac3bcSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 83910f1ac3bcSmrg# ------------------------------------------ 83920f1ac3bcSmrgm4_define([_LT_MANGLE_OPTION], 83930f1ac3bcSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 839442d69509Smrg 839542d69509Smrg 83960f1ac3bcSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 83970f1ac3bcSmrg# --------------------------------------- 83980f1ac3bcSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 83990f1ac3bcSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 84000f1ac3bcSmrg# saved as a flag. 84010f1ac3bcSmrgm4_define([_LT_SET_OPTION], 84020f1ac3bcSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 84030f1ac3bcSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 84040f1ac3bcSmrg _LT_MANGLE_DEFUN([$1], [$2]), 8405b0a0317aSmrg [m4_warning([Unknown $1 option '$2'])])[]dnl 84060f1ac3bcSmrg]) 84074456fccdSmrg 840842d69509Smrg 84090f1ac3bcSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 84100f1ac3bcSmrg# ------------------------------------------------------------ 84110f1ac3bcSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 84120f1ac3bcSmrgm4_define([_LT_IF_OPTION], 84130f1ac3bcSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 841442d69509Smrg 841542d69509Smrg 84160f1ac3bcSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 84170f1ac3bcSmrg# ------------------------------------------------------- 84180f1ac3bcSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 84190f1ac3bcSmrg# are set. 84200f1ac3bcSmrgm4_define([_LT_UNLESS_OPTIONS], 84210f1ac3bcSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 84220f1ac3bcSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 84230f1ac3bcSmrg [m4_define([$0_found])])])[]dnl 84240f1ac3bcSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 84250f1ac3bcSmrg])[]dnl 84260f1ac3bcSmrg]) 8427521070a0Smrg 8428521070a0Smrg 84290f1ac3bcSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 84300f1ac3bcSmrg# ---------------------------------------- 84310f1ac3bcSmrg# OPTION-LIST is a space-separated list of Libtool options associated 84320f1ac3bcSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 84330f1ac3bcSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 84340f1ac3bcSmrg# the unknown option and exit. 84350f1ac3bcSmrgm4_defun([_LT_SET_OPTIONS], 84360f1ac3bcSmrg[# Set options 84370f1ac3bcSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 84380f1ac3bcSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 8439521070a0Smrg 84400f1ac3bcSmrgm4_if([$1],[LT_INIT],[ 84410f1ac3bcSmrg dnl 84420f1ac3bcSmrg dnl Simply set some default values (i.e off) if boolean options were not 84430f1ac3bcSmrg dnl specified: 84440f1ac3bcSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 84450f1ac3bcSmrg ]) 84460f1ac3bcSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 84470f1ac3bcSmrg ]) 84480f1ac3bcSmrg dnl 84490f1ac3bcSmrg dnl If no reference was made to various pairs of opposing options, then 84500f1ac3bcSmrg dnl we run the default mode handler for the pair. For example, if neither 8451b0a0317aSmrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 84520f1ac3bcSmrg dnl archives by default: 84530f1ac3bcSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 84540f1ac3bcSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 84550f1ac3bcSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 84560f1ac3bcSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8457b0a0317aSmrg [_LT_ENABLE_FAST_INSTALL]) 8458b0a0317aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 8459b0a0317aSmrg [_LT_WITH_AIX_SONAME([aix])]) 84600f1ac3bcSmrg ]) 84610f1ac3bcSmrg])# _LT_SET_OPTIONS 8462521070a0Smrg 846342d69509Smrg 846442d69509Smrg 84650f1ac3bcSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 84660f1ac3bcSmrg# ----------------------------------------- 84670f1ac3bcSmrgm4_define([_LT_MANGLE_DEFUN], 84680f1ac3bcSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 846942d69509Smrg 847042d69509Smrg 84710f1ac3bcSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 84720f1ac3bcSmrg# ----------------------------------------------- 84730f1ac3bcSmrgm4_define([LT_OPTION_DEFINE], 84740f1ac3bcSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 84750f1ac3bcSmrg])# LT_OPTION_DEFINE 8476ff63a143Smrg 84770f1ac3bcSmrg 84780f1ac3bcSmrg# dlopen 84790f1ac3bcSmrg# ------ 84800f1ac3bcSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 84810f1ac3bcSmrg]) 84820f1ac3bcSmrg 84830f1ac3bcSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 84840f1ac3bcSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 84850f1ac3bcSmrgAC_DIAGNOSE([obsolete], 84860f1ac3bcSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8487b0a0317aSmrgput the 'dlopen' option into LT_INIT's first parameter.]) 84880f1ac3bcSmrg]) 84890f1ac3bcSmrg 84900f1ac3bcSmrgdnl aclocal-1.4 backwards compatibility: 84910f1ac3bcSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 849242d69509Smrg 849342d69509Smrg 84940f1ac3bcSmrg# win32-dll 84950f1ac3bcSmrg# --------- 84960f1ac3bcSmrg# Declare package support for building win32 dll's. 84970f1ac3bcSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 84980f1ac3bcSmrg[enable_win32_dll=yes 849942d69509Smrg 85000f1ac3bcSmrgcase $host in 85010f1ac3bcSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 85020f1ac3bcSmrg AC_CHECK_TOOL(AS, as, false) 85030f1ac3bcSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 85040f1ac3bcSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 85050f1ac3bcSmrg ;; 85060f1ac3bcSmrgesac 850742d69509Smrg 85080f1ac3bcSmrgtest -z "$AS" && AS=as 85090f1ac3bcSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 85104456fccdSmrg 85110f1ac3bcSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 85120f1ac3bcSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8513521070a0Smrg 85140f1ac3bcSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 85150f1ac3bcSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 85160f1ac3bcSmrg])# win32-dll 85174456fccdSmrg 85180f1ac3bcSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 85190f1ac3bcSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 85200f1ac3bcSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 85210f1ac3bcSmrgAC_DIAGNOSE([obsolete], 85220f1ac3bcSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8523b0a0317aSmrgput the 'win32-dll' option into LT_INIT's first parameter.]) 85240f1ac3bcSmrg]) 85254456fccdSmrg 85260f1ac3bcSmrgdnl aclocal-1.4 backwards compatibility: 85270f1ac3bcSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 85284456fccdSmrg 85294456fccdSmrg 85300f1ac3bcSmrg# _LT_ENABLE_SHARED([DEFAULT]) 85310f1ac3bcSmrg# ---------------------------- 8532b0a0317aSmrg# implement the --enable-shared flag, and supports the 'shared' and 8533b0a0317aSmrg# 'disable-shared' LT_INIT options. 8534b0a0317aSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 85350f1ac3bcSmrgm4_define([_LT_ENABLE_SHARED], 85360f1ac3bcSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 85370f1ac3bcSmrgAC_ARG_ENABLE([shared], 85380f1ac3bcSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 85390f1ac3bcSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 85400f1ac3bcSmrg [p=${PACKAGE-default} 85410f1ac3bcSmrg case $enableval in 85420f1ac3bcSmrg yes) enable_shared=yes ;; 85430f1ac3bcSmrg no) enable_shared=no ;; 85440f1ac3bcSmrg *) 85450f1ac3bcSmrg enable_shared=no 85460f1ac3bcSmrg # Look at the argument we got. We use all the common list separators. 8547b0a0317aSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 85480f1ac3bcSmrg for pkg in $enableval; do 8549b0a0317aSmrg IFS=$lt_save_ifs 85500f1ac3bcSmrg if test "X$pkg" = "X$p"; then 85510f1ac3bcSmrg enable_shared=yes 85520f1ac3bcSmrg fi 85530f1ac3bcSmrg done 8554b0a0317aSmrg IFS=$lt_save_ifs 85550f1ac3bcSmrg ;; 85560f1ac3bcSmrg esac], 85570f1ac3bcSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 85584456fccdSmrg 85590f1ac3bcSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 85600f1ac3bcSmrg [Whether or not to build shared libraries]) 85610f1ac3bcSmrg])# _LT_ENABLE_SHARED 85624456fccdSmrg 85630f1ac3bcSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 85640f1ac3bcSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 85654456fccdSmrg 85660f1ac3bcSmrg# Old names: 85670f1ac3bcSmrgAC_DEFUN([AC_ENABLE_SHARED], 85680f1ac3bcSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 85690f1ac3bcSmrg]) 85704456fccdSmrg 85710f1ac3bcSmrgAC_DEFUN([AC_DISABLE_SHARED], 85720f1ac3bcSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 85730f1ac3bcSmrg]) 85743e6c936aSmrg 85750f1ac3bcSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 85760f1ac3bcSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 85774456fccdSmrg 85780f1ac3bcSmrgdnl aclocal-1.4 backwards compatibility: 85790f1ac3bcSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 85800f1ac3bcSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 85814456fccdSmrg 85824456fccdSmrg 8583ff63a143Smrg 85840f1ac3bcSmrg# _LT_ENABLE_STATIC([DEFAULT]) 85850f1ac3bcSmrg# ---------------------------- 8586b0a0317aSmrg# implement the --enable-static flag, and support the 'static' and 8587b0a0317aSmrg# 'disable-static' LT_INIT options. 8588b0a0317aSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 85890f1ac3bcSmrgm4_define([_LT_ENABLE_STATIC], 85900f1ac3bcSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 85910f1ac3bcSmrgAC_ARG_ENABLE([static], 85920f1ac3bcSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 85930f1ac3bcSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 85940f1ac3bcSmrg [p=${PACKAGE-default} 85950f1ac3bcSmrg case $enableval in 85960f1ac3bcSmrg yes) enable_static=yes ;; 85970f1ac3bcSmrg no) enable_static=no ;; 85980f1ac3bcSmrg *) 85990f1ac3bcSmrg enable_static=no 86000f1ac3bcSmrg # Look at the argument we got. We use all the common list separators. 8601b0a0317aSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 86020f1ac3bcSmrg for pkg in $enableval; do 8603b0a0317aSmrg IFS=$lt_save_ifs 86040f1ac3bcSmrg if test "X$pkg" = "X$p"; then 86050f1ac3bcSmrg enable_static=yes 86060f1ac3bcSmrg fi 86070f1ac3bcSmrg done 8608b0a0317aSmrg IFS=$lt_save_ifs 86090f1ac3bcSmrg ;; 86100f1ac3bcSmrg esac], 86110f1ac3bcSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8612ff63a143Smrg 86130f1ac3bcSmrg _LT_DECL([build_old_libs], [enable_static], [0], 86140f1ac3bcSmrg [Whether or not to build static libraries]) 86150f1ac3bcSmrg])# _LT_ENABLE_STATIC 8616ff63a143Smrg 86170f1ac3bcSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 86180f1ac3bcSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8619ff63a143Smrg 86200f1ac3bcSmrg# Old names: 86210f1ac3bcSmrgAC_DEFUN([AC_ENABLE_STATIC], 86220f1ac3bcSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 86230f1ac3bcSmrg]) 8624ff63a143Smrg 86250f1ac3bcSmrgAC_DEFUN([AC_DISABLE_STATIC], 86260f1ac3bcSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 86270f1ac3bcSmrg]) 8628ff63a143Smrg 86290f1ac3bcSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 86300f1ac3bcSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8631ff63a143Smrg 86320f1ac3bcSmrgdnl aclocal-1.4 backwards compatibility: 86330f1ac3bcSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 86340f1ac3bcSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8635ff63a143Smrg 8636521070a0Smrg 8637521070a0Smrg 86380f1ac3bcSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 86390f1ac3bcSmrg# ---------------------------------- 8640b0a0317aSmrg# implement the --enable-fast-install flag, and support the 'fast-install' 8641b0a0317aSmrg# and 'disable-fast-install' LT_INIT options. 8642b0a0317aSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 86430f1ac3bcSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 86440f1ac3bcSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 86450f1ac3bcSmrgAC_ARG_ENABLE([fast-install], 86460f1ac3bcSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 86470f1ac3bcSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 86480f1ac3bcSmrg [p=${PACKAGE-default} 86490f1ac3bcSmrg case $enableval in 86500f1ac3bcSmrg yes) enable_fast_install=yes ;; 86510f1ac3bcSmrg no) enable_fast_install=no ;; 86520f1ac3bcSmrg *) 86530f1ac3bcSmrg enable_fast_install=no 86540f1ac3bcSmrg # Look at the argument we got. We use all the common list separators. 8655b0a0317aSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 86560f1ac3bcSmrg for pkg in $enableval; do 8657b0a0317aSmrg IFS=$lt_save_ifs 86580f1ac3bcSmrg if test "X$pkg" = "X$p"; then 86590f1ac3bcSmrg enable_fast_install=yes 86600f1ac3bcSmrg fi 86610f1ac3bcSmrg done 8662b0a0317aSmrg IFS=$lt_save_ifs 86630f1ac3bcSmrg ;; 86640f1ac3bcSmrg esac], 86650f1ac3bcSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 86664456fccdSmrg 86670f1ac3bcSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 86680f1ac3bcSmrg [Whether or not to optimize for fast installation])dnl 86690f1ac3bcSmrg])# _LT_ENABLE_FAST_INSTALL 86704456fccdSmrg 86710f1ac3bcSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 86720f1ac3bcSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 86734456fccdSmrg 86740f1ac3bcSmrg# Old names: 86750f1ac3bcSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 86760f1ac3bcSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 86770f1ac3bcSmrgAC_DIAGNOSE([obsolete], 86780f1ac3bcSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8679b0a0317aSmrgthe 'fast-install' option into LT_INIT's first parameter.]) 86803e6c936aSmrg]) 8681521070a0Smrg 86820f1ac3bcSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 86830f1ac3bcSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 86840f1ac3bcSmrgAC_DIAGNOSE([obsolete], 86850f1ac3bcSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8686b0a0317aSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 86873e6c936aSmrg]) 8688521070a0Smrg 86893e6c936aSmrgdnl aclocal-1.4 backwards compatibility: 86900f1ac3bcSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 86910f1ac3bcSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8692521070a0Smrg 8693521070a0Smrg 8694b0a0317aSmrg# _LT_WITH_AIX_SONAME([DEFAULT]) 8695b0a0317aSmrg# ---------------------------------- 8696b0a0317aSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 8697b0a0317aSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 8698b0a0317aSmrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 8699b0a0317aSmrgm4_define([_LT_WITH_AIX_SONAME], 8700b0a0317aSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 8701b0a0317aSmrgshared_archive_member_spec= 8702b0a0317aSmrgcase $host,$enable_shared in 8703b0a0317aSmrgpower*-*-aix[[5-9]]*,yes) 8704b0a0317aSmrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 8705b0a0317aSmrg AC_ARG_WITH([aix-soname], 8706b0a0317aSmrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 8707b0a0317aSmrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 8708b0a0317aSmrg [case $withval in 8709b0a0317aSmrg aix|svr4|both) 8710b0a0317aSmrg ;; 8711b0a0317aSmrg *) 8712b0a0317aSmrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 8713b0a0317aSmrg ;; 8714b0a0317aSmrg esac 8715b0a0317aSmrg lt_cv_with_aix_soname=$with_aix_soname], 8716b0a0317aSmrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 8717b0a0317aSmrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 8718b0a0317aSmrg with_aix_soname=$lt_cv_with_aix_soname]) 8719b0a0317aSmrg AC_MSG_RESULT([$with_aix_soname]) 8720b0a0317aSmrg if test aix != "$with_aix_soname"; then 8721b0a0317aSmrg # For the AIX way of multilib, we name the shared archive member 8722b0a0317aSmrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 8723b0a0317aSmrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 8724b0a0317aSmrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 8725b0a0317aSmrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 8726b0a0317aSmrg if test 64 = "${OBJECT_MODE-32}"; then 8727b0a0317aSmrg shared_archive_member_spec=shr_64 8728b0a0317aSmrg else 8729b0a0317aSmrg shared_archive_member_spec=shr 8730b0a0317aSmrg fi 8731b0a0317aSmrg fi 8732b0a0317aSmrg ;; 8733b0a0317aSmrg*) 8734b0a0317aSmrg with_aix_soname=aix 8735b0a0317aSmrg ;; 8736b0a0317aSmrgesac 8737b0a0317aSmrg 8738b0a0317aSmrg_LT_DECL([], [shared_archive_member_spec], [0], 8739b0a0317aSmrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 8740b0a0317aSmrg])# _LT_WITH_AIX_SONAME 8741b0a0317aSmrg 8742b0a0317aSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 8743b0a0317aSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 8744b0a0317aSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 8745b0a0317aSmrg 8746b0a0317aSmrg 87470f1ac3bcSmrg# _LT_WITH_PIC([MODE]) 87480f1ac3bcSmrg# -------------------- 8749b0a0317aSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 87500f1ac3bcSmrg# LT_INIT options. 8751b0a0317aSmrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 87520f1ac3bcSmrgm4_define([_LT_WITH_PIC], 87530f1ac3bcSmrg[AC_ARG_WITH([pic], 87540f1ac3bcSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 87550f1ac3bcSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 87560f1ac3bcSmrg [lt_p=${PACKAGE-default} 87570f1ac3bcSmrg case $withval in 87580f1ac3bcSmrg yes|no) pic_mode=$withval ;; 87590f1ac3bcSmrg *) 87600f1ac3bcSmrg pic_mode=default 87610f1ac3bcSmrg # Look at the argument we got. We use all the common list separators. 8762b0a0317aSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 87630f1ac3bcSmrg for lt_pkg in $withval; do 8764b0a0317aSmrg IFS=$lt_save_ifs 87650f1ac3bcSmrg if test "X$lt_pkg" = "X$lt_p"; then 87660f1ac3bcSmrg pic_mode=yes 87670f1ac3bcSmrg fi 87680f1ac3bcSmrg done 8769b0a0317aSmrg IFS=$lt_save_ifs 87700f1ac3bcSmrg ;; 87710f1ac3bcSmrg esac], 8772b0a0317aSmrg [pic_mode=m4_default([$1], [default])]) 8773521070a0Smrg 87740f1ac3bcSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 87750f1ac3bcSmrg])# _LT_WITH_PIC 8776521070a0Smrg 87770f1ac3bcSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 87780f1ac3bcSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8779521070a0Smrg 87800f1ac3bcSmrg# Old name: 87810f1ac3bcSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 87820f1ac3bcSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 87830f1ac3bcSmrgAC_DIAGNOSE([obsolete], 87840f1ac3bcSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8785b0a0317aSmrgput the 'pic-only' option into LT_INIT's first parameter.]) 8786ff63a143Smrg]) 8787521070a0Smrg 87883e6c936aSmrgdnl aclocal-1.4 backwards compatibility: 87890f1ac3bcSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 87903e6c936aSmrg 8791ff63a143Smrg 87920f1ac3bcSmrgm4_define([_LTDL_MODE], []) 87930f1ac3bcSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 87940f1ac3bcSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 87950f1ac3bcSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 87960f1ac3bcSmrg [m4_define([_LTDL_MODE], [recursive])]) 87970f1ac3bcSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 87980f1ac3bcSmrg [m4_define([_LTDL_MODE], [subproject])]) 8799ff63a143Smrg 88000f1ac3bcSmrgm4_define([_LTDL_TYPE], []) 88010f1ac3bcSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 88020f1ac3bcSmrg [m4_define([_LTDL_TYPE], [installable])]) 88030f1ac3bcSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 88040f1ac3bcSmrg [m4_define([_LTDL_TYPE], [convenience])]) 8805ff63a143Smrg 88060f1ac3bcSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 88070f1ac3bcSmrg# 8808b0a0317aSmrg# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 8809b0a0317aSmrg# Foundation, Inc. 88100f1ac3bcSmrg# Written by Gary V. Vaughan, 2004 88110f1ac3bcSmrg# 88120f1ac3bcSmrg# This file is free software; the Free Software Foundation gives 88130f1ac3bcSmrg# unlimited permission to copy and/or distribute it, with or without 88140f1ac3bcSmrg# modifications, as long as this notice is preserved. 8815521070a0Smrg 88160f1ac3bcSmrg# serial 6 ltsugar.m4 88173e6c936aSmrg 88180f1ac3bcSmrg# This is to help aclocal find these macros, as it can't see m4_define. 88190f1ac3bcSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 88203e6c936aSmrg 8821521070a0Smrg 88220f1ac3bcSmrg# lt_join(SEP, ARG1, [ARG2...]) 88230f1ac3bcSmrg# ----------------------------- 88240f1ac3bcSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 88250f1ac3bcSmrg# associated separator. 88260f1ac3bcSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 88270f1ac3bcSmrg# versions in m4sugar had bugs. 88280f1ac3bcSmrgm4_define([lt_join], 88290f1ac3bcSmrg[m4_if([$#], [1], [], 88300f1ac3bcSmrg [$#], [2], [[$2]], 88310f1ac3bcSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 88320f1ac3bcSmrgm4_define([_lt_join], 88330f1ac3bcSmrg[m4_if([$#$2], [2], [], 88340f1ac3bcSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 88353e6c936aSmrg 88363e6c936aSmrg 88370f1ac3bcSmrg# lt_car(LIST) 88380f1ac3bcSmrg# lt_cdr(LIST) 88390f1ac3bcSmrg# ------------ 88400f1ac3bcSmrg# Manipulate m4 lists. 88410f1ac3bcSmrg# These macros are necessary as long as will still need to support 8842b0a0317aSmrg# Autoconf-2.59, which quotes differently. 88430f1ac3bcSmrgm4_define([lt_car], [[$1]]) 88440f1ac3bcSmrgm4_define([lt_cdr], 88450f1ac3bcSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 88460f1ac3bcSmrg [$#], 1, [], 88470f1ac3bcSmrg [m4_dquote(m4_shift($@))])]) 88480f1ac3bcSmrgm4_define([lt_unquote], $1) 88493e6c936aSmrg 88503e6c936aSmrg 88510f1ac3bcSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 88520f1ac3bcSmrg# ------------------------------------------ 8853b0a0317aSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 88540f1ac3bcSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 88550f1ac3bcSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 88560f1ac3bcSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 88570f1ac3bcSmrg# than defined and empty). 88580f1ac3bcSmrg# 88590f1ac3bcSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 88600f1ac3bcSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 88610f1ac3bcSmrgm4_define([lt_append], 88620f1ac3bcSmrg[m4_define([$1], 88630f1ac3bcSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 88643e6c936aSmrg 88653e6c936aSmrg 8866521070a0Smrg 88670f1ac3bcSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 88680f1ac3bcSmrg# ---------------------------------------------------------- 88690f1ac3bcSmrg# Produce a SEP delimited list of all paired combinations of elements of 88700f1ac3bcSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 88710f1ac3bcSmrg# has the form PREFIXmINFIXSUFFIXn. 88720f1ac3bcSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 88730f1ac3bcSmrgm4_define([lt_combine], 88740f1ac3bcSmrg[m4_if(m4_eval([$# > 3]), [1], 88750f1ac3bcSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 88760f1ac3bcSmrg[[m4_foreach([_Lt_prefix], [$2], 88770f1ac3bcSmrg [m4_foreach([_Lt_suffix], 88780f1ac3bcSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 88790f1ac3bcSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8880521070a0Smrg 8881521070a0Smrg 88820f1ac3bcSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 88830f1ac3bcSmrg# ----------------------------------------------------------------------- 88840f1ac3bcSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 88850f1ac3bcSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 88860f1ac3bcSmrgm4_define([lt_if_append_uniq], 88870f1ac3bcSmrg[m4_ifdef([$1], 88880f1ac3bcSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 88890f1ac3bcSmrg [lt_append([$1], [$2], [$3])$4], 88900f1ac3bcSmrg [$5])], 88910f1ac3bcSmrg [lt_append([$1], [$2], [$3])$4])]) 8892521070a0Smrg 8893521070a0Smrg 88940f1ac3bcSmrg# lt_dict_add(DICT, KEY, VALUE) 88953e6c936aSmrg# ----------------------------- 88960f1ac3bcSmrgm4_define([lt_dict_add], 88970f1ac3bcSmrg[m4_define([$1($2)], [$3])]) 88983e6c936aSmrg 88993e6c936aSmrg 89000f1ac3bcSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 89010f1ac3bcSmrg# -------------------------------------------- 89020f1ac3bcSmrgm4_define([lt_dict_add_subkey], 89030f1ac3bcSmrg[m4_define([$1($2:$3)], [$4])]) 8904521070a0Smrg 8905521070a0Smrg 89060f1ac3bcSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 89070f1ac3bcSmrg# ---------------------------------- 89080f1ac3bcSmrgm4_define([lt_dict_fetch], 89090f1ac3bcSmrg[m4_ifval([$3], 89100f1ac3bcSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 89110f1ac3bcSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8912521070a0Smrg 8913521070a0Smrg 89140f1ac3bcSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 89150f1ac3bcSmrg# ----------------------------------------------------------------- 89160f1ac3bcSmrgm4_define([lt_if_dict_fetch], 89170f1ac3bcSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 89180f1ac3bcSmrg [$5], 89190f1ac3bcSmrg [$6])]) 8920521070a0Smrg 8921521070a0Smrg 89220f1ac3bcSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 89230f1ac3bcSmrg# -------------------------------------------------------------- 89240f1ac3bcSmrgm4_define([lt_dict_filter], 89250f1ac3bcSmrg[m4_if([$5], [], [], 89260f1ac3bcSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 89270f1ac3bcSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 89280f1ac3bcSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 89293e6c936aSmrg]) 8930521070a0Smrg 89310f1ac3bcSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 89320f1ac3bcSmrg# 8933b0a0317aSmrg# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 89340f1ac3bcSmrg# Written by Scott James Remnant, 2004 89350f1ac3bcSmrg# 89360f1ac3bcSmrg# This file is free software; the Free Software Foundation gives 89370f1ac3bcSmrg# unlimited permission to copy and/or distribute it, with or without 89380f1ac3bcSmrg# modifications, as long as this notice is preserved. 8939521070a0Smrg 89400f1ac3bcSmrg# @configure_input@ 89413e6c936aSmrg 8942b0a0317aSmrg# serial 4179 ltversion.m4 89430f1ac3bcSmrg# This file is part of GNU Libtool 89443e6c936aSmrg 8945b0a0317aSmrgm4_define([LT_PACKAGE_VERSION], [2.4.6]) 8946b0a0317aSmrgm4_define([LT_PACKAGE_REVISION], [2.4.6]) 8947521070a0Smrg 89480f1ac3bcSmrgAC_DEFUN([LTVERSION_VERSION], 8949b0a0317aSmrg[macro_version='2.4.6' 8950b0a0317aSmrgmacro_revision='2.4.6' 89510f1ac3bcSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 89520f1ac3bcSmrg_LT_DECL(, macro_revision, 0) 89530f1ac3bcSmrg]) 8954521070a0Smrg 89550f1ac3bcSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 89560f1ac3bcSmrg# 8957b0a0317aSmrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 8958b0a0317aSmrg# Foundation, Inc. 89590f1ac3bcSmrg# Written by Scott James Remnant, 2004. 89600f1ac3bcSmrg# 89610f1ac3bcSmrg# This file is free software; the Free Software Foundation gives 89620f1ac3bcSmrg# unlimited permission to copy and/or distribute it, with or without 89630f1ac3bcSmrg# modifications, as long as this notice is preserved. 8964521070a0Smrg 89650f1ac3bcSmrg# serial 5 lt~obsolete.m4 8966521070a0Smrg 89670f1ac3bcSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 89680f1ac3bcSmrg# 8969b0a0317aSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 89700f1ac3bcSmrg# which have later been changed to m4_define as they aren't part of the 89710f1ac3bcSmrg# exported API, or moved to Autoconf or Automake where they belong. 89720f1ac3bcSmrg# 89730f1ac3bcSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 89740f1ac3bcSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 89750f1ac3bcSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 89760f1ac3bcSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 89770f1ac3bcSmrg# and doesn't know about Autoconf macros at all.) 89780f1ac3bcSmrg# 89790f1ac3bcSmrg# So we provide this file, which has a silly filename so it's always 89800f1ac3bcSmrg# included after everything else. This provides aclocal with the 89810f1ac3bcSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 89820f1ac3bcSmrg# because those macros already exist, or will be overwritten later. 8983b0a0317aSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 89840f1ac3bcSmrg# 89850f1ac3bcSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 89860f1ac3bcSmrg# Yes, that means every name once taken will need to remain here until 89870f1ac3bcSmrg# we give up compatibility with versions before 1.7, at which point 89880f1ac3bcSmrg# we need to keep only those names which we still refer to. 8989521070a0Smrg 89900f1ac3bcSmrg# This is to help aclocal find these macros, as it can't see m4_define. 89910f1ac3bcSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 8992ff63a143Smrg 89930f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 89940f1ac3bcSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 89950f1ac3bcSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 89960f1ac3bcSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 89970f1ac3bcSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 89980f1ac3bcSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 89990f1ac3bcSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 90000f1ac3bcSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 90010f1ac3bcSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 90020f1ac3bcSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 90030f1ac3bcSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 90040f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 90050f1ac3bcSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 90060f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 90070f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 90080f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 90090f1ac3bcSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 90100f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 90110f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 90120f1ac3bcSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 90130f1ac3bcSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 90140f1ac3bcSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 90150f1ac3bcSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 90160f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 90170f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 90180f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 90190f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 90200f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 90210f1ac3bcSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 90220f1ac3bcSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 90230f1ac3bcSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 90240f1ac3bcSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 90250f1ac3bcSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 90260f1ac3bcSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 90270f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 90280f1ac3bcSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 90290f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 90300f1ac3bcSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 90310f1ac3bcSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 90320f1ac3bcSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 90330f1ac3bcSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 90340f1ac3bcSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 90350f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 90360f1ac3bcSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 90370f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 90380f1ac3bcSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 90390f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 90400f1ac3bcSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 90410f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 90420f1ac3bcSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 90430f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 90440f1ac3bcSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 90450f1ac3bcSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 90460f1ac3bcSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 90470f1ac3bcSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 90480f1ac3bcSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 90490f1ac3bcSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 90500f1ac3bcSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 90510f1ac3bcSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 90520f1ac3bcSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 90530f1ac3bcSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9054521070a0Smrg 9055b0a0317aSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9056b0a0317aSmrg# serial 11 (pkg-config-0.29.1) 9057521070a0Smrg 9058b0a0317aSmrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9059b0a0317aSmrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 9060b0a0317aSmrgdnl 9061b0a0317aSmrgdnl This program is free software; you can redistribute it and/or modify 9062b0a0317aSmrgdnl it under the terms of the GNU General Public License as published by 9063b0a0317aSmrgdnl the Free Software Foundation; either version 2 of the License, or 9064b0a0317aSmrgdnl (at your option) any later version. 9065b0a0317aSmrgdnl 9066b0a0317aSmrgdnl This program is distributed in the hope that it will be useful, but 9067b0a0317aSmrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 9068b0a0317aSmrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9069b0a0317aSmrgdnl General Public License for more details. 9070b0a0317aSmrgdnl 9071b0a0317aSmrgdnl You should have received a copy of the GNU General Public License 9072b0a0317aSmrgdnl along with this program; if not, write to the Free Software 9073b0a0317aSmrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 9074b0a0317aSmrgdnl 02111-1307, USA. 9075b0a0317aSmrgdnl 9076b0a0317aSmrgdnl As a special exception to the GNU General Public License, if you 9077b0a0317aSmrgdnl distribute this file as part of a program that contains a 9078b0a0317aSmrgdnl configuration script generated by Autoconf, you may include it under 9079b0a0317aSmrgdnl the same distribution terms that you use for the rest of that 9080b0a0317aSmrgdnl program. 9081b0a0317aSmrg 9082b0a0317aSmrgdnl PKG_PREREQ(MIN-VERSION) 9083b0a0317aSmrgdnl ----------------------- 9084b0a0317aSmrgdnl Since: 0.29 9085b0a0317aSmrgdnl 9086b0a0317aSmrgdnl Verify that the version of the pkg-config macros are at least 9087b0a0317aSmrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 9088b0a0317aSmrgdnl installed version of pkg-config, this checks the developer's version 9089b0a0317aSmrgdnl of pkg.m4 when generating configure. 9090b0a0317aSmrgdnl 9091b0a0317aSmrgdnl To ensure that this macro is defined, also add: 9092b0a0317aSmrgdnl m4_ifndef([PKG_PREREQ], 9093b0a0317aSmrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 9094b0a0317aSmrgdnl 9095b0a0317aSmrgdnl See the "Since" comment for each macro you use to see what version 9096b0a0317aSmrgdnl of the macros you require. 9097b0a0317aSmrgm4_defun([PKG_PREREQ], 9098b0a0317aSmrg[m4_define([PKG_MACROS_VERSION], [0.29.1]) 9099b0a0317aSmrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 9100b0a0317aSmrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 9101b0a0317aSmrg])dnl PKG_PREREQ 9102b0a0317aSmrg 9103b0a0317aSmrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9104b0a0317aSmrgdnl ---------------------------------- 9105b0a0317aSmrgdnl Since: 0.16 9106b0a0317aSmrgdnl 9107b0a0317aSmrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 9108b0a0317aSmrgdnl first found in the path. Checks that the version of pkg-config found 9109b0a0317aSmrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 9110b0a0317aSmrgdnl used since that's the first version where most current features of 9111b0a0317aSmrgdnl pkg-config existed. 91120f1ac3bcSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 91130f1ac3bcSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 91140f1ac3bcSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 91150f1ac3bcSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 91160f1ac3bcSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 91170f1ac3bcSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 91180f1ac3bcSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9119521070a0Smrg 91200f1ac3bcSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 91210f1ac3bcSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 91220f1ac3bcSmrgfi 91230f1ac3bcSmrgif test -n "$PKG_CONFIG"; then 91240f1ac3bcSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 91250f1ac3bcSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 91260f1ac3bcSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 91270f1ac3bcSmrg AC_MSG_RESULT([yes]) 91280f1ac3bcSmrg else 91290f1ac3bcSmrg AC_MSG_RESULT([no]) 91300f1ac3bcSmrg PKG_CONFIG="" 91310f1ac3bcSmrg fi 91320f1ac3bcSmrgfi[]dnl 9133b0a0317aSmrg])dnl PKG_PROG_PKG_CONFIG 9134521070a0Smrg 9135b0a0317aSmrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9136b0a0317aSmrgdnl ------------------------------------------------------------------- 9137b0a0317aSmrgdnl Since: 0.18 9138b0a0317aSmrgdnl 9139b0a0317aSmrgdnl Check to see whether a particular set of modules exists. Similar to 9140b0a0317aSmrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 9141b0a0317aSmrgdnl 9142b0a0317aSmrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9143b0a0317aSmrgdnl only at the first occurence in configure.ac, so if the first place 9144b0a0317aSmrgdnl it's called might be skipped (such as if it is within an "if", you 9145b0a0317aSmrgdnl have to call PKG_CHECK_EXISTS manually 91460f1ac3bcSmrgAC_DEFUN([PKG_CHECK_EXISTS], 91470f1ac3bcSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 91480f1ac3bcSmrgif test -n "$PKG_CONFIG" && \ 91490f1ac3bcSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 91500f1ac3bcSmrg m4_default([$2], [:]) 91510f1ac3bcSmrgm4_ifvaln([$3], [else 91520f1ac3bcSmrg $3])dnl 91530f1ac3bcSmrgfi]) 9154521070a0Smrg 9155b0a0317aSmrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9156b0a0317aSmrgdnl --------------------------------------------- 9157b0a0317aSmrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 9158b0a0317aSmrgdnl pkg_failed based on the result. 91590f1ac3bcSmrgm4_define([_PKG_CONFIG], 91600f1ac3bcSmrg[if test -n "$$1"; then 91610f1ac3bcSmrg pkg_cv_[]$1="$$1" 91620f1ac3bcSmrg elif test -n "$PKG_CONFIG"; then 91630f1ac3bcSmrg PKG_CHECK_EXISTS([$3], 91640f1ac3bcSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 91650f1ac3bcSmrg test "x$?" != "x0" && pkg_failed=yes ], 91660f1ac3bcSmrg [pkg_failed=yes]) 91670f1ac3bcSmrg else 91680f1ac3bcSmrg pkg_failed=untried 91690f1ac3bcSmrgfi[]dnl 9170b0a0317aSmrg])dnl _PKG_CONFIG 9171521070a0Smrg 9172b0a0317aSmrgdnl _PKG_SHORT_ERRORS_SUPPORTED 9173b0a0317aSmrgdnl --------------------------- 9174b0a0317aSmrgdnl Internal check to see if pkg-config supports short errors. 91750f1ac3bcSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 91760f1ac3bcSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 91770f1ac3bcSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 91780f1ac3bcSmrg _pkg_short_errors_supported=yes 91790f1ac3bcSmrgelse 91800f1ac3bcSmrg _pkg_short_errors_supported=no 91810f1ac3bcSmrgfi[]dnl 9182b0a0317aSmrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 9183521070a0Smrg 9184521070a0Smrg 9185b0a0317aSmrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9186b0a0317aSmrgdnl [ACTION-IF-NOT-FOUND]) 9187b0a0317aSmrgdnl -------------------------------------------------------------- 9188b0a0317aSmrgdnl Since: 0.4.0 9189b0a0317aSmrgdnl 9190b0a0317aSmrgdnl Note that if there is a possibility the first call to 9191b0a0317aSmrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 9192b0a0317aSmrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 91930f1ac3bcSmrgAC_DEFUN([PKG_CHECK_MODULES], 91940f1ac3bcSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 91950f1ac3bcSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 91960f1ac3bcSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9197521070a0Smrg 91980f1ac3bcSmrgpkg_failed=no 91990f1ac3bcSmrgAC_MSG_CHECKING([for $1]) 9200521070a0Smrg 92010f1ac3bcSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 92020f1ac3bcSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9203521070a0Smrg 92040f1ac3bcSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 92050f1ac3bcSmrgand $1[]_LIBS to avoid the need to call pkg-config. 92060f1ac3bcSmrgSee the pkg-config man page for more details.]) 9207521070a0Smrg 92080f1ac3bcSmrgif test $pkg_failed = yes; then 92090f1ac3bcSmrg AC_MSG_RESULT([no]) 92100f1ac3bcSmrg _PKG_SHORT_ERRORS_SUPPORTED 92110f1ac3bcSmrg if test $_pkg_short_errors_supported = yes; then 92120f1ac3bcSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 92130f1ac3bcSmrg else 92140f1ac3bcSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 92150f1ac3bcSmrg fi 92160f1ac3bcSmrg # Put the nasty error message in config.log where it belongs 92170f1ac3bcSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9218521070a0Smrg 92190f1ac3bcSmrg m4_default([$4], [AC_MSG_ERROR( 92200f1ac3bcSmrg[Package requirements ($2) were not met: 9221521070a0Smrg 92220f1ac3bcSmrg$$1_PKG_ERRORS 9223521070a0Smrg 92240f1ac3bcSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 92250f1ac3bcSmrginstalled software in a non-standard prefix. 9226521070a0Smrg 92270f1ac3bcSmrg_PKG_TEXT])[]dnl 92280f1ac3bcSmrg ]) 92290f1ac3bcSmrgelif test $pkg_failed = untried; then 92300f1ac3bcSmrg AC_MSG_RESULT([no]) 92310f1ac3bcSmrg m4_default([$4], [AC_MSG_FAILURE( 92320f1ac3bcSmrg[The pkg-config script could not be found or is too old. Make sure it 92330f1ac3bcSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 92340f1ac3bcSmrgpath to pkg-config. 92354456fccdSmrg 92360f1ac3bcSmrg_PKG_TEXT 92374456fccdSmrg 92380f1ac3bcSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 92390f1ac3bcSmrg ]) 92400f1ac3bcSmrgelse 92410f1ac3bcSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 92420f1ac3bcSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 92430f1ac3bcSmrg AC_MSG_RESULT([yes]) 92440f1ac3bcSmrg $3 92450f1ac3bcSmrgfi[]dnl 9246b0a0317aSmrg])dnl PKG_CHECK_MODULES 9247b0a0317aSmrg 9248b0a0317aSmrg 9249b0a0317aSmrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9250b0a0317aSmrgdnl [ACTION-IF-NOT-FOUND]) 9251b0a0317aSmrgdnl --------------------------------------------------------------------- 9252b0a0317aSmrgdnl Since: 0.29 9253b0a0317aSmrgdnl 9254b0a0317aSmrgdnl Checks for existence of MODULES and gathers its build flags with 9255b0a0317aSmrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 9256b0a0317aSmrgdnl and VARIABLE-PREFIX_LIBS from --libs. 9257b0a0317aSmrgdnl 9258b0a0317aSmrgdnl Note that if there is a possibility the first call to 9259b0a0317aSmrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 9260b0a0317aSmrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 9261b0a0317aSmrgdnl configure.ac. 9262b0a0317aSmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 9263b0a0317aSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9264b0a0317aSmrg_save_PKG_CONFIG=$PKG_CONFIG 9265b0a0317aSmrgPKG_CONFIG="$PKG_CONFIG --static" 9266b0a0317aSmrgPKG_CHECK_MODULES($@) 9267b0a0317aSmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 9268b0a0317aSmrg])dnl PKG_CHECK_MODULES_STATIC 9269b0a0317aSmrg 9270b0a0317aSmrg 9271b0a0317aSmrgdnl PKG_INSTALLDIR([DIRECTORY]) 9272b0a0317aSmrgdnl ------------------------- 9273b0a0317aSmrgdnl Since: 0.27 9274b0a0317aSmrgdnl 9275b0a0317aSmrgdnl Substitutes the variable pkgconfigdir as the location where a module 9276b0a0317aSmrgdnl should install pkg-config .pc files. By default the directory is 9277b0a0317aSmrgdnl $libdir/pkgconfig, but the default can be changed by passing 9278b0a0317aSmrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 9279b0a0317aSmrgdnl parameter. 9280b0a0317aSmrgAC_DEFUN([PKG_INSTALLDIR], 9281b0a0317aSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 9282b0a0317aSmrgm4_pushdef([pkg_description], 9283b0a0317aSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 9284b0a0317aSmrgAC_ARG_WITH([pkgconfigdir], 9285b0a0317aSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 9286b0a0317aSmrg [with_pkgconfigdir=]pkg_default) 9287b0a0317aSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 9288b0a0317aSmrgm4_popdef([pkg_default]) 9289b0a0317aSmrgm4_popdef([pkg_description]) 9290b0a0317aSmrg])dnl PKG_INSTALLDIR 9291b0a0317aSmrg 9292b0a0317aSmrg 9293b0a0317aSmrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 9294b0a0317aSmrgdnl -------------------------------- 9295b0a0317aSmrgdnl Since: 0.27 9296b0a0317aSmrgdnl 9297b0a0317aSmrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 9298b0a0317aSmrgdnl module should install arch-independent pkg-config .pc files. By 9299b0a0317aSmrgdnl default the directory is $datadir/pkgconfig, but the default can be 9300b0a0317aSmrgdnl changed by passing DIRECTORY. The user can override through the 9301b0a0317aSmrgdnl --with-noarch-pkgconfigdir parameter. 9302b0a0317aSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 9303b0a0317aSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 9304b0a0317aSmrgm4_pushdef([pkg_description], 9305b0a0317aSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 9306b0a0317aSmrgAC_ARG_WITH([noarch-pkgconfigdir], 9307b0a0317aSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 9308b0a0317aSmrg [with_noarch_pkgconfigdir=]pkg_default) 9309b0a0317aSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 9310b0a0317aSmrgm4_popdef([pkg_default]) 9311b0a0317aSmrgm4_popdef([pkg_description]) 9312b0a0317aSmrg])dnl PKG_NOARCH_INSTALLDIR 9313b0a0317aSmrg 9314b0a0317aSmrg 9315b0a0317aSmrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 9316b0a0317aSmrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9317b0a0317aSmrgdnl ------------------------------------------- 9318b0a0317aSmrgdnl Since: 0.28 9319b0a0317aSmrgdnl 9320b0a0317aSmrgdnl Retrieves the value of the pkg-config variable for the given module. 9321b0a0317aSmrgAC_DEFUN([PKG_CHECK_VAR], 9322b0a0317aSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9323b0a0317aSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 9324b0a0317aSmrg 9325b0a0317aSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 9326b0a0317aSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 9327b0a0317aSmrg 9328b0a0317aSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 9329b0a0317aSmrg])dnl PKG_CHECK_VAR 9330b0a0317aSmrg 9331b0a0317aSmrgdnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9332b0a0317aSmrgdnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], 9333b0a0317aSmrgdnl [DESCRIPTION], [DEFAULT]) 9334b0a0317aSmrgdnl ------------------------------------------ 9335b0a0317aSmrgdnl 9336b0a0317aSmrgdnl Prepare a "--with-" configure option using the lowercase 9337b0a0317aSmrgdnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and 9338b0a0317aSmrgdnl PKG_CHECK_MODULES in a single macro. 9339b0a0317aSmrgAC_DEFUN([PKG_WITH_MODULES], 9340b0a0317aSmrg[ 9341b0a0317aSmrgm4_pushdef([with_arg], m4_tolower([$1])) 9342b0a0317aSmrg 9343b0a0317aSmrgm4_pushdef([description], 9344b0a0317aSmrg [m4_default([$5], [build with ]with_arg[ support])]) 9345b0a0317aSmrg 9346b0a0317aSmrgm4_pushdef([def_arg], [m4_default([$6], [auto])]) 9347b0a0317aSmrgm4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) 9348b0a0317aSmrgm4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) 9349b0a0317aSmrg 9350b0a0317aSmrgm4_case(def_arg, 9351b0a0317aSmrg [yes],[m4_pushdef([with_without], [--without-]with_arg)], 9352b0a0317aSmrg [m4_pushdef([with_without],[--with-]with_arg)]) 9353b0a0317aSmrg 9354b0a0317aSmrgAC_ARG_WITH(with_arg, 9355b0a0317aSmrg AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, 9356b0a0317aSmrg [AS_TR_SH([with_]with_arg)=def_arg]) 93574456fccdSmrg 9358b0a0317aSmrgAS_CASE([$AS_TR_SH([with_]with_arg)], 9359b0a0317aSmrg [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], 9360b0a0317aSmrg [auto],[PKG_CHECK_MODULES([$1],[$2], 9361b0a0317aSmrg [m4_n([def_action_if_found]) $3], 9362b0a0317aSmrg [m4_n([def_action_if_not_found]) $4])]) 9363b0a0317aSmrg 9364b0a0317aSmrgm4_popdef([with_arg]) 9365b0a0317aSmrgm4_popdef([description]) 9366b0a0317aSmrgm4_popdef([def_arg]) 9367b0a0317aSmrg 9368b0a0317aSmrg])dnl PKG_WITH_MODULES 9369b0a0317aSmrg 9370b0a0317aSmrgdnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9371b0a0317aSmrgdnl [DESCRIPTION], [DEFAULT]) 9372b0a0317aSmrgdnl ----------------------------------------------- 9373b0a0317aSmrgdnl 9374b0a0317aSmrgdnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES 9375b0a0317aSmrgdnl check._[VARIABLE-PREFIX] is exported as make variable. 9376b0a0317aSmrgAC_DEFUN([PKG_HAVE_WITH_MODULES], 9377b0a0317aSmrg[ 9378b0a0317aSmrgPKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) 9379b0a0317aSmrg 9380b0a0317aSmrgAM_CONDITIONAL([HAVE_][$1], 9381b0a0317aSmrg [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) 9382b0a0317aSmrg])dnl PKG_HAVE_WITH_MODULES 9383b0a0317aSmrg 9384b0a0317aSmrgdnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9385b0a0317aSmrgdnl [DESCRIPTION], [DEFAULT]) 9386b0a0317aSmrgdnl ------------------------------------------------------ 9387b0a0317aSmrgdnl 9388b0a0317aSmrgdnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after 9389b0a0317aSmrgdnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make 9390b0a0317aSmrgdnl and preprocessor variable. 9391b0a0317aSmrgAC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], 9392b0a0317aSmrg[ 9393b0a0317aSmrgPKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) 9394b0a0317aSmrg 9395b0a0317aSmrgAS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], 9396b0a0317aSmrg [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) 9397b0a0317aSmrg])dnl PKG_HAVE_DEFINE_WITH_MODULES 9398b0a0317aSmrg 9399b0a0317aSmrg# Copyright (C) 2002-2020 Free Software Foundation, Inc. 94000f1ac3bcSmrg# 94010f1ac3bcSmrg# This file is free software; the Free Software Foundation 94020f1ac3bcSmrg# gives unlimited permission to copy and/or distribute it, 94030f1ac3bcSmrg# with or without modifications, as long as this notice is preserved. 94044456fccdSmrg 94050f1ac3bcSmrg# AM_AUTOMAKE_VERSION(VERSION) 94060f1ac3bcSmrg# ---------------------------- 94070f1ac3bcSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 94080f1ac3bcSmrg# generated from the m4 files accompanying Automake X.Y. 94090f1ac3bcSmrg# (This private macro should not be called outside this file.) 94100f1ac3bcSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 9411b0a0317aSmrg[am__api_version='1.16' 94120f1ac3bcSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 94130f1ac3bcSmrgdnl require some minimum version. Point them to the right macro. 9414b0a0317aSmrgm4_if([$1], [1.16.2], [], 94150f1ac3bcSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 94163e6c936aSmrg]) 94174456fccdSmrg 94180f1ac3bcSmrg# _AM_AUTOCONF_VERSION(VERSION) 94190f1ac3bcSmrg# ----------------------------- 94200f1ac3bcSmrg# aclocal traces this macro to find the Autoconf version. 94210f1ac3bcSmrg# This is a private macro too. Using m4_define simplifies 94220f1ac3bcSmrg# the logic in aclocal, which can simply ignore this definition. 94230f1ac3bcSmrgm4_define([_AM_AUTOCONF_VERSION], []) 94244456fccdSmrg 94250f1ac3bcSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 94260f1ac3bcSmrg# ------------------------------- 94270f1ac3bcSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 94280f1ac3bcSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 94290f1ac3bcSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 9430b0a0317aSmrg[AM_AUTOMAKE_VERSION([1.16.2])dnl 94310f1ac3bcSmrgm4_ifndef([AC_AUTOCONF_VERSION], 94320f1ac3bcSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 94330f1ac3bcSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 94344456fccdSmrg 94350f1ac3bcSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 94364456fccdSmrg 9437b0a0317aSmrg# Copyright (C) 2001-2020 Free Software Foundation, Inc. 94380f1ac3bcSmrg# 94390f1ac3bcSmrg# This file is free software; the Free Software Foundation 94400f1ac3bcSmrg# gives unlimited permission to copy and/or distribute it, 94410f1ac3bcSmrg# with or without modifications, as long as this notice is preserved. 94424456fccdSmrg 94430f1ac3bcSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 94440f1ac3bcSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 94450f1ac3bcSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 94460f1ac3bcSmrg# 94470f1ac3bcSmrg# Of course, Automake must honor this variable whenever it calls a 94480f1ac3bcSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 94490f1ac3bcSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 94500f1ac3bcSmrg# depending on how configure is run. This is pretty annoying, since 94510f1ac3bcSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 94520f1ac3bcSmrg# source directory, any form will work fine, but in subdirectories a 94530f1ac3bcSmrg# relative path needs to be adjusted first. 94540f1ac3bcSmrg# 94550f1ac3bcSmrg# $ac_aux_dir/missing 94560f1ac3bcSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 94570f1ac3bcSmrg# $top_srcdir/$ac_aux_dir/missing 94580f1ac3bcSmrg# fails if $ac_aux_dir is absolute, 94590f1ac3bcSmrg# fails when called from a subdirectory in a VPATH build with 94600f1ac3bcSmrg# a relative $ac_aux_dir 94610f1ac3bcSmrg# 94620f1ac3bcSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 94630f1ac3bcSmrg# are both prefixed by $srcdir. In an in-source build this is usually 94640f1ac3bcSmrg# harmless because $srcdir is '.', but things will broke when you 94650f1ac3bcSmrg# start a VPATH build or use an absolute $srcdir. 94660f1ac3bcSmrg# 94670f1ac3bcSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 94680f1ac3bcSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 94690f1ac3bcSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 94700f1ac3bcSmrg# and then we would define $MISSING as 94710f1ac3bcSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 94720f1ac3bcSmrg# This will work as long as MISSING is not called from configure, because 94730f1ac3bcSmrg# unfortunately $(top_srcdir) has no meaning in configure. 94740f1ac3bcSmrg# However there are other variables, like CC, which are often used in 94750f1ac3bcSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 94760f1ac3bcSmrg# 94770f1ac3bcSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 94780f1ac3bcSmrg# absolute PATH. The drawback is that using absolute paths prevent a 94790f1ac3bcSmrg# configured tree to be moved without reconfiguration. 9480521070a0Smrg 94810f1ac3bcSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 9482b0a0317aSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 9483b0a0317aSmrg# Expand $ac_aux_dir to an absolute path. 9484b0a0317aSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 94853e6c936aSmrg]) 9486521070a0Smrg 94870f1ac3bcSmrg# AM_CONDITIONAL -*- Autoconf -*- 9488521070a0Smrg 9489b0a0317aSmrg# Copyright (C) 1997-2020 Free Software Foundation, Inc. 94900f1ac3bcSmrg# 94910f1ac3bcSmrg# This file is free software; the Free Software Foundation 94920f1ac3bcSmrg# gives unlimited permission to copy and/or distribute it, 94930f1ac3bcSmrg# with or without modifications, as long as this notice is preserved. 9494521070a0Smrg 94950f1ac3bcSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 94960f1ac3bcSmrg# ------------------------------------- 94970f1ac3bcSmrg# Define a conditional. 94980f1ac3bcSmrgAC_DEFUN([AM_CONDITIONAL], 94990f1ac3bcSmrg[AC_PREREQ([2.52])dnl 95000f1ac3bcSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 95010f1ac3bcSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 95020f1ac3bcSmrgAC_SUBST([$1_TRUE])dnl 95030f1ac3bcSmrgAC_SUBST([$1_FALSE])dnl 95040f1ac3bcSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 95050f1ac3bcSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 95060f1ac3bcSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 95070f1ac3bcSmrgif $2; then 95080f1ac3bcSmrg $1_TRUE= 95090f1ac3bcSmrg $1_FALSE='#' 95100f1ac3bcSmrgelse 95110f1ac3bcSmrg $1_TRUE='#' 95120f1ac3bcSmrg $1_FALSE= 95130f1ac3bcSmrgfi 95140f1ac3bcSmrgAC_CONFIG_COMMANDS_PRE( 95150f1ac3bcSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 95160f1ac3bcSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 95170f1ac3bcSmrgUsually this means the macro was only invoked conditionally.]]) 95180f1ac3bcSmrgfi])]) 9519521070a0Smrg 9520b0a0317aSmrg# Copyright (C) 1999-2020 Free Software Foundation, Inc. 95210f1ac3bcSmrg# 95220f1ac3bcSmrg# This file is free software; the Free Software Foundation 95230f1ac3bcSmrg# gives unlimited permission to copy and/or distribute it, 95240f1ac3bcSmrg# with or without modifications, as long as this notice is preserved. 952542d69509Smrg 9526521070a0Smrg 95270f1ac3bcSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 95280f1ac3bcSmrg# written in clear, in which case automake, when reading aclocal.m4, 95290f1ac3bcSmrg# will think it sees a *use*, and therefore will trigger all it's 95300f1ac3bcSmrg# C support machinery. Also note that it means that autoscan, seeing 95310f1ac3bcSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 95323e6c936aSmrg 95333e6c936aSmrg 95340f1ac3bcSmrg# _AM_DEPENDENCIES(NAME) 95350f1ac3bcSmrg# ---------------------- 95360f1ac3bcSmrg# See how the compiler implements dependency checking. 95370f1ac3bcSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 95380f1ac3bcSmrg# We try a few techniques and use that to set a single cache variable. 95390f1ac3bcSmrg# 95400f1ac3bcSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 95410f1ac3bcSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 95420f1ac3bcSmrg# dependency, and given that the user is not expected to run this macro, 95430f1ac3bcSmrg# just rely on AC_PROG_CC. 95440f1ac3bcSmrgAC_DEFUN([_AM_DEPENDENCIES], 95450f1ac3bcSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 95460f1ac3bcSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 95470f1ac3bcSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 95480f1ac3bcSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 95493e6c936aSmrg 95500f1ac3bcSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 95510f1ac3bcSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 95520f1ac3bcSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 95530f1ac3bcSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 95540f1ac3bcSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 95550f1ac3bcSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 95560f1ac3bcSmrg [depcc="$$1" am_compiler_list=]) 95573e6c936aSmrg 95580f1ac3bcSmrgAC_CACHE_CHECK([dependency style of $depcc], 95590f1ac3bcSmrg [am_cv_$1_dependencies_compiler_type], 95600f1ac3bcSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 95610f1ac3bcSmrg # We make a subdir and do the tests there. Otherwise we can end up 95620f1ac3bcSmrg # making bogus files that we don't know about and never remove. For 95630f1ac3bcSmrg # instance it was reported that on HP-UX the gcc test will end up 95640f1ac3bcSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 95650f1ac3bcSmrg # in D". 95660f1ac3bcSmrg rm -rf conftest.dir 95670f1ac3bcSmrg mkdir conftest.dir 95680f1ac3bcSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 95690f1ac3bcSmrg # using a relative directory. 95700f1ac3bcSmrg cp "$am_depcomp" conftest.dir 95710f1ac3bcSmrg cd conftest.dir 95720f1ac3bcSmrg # We will build objects and dependencies in a subdirectory because 95730f1ac3bcSmrg # it helps to detect inapplicable dependency modes. For instance 95740f1ac3bcSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 95750f1ac3bcSmrg # side effect of compilation, but ICC will put the dependencies in 95760f1ac3bcSmrg # the current directory while Tru64 will put them in the object 95770f1ac3bcSmrg # directory. 95780f1ac3bcSmrg mkdir sub 9579521070a0Smrg 95800f1ac3bcSmrg am_cv_$1_dependencies_compiler_type=none 95810f1ac3bcSmrg if test "$am_compiler_list" = ""; then 95820f1ac3bcSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 95830f1ac3bcSmrg fi 95840f1ac3bcSmrg am__universal=false 95850f1ac3bcSmrg m4_case([$1], [CC], 95860f1ac3bcSmrg [case " $depcc " in #( 95870f1ac3bcSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 95880f1ac3bcSmrg esac], 95890f1ac3bcSmrg [CXX], 95900f1ac3bcSmrg [case " $depcc " in #( 95910f1ac3bcSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 95920f1ac3bcSmrg esac]) 959342d69509Smrg 95940f1ac3bcSmrg for depmode in $am_compiler_list; do 95950f1ac3bcSmrg # Setup a source with many dependencies, because some compilers 95960f1ac3bcSmrg # like to wrap large dependency lists on column 80 (with \), and 95970f1ac3bcSmrg # we should not choose a depcomp mode which is confused by this. 95980f1ac3bcSmrg # 95990f1ac3bcSmrg # We need to recreate these files for each test, as the compiler may 96000f1ac3bcSmrg # overwrite some of them when testing with obscure command lines. 96010f1ac3bcSmrg # This happens at least with the AIX C compiler. 96020f1ac3bcSmrg : > sub/conftest.c 96030f1ac3bcSmrg for i in 1 2 3 4 5 6; do 96040f1ac3bcSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 96050f1ac3bcSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 96060f1ac3bcSmrg # Solaris 10 /bin/sh. 96070f1ac3bcSmrg echo '/* dummy */' > sub/conftst$i.h 96080f1ac3bcSmrg done 96090f1ac3bcSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 961042d69509Smrg 96110f1ac3bcSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 96120f1ac3bcSmrg # mode. It turns out that the SunPro C++ compiler does not properly 96130f1ac3bcSmrg # handle '-M -o', and we need to detect this. Also, some Intel 96140f1ac3bcSmrg # versions had trouble with output in subdirs. 96150f1ac3bcSmrg am__obj=sub/conftest.${OBJEXT-o} 96160f1ac3bcSmrg am__minus_obj="-o $am__obj" 96170f1ac3bcSmrg case $depmode in 96180f1ac3bcSmrg gcc) 96190f1ac3bcSmrg # This depmode causes a compiler race in universal mode. 96200f1ac3bcSmrg test "$am__universal" = false || continue 96213e6c936aSmrg ;; 96220f1ac3bcSmrg nosideeffect) 96230f1ac3bcSmrg # After this tag, mechanisms are not by side-effect, so they'll 96240f1ac3bcSmrg # only be used when explicitly requested. 96250f1ac3bcSmrg if test "x$enable_dependency_tracking" = xyes; then 96260f1ac3bcSmrg continue 96270f1ac3bcSmrg else 96280f1ac3bcSmrg break 96290f1ac3bcSmrg fi 96300f1ac3bcSmrg ;; 96310f1ac3bcSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 96320f1ac3bcSmrg # This compiler won't grok '-c -o', but also, the minuso test has 96330f1ac3bcSmrg # not run yet. These depmodes are late enough in the game, and 96340f1ac3bcSmrg # so weak that their functioning should not be impacted. 96350f1ac3bcSmrg am__obj=conftest.${OBJEXT-o} 96360f1ac3bcSmrg am__minus_obj= 96370f1ac3bcSmrg ;; 96380f1ac3bcSmrg none) break ;; 96390f1ac3bcSmrg esac 96400f1ac3bcSmrg if depmode=$depmode \ 96410f1ac3bcSmrg source=sub/conftest.c object=$am__obj \ 96420f1ac3bcSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 96430f1ac3bcSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 96440f1ac3bcSmrg >/dev/null 2>conftest.err && 96450f1ac3bcSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 96460f1ac3bcSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 96470f1ac3bcSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 96480f1ac3bcSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 96490f1ac3bcSmrg # icc doesn't choke on unknown options, it will just issue warnings 96500f1ac3bcSmrg # or remarks (even with -Werror). So we grep stderr for any message 96510f1ac3bcSmrg # that says an option was ignored or not supported. 96520f1ac3bcSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 96530f1ac3bcSmrg # icc: Command line warning: ignoring option '-M'; no argument required 96540f1ac3bcSmrg # The diagnosis changed in icc 8.0: 96550f1ac3bcSmrg # icc: Command line remark: option '-MP' not supported 96560f1ac3bcSmrg if (grep 'ignoring option' conftest.err || 96570f1ac3bcSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 96580f1ac3bcSmrg am_cv_$1_dependencies_compiler_type=$depmode 96590f1ac3bcSmrg break 96600f1ac3bcSmrg fi 96610f1ac3bcSmrg fi 96620f1ac3bcSmrg done 96634456fccdSmrg 96640f1ac3bcSmrg cd .. 96650f1ac3bcSmrg rm -rf conftest.dir 96660f1ac3bcSmrgelse 96670f1ac3bcSmrg am_cv_$1_dependencies_compiler_type=none 96680f1ac3bcSmrgfi 96690f1ac3bcSmrg]) 96700f1ac3bcSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 96710f1ac3bcSmrgAM_CONDITIONAL([am__fastdep$1], [ 96720f1ac3bcSmrg test "x$enable_dependency_tracking" != xno \ 96730f1ac3bcSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 96740f1ac3bcSmrg]) 96754456fccdSmrg 96764456fccdSmrg 96770f1ac3bcSmrg# AM_SET_DEPDIR 96780f1ac3bcSmrg# ------------- 96790f1ac3bcSmrg# Choose a directory name for dependency files. 96800f1ac3bcSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 96810f1ac3bcSmrgAC_DEFUN([AM_SET_DEPDIR], 96820f1ac3bcSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 96830f1ac3bcSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 96843e6c936aSmrg]) 9685ff63a143Smrg 96864456fccdSmrg 96870f1ac3bcSmrg# AM_DEP_TRACK 96880f1ac3bcSmrg# ------------ 96890f1ac3bcSmrgAC_DEFUN([AM_DEP_TRACK], 96900f1ac3bcSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 96910f1ac3bcSmrgAS_HELP_STRING( 96920f1ac3bcSmrg [--enable-dependency-tracking], 96930f1ac3bcSmrg [do not reject slow dependency extractors]) 96940f1ac3bcSmrgAS_HELP_STRING( 96950f1ac3bcSmrg [--disable-dependency-tracking], 96960f1ac3bcSmrg [speeds up one-time build])]) 96970f1ac3bcSmrgif test "x$enable_dependency_tracking" != xno; then 96980f1ac3bcSmrg am_depcomp="$ac_aux_dir/depcomp" 96990f1ac3bcSmrg AMDEPBACKSLASH='\' 97000f1ac3bcSmrg am__nodep='_no' 97010f1ac3bcSmrgfi 97020f1ac3bcSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 97030f1ac3bcSmrgAC_SUBST([AMDEPBACKSLASH])dnl 97040f1ac3bcSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 97050f1ac3bcSmrgAC_SUBST([am__nodep])dnl 97060f1ac3bcSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 97070f1ac3bcSmrg]) 97084456fccdSmrg 97090f1ac3bcSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 97104456fccdSmrg 9711b0a0317aSmrg# Copyright (C) 1999-2020 Free Software Foundation, Inc. 9712ff63a143Smrg# 97130f1ac3bcSmrg# This file is free software; the Free Software Foundation 97140f1ac3bcSmrg# gives unlimited permission to copy and/or distribute it, 97150f1ac3bcSmrg# with or without modifications, as long as this notice is preserved. 9716521070a0Smrg 97170f1ac3bcSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 97180f1ac3bcSmrg# ------------------------------ 97190f1ac3bcSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 97200f1ac3bcSmrg[{ 97210f1ac3bcSmrg # Older Autoconf quotes --file arguments for eval, but not when files 97220f1ac3bcSmrg # are listed without --file. Let's play safe and only enable the eval 97230f1ac3bcSmrg # if we detect the quoting. 9724b0a0317aSmrg # TODO: see whether this extra hack can be removed once we start 9725b0a0317aSmrg # requiring Autoconf 2.70 or later. 9726b0a0317aSmrg AS_CASE([$CONFIG_FILES], 9727b0a0317aSmrg [*\'*], [eval set x "$CONFIG_FILES"], 9728b0a0317aSmrg [*], [set x $CONFIG_FILES]) 97290f1ac3bcSmrg shift 9730b0a0317aSmrg # Used to flag and report bootstrapping failures. 9731b0a0317aSmrg am_rc=0 9732b0a0317aSmrg for am_mf 97330f1ac3bcSmrg do 97340f1ac3bcSmrg # Strip MF so we end up with the name of the file. 9735b0a0317aSmrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 9736b0a0317aSmrg # Check whether this is an Automake generated Makefile which includes 9737b0a0317aSmrg # dependency-tracking related rules and includes. 9738b0a0317aSmrg # Grep'ing the whole file directly is not great: AIX grep has a line 97390f1ac3bcSmrg # limit of 2048, but all sed's we know have understand at least 4000. 9740b0a0317aSmrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 9741b0a0317aSmrg || continue 9742b0a0317aSmrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 9743b0a0317aSmrg am_filepart=`AS_BASENAME(["$am_mf"])` 9744b0a0317aSmrg AM_RUN_LOG([cd "$am_dirpart" \ 9745b0a0317aSmrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 9746b0a0317aSmrg | $MAKE -f - am--depfiles]) || am_rc=$? 97470f1ac3bcSmrg done 9748b0a0317aSmrg if test $am_rc -ne 0; then 9749b0a0317aSmrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 9750b0a0317aSmrg for automatic dependency tracking. If GNU make was not used, consider 9751b0a0317aSmrg re-running the configure script with MAKE="gmake" (or whatever is 9752b0a0317aSmrg necessary). You can also try re-running configure with the 9753b0a0317aSmrg '--disable-dependency-tracking' option to at least be able to build 9754b0a0317aSmrg the package (albeit without support for automatic dependency tracking).]) 9755b0a0317aSmrg fi 9756b0a0317aSmrg AS_UNSET([am_dirpart]) 9757b0a0317aSmrg AS_UNSET([am_filepart]) 9758b0a0317aSmrg AS_UNSET([am_mf]) 9759b0a0317aSmrg AS_UNSET([am_rc]) 9760b0a0317aSmrg rm -f conftest-deps.mk 97610f1ac3bcSmrg} 97620f1ac3bcSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 9763521070a0Smrg 9764521070a0Smrg 97650f1ac3bcSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 97663e6c936aSmrg# ----------------------------- 97670f1ac3bcSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 97680f1ac3bcSmrg# 9769b0a0317aSmrg# This code is only required when automatic dependency tracking is enabled. 9770b0a0317aSmrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 9771b0a0317aSmrg# order to bootstrap the dependency handling code. 97720f1ac3bcSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 97730f1ac3bcSmrg[AC_CONFIG_COMMANDS([depfiles], 97740f1ac3bcSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 9775b0a0317aSmrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 9776521070a0Smrg 97770f1ac3bcSmrg# Do all the work for Automake. -*- Autoconf -*- 97783e6c936aSmrg 9779b0a0317aSmrg# Copyright (C) 1996-2020 Free Software Foundation, Inc. 97800f1ac3bcSmrg# 97810f1ac3bcSmrg# This file is free software; the Free Software Foundation 97820f1ac3bcSmrg# gives unlimited permission to copy and/or distribute it, 97830f1ac3bcSmrg# with or without modifications, as long as this notice is preserved. 97843e6c936aSmrg 97850f1ac3bcSmrg# This macro actually does too much. Some checks are only needed if 97860f1ac3bcSmrg# your package does certain things. But this isn't really a big deal. 97873e6c936aSmrg 97880f1ac3bcSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 97890f1ac3bcSmrgm4_define([AC_PROG_CC], 97900f1ac3bcSmrgm4_defn([AC_PROG_CC]) 97910f1ac3bcSmrg[_AM_PROG_CC_C_O 97920f1ac3bcSmrg]) 97933e6c936aSmrg 97940f1ac3bcSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 97950f1ac3bcSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 97960f1ac3bcSmrg# ----------------------------------------------- 97970f1ac3bcSmrg# The call with PACKAGE and VERSION arguments is the old style 97980f1ac3bcSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 97990f1ac3bcSmrg# and VERSION should now be passed to AC_INIT and removed from 98000f1ac3bcSmrg# the call to AM_INIT_AUTOMAKE. 98010f1ac3bcSmrg# We support both call styles for the transition. After 98020f1ac3bcSmrg# the next Automake release, Autoconf can make the AC_INIT 98030f1ac3bcSmrg# arguments mandatory, and then we can depend on a new Autoconf 98040f1ac3bcSmrg# release and drop the old call support. 98050f1ac3bcSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 98060f1ac3bcSmrg[AC_PREREQ([2.65])dnl 98070f1ac3bcSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 98080f1ac3bcSmrgdnl the ones we care about. 98090f1ac3bcSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 98100f1ac3bcSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 98110f1ac3bcSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 98120f1ac3bcSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 98130f1ac3bcSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 98140f1ac3bcSmrg # is not polluted with repeated "-I." 98150f1ac3bcSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 98160f1ac3bcSmrg # test to see if srcdir already configured 98170f1ac3bcSmrg if test -f $srcdir/config.status; then 98180f1ac3bcSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 98190f1ac3bcSmrg fi 98200f1ac3bcSmrgfi 98213e6c936aSmrg 98220f1ac3bcSmrg# test whether we have cygpath 98230f1ac3bcSmrgif test -z "$CYGPATH_W"; then 98240f1ac3bcSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 98250f1ac3bcSmrg CYGPATH_W='cygpath -w' 98260f1ac3bcSmrg else 98270f1ac3bcSmrg CYGPATH_W=echo 98280f1ac3bcSmrg fi 98290f1ac3bcSmrgfi 98300f1ac3bcSmrgAC_SUBST([CYGPATH_W]) 98313e6c936aSmrg 98320f1ac3bcSmrg# Define the identity of the package. 98330f1ac3bcSmrgdnl Distinguish between old-style and new-style calls. 98340f1ac3bcSmrgm4_ifval([$2], 98350f1ac3bcSmrg[AC_DIAGNOSE([obsolete], 98360f1ac3bcSmrg [$0: two- and three-arguments forms are deprecated.]) 98370f1ac3bcSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 98380f1ac3bcSmrg AC_SUBST([PACKAGE], [$1])dnl 98390f1ac3bcSmrg AC_SUBST([VERSION], [$2])], 98400f1ac3bcSmrg[_AM_SET_OPTIONS([$1])dnl 98410f1ac3bcSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 98420f1ac3bcSmrgm4_if( 98430f1ac3bcSmrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 98440f1ac3bcSmrg [ok:ok],, 98450f1ac3bcSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 98460f1ac3bcSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 98470f1ac3bcSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 98480f1ac3bcSmrg 98490f1ac3bcSmrg_AM_IF_OPTION([no-define],, 98500f1ac3bcSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 98510f1ac3bcSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 98520f1ac3bcSmrg 98530f1ac3bcSmrg# Some tools Automake needs. 98540f1ac3bcSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 98550f1ac3bcSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 98560f1ac3bcSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 98570f1ac3bcSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 98580f1ac3bcSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 98590f1ac3bcSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 98600f1ac3bcSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 98610f1ac3bcSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 98620f1ac3bcSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 98630f1ac3bcSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 98640f1ac3bcSmrg# For better backward compatibility. To be removed once Automake 1.9.x 98650f1ac3bcSmrg# dies out for good. For more background, see: 9866b0a0317aSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 9867b0a0317aSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 98680f1ac3bcSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 9869b0a0317aSmrg# We need awk for the "check" target (and possibly the TAP driver). The 9870b0a0317aSmrg# system "awk" is bad on some platforms. 98710f1ac3bcSmrgAC_REQUIRE([AC_PROG_AWK])dnl 98720f1ac3bcSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 98730f1ac3bcSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 98740f1ac3bcSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 98750f1ac3bcSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 98760f1ac3bcSmrg [_AM_PROG_TAR([v7])])]) 98770f1ac3bcSmrg_AM_IF_OPTION([no-dependencies],, 98780f1ac3bcSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 98790f1ac3bcSmrg [_AM_DEPENDENCIES([CC])], 98800f1ac3bcSmrg [m4_define([AC_PROG_CC], 98810f1ac3bcSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 98820f1ac3bcSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 98830f1ac3bcSmrg [_AM_DEPENDENCIES([CXX])], 98840f1ac3bcSmrg [m4_define([AC_PROG_CXX], 98850f1ac3bcSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 98860f1ac3bcSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 98870f1ac3bcSmrg [_AM_DEPENDENCIES([OBJC])], 98880f1ac3bcSmrg [m4_define([AC_PROG_OBJC], 98890f1ac3bcSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 98900f1ac3bcSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 98910f1ac3bcSmrg [_AM_DEPENDENCIES([OBJCXX])], 98920f1ac3bcSmrg [m4_define([AC_PROG_OBJCXX], 98930f1ac3bcSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 98940f1ac3bcSmrg]) 98950f1ac3bcSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 98960f1ac3bcSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 98970f1ac3bcSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 98980f1ac3bcSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 98990f1ac3bcSmrgAC_CONFIG_COMMANDS_PRE(dnl 99000f1ac3bcSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 99010f1ac3bcSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 99023e6c936aSmrg 99030f1ac3bcSmrg# POSIX will say in a future version that running "rm -f" with no argument 99040f1ac3bcSmrg# is OK; and we want to be able to make that assumption in our Makefile 99050f1ac3bcSmrg# recipes. So use an aggressive probe to check that the usage we want is 99060f1ac3bcSmrg# actually supported "in the wild" to an acceptable degree. 99070f1ac3bcSmrg# See automake bug#10828. 99080f1ac3bcSmrg# To make any issue more visible, cause the running configure to be aborted 99090f1ac3bcSmrg# by default if the 'rm' program in use doesn't match our expectations; the 99100f1ac3bcSmrg# user can still override this though. 99110f1ac3bcSmrgif rm -f && rm -fr && rm -rf; then : OK; else 99120f1ac3bcSmrg cat >&2 <<'END' 99130f1ac3bcSmrgOops! 99140f1ac3bcSmrg 99150f1ac3bcSmrgYour 'rm' program seems unable to run without file operands specified 99160f1ac3bcSmrgon the command line, even when the '-f' option is present. This is contrary 99170f1ac3bcSmrgto the behaviour of most rm programs out there, and not conforming with 99180f1ac3bcSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 99190f1ac3bcSmrg 99200f1ac3bcSmrgPlease tell bug-automake@gnu.org about your system, including the value 99210f1ac3bcSmrgof your $PATH and any error possibly output before this message. This 99220f1ac3bcSmrgcan help us improve future automake versions. 99233e6c936aSmrg 99240f1ac3bcSmrgEND 99250f1ac3bcSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 99260f1ac3bcSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 99270f1ac3bcSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 99280f1ac3bcSmrg echo >&2 99290f1ac3bcSmrg else 99300f1ac3bcSmrg cat >&2 <<'END' 99310f1ac3bcSmrgAborting the configuration process, to ensure you take notice of the issue. 99323e6c936aSmrg 99330f1ac3bcSmrgYou can download and install GNU coreutils to get an 'rm' implementation 9934b0a0317aSmrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 99353e6c936aSmrg 99360f1ac3bcSmrgIf you want to complete the configuration process using your problematic 99370f1ac3bcSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 99380f1ac3bcSmrgto "yes", and re-run configure. 99393e6c936aSmrg 99400f1ac3bcSmrgEND 99410f1ac3bcSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 99420f1ac3bcSmrg fi 9943b0a0317aSmrgfi 9944b0a0317aSmrgdnl The trailing newline in this macro's definition is deliberate, for 9945b0a0317aSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 9946b0a0317aSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 9947b0a0317aSmrg]) 99483e6c936aSmrg 99490f1ac3bcSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 99500f1ac3bcSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 99510f1ac3bcSmrgdnl mangled by Autoconf and run in a shell conditional statement. 99520f1ac3bcSmrgm4_define([_AC_COMPILER_EXEEXT], 99530f1ac3bcSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 99543e6c936aSmrg 99550f1ac3bcSmrg# When config.status generates a header, we must update the stamp-h file. 99560f1ac3bcSmrg# This file resides in the same directory as the config header 99570f1ac3bcSmrg# that is generated. The stamp files are numbered to have different names. 99583e6c936aSmrg 99590f1ac3bcSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 99600f1ac3bcSmrg# loop where config.status creates the headers, so we can generate 99610f1ac3bcSmrg# our stamp files there. 99620f1ac3bcSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 99630f1ac3bcSmrg[# Compute $1's index in $config_headers. 99640f1ac3bcSmrg_am_arg=$1 99650f1ac3bcSmrg_am_stamp_count=1 99660f1ac3bcSmrgfor _am_header in $config_headers :; do 99670f1ac3bcSmrg case $_am_header in 99680f1ac3bcSmrg $_am_arg | $_am_arg:* ) 99690f1ac3bcSmrg break ;; 99700f1ac3bcSmrg * ) 99710f1ac3bcSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 99720f1ac3bcSmrg esac 99730f1ac3bcSmrgdone 99740f1ac3bcSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 99753e6c936aSmrg 9976b0a0317aSmrg# Copyright (C) 2001-2020 Free Software Foundation, Inc. 99770f1ac3bcSmrg# 99780f1ac3bcSmrg# This file is free software; the Free Software Foundation 99790f1ac3bcSmrg# gives unlimited permission to copy and/or distribute it, 99800f1ac3bcSmrg# with or without modifications, as long as this notice is preserved. 99813e6c936aSmrg 99820f1ac3bcSmrg# AM_PROG_INSTALL_SH 99830f1ac3bcSmrg# ------------------ 99840f1ac3bcSmrg# Define $install_sh. 99850f1ac3bcSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 99860f1ac3bcSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9987b0a0317aSmrgif test x"${install_sh+set}" != xset; then 99880f1ac3bcSmrg case $am_aux_dir in 99890f1ac3bcSmrg *\ * | *\ *) 99900f1ac3bcSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 99910f1ac3bcSmrg *) 99920f1ac3bcSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 99930f1ac3bcSmrg esac 99940f1ac3bcSmrgfi 99950f1ac3bcSmrgAC_SUBST([install_sh])]) 99963e6c936aSmrg 9997b0a0317aSmrg# Copyright (C) 2003-2020 Free Software Foundation, Inc. 99980f1ac3bcSmrg# 99990f1ac3bcSmrg# This file is free software; the Free Software Foundation 100000f1ac3bcSmrg# gives unlimited permission to copy and/or distribute it, 100010f1ac3bcSmrg# with or without modifications, as long as this notice is preserved. 100023e6c936aSmrg 100030f1ac3bcSmrg# Check whether the underlying file-system supports filenames 100040f1ac3bcSmrg# with a leading dot. For instance MS-DOS doesn't. 100050f1ac3bcSmrgAC_DEFUN([AM_SET_LEADING_DOT], 100060f1ac3bcSmrg[rm -rf .tst 2>/dev/null 100070f1ac3bcSmrgmkdir .tst 2>/dev/null 100080f1ac3bcSmrgif test -d .tst; then 100090f1ac3bcSmrg am__leading_dot=. 100100f1ac3bcSmrgelse 100110f1ac3bcSmrg am__leading_dot=_ 100120f1ac3bcSmrgfi 100130f1ac3bcSmrgrmdir .tst 2>/dev/null 100140f1ac3bcSmrgAC_SUBST([am__leading_dot])]) 100153e6c936aSmrg 100160f1ac3bcSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 100170f1ac3bcSmrg 10018b0a0317aSmrg# Copyright (C) 2001-2020 Free Software Foundation, Inc. 10019ff63a143Smrg# 100200f1ac3bcSmrg# This file is free software; the Free Software Foundation 100210f1ac3bcSmrg# gives unlimited permission to copy and/or distribute it, 100220f1ac3bcSmrg# with or without modifications, as long as this notice is preserved. 100234456fccdSmrg 100240f1ac3bcSmrg# AM_MAKE_INCLUDE() 100250f1ac3bcSmrg# ----------------- 10026b0a0317aSmrg# Check whether make has an 'include' directive that can support all 10027b0a0317aSmrg# the idioms we need for our automatic dependency tracking code. 100280f1ac3bcSmrgAC_DEFUN([AM_MAKE_INCLUDE], 10029b0a0317aSmrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 10030b0a0317aSmrgcat > confinc.mk << 'END' 100310f1ac3bcSmrgam__doit: 10032b0a0317aSmrg @echo this is the am__doit target >confinc.out 100330f1ac3bcSmrg.PHONY: am__doit 100340f1ac3bcSmrgEND 100350f1ac3bcSmrgam__include="#" 100360f1ac3bcSmrgam__quote= 10037b0a0317aSmrg# BSD make does it like this. 10038b0a0317aSmrgecho '.include "confinc.mk" # ignored' > confmf.BSD 10039b0a0317aSmrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 10040b0a0317aSmrgecho 'include confinc.mk # ignored' > confmf.GNU 10041b0a0317aSmrg_am_result=no 10042b0a0317aSmrgfor s in GNU BSD; do 10043b0a0317aSmrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 10044b0a0317aSmrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 10045b0a0317aSmrg ['0:this is the am__doit target'], 10046b0a0317aSmrg [AS_CASE([$s], 10047b0a0317aSmrg [BSD], [am__include='.include' am__quote='"'], 10048b0a0317aSmrg [am__include='include' am__quote=''])]) 10049b0a0317aSmrg if test "$am__include" != "#"; then 10050b0a0317aSmrg _am_result="yes ($s style)" 10051b0a0317aSmrg break 10052b0a0317aSmrg fi 10053b0a0317aSmrgdone 10054b0a0317aSmrgrm -f confinc.* confmf.* 10055b0a0317aSmrgAC_MSG_RESULT([${_am_result}]) 10056b0a0317aSmrgAC_SUBST([am__include])]) 10057b0a0317aSmrgAC_SUBST([am__quote])]) 100583e6c936aSmrg 100590f1ac3bcSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 100603e6c936aSmrg 10061b0a0317aSmrg# Copyright (C) 1997-2020 Free Software Foundation, Inc. 100620f1ac3bcSmrg# 100630f1ac3bcSmrg# This file is free software; the Free Software Foundation 100640f1ac3bcSmrg# gives unlimited permission to copy and/or distribute it, 100650f1ac3bcSmrg# with or without modifications, as long as this notice is preserved. 100663e6c936aSmrg 100670f1ac3bcSmrg# AM_MISSING_PROG(NAME, PROGRAM) 100680f1ac3bcSmrg# ------------------------------ 100690f1ac3bcSmrgAC_DEFUN([AM_MISSING_PROG], 100700f1ac3bcSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 100710f1ac3bcSmrg$1=${$1-"${am_missing_run}$2"} 100720f1ac3bcSmrgAC_SUBST($1)]) 100730f1ac3bcSmrg 100740f1ac3bcSmrg# AM_MISSING_HAS_RUN 100750f1ac3bcSmrg# ------------------ 100760f1ac3bcSmrg# Define MISSING if not defined so far and test if it is modern enough. 100770f1ac3bcSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 100780f1ac3bcSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 100790f1ac3bcSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 100800f1ac3bcSmrgAC_REQUIRE_AUX_FILE([missing])dnl 100810f1ac3bcSmrgif test x"${MISSING+set}" != xset; then 100820f1ac3bcSmrg case $am_aux_dir in 100830f1ac3bcSmrg *\ * | *\ *) 100840f1ac3bcSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 100850f1ac3bcSmrg *) 100860f1ac3bcSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 100870f1ac3bcSmrg esac 100880f1ac3bcSmrgfi 100890f1ac3bcSmrg# Use eval to expand $SHELL 100900f1ac3bcSmrgif eval "$MISSING --is-lightweight"; then 100910f1ac3bcSmrg am_missing_run="$MISSING " 100920f1ac3bcSmrgelse 100930f1ac3bcSmrg am_missing_run= 100940f1ac3bcSmrg AC_MSG_WARN(['missing' script is too old or missing]) 100950f1ac3bcSmrgfi 100963e6c936aSmrg]) 100973e6c936aSmrg 100980f1ac3bcSmrg# Helper functions for option handling. -*- Autoconf -*- 100990f1ac3bcSmrg 10100b0a0317aSmrg# Copyright (C) 2001-2020 Free Software Foundation, Inc. 10101ff63a143Smrg# 101020f1ac3bcSmrg# This file is free software; the Free Software Foundation 101030f1ac3bcSmrg# gives unlimited permission to copy and/or distribute it, 101040f1ac3bcSmrg# with or without modifications, as long as this notice is preserved. 101053e6c936aSmrg 101060f1ac3bcSmrg# _AM_MANGLE_OPTION(NAME) 101070f1ac3bcSmrg# ----------------------- 101080f1ac3bcSmrgAC_DEFUN([_AM_MANGLE_OPTION], 101090f1ac3bcSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 101103e6c936aSmrg 101110f1ac3bcSmrg# _AM_SET_OPTION(NAME) 101120f1ac3bcSmrg# -------------------- 101130f1ac3bcSmrg# Set option NAME. Presently that only means defining a flag for this option. 101140f1ac3bcSmrgAC_DEFUN([_AM_SET_OPTION], 101150f1ac3bcSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 101160f1ac3bcSmrg 101170f1ac3bcSmrg# _AM_SET_OPTIONS(OPTIONS) 101180f1ac3bcSmrg# ------------------------ 101190f1ac3bcSmrg# OPTIONS is a space-separated list of Automake options. 101200f1ac3bcSmrgAC_DEFUN([_AM_SET_OPTIONS], 101210f1ac3bcSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 101220f1ac3bcSmrg 101230f1ac3bcSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 101240f1ac3bcSmrg# ------------------------------------------- 101250f1ac3bcSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 101260f1ac3bcSmrgAC_DEFUN([_AM_IF_OPTION], 101270f1ac3bcSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 101280f1ac3bcSmrg 10129b0a0317aSmrg# Copyright (C) 1999-2020 Free Software Foundation, Inc. 101303e6c936aSmrg# 101310f1ac3bcSmrg# This file is free software; the Free Software Foundation 101320f1ac3bcSmrg# gives unlimited permission to copy and/or distribute it, 101330f1ac3bcSmrg# with or without modifications, as long as this notice is preserved. 101344456fccdSmrg 101350f1ac3bcSmrg# _AM_PROG_CC_C_O 101360f1ac3bcSmrg# --------------- 101370f1ac3bcSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 101380f1ac3bcSmrg# to automatically call this. 101390f1ac3bcSmrgAC_DEFUN([_AM_PROG_CC_C_O], 101400f1ac3bcSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 101410f1ac3bcSmrgAC_REQUIRE_AUX_FILE([compile])dnl 101420f1ac3bcSmrgAC_LANG_PUSH([C])dnl 101430f1ac3bcSmrgAC_CACHE_CHECK( 101440f1ac3bcSmrg [whether $CC understands -c and -o together], 101450f1ac3bcSmrg [am_cv_prog_cc_c_o], 101460f1ac3bcSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 101470f1ac3bcSmrg # Make sure it works both with $CC and with simple cc. 101480f1ac3bcSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 101490f1ac3bcSmrg # compilers refuse to overwrite an existing .o file with -o, 101500f1ac3bcSmrg # though they will create one. 101510f1ac3bcSmrg am_cv_prog_cc_c_o=yes 101520f1ac3bcSmrg for am_i in 1 2; do 101530f1ac3bcSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 101540f1ac3bcSmrg && test -f conftest2.$ac_objext; then 101550f1ac3bcSmrg : OK 101560f1ac3bcSmrg else 101570f1ac3bcSmrg am_cv_prog_cc_c_o=no 101580f1ac3bcSmrg break 101590f1ac3bcSmrg fi 101600f1ac3bcSmrg done 101610f1ac3bcSmrg rm -f core conftest* 101620f1ac3bcSmrg unset am_i]) 101630f1ac3bcSmrgif test "$am_cv_prog_cc_c_o" != yes; then 101640f1ac3bcSmrg # Losing compiler, so override with the script. 101650f1ac3bcSmrg # FIXME: It is wrong to rewrite CC. 101660f1ac3bcSmrg # But if we don't then we get into trouble of one sort or another. 101670f1ac3bcSmrg # A longer-term fix would be to have automake use am__CC in this case, 101680f1ac3bcSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 101690f1ac3bcSmrg CC="$am_aux_dir/compile $CC" 101700f1ac3bcSmrgfi 101710f1ac3bcSmrgAC_LANG_POP([C])]) 10172521070a0Smrg 101730f1ac3bcSmrg# For backward compatibility. 101740f1ac3bcSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 101753e6c936aSmrg 10176b0a0317aSmrg# Copyright (C) 2001-2020 Free Software Foundation, Inc. 10177ff63a143Smrg# 101780f1ac3bcSmrg# This file is free software; the Free Software Foundation 101790f1ac3bcSmrg# gives unlimited permission to copy and/or distribute it, 101800f1ac3bcSmrg# with or without modifications, as long as this notice is preserved. 101810f1ac3bcSmrg 101820f1ac3bcSmrg# AM_RUN_LOG(COMMAND) 101830f1ac3bcSmrg# ------------------- 101840f1ac3bcSmrg# Run COMMAND, save the exit status in ac_status, and log it. 101850f1ac3bcSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 101860f1ac3bcSmrgAC_DEFUN([AM_RUN_LOG], 101870f1ac3bcSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 101880f1ac3bcSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 101890f1ac3bcSmrg ac_status=$? 101900f1ac3bcSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 101910f1ac3bcSmrg (exit $ac_status); }]) 101920f1ac3bcSmrg 101930f1ac3bcSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 101940f1ac3bcSmrg 10195b0a0317aSmrg# Copyright (C) 1996-2020 Free Software Foundation, Inc. 10196ff63a143Smrg# 101970f1ac3bcSmrg# This file is free software; the Free Software Foundation 101980f1ac3bcSmrg# gives unlimited permission to copy and/or distribute it, 101990f1ac3bcSmrg# with or without modifications, as long as this notice is preserved. 102000f1ac3bcSmrg 102010f1ac3bcSmrg# AM_SANITY_CHECK 102020f1ac3bcSmrg# --------------- 102030f1ac3bcSmrgAC_DEFUN([AM_SANITY_CHECK], 102040f1ac3bcSmrg[AC_MSG_CHECKING([whether build environment is sane]) 102050f1ac3bcSmrg# Reject unsafe characters in $srcdir or the absolute working directory 102060f1ac3bcSmrg# name. Accept space and tab only in the latter. 102070f1ac3bcSmrgam_lf=' 102080f1ac3bcSmrg' 102090f1ac3bcSmrgcase `pwd` in 102100f1ac3bcSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 102110f1ac3bcSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 102120f1ac3bcSmrgesac 102130f1ac3bcSmrgcase $srcdir in 102140f1ac3bcSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 102150f1ac3bcSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 102160f1ac3bcSmrgesac 102170f1ac3bcSmrg 102180f1ac3bcSmrg# Do 'set' in a subshell so we don't clobber the current shell's 102190f1ac3bcSmrg# arguments. Must try -L first in case configure is actually a 102200f1ac3bcSmrg# symlink; some systems play weird games with the mod time of symlinks 102210f1ac3bcSmrg# (eg FreeBSD returns the mod time of the symlink's containing 102220f1ac3bcSmrg# directory). 102230f1ac3bcSmrgif ( 102240f1ac3bcSmrg am_has_slept=no 102250f1ac3bcSmrg for am_try in 1 2; do 102260f1ac3bcSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 102270f1ac3bcSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 102280f1ac3bcSmrg if test "$[*]" = "X"; then 102290f1ac3bcSmrg # -L didn't work. 102300f1ac3bcSmrg set X `ls -t "$srcdir/configure" conftest.file` 102310f1ac3bcSmrg fi 102320f1ac3bcSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 102330f1ac3bcSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 102340f1ac3bcSmrg 102350f1ac3bcSmrg # If neither matched, then we have a broken ls. This can happen 102360f1ac3bcSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 102370f1ac3bcSmrg # broken ls alias from the environment. This has actually 102380f1ac3bcSmrg # happened. Such a system could not be considered "sane". 102390f1ac3bcSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 102400f1ac3bcSmrg alias in your environment]) 102410f1ac3bcSmrg fi 102420f1ac3bcSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 102430f1ac3bcSmrg break 102440f1ac3bcSmrg fi 102450f1ac3bcSmrg # Just in case. 102460f1ac3bcSmrg sleep 1 102470f1ac3bcSmrg am_has_slept=yes 102480f1ac3bcSmrg done 102490f1ac3bcSmrg test "$[2]" = conftest.file 102500f1ac3bcSmrg ) 102510f1ac3bcSmrgthen 102520f1ac3bcSmrg # Ok. 102530f1ac3bcSmrg : 102540f1ac3bcSmrgelse 102550f1ac3bcSmrg AC_MSG_ERROR([newly created file is older than distributed files! 102560f1ac3bcSmrgCheck your system clock]) 102570f1ac3bcSmrgfi 102580f1ac3bcSmrgAC_MSG_RESULT([yes]) 102590f1ac3bcSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 102600f1ac3bcSmrg# generated files are strictly newer. 102610f1ac3bcSmrgam_sleep_pid= 102620f1ac3bcSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 102630f1ac3bcSmrg ( sleep 1 ) & 102640f1ac3bcSmrg am_sleep_pid=$! 102650f1ac3bcSmrgfi 102660f1ac3bcSmrgAC_CONFIG_COMMANDS_PRE( 102670f1ac3bcSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 102680f1ac3bcSmrg if test -n "$am_sleep_pid"; then 102690f1ac3bcSmrg # Hide warnings about reused PIDs. 102700f1ac3bcSmrg wait $am_sleep_pid 2>/dev/null 102710f1ac3bcSmrg fi 102720f1ac3bcSmrg AC_MSG_RESULT([done])]) 102730f1ac3bcSmrgrm -f conftest.file 102740f1ac3bcSmrg]) 102750f1ac3bcSmrg 10276b0a0317aSmrg# Copyright (C) 2009-2020 Free Software Foundation, Inc. 102773e6c936aSmrg# 102780f1ac3bcSmrg# This file is free software; the Free Software Foundation 102790f1ac3bcSmrg# gives unlimited permission to copy and/or distribute it, 102800f1ac3bcSmrg# with or without modifications, as long as this notice is preserved. 102813e6c936aSmrg 102820f1ac3bcSmrg# AM_SILENT_RULES([DEFAULT]) 102830f1ac3bcSmrg# -------------------------- 102840f1ac3bcSmrg# Enable less verbose build rules; with the default set to DEFAULT 102850f1ac3bcSmrg# ("yes" being less verbose, "no" or empty being verbose). 102860f1ac3bcSmrgAC_DEFUN([AM_SILENT_RULES], 102870f1ac3bcSmrg[AC_ARG_ENABLE([silent-rules], [dnl 102880f1ac3bcSmrgAS_HELP_STRING( 102890f1ac3bcSmrg [--enable-silent-rules], 102900f1ac3bcSmrg [less verbose build output (undo: "make V=1")]) 102910f1ac3bcSmrgAS_HELP_STRING( 102920f1ac3bcSmrg [--disable-silent-rules], 102930f1ac3bcSmrg [verbose build output (undo: "make V=0")])dnl 102940f1ac3bcSmrg]) 102950f1ac3bcSmrgcase $enable_silent_rules in @%:@ ((( 102960f1ac3bcSmrg yes) AM_DEFAULT_VERBOSITY=0;; 102970f1ac3bcSmrg no) AM_DEFAULT_VERBOSITY=1;; 102980f1ac3bcSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 102990f1ac3bcSmrgesac 103000f1ac3bcSmrgdnl 103010f1ac3bcSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 103020f1ac3bcSmrgdnl do not support nested variable expansions. 103030f1ac3bcSmrgdnl See automake bug#9928 and bug#10237. 103040f1ac3bcSmrgam_make=${MAKE-make} 103050f1ac3bcSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 103060f1ac3bcSmrg [am_cv_make_support_nested_variables], 103070f1ac3bcSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 103080f1ac3bcSmrgBAR0=false 103090f1ac3bcSmrgBAR1=true 103100f1ac3bcSmrgV=1 103110f1ac3bcSmrgam__doit: 103120f1ac3bcSmrg @$(TRUE) 103130f1ac3bcSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 103140f1ac3bcSmrg am_cv_make_support_nested_variables=yes 103150f1ac3bcSmrgelse 103160f1ac3bcSmrg am_cv_make_support_nested_variables=no 103170f1ac3bcSmrgfi]) 103180f1ac3bcSmrgif test $am_cv_make_support_nested_variables = yes; then 103190f1ac3bcSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 103200f1ac3bcSmrg AM_V='$(V)' 103210f1ac3bcSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 103220f1ac3bcSmrgelse 103230f1ac3bcSmrg AM_V=$AM_DEFAULT_VERBOSITY 103240f1ac3bcSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 10325ff63a143Smrgfi 103260f1ac3bcSmrgAC_SUBST([AM_V])dnl 103270f1ac3bcSmrgAM_SUBST_NOTMAKE([AM_V])dnl 103280f1ac3bcSmrgAC_SUBST([AM_DEFAULT_V])dnl 103290f1ac3bcSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 103300f1ac3bcSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 103310f1ac3bcSmrgAM_BACKSLASH='\' 103320f1ac3bcSmrgAC_SUBST([AM_BACKSLASH])dnl 103330f1ac3bcSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 103340f1ac3bcSmrg]) 103354456fccdSmrg 10336b0a0317aSmrg# Copyright (C) 2001-2020 Free Software Foundation, Inc. 10337ff63a143Smrg# 103380f1ac3bcSmrg# This file is free software; the Free Software Foundation 103390f1ac3bcSmrg# gives unlimited permission to copy and/or distribute it, 103400f1ac3bcSmrg# with or without modifications, as long as this notice is preserved. 103413e6c936aSmrg 103420f1ac3bcSmrg# AM_PROG_INSTALL_STRIP 103430f1ac3bcSmrg# --------------------- 103440f1ac3bcSmrg# One issue with vendor 'install' (even GNU) is that you can't 103450f1ac3bcSmrg# specify the program used to strip binaries. This is especially 103460f1ac3bcSmrg# annoying in cross-compiling environments, where the build's strip 103470f1ac3bcSmrg# is unlikely to handle the host's binaries. 103480f1ac3bcSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 103490f1ac3bcSmrg# always use install-sh in "make install-strip", and initialize 103500f1ac3bcSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 103510f1ac3bcSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 103520f1ac3bcSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 103530f1ac3bcSmrg# Installed binaries are usually stripped using 'strip' when the user 103540f1ac3bcSmrg# run "make install-strip". However 'strip' might not be the right 103550f1ac3bcSmrg# tool to use in cross-compilation environments, therefore Automake 103560f1ac3bcSmrg# will honor the 'STRIP' environment variable to overrule this program. 103570f1ac3bcSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 103580f1ac3bcSmrgif test "$cross_compiling" != no; then 103590f1ac3bcSmrg AC_CHECK_TOOL([STRIP], [strip], :) 103600f1ac3bcSmrgfi 103610f1ac3bcSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 103620f1ac3bcSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 103633e6c936aSmrg 10364b0a0317aSmrg# Copyright (C) 2006-2020 Free Software Foundation, Inc. 103650f1ac3bcSmrg# 103660f1ac3bcSmrg# This file is free software; the Free Software Foundation 103670f1ac3bcSmrg# gives unlimited permission to copy and/or distribute it, 103680f1ac3bcSmrg# with or without modifications, as long as this notice is preserved. 103694456fccdSmrg 103700f1ac3bcSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 103710f1ac3bcSmrg# --------------------------- 103720f1ac3bcSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 103730f1ac3bcSmrg# This macro is traced by Automake. 103740f1ac3bcSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 103753e6c936aSmrg 103760f1ac3bcSmrg# AM_SUBST_NOTMAKE(VARIABLE) 103770f1ac3bcSmrg# -------------------------- 103780f1ac3bcSmrg# Public sister of _AM_SUBST_NOTMAKE. 103790f1ac3bcSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 103803e6c936aSmrg 103810f1ac3bcSmrg# Check how to create a tarball. -*- Autoconf -*- 103820f1ac3bcSmrg 10383b0a0317aSmrg# Copyright (C) 2004-2020 Free Software Foundation, Inc. 10384ff63a143Smrg# 103850f1ac3bcSmrg# This file is free software; the Free Software Foundation 103860f1ac3bcSmrg# gives unlimited permission to copy and/or distribute it, 103870f1ac3bcSmrg# with or without modifications, as long as this notice is preserved. 103880f1ac3bcSmrg 103890f1ac3bcSmrg# _AM_PROG_TAR(FORMAT) 103900f1ac3bcSmrg# -------------------- 103910f1ac3bcSmrg# Check how to create a tarball in format FORMAT. 103920f1ac3bcSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 10393ff63a143Smrg# 103940f1ac3bcSmrg# Substitute a variable $(am__tar) that is a command 103950f1ac3bcSmrg# writing to stdout a FORMAT-tarball containing the directory 103960f1ac3bcSmrg# $tardir. 103970f1ac3bcSmrg# tardir=directory && $(am__tar) > result.tar 10398ff63a143Smrg# 103990f1ac3bcSmrg# Substitute a variable $(am__untar) that extract such 104000f1ac3bcSmrg# a tarball read from stdin. 104010f1ac3bcSmrg# $(am__untar) < result.tar 10402ff63a143Smrg# 104030f1ac3bcSmrgAC_DEFUN([_AM_PROG_TAR], 104040f1ac3bcSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 104050f1ac3bcSmrg# in the wild :-( We should find a proper way to deprecate it ... 104060f1ac3bcSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 104074456fccdSmrg 104080f1ac3bcSmrg# We'll loop over all known methods to create a tar archive until one works. 104090f1ac3bcSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 104104456fccdSmrg 104110f1ac3bcSmrgm4_if([$1], [v7], 104120f1ac3bcSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 104133e6c936aSmrg 104140f1ac3bcSmrg [m4_case([$1], 104150f1ac3bcSmrg [ustar], 104160f1ac3bcSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 104170f1ac3bcSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 104180f1ac3bcSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 104190f1ac3bcSmrg # and bug#13588). 104200f1ac3bcSmrg am_max_uid=2097151 # 2^21 - 1 104210f1ac3bcSmrg am_max_gid=$am_max_uid 104220f1ac3bcSmrg # The $UID and $GID variables are not portable, so we need to resort 104230f1ac3bcSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 104240f1ac3bcSmrg # below are definitely unexpected, so allow the users to see them 104250f1ac3bcSmrg # (that is, avoid stderr redirection). 104260f1ac3bcSmrg am_uid=`id -u || echo unknown` 104270f1ac3bcSmrg am_gid=`id -g || echo unknown` 104280f1ac3bcSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 104290f1ac3bcSmrg if test $am_uid -le $am_max_uid; then 104300f1ac3bcSmrg AC_MSG_RESULT([yes]) 104310f1ac3bcSmrg else 104320f1ac3bcSmrg AC_MSG_RESULT([no]) 104330f1ac3bcSmrg _am_tools=none 104340f1ac3bcSmrg fi 104350f1ac3bcSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 104360f1ac3bcSmrg if test $am_gid -le $am_max_gid; then 104370f1ac3bcSmrg AC_MSG_RESULT([yes]) 104380f1ac3bcSmrg else 104390f1ac3bcSmrg AC_MSG_RESULT([no]) 104400f1ac3bcSmrg _am_tools=none 104410f1ac3bcSmrg fi], 104423e6c936aSmrg 104430f1ac3bcSmrg [pax], 104440f1ac3bcSmrg [], 104453e6c936aSmrg 104460f1ac3bcSmrg [m4_fatal([Unknown tar format])]) 104473e6c936aSmrg 104480f1ac3bcSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 104493e6c936aSmrg 104500f1ac3bcSmrg # Go ahead even if we have the value already cached. We do so because we 104510f1ac3bcSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 104520f1ac3bcSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 104533e6c936aSmrg 104540f1ac3bcSmrg for _am_tool in $_am_tools; do 104550f1ac3bcSmrg case $_am_tool in 104560f1ac3bcSmrg gnutar) 104570f1ac3bcSmrg for _am_tar in tar gnutar gtar; do 104580f1ac3bcSmrg AM_RUN_LOG([$_am_tar --version]) && break 104590f1ac3bcSmrg done 104600f1ac3bcSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 104610f1ac3bcSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 104620f1ac3bcSmrg am__untar="$_am_tar -xf -" 104630f1ac3bcSmrg ;; 104640f1ac3bcSmrg plaintar) 104650f1ac3bcSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 104660f1ac3bcSmrg # ustar tarball either. 104670f1ac3bcSmrg (tar --version) >/dev/null 2>&1 && continue 104680f1ac3bcSmrg am__tar='tar chf - "$$tardir"' 104690f1ac3bcSmrg am__tar_='tar chf - "$tardir"' 104700f1ac3bcSmrg am__untar='tar xf -' 104710f1ac3bcSmrg ;; 104720f1ac3bcSmrg pax) 104730f1ac3bcSmrg am__tar='pax -L -x $1 -w "$$tardir"' 104740f1ac3bcSmrg am__tar_='pax -L -x $1 -w "$tardir"' 104750f1ac3bcSmrg am__untar='pax -r' 104760f1ac3bcSmrg ;; 104770f1ac3bcSmrg cpio) 104780f1ac3bcSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 104790f1ac3bcSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 104800f1ac3bcSmrg am__untar='cpio -i -H $1 -d' 104810f1ac3bcSmrg ;; 104820f1ac3bcSmrg none) 104830f1ac3bcSmrg am__tar=false 104840f1ac3bcSmrg am__tar_=false 104850f1ac3bcSmrg am__untar=false 104860f1ac3bcSmrg ;; 104870f1ac3bcSmrg esac 104883e6c936aSmrg 104890f1ac3bcSmrg # If the value was cached, stop now. We just wanted to have am__tar 104900f1ac3bcSmrg # and am__untar set. 104910f1ac3bcSmrg test -n "${am_cv_prog_tar_$1}" && break 104923e6c936aSmrg 104930f1ac3bcSmrg # tar/untar a dummy directory, and stop if the command works. 104940f1ac3bcSmrg rm -rf conftest.dir 104950f1ac3bcSmrg mkdir conftest.dir 104960f1ac3bcSmrg echo GrepMe > conftest.dir/file 104970f1ac3bcSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 104980f1ac3bcSmrg rm -rf conftest.dir 104990f1ac3bcSmrg if test -s conftest.tar; then 105000f1ac3bcSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 105010f1ac3bcSmrg AM_RUN_LOG([cat conftest.dir/file]) 105020f1ac3bcSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 105030f1ac3bcSmrg fi 105040f1ac3bcSmrg done 105050f1ac3bcSmrg rm -rf conftest.dir 105060f1ac3bcSmrg 105070f1ac3bcSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 105080f1ac3bcSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 105090f1ac3bcSmrg 105100f1ac3bcSmrgAC_SUBST([am__tar]) 105110f1ac3bcSmrgAC_SUBST([am__untar]) 105120f1ac3bcSmrg]) # _AM_PROG_TAR 105134456fccdSmrg 105143e6c936aSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 105153e6c936aSmrgdnl 105160f1ac3bcSmrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 105170f1ac3bcSmrgdnl 105183e6c936aSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 105193e6c936aSmrgdnl copy of this software and associated documentation files (the "Software"), 105203e6c936aSmrgdnl to deal in the Software without restriction, including without limitation 105213e6c936aSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 105223e6c936aSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 105233e6c936aSmrgdnl Software is furnished to do so, subject to the following conditions: 105243e6c936aSmrgdnl 105253e6c936aSmrgdnl The above copyright notice and this permission notice (including the next 105263e6c936aSmrgdnl paragraph) shall be included in all copies or substantial portions of the 105273e6c936aSmrgdnl Software. 105283e6c936aSmrgdnl 105293e6c936aSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 105303e6c936aSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 105313e6c936aSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 105323e6c936aSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 105333e6c936aSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 105343e6c936aSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 105353e6c936aSmrgdnl DEALINGS IN THE SOFTWARE. 105364456fccdSmrg 105373e6c936aSmrg# XORG_MACROS_VERSION(required-version) 105383e6c936aSmrg# ------------------------------------- 10539ff63a143Smrg# Minimum version: 1.1.0 10540ff63a143Smrg# 105413e6c936aSmrg# If you're using a macro added in Version 1.1 or newer, include this in 105423e6c936aSmrg# your configure.ac with the minimum required version, such as: 105433e6c936aSmrg# XORG_MACROS_VERSION(1.1) 10544ff63a143Smrg# 105453e6c936aSmrg# To ensure that this macro is defined, also add: 105463e6c936aSmrg# m4_ifndef([XORG_MACROS_VERSION], 105473e6c936aSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 10548ff63a143Smrg# 10549ff63a143Smrg# 105500f1ac3bcSmrg# See the "minimum version" comment for each macro you use to see what 105513e6c936aSmrg# version you require. 105523e6c936aSmrgm4_defun([XORG_MACROS_VERSION],[ 10553b0a0317aSmrgm4_define([vers_have], [1.19.2]) 105543e6c936aSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 105553e6c936aSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 105563e6c936aSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 105573e6c936aSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 105583e6c936aSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 105593e6c936aSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 105603e6c936aSmrgm4_undefine([vers_have]) 105613e6c936aSmrgm4_undefine([maj_have]) 105623e6c936aSmrgm4_undefine([maj_needed]) 105633e6c936aSmrg]) # XORG_MACROS_VERSION 105644456fccdSmrg 105653e6c936aSmrg# XORG_PROG_RAWCPP() 105663e6c936aSmrg# ------------------ 105673e6c936aSmrg# Minimum version: 1.0.0 105683e6c936aSmrg# 105693e6c936aSmrg# Find cpp program and necessary flags for use in pre-processing text files 105703e6c936aSmrg# such as man pages and config files 105713e6c936aSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 105723e6c936aSmrgAC_REQUIRE([AC_PROG_CPP]) 10573b0a0317aSmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 105743e6c936aSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 105754456fccdSmrg 105763e6c936aSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 105773e6c936aSmrg# which is not the best choice for supporting other OS'es, but covers most 105783e6c936aSmrg# of the ones we need for now. 105793e6c936aSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 105803e6c936aSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 105813e6c936aSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 105823e6c936aSmrg AC_MSG_RESULT([no]) 10583ff63a143Smrgelse 105843e6c936aSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 105853e6c936aSmrg RAWCPPFLAGS=-undef 105863e6c936aSmrg AC_MSG_RESULT([yes]) 105873e6c936aSmrg # under Cygwin unix is still defined even with -undef 105883e6c936aSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 105893e6c936aSmrg RAWCPPFLAGS="-undef -ansi" 105903e6c936aSmrg AC_MSG_RESULT([yes, with -ansi]) 105913e6c936aSmrg else 105923e6c936aSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 105933e6c936aSmrg fi 10594ff63a143Smrgfi 105953e6c936aSmrgrm -f conftest.$ac_ext 105964456fccdSmrg 105973e6c936aSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 105983e6c936aSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 105993e6c936aSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 106003e6c936aSmrg AC_MSG_RESULT([no]) 106013e6c936aSmrgelse 106023e6c936aSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 106030f1ac3bcSmrg TRADITIONALCPPFLAGS="-traditional" 106043e6c936aSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 106053e6c936aSmrg AC_MSG_RESULT([yes]) 106063e6c936aSmrg else 106073e6c936aSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 106083e6c936aSmrg fi 10609ff63a143Smrgfi 106103e6c936aSmrgrm -f conftest.$ac_ext 106113e6c936aSmrgAC_SUBST(RAWCPPFLAGS) 106120f1ac3bcSmrgAC_SUBST(TRADITIONALCPPFLAGS) 106133e6c936aSmrg]) # XORG_PROG_RAWCPP 106144456fccdSmrg 106153e6c936aSmrg# XORG_MANPAGE_SECTIONS() 106163e6c936aSmrg# ----------------------- 106173e6c936aSmrg# Minimum version: 1.0.0 10618ff63a143Smrg# 106193e6c936aSmrg# Determine which sections man pages go in for the different man page types 106203e6c936aSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 106213e6c936aSmrg# Not sure if there's any better way than just hardcoding by OS name. 106223e6c936aSmrg# Override default settings by setting environment variables 106233e6c936aSmrg# Added MAN_SUBSTS in version 1.8 106243e6c936aSmrg# Added AC_PROG_SED in version 1.8 106254456fccdSmrg 106263e6c936aSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 106273e6c936aSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 106283e6c936aSmrgAC_REQUIRE([AC_PROG_SED]) 106294456fccdSmrg 10630b0a0317aSmrgcase $host_os in 10631b0a0317aSmrg solaris*) 10632b0a0317aSmrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 10633b0a0317aSmrg # check for a man page file found in later versions that use 10634b0a0317aSmrg # traditional section numbers instead 10635b0a0317aSmrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 10636b0a0317aSmrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 10637b0a0317aSmrg ;; 10638b0a0317aSmrg *) SYSV_MAN_SECTIONS=false ;; 10639b0a0317aSmrgesac 10640b0a0317aSmrg 106413e6c936aSmrgif test x$APP_MAN_SUFFIX = x ; then 106423e6c936aSmrg APP_MAN_SUFFIX=1 106433e6c936aSmrgfi 106443e6c936aSmrgif test x$APP_MAN_DIR = x ; then 106453e6c936aSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 10646ff63a143Smrgfi 1064742d69509Smrg 106483e6c936aSmrgif test x$LIB_MAN_SUFFIX = x ; then 106493e6c936aSmrg LIB_MAN_SUFFIX=3 106503e6c936aSmrgfi 106513e6c936aSmrgif test x$LIB_MAN_DIR = x ; then 106523e6c936aSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 106533e6c936aSmrgfi 106544456fccdSmrg 106553e6c936aSmrgif test x$FILE_MAN_SUFFIX = x ; then 10656b0a0317aSmrg case $SYSV_MAN_SECTIONS in 10657b0a0317aSmrg true) FILE_MAN_SUFFIX=4 ;; 106580f1ac3bcSmrg *) FILE_MAN_SUFFIX=5 ;; 106593e6c936aSmrg esac 106603e6c936aSmrgfi 106613e6c936aSmrgif test x$FILE_MAN_DIR = x ; then 106623e6c936aSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 106633e6c936aSmrgfi 1066442d69509Smrg 106653e6c936aSmrgif test x$MISC_MAN_SUFFIX = x ; then 10666b0a0317aSmrg case $SYSV_MAN_SECTIONS in 10667b0a0317aSmrg true) MISC_MAN_SUFFIX=5 ;; 106680f1ac3bcSmrg *) MISC_MAN_SUFFIX=7 ;; 10669ff63a143Smrg esac 10670ff63a143Smrgfi 106713e6c936aSmrgif test x$MISC_MAN_DIR = x ; then 106723e6c936aSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 106733e6c936aSmrgfi 106744456fccdSmrg 106753e6c936aSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 10676b0a0317aSmrg case $SYSV_MAN_SECTIONS in 10677b0a0317aSmrg true) DRIVER_MAN_SUFFIX=7 ;; 106780f1ac3bcSmrg *) DRIVER_MAN_SUFFIX=4 ;; 106793e6c936aSmrg esac 106803e6c936aSmrgfi 106813e6c936aSmrgif test x$DRIVER_MAN_DIR = x ; then 106823e6c936aSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 106833e6c936aSmrgfi 106844456fccdSmrg 106853e6c936aSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 10686b0a0317aSmrg case $SYSV_MAN_SECTIONS in 10687b0a0317aSmrg true) ADMIN_MAN_SUFFIX=1m ;; 106880f1ac3bcSmrg *) ADMIN_MAN_SUFFIX=8 ;; 106893e6c936aSmrg esac 106903e6c936aSmrgfi 106913e6c936aSmrgif test x$ADMIN_MAN_DIR = x ; then 106923e6c936aSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 10693ff63a143Smrgfi 106944456fccdSmrg 106954456fccdSmrg 106963e6c936aSmrgAC_SUBST([APP_MAN_SUFFIX]) 106973e6c936aSmrgAC_SUBST([LIB_MAN_SUFFIX]) 106983e6c936aSmrgAC_SUBST([FILE_MAN_SUFFIX]) 106993e6c936aSmrgAC_SUBST([MISC_MAN_SUFFIX]) 107003e6c936aSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 107013e6c936aSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 107023e6c936aSmrgAC_SUBST([APP_MAN_DIR]) 107033e6c936aSmrgAC_SUBST([LIB_MAN_DIR]) 107043e6c936aSmrgAC_SUBST([FILE_MAN_DIR]) 107053e6c936aSmrgAC_SUBST([MISC_MAN_DIR]) 107063e6c936aSmrgAC_SUBST([DRIVER_MAN_DIR]) 107073e6c936aSmrgAC_SUBST([ADMIN_MAN_DIR]) 107083e6c936aSmrg 107093e6c936aSmrgXORG_MAN_PAGE="X Version 11" 107103e6c936aSmrgAC_SUBST([XORG_MAN_PAGE]) 107113e6c936aSmrgMAN_SUBSTS="\ 107123e6c936aSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 107133e6c936aSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 107143e6c936aSmrg -e 's|__xservername__|Xorg|g' \ 107153e6c936aSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 107163e6c936aSmrg -e 's|__projectroot__|\$(prefix)|g' \ 107173e6c936aSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 107183e6c936aSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 107193e6c936aSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 107203e6c936aSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 107213e6c936aSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 107223e6c936aSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 107233e6c936aSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 107243e6c936aSmrgAC_SUBST([MAN_SUBSTS]) 107253e6c936aSmrg 107263e6c936aSmrg]) # XORG_MANPAGE_SECTIONS 107273e6c936aSmrg 107283e6c936aSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 107293e6c936aSmrg# ------------------------ 107303e6c936aSmrg# Minimum version: 1.7.0 10731ff63a143Smrg# 107323e6c936aSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 107333e6c936aSmrg# provided by xorg-sgml-doctools, if installed. 107343e6c936aSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 107353e6c936aSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 107363e6c936aSmrgXORG_SGML_PATH= 107373e6c936aSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 107383e6c936aSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 107393e6c936aSmrg [m4_ifval([$1],[:], 107403e6c936aSmrg [if test x"$cross_compiling" != x"yes" ; then 107413e6c936aSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 107423e6c936aSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 107433e6c936aSmrg fi]) 107443e6c936aSmrg ]) 107454456fccdSmrg 107463e6c936aSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 107473e6c936aSmrg# the path and the name of the doc stylesheet 107483e6c936aSmrgif test "x$XORG_SGML_PATH" != "x" ; then 107493e6c936aSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 107503e6c936aSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 107513e6c936aSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 107523e6c936aSmrgelse 107533e6c936aSmrg AC_MSG_RESULT([no]) 107543e6c936aSmrgfi 107553e6c936aSmrg 107563e6c936aSmrgAC_SUBST(XORG_SGML_PATH) 107573e6c936aSmrgAC_SUBST(STYLESHEET_SRCDIR) 107583e6c936aSmrgAC_SUBST(XSL_STYLESHEET) 107593e6c936aSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 107603e6c936aSmrg]) # XORG_CHECK_SGML_DOCTOOLS 107614456fccdSmrg 107623e6c936aSmrg# XORG_CHECK_LINUXDOC 107633e6c936aSmrg# ------------------- 107643e6c936aSmrg# Minimum version: 1.0.0 10765ff63a143Smrg# 107663e6c936aSmrg# Defines the variable MAKE_TEXT if the necessary tools and 107673e6c936aSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 107683e6c936aSmrg# Whether or not the necessary tools and files are found can be checked 107693e6c936aSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 107703e6c936aSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 107713e6c936aSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 107723e6c936aSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 10773521070a0Smrg 107743e6c936aSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 10775521070a0Smrg 107763e6c936aSmrgAC_MSG_CHECKING([whether to build documentation]) 10777521070a0Smrg 107783e6c936aSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 107793e6c936aSmrg BUILDDOC=yes 107803e6c936aSmrgelse 107813e6c936aSmrg BUILDDOC=no 107823e6c936aSmrgfi 10783521070a0Smrg 107843e6c936aSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10785521070a0Smrg 107863e6c936aSmrgAC_MSG_RESULT([$BUILDDOC]) 107873e6c936aSmrg 107883e6c936aSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 107893e6c936aSmrg 107903e6c936aSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 107913e6c936aSmrg BUILDPDFDOC=yes 107923e6c936aSmrgelse 107933e6c936aSmrg BUILDPDFDOC=no 107943e6c936aSmrgfi 107953e6c936aSmrg 107963e6c936aSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 107973e6c936aSmrg 107983e6c936aSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 107993e6c936aSmrg 108003e6c936aSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 108013e6c936aSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 108023e6c936aSmrgMAKE_PDF="$PS2PDF" 108033e6c936aSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 108043e6c936aSmrg 108053e6c936aSmrgAC_SUBST(MAKE_TEXT) 108063e6c936aSmrgAC_SUBST(MAKE_PS) 108073e6c936aSmrgAC_SUBST(MAKE_PDF) 108083e6c936aSmrgAC_SUBST(MAKE_HTML) 108093e6c936aSmrg]) # XORG_CHECK_LINUXDOC 10810521070a0Smrg 108113e6c936aSmrg# XORG_CHECK_DOCBOOK 108123e6c936aSmrg# ------------------- 108133e6c936aSmrg# Minimum version: 1.0.0 10814ff63a143Smrg# 108153e6c936aSmrg# Checks for the ability to build output formats from SGML DocBook source. 108163e6c936aSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 108173e6c936aSmrg# indicates whether the necessary tools and files are found and, if set, 108183e6c936aSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 108193e6c936aSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 108203e6c936aSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10821521070a0Smrg 108223e6c936aSmrgBUILDTXTDOC=no 108233e6c936aSmrgBUILDPDFDOC=no 108243e6c936aSmrgBUILDPSDOC=no 108253e6c936aSmrgBUILDHTMLDOC=no 108263e6c936aSmrg 108273e6c936aSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 108283e6c936aSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 108293e6c936aSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 108303e6c936aSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 108313e6c936aSmrg 108323e6c936aSmrgAC_MSG_CHECKING([whether to build text documentation]) 108333e6c936aSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 108343e6c936aSmrg test x$BUILD_TXTDOC != xno; then 108353e6c936aSmrg BUILDTXTDOC=yes 108363e6c936aSmrgfi 108373e6c936aSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 108383e6c936aSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 108393e6c936aSmrg 108403e6c936aSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 108413e6c936aSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 108423e6c936aSmrg test x$BUILD_PDFDOC != xno; then 108433e6c936aSmrg BUILDPDFDOC=yes 108443e6c936aSmrgfi 108453e6c936aSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 108463e6c936aSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 108473e6c936aSmrg 108483e6c936aSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 108493e6c936aSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 108503e6c936aSmrg test x$BUILD_PSDOC != xno; then 108513e6c936aSmrg BUILDPSDOC=yes 108523e6c936aSmrgfi 108533e6c936aSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 108543e6c936aSmrgAC_MSG_RESULT([$BUILDPSDOC]) 108553e6c936aSmrg 108563e6c936aSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 108573e6c936aSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 108583e6c936aSmrg test x$BUILD_HTMLDOC != xno; then 108593e6c936aSmrg BUILDHTMLDOC=yes 108603e6c936aSmrgfi 108613e6c936aSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 108623e6c936aSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 108633e6c936aSmrg 108643e6c936aSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 108653e6c936aSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 108663e6c936aSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 108673e6c936aSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 108683e6c936aSmrg 108693e6c936aSmrgAC_SUBST(MAKE_TEXT) 108703e6c936aSmrgAC_SUBST(MAKE_PS) 108713e6c936aSmrgAC_SUBST(MAKE_PDF) 108723e6c936aSmrgAC_SUBST(MAKE_HTML) 108733e6c936aSmrg]) # XORG_CHECK_DOCBOOK 108743e6c936aSmrg 108753e6c936aSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 108763e6c936aSmrg# ---------------- 108773e6c936aSmrg# Minimum version: 1.5.0 108783e6c936aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10879ff63a143Smrg# 108803e6c936aSmrg# Documentation tools are not always available on all platforms and sometimes 108813e6c936aSmrg# not at the appropriate level. This macro enables a module to test for the 108823e6c936aSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 108833e6c936aSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 108843e6c936aSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 108853e6c936aSmrg# --with-xmlto assumes 'auto'. 10886ff63a143Smrg# 108873e6c936aSmrg# Interface to module: 108883e6c936aSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 108893e6c936aSmrg# XMLTO: returns the path of the xmlto program found 108903e6c936aSmrg# returns the path set by the user in the environment 108913e6c936aSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 108923e6c936aSmrg# 'no' user instructs the module not to use xmlto 10893ff63a143Smrg# 108943e6c936aSmrg# Added in version 1.10.0 108953e6c936aSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 108963e6c936aSmrg# xmlto for text output requires either lynx, links, or w3m browsers 10897ff63a143Smrg# 108983e6c936aSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 10899ff63a143Smrg# 109003e6c936aSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 109013e6c936aSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 109023e6c936aSmrgm4_define([_defopt], m4_default([$2], [auto])) 109033e6c936aSmrgAC_ARG_WITH(xmlto, 109043e6c936aSmrg AS_HELP_STRING([--with-xmlto], 109053e6c936aSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 109063e6c936aSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 109073e6c936aSmrgm4_undefine([_defopt]) 10908521070a0Smrg 109093e6c936aSmrgif test "x$use_xmlto" = x"auto"; then 109103e6c936aSmrg AC_PATH_PROG([XMLTO], [xmlto]) 109113e6c936aSmrg if test "x$XMLTO" = "x"; then 109123e6c936aSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 109133e6c936aSmrg have_xmlto=no 109143e6c936aSmrg else 109153e6c936aSmrg have_xmlto=yes 109163e6c936aSmrg fi 109173e6c936aSmrgelif test "x$use_xmlto" = x"yes" ; then 109183e6c936aSmrg AC_PATH_PROG([XMLTO], [xmlto]) 109193e6c936aSmrg if test "x$XMLTO" = "x"; then 109203e6c936aSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 109213e6c936aSmrg fi 109223e6c936aSmrg have_xmlto=yes 109233e6c936aSmrgelif test "x$use_xmlto" = x"no" ; then 109243e6c936aSmrg if test "x$XMLTO" != "x"; then 109253e6c936aSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 109263e6c936aSmrg fi 109273e6c936aSmrg have_xmlto=no 109283e6c936aSmrgelse 109293e6c936aSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 109303e6c936aSmrgfi 109314456fccdSmrg 109323e6c936aSmrg# Test for a minimum version of xmlto, if provided. 109333e6c936aSmrgm4_ifval([$1], 109343e6c936aSmrg[if test "$have_xmlto" = yes; then 109353e6c936aSmrg # scrape the xmlto version 109363e6c936aSmrg AC_MSG_CHECKING([the xmlto version]) 109373e6c936aSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 109383e6c936aSmrg AC_MSG_RESULT([$xmlto_version]) 109393e6c936aSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 109403e6c936aSmrg [if test "x$use_xmlto" = xauto; then 109413e6c936aSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 109423e6c936aSmrg have_xmlto=no 109433e6c936aSmrg else 109443e6c936aSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 109453e6c936aSmrg fi]) 109463e6c936aSmrgfi]) 109473e6c936aSmrg 109483e6c936aSmrg# Test for the ability of xmlto to generate a text target 109490f1ac3bcSmrg# 109500f1ac3bcSmrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 109510f1ac3bcSmrg# following test for empty XML docbook files. 109520f1ac3bcSmrg# For compatibility reasons use the following empty XML docbook file and if 109530f1ac3bcSmrg# it fails try it again with a non-empty XML file. 109543e6c936aSmrghave_xmlto_text=no 109553e6c936aSmrgcat > conftest.xml << "EOF" 109563e6c936aSmrgEOF 109573e6c936aSmrgAS_IF([test "$have_xmlto" = yes], 109583e6c936aSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 109593e6c936aSmrg [have_xmlto_text=yes], 109600f1ac3bcSmrg [# Try it again with a non-empty XML file. 109610f1ac3bcSmrg cat > conftest.xml << "EOF" 109620f1ac3bcSmrg<x></x> 109630f1ac3bcSmrgEOF 109640f1ac3bcSmrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 109650f1ac3bcSmrg [have_xmlto_text=yes], 109660f1ac3bcSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 109673e6c936aSmrgrm -f conftest.xml 109683e6c936aSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 109693e6c936aSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 109703e6c936aSmrg]) # XORG_WITH_XMLTO 109714456fccdSmrg 109723e6c936aSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 109733e6c936aSmrg# -------------------------------------------- 109743e6c936aSmrg# Minimum version: 1.12.0 109753e6c936aSmrg# Minimum version for optional DEFAULT argument: 1.12.0 10976ff63a143Smrg# 109773e6c936aSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 109783e6c936aSmrg# XML-based language used for the transformation of XML documents. 109793e6c936aSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 109803e6c936aSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 109813e6c936aSmrg# The XSLT processor is often used as a standalone tool for transformations. 109823e6c936aSmrg# It should not be assumed that this tool is used only to work with documnetation. 109833e6c936aSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 109843e6c936aSmrg# 109853e6c936aSmrg# Interface to module: 109863e6c936aSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 109873e6c936aSmrg# XSLTPROC: returns the path of the xsltproc program found 109883e6c936aSmrg# returns the path set by the user in the environment 109893e6c936aSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 109903e6c936aSmrg# 'no' user instructs the module not to use xsltproc 109913e6c936aSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 109923e6c936aSmrg# 109933e6c936aSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 109943e6c936aSmrg# 109953e6c936aSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 109963e6c936aSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 109973e6c936aSmrg# Preserves the interface, should it be implemented later 109983e6c936aSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 109993e6c936aSmrgm4_define([_defopt], m4_default([$2], [auto])) 110003e6c936aSmrgAC_ARG_WITH(xsltproc, 110013e6c936aSmrg AS_HELP_STRING([--with-xsltproc], 110023e6c936aSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 110033e6c936aSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 110043e6c936aSmrgm4_undefine([_defopt]) 110053e6c936aSmrg 110063e6c936aSmrgif test "x$use_xsltproc" = x"auto"; then 110073e6c936aSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 110083e6c936aSmrg if test "x$XSLTPROC" = "x"; then 110093e6c936aSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 110103e6c936aSmrg have_xsltproc=no 110113e6c936aSmrg else 110123e6c936aSmrg have_xsltproc=yes 110133e6c936aSmrg fi 110143e6c936aSmrgelif test "x$use_xsltproc" = x"yes" ; then 110153e6c936aSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 110163e6c936aSmrg if test "x$XSLTPROC" = "x"; then 110173e6c936aSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 110183e6c936aSmrg fi 110193e6c936aSmrg have_xsltproc=yes 110203e6c936aSmrgelif test "x$use_xsltproc" = x"no" ; then 110213e6c936aSmrg if test "x$XSLTPROC" != "x"; then 110223e6c936aSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 110233e6c936aSmrg fi 110243e6c936aSmrg have_xsltproc=no 11025ff63a143Smrgelse 110263e6c936aSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 11027ff63a143Smrgfi 110284456fccdSmrg 110293e6c936aSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 110303e6c936aSmrg]) # XORG_WITH_XSLTPROC 110314456fccdSmrg 110323e6c936aSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 110333e6c936aSmrg# ---------------------------------------- 110343e6c936aSmrg# Minimum version: 1.15.0 11035ff63a143Smrg# 110363e6c936aSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 110373e6c936aSmrg# scanning arbitrary text files, extracting information from those text files, 110383e6c936aSmrg# and printing reports based on that information. 110393e6c936aSmrg# 110403e6c936aSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 110413e6c936aSmrg# 110423e6c936aSmrg# Interface to module: 110433e6c936aSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 110443e6c936aSmrg# PERL: returns the path of the perl program found 110453e6c936aSmrg# returns the path set by the user in the environment 110463e6c936aSmrg# --with-perl: 'yes' user instructs the module to use perl 110473e6c936aSmrg# 'no' user instructs the module not to use perl 110483e6c936aSmrg# have_perl: returns yes if perl found in PATH or no 110493e6c936aSmrg# 110503e6c936aSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 110513e6c936aSmrg# 110523e6c936aSmrgAC_DEFUN([XORG_WITH_PERL],[ 110533e6c936aSmrgAC_ARG_VAR([PERL], [Path to perl command]) 110543e6c936aSmrg# Preserves the interface, should it be implemented later 110553e6c936aSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 110563e6c936aSmrgm4_define([_defopt], m4_default([$2], [auto])) 110573e6c936aSmrgAC_ARG_WITH(perl, 110583e6c936aSmrg AS_HELP_STRING([--with-perl], 110593e6c936aSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 110603e6c936aSmrg [use_perl=$withval], [use_perl=]_defopt) 110613e6c936aSmrgm4_undefine([_defopt]) 110623e6c936aSmrg 110633e6c936aSmrgif test "x$use_perl" = x"auto"; then 110643e6c936aSmrg AC_PATH_PROG([PERL], [perl]) 110653e6c936aSmrg if test "x$PERL" = "x"; then 110663e6c936aSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 110673e6c936aSmrg have_perl=no 110683e6c936aSmrg else 110693e6c936aSmrg have_perl=yes 110703e6c936aSmrg fi 110713e6c936aSmrgelif test "x$use_perl" = x"yes" ; then 110723e6c936aSmrg AC_PATH_PROG([PERL], [perl]) 110733e6c936aSmrg if test "x$PERL" = "x"; then 110743e6c936aSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 110753e6c936aSmrg fi 110763e6c936aSmrg have_perl=yes 110773e6c936aSmrgelif test "x$use_perl" = x"no" ; then 110783e6c936aSmrg if test "x$PERL" != "x"; then 110793e6c936aSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 110803e6c936aSmrg fi 110813e6c936aSmrg have_perl=no 110823e6c936aSmrgelse 110833e6c936aSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 110843e6c936aSmrgfi 110854456fccdSmrg 110863e6c936aSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 110873e6c936aSmrg]) # XORG_WITH_PERL 110884456fccdSmrg 110893e6c936aSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 110903e6c936aSmrg# ---------------- 110913e6c936aSmrg# Minimum version: 1.5.0 110923e6c936aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 110933e6c936aSmrg# 110943e6c936aSmrg# Documentation tools are not always available on all platforms and sometimes 110953e6c936aSmrg# not at the appropriate level. This macro enables a module to test for the 110963e6c936aSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 110973e6c936aSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 110983e6c936aSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 110993e6c936aSmrg# --with-asciidoc assumes 'auto'. 111003e6c936aSmrg# 111013e6c936aSmrg# Interface to module: 111023e6c936aSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 111033e6c936aSmrg# ASCIIDOC: returns the path of the asciidoc program found 111043e6c936aSmrg# returns the path set by the user in the environment 111053e6c936aSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 111063e6c936aSmrg# 'no' user instructs the module not to use asciidoc 111073e6c936aSmrg# 111083e6c936aSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 111093e6c936aSmrg# 111103e6c936aSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 111113e6c936aSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 111123e6c936aSmrgm4_define([_defopt], m4_default([$2], [auto])) 111133e6c936aSmrgAC_ARG_WITH(asciidoc, 111143e6c936aSmrg AS_HELP_STRING([--with-asciidoc], 111153e6c936aSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 111163e6c936aSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 111173e6c936aSmrgm4_undefine([_defopt]) 111184456fccdSmrg 111193e6c936aSmrgif test "x$use_asciidoc" = x"auto"; then 111203e6c936aSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 111213e6c936aSmrg if test "x$ASCIIDOC" = "x"; then 111223e6c936aSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 111233e6c936aSmrg have_asciidoc=no 111243e6c936aSmrg else 111253e6c936aSmrg have_asciidoc=yes 111263e6c936aSmrg fi 111273e6c936aSmrgelif test "x$use_asciidoc" = x"yes" ; then 111283e6c936aSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 111293e6c936aSmrg if test "x$ASCIIDOC" = "x"; then 111303e6c936aSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 111313e6c936aSmrg fi 111323e6c936aSmrg have_asciidoc=yes 111333e6c936aSmrgelif test "x$use_asciidoc" = x"no" ; then 111343e6c936aSmrg if test "x$ASCIIDOC" != "x"; then 111353e6c936aSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 111363e6c936aSmrg fi 111373e6c936aSmrg have_asciidoc=no 111383e6c936aSmrgelse 111393e6c936aSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 111403e6c936aSmrgfi 111413e6c936aSmrgm4_ifval([$1], 111423e6c936aSmrg[if test "$have_asciidoc" = yes; then 111433e6c936aSmrg # scrape the asciidoc version 111443e6c936aSmrg AC_MSG_CHECKING([the asciidoc version]) 111453e6c936aSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 111463e6c936aSmrg AC_MSG_RESULT([$asciidoc_version]) 111473e6c936aSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 111483e6c936aSmrg [if test "x$use_asciidoc" = xauto; then 111493e6c936aSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 111503e6c936aSmrg have_asciidoc=no 111513e6c936aSmrg else 111523e6c936aSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 111533e6c936aSmrg fi]) 111543e6c936aSmrgfi]) 111553e6c936aSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 111563e6c936aSmrg]) # XORG_WITH_ASCIIDOC 111574456fccdSmrg 111583e6c936aSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 111590f1ac3bcSmrg# ------------------------------------------- 111603e6c936aSmrg# Minimum version: 1.5.0 111613e6c936aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 111620f1ac3bcSmrg# Minimum version for optional DOT checking: 1.18.0 111633e6c936aSmrg# 111643e6c936aSmrg# Documentation tools are not always available on all platforms and sometimes 111653e6c936aSmrg# not at the appropriate level. This macro enables a module to test for the 111663e6c936aSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 111673e6c936aSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 111683e6c936aSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 111693e6c936aSmrg# --with-doxygen assumes 'auto'. 111703e6c936aSmrg# 111713e6c936aSmrg# Interface to module: 111723e6c936aSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 111733e6c936aSmrg# DOXYGEN: returns the path of the doxygen program found 111743e6c936aSmrg# returns the path set by the user in the environment 111753e6c936aSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 111763e6c936aSmrg# 'no' user instructs the module not to use doxygen 111773e6c936aSmrg# 111783e6c936aSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 111793e6c936aSmrg# 111803e6c936aSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 111813e6c936aSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 111820f1ac3bcSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 111833e6c936aSmrgm4_define([_defopt], m4_default([$2], [auto])) 111843e6c936aSmrgAC_ARG_WITH(doxygen, 111853e6c936aSmrg AS_HELP_STRING([--with-doxygen], 111863e6c936aSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 111873e6c936aSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 111883e6c936aSmrgm4_undefine([_defopt]) 111894456fccdSmrg 111903e6c936aSmrgif test "x$use_doxygen" = x"auto"; then 111913e6c936aSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 111923e6c936aSmrg if test "x$DOXYGEN" = "x"; then 111933e6c936aSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 111943e6c936aSmrg have_doxygen=no 111953e6c936aSmrg else 111963e6c936aSmrg have_doxygen=yes 111973e6c936aSmrg fi 111983e6c936aSmrgelif test "x$use_doxygen" = x"yes" ; then 111993e6c936aSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 112003e6c936aSmrg if test "x$DOXYGEN" = "x"; then 112013e6c936aSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 112023e6c936aSmrg fi 112033e6c936aSmrg have_doxygen=yes 112043e6c936aSmrgelif test "x$use_doxygen" = x"no" ; then 112053e6c936aSmrg if test "x$DOXYGEN" != "x"; then 112063e6c936aSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 112073e6c936aSmrg fi 112083e6c936aSmrg have_doxygen=no 11209ff63a143Smrgelse 112103e6c936aSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 11211ff63a143Smrgfi 112123e6c936aSmrgm4_ifval([$1], 112133e6c936aSmrg[if test "$have_doxygen" = yes; then 112143e6c936aSmrg # scrape the doxygen version 112153e6c936aSmrg AC_MSG_CHECKING([the doxygen version]) 112163e6c936aSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 112173e6c936aSmrg AC_MSG_RESULT([$doxygen_version]) 112183e6c936aSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 112193e6c936aSmrg [if test "x$use_doxygen" = xauto; then 112203e6c936aSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 112213e6c936aSmrg have_doxygen=no 112223e6c936aSmrg else 112233e6c936aSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 112243e6c936aSmrg fi]) 112253e6c936aSmrgfi]) 112260f1ac3bcSmrg 112270f1ac3bcSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 112280f1ac3bcSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 112290f1ac3bcSmrgdnl HAVE_DOT = @HAVE_DOT@ 112300f1ac3bcSmrgHAVE_DOT=no 112310f1ac3bcSmrgif test "x$have_doxygen" = "xyes"; then 112320f1ac3bcSmrg AC_PATH_PROG([DOT], [dot]) 112330f1ac3bcSmrg if test "x$DOT" != "x"; then 112340f1ac3bcSmrg HAVE_DOT=yes 112350f1ac3bcSmrg fi 112360f1ac3bcSmrgfi 112370f1ac3bcSmrg 112380f1ac3bcSmrgAC_SUBST([HAVE_DOT]) 112390f1ac3bcSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 112403e6c936aSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 112413e6c936aSmrg]) # XORG_WITH_DOXYGEN 112424456fccdSmrg 112433e6c936aSmrg# XORG_WITH_GROFF([DEFAULT]) 112443e6c936aSmrg# ---------------- 112453e6c936aSmrg# Minimum version: 1.6.0 112463e6c936aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 112473e6c936aSmrg# 112483e6c936aSmrg# Documentation tools are not always available on all platforms and sometimes 112493e6c936aSmrg# not at the appropriate level. This macro enables a module to test for the 112503e6c936aSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 112513e6c936aSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 112523e6c936aSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 112533e6c936aSmrg# --with-groff assumes 'auto'. 112543e6c936aSmrg# 112553e6c936aSmrg# Interface to module: 112563e6c936aSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 112573e6c936aSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 112583e6c936aSmrg# HAVE_GROFF_MS: the -ms macros package 112593e6c936aSmrg# GROFF: returns the path of the groff program found 112603e6c936aSmrg# returns the path set by the user in the environment 112613e6c936aSmrg# --with-groff: 'yes' user instructs the module to use groff 112623e6c936aSmrg# 'no' user instructs the module not to use groff 112633e6c936aSmrg# 112643e6c936aSmrg# Added in version 1.9.0: 112653e6c936aSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 112663e6c936aSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 112673e6c936aSmrg# psselect from the psutils package. 112683e6c936aSmrg# the ghostcript package. Refer to the grohtml man pages 112693e6c936aSmrg# 112703e6c936aSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 112713e6c936aSmrg# 112723e6c936aSmrg# OS and distros often splits groff in a basic and full package, the former 112733e6c936aSmrg# having the groff program and the later having devices, fonts and macros 112743e6c936aSmrg# Checking for the groff executable is not enough. 112753e6c936aSmrg# 112763e6c936aSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 112773e6c936aSmrg# unset HAVE_GROFF or GROFF env variables. 112783e6c936aSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 112793e6c936aSmrg# 112803e6c936aSmrgAC_DEFUN([XORG_WITH_GROFF],[ 112813e6c936aSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 112823e6c936aSmrgm4_define([_defopt], m4_default([$1], [auto])) 112833e6c936aSmrgAC_ARG_WITH(groff, 112843e6c936aSmrg AS_HELP_STRING([--with-groff], 112853e6c936aSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 112863e6c936aSmrg [use_groff=$withval], [use_groff=]_defopt) 112873e6c936aSmrgm4_undefine([_defopt]) 112884456fccdSmrg 112893e6c936aSmrgif test "x$use_groff" = x"auto"; then 112903e6c936aSmrg AC_PATH_PROG([GROFF], [groff]) 112913e6c936aSmrg if test "x$GROFF" = "x"; then 112923e6c936aSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 112933e6c936aSmrg have_groff=no 112943e6c936aSmrg else 112953e6c936aSmrg have_groff=yes 112963e6c936aSmrg fi 112973e6c936aSmrgelif test "x$use_groff" = x"yes" ; then 112983e6c936aSmrg AC_PATH_PROG([GROFF], [groff]) 112993e6c936aSmrg if test "x$GROFF" = "x"; then 113003e6c936aSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 113013e6c936aSmrg fi 113023e6c936aSmrg have_groff=yes 113033e6c936aSmrgelif test "x$use_groff" = x"no" ; then 113043e6c936aSmrg if test "x$GROFF" != "x"; then 113053e6c936aSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 113063e6c936aSmrg fi 113073e6c936aSmrg have_groff=no 113083e6c936aSmrgelse 113093e6c936aSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 113103e6c936aSmrgfi 113114456fccdSmrg 113123e6c936aSmrg# We have groff, test for the presence of the macro packages 113133e6c936aSmrgif test "x$have_groff" = x"yes"; then 113143e6c936aSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 113153e6c936aSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 113163e6c936aSmrg groff_ms_works=yes 113173e6c936aSmrg else 113183e6c936aSmrg groff_ms_works=no 113193e6c936aSmrg fi 113203e6c936aSmrg AC_MSG_RESULT([$groff_ms_works]) 113213e6c936aSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 113223e6c936aSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 113233e6c936aSmrg groff_mm_works=yes 113243e6c936aSmrg else 113253e6c936aSmrg groff_mm_works=no 113263e6c936aSmrg fi 113273e6c936aSmrg AC_MSG_RESULT([$groff_mm_works]) 113283e6c936aSmrgfi 113294456fccdSmrg 113303e6c936aSmrg# We have groff, test for HTML dependencies, one command per package 113313e6c936aSmrgif test "x$have_groff" = x"yes"; then 113323e6c936aSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 113333e6c936aSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 113343e6c936aSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 113353e6c936aSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 113363e6c936aSmrg have_groff_html=yes 113373e6c936aSmrg else 113383e6c936aSmrg have_groff_html=no 113393e6c936aSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 113403e6c936aSmrg fi 11341ff63a143Smrgfi 113424456fccdSmrg 113433e6c936aSmrg# Set Automake conditionals for Makefiles 113443e6c936aSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 113453e6c936aSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 113463e6c936aSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 113473e6c936aSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 113483e6c936aSmrg]) # XORG_WITH_GROFF 113494456fccdSmrg 113503e6c936aSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 113513e6c936aSmrg# --------------------------------------- 113523e6c936aSmrg# Minimum version: 1.6.0 113533e6c936aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 113543e6c936aSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 11355ff63a143Smrg# 113563e6c936aSmrg# Documentation tools are not always available on all platforms and sometimes 113573e6c936aSmrg# not at the appropriate level. This macro enables a module to test for the 113583e6c936aSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 113593e6c936aSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 113603e6c936aSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 113613e6c936aSmrg# --with-fop assumes 'auto'. 113623e6c936aSmrg# 113633e6c936aSmrg# Interface to module: 113643e6c936aSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 113653e6c936aSmrg# FOP: returns the path of the fop program found 113663e6c936aSmrg# returns the path set by the user in the environment 113673e6c936aSmrg# --with-fop: 'yes' user instructs the module to use fop 113683e6c936aSmrg# 'no' user instructs the module not to use fop 113693e6c936aSmrg# 113703e6c936aSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 113713e6c936aSmrg# 113723e6c936aSmrgAC_DEFUN([XORG_WITH_FOP],[ 113733e6c936aSmrgAC_ARG_VAR([FOP], [Path to fop command]) 113743e6c936aSmrgm4_define([_defopt], m4_default([$2], [auto])) 113753e6c936aSmrgAC_ARG_WITH(fop, 113763e6c936aSmrg AS_HELP_STRING([--with-fop], 113773e6c936aSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 113783e6c936aSmrg [use_fop=$withval], [use_fop=]_defopt) 113793e6c936aSmrgm4_undefine([_defopt]) 113804456fccdSmrg 113813e6c936aSmrgif test "x$use_fop" = x"auto"; then 113823e6c936aSmrg AC_PATH_PROG([FOP], [fop]) 113833e6c936aSmrg if test "x$FOP" = "x"; then 113843e6c936aSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 113853e6c936aSmrg have_fop=no 113863e6c936aSmrg else 113873e6c936aSmrg have_fop=yes 113883e6c936aSmrg fi 113893e6c936aSmrgelif test "x$use_fop" = x"yes" ; then 113903e6c936aSmrg AC_PATH_PROG([FOP], [fop]) 113913e6c936aSmrg if test "x$FOP" = "x"; then 113923e6c936aSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 113933e6c936aSmrg fi 113943e6c936aSmrg have_fop=yes 113953e6c936aSmrgelif test "x$use_fop" = x"no" ; then 113963e6c936aSmrg if test "x$FOP" != "x"; then 113973e6c936aSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 113983e6c936aSmrg fi 113993e6c936aSmrg have_fop=no 114003e6c936aSmrgelse 114013e6c936aSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 114023e6c936aSmrgfi 114034456fccdSmrg 114043e6c936aSmrg# Test for a minimum version of fop, if provided. 114053e6c936aSmrgm4_ifval([$1], 114063e6c936aSmrg[if test "$have_fop" = yes; then 114073e6c936aSmrg # scrape the fop version 114083e6c936aSmrg AC_MSG_CHECKING([for fop minimum version]) 114093e6c936aSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 114103e6c936aSmrg AC_MSG_RESULT([$fop_version]) 114113e6c936aSmrg AS_VERSION_COMPARE([$fop_version], [$1], 114123e6c936aSmrg [if test "x$use_fop" = xauto; then 114133e6c936aSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 114143e6c936aSmrg have_fop=no 114153e6c936aSmrg else 114163e6c936aSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 114173e6c936aSmrg fi]) 114183e6c936aSmrgfi]) 114193e6c936aSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 114203e6c936aSmrg]) # XORG_WITH_FOP 114214456fccdSmrg 114220f1ac3bcSmrg# XORG_WITH_M4([MIN-VERSION]) 114230f1ac3bcSmrg# --------------------------- 114240f1ac3bcSmrg# Minimum version: 1.19.0 114250f1ac3bcSmrg# 114260f1ac3bcSmrg# This macro attempts to locate an m4 macro processor which supports 114270f1ac3bcSmrg# -I option and is only useful for modules relying on M4 in order to 114280f1ac3bcSmrg# expand macros in source code files. 114290f1ac3bcSmrg# 114300f1ac3bcSmrg# Interface to module: 114310f1ac3bcSmrg# M4: returns the path of the m4 program found 114320f1ac3bcSmrg# returns the path set by the user in the environment 114330f1ac3bcSmrg# 114340f1ac3bcSmrgAC_DEFUN([XORG_WITH_M4], [ 114350f1ac3bcSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 114360f1ac3bcSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 114370f1ac3bcSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 114380f1ac3bcSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 114390f1ac3bcSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 114400f1ac3bcSmrg [$PATH:/usr/gnu/bin])]) 114410f1ac3bcSmrg 114420f1ac3bcSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 114430f1ac3bcSmrg]) # XORG_WITH_M4 114440f1ac3bcSmrg 114453e6c936aSmrg# XORG_WITH_PS2PDF([DEFAULT]) 114463e6c936aSmrg# ---------------- 114473e6c936aSmrg# Minimum version: 1.6.0 114483e6c936aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 114493e6c936aSmrg# 114503e6c936aSmrg# Documentation tools are not always available on all platforms and sometimes 114513e6c936aSmrg# not at the appropriate level. This macro enables a module to test for the 114523e6c936aSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 114533e6c936aSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 114543e6c936aSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 114553e6c936aSmrg# --with-ps2pdf assumes 'auto'. 114563e6c936aSmrg# 114573e6c936aSmrg# Interface to module: 114583e6c936aSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 114593e6c936aSmrg# PS2PDF: returns the path of the ps2pdf program found 114603e6c936aSmrg# returns the path set by the user in the environment 114613e6c936aSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 114623e6c936aSmrg# 'no' user instructs the module not to use ps2pdf 11463ff63a143Smrg# 114643e6c936aSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 114653e6c936aSmrg# 114663e6c936aSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 114673e6c936aSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 114683e6c936aSmrgm4_define([_defopt], m4_default([$1], [auto])) 114693e6c936aSmrgAC_ARG_WITH(ps2pdf, 114703e6c936aSmrg AS_HELP_STRING([--with-ps2pdf], 114713e6c936aSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 114723e6c936aSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 114733e6c936aSmrgm4_undefine([_defopt]) 114744456fccdSmrg 114753e6c936aSmrgif test "x$use_ps2pdf" = x"auto"; then 114763e6c936aSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 114773e6c936aSmrg if test "x$PS2PDF" = "x"; then 114783e6c936aSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 114793e6c936aSmrg have_ps2pdf=no 114803e6c936aSmrg else 114813e6c936aSmrg have_ps2pdf=yes 114823e6c936aSmrg fi 114833e6c936aSmrgelif test "x$use_ps2pdf" = x"yes" ; then 114843e6c936aSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 114853e6c936aSmrg if test "x$PS2PDF" = "x"; then 114863e6c936aSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 114873e6c936aSmrg fi 114883e6c936aSmrg have_ps2pdf=yes 114893e6c936aSmrgelif test "x$use_ps2pdf" = x"no" ; then 114903e6c936aSmrg if test "x$PS2PDF" != "x"; then 114913e6c936aSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 114923e6c936aSmrg fi 114933e6c936aSmrg have_ps2pdf=no 114943e6c936aSmrgelse 114953e6c936aSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 114963e6c936aSmrgfi 114973e6c936aSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 114983e6c936aSmrg]) # XORG_WITH_PS2PDF 11499521070a0Smrg 115003e6c936aSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 115013e6c936aSmrg# ---------------- 115023e6c936aSmrg# Minimum version: 1.6.0 11503ff63a143Smrg# 115043e6c936aSmrg# Documentation tools are not always available on all platforms and sometimes 115053e6c936aSmrg# not at the appropriate level. This macro enables a builder to skip all 115063e6c936aSmrg# documentation targets except traditional man pages. 115073e6c936aSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 115083e6c936aSmrg# maximum flexibilty in controlling documentation building. 115093e6c936aSmrg# Refer to: 115103e6c936aSmrg# XORG_WITH_XMLTO --with-xmlto 115113e6c936aSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 115123e6c936aSmrg# XORG_WITH_DOXYGEN --with-doxygen 115133e6c936aSmrg# XORG_WITH_FOP --with-fop 115143e6c936aSmrg# XORG_WITH_GROFF --with-groff 115153e6c936aSmrg# XORG_WITH_PS2PDF --with-ps2pdf 115163e6c936aSmrg# 115173e6c936aSmrg# Interface to module: 115183e6c936aSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 115193e6c936aSmrg# --enable-docs: 'yes' user instructs the module to generate docs 115203e6c936aSmrg# 'no' user instructs the module not to generate docs 115213e6c936aSmrg# parm1: specify the default value, yes or no. 115223e6c936aSmrg# 115233e6c936aSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 115243e6c936aSmrgm4_define([docs_default], m4_default([$1], [yes])) 115253e6c936aSmrgAC_ARG_ENABLE(docs, 115263e6c936aSmrg AS_HELP_STRING([--enable-docs], 115273e6c936aSmrg [Enable building the documentation (default: ]docs_default[)]), 115283e6c936aSmrg [build_docs=$enableval], [build_docs=]docs_default) 115293e6c936aSmrgm4_undefine([docs_default]) 115303e6c936aSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 115313e6c936aSmrgAC_MSG_CHECKING([whether to build documentation]) 115323e6c936aSmrgAC_MSG_RESULT([$build_docs]) 115333e6c936aSmrg]) # XORG_ENABLE_DOCS 115344456fccdSmrg 115353e6c936aSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 115363e6c936aSmrg# ---------------- 115373e6c936aSmrg# Minimum version: 1.6.0 115383e6c936aSmrg# 115393e6c936aSmrg# This macro enables a builder to skip all developer documentation. 115403e6c936aSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 115413e6c936aSmrg# maximum flexibilty in controlling documentation building. 115423e6c936aSmrg# Refer to: 115433e6c936aSmrg# XORG_WITH_XMLTO --with-xmlto 115443e6c936aSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 115453e6c936aSmrg# XORG_WITH_DOXYGEN --with-doxygen 115463e6c936aSmrg# XORG_WITH_FOP --with-fop 115473e6c936aSmrg# XORG_WITH_GROFF --with-groff 115483e6c936aSmrg# XORG_WITH_PS2PDF --with-ps2pdf 115493e6c936aSmrg# 115503e6c936aSmrg# Interface to module: 115513e6c936aSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 115523e6c936aSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 115533e6c936aSmrg# 'no' user instructs the module not to generate developer docs 115543e6c936aSmrg# parm1: specify the default value, yes or no. 115553e6c936aSmrg# 115563e6c936aSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 115573e6c936aSmrgm4_define([devel_default], m4_default([$1], [yes])) 115583e6c936aSmrgAC_ARG_ENABLE(devel-docs, 115593e6c936aSmrg AS_HELP_STRING([--enable-devel-docs], 115603e6c936aSmrg [Enable building the developer documentation (default: ]devel_default[)]), 115613e6c936aSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 115623e6c936aSmrgm4_undefine([devel_default]) 115633e6c936aSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 115643e6c936aSmrgAC_MSG_CHECKING([whether to build developer documentation]) 115653e6c936aSmrgAC_MSG_RESULT([$build_devel_docs]) 115663e6c936aSmrg]) # XORG_ENABLE_DEVEL_DOCS 115674456fccdSmrg 115683e6c936aSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 115693e6c936aSmrg# ---------------- 115703e6c936aSmrg# Minimum version: 1.6.0 115713e6c936aSmrg# 115723e6c936aSmrg# This macro enables a builder to skip all functional specification targets. 115733e6c936aSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 115743e6c936aSmrg# maximum flexibilty in controlling documentation building. 115753e6c936aSmrg# Refer to: 115763e6c936aSmrg# XORG_WITH_XMLTO --with-xmlto 115773e6c936aSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 115783e6c936aSmrg# XORG_WITH_DOXYGEN --with-doxygen 115793e6c936aSmrg# XORG_WITH_FOP --with-fop 115803e6c936aSmrg# XORG_WITH_GROFF --with-groff 115813e6c936aSmrg# XORG_WITH_PS2PDF --with-ps2pdf 115823e6c936aSmrg# 115833e6c936aSmrg# Interface to module: 115843e6c936aSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 115853e6c936aSmrg# --enable-specs: 'yes' user instructs the module to generate specs 115863e6c936aSmrg# 'no' user instructs the module not to generate specs 115873e6c936aSmrg# parm1: specify the default value, yes or no. 115883e6c936aSmrg# 115893e6c936aSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 115903e6c936aSmrgm4_define([spec_default], m4_default([$1], [yes])) 115913e6c936aSmrgAC_ARG_ENABLE(specs, 115923e6c936aSmrg AS_HELP_STRING([--enable-specs], 115933e6c936aSmrg [Enable building the specs (default: ]spec_default[)]), 115943e6c936aSmrg [build_specs=$enableval], [build_specs=]spec_default) 115953e6c936aSmrgm4_undefine([spec_default]) 115963e6c936aSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 115973e6c936aSmrgAC_MSG_CHECKING([whether to build functional specifications]) 115983e6c936aSmrgAC_MSG_RESULT([$build_specs]) 115993e6c936aSmrg]) # XORG_ENABLE_SPECS 116004456fccdSmrg 116013e6c936aSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 116023e6c936aSmrg# ---------------------------------------------- 116033e6c936aSmrg# Minimum version: 1.13.0 116043e6c936aSmrg# 116053e6c936aSmrg# This macro enables a builder to enable/disable unit testing 116063e6c936aSmrg# It makes no assumption about the test cases implementation 116073e6c936aSmrg# Test cases may or may not use Automake "Support for test suites" 116083e6c936aSmrg# They may or may not use the software utility library GLib 116093e6c936aSmrg# 116103e6c936aSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 116113e6c936aSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 116123e6c936aSmrg# The variable enable_unit_tests is used by other macros in this file. 116133e6c936aSmrg# 116143e6c936aSmrg# Interface to module: 116153e6c936aSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 116163e6c936aSmrg# enable_unit_tests: used in configure.ac for additional configuration 116173e6c936aSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 116183e6c936aSmrg# 'no' user instructs the module not to build tests 116193e6c936aSmrg# parm1: specify the default value, yes or no. 116203e6c936aSmrg# 116213e6c936aSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 116223e6c936aSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 116233e6c936aSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 116243e6c936aSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 116253e6c936aSmrgm4_define([_defopt], m4_default([$1], [auto])) 116263e6c936aSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 116273e6c936aSmrg [Enable building unit test cases (default: ]_defopt[)]), 116283e6c936aSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 116293e6c936aSmrgm4_undefine([_defopt]) 116303e6c936aSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 116313e6c936aSmrgAC_MSG_CHECKING([whether to build unit test cases]) 116323e6c936aSmrgAC_MSG_RESULT([$enable_unit_tests]) 116333e6c936aSmrg]) # XORG_ENABLE_UNIT_TESTS 116343e6c936aSmrg 116353e6c936aSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 116363e6c936aSmrg# ------------------------------------------------------ 116373e6c936aSmrg# Minimum version: 1.17.0 116383e6c936aSmrg# 116393e6c936aSmrg# This macro enables a builder to enable/disable integration testing 116403e6c936aSmrg# It makes no assumption about the test cases' implementation 116413e6c936aSmrg# Test cases may or may not use Automake "Support for test suites" 116423e6c936aSmrg# 116433e6c936aSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 116443e6c936aSmrg# usually requires less dependencies and may be built and run under less 116453e6c936aSmrg# stringent environments than integration tests. 116463e6c936aSmrg# 116473e6c936aSmrg# Interface to module: 116483e6c936aSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 116493e6c936aSmrg# enable_integration_tests: used in configure.ac for additional configuration 116503e6c936aSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 116513e6c936aSmrg# 'no' user instructs the module not to build tests 116523e6c936aSmrg# parm1: specify the default value, yes or no. 116533e6c936aSmrg# 116543e6c936aSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 116553e6c936aSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 116563e6c936aSmrgm4_define([_defopt], m4_default([$1], [auto])) 116573e6c936aSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 116583e6c936aSmrg [Enable building integration test cases (default: ]_defopt[)]), 116593e6c936aSmrg [enable_integration_tests=$enableval], 116603e6c936aSmrg [enable_integration_tests=]_defopt) 116613e6c936aSmrgm4_undefine([_defopt]) 116623e6c936aSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 116633e6c936aSmrg [test "x$enable_integration_tests" != xno]) 116643e6c936aSmrgAC_MSG_CHECKING([whether to build unit test cases]) 116653e6c936aSmrgAC_MSG_RESULT([$enable_integration_tests]) 116663e6c936aSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 116673e6c936aSmrg 116683e6c936aSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 116693e6c936aSmrg# ---------------------------------------- 116703e6c936aSmrg# Minimum version: 1.13.0 116713e6c936aSmrg# 116723e6c936aSmrg# GLib is a library which provides advanced data structures and functions. 116733e6c936aSmrg# This macro enables a module to test for the presence of Glib. 116743e6c936aSmrg# 116753e6c936aSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 116763e6c936aSmrg# Otherwise the value of $enable_unit_tests is blank. 116773e6c936aSmrg# 116783e6c936aSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 116793e6c936aSmrg# test support usually requires less dependencies and may be built and run under 116803e6c936aSmrg# less stringent environments than integration tests. 116813e6c936aSmrg# 116823e6c936aSmrg# Interface to module: 116833e6c936aSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 116843e6c936aSmrg# with_glib: used in configure.ac to know if GLib has been found 116853e6c936aSmrg# --with-glib: 'yes' user instructs the module to use glib 116863e6c936aSmrg# 'no' user instructs the module not to use glib 116873e6c936aSmrg# 116883e6c936aSmrgAC_DEFUN([XORG_WITH_GLIB],[ 116893e6c936aSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 116903e6c936aSmrgm4_define([_defopt], m4_default([$2], [auto])) 116913e6c936aSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 116923e6c936aSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 116933e6c936aSmrg [with_glib=$withval], [with_glib=]_defopt) 116943e6c936aSmrgm4_undefine([_defopt]) 116953e6c936aSmrg 116963e6c936aSmrghave_glib=no 116973e6c936aSmrg# Do not probe GLib if user explicitly disabled unit testing 116983e6c936aSmrgif test "x$enable_unit_tests" != x"no"; then 116993e6c936aSmrg # Do not probe GLib if user explicitly disabled it 117003e6c936aSmrg if test "x$with_glib" != x"no"; then 117013e6c936aSmrg m4_ifval( 117023e6c936aSmrg [$1], 117033e6c936aSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 117043e6c936aSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 117053e6c936aSmrg ) 11706ff63a143Smrg fi 11707ff63a143Smrgfi 117084456fccdSmrg 117093e6c936aSmrg# Not having GLib when unit testing has been explicitly requested is an error 117103e6c936aSmrgif test "x$enable_unit_tests" = x"yes"; then 117113e6c936aSmrg if test "x$have_glib" = x"no"; then 117123e6c936aSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 11713ff63a143Smrg fi 11714ff63a143Smrgfi 117153e6c936aSmrg 117163e6c936aSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 117173e6c936aSmrgif test "x$enable_unit_tests" = x"no"; then 117183e6c936aSmrg if test "x$with_glib" = x"yes"; then 117193e6c936aSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 117203e6c936aSmrg fi 11721ff63a143Smrgfi 11722521070a0Smrg 117233e6c936aSmrg# Not having GLib when it has been explicitly requested is an error 117243e6c936aSmrgif test "x$with_glib" = x"yes"; then 117253e6c936aSmrg if test "x$have_glib" = x"no"; then 117263e6c936aSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 117273e6c936aSmrg fi 117283e6c936aSmrgfi 117294456fccdSmrg 117303e6c936aSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 117313e6c936aSmrg]) # XORG_WITH_GLIB 117324456fccdSmrg 117333e6c936aSmrg# XORG_LD_WRAP([required|optional]) 117343e6c936aSmrg# --------------------------------- 117353e6c936aSmrg# Minimum version: 1.13.0 117363e6c936aSmrg# 117373e6c936aSmrg# Check if linker supports -wrap, passed via compiler flags 117383e6c936aSmrg# 117393e6c936aSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 117403e6c936aSmrg# Otherwise the value of $enable_unit_tests is blank. 117413e6c936aSmrg# 117423e6c936aSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 117433e6c936aSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 117443e6c936aSmrg# available, an argument of "optional" allows use when some unit tests require 117453e6c936aSmrg# ld -wrap and others do not. 117463e6c936aSmrg# 117473e6c936aSmrgAC_DEFUN([XORG_LD_WRAP],[ 117483e6c936aSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 117493e6c936aSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 117503e6c936aSmrg void __wrap_exit(int status) { return; }], 117513e6c936aSmrg [exit(0);])]) 117523e6c936aSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 117533e6c936aSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 117543e6c936aSmrg if test "x$have_ld_wrap" = x"no"; then 117553e6c936aSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 117563e6c936aSmrg fi 11757ff63a143Smrgfi 117583e6c936aSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 117593e6c936aSmrg# 117603e6c936aSmrg]) # XORG_LD_WRAP 117614456fccdSmrg 117623e6c936aSmrg# XORG_CHECK_LINKER_FLAGS 117633e6c936aSmrg# ----------------------- 117643e6c936aSmrg# SYNOPSIS 117653e6c936aSmrg# 117663e6c936aSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 117673e6c936aSmrg# 117683e6c936aSmrg# DESCRIPTION 117693e6c936aSmrg# 117703e6c936aSmrg# Check whether the given linker FLAGS work with the current language's 117713e6c936aSmrg# linker, or whether they give an error. 117723e6c936aSmrg# 117733e6c936aSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 117743e6c936aSmrg# success/failure. 117753e6c936aSmrg# 117763e6c936aSmrg# PROGRAM-SOURCE is the program source to link with, if needed 117773e6c936aSmrg# 117783e6c936aSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 117793e6c936aSmrg# 117803e6c936aSmrg# LICENSE 117813e6c936aSmrg# 117823e6c936aSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 117833e6c936aSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 117843e6c936aSmrg# Copyright (c) 2009 Matteo Frigo 117853e6c936aSmrg# 117863e6c936aSmrg# This program is free software: you can redistribute it and/or modify it 117873e6c936aSmrg# under the terms of the GNU General Public License as published by the 117883e6c936aSmrg# Free Software Foundation, either version 3 of the License, or (at your 117893e6c936aSmrg# option) any later version. 117903e6c936aSmrg# 117913e6c936aSmrg# This program is distributed in the hope that it will be useful, but 117923e6c936aSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 117933e6c936aSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 117943e6c936aSmrg# Public License for more details. 117953e6c936aSmrg# 117963e6c936aSmrg# You should have received a copy of the GNU General Public License along 117973e6c936aSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 117983e6c936aSmrg# 117993e6c936aSmrg# As a special exception, the respective Autoconf Macro's copyright owner 118003e6c936aSmrg# gives unlimited permission to copy, distribute and modify the configure 118013e6c936aSmrg# scripts that are the output of Autoconf when processing the Macro. You 118023e6c936aSmrg# need not follow the terms of the GNU General Public License when using 118033e6c936aSmrg# or distributing such scripts, even though portions of the text of the 118043e6c936aSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 118053e6c936aSmrg# all other use of the material that constitutes the Autoconf Macro. 118063e6c936aSmrg# 118073e6c936aSmrg# This special exception to the GPL applies to versions of the Autoconf 118083e6c936aSmrg# Macro released by the Autoconf Archive. When you make and distribute a 118093e6c936aSmrg# modified version of the Autoconf Macro, you may extend this special 118103e6c936aSmrg# exception to the GPL to apply to your modified version as well.# 118113e6c936aSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 118123e6c936aSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 118133e6c936aSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 118143e6c936aSmrgAS_LITERAL_IF([$1], 118153e6c936aSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 118163e6c936aSmrg ax_save_FLAGS=$LDFLAGS 118173e6c936aSmrg LDFLAGS="$1" 118183e6c936aSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 118193e6c936aSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 118203e6c936aSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 118213e6c936aSmrg LDFLAGS=$ax_save_FLAGS])], 118223e6c936aSmrg [ax_save_FLAGS=$LDFLAGS 118233e6c936aSmrg LDFLAGS="$1" 118243e6c936aSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 118253e6c936aSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 118263e6c936aSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 118273e6c936aSmrg LDFLAGS=$ax_save_FLAGS]) 118283e6c936aSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 118293e6c936aSmrgAC_MSG_RESULT($xorg_check_linker_flags) 118303e6c936aSmrgif test "x$xorg_check_linker_flags" = xyes; then 118313e6c936aSmrg m4_default([$2], :) 118323e6c936aSmrgelse 118333e6c936aSmrg m4_default([$3], :) 118343e6c936aSmrgfi 118353e6c936aSmrg]) # XORG_CHECK_LINKER_FLAGS 118364456fccdSmrg 118373e6c936aSmrg# XORG_MEMORY_CHECK_FLAGS 118383e6c936aSmrg# ----------------------- 118393e6c936aSmrg# Minimum version: 1.16.0 11840ff63a143Smrg# 118413e6c936aSmrg# This macro attempts to find appropriate memory checking functionality 118423e6c936aSmrg# for various platforms which unit testing code may use to catch various 118433e6c936aSmrg# forms of memory allocation and access errors in testing. 118443e6c936aSmrg# 118453e6c936aSmrg# Interface to module: 118463e6c936aSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 118473e6c936aSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 118483e6c936aSmrg# 118493e6c936aSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 118503e6c936aSmrg# 118513e6c936aSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 118524456fccdSmrg 118533e6c936aSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 118543e6c936aSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 118553e6c936aSmrg [Environment variables to enable memory checking in tests]) 118564456fccdSmrg 118573e6c936aSmrg# Check for different types of support on different platforms 118583e6c936aSmrgcase $host_os in 118593e6c936aSmrg solaris*) 118603e6c936aSmrg AC_CHECK_LIB([umem], [umem_alloc], 118613e6c936aSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 118623e6c936aSmrg ;; 118633e6c936aSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 118643e6c936aSmrg # both directly and inverted, so should not be 0 or 255. 118653e6c936aSmrg malloc_debug_env='MALLOC_PERTURB_=15' 118663e6c936aSmrg ;; 118673e6c936aSmrg darwin*) 118683e6c936aSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 118693e6c936aSmrg ;; 118703e6c936aSmrg *bsd*) 118713e6c936aSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 118723e6c936aSmrg ;; 118733e6c936aSmrgesac 1187442d69509Smrg 118753e6c936aSmrg# User supplied flags override default flags 118763e6c936aSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 118773e6c936aSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 118783e6c936aSmrgfi 11879521070a0Smrg 118803e6c936aSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 118813e6c936aSmrg]) # XORG_WITH_LINT 11882521070a0Smrg 118833e6c936aSmrg# XORG_CHECK_MALLOC_ZERO 118843e6c936aSmrg# ---------------------- 118853e6c936aSmrg# Minimum version: 1.0.0 11886ff63a143Smrg# 118873e6c936aSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 118883e6c936aSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 118893e6c936aSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 118903e6c936aSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 118913e6c936aSmrgAC_ARG_ENABLE(malloc0returnsnull, 118923e6c936aSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 118933e6c936aSmrg [malloc(0) returns NULL (default: auto)]), 118943e6c936aSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 118953e6c936aSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 11896ff63a143Smrg 118973e6c936aSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 118983e6c936aSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 118990f1ac3bcSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 119000f1ac3bcSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 119013e6c936aSmrg#include <stdlib.h> 119023e6c936aSmrg],[ 119033e6c936aSmrg char *m0, *r0, *c0, *p; 119043e6c936aSmrg m0 = malloc(0); 119053e6c936aSmrg p = malloc(10); 119063e6c936aSmrg r0 = realloc(p,0); 119073e6c936aSmrg c0 = calloc(0,10); 119083e6c936aSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 119093e6c936aSmrg])], 119100f1ac3bcSmrg [xorg_cv_malloc0_returns_null=yes], 119110f1ac3bcSmrg [xorg_cv_malloc0_returns_null=no])]) 119120f1ac3bcSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 119133e6c936aSmrgfi 119143e6c936aSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11915ff63a143Smrg 119163e6c936aSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 119173e6c936aSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 119183e6c936aSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 119193e6c936aSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 119203e6c936aSmrgelse 119213e6c936aSmrg MALLOC_ZERO_CFLAGS="" 119223e6c936aSmrg XMALLOC_ZERO_CFLAGS="" 119233e6c936aSmrg XTMALLOC_ZERO_CFLAGS="" 11924ff63a143Smrgfi 119254456fccdSmrg 119263e6c936aSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 119273e6c936aSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 119283e6c936aSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 119293e6c936aSmrg]) # XORG_CHECK_MALLOC_ZERO 11930521070a0Smrg 119313e6c936aSmrg# XORG_WITH_LINT() 119323e6c936aSmrg# ---------------- 119333e6c936aSmrg# Minimum version: 1.1.0 1193442d69509Smrg# 119353e6c936aSmrg# This macro enables the use of a tool that flags some suspicious and 119363e6c936aSmrg# non-portable constructs (likely to be bugs) in C language source code. 119373e6c936aSmrg# It will attempt to locate the tool and use appropriate options. 119383e6c936aSmrg# There are various lint type tools on different platforms. 119393e6c936aSmrg# 119403e6c936aSmrg# Interface to module: 119413e6c936aSmrg# LINT: returns the path to the tool found on the platform 119423e6c936aSmrg# or the value set to LINT on the configure cmd line 119433e6c936aSmrg# also an Automake conditional 119443e6c936aSmrg# LINT_FLAGS: an Automake variable with appropriate flags 119453e6c936aSmrg# 119463e6c936aSmrg# --with-lint: 'yes' user instructs the module to use lint 119473e6c936aSmrg# 'no' user instructs the module not to use lint (default) 119483e6c936aSmrg# 119493e6c936aSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 119503e6c936aSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 119513e6c936aSmrg# 119523e6c936aSmrgAC_DEFUN([XORG_WITH_LINT],[ 119534456fccdSmrg 119543e6c936aSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 119553e6c936aSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 119563e6c936aSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 119573e6c936aSmrg [Use a lint-style source code checker (default: disabled)])], 119583e6c936aSmrg [use_lint=$withval], [use_lint=no]) 119594456fccdSmrg 119603e6c936aSmrg# Obtain platform specific info like program name and options 119613e6c936aSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 119623e6c936aSmrgcase $host_os in 119633e6c936aSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 119643e6c936aSmrg lint_name=splint 119653e6c936aSmrg lint_options="-badflag" 119663e6c936aSmrg ;; 119673e6c936aSmrg *freebsd* | *netbsd*) 119683e6c936aSmrg lint_name=lint 119693e6c936aSmrg lint_options="-u -b" 119703e6c936aSmrg ;; 119713e6c936aSmrg *solaris*) 119723e6c936aSmrg lint_name=lint 119733e6c936aSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 119743e6c936aSmrg ;; 119753e6c936aSmrgesac 11976521070a0Smrg 119773e6c936aSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 119783e6c936aSmrgif test "x$use_lint" = x"yes" ; then 119793e6c936aSmrg AC_PATH_PROG([LINT], [$lint_name]) 119803e6c936aSmrg if test "x$LINT" = "x"; then 119813e6c936aSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 119823e6c936aSmrg fi 119833e6c936aSmrgelif test "x$use_lint" = x"no" ; then 119843e6c936aSmrg if test "x$LINT" != "x"; then 119853e6c936aSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 119863e6c936aSmrg fi 11987ff63a143Smrgelse 119883e6c936aSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 11989ff63a143Smrgfi 11990521070a0Smrg 119913e6c936aSmrg# User supplied flags override default flags 119923e6c936aSmrgif test "x$LINT_FLAGS" != "x"; then 119933e6c936aSmrg lint_options=$LINT_FLAGS 119943e6c936aSmrgfi 11995521070a0Smrg 119963e6c936aSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 119973e6c936aSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11998521070a0Smrg 119993e6c936aSmrg]) # XORG_WITH_LINT 12000521070a0Smrg 120013e6c936aSmrg# XORG_LINT_LIBRARY(LIBNAME) 120023e6c936aSmrg# -------------------------- 120033e6c936aSmrg# Minimum version: 1.1.0 12004521070a0Smrg# 120053e6c936aSmrg# Sets up flags for building lint libraries for checking programs that call 120063e6c936aSmrg# functions in the library. 120073e6c936aSmrg# 120083e6c936aSmrg# Interface to module: 120093e6c936aSmrg# LINTLIB - Automake variable with the name of lint library file to make 120103e6c936aSmrg# MAKE_LINT_LIB - Automake conditional 120113e6c936aSmrg# 120123e6c936aSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 120133e6c936aSmrg# - 'no' user instructs the module not to create a lint library (default) 12014521070a0Smrg 120153e6c936aSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 120163e6c936aSmrgAC_REQUIRE([XORG_WITH_LINT]) 120173e6c936aSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 120183e6c936aSmrg [Create lint library (default: disabled)])], 120193e6c936aSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 12020521070a0Smrg 120213e6c936aSmrgif test "x$make_lint_lib" = x"yes" ; then 120223e6c936aSmrg LINTLIB=llib-l$1.ln 120233e6c936aSmrg if test "x$LINT" = "x"; then 120243e6c936aSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 120253e6c936aSmrg fi 120263e6c936aSmrgelif test "x$make_lint_lib" != x"no" ; then 120273e6c936aSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 120283e6c936aSmrgfi 12029521070a0Smrg 120303e6c936aSmrgAC_SUBST(LINTLIB) 120313e6c936aSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 12032521070a0Smrg 120333e6c936aSmrg]) # XORG_LINT_LIBRARY 12034521070a0Smrg 120353e6c936aSmrg# XORG_COMPILER_BRAND 120363e6c936aSmrg# ------------------- 120373e6c936aSmrg# Minimum version: 1.14.0 120383e6c936aSmrg# 120393e6c936aSmrg# Checks for various brands of compilers and sets flags as appropriate: 120403e6c936aSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 120413e6c936aSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 120423e6c936aSmrg# clang compiler - sets CLANGCC to "yes" 120433e6c936aSmrg# Intel compiler - sets INTELCC to "yes" 120443e6c936aSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 120453e6c936aSmrg# 120463e6c936aSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 120473e6c936aSmrgAC_LANG_CASE( 120483e6c936aSmrg [C], [ 120493e6c936aSmrg AC_REQUIRE([AC_PROG_CC_C99]) 120503e6c936aSmrg ], 120513e6c936aSmrg [C++], [ 120523e6c936aSmrg AC_REQUIRE([AC_PROG_CXX]) 120533e6c936aSmrg ] 120543e6c936aSmrg) 120553e6c936aSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 120563e6c936aSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 120573e6c936aSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 120583e6c936aSmrg]) # XORG_COMPILER_BRAND 120594456fccdSmrg 120603e6c936aSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 120613e6c936aSmrg# --------------- 120623e6c936aSmrg# Minimum version: 1.16.0 120633e6c936aSmrg# 120643e6c936aSmrg# Test if the compiler works when passed the given flag as a command line argument. 120653e6c936aSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 120663e6c936aSmrg# next flag in the list until there are no more options. 120673e6c936aSmrg# 120683e6c936aSmrg# Note that this does not guarantee that the compiler supports the flag as some 120693e6c936aSmrg# compilers will simply ignore arguments that they do not understand, but we do 120703e6c936aSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 120713e6c936aSmrg# -Werror=unused-command-line-argument 120723e6c936aSmrg# 120733e6c936aSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 120743e6c936aSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 120753e6c936aSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 120763e6c936aSmrg 120773e6c936aSmrgAC_LANG_COMPILER_REQUIRE 120783e6c936aSmrg 120793e6c936aSmrgAC_LANG_CASE( 120803e6c936aSmrg [C], [ 120813e6c936aSmrg AC_REQUIRE([AC_PROG_CC_C99]) 120823e6c936aSmrg define([PREFIX], [C]) 120833e6c936aSmrg define([CACHE_PREFIX], [cc]) 120843e6c936aSmrg define([COMPILER], [$CC]) 120853e6c936aSmrg ], 120863e6c936aSmrg [C++], [ 120873e6c936aSmrg define([PREFIX], [CXX]) 120883e6c936aSmrg define([CACHE_PREFIX], [cxx]) 120893e6c936aSmrg define([COMPILER], [$CXX]) 120903e6c936aSmrg ] 120913e6c936aSmrg) 120924456fccdSmrg 120933e6c936aSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 120943e6c936aSmrg 120953e6c936aSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 120963e6c936aSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 120973e6c936aSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 120983e6c936aSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 120993e6c936aSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 121003e6c936aSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 121013e6c936aSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 121023e6c936aSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 121033e6c936aSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 121043e6c936aSmrgfi 121054456fccdSmrg 121063e6c936aSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 121073e6c936aSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 121083e6c936aSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 121093e6c936aSmrg fi 121103e6c936aSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 121113e6c936aSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 121123e6c936aSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 121133e6c936aSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 121143e6c936aSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 121153e6c936aSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 121163e6c936aSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 121173e6c936aSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 121183e6c936aSmrgfi 121194456fccdSmrg 121203e6c936aSmrgfound="no" 121213e6c936aSmrgm4_foreach([flag], m4_cdr($@), [ 121223e6c936aSmrg if test $found = "no" ; then 121230f1ac3bcSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 121243e6c936aSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 121253e6c936aSmrg fi 121263e6c936aSmrg 121270f1ac3bcSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 121283e6c936aSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 121293e6c936aSmrg fi 121303e6c936aSmrg 121313e6c936aSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 121323e6c936aSmrg 121333e6c936aSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 121343e6c936aSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 121353e6c936aSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 121363e6c936aSmrg AC_CACHE_VAL($cacheid, 121373e6c936aSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 121383e6c936aSmrg [eval $cacheid=yes], 121393e6c936aSmrg [eval $cacheid=no])]) 121403e6c936aSmrg 121413e6c936aSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 121423e6c936aSmrg 121433e6c936aSmrg eval supported=\$$cacheid 121443e6c936aSmrg AC_MSG_RESULT([$supported]) 121453e6c936aSmrg if test "$supported" = "yes" ; then 121463e6c936aSmrg $1="$$1 ]flag[" 121473e6c936aSmrg found="yes" 121483e6c936aSmrg fi 121493e6c936aSmrg fi 121503e6c936aSmrg]) 121513e6c936aSmrg]) # XORG_TESTSET_CFLAG 121524456fccdSmrg 121533e6c936aSmrg# XORG_COMPILER_FLAGS 121543e6c936aSmrg# --------------- 121553e6c936aSmrg# Minimum version: 1.16.0 121563e6c936aSmrg# 121573e6c936aSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 121583e6c936aSmrg# arguments supported by the selected compiler which do NOT alter the generated 121593e6c936aSmrg# code. These arguments will cause the compiler to print various warnings 121603e6c936aSmrg# during compilation AND turn a conservative set of warnings into errors. 121613e6c936aSmrg# 121623e6c936aSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 121633e6c936aSmrg# future versions of util-macros as options are added to new compilers. 121643e6c936aSmrg# 121653e6c936aSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 121663e6c936aSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 121673e6c936aSmrg 121683e6c936aSmrgAC_ARG_ENABLE(selective-werror, 121693e6c936aSmrg AS_HELP_STRING([--disable-selective-werror], 121703e6c936aSmrg [Turn off selective compiler errors. (default: enabled)]), 121713e6c936aSmrg [SELECTIVE_WERROR=$enableval], 121723e6c936aSmrg [SELECTIVE_WERROR=yes]) 121733e6c936aSmrg 121743e6c936aSmrgAC_LANG_CASE( 121753e6c936aSmrg [C], [ 121763e6c936aSmrg define([PREFIX], [C]) 121773e6c936aSmrg ], 121783e6c936aSmrg [C++], [ 121793e6c936aSmrg define([PREFIX], [CXX]) 121803e6c936aSmrg ] 121813e6c936aSmrg) 121823e6c936aSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 121833e6c936aSmrgif test "x$SUNCC" = "xyes"; then 121843e6c936aSmrg [BASE_]PREFIX[FLAGS]="-v" 12185ff63a143Smrgelse 121863e6c936aSmrg [BASE_]PREFIX[FLAGS]="" 12187ff63a143Smrgfi 121884456fccdSmrg 121893e6c936aSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 121903e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 121913e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 121923e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 121933e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 121943e6c936aSmrg 121953e6c936aSmrgAC_LANG_CASE( 121963e6c936aSmrg [C], [ 121973e6c936aSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 121983e6c936aSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 121993e6c936aSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 122003e6c936aSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 122010f1ac3bcSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 122023e6c936aSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 122033e6c936aSmrg ] 122043e6c936aSmrg) 122054456fccdSmrg 122063e6c936aSmrg# This chunk adds additional warnings that could catch undesired effects. 122073e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 122083e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 122093e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 122103e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 122113e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 122123e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 122130f1ac3bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 122143e6c936aSmrg 122153e6c936aSmrg# These are currently disabled because they are noisy. They will be enabled 122163e6c936aSmrg# in the future once the codebase is sufficiently modernized to silence 122173e6c936aSmrg# them. For now, I don't want them to drown out the other warnings. 122183e6c936aSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 122193e6c936aSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 122200f1ac3bcSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 122213e6c936aSmrg 122223e6c936aSmrg# Turn some warnings into errors, so we don't accidently get successful builds 122233e6c936aSmrg# when there are problems that should be fixed. 122243e6c936aSmrg 122253e6c936aSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 122263e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 122273e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 122283e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 122293e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 122303e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 122313e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 122323e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 122333e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 122343e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 122353e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 122363e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 122373e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 122383e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 122393e6c936aSmrgelse 122403e6c936aSmrgAC_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]) 122413e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 122423e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 122433e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 122443e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 122453e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 122463e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 122473e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 122483e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 122493e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 122503e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 122513e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 122523e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 122533e6c936aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 122543e6c936aSmrgfi 12255ff63a143Smrg 122563e6c936aSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 122573e6c936aSmrg]) # XORG_COMPILER_FLAGS 122584456fccdSmrg 122593e6c936aSmrg# XORG_CWARNFLAGS 122603e6c936aSmrg# --------------- 122613e6c936aSmrg# Minimum version: 1.2.0 122623e6c936aSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 12263521070a0Smrg# 122643e6c936aSmrg# Defines CWARNFLAGS to enable C compiler warnings. 12265521070a0Smrg# 122663e6c936aSmrg# This function is deprecated because it defines -fno-strict-aliasing 122673e6c936aSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 122683e6c936aSmrg# is needed, then it should be added explicitly in the module when 122693e6c936aSmrg# it is updated to use BASE_CFLAGS. 122703e6c936aSmrg# 122713e6c936aSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 122723e6c936aSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 122733e6c936aSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 122743e6c936aSmrgAC_LANG_CASE( 122753e6c936aSmrg [C], [ 122763e6c936aSmrg CWARNFLAGS="$BASE_CFLAGS" 122773e6c936aSmrg if test "x$GCC" = xyes ; then 122783e6c936aSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 122793e6c936aSmrg fi 122803e6c936aSmrg AC_SUBST(CWARNFLAGS) 122813e6c936aSmrg ] 122823e6c936aSmrg) 122833e6c936aSmrg]) # XORG_CWARNFLAGS 122844456fccdSmrg 122853e6c936aSmrg# XORG_STRICT_OPTION 122863e6c936aSmrg# ----------------------- 122873e6c936aSmrg# Minimum version: 1.3.0 122883e6c936aSmrg# 122893e6c936aSmrg# Add configure option to enable strict compilation flags, such as treating 122903e6c936aSmrg# warnings as fatal errors. 122913e6c936aSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 122923e6c936aSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 122933e6c936aSmrg# 122943e6c936aSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 122953e6c936aSmrg# when strict compilation is unconditionally desired. 122963e6c936aSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 122973e6c936aSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 122983e6c936aSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 122994456fccdSmrg 123003e6c936aSmrgAC_ARG_ENABLE(strict-compilation, 123013e6c936aSmrg AS_HELP_STRING([--enable-strict-compilation], 123023e6c936aSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 123033e6c936aSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 123044456fccdSmrg 123053e6c936aSmrgAC_LANG_CASE( 123063e6c936aSmrg [C], [ 123073e6c936aSmrg define([PREFIX], [C]) 123083e6c936aSmrg ], 123093e6c936aSmrg [C++], [ 123103e6c936aSmrg define([PREFIX], [CXX]) 123113e6c936aSmrg ] 123123e6c936aSmrg) 12313521070a0Smrg 123143e6c936aSmrg[STRICT_]PREFIX[FLAGS]="" 123153e6c936aSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 123163e6c936aSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 12317521070a0Smrg 123183e6c936aSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 123193e6c936aSmrg# activate it with -Werror, so we add it here explicitly. 123203e6c936aSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 12321521070a0Smrg 123223e6c936aSmrgif test "x$STRICT_COMPILE" = "xyes"; then 123233e6c936aSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 123243e6c936aSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 123253e6c936aSmrgfi 123263e6c936aSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 123273e6c936aSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 123283e6c936aSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 123293e6c936aSmrg]) # XORG_STRICT_OPTION 12330521070a0Smrg 123313e6c936aSmrg# XORG_DEFAULT_OPTIONS 12332ff63a143Smrg# -------------------- 123333e6c936aSmrg# Minimum version: 1.3.0 12334521070a0Smrg# 123353e6c936aSmrg# Defines default options for X.Org modules. 12336521070a0Smrg# 123373e6c936aSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 123383e6c936aSmrgAC_REQUIRE([AC_PROG_INSTALL]) 123393e6c936aSmrgXORG_COMPILER_FLAGS 123403e6c936aSmrgXORG_CWARNFLAGS 123413e6c936aSmrgXORG_STRICT_OPTION 123423e6c936aSmrgXORG_RELEASE_VERSION 123433e6c936aSmrgXORG_CHANGELOG 123443e6c936aSmrgXORG_INSTALL 123453e6c936aSmrgXORG_MANPAGE_SECTIONS 123463e6c936aSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 123473e6c936aSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 123483e6c936aSmrg]) # XORG_DEFAULT_OPTIONS 12349521070a0Smrg 123503e6c936aSmrg# XORG_INSTALL() 123513e6c936aSmrg# ---------------- 123523e6c936aSmrg# Minimum version: 1.4.0 123533e6c936aSmrg# 123543e6c936aSmrg# Defines the variable INSTALL_CMD as the command to copy 123553e6c936aSmrg# INSTALL from $prefix/share/util-macros. 123563e6c936aSmrg# 123573e6c936aSmrgAC_DEFUN([XORG_INSTALL], [ 123583e6c936aSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 123593e6c936aSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 123603e6c936aSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 123613e6c936aSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 12362b0a0317aSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 12363b0a0317aSmrgtouch \$(top_srcdir)/INSTALL; \ 12364b0a0317aSmrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 123653e6c936aSmrgAC_SUBST([INSTALL_CMD]) 123663e6c936aSmrg]) # XORG_INSTALL 123673e6c936aSmrgdnl Copyright 2005 Red Hat, Inc 123683e6c936aSmrgdnl 123693e6c936aSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 123703e6c936aSmrgdnl documentation for any purpose is hereby granted without fee, provided that 123713e6c936aSmrgdnl the above copyright notice appear in all copies and that both that 123723e6c936aSmrgdnl copyright notice and this permission notice appear in supporting 123733e6c936aSmrgdnl documentation. 123743e6c936aSmrgdnl 123753e6c936aSmrgdnl The above copyright notice and this permission notice shall be included 123763e6c936aSmrgdnl in all copies or substantial portions of the Software. 123773e6c936aSmrgdnl 123783e6c936aSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 123793e6c936aSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 123803e6c936aSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 123813e6c936aSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 123823e6c936aSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 123833e6c936aSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 123843e6c936aSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 123853e6c936aSmrgdnl 123863e6c936aSmrgdnl Except as contained in this notice, the name of the copyright holders shall 123873e6c936aSmrgdnl not be used in advertising or otherwise to promote the sale, use or 123883e6c936aSmrgdnl other dealings in this Software without prior written authorization 123893e6c936aSmrgdnl from the copyright holders. 123903e6c936aSmrgdnl 12391521070a0Smrg 123923e6c936aSmrg# XORG_RELEASE_VERSION 123933e6c936aSmrg# -------------------- 123943e6c936aSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 123950f1ac3bcSmrg 123963e6c936aSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 123973e6c936aSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 123983e6c936aSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 123993e6c936aSmrg [Major version of this package]) 124003e6c936aSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 124013e6c936aSmrg if test "x$PVM" = "x"; then 124023e6c936aSmrg PVM="0" 124033e6c936aSmrg fi 124043e6c936aSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 124053e6c936aSmrg [$PVM], 124063e6c936aSmrg [Minor version of this package]) 124073e6c936aSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 124083e6c936aSmrg if test "x$PVP" = "x"; then 124093e6c936aSmrg PVP="0" 124103e6c936aSmrg fi 124113e6c936aSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 124123e6c936aSmrg [$PVP], 124133e6c936aSmrg [Patch version of this package]) 124143e6c936aSmrg]) 12415ff63a143Smrg 124163e6c936aSmrg# XORG_CHANGELOG() 124173e6c936aSmrg# ---------------- 124183e6c936aSmrg# Minimum version: 1.2.0 124193e6c936aSmrg# 124203e6c936aSmrg# Defines the variable CHANGELOG_CMD as the command to generate 124213e6c936aSmrg# ChangeLog from git. 124223e6c936aSmrg# 124233e6c936aSmrg# 124243e6c936aSmrgAC_DEFUN([XORG_CHANGELOG], [ 12425b0a0317aSmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 124263e6c936aSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 12427b0a0317aSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 12428b0a0317aSmrgtouch \$(top_srcdir)/ChangeLog; \ 12429b0a0317aSmrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 124303e6c936aSmrgAC_SUBST([CHANGELOG_CMD]) 124313e6c936aSmrg]) # XORG_CHANGELOG 124324456fccdSmrg 12433