aclocal.m4 revision 2fd96bc7
12fd96bc7Smrg# generated automatically by aclocal 1.14.1 -*- Autoconf -*- 289c04b6cSmrg 32fd96bc7Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 41f0ac6a5Smrg 51f0ac6a5Smrg# This file is free software; the Free Software Foundation 61f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it, 71f0ac6a5Smrg# with or without modifications, as long as this notice is preserved. 81f0ac6a5Smrg 91f0ac6a5Smrg# This program is distributed in the hope that it will be useful, 101f0ac6a5Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 111f0ac6a5Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 121f0ac6a5Smrg# PARTICULAR PURPOSE. 131f0ac6a5Smrg 1489c04b6cSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15e5410a46Smrgm4_ifndef([AC_AUTOCONF_VERSION], 16e5410a46Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17b9867631Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18b9867631Smrg[m4_warning([this file was generated for autoconf 2.69. 19e5410a46SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20e5410a46SmrgIf you have problems, you may need to regenerate the build system entirely. 2189c04b6cSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 221f0ac6a5Smrg 232fd96bc7Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 241f0ac6a5Smrg# 252fd96bc7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 262fd96bc7Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 272fd96bc7Smrg# Foundation, Inc. 282fd96bc7Smrg# Written by Gordon Matzigkeit, 1996 29e5410a46Smrg# 302fd96bc7Smrg# This file is free software; the Free Software Foundation gives 312fd96bc7Smrg# unlimited permission to copy and/or distribute it, with or without 322fd96bc7Smrg# modifications, as long as this notice is preserved. 331f0ac6a5Smrg 342fd96bc7Smrgm4_define([_LT_COPYING], [dnl 352fd96bc7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 362fd96bc7Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 372fd96bc7Smrg# Foundation, Inc. 382fd96bc7Smrg# Written by Gordon Matzigkeit, 1996 391f0ac6a5Smrg# 402fd96bc7Smrg# This file is part of GNU Libtool. 411f0ac6a5Smrg# 422fd96bc7Smrg# GNU Libtool is free software; you can redistribute it and/or 432fd96bc7Smrg# modify it under the terms of the GNU General Public License as 442fd96bc7Smrg# published by the Free Software Foundation; either version 2 of 452fd96bc7Smrg# the License, or (at your option) any later version. 461f0ac6a5Smrg# 472fd96bc7Smrg# As a special exception to the GNU General Public License, 482fd96bc7Smrg# if you distribute this file as part of a program or library that 492fd96bc7Smrg# is built using GNU Libtool, you may include this file under the 502fd96bc7Smrg# same distribution terms that you use for the rest of that program. 511f0ac6a5Smrg# 522fd96bc7Smrg# GNU Libtool is distributed in the hope that it will be useful, 532fd96bc7Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 542fd96bc7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 552fd96bc7Smrg# GNU General Public License for more details. 56e5410a46Smrg# 572fd96bc7Smrg# You should have received a copy of the GNU General Public License 582fd96bc7Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 592fd96bc7Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 602fd96bc7Smrg# obtained by writing to the Free Software Foundation, Inc., 612fd96bc7Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 622fd96bc7Smrg]) 631f0ac6a5Smrg 642fd96bc7Smrg# serial 57 LT_INIT 652fd96bc7Smrg 662fd96bc7Smrg 672fd96bc7Smrg# LT_PREREQ(VERSION) 682fd96bc7Smrg# ------------------ 692fd96bc7Smrg# Complain and exit if this libtool version is less that VERSION. 702fd96bc7Smrgm4_defun([LT_PREREQ], 712fd96bc7Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 722fd96bc7Smrg [m4_default([$3], 732fd96bc7Smrg [m4_fatal([Libtool version $1 or higher is required], 742fd96bc7Smrg 63)])], 752fd96bc7Smrg [$2])]) 762fd96bc7Smrg 772fd96bc7Smrg 782fd96bc7Smrg# _LT_CHECK_BUILDDIR 792fd96bc7Smrg# ------------------ 802fd96bc7Smrg# Complain if the absolute build directory name contains unusual characters 812fd96bc7Smrgm4_defun([_LT_CHECK_BUILDDIR], 822fd96bc7Smrg[case `pwd` in 832fd96bc7Smrg *\ * | *\ *) 842fd96bc7Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 852fd96bc7Smrgesac 86e5410a46Smrg]) 871f0ac6a5Smrg 881f0ac6a5Smrg 892fd96bc7Smrg# LT_INIT([OPTIONS]) 902fd96bc7Smrg# ------------------ 912fd96bc7SmrgAC_DEFUN([LT_INIT], 922fd96bc7Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 932fd96bc7SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 942fd96bc7SmrgAC_BEFORE([$0], [LT_LANG])dnl 952fd96bc7SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 962fd96bc7SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 972fd96bc7Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 981f0ac6a5Smrg 992fd96bc7Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 1002fd96bc7Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 1012fd96bc7Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 1022fd96bc7Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 1032fd96bc7Smrgdnl unless we require an AC_DEFUNed macro: 1042fd96bc7SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 1052fd96bc7SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 1062fd96bc7SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 1072fd96bc7SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1082fd96bc7Smrgm4_require([_LT_PROG_LTMAIN])dnl 1091f0ac6a5Smrg 1102fd96bc7Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1111f0ac6a5Smrg 1122fd96bc7Smrgdnl Parse OPTIONS 1132fd96bc7Smrg_LT_SET_OPTIONS([$0], [$1]) 1141f0ac6a5Smrg 1152fd96bc7Smrg# This can be used to rebuild libtool when needed 1162fd96bc7SmrgLIBTOOL_DEPS="$ltmain" 1171f0ac6a5Smrg 1182fd96bc7Smrg# Always use our own libtool. 1192fd96bc7SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1202fd96bc7SmrgAC_SUBST(LIBTOOL)dnl 1211f0ac6a5Smrg 1222fd96bc7Smrg_LT_SETUP 1231f0ac6a5Smrg 1242fd96bc7Smrg# Only expand once: 1252fd96bc7Smrgm4_define([LT_INIT]) 1262fd96bc7Smrg])# LT_INIT 1271f0ac6a5Smrg 1282fd96bc7Smrg# Old names: 1292fd96bc7SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1302fd96bc7SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1312fd96bc7Smrgdnl aclocal-1.4 backwards compatibility: 1322fd96bc7Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1332fd96bc7Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1341f0ac6a5Smrg 1351f0ac6a5Smrg 1362fd96bc7Smrg# _LT_CC_BASENAME(CC) 1372fd96bc7Smrg# ------------------- 1382fd96bc7Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1392fd96bc7Smrgm4_defun([_LT_CC_BASENAME], 1402fd96bc7Smrg[for cc_temp in $1""; do 1412fd96bc7Smrg case $cc_temp in 1422fd96bc7Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1432fd96bc7Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1442fd96bc7Smrg \-*) ;; 1452fd96bc7Smrg *) break;; 1462fd96bc7Smrg esac 1472fd96bc7Smrgdone 1482fd96bc7Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1492fd96bc7Smrg]) 150e5410a46Smrg 151e5410a46Smrg 1522fd96bc7Smrg# _LT_FILEUTILS_DEFAULTS 1532fd96bc7Smrg# ---------------------- 1542fd96bc7Smrg# It is okay to use these file commands and assume they have been set 1552fd96bc7Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1562fd96bc7Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1572fd96bc7Smrg[: ${CP="cp -f"} 1582fd96bc7Smrg: ${MV="mv -f"} 1592fd96bc7Smrg: ${RM="rm -f"} 1602fd96bc7Smrg])# _LT_FILEUTILS_DEFAULTS 1611f0ac6a5Smrg 162e5410a46Smrg 1632fd96bc7Smrg# _LT_SETUP 1642fd96bc7Smrg# --------- 1652fd96bc7Smrgm4_defun([_LT_SETUP], 1662fd96bc7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1672fd96bc7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1682fd96bc7SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1692fd96bc7SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 170e5410a46Smrg 1712fd96bc7Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1722fd96bc7Smrgdnl 1732fd96bc7Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1742fd96bc7Smrg_LT_DECL([], [host], [0])dnl 1752fd96bc7Smrg_LT_DECL([], [host_os], [0])dnl 1762fd96bc7Smrgdnl 1772fd96bc7Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1782fd96bc7Smrg_LT_DECL([], [build], [0])dnl 1792fd96bc7Smrg_LT_DECL([], [build_os], [0])dnl 1802fd96bc7Smrgdnl 1812fd96bc7SmrgAC_REQUIRE([AC_PROG_CC])dnl 1822fd96bc7SmrgAC_REQUIRE([LT_PATH_LD])dnl 1832fd96bc7SmrgAC_REQUIRE([LT_PATH_NM])dnl 1842fd96bc7Smrgdnl 1852fd96bc7SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1862fd96bc7Smrgtest -z "$LN_S" && LN_S="ln -s" 1872fd96bc7Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1882fd96bc7Smrgdnl 1892fd96bc7SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1902fd96bc7Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1912fd96bc7Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1922fd96bc7Smrgdnl 1932fd96bc7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1942fd96bc7Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 1952fd96bc7Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1962fd96bc7Smrgm4_require([_LT_CMD_RELOAD])dnl 1972fd96bc7Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 1982fd96bc7Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1992fd96bc7Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2002fd96bc7Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 2012fd96bc7Smrgm4_require([_LT_WITH_SYSROOT])dnl 202e5410a46Smrg 2032fd96bc7Smrg_LT_CONFIG_LIBTOOL_INIT([ 2042fd96bc7Smrg# See if we are running on zsh, and set the options which allow our 2052fd96bc7Smrg# commands through without removal of \ escapes INIT. 2062fd96bc7Smrgif test -n "\${ZSH_VERSION+set}" ; then 2072fd96bc7Smrg setopt NO_GLOB_SUBST 2081f0ac6a5Smrgfi 209e5410a46Smrg]) 2102fd96bc7Smrgif test -n "${ZSH_VERSION+set}" ; then 2112fd96bc7Smrg setopt NO_GLOB_SUBST 2122fd96bc7Smrgfi 2131f0ac6a5Smrg 2142fd96bc7Smrg_LT_CHECK_OBJDIR 215e5410a46Smrg 2162fd96bc7Smrgm4_require([_LT_TAG_COMPILER])dnl 2171f0ac6a5Smrg 2182fd96bc7Smrgcase $host_os in 2192fd96bc7Smrgaix3*) 2202fd96bc7Smrg # AIX sometimes has problems with the GCC collect2 program. For some 2212fd96bc7Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2222fd96bc7Smrg # vanish in a puff of smoke. 2232fd96bc7Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 2242fd96bc7Smrg COLLECT_NAMES= 2252fd96bc7Smrg export COLLECT_NAMES 2262fd96bc7Smrg fi 2272fd96bc7Smrg ;; 2282fd96bc7Smrgesac 2291f0ac6a5Smrg 2302fd96bc7Smrg# Global variables: 2312fd96bc7Smrgofile=libtool 2322fd96bc7Smrgcan_build_shared=yes 2331f0ac6a5Smrg 2342fd96bc7Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 2352fd96bc7Smrg# which needs '.lib'). 2362fd96bc7Smrglibext=a 2371f0ac6a5Smrg 2382fd96bc7Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 239e5410a46Smrg 2402fd96bc7Smrgold_CC="$CC" 2412fd96bc7Smrgold_CFLAGS="$CFLAGS" 242e5410a46Smrg 2432fd96bc7Smrg# Set sane defaults for various variables 2442fd96bc7Smrgtest -z "$CC" && CC=cc 2452fd96bc7Smrgtest -z "$LTCC" && LTCC=$CC 2462fd96bc7Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2472fd96bc7Smrgtest -z "$LD" && LD=ld 2482fd96bc7Smrgtest -z "$ac_objext" && ac_objext=o 249e5410a46Smrg 2502fd96bc7Smrg_LT_CC_BASENAME([$compiler]) 251b9867631Smrg 2522fd96bc7Smrg# Only perform the check for file, if the check method requires it 2532fd96bc7Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2542fd96bc7Smrgcase $deplibs_check_method in 2552fd96bc7Smrgfile_magic*) 2562fd96bc7Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2572fd96bc7Smrg _LT_PATH_MAGIC 258e5410a46Smrg fi 2592fd96bc7Smrg ;; 2602fd96bc7Smrgesac 261e5410a46Smrg 2622fd96bc7Smrg# Use C for the default configuration in the libtool script 2632fd96bc7SmrgLT_SUPPORTED_TAG([CC]) 2642fd96bc7Smrg_LT_LANG_C_CONFIG 2652fd96bc7Smrg_LT_LANG_DEFAULT_CONFIG 2662fd96bc7Smrg_LT_CONFIG_COMMANDS 2672fd96bc7Smrg])# _LT_SETUP 268e5410a46Smrg 269e5410a46Smrg 2702fd96bc7Smrg# _LT_PREPARE_SED_QUOTE_VARS 2712fd96bc7Smrg# -------------------------- 2722fd96bc7Smrg# Define a few sed substitution that help us do robust quoting. 2732fd96bc7Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2742fd96bc7Smrg[# Backslashify metacharacters that are still active within 2752fd96bc7Smrg# double-quoted strings. 2762fd96bc7Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 277e5410a46Smrg 2782fd96bc7Smrg# Same as above, but do not quote variable references. 2792fd96bc7Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 280b9867631Smrg 2812fd96bc7Smrg# Sed substitution to delay expansion of an escaped shell variable in a 2822fd96bc7Smrg# double_quote_subst'ed string. 2832fd96bc7Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 284b9867631Smrg 2852fd96bc7Smrg# Sed substitution to delay expansion of an escaped single quote. 2862fd96bc7Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 287b9867631Smrg 2882fd96bc7Smrg# Sed substitution to avoid accidental globbing in evaled expressions 2892fd96bc7Smrgno_glob_subst='s/\*/\\\*/g' 2902fd96bc7Smrg]) 291b9867631Smrg 2922fd96bc7Smrg# _LT_PROG_LTMAIN 2932fd96bc7Smrg# --------------- 2942fd96bc7Smrg# Note that this code is called both from `configure', and `config.status' 2952fd96bc7Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2962fd96bc7Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 2972fd96bc7Smrg# so we pass a copy along to make sure it has a sensible value anyway. 2982fd96bc7Smrgm4_defun([_LT_PROG_LTMAIN], 2992fd96bc7Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3002fd96bc7Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3012fd96bc7Smrgltmain="$ac_aux_dir/ltmain.sh" 3022fd96bc7Smrg])# _LT_PROG_LTMAIN 303b9867631Smrg 304b9867631Smrg 305b9867631Smrg 3062fd96bc7Smrg# So that we can recreate a full libtool script including additional 3072fd96bc7Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3082fd96bc7Smrg# in macros and then make a single call at the end using the `libtool' 3092fd96bc7Smrg# label. 3101f0ac6a5Smrg 3111f0ac6a5Smrg 3122fd96bc7Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3132fd96bc7Smrg# ---------------------------------------- 3142fd96bc7Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3152fd96bc7Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3162fd96bc7Smrg[m4_ifval([$1], 3172fd96bc7Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3182fd96bc7Smrg [$1 3192fd96bc7Smrg])])]) 3201f0ac6a5Smrg 3212fd96bc7Smrg# Initialize. 3222fd96bc7Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3231f0ac6a5Smrg 3241f0ac6a5Smrg 3252fd96bc7Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3262fd96bc7Smrg# ------------------------------ 3272fd96bc7Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3282fd96bc7Smrgm4_define([_LT_CONFIG_LIBTOOL], 3292fd96bc7Smrg[m4_ifval([$1], 3302fd96bc7Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3312fd96bc7Smrg [$1 3322fd96bc7Smrg])])]) 3331f0ac6a5Smrg 3342fd96bc7Smrg# Initialize. 3352fd96bc7Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3361f0ac6a5Smrg 3371f0ac6a5Smrg 3382fd96bc7Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3392fd96bc7Smrg# ----------------------------------------------------- 3402fd96bc7Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3412fd96bc7Smrg[_LT_CONFIG_LIBTOOL([$1]) 3422fd96bc7Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 343e5410a46Smrg]) 344e5410a46Smrg 345e5410a46Smrg 3462fd96bc7Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3472fd96bc7Smrg# ----------------------------- 3482fd96bc7Smrg# Add leading comment marks to the start of each line, and a trailing 3492fd96bc7Smrg# full-stop to the whole comment if one is not present already. 3502fd96bc7Smrgm4_define([_LT_FORMAT_COMMENT], 3512fd96bc7Smrg[m4_ifval([$1], [ 3522fd96bc7Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3532fd96bc7Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3542fd96bc7Smrg)]) 3551f0ac6a5Smrg 3561f0ac6a5Smrg 357e5410a46Smrg 3581f0ac6a5Smrg 3591f0ac6a5Smrg 3602fd96bc7Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3612fd96bc7Smrg# ------------------------------------------------------------------- 3622fd96bc7Smrg# CONFIGNAME is the name given to the value in the libtool script. 3632fd96bc7Smrg# VARNAME is the (base) name used in the configure script. 3642fd96bc7Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3652fd96bc7Smrg# VARNAME. Any other value will be used directly. 3662fd96bc7Smrgm4_define([_LT_DECL], 3672fd96bc7Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3682fd96bc7Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3692fd96bc7Smrg [m4_ifval([$1], [$1], [$2])]) 3702fd96bc7Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3712fd96bc7Smrg m4_ifval([$4], 3722fd96bc7Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3732fd96bc7Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3742fd96bc7Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3752fd96bc7Smrg]) 3761f0ac6a5Smrg 3771f0ac6a5Smrg 3782fd96bc7Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3792fd96bc7Smrg# -------------------------------------------------------- 3802fd96bc7Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3811f0ac6a5Smrg 3821f0ac6a5Smrg 3832fd96bc7Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3842fd96bc7Smrg# ------------------------------------------------ 3852fd96bc7Smrgm4_define([lt_decl_tag_varnames], 3862fd96bc7Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 387b9867631Smrg 388b9867631Smrg 3892fd96bc7Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3902fd96bc7Smrg# --------------------------------------------------------- 3912fd96bc7Smrgm4_define([_lt_decl_filter], 3922fd96bc7Smrg[m4_case([$#], 3932fd96bc7Smrg [0], [m4_fatal([$0: too few arguments: $#])], 3942fd96bc7Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3952fd96bc7Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3962fd96bc7Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3972fd96bc7Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3982fd96bc7Smrg]) 399b9867631Smrg 400b9867631Smrg 4012fd96bc7Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 4022fd96bc7Smrg# -------------------------------------------------- 4032fd96bc7Smrgm4_define([lt_decl_quote_varnames], 4042fd96bc7Smrg[_lt_decl_filter([value], [1], $@)]) 405b9867631Smrg 4061f0ac6a5Smrg 4072fd96bc7Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4082fd96bc7Smrg# --------------------------------------------------- 4092fd96bc7Smrgm4_define([lt_decl_dquote_varnames], 4102fd96bc7Smrg[_lt_decl_filter([value], [2], $@)]) 4111f0ac6a5Smrg 41289c04b6cSmrg 4132fd96bc7Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4142fd96bc7Smrg# --------------------------------------------------- 4152fd96bc7Smrgm4_define([lt_decl_varnames_tagged], 4162fd96bc7Smrg[m4_assert([$# <= 2])dnl 4172fd96bc7Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 4182fd96bc7Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4192fd96bc7Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4202fd96bc7Smrgm4_define([_lt_decl_varnames_tagged], 4212fd96bc7Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4221f0ac6a5Smrg 4231f0ac6a5Smrg 4242fd96bc7Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4252fd96bc7Smrg# ------------------------------------------------ 4262fd96bc7Smrgm4_define([lt_decl_all_varnames], 4272fd96bc7Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4282fd96bc7Smrg m4_if([$2], [], 4292fd96bc7Smrg m4_quote(lt_decl_varnames), 4302fd96bc7Smrg m4_quote(m4_shift($@))))[]dnl 43189c04b6cSmrg]) 4322fd96bc7Smrgm4_define([_lt_decl_all_varnames], 4332fd96bc7Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 4342fd96bc7Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4351f0ac6a5Smrg]) 4361f0ac6a5Smrg 437e5410a46Smrg 4382fd96bc7Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4392fd96bc7Smrg# ------------------------------------ 4402fd96bc7Smrg# Quote a variable value, and forward it to `config.status' so that its 4412fd96bc7Smrg# declaration there will have the same value as in `configure'. VARNAME 4422fd96bc7Smrg# must have a single quote delimited value for this to work. 4432fd96bc7Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4442fd96bc7Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 445e5410a46Smrg 4461f0ac6a5Smrg 4472fd96bc7Smrg# _LT_CONFIG_STATUS_DECLARATIONS 4482fd96bc7Smrg# ------------------------------ 4492fd96bc7Smrg# We delimit libtool config variables with single quotes, so when 4502fd96bc7Smrg# we write them to config.status, we have to be sure to quote all 4512fd96bc7Smrg# embedded single quotes properly. In configure, this macro expands 4522fd96bc7Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4532fd96bc7Smrg# 4542fd96bc7Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4552fd96bc7Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4562fd96bc7Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4572fd96bc7Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4581f0ac6a5Smrg 4591f0ac6a5Smrg 4602fd96bc7Smrg# _LT_LIBTOOL_TAGS 4612fd96bc7Smrg# ---------------- 4622fd96bc7Smrg# Output comment and list of tags supported by the script 4632fd96bc7Smrgm4_defun([_LT_LIBTOOL_TAGS], 4642fd96bc7Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4652fd96bc7Smrgavailable_tags="_LT_TAGS"dnl 4662fd96bc7Smrg]) 4671f0ac6a5Smrg 4681f0ac6a5Smrg 4692fd96bc7Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4702fd96bc7Smrg# ----------------------------------- 4712fd96bc7Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4722fd96bc7Smrg# expand to a commented shell variable setting: 4736fae4e5dSmrg# 4742fd96bc7Smrg# # Some comment about what VAR is for. 4752fd96bc7Smrg# visible_name=$lt_internal_name 4762fd96bc7Smrgm4_define([_LT_LIBTOOL_DECLARE], 4772fd96bc7Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4782fd96bc7Smrg [description])))[]dnl 4792fd96bc7Smrgm4_pushdef([_libtool_name], 4802fd96bc7Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4812fd96bc7Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4822fd96bc7Smrg [0], [_libtool_name=[$]$1], 4832fd96bc7Smrg [1], [_libtool_name=$lt_[]$1], 4842fd96bc7Smrg [2], [_libtool_name=$lt_[]$1], 4852fd96bc7Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4862fd96bc7Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4872fd96bc7Smrg]) 4881f0ac6a5Smrg 48989c04b6cSmrg 4902fd96bc7Smrg# _LT_LIBTOOL_CONFIG_VARS 4912fd96bc7Smrg# ----------------------- 4922fd96bc7Smrg# Produce commented declarations of non-tagged libtool config variables 4932fd96bc7Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 4942fd96bc7Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4952fd96bc7Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4962fd96bc7Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4972fd96bc7Smrg[m4_foreach([_lt_var], 4982fd96bc7Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4992fd96bc7Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 5009c9ff80cSmrg 5019c9ff80cSmrg 5022fd96bc7Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 5032fd96bc7Smrg# ------------------------- 5042fd96bc7Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 5052fd96bc7Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5062fd96bc7Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 5071f0ac6a5Smrg 5089c9ff80cSmrg 5092fd96bc7Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 5102fd96bc7Smrg# ------------------------------ 5112fd96bc7Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 51289c04b6cSmrg 5136fae4e5dSmrg 5142fd96bc7Smrg# _LT_CONFIG_COMMANDS 5152fd96bc7Smrg# ------------------- 5162fd96bc7Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5172fd96bc7Smrg# variables for single and double quote escaping we saved from calls 5182fd96bc7Smrg# to _LT_DECL, we can put quote escaped variables declarations 5192fd96bc7Smrg# into `config.status', and then the shell code to quote escape them in 5202fd96bc7Smrg# for loops in `config.status'. Finally, any additional code accumulated 5212fd96bc7Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5222fd96bc7Smrgm4_defun([_LT_CONFIG_COMMANDS], 5232fd96bc7Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5242fd96bc7Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5252fd96bc7Smrg dnl instead of duplicating it all over again into config.status, 5262fd96bc7Smrg dnl then we will have config.status run $CONFIG_LT later, so it 5272fd96bc7Smrg dnl needs to know what name is stored there: 5282fd96bc7Smrg [AC_CONFIG_COMMANDS([libtool], 5292fd96bc7Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5302fd96bc7Smrg dnl If the libtool generation code is destined for config.status, 5312fd96bc7Smrg dnl expand the accumulated commands and init code now: 5322fd96bc7Smrg [AC_CONFIG_COMMANDS([libtool], 5332fd96bc7Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5342fd96bc7Smrg])#_LT_CONFIG_COMMANDS 5356fae4e5dSmrg 5369c9ff80cSmrg 5372fd96bc7Smrg# Initialize. 5382fd96bc7Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5392fd96bc7Smrg[ 5409c9ff80cSmrg 5412fd96bc7Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5422fd96bc7Smrg# if CDPATH is set. 5432fd96bc7Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5441f0ac6a5Smrg 5452fd96bc7Smrgsed_quote_subst='$sed_quote_subst' 5462fd96bc7Smrgdouble_quote_subst='$double_quote_subst' 5472fd96bc7Smrgdelay_variable_subst='$delay_variable_subst' 5482fd96bc7Smrg_LT_CONFIG_STATUS_DECLARATIONS 5492fd96bc7SmrgLTCC='$LTCC' 5502fd96bc7SmrgLTCFLAGS='$LTCFLAGS' 5512fd96bc7Smrgcompiler='$compiler_DEFAULT' 5521f0ac6a5Smrg 5532fd96bc7Smrg# A function that is used when there is no print builtin or printf. 5542fd96bc7Smrgfunc_fallback_echo () 5552fd96bc7Smrg{ 5562fd96bc7Smrg eval 'cat <<_LTECHO_EOF 5572fd96bc7Smrg\$[]1 5582fd96bc7Smrg_LTECHO_EOF' 5592fd96bc7Smrg} 5601f0ac6a5Smrg 5612fd96bc7Smrg# Quote evaled strings. 5622fd96bc7Smrgfor var in lt_decl_all_varnames([[ \ 5632fd96bc7Smrg]], lt_decl_quote_varnames); do 5642fd96bc7Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5652fd96bc7Smrg *[[\\\\\\\`\\"\\\$]]*) 5662fd96bc7Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 5672fd96bc7Smrg ;; 5682fd96bc7Smrg *) 5692fd96bc7Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5702fd96bc7Smrg ;; 5712fd96bc7Smrg esac 5722fd96bc7Smrgdone 5731f0ac6a5Smrg 5742fd96bc7Smrg# Double-quote double-evaled strings. 5752fd96bc7Smrgfor var in lt_decl_all_varnames([[ \ 5762fd96bc7Smrg]], lt_decl_dquote_varnames); do 5772fd96bc7Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5782fd96bc7Smrg *[[\\\\\\\`\\"\\\$]]*) 5792fd96bc7Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 5802fd96bc7Smrg ;; 5812fd96bc7Smrg *) 5822fd96bc7Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5832fd96bc7Smrg ;; 5842fd96bc7Smrg esac 5852fd96bc7Smrgdone 586e5410a46Smrg 5872fd96bc7Smrg_LT_OUTPUT_LIBTOOL_INIT 5886fae4e5dSmrg]) 589e5410a46Smrg 5902fd96bc7Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 5912fd96bc7Smrg# ------------------------------------ 5922fd96bc7Smrg# Generate a child script FILE with all initialization necessary to 5932fd96bc7Smrg# reuse the environment learned by the parent script, and make the 5942fd96bc7Smrg# file executable. If COMMENT is supplied, it is inserted after the 5952fd96bc7Smrg# `#!' sequence but before initialization text begins. After this 5962fd96bc7Smrg# macro, additional text can be appended to FILE to form the body of 5972fd96bc7Smrg# the child script. The macro ends with non-zero status if the 5982fd96bc7Smrg# file could not be fully written (such as if the disk is full). 5992fd96bc7Smrgm4_ifdef([AS_INIT_GENERATED], 6002fd96bc7Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 6012fd96bc7Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 6022fd96bc7Smrg[m4_require([AS_PREPARE])]dnl 6032fd96bc7Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 6042fd96bc7Smrg[lt_write_fail=0 6052fd96bc7Smrgcat >$1 <<_ASEOF || lt_write_fail=1 6062fd96bc7Smrg#! $SHELL 6072fd96bc7Smrg# Generated by $as_me. 6082fd96bc7Smrg$2 6092fd96bc7SmrgSHELL=\${CONFIG_SHELL-$SHELL} 6102fd96bc7Smrgexport SHELL 6112fd96bc7Smrg_ASEOF 6122fd96bc7Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 6132fd96bc7SmrgAS_SHELL_SANITIZE 6142fd96bc7Smrg_AS_PREPARE 6152fd96bc7Smrgexec AS_MESSAGE_FD>&1 6162fd96bc7Smrg_ASEOF 6172fd96bc7Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 6182fd96bc7Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6191f0ac6a5Smrg 6202fd96bc7Smrg# LT_OUTPUT 6212fd96bc7Smrg# --------- 6222fd96bc7Smrg# This macro allows early generation of the libtool script (before 6232fd96bc7Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 6242fd96bc7Smrg# tests. 6252fd96bc7SmrgAC_DEFUN([LT_OUTPUT], 6262fd96bc7Smrg[: ${CONFIG_LT=./config.lt} 6272fd96bc7SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 6282fd96bc7Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 6292fd96bc7Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 6309c9ff80cSmrg 6312fd96bc7Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6322fd96bc7Smrglt_cl_silent=false 6332fd96bc7Smrgexec AS_MESSAGE_LOG_FD>>config.log 6342fd96bc7Smrg{ 6352fd96bc7Smrg echo 6362fd96bc7Smrg AS_BOX([Running $as_me.]) 6372fd96bc7Smrg} >&AS_MESSAGE_LOG_FD 6381f0ac6a5Smrg 6392fd96bc7Smrglt_cl_help="\ 6402fd96bc7Smrg\`$as_me' creates a local libtool stub from the current configuration, 6412fd96bc7Smrgfor use in further configure time tests before the real libtool is 6422fd96bc7Smrggenerated. 6431f0ac6a5Smrg 6442fd96bc7SmrgUsage: $[0] [[OPTIONS]] 6451f0ac6a5Smrg 6462fd96bc7Smrg -h, --help print this help, then exit 6472fd96bc7Smrg -V, --version print version number, then exit 6482fd96bc7Smrg -q, --quiet do not print progress messages 6492fd96bc7Smrg -d, --debug don't remove temporary files 6501f0ac6a5Smrg 6512fd96bc7SmrgReport bugs to <bug-libtool@gnu.org>." 6521f0ac6a5Smrg 6532fd96bc7Smrglt_cl_version="\ 6542fd96bc7Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6552fd96bc7Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6562fd96bc7Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6571f0ac6a5Smrg 6582fd96bc7SmrgCopyright (C) 2011 Free Software Foundation, Inc. 6592fd96bc7SmrgThis config.lt script is free software; the Free Software Foundation 6602fd96bc7Smrggives unlimited permision to copy, distribute and modify it." 661e5410a46Smrg 6622fd96bc7Smrgwhile test $[#] != 0 6632fd96bc7Smrgdo 6642fd96bc7Smrg case $[1] in 6652fd96bc7Smrg --version | --v* | -V ) 6662fd96bc7Smrg echo "$lt_cl_version"; exit 0 ;; 6672fd96bc7Smrg --help | --h* | -h ) 6682fd96bc7Smrg echo "$lt_cl_help"; exit 0 ;; 6692fd96bc7Smrg --debug | --d* | -d ) 6702fd96bc7Smrg debug=: ;; 6712fd96bc7Smrg --quiet | --q* | --silent | --s* | -q ) 6722fd96bc7Smrg lt_cl_silent=: ;; 673e5410a46Smrg 6742fd96bc7Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6752fd96bc7SmrgTry \`$[0] --help' for more information.]) ;; 6769c9ff80cSmrg 6772fd96bc7Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6782fd96bc7SmrgTry \`$[0] --help' for more information.]) ;; 6792fd96bc7Smrg esac 6802fd96bc7Smrg shift 6812fd96bc7Smrgdone 6826fae4e5dSmrg 6832fd96bc7Smrgif $lt_cl_silent; then 6842fd96bc7Smrg exec AS_MESSAGE_FD>/dev/null 6859c9ff80cSmrgfi 6862fd96bc7Smrg_LTEOF 6879c9ff80cSmrg 6882fd96bc7Smrgcat >>"$CONFIG_LT" <<_LTEOF 6892fd96bc7Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 6902fd96bc7Smrg_LTEOF 6919c9ff80cSmrg 6922fd96bc7Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6932fd96bc7SmrgAC_MSG_NOTICE([creating $ofile]) 6942fd96bc7Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 6952fd96bc7SmrgAS_EXIT(0) 6962fd96bc7Smrg_LTEOF 6972fd96bc7Smrgchmod +x "$CONFIG_LT" 6989c9ff80cSmrg 6992fd96bc7Smrg# configure is writing to config.log, but config.lt does its own redirection, 7002fd96bc7Smrg# appending to config.log, which fails on DOS, as config.log is still kept 7012fd96bc7Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 7022fd96bc7Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 7032fd96bc7Smrglt_cl_success=: 7042fd96bc7Smrgtest "$silent" = yes && 7052fd96bc7Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 7062fd96bc7Smrgexec AS_MESSAGE_LOG_FD>/dev/null 7072fd96bc7Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 7082fd96bc7Smrgexec AS_MESSAGE_LOG_FD>>config.log 7092fd96bc7Smrg$lt_cl_success || AS_EXIT(1) 7102fd96bc7Smrg])# LT_OUTPUT 7119c9ff80cSmrg 7129c9ff80cSmrg 7132fd96bc7Smrg# _LT_CONFIG(TAG) 7142fd96bc7Smrg# --------------- 7152fd96bc7Smrg# If TAG is the built-in tag, create an initial libtool script with a 7162fd96bc7Smrg# default configuration from the untagged config vars. Otherwise add code 7172fd96bc7Smrg# to config.status for appending the configuration named by TAG from the 7182fd96bc7Smrg# matching tagged config vars. 7192fd96bc7Smrgm4_defun([_LT_CONFIG], 7202fd96bc7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7212fd96bc7Smrg_LT_CONFIG_SAVE_COMMANDS([ 7222fd96bc7Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7232fd96bc7Smrg m4_if(_LT_TAG, [C], [ 7242fd96bc7Smrg # See if we are running on zsh, and set the options which allow our 7252fd96bc7Smrg # commands through without removal of \ escapes. 7262fd96bc7Smrg if test -n "${ZSH_VERSION+set}" ; then 7272fd96bc7Smrg setopt NO_GLOB_SUBST 7282fd96bc7Smrg fi 7299c9ff80cSmrg 7302fd96bc7Smrg cfgfile="${ofile}T" 7312fd96bc7Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7322fd96bc7Smrg $RM "$cfgfile" 7339c9ff80cSmrg 7342fd96bc7Smrg cat <<_LT_EOF >> "$cfgfile" 7352fd96bc7Smrg#! $SHELL 7369c9ff80cSmrg 7372fd96bc7Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 7382fd96bc7Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 7392fd96bc7Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7402fd96bc7Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7412fd96bc7Smrg# 7422fd96bc7Smrg_LT_COPYING 7432fd96bc7Smrg_LT_LIBTOOL_TAGS 7449c9ff80cSmrg 7452fd96bc7Smrg# ### BEGIN LIBTOOL CONFIG 7462fd96bc7Smrg_LT_LIBTOOL_CONFIG_VARS 7472fd96bc7Smrg_LT_LIBTOOL_TAG_VARS 7482fd96bc7Smrg# ### END LIBTOOL CONFIG 7499c9ff80cSmrg 7502fd96bc7Smrg_LT_EOF 7519c9ff80cSmrg 7522fd96bc7Smrg case $host_os in 7532fd96bc7Smrg aix3*) 7542fd96bc7Smrg cat <<\_LT_EOF >> "$cfgfile" 7552fd96bc7Smrg# AIX sometimes has problems with the GCC collect2 program. For some 7562fd96bc7Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7572fd96bc7Smrg# vanish in a puff of smoke. 7582fd96bc7Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 7592fd96bc7Smrg COLLECT_NAMES= 7602fd96bc7Smrg export COLLECT_NAMES 7612fd96bc7Smrgfi 7622fd96bc7Smrg_LT_EOF 7632fd96bc7Smrg ;; 7642fd96bc7Smrg esac 7659c9ff80cSmrg 7662fd96bc7Smrg _LT_PROG_LTMAIN 7679c9ff80cSmrg 7682fd96bc7Smrg # We use sed instead of cat because bash on DJGPP gets confused if 7692fd96bc7Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7702fd96bc7Smrg # text mode, it properly converts lines to CR/LF. This bash problem 7712fd96bc7Smrg # is reportedly fixed, but why not run on old versions too? 7722fd96bc7Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 7732fd96bc7Smrg || (rm -f "$cfgfile"; exit 1) 7749c9ff80cSmrg 7752fd96bc7Smrg _LT_PROG_REPLACE_SHELLFNS 776e5410a46Smrg 7772fd96bc7Smrg mv -f "$cfgfile" "$ofile" || 7782fd96bc7Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 7792fd96bc7Smrg chmod +x "$ofile" 7802fd96bc7Smrg], 7812fd96bc7Smrg[cat <<_LT_EOF >> "$ofile" 7821f0ac6a5Smrg 7832fd96bc7Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 7842fd96bc7Smrgdnl in a comment (ie after a #). 7852fd96bc7Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 7862fd96bc7Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 7872fd96bc7Smrg# ### END LIBTOOL TAG CONFIG: $1 7882fd96bc7Smrg_LT_EOF 7892fd96bc7Smrg])dnl /m4_if 7902fd96bc7Smrg], 7912fd96bc7Smrg[m4_if([$1], [], [ 7922fd96bc7Smrg PACKAGE='$PACKAGE' 7932fd96bc7Smrg VERSION='$VERSION' 7942fd96bc7Smrg TIMESTAMP='$TIMESTAMP' 7952fd96bc7Smrg RM='$RM' 7962fd96bc7Smrg ofile='$ofile'], []) 7972fd96bc7Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 7982fd96bc7Smrg])# _LT_CONFIG 7991f0ac6a5Smrg 8001f0ac6a5Smrg 8012fd96bc7Smrg# LT_SUPPORTED_TAG(TAG) 8022fd96bc7Smrg# --------------------- 8032fd96bc7Smrg# Trace this macro to discover what tags are supported by the libtool 8042fd96bc7Smrg# --tag option, using: 8052fd96bc7Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8062fd96bc7SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 8071f0ac6a5Smrg 8089c9ff80cSmrg 8092fd96bc7Smrg# C support is built-in for now 8102fd96bc7Smrgm4_define([_LT_LANG_C_enabled], []) 8112fd96bc7Smrgm4_define([_LT_TAGS], []) 8129c9ff80cSmrg 8139c9ff80cSmrg 8142fd96bc7Smrg# LT_LANG(LANG) 8152fd96bc7Smrg# ------------- 8162fd96bc7Smrg# Enable libtool support for the given language if not already enabled. 8172fd96bc7SmrgAC_DEFUN([LT_LANG], 8182fd96bc7Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8192fd96bc7Smrgm4_case([$1], 8202fd96bc7Smrg [C], [_LT_LANG(C)], 8212fd96bc7Smrg [C++], [_LT_LANG(CXX)], 8222fd96bc7Smrg [Go], [_LT_LANG(GO)], 8232fd96bc7Smrg [Java], [_LT_LANG(GCJ)], 8242fd96bc7Smrg [Fortran 77], [_LT_LANG(F77)], 8252fd96bc7Smrg [Fortran], [_LT_LANG(FC)], 8262fd96bc7Smrg [Windows Resource], [_LT_LANG(RC)], 8272fd96bc7Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8282fd96bc7Smrg [_LT_LANG($1)], 8292fd96bc7Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8302fd96bc7Smrg])# LT_LANG 8311f0ac6a5Smrg 8321f0ac6a5Smrg 8332fd96bc7Smrg# _LT_LANG(LANGNAME) 8342fd96bc7Smrg# ------------------ 8352fd96bc7Smrgm4_defun([_LT_LANG], 8362fd96bc7Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8372fd96bc7Smrg [LT_SUPPORTED_TAG([$1])dnl 8382fd96bc7Smrg m4_append([_LT_TAGS], [$1 ])dnl 8392fd96bc7Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8402fd96bc7Smrg _LT_LANG_$1_CONFIG($1)])dnl 8412fd96bc7Smrg])# _LT_LANG 8421f0ac6a5Smrg 8431f0ac6a5Smrg 8442fd96bc7Smrgm4_ifndef([AC_PROG_GO], [ 8452fd96bc7Smrg# NOTE: This macro has been submitted for inclusion into # 8462fd96bc7Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 8472fd96bc7Smrg# a released version of Autoconf we should remove this # 8482fd96bc7Smrg# macro and use it instead. # 8492fd96bc7Smrgm4_defun([AC_PROG_GO], 8502fd96bc7Smrg[AC_LANG_PUSH(Go)dnl 8512fd96bc7SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 8522fd96bc7SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 8532fd96bc7Smrg_AC_ARG_VAR_LDFLAGS()dnl 8542fd96bc7SmrgAC_CHECK_TOOL(GOC, gccgo) 8552fd96bc7Smrgif test -z "$GOC"; then 8562fd96bc7Smrg if test -n "$ac_tool_prefix"; then 8572fd96bc7Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 8582fd96bc7Smrg fi 8592fd96bc7Smrgfi 8602fd96bc7Smrgif test -z "$GOC"; then 8612fd96bc7Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 8622fd96bc7Smrgfi 8632fd96bc7Smrg])#m4_defun 8642fd96bc7Smrg])#m4_ifndef 8659c9ff80cSmrg 8669c9ff80cSmrg 8672fd96bc7Smrg# _LT_LANG_DEFAULT_CONFIG 8682fd96bc7Smrg# ----------------------- 8692fd96bc7Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8702fd96bc7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8712fd96bc7Smrg [LT_LANG(CXX)], 8722fd96bc7Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 873e5410a46Smrg 8742fd96bc7SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8752fd96bc7Smrg [LT_LANG(F77)], 8762fd96bc7Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 877e5410a46Smrg 8782fd96bc7SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 8792fd96bc7Smrg [LT_LANG(FC)], 8802fd96bc7Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 8811f0ac6a5Smrg 8822fd96bc7Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 8832fd96bc7Smrgdnl pulling things in needlessly. 8842fd96bc7SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 8852fd96bc7Smrg [LT_LANG(GCJ)], 8862fd96bc7Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 8872fd96bc7Smrg [LT_LANG(GCJ)], 8882fd96bc7Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 8892fd96bc7Smrg [LT_LANG(GCJ)], 8902fd96bc7Smrg [m4_ifdef([AC_PROG_GCJ], 8912fd96bc7Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 8922fd96bc7Smrg m4_ifdef([A][M_PROG_GCJ], 8932fd96bc7Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 8942fd96bc7Smrg m4_ifdef([LT_PROG_GCJ], 8952fd96bc7Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 896e5410a46Smrg 8972fd96bc7SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 8982fd96bc7Smrg [LT_LANG(GO)], 8992fd96bc7Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 9001f0ac6a5Smrg 9012fd96bc7SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 9022fd96bc7Smrg [LT_LANG(RC)], 9032fd96bc7Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9042fd96bc7Smrg])# _LT_LANG_DEFAULT_CONFIG 9051f0ac6a5Smrg 9062fd96bc7Smrg# Obsolete macros: 9072fd96bc7SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9082fd96bc7SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9092fd96bc7SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9102fd96bc7SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 9112fd96bc7SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9122fd96bc7Smrgdnl aclocal-1.4 backwards compatibility: 9132fd96bc7Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9142fd96bc7Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9152fd96bc7Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9162fd96bc7Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 9172fd96bc7Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 9181f0ac6a5Smrg 9191f0ac6a5Smrg 9202fd96bc7Smrg# _LT_TAG_COMPILER 9212fd96bc7Smrg# ---------------- 9222fd96bc7Smrgm4_defun([_LT_TAG_COMPILER], 9232fd96bc7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 9241f0ac6a5Smrg 9252fd96bc7Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9262fd96bc7Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9272fd96bc7Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9282fd96bc7Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 9291f0ac6a5Smrg 9302fd96bc7Smrg# If no C compiler was specified, use CC. 9312fd96bc7SmrgLTCC=${LTCC-"$CC"} 9321f0ac6a5Smrg 9332fd96bc7Smrg# If no C compiler flags were specified, use CFLAGS. 9342fd96bc7SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 9351f0ac6a5Smrg 9362fd96bc7Smrg# Allow CC to be a program name with arguments. 9372fd96bc7Smrgcompiler=$CC 9382fd96bc7Smrg])# _LT_TAG_COMPILER 9391f0ac6a5Smrg 9401f0ac6a5Smrg 9412fd96bc7Smrg# _LT_COMPILER_BOILERPLATE 9422fd96bc7Smrg# ------------------------ 9432fd96bc7Smrg# Check for compiler boilerplate output or warnings with 9442fd96bc7Smrg# the simple compiler test code. 9452fd96bc7Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 9462fd96bc7Smrg[m4_require([_LT_DECL_SED])dnl 9472fd96bc7Smrgac_outfile=conftest.$ac_objext 9482fd96bc7Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 9492fd96bc7Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9502fd96bc7Smrg_lt_compiler_boilerplate=`cat conftest.err` 9512fd96bc7Smrg$RM conftest* 9522fd96bc7Smrg])# _LT_COMPILER_BOILERPLATE 9531f0ac6a5Smrg 9549c9ff80cSmrg 9552fd96bc7Smrg# _LT_LINKER_BOILERPLATE 9562fd96bc7Smrg# ---------------------- 9572fd96bc7Smrg# Check for linker boilerplate output or warnings with 9582fd96bc7Smrg# the simple link test code. 9592fd96bc7Smrgm4_defun([_LT_LINKER_BOILERPLATE], 9602fd96bc7Smrg[m4_require([_LT_DECL_SED])dnl 9612fd96bc7Smrgac_outfile=conftest.$ac_objext 9622fd96bc7Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 9632fd96bc7Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9642fd96bc7Smrg_lt_linker_boilerplate=`cat conftest.err` 9652fd96bc7Smrg$RM -r conftest* 9662fd96bc7Smrg])# _LT_LINKER_BOILERPLATE 9679c9ff80cSmrg 9682fd96bc7Smrg# _LT_REQUIRED_DARWIN_CHECKS 9692fd96bc7Smrg# ------------------------- 9702fd96bc7Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9712fd96bc7Smrg case $host_os in 9722fd96bc7Smrg rhapsody* | darwin*) 9732fd96bc7Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9742fd96bc7Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9752fd96bc7Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9762fd96bc7Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9772fd96bc7Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 9782fd96bc7Smrg _LT_DECL([], [DSYMUTIL], [1], 9792fd96bc7Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 9802fd96bc7Smrg _LT_DECL([], [NMEDIT], [1], 9812fd96bc7Smrg [Tool to change global to local symbols on Mac OS X]) 9822fd96bc7Smrg _LT_DECL([], [LIPO], [1], 9832fd96bc7Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 9842fd96bc7Smrg _LT_DECL([], [OTOOL], [1], 9852fd96bc7Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 9862fd96bc7Smrg _LT_DECL([], [OTOOL64], [1], 9872fd96bc7Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 9889c9ff80cSmrg 9892fd96bc7Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 9902fd96bc7Smrg [lt_cv_apple_cc_single_mod=no 9912fd96bc7Smrg if test -z "${LT_MULTI_MODULE}"; then 9922fd96bc7Smrg # By default we will add the -single_module flag. You can override 9932fd96bc7Smrg # by either setting the environment variable LT_MULTI_MODULE 9942fd96bc7Smrg # non-empty at configure time, or by adding -multi_module to the 9952fd96bc7Smrg # link flags. 9962fd96bc7Smrg rm -rf libconftest.dylib* 9972fd96bc7Smrg echo "int foo(void){return 1;}" > conftest.c 9982fd96bc7Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 9992fd96bc7Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10002fd96bc7Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10012fd96bc7Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10022fd96bc7Smrg _lt_result=$? 10032fd96bc7Smrg # If there is a non-empty error log, and "single_module" 10042fd96bc7Smrg # appears in it, assume the flag caused a linker warning 10052fd96bc7Smrg if test -s conftest.err && $GREP single_module conftest.err; then 10062fd96bc7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10072fd96bc7Smrg # Otherwise, if the output was created with a 0 exit code from 10082fd96bc7Smrg # the compiler, it worked. 10092fd96bc7Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 10102fd96bc7Smrg lt_cv_apple_cc_single_mod=yes 10112fd96bc7Smrg else 10122fd96bc7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10132fd96bc7Smrg fi 10142fd96bc7Smrg rm -rf libconftest.dylib* 10152fd96bc7Smrg rm -f conftest.* 10162fd96bc7Smrg fi]) 10179c9ff80cSmrg 10182fd96bc7Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10192fd96bc7Smrg [lt_cv_ld_exported_symbols_list], 10202fd96bc7Smrg [lt_cv_ld_exported_symbols_list=no 10212fd96bc7Smrg save_LDFLAGS=$LDFLAGS 10222fd96bc7Smrg echo "_main" > conftest.sym 10232fd96bc7Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10242fd96bc7Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10252fd96bc7Smrg [lt_cv_ld_exported_symbols_list=yes], 10262fd96bc7Smrg [lt_cv_ld_exported_symbols_list=no]) 10272fd96bc7Smrg LDFLAGS="$save_LDFLAGS" 10282fd96bc7Smrg ]) 10299c9ff80cSmrg 10302fd96bc7Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 10312fd96bc7Smrg [lt_cv_ld_force_load=no 10322fd96bc7Smrg cat > conftest.c << _LT_EOF 10332fd96bc7Smrgint forced_loaded() { return 2;} 10342fd96bc7Smrg_LT_EOF 10352fd96bc7Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 10362fd96bc7Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 10372fd96bc7Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 10382fd96bc7Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 10392fd96bc7Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 10402fd96bc7Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 10412fd96bc7Smrg cat > conftest.c << _LT_EOF 10422fd96bc7Smrgint main() { return 0;} 10432fd96bc7Smrg_LT_EOF 10442fd96bc7Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 10452fd96bc7Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 10462fd96bc7Smrg _lt_result=$? 10472fd96bc7Smrg if test -s conftest.err && $GREP force_load conftest.err; then 10482fd96bc7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10492fd96bc7Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 10502fd96bc7Smrg lt_cv_ld_force_load=yes 10512fd96bc7Smrg else 10522fd96bc7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10532fd96bc7Smrg fi 10542fd96bc7Smrg rm -f conftest.err libconftest.a conftest conftest.c 10552fd96bc7Smrg rm -rf conftest.dSYM 10562fd96bc7Smrg ]) 10572fd96bc7Smrg case $host_os in 10582fd96bc7Smrg rhapsody* | darwin1.[[012]]) 10592fd96bc7Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 10602fd96bc7Smrg darwin1.*) 10612fd96bc7Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10622fd96bc7Smrg darwin*) # darwin 5.x on 10632fd96bc7Smrg # if running on 10.5 or later, the deployment target defaults 10642fd96bc7Smrg # to the OS version, if on x86, and 10.4, the deployment 10652fd96bc7Smrg # target defaults to 10.4. Don't you love it? 10662fd96bc7Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10672fd96bc7Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 10682fd96bc7Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10692fd96bc7Smrg 10.[[012]]*) 10702fd96bc7Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10712fd96bc7Smrg 10.*) 10722fd96bc7Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10732fd96bc7Smrg esac 10742fd96bc7Smrg ;; 10752fd96bc7Smrg esac 10762fd96bc7Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 10772fd96bc7Smrg _lt_dar_single_mod='$single_module' 10782fd96bc7Smrg fi 10792fd96bc7Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 10802fd96bc7Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 10812fd96bc7Smrg else 10822fd96bc7Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 10832fd96bc7Smrg fi 10842fd96bc7Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 10852fd96bc7Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 10862fd96bc7Smrg else 10872fd96bc7Smrg _lt_dsymutil= 10882fd96bc7Smrg fi 10892fd96bc7Smrg ;; 10902fd96bc7Smrg esac 10916fae4e5dSmrg]) 10929c9ff80cSmrg 10939c9ff80cSmrg 10942fd96bc7Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 10952fd96bc7Smrg# --------------------------------- 10962fd96bc7Smrg# Checks for linker and compiler features on darwin 10972fd96bc7Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 10982fd96bc7Smrg[ 10992fd96bc7Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11002fd96bc7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11012fd96bc7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 11022fd96bc7Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 11032fd96bc7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 11042fd96bc7Smrg if test "$lt_cv_ld_force_load" = "yes"; then 11052fd96bc7Smrg _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\"`' 11062fd96bc7Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 11072fd96bc7Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 11082fd96bc7Smrg else 11092fd96bc7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 11102fd96bc7Smrg fi 11112fd96bc7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11122fd96bc7Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 11132fd96bc7Smrg case $cc_basename in 11142fd96bc7Smrg ifort*) _lt_dar_can_shared=yes ;; 11152fd96bc7Smrg *) _lt_dar_can_shared=$GCC ;; 11162fd96bc7Smrg esac 11172fd96bc7Smrg if test "$_lt_dar_can_shared" = "yes"; then 11182fd96bc7Smrg output_verbose_link_cmd=func_echo_all 11192fd96bc7Smrg _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}" 11202fd96bc7Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 11212fd96bc7Smrg _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}" 11222fd96bc7Smrg _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}" 11232fd96bc7Smrg m4_if([$1], [CXX], 11242fd96bc7Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 11252fd96bc7Smrg _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}" 11262fd96bc7Smrg _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}" 11272fd96bc7Smrg fi 11282fd96bc7Smrg],[]) 11292fd96bc7Smrg else 11302fd96bc7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11312fd96bc7Smrg fi 11329c9ff80cSmrg]) 11339c9ff80cSmrg 11342fd96bc7Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 11352fd96bc7Smrg# ---------------------------------- 11362fd96bc7Smrg# Links a minimal program and checks the executable 11372fd96bc7Smrg# for the system default hardcoded library path. In most cases, 11382fd96bc7Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 11392fd96bc7Smrg# the location of the communication and MPI libs are included too. 11402fd96bc7Smrg# If we don't find anything, use the default library path according 11412fd96bc7Smrg# to the aix ld manual. 11422fd96bc7Smrg# Store the results from the different compilers for each TAGNAME. 11432fd96bc7Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 11442fd96bc7Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11452fd96bc7Smrg[m4_require([_LT_DECL_SED])dnl 11462fd96bc7Smrgif test "${lt_cv_aix_libpath+set}" = set; then 11472fd96bc7Smrg aix_libpath=$lt_cv_aix_libpath 11482fd96bc7Smrgelse 11492fd96bc7Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 11502fd96bc7Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 11512fd96bc7Smrg lt_aix_libpath_sed='[ 11522fd96bc7Smrg /Import File Strings/,/^$/ { 11532fd96bc7Smrg /^0/ { 11542fd96bc7Smrg s/^0 *\([^ ]*\) *$/\1/ 11552fd96bc7Smrg p 11562fd96bc7Smrg } 11572fd96bc7Smrg }]' 11582fd96bc7Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11592fd96bc7Smrg # Check for a 64-bit object if we didn't find anything. 11602fd96bc7Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11612fd96bc7Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11622fd96bc7Smrg fi],[]) 11632fd96bc7Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11642fd96bc7Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 11652fd96bc7Smrg fi 11662fd96bc7Smrg ]) 11672fd96bc7Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 11682fd96bc7Smrgfi 11692fd96bc7Smrg])# _LT_SYS_MODULE_PATH_AIX 11709c9ff80cSmrg 11719c9ff80cSmrg 11722fd96bc7Smrg# _LT_SHELL_INIT(ARG) 11736fae4e5dSmrg# ------------------- 11742fd96bc7Smrgm4_define([_LT_SHELL_INIT], 11752fd96bc7Smrg[m4_divert_text([M4SH-INIT], [$1 11762fd96bc7Smrg])])# _LT_SHELL_INIT 11779c9ff80cSmrg 11789c9ff80cSmrg 11799c9ff80cSmrg 11802fd96bc7Smrg# _LT_PROG_ECHO_BACKSLASH 11812fd96bc7Smrg# ----------------------- 11822fd96bc7Smrg# Find how we can fake an echo command that does not interpret backslash. 11832fd96bc7Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 11842fd96bc7Smrg# of the generated configure script which will find a shell with a builtin 11852fd96bc7Smrg# printf (which we can use as an echo command). 11862fd96bc7Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 11872fd96bc7Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 11882fd96bc7SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 11892fd96bc7SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 11909c9ff80cSmrg 11912fd96bc7SmrgAC_MSG_CHECKING([how to print strings]) 11922fd96bc7Smrg# Test print first, because it will be a builtin if present. 11932fd96bc7Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 11942fd96bc7Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 11952fd96bc7Smrg ECHO='print -r --' 11962fd96bc7Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 11972fd96bc7Smrg ECHO='printf %s\n' 11982fd96bc7Smrgelse 11992fd96bc7Smrg # Use this function as a fallback that always works. 12002fd96bc7Smrg func_fallback_echo () 12012fd96bc7Smrg { 12022fd96bc7Smrg eval 'cat <<_LTECHO_EOF 12032fd96bc7Smrg$[]1 12042fd96bc7Smrg_LTECHO_EOF' 12052fd96bc7Smrg } 12062fd96bc7Smrg ECHO='func_fallback_echo' 12072fd96bc7Smrgfi 12089c9ff80cSmrg 12092fd96bc7Smrg# func_echo_all arg... 12102fd96bc7Smrg# Invoke $ECHO with all args, space-separated. 12112fd96bc7Smrgfunc_echo_all () 12126fae4e5dSmrg{ 12132fd96bc7Smrg $ECHO "$*" 12146fae4e5dSmrg} 12159c9ff80cSmrg 12162fd96bc7Smrgcase "$ECHO" in 12172fd96bc7Smrg printf*) AC_MSG_RESULT([printf]) ;; 12182fd96bc7Smrg print*) AC_MSG_RESULT([print -r]) ;; 12192fd96bc7Smrg *) AC_MSG_RESULT([cat]) ;; 12202fd96bc7Smrgesac 12211f0ac6a5Smrg 12222fd96bc7Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 12232fd96bc7Smrg[_AS_DETECT_SUGGESTED([ 12242fd96bc7Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 12252fd96bc7Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12262fd96bc7Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12272fd96bc7Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12282fd96bc7Smrg PATH=/empty FPATH=/empty; export PATH FPATH 12292fd96bc7Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 12302fd96bc7Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 12311f0ac6a5Smrg 12322fd96bc7Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12332fd96bc7Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12342fd96bc7Smrg])# _LT_PROG_ECHO_BACKSLASH 12351f0ac6a5Smrg 12361f0ac6a5Smrg 12372fd96bc7Smrg# _LT_WITH_SYSROOT 12382fd96bc7Smrg# ---------------- 12392fd96bc7SmrgAC_DEFUN([_LT_WITH_SYSROOT], 12402fd96bc7Smrg[AC_MSG_CHECKING([for sysroot]) 12412fd96bc7SmrgAC_ARG_WITH([sysroot], 12422fd96bc7Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 12432fd96bc7Smrg (or the compiler's sysroot if not specified).], 12442fd96bc7Smrg[], [with_sysroot=no]) 12451f0ac6a5Smrg 12462fd96bc7Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 12472fd96bc7Smrgdnl in case the user passed a directory name. 12482fd96bc7Smrglt_sysroot= 12492fd96bc7Smrgcase ${with_sysroot} in #( 12502fd96bc7Smrg yes) 12512fd96bc7Smrg if test "$GCC" = yes; then 12522fd96bc7Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 12532fd96bc7Smrg fi 12542fd96bc7Smrg ;; #( 12552fd96bc7Smrg /*) 12562fd96bc7Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 12572fd96bc7Smrg ;; #( 12582fd96bc7Smrg no|'') 12592fd96bc7Smrg ;; #( 12602fd96bc7Smrg *) 12612fd96bc7Smrg AC_MSG_RESULT([${with_sysroot}]) 12622fd96bc7Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 12632fd96bc7Smrg ;; 12642fd96bc7Smrgesac 12651f0ac6a5Smrg 12662fd96bc7Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 12672fd96bc7Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 12682fd96bc7Smrg[dependent libraries, and in which our libraries should be installed.])]) 12699c9ff80cSmrg 12702fd96bc7Smrg# _LT_ENABLE_LOCK 12712fd96bc7Smrg# --------------- 12722fd96bc7Smrgm4_defun([_LT_ENABLE_LOCK], 12732fd96bc7Smrg[AC_ARG_ENABLE([libtool-lock], 12742fd96bc7Smrg [AS_HELP_STRING([--disable-libtool-lock], 12752fd96bc7Smrg [avoid locking (might break parallel builds)])]) 12762fd96bc7Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 12771f0ac6a5Smrg 12782fd96bc7Smrg# Some flags need to be propagated to the compiler or linker for good 12792fd96bc7Smrg# libtool support. 12802fd96bc7Smrgcase $host in 12812fd96bc7Smrgia64-*-hpux*) 12822fd96bc7Smrg # Find out which ABI we are using. 12832fd96bc7Smrg echo 'int i;' > conftest.$ac_ext 12842fd96bc7Smrg if AC_TRY_EVAL(ac_compile); then 12852fd96bc7Smrg case `/usr/bin/file conftest.$ac_objext` in 12862fd96bc7Smrg *ELF-32*) 12872fd96bc7Smrg HPUX_IA64_MODE="32" 12882fd96bc7Smrg ;; 12892fd96bc7Smrg *ELF-64*) 12902fd96bc7Smrg HPUX_IA64_MODE="64" 12912fd96bc7Smrg ;; 12922fd96bc7Smrg esac 12932fd96bc7Smrg fi 12942fd96bc7Smrg rm -rf conftest* 12952fd96bc7Smrg ;; 12962fd96bc7Smrg*-*-irix6*) 12972fd96bc7Smrg # Find out which ABI we are using. 12982fd96bc7Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 12992fd96bc7Smrg if AC_TRY_EVAL(ac_compile); then 13002fd96bc7Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 13012fd96bc7Smrg case `/usr/bin/file conftest.$ac_objext` in 13022fd96bc7Smrg *32-bit*) 13032fd96bc7Smrg LD="${LD-ld} -melf32bsmip" 13042fd96bc7Smrg ;; 13052fd96bc7Smrg *N32*) 13062fd96bc7Smrg LD="${LD-ld} -melf32bmipn32" 13072fd96bc7Smrg ;; 13082fd96bc7Smrg *64-bit*) 13092fd96bc7Smrg LD="${LD-ld} -melf64bmip" 13102fd96bc7Smrg ;; 13112fd96bc7Smrg esac 13122fd96bc7Smrg else 13132fd96bc7Smrg case `/usr/bin/file conftest.$ac_objext` in 13142fd96bc7Smrg *32-bit*) 13152fd96bc7Smrg LD="${LD-ld} -32" 13162fd96bc7Smrg ;; 13172fd96bc7Smrg *N32*) 13182fd96bc7Smrg LD="${LD-ld} -n32" 13192fd96bc7Smrg ;; 13202fd96bc7Smrg *64-bit*) 13212fd96bc7Smrg LD="${LD-ld} -64" 13222fd96bc7Smrg ;; 13232fd96bc7Smrg esac 13242fd96bc7Smrg fi 13252fd96bc7Smrg fi 13262fd96bc7Smrg rm -rf conftest* 13272fd96bc7Smrg ;; 13281f0ac6a5Smrg 13292fd96bc7Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 13302fd96bc7Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 13312fd96bc7Smrg # Find out which ABI we are using. 13322fd96bc7Smrg echo 'int i;' > conftest.$ac_ext 13332fd96bc7Smrg if AC_TRY_EVAL(ac_compile); then 13342fd96bc7Smrg case `/usr/bin/file conftest.o` in 13352fd96bc7Smrg *32-bit*) 13362fd96bc7Smrg case $host in 13372fd96bc7Smrg x86_64-*kfreebsd*-gnu) 13382fd96bc7Smrg LD="${LD-ld} -m elf_i386_fbsd" 13392fd96bc7Smrg ;; 13402fd96bc7Smrg x86_64-*linux*) 13412fd96bc7Smrg case `/usr/bin/file conftest.o` in 13422fd96bc7Smrg *x86-64*) 13432fd96bc7Smrg LD="${LD-ld} -m elf32_x86_64" 13442fd96bc7Smrg ;; 13452fd96bc7Smrg *) 13462fd96bc7Smrg LD="${LD-ld} -m elf_i386" 13472fd96bc7Smrg ;; 13482fd96bc7Smrg esac 13492fd96bc7Smrg ;; 13502fd96bc7Smrg powerpc64le-*) 13512fd96bc7Smrg LD="${LD-ld} -m elf32lppclinux" 13522fd96bc7Smrg ;; 13532fd96bc7Smrg powerpc64-*) 13542fd96bc7Smrg LD="${LD-ld} -m elf32ppclinux" 13552fd96bc7Smrg ;; 13562fd96bc7Smrg s390x-*linux*) 13572fd96bc7Smrg LD="${LD-ld} -m elf_s390" 13582fd96bc7Smrg ;; 13592fd96bc7Smrg sparc64-*linux*) 13602fd96bc7Smrg LD="${LD-ld} -m elf32_sparc" 13612fd96bc7Smrg ;; 13622fd96bc7Smrg esac 13632fd96bc7Smrg ;; 13642fd96bc7Smrg *64-bit*) 13652fd96bc7Smrg case $host in 13662fd96bc7Smrg x86_64-*kfreebsd*-gnu) 13672fd96bc7Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 13682fd96bc7Smrg ;; 13692fd96bc7Smrg x86_64-*linux*) 13702fd96bc7Smrg LD="${LD-ld} -m elf_x86_64" 13712fd96bc7Smrg ;; 13722fd96bc7Smrg powerpcle-*) 13732fd96bc7Smrg LD="${LD-ld} -m elf64lppc" 13742fd96bc7Smrg ;; 13752fd96bc7Smrg powerpc-*) 13762fd96bc7Smrg LD="${LD-ld} -m elf64ppc" 13772fd96bc7Smrg ;; 13782fd96bc7Smrg s390*-*linux*|s390*-*tpf*) 13792fd96bc7Smrg LD="${LD-ld} -m elf64_s390" 13802fd96bc7Smrg ;; 13812fd96bc7Smrg sparc*-*linux*) 13822fd96bc7Smrg LD="${LD-ld} -m elf64_sparc" 13832fd96bc7Smrg ;; 13842fd96bc7Smrg esac 13852fd96bc7Smrg ;; 13862fd96bc7Smrg esac 13872fd96bc7Smrg fi 13882fd96bc7Smrg rm -rf conftest* 13892fd96bc7Smrg ;; 13901f0ac6a5Smrg 13912fd96bc7Smrg*-*-sco3.2v5*) 13922fd96bc7Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 13932fd96bc7Smrg SAVE_CFLAGS="$CFLAGS" 13942fd96bc7Smrg CFLAGS="$CFLAGS -belf" 13952fd96bc7Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 13962fd96bc7Smrg [AC_LANG_PUSH(C) 13972fd96bc7Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 13982fd96bc7Smrg AC_LANG_POP]) 13992fd96bc7Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 14002fd96bc7Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 14012fd96bc7Smrg CFLAGS="$SAVE_CFLAGS" 14022fd96bc7Smrg fi 14032fd96bc7Smrg ;; 14042fd96bc7Smrg*-*solaris*) 14052fd96bc7Smrg # Find out which ABI we are using. 14062fd96bc7Smrg echo 'int i;' > conftest.$ac_ext 14072fd96bc7Smrg if AC_TRY_EVAL(ac_compile); then 14082fd96bc7Smrg case `/usr/bin/file conftest.o` in 14092fd96bc7Smrg *64-bit*) 14102fd96bc7Smrg case $lt_cv_prog_gnu_ld in 14112fd96bc7Smrg yes*) 14122fd96bc7Smrg case $host in 14132fd96bc7Smrg i?86-*-solaris*) 14142fd96bc7Smrg LD="${LD-ld} -m elf_x86_64" 14152fd96bc7Smrg ;; 14162fd96bc7Smrg sparc*-*-solaris*) 14172fd96bc7Smrg LD="${LD-ld} -m elf64_sparc" 14182fd96bc7Smrg ;; 14192fd96bc7Smrg esac 14202fd96bc7Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 14212fd96bc7Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 14222fd96bc7Smrg LD="${LD-ld}_sol2" 14232fd96bc7Smrg fi 14242fd96bc7Smrg ;; 14252fd96bc7Smrg *) 14262fd96bc7Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14272fd96bc7Smrg LD="${LD-ld} -64" 14282fd96bc7Smrg fi 14292fd96bc7Smrg ;; 14302fd96bc7Smrg esac 14312fd96bc7Smrg ;; 14322fd96bc7Smrg esac 14332fd96bc7Smrg fi 14342fd96bc7Smrg rm -rf conftest* 14352fd96bc7Smrg ;; 14362fd96bc7Smrgesac 14371f0ac6a5Smrg 14382fd96bc7Smrgneed_locks="$enable_libtool_lock" 14392fd96bc7Smrg])# _LT_ENABLE_LOCK 14401f0ac6a5Smrg 14411f0ac6a5Smrg 14422fd96bc7Smrg# _LT_PROG_AR 14432fd96bc7Smrg# ----------- 14442fd96bc7Smrgm4_defun([_LT_PROG_AR], 14452fd96bc7Smrg[AC_CHECK_TOOLS(AR, [ar], false) 14462fd96bc7Smrg: ${AR=ar} 14472fd96bc7Smrg: ${AR_FLAGS=cru} 14482fd96bc7Smrg_LT_DECL([], [AR], [1], [The archiver]) 14492fd96bc7Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 14501f0ac6a5Smrg 14512fd96bc7SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 14522fd96bc7Smrg [lt_cv_ar_at_file=no 14532fd96bc7Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 14542fd96bc7Smrg [echo conftest.$ac_objext > conftest.lst 14552fd96bc7Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 14562fd96bc7Smrg AC_TRY_EVAL([lt_ar_try]) 14572fd96bc7Smrg if test "$ac_status" -eq 0; then 14582fd96bc7Smrg # Ensure the archiver fails upon bogus file names. 14592fd96bc7Smrg rm -f conftest.$ac_objext libconftest.a 14602fd96bc7Smrg AC_TRY_EVAL([lt_ar_try]) 14612fd96bc7Smrg if test "$ac_status" -ne 0; then 14622fd96bc7Smrg lt_cv_ar_at_file=@ 14632fd96bc7Smrg fi 14642fd96bc7Smrg fi 14652fd96bc7Smrg rm -f conftest.* libconftest.a 14662fd96bc7Smrg ]) 14672fd96bc7Smrg ]) 14681f0ac6a5Smrg 14692fd96bc7Smrgif test "x$lt_cv_ar_at_file" = xno; then 14702fd96bc7Smrg archiver_list_spec= 14712fd96bc7Smrgelse 14722fd96bc7Smrg archiver_list_spec=$lt_cv_ar_at_file 14732fd96bc7Smrgfi 14742fd96bc7Smrg_LT_DECL([], [archiver_list_spec], [1], 14752fd96bc7Smrg [How to feed a file listing to the archiver]) 14762fd96bc7Smrg])# _LT_PROG_AR 14771f0ac6a5Smrg 14781f0ac6a5Smrg 14792fd96bc7Smrg# _LT_CMD_OLD_ARCHIVE 14802fd96bc7Smrg# ------------------- 14812fd96bc7Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 14822fd96bc7Smrg[_LT_PROG_AR 14831f0ac6a5Smrg 14842fd96bc7SmrgAC_CHECK_TOOL(STRIP, strip, :) 14852fd96bc7Smrgtest -z "$STRIP" && STRIP=: 14862fd96bc7Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 14871f0ac6a5Smrg 14882fd96bc7SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 14892fd96bc7Smrgtest -z "$RANLIB" && RANLIB=: 14902fd96bc7Smrg_LT_DECL([], [RANLIB], [1], 14912fd96bc7Smrg [Commands used to install an old-style archive]) 14921f0ac6a5Smrg 14932fd96bc7Smrg# Determine commands to create old-style static archives. 14942fd96bc7Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 14952fd96bc7Smrgold_postinstall_cmds='chmod 644 $oldlib' 14962fd96bc7Smrgold_postuninstall_cmds= 14971f0ac6a5Smrg 14982fd96bc7Smrgif test -n "$RANLIB"; then 14996fae4e5dSmrg case $host_os in 15002fd96bc7Smrg openbsd*) 15012fd96bc7Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 15022fd96bc7Smrg ;; 15032fd96bc7Smrg *) 15042fd96bc7Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 15056fae4e5dSmrg ;; 15066fae4e5dSmrg esac 15072fd96bc7Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 15082fd96bc7Smrgfi 15091f0ac6a5Smrg 15102fd96bc7Smrgcase $host_os in 15112fd96bc7Smrg darwin*) 15122fd96bc7Smrg lock_old_archive_extraction=yes ;; 15132fd96bc7Smrg *) 15142fd96bc7Smrg lock_old_archive_extraction=no ;; 15152fd96bc7Smrgesac 15162fd96bc7Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 15172fd96bc7Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15182fd96bc7Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 15192fd96bc7Smrg [Commands used to build an old-style archive]) 15202fd96bc7Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 15212fd96bc7Smrg [Whether to use a lock for old archive extraction]) 15222fd96bc7Smrg])# _LT_CMD_OLD_ARCHIVE 15231f0ac6a5Smrg 15249c9ff80cSmrg 15252fd96bc7Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15262fd96bc7Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 15272fd96bc7Smrg# ---------------------------------------------------------------- 15282fd96bc7Smrg# Check whether the given compiler option works 15292fd96bc7SmrgAC_DEFUN([_LT_COMPILER_OPTION], 15302fd96bc7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15312fd96bc7Smrgm4_require([_LT_DECL_SED])dnl 15322fd96bc7SmrgAC_CACHE_CHECK([$1], [$2], 15332fd96bc7Smrg [$2=no 15342fd96bc7Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 15352fd96bc7Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 15362fd96bc7Smrg lt_compiler_flag="$3" 15372fd96bc7Smrg # Insert the option either (1) after the last *FLAGS variable, or 15382fd96bc7Smrg # (2) before a word containing "conftest.", or (3) at the end. 15392fd96bc7Smrg # Note that $ac_compile itself does not contain backslashes and begins 15402fd96bc7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 15412fd96bc7Smrg # The option is referenced via a variable to avoid confusing sed. 15422fd96bc7Smrg lt_compile=`echo "$ac_compile" | $SED \ 15432fd96bc7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 15442fd96bc7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 15452fd96bc7Smrg -e 's:$: $lt_compiler_flag:'` 15462fd96bc7Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 15472fd96bc7Smrg (eval "$lt_compile" 2>conftest.err) 15482fd96bc7Smrg ac_status=$? 15492fd96bc7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 15502fd96bc7Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 15512fd96bc7Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 15522fd96bc7Smrg # The compiler can only warn and ignore the option if not recognized 15532fd96bc7Smrg # So say no if there are warnings other than the usual output. 15542fd96bc7Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 15552fd96bc7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 15562fd96bc7Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 15572fd96bc7Smrg $2=yes 15582fd96bc7Smrg fi 15592fd96bc7Smrg fi 15602fd96bc7Smrg $RM conftest* 15612fd96bc7Smrg]) 15629c9ff80cSmrg 15632fd96bc7Smrgif test x"[$]$2" = xyes; then 15642fd96bc7Smrg m4_if([$5], , :, [$5]) 15652fd96bc7Smrgelse 15662fd96bc7Smrg m4_if([$6], , :, [$6]) 15672fd96bc7Smrgfi 15682fd96bc7Smrg])# _LT_COMPILER_OPTION 15699c9ff80cSmrg 15702fd96bc7Smrg# Old name: 15712fd96bc7SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 15722fd96bc7Smrgdnl aclocal-1.4 backwards compatibility: 15732fd96bc7Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 15749c9ff80cSmrg 15759c9ff80cSmrg 15762fd96bc7Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15772fd96bc7Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 15782fd96bc7Smrg# ---------------------------------------------------- 15792fd96bc7Smrg# Check whether the given linker option works 15802fd96bc7SmrgAC_DEFUN([_LT_LINKER_OPTION], 15812fd96bc7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15822fd96bc7Smrgm4_require([_LT_DECL_SED])dnl 15832fd96bc7SmrgAC_CACHE_CHECK([$1], [$2], 15842fd96bc7Smrg [$2=no 15852fd96bc7Smrg save_LDFLAGS="$LDFLAGS" 15862fd96bc7Smrg LDFLAGS="$LDFLAGS $3" 15872fd96bc7Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 15882fd96bc7Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 15892fd96bc7Smrg # The linker can only warn and ignore the option if not recognized 15902fd96bc7Smrg # So say no if there are warnings 15912fd96bc7Smrg if test -s conftest.err; then 15922fd96bc7Smrg # Append any errors to the config.log. 15932fd96bc7Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 15942fd96bc7Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 15952fd96bc7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 15962fd96bc7Smrg if diff conftest.exp conftest.er2 >/dev/null; then 15972fd96bc7Smrg $2=yes 15982fd96bc7Smrg fi 15992fd96bc7Smrg else 16002fd96bc7Smrg $2=yes 16012fd96bc7Smrg fi 16022fd96bc7Smrg fi 16032fd96bc7Smrg $RM -r conftest* 16042fd96bc7Smrg LDFLAGS="$save_LDFLAGS" 16052fd96bc7Smrg]) 16069c9ff80cSmrg 16072fd96bc7Smrgif test x"[$]$2" = xyes; then 16082fd96bc7Smrg m4_if([$4], , :, [$4]) 16092fd96bc7Smrgelse 16102fd96bc7Smrg m4_if([$5], , :, [$5]) 16112fd96bc7Smrgfi 16122fd96bc7Smrg])# _LT_LINKER_OPTION 16139c9ff80cSmrg 16142fd96bc7Smrg# Old name: 16152fd96bc7SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16162fd96bc7Smrgdnl aclocal-1.4 backwards compatibility: 16172fd96bc7Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 16189c9ff80cSmrg 16191f0ac6a5Smrg 16202fd96bc7Smrg# LT_CMD_MAX_LEN 16212fd96bc7Smrg#--------------- 16222fd96bc7SmrgAC_DEFUN([LT_CMD_MAX_LEN], 16232fd96bc7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16242fd96bc7Smrg# find the maximum length of command line arguments 16252fd96bc7SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 16262fd96bc7SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 16272fd96bc7Smrg i=0 16282fd96bc7Smrg teststring="ABCD" 16291f0ac6a5Smrg 16302fd96bc7Smrg case $build_os in 16312fd96bc7Smrg msdosdjgpp*) 16322fd96bc7Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 16332fd96bc7Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 16342fd96bc7Smrg # during glob expansion). Even if it were fixed, the result of this 16352fd96bc7Smrg # check would be larger than it should be. 16362fd96bc7Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 16372fd96bc7Smrg ;; 16381f0ac6a5Smrg 16392fd96bc7Smrg gnu*) 16402fd96bc7Smrg # Under GNU Hurd, this test is not required because there is 16412fd96bc7Smrg # no limit to the length of command line arguments. 16422fd96bc7Smrg # Libtool will interpret -1 as no limit whatsoever 16432fd96bc7Smrg lt_cv_sys_max_cmd_len=-1; 16442fd96bc7Smrg ;; 164589c04b6cSmrg 16462fd96bc7Smrg cygwin* | mingw* | cegcc*) 16472fd96bc7Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 16482fd96bc7Smrg # about 5 minutes as the teststring grows exponentially. 16492fd96bc7Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 16502fd96bc7Smrg # you end up with a "frozen" computer, even though with patience 16512fd96bc7Smrg # the test eventually succeeds (with a max line length of 256k). 16522fd96bc7Smrg # Instead, let's just punt: use the minimum linelength reported by 16532fd96bc7Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 16542fd96bc7Smrg lt_cv_sys_max_cmd_len=8192; 16552fd96bc7Smrg ;; 165689c04b6cSmrg 16572fd96bc7Smrg mint*) 16582fd96bc7Smrg # On MiNT this can take a long time and run out of memory. 16592fd96bc7Smrg lt_cv_sys_max_cmd_len=8192; 16602fd96bc7Smrg ;; 1661e5410a46Smrg 16622fd96bc7Smrg amigaos*) 16632fd96bc7Smrg # On AmigaOS with pdksh, this test takes hours, literally. 16642fd96bc7Smrg # So we just punt and use a minimum line length of 8192. 16652fd96bc7Smrg lt_cv_sys_max_cmd_len=8192; 16662fd96bc7Smrg ;; 16671f0ac6a5Smrg 16682fd96bc7Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 16692fd96bc7Smrg # This has been around since 386BSD, at least. Likely further. 16702fd96bc7Smrg if test -x /sbin/sysctl; then 16712fd96bc7Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 16722fd96bc7Smrg elif test -x /usr/sbin/sysctl; then 16732fd96bc7Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 16742fd96bc7Smrg else 16752fd96bc7Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 16762fd96bc7Smrg fi 16772fd96bc7Smrg # And add a safety zone 16782fd96bc7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 16792fd96bc7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 16802fd96bc7Smrg ;; 16811f0ac6a5Smrg 16822fd96bc7Smrg interix*) 16832fd96bc7Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 16842fd96bc7Smrg lt_cv_sys_max_cmd_len=196608 16852fd96bc7Smrg ;; 16869c9ff80cSmrg 16872fd96bc7Smrg os2*) 16882fd96bc7Smrg # The test takes a long time on OS/2. 16892fd96bc7Smrg lt_cv_sys_max_cmd_len=8192 16902fd96bc7Smrg ;; 169189c04b6cSmrg 16922fd96bc7Smrg osf*) 16932fd96bc7Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 16942fd96bc7Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 16952fd96bc7Smrg # nice to cause kernel panics so lets avoid the loop below. 16962fd96bc7Smrg # First set a reasonable default. 16972fd96bc7Smrg lt_cv_sys_max_cmd_len=16384 16982fd96bc7Smrg # 16992fd96bc7Smrg if test -x /sbin/sysconfig; then 17002fd96bc7Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 17012fd96bc7Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 17022fd96bc7Smrg esac 17032fd96bc7Smrg fi 17042fd96bc7Smrg ;; 17052fd96bc7Smrg sco3.2v5*) 17062fd96bc7Smrg lt_cv_sys_max_cmd_len=102400 17072fd96bc7Smrg ;; 17082fd96bc7Smrg sysv5* | sco5v6* | sysv4.2uw2*) 17092fd96bc7Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 17102fd96bc7Smrg if test -n "$kargmax"; then 17112fd96bc7Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 17122fd96bc7Smrg else 17132fd96bc7Smrg lt_cv_sys_max_cmd_len=32768 17142fd96bc7Smrg fi 17152fd96bc7Smrg ;; 17162fd96bc7Smrg *) 17172fd96bc7Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 17182fd96bc7Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 17192fd96bc7Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 17202fd96bc7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17212fd96bc7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17222fd96bc7Smrg else 17232fd96bc7Smrg # Make teststring a little bigger before we do anything with it. 17242fd96bc7Smrg # a 1K string should be a reasonable start. 17252fd96bc7Smrg for i in 1 2 3 4 5 6 7 8 ; do 17262fd96bc7Smrg teststring=$teststring$teststring 17272fd96bc7Smrg done 17282fd96bc7Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17292fd96bc7Smrg # If test is not a shell built-in, we'll probably end up computing a 17302fd96bc7Smrg # maximum length that is only half of the actual maximum length, but 17312fd96bc7Smrg # we can't tell. 17322fd96bc7Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 17332fd96bc7Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 17342fd96bc7Smrg test $i != 17 # 1/2 MB should be enough 17352fd96bc7Smrg do 17362fd96bc7Smrg i=`expr $i + 1` 17372fd96bc7Smrg teststring=$teststring$teststring 17382fd96bc7Smrg done 17392fd96bc7Smrg # Only check the string length outside the loop. 17402fd96bc7Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 17412fd96bc7Smrg teststring= 17422fd96bc7Smrg # Add a significant safety factor because C++ compilers can tack on 17432fd96bc7Smrg # massive amounts of additional arguments before passing them to the 17442fd96bc7Smrg # linker. It appears as though 1/2 is a usable value. 17452fd96bc7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 17462fd96bc7Smrg fi 17472fd96bc7Smrg ;; 17482fd96bc7Smrg esac 17492fd96bc7Smrg]) 17502fd96bc7Smrgif test -n $lt_cv_sys_max_cmd_len ; then 17512fd96bc7Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 17522fd96bc7Smrgelse 17532fd96bc7Smrg AC_MSG_RESULT(none) 17542fd96bc7Smrgfi 17552fd96bc7Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 17562fd96bc7Smrg_LT_DECL([], [max_cmd_len], [0], 17572fd96bc7Smrg [What is the maximum length of a command?]) 17582fd96bc7Smrg])# LT_CMD_MAX_LEN 17599c9ff80cSmrg 17602fd96bc7Smrg# Old name: 17612fd96bc7SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 17626fae4e5dSmrgdnl aclocal-1.4 backwards compatibility: 17632fd96bc7Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 17649c9ff80cSmrg 17659c9ff80cSmrg 17662fd96bc7Smrg# _LT_HEADER_DLFCN 17676fae4e5dSmrg# ---------------- 17682fd96bc7Smrgm4_defun([_LT_HEADER_DLFCN], 17692fd96bc7Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 17702fd96bc7Smrg])# _LT_HEADER_DLFCN 17719c9ff80cSmrg 17729c9ff80cSmrg 17732fd96bc7Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 17742fd96bc7Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 17752fd96bc7Smrg# ---------------------------------------------------------------- 17762fd96bc7Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 17772fd96bc7Smrg[m4_require([_LT_HEADER_DLFCN])dnl 17782fd96bc7Smrgif test "$cross_compiling" = yes; then : 17792fd96bc7Smrg [$4] 17802fd96bc7Smrgelse 17812fd96bc7Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 17822fd96bc7Smrg lt_status=$lt_dlunknown 17832fd96bc7Smrg cat > conftest.$ac_ext <<_LT_EOF 17842fd96bc7Smrg[#line $LINENO "configure" 17852fd96bc7Smrg#include "confdefs.h" 17869c9ff80cSmrg 17872fd96bc7Smrg#if HAVE_DLFCN_H 17882fd96bc7Smrg#include <dlfcn.h> 17892fd96bc7Smrg#endif 17909c9ff80cSmrg 17912fd96bc7Smrg#include <stdio.h> 17929c9ff80cSmrg 17932fd96bc7Smrg#ifdef RTLD_GLOBAL 17942fd96bc7Smrg# define LT_DLGLOBAL RTLD_GLOBAL 17952fd96bc7Smrg#else 17962fd96bc7Smrg# ifdef DL_GLOBAL 17972fd96bc7Smrg# define LT_DLGLOBAL DL_GLOBAL 17982fd96bc7Smrg# else 17992fd96bc7Smrg# define LT_DLGLOBAL 0 18002fd96bc7Smrg# endif 18012fd96bc7Smrg#endif 18029c9ff80cSmrg 18032fd96bc7Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 18042fd96bc7Smrg find out it does not work in some platform. */ 18052fd96bc7Smrg#ifndef LT_DLLAZY_OR_NOW 18062fd96bc7Smrg# ifdef RTLD_LAZY 18072fd96bc7Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 18082fd96bc7Smrg# else 18092fd96bc7Smrg# ifdef DL_LAZY 18102fd96bc7Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 18112fd96bc7Smrg# else 18122fd96bc7Smrg# ifdef RTLD_NOW 18132fd96bc7Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 18142fd96bc7Smrg# else 18152fd96bc7Smrg# ifdef DL_NOW 18162fd96bc7Smrg# define LT_DLLAZY_OR_NOW DL_NOW 18172fd96bc7Smrg# else 18182fd96bc7Smrg# define LT_DLLAZY_OR_NOW 0 18192fd96bc7Smrg# endif 18202fd96bc7Smrg# endif 18212fd96bc7Smrg# endif 18222fd96bc7Smrg# endif 18232fd96bc7Smrg#endif 18249c9ff80cSmrg 18252fd96bc7Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 18262fd96bc7Smrg correspondingly for the symbols needed. */ 18272fd96bc7Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 18282fd96bc7Smrgint fnord () __attribute__((visibility("default"))); 18292fd96bc7Smrg#endif 183089c04b6cSmrg 18312fd96bc7Smrgint fnord () { return 42; } 18322fd96bc7Smrgint main () 18332fd96bc7Smrg{ 18342fd96bc7Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 18352fd96bc7Smrg int status = $lt_dlunknown; 183689c04b6cSmrg 18372fd96bc7Smrg if (self) 18382fd96bc7Smrg { 18392fd96bc7Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 18406fae4e5dSmrg else 18412fd96bc7Smrg { 18422fd96bc7Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 18432fd96bc7Smrg else puts (dlerror ()); 18442fd96bc7Smrg } 18452fd96bc7Smrg /* dlclose (self); */ 18462fd96bc7Smrg } 18472fd96bc7Smrg else 18482fd96bc7Smrg puts (dlerror ()); 18492fd96bc7Smrg 18502fd96bc7Smrg return status; 18512fd96bc7Smrg}] 18522fd96bc7Smrg_LT_EOF 18532fd96bc7Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 18542fd96bc7Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 18552fd96bc7Smrg lt_status=$? 18562fd96bc7Smrg case x$lt_status in 18572fd96bc7Smrg x$lt_dlno_uscore) $1 ;; 18582fd96bc7Smrg x$lt_dlneed_uscore) $2 ;; 18592fd96bc7Smrg x$lt_dlunknown|x*) $3 ;; 18602fd96bc7Smrg esac 18612fd96bc7Smrg else : 18622fd96bc7Smrg # compilation failed 18632fd96bc7Smrg $3 18642fd96bc7Smrg fi 18652fd96bc7Smrgfi 18662fd96bc7Smrgrm -fr conftest* 18672fd96bc7Smrg])# _LT_TRY_DLOPEN_SELF 18682fd96bc7Smrg 18692fd96bc7Smrg 18702fd96bc7Smrg# LT_SYS_DLOPEN_SELF 18712fd96bc7Smrg# ------------------ 18722fd96bc7SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 18732fd96bc7Smrg[m4_require([_LT_HEADER_DLFCN])dnl 18742fd96bc7Smrgif test "x$enable_dlopen" != xyes; then 18752fd96bc7Smrg enable_dlopen=unknown 18762fd96bc7Smrg enable_dlopen_self=unknown 18772fd96bc7Smrg enable_dlopen_self_static=unknown 18782fd96bc7Smrgelse 18792fd96bc7Smrg lt_cv_dlopen=no 18802fd96bc7Smrg lt_cv_dlopen_libs= 18812fd96bc7Smrg 18822fd96bc7Smrg case $host_os in 18832fd96bc7Smrg beos*) 18842fd96bc7Smrg lt_cv_dlopen="load_add_on" 18852fd96bc7Smrg lt_cv_dlopen_libs= 18862fd96bc7Smrg lt_cv_dlopen_self=yes 18872fd96bc7Smrg ;; 18882fd96bc7Smrg 18892fd96bc7Smrg mingw* | pw32* | cegcc*) 18902fd96bc7Smrg lt_cv_dlopen="LoadLibrary" 18912fd96bc7Smrg lt_cv_dlopen_libs= 18922fd96bc7Smrg ;; 18932fd96bc7Smrg 18942fd96bc7Smrg cygwin*) 18952fd96bc7Smrg lt_cv_dlopen="dlopen" 18962fd96bc7Smrg lt_cv_dlopen_libs= 18972fd96bc7Smrg ;; 18982fd96bc7Smrg 18992fd96bc7Smrg darwin*) 19002fd96bc7Smrg # if libdl is installed we need to link against it 19012fd96bc7Smrg AC_CHECK_LIB([dl], [dlopen], 19022fd96bc7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 19032fd96bc7Smrg lt_cv_dlopen="dyld" 19042fd96bc7Smrg lt_cv_dlopen_libs= 19052fd96bc7Smrg lt_cv_dlopen_self=yes 19066fae4e5dSmrg ]) 19076fae4e5dSmrg ;; 19082fd96bc7Smrg 19092fd96bc7Smrg *) 19102fd96bc7Smrg AC_CHECK_FUNC([shl_load], 19112fd96bc7Smrg [lt_cv_dlopen="shl_load"], 19122fd96bc7Smrg [AC_CHECK_LIB([dld], [shl_load], 19132fd96bc7Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 19142fd96bc7Smrg [AC_CHECK_FUNC([dlopen], 19152fd96bc7Smrg [lt_cv_dlopen="dlopen"], 19162fd96bc7Smrg [AC_CHECK_LIB([dl], [dlopen], 19172fd96bc7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 19182fd96bc7Smrg [AC_CHECK_LIB([svld], [dlopen], 19192fd96bc7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 19202fd96bc7Smrg [AC_CHECK_LIB([dld], [dld_link], 19212fd96bc7Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 19222fd96bc7Smrg ]) 19232fd96bc7Smrg ]) 19242fd96bc7Smrg ]) 19252fd96bc7Smrg ]) 19262fd96bc7Smrg ]) 19276fae4e5dSmrg ;; 19286fae4e5dSmrg esac 19299c9ff80cSmrg 19302fd96bc7Smrg if test "x$lt_cv_dlopen" != xno; then 19312fd96bc7Smrg enable_dlopen=yes 19326fae4e5dSmrg else 19332fd96bc7Smrg enable_dlopen=no 19346fae4e5dSmrg fi 19359c9ff80cSmrg 19362fd96bc7Smrg case $lt_cv_dlopen in 19372fd96bc7Smrg dlopen) 19382fd96bc7Smrg save_CPPFLAGS="$CPPFLAGS" 19392fd96bc7Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 19409c9ff80cSmrg 19412fd96bc7Smrg save_LDFLAGS="$LDFLAGS" 19422fd96bc7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 19439c9ff80cSmrg 19442fd96bc7Smrg save_LIBS="$LIBS" 19452fd96bc7Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 19469c9ff80cSmrg 19472fd96bc7Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 19482fd96bc7Smrg lt_cv_dlopen_self, [dnl 19492fd96bc7Smrg _LT_TRY_DLOPEN_SELF( 19502fd96bc7Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 19512fd96bc7Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 19522fd96bc7Smrg ]) 19536fae4e5dSmrg 19542fd96bc7Smrg if test "x$lt_cv_dlopen_self" = xyes; then 19552fd96bc7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 19562fd96bc7Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 19572fd96bc7Smrg lt_cv_dlopen_self_static, [dnl 19582fd96bc7Smrg _LT_TRY_DLOPEN_SELF( 19592fd96bc7Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 19602fd96bc7Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 19612fd96bc7Smrg ]) 19622fd96bc7Smrg fi 19639c9ff80cSmrg 19642fd96bc7Smrg CPPFLAGS="$save_CPPFLAGS" 19652fd96bc7Smrg LDFLAGS="$save_LDFLAGS" 19662fd96bc7Smrg LIBS="$save_LIBS" 19672fd96bc7Smrg ;; 19682fd96bc7Smrg esac 19699c9ff80cSmrg 19702fd96bc7Smrg case $lt_cv_dlopen_self in 19712fd96bc7Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 19722fd96bc7Smrg *) enable_dlopen_self=unknown ;; 19732fd96bc7Smrg esac 19749c9ff80cSmrg 19752fd96bc7Smrg case $lt_cv_dlopen_self_static in 19762fd96bc7Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 19772fd96bc7Smrg *) enable_dlopen_self_static=unknown ;; 19782fd96bc7Smrg esac 19792fd96bc7Smrgfi 19802fd96bc7Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 19812fd96bc7Smrg [Whether dlopen is supported]) 19822fd96bc7Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 19832fd96bc7Smrg [Whether dlopen of programs is supported]) 19842fd96bc7Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 19852fd96bc7Smrg [Whether dlopen of statically linked programs is supported]) 19862fd96bc7Smrg])# LT_SYS_DLOPEN_SELF 19879c9ff80cSmrg 19882fd96bc7Smrg# Old name: 19892fd96bc7SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 19902fd96bc7Smrgdnl aclocal-1.4 backwards compatibility: 19912fd96bc7Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 19929c9ff80cSmrg 19939c9ff80cSmrg 19942fd96bc7Smrg# _LT_COMPILER_C_O([TAGNAME]) 19952fd96bc7Smrg# --------------------------- 19962fd96bc7Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 19972fd96bc7Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 19982fd96bc7Smrgm4_defun([_LT_COMPILER_C_O], 19992fd96bc7Smrg[m4_require([_LT_DECL_SED])dnl 20002fd96bc7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20012fd96bc7Smrgm4_require([_LT_TAG_COMPILER])dnl 20022fd96bc7SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 20032fd96bc7Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 20042fd96bc7Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 20052fd96bc7Smrg $RM -r conftest 2>/dev/null 20062fd96bc7Smrg mkdir conftest 20072fd96bc7Smrg cd conftest 20082fd96bc7Smrg mkdir out 20092fd96bc7Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 20106fae4e5dSmrg 20112fd96bc7Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 20122fd96bc7Smrg # Insert the option either (1) after the last *FLAGS variable, or 20132fd96bc7Smrg # (2) before a word containing "conftest.", or (3) at the end. 20142fd96bc7Smrg # Note that $ac_compile itself does not contain backslashes and begins 20152fd96bc7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 20162fd96bc7Smrg lt_compile=`echo "$ac_compile" | $SED \ 20172fd96bc7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 20182fd96bc7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 20192fd96bc7Smrg -e 's:$: $lt_compiler_flag:'` 20202fd96bc7Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 20212fd96bc7Smrg (eval "$lt_compile" 2>out/conftest.err) 20222fd96bc7Smrg ac_status=$? 20232fd96bc7Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 20242fd96bc7Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 20252fd96bc7Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 20262fd96bc7Smrg then 20272fd96bc7Smrg # The compiler can only warn and ignore the option if not recognized 20282fd96bc7Smrg # So say no if there are warnings 20292fd96bc7Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 20302fd96bc7Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 20312fd96bc7Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 20322fd96bc7Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 20332fd96bc7Smrg fi 20346fae4e5dSmrg fi 20352fd96bc7Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 20362fd96bc7Smrg $RM conftest* 20372fd96bc7Smrg # SGI C++ compiler will create directory out/ii_files/ for 20382fd96bc7Smrg # template instantiation 20392fd96bc7Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 20402fd96bc7Smrg $RM out/* && rmdir out 20412fd96bc7Smrg cd .. 20422fd96bc7Smrg $RM -r conftest 20432fd96bc7Smrg $RM conftest* 20442fd96bc7Smrg]) 20452fd96bc7Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 20462fd96bc7Smrg [Does compiler simultaneously support -c and -o options?]) 20472fd96bc7Smrg])# _LT_COMPILER_C_O 20489c9ff80cSmrg 20499c9ff80cSmrg 20502fd96bc7Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 20512fd96bc7Smrg# ---------------------------------- 20522fd96bc7Smrg# Check to see if we can do hard links to lock some files if needed 20532fd96bc7Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 20542fd96bc7Smrg[m4_require([_LT_ENABLE_LOCK])dnl 20552fd96bc7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20562fd96bc7Smrg_LT_COMPILER_C_O([$1]) 20579c9ff80cSmrg 20582fd96bc7Smrghard_links="nottested" 20592fd96bc7Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 20602fd96bc7Smrg # do not overwrite the value of need_locks provided by the user 20612fd96bc7Smrg AC_MSG_CHECKING([if we can lock with hard links]) 20622fd96bc7Smrg hard_links=yes 20632fd96bc7Smrg $RM conftest* 20642fd96bc7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 20652fd96bc7Smrg touch conftest.a 20662fd96bc7Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 20672fd96bc7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 20682fd96bc7Smrg AC_MSG_RESULT([$hard_links]) 20692fd96bc7Smrg if test "$hard_links" = no; then 20702fd96bc7Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 20712fd96bc7Smrg need_locks=warn 20726fae4e5dSmrg fi 20732fd96bc7Smrgelse 20742fd96bc7Smrg need_locks=no 20752fd96bc7Smrgfi 20762fd96bc7Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 20772fd96bc7Smrg])# _LT_COMPILER_FILE_LOCKS 20789c9ff80cSmrg 20799c9ff80cSmrg 20802fd96bc7Smrg# _LT_CHECK_OBJDIR 20812fd96bc7Smrg# ---------------- 20822fd96bc7Smrgm4_defun([_LT_CHECK_OBJDIR], 20832fd96bc7Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 20842fd96bc7Smrg[rm -f .libs 2>/dev/null 20852fd96bc7Smrgmkdir .libs 2>/dev/null 20862fd96bc7Smrgif test -d .libs; then 20872fd96bc7Smrg lt_cv_objdir=.libs 20882fd96bc7Smrgelse 20892fd96bc7Smrg # MS-DOS does not allow filenames that begin with a dot. 20902fd96bc7Smrg lt_cv_objdir=_libs 20912fd96bc7Smrgfi 20922fd96bc7Smrgrmdir .libs 2>/dev/null]) 20932fd96bc7Smrgobjdir=$lt_cv_objdir 20942fd96bc7Smrg_LT_DECL([], [objdir], [0], 20952fd96bc7Smrg [The name of the directory that contains temporary libtool files])dnl 20962fd96bc7Smrgm4_pattern_allow([LT_OBJDIR])dnl 20972fd96bc7SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 20982fd96bc7Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 20992fd96bc7Smrg])# _LT_CHECK_OBJDIR 21009c9ff80cSmrg 21016fae4e5dSmrg 21022fd96bc7Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 21032fd96bc7Smrg# -------------------------------------- 21042fd96bc7Smrg# Check hardcoding attributes. 21052fd96bc7Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 21062fd96bc7Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 21072fd96bc7Smrg_LT_TAGVAR(hardcode_action, $1)= 21082fd96bc7Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 21092fd96bc7Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 21102fd96bc7Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 21119c9ff80cSmrg 21122fd96bc7Smrg # We can hardcode non-existent directories. 21132fd96bc7Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 21142fd96bc7Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 21152fd96bc7Smrg # have to relink, otherwise we might link with an installed library 21162fd96bc7Smrg # when we should be linking with a yet-to-be-installed one 21172fd96bc7Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 21182fd96bc7Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 21192fd96bc7Smrg # Linking always hardcodes the temporary library directory. 21202fd96bc7Smrg _LT_TAGVAR(hardcode_action, $1)=relink 21212fd96bc7Smrg else 21222fd96bc7Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 21232fd96bc7Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 21242fd96bc7Smrg fi 21256fae4e5dSmrgelse 21262fd96bc7Smrg # We cannot hardcode anything, or else we can only hardcode existing 21272fd96bc7Smrg # directories. 21282fd96bc7Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 21299c9ff80cSmrgfi 21302fd96bc7SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 21319c9ff80cSmrg 21322fd96bc7Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 21332fd96bc7Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 21342fd96bc7Smrg # Fast installation is not supported 21352fd96bc7Smrg enable_fast_install=no 21362fd96bc7Smrgelif test "$shlibpath_overrides_runpath" = yes || 21372fd96bc7Smrg test "$enable_shared" = no; then 21382fd96bc7Smrg # Fast installation is not necessary 21392fd96bc7Smrg enable_fast_install=needless 21402fd96bc7Smrgfi 21412fd96bc7Smrg_LT_TAGDECL([], [hardcode_action], [0], 21422fd96bc7Smrg [How to hardcode a shared library path into an executable]) 21432fd96bc7Smrg])# _LT_LINKER_HARDCODE_LIBPATH 21449c9ff80cSmrg 21459c9ff80cSmrg 21462fd96bc7Smrg# _LT_CMD_STRIPLIB 21472fd96bc7Smrg# ---------------- 21482fd96bc7Smrgm4_defun([_LT_CMD_STRIPLIB], 21492fd96bc7Smrg[m4_require([_LT_DECL_EGREP]) 21502fd96bc7Smrgstriplib= 21512fd96bc7Smrgold_striplib= 21522fd96bc7SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 21532fd96bc7Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 21542fd96bc7Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 21552fd96bc7Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 21562fd96bc7Smrg AC_MSG_RESULT([yes]) 21572fd96bc7Smrgelse 21582fd96bc7Smrg# FIXME - insert some real tests, host_os isn't really good enough 21596fae4e5dSmrg case $host_os in 21602fd96bc7Smrg darwin*) 21612fd96bc7Smrg if test -n "$STRIP" ; then 21622fd96bc7Smrg striplib="$STRIP -x" 21632fd96bc7Smrg old_striplib="$STRIP -S" 21642fd96bc7Smrg AC_MSG_RESULT([yes]) 21652fd96bc7Smrg else 21662fd96bc7Smrg AC_MSG_RESULT([no]) 21672fd96bc7Smrg fi 21686fae4e5dSmrg ;; 21696fae4e5dSmrg *) 21702fd96bc7Smrg AC_MSG_RESULT([no]) 21716fae4e5dSmrg ;; 21726fae4e5dSmrg esac 21739c9ff80cSmrgfi 21742fd96bc7Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 21752fd96bc7Smrg_LT_DECL([], [striplib], [1]) 21762fd96bc7Smrg])# _LT_CMD_STRIPLIB 21779c9ff80cSmrg 21789c9ff80cSmrg 21792fd96bc7Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 21802fd96bc7Smrg# ----------------------------- 21812fd96bc7Smrg# PORTME Fill in your ld.so characteristics 21822fd96bc7Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 21832fd96bc7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 21842fd96bc7Smrgm4_require([_LT_DECL_EGREP])dnl 21852fd96bc7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21862fd96bc7Smrgm4_require([_LT_DECL_OBJDUMP])dnl 21876fae4e5dSmrgm4_require([_LT_DECL_SED])dnl 21882fd96bc7Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 21892fd96bc7SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 21902fd96bc7Smrgm4_if([$1], 21912fd96bc7Smrg [], [ 21922fd96bc7Smrgif test "$GCC" = yes; then 21932fd96bc7Smrg case $host_os in 21942fd96bc7Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 21952fd96bc7Smrg *) lt_awk_arg="/^libraries:/" ;; 21962fd96bc7Smrg esac 21972fd96bc7Smrg case $host_os in 21982fd96bc7Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 21992fd96bc7Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 22002fd96bc7Smrg esac 22012fd96bc7Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 22022fd96bc7Smrg case $lt_search_path_spec in 22032fd96bc7Smrg *\;*) 22042fd96bc7Smrg # if the path contains ";" then we assume it to be the separator 22052fd96bc7Smrg # otherwise default to the standard path separator (i.e. ":") - it is 22062fd96bc7Smrg # assumed that no part of a normal pathname contains ";" but that should 22072fd96bc7Smrg # okay in the real world where ";" in dirpaths is itself problematic. 22082fd96bc7Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 22092fd96bc7Smrg ;; 22102fd96bc7Smrg *) 22112fd96bc7Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 22122fd96bc7Smrg ;; 22132fd96bc7Smrg esac 22142fd96bc7Smrg # Ok, now we have the path, separated by spaces, we can step through it 22152fd96bc7Smrg # and add multilib dir if necessary. 22162fd96bc7Smrg lt_tmp_lt_search_path_spec= 22172fd96bc7Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 22182fd96bc7Smrg for lt_sys_path in $lt_search_path_spec; do 22192fd96bc7Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 22202fd96bc7Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 22212fd96bc7Smrg else 22222fd96bc7Smrg test -d "$lt_sys_path" && \ 22232fd96bc7Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 22242fd96bc7Smrg fi 22252fd96bc7Smrg done 22262fd96bc7Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 22272fd96bc7SmrgBEGIN {RS=" "; FS="/|\n";} { 22282fd96bc7Smrg lt_foo=""; 22292fd96bc7Smrg lt_count=0; 22302fd96bc7Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 22312fd96bc7Smrg if ($lt_i != "" && $lt_i != ".") { 22322fd96bc7Smrg if ($lt_i == "..") { 22332fd96bc7Smrg lt_count++; 22342fd96bc7Smrg } else { 22352fd96bc7Smrg if (lt_count == 0) { 22362fd96bc7Smrg lt_foo="/" $lt_i lt_foo; 22372fd96bc7Smrg } else { 22382fd96bc7Smrg lt_count--; 22392fd96bc7Smrg } 22402fd96bc7Smrg } 22412fd96bc7Smrg } 22422fd96bc7Smrg } 22432fd96bc7Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 22442fd96bc7Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 22452fd96bc7Smrg}'` 22462fd96bc7Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 22472fd96bc7Smrg # for these hosts. 22482fd96bc7Smrg case $host_os in 22492fd96bc7Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 22502fd96bc7Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 22512fd96bc7Smrg esac 22522fd96bc7Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 22536fae4e5dSmrgelse 22542fd96bc7Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 22552fd96bc7Smrgfi]) 22562fd96bc7Smrglibrary_names_spec= 22572fd96bc7Smrglibname_spec='lib$name' 22582fd96bc7Smrgsoname_spec= 22592fd96bc7Smrgshrext_cmds=".so" 22602fd96bc7Smrgpostinstall_cmds= 22612fd96bc7Smrgpostuninstall_cmds= 22622fd96bc7Smrgfinish_cmds= 22632fd96bc7Smrgfinish_eval= 22642fd96bc7Smrgshlibpath_var= 22652fd96bc7Smrgshlibpath_overrides_runpath=unknown 22662fd96bc7Smrgversion_type=none 22672fd96bc7Smrgdynamic_linker="$host_os ld.so" 22682fd96bc7Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 22692fd96bc7Smrgneed_lib_prefix=unknown 22702fd96bc7Smrghardcode_into_libs=no 22719c9ff80cSmrg 22722fd96bc7Smrg# when you set need_version to no, make sure it does not cause -set_version 22732fd96bc7Smrg# flags to be left without arguments 22742fd96bc7Smrgneed_version=unknown 22759c9ff80cSmrg 22762fd96bc7Smrgcase $host_os in 22772fd96bc7Smrgaix3*) 22782fd96bc7Smrg version_type=linux # correct to gnu/linux during the next big refactor 22792fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 22802fd96bc7Smrg shlibpath_var=LIBPATH 22819c9ff80cSmrg 22822fd96bc7Smrg # AIX 3 has no versioning support, so we append a major version to the name. 22832fd96bc7Smrg soname_spec='${libname}${release}${shared_ext}$major' 22842fd96bc7Smrg ;; 22859c9ff80cSmrg 22862fd96bc7Smrgaix[[4-9]]*) 22872fd96bc7Smrg version_type=linux # correct to gnu/linux during the next big refactor 22882fd96bc7Smrg need_lib_prefix=no 22892fd96bc7Smrg need_version=no 22902fd96bc7Smrg hardcode_into_libs=yes 22912fd96bc7Smrg if test "$host_cpu" = ia64; then 22922fd96bc7Smrg # AIX 5 supports IA64 22932fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 22942fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH 22952fd96bc7Smrg else 22962fd96bc7Smrg # With GCC up to 2.95.x, collect2 would create an import file 22972fd96bc7Smrg # for dependence libraries. The import file would start with 22982fd96bc7Smrg # the line `#! .'. This would cause the generated library to 22992fd96bc7Smrg # depend on `.', always an invalid library. This was fixed in 23002fd96bc7Smrg # development snapshots of GCC prior to 3.0. 23012fd96bc7Smrg case $host_os in 23022fd96bc7Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 23032fd96bc7Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 23042fd96bc7Smrg echo ' yes ' 23052fd96bc7Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 23062fd96bc7Smrg : 23072fd96bc7Smrg else 23082fd96bc7Smrg can_build_shared=no 23092fd96bc7Smrg fi 23102fd96bc7Smrg ;; 23112fd96bc7Smrg esac 23122fd96bc7Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 23132fd96bc7Smrg # soname into executable. Probably we can add versioning support to 23142fd96bc7Smrg # collect2, so additional links can be useful in future. 23152fd96bc7Smrg if test "$aix_use_runtimelinking" = yes; then 23162fd96bc7Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 23172fd96bc7Smrg # instead of lib<name>.a to let people know that these are not 23182fd96bc7Smrg # typical AIX shared libraries. 23192fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23206fae4e5dSmrg else 23212fd96bc7Smrg # We preserve .a as extension for shared libraries through AIX4.2 23222fd96bc7Smrg # and later when we are not doing run time linking. 23232fd96bc7Smrg library_names_spec='${libname}${release}.a $libname.a' 23242fd96bc7Smrg soname_spec='${libname}${release}${shared_ext}$major' 23256fae4e5dSmrg fi 23262fd96bc7Smrg shlibpath_var=LIBPATH 23272fd96bc7Smrg fi 23282fd96bc7Smrg ;; 232989c04b6cSmrg 23302fd96bc7Smrgamigaos*) 23312fd96bc7Smrg case $host_cpu in 23322fd96bc7Smrg powerpc) 23332fd96bc7Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 23342fd96bc7Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 23352fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23366fae4e5dSmrg ;; 23372fd96bc7Smrg m68k) 23382fd96bc7Smrg library_names_spec='$libname.ixlibrary $libname.a' 23392fd96bc7Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 23402fd96bc7Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 23419c9ff80cSmrg ;; 23429c9ff80cSmrg esac 23432fd96bc7Smrg ;; 23449c9ff80cSmrg 23452fd96bc7Smrgbeos*) 23462fd96bc7Smrg library_names_spec='${libname}${shared_ext}' 23472fd96bc7Smrg dynamic_linker="$host_os ld.so" 23482fd96bc7Smrg shlibpath_var=LIBRARY_PATH 23492fd96bc7Smrg ;; 23509c9ff80cSmrg 23512fd96bc7Smrgbsdi[[45]]*) 23522fd96bc7Smrg version_type=linux # correct to gnu/linux during the next big refactor 23532fd96bc7Smrg need_version=no 23542fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23552fd96bc7Smrg soname_spec='${libname}${release}${shared_ext}$major' 23562fd96bc7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 23572fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH 23582fd96bc7Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 23592fd96bc7Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 23602fd96bc7Smrg # the default ld.so.conf also contains /usr/contrib/lib and 23612fd96bc7Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 23622fd96bc7Smrg # libtool to hard-code these into programs 23632fd96bc7Smrg ;; 23649c9ff80cSmrg 23652fd96bc7Smrgcygwin* | mingw* | pw32* | cegcc*) 23662fd96bc7Smrg version_type=windows 23672fd96bc7Smrg shrext_cmds=".dll" 23682fd96bc7Smrg need_version=no 23692fd96bc7Smrg need_lib_prefix=no 23709c9ff80cSmrg 23712fd96bc7Smrg case $GCC,$cc_basename in 23722fd96bc7Smrg yes,*) 23732fd96bc7Smrg # gcc 23742fd96bc7Smrg library_names_spec='$libname.dll.a' 23752fd96bc7Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 23762fd96bc7Smrg postinstall_cmds='base_file=`basename \${file}`~ 23772fd96bc7Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 23782fd96bc7Smrg dldir=$destdir/`dirname \$dlpath`~ 23792fd96bc7Smrg test -d \$dldir || mkdir -p \$dldir~ 23802fd96bc7Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 23812fd96bc7Smrg chmod a+x \$dldir/$dlname~ 23822fd96bc7Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 23832fd96bc7Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 23842fd96bc7Smrg fi' 23852fd96bc7Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 23862fd96bc7Smrg dlpath=$dir/\$dldll~ 23872fd96bc7Smrg $RM \$dlpath' 23882fd96bc7Smrg shlibpath_overrides_runpath=yes 23891f0ac6a5Smrg 23902fd96bc7Smrg case $host_os in 23912fd96bc7Smrg cygwin*) 23922fd96bc7Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 23932fd96bc7Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 23942fd96bc7Smrgm4_if([$1], [],[ 23952fd96bc7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 23962fd96bc7Smrg ;; 23972fd96bc7Smrg mingw* | cegcc*) 23982fd96bc7Smrg # MinGW DLLs use traditional 'lib' prefix 23992fd96bc7Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 24002fd96bc7Smrg ;; 24012fd96bc7Smrg pw32*) 24022fd96bc7Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 24032fd96bc7Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 24042fd96bc7Smrg ;; 24052fd96bc7Smrg esac 24062fd96bc7Smrg dynamic_linker='Win32 ld.exe' 24072fd96bc7Smrg ;; 24081f0ac6a5Smrg 24092fd96bc7Smrg *,cl*) 24102fd96bc7Smrg # Native MSVC 24112fd96bc7Smrg libname_spec='$name' 24122fd96bc7Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 24132fd96bc7Smrg library_names_spec='${libname}.dll.lib' 24141f0ac6a5Smrg 24152fd96bc7Smrg case $build_os in 24162fd96bc7Smrg mingw*) 24172fd96bc7Smrg sys_lib_search_path_spec= 24182fd96bc7Smrg lt_save_ifs=$IFS 24192fd96bc7Smrg IFS=';' 24202fd96bc7Smrg for lt_path in $LIB 24212fd96bc7Smrg do 24222fd96bc7Smrg IFS=$lt_save_ifs 24232fd96bc7Smrg # Let DOS variable expansion print the short 8.3 style file name. 24242fd96bc7Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 24252fd96bc7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 24262fd96bc7Smrg done 24272fd96bc7Smrg IFS=$lt_save_ifs 24282fd96bc7Smrg # Convert to MSYS style. 24292fd96bc7Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 24302fd96bc7Smrg ;; 24312fd96bc7Smrg cygwin*) 24322fd96bc7Smrg # Convert to unix form, then to dos form, then back to unix form 24332fd96bc7Smrg # but this time dos style (no spaces!) so that the unix form looks 24342fd96bc7Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 24352fd96bc7Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 24362fd96bc7Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 24372fd96bc7Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 24382fd96bc7Smrg ;; 24392fd96bc7Smrg *) 24402fd96bc7Smrg sys_lib_search_path_spec="$LIB" 24412fd96bc7Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 24422fd96bc7Smrg # It is most probably a Windows format PATH. 24432fd96bc7Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 24442fd96bc7Smrg else 24452fd96bc7Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 24462fd96bc7Smrg fi 24472fd96bc7Smrg # FIXME: find the short name or the path components, as spaces are 24482fd96bc7Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 24492fd96bc7Smrg ;; 24502fd96bc7Smrg esac 24511f0ac6a5Smrg 24522fd96bc7Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 24532fd96bc7Smrg postinstall_cmds='base_file=`basename \${file}`~ 24542fd96bc7Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 24552fd96bc7Smrg dldir=$destdir/`dirname \$dlpath`~ 24562fd96bc7Smrg test -d \$dldir || mkdir -p \$dldir~ 24572fd96bc7Smrg $install_prog $dir/$dlname \$dldir/$dlname' 24582fd96bc7Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 24592fd96bc7Smrg dlpath=$dir/\$dldll~ 24602fd96bc7Smrg $RM \$dlpath' 24612fd96bc7Smrg shlibpath_overrides_runpath=yes 24622fd96bc7Smrg dynamic_linker='Win32 link.exe' 24632fd96bc7Smrg ;; 24646fae4e5dSmrg 24652fd96bc7Smrg *) 24662fd96bc7Smrg # Assume MSVC wrapper 24672fd96bc7Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 24682fd96bc7Smrg dynamic_linker='Win32 ld.exe' 24692fd96bc7Smrg ;; 24702fd96bc7Smrg esac 24712fd96bc7Smrg # FIXME: first we should search . and the directory the executable is in 24722fd96bc7Smrg shlibpath_var=PATH 24732fd96bc7Smrg ;; 24746fae4e5dSmrg 24752fd96bc7Smrgdarwin* | rhapsody*) 24762fd96bc7Smrg dynamic_linker="$host_os dyld" 24772fd96bc7Smrg version_type=darwin 24782fd96bc7Smrg need_lib_prefix=no 24792fd96bc7Smrg need_version=no 24802fd96bc7Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 24812fd96bc7Smrg soname_spec='${libname}${release}${major}$shared_ext' 24822fd96bc7Smrg shlibpath_overrides_runpath=yes 24832fd96bc7Smrg shlibpath_var=DYLD_LIBRARY_PATH 24842fd96bc7Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 24852fd96bc7Smrgm4_if([$1], [],[ 24862fd96bc7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 24872fd96bc7Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 24882fd96bc7Smrg ;; 24896fae4e5dSmrg 24902fd96bc7Smrgdgux*) 24912fd96bc7Smrg version_type=linux # correct to gnu/linux during the next big refactor 24922fd96bc7Smrg need_lib_prefix=no 24932fd96bc7Smrg need_version=no 24942fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 24952fd96bc7Smrg soname_spec='${libname}${release}${shared_ext}$major' 24962fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH 24972fd96bc7Smrg ;; 24986fae4e5dSmrg 24992fd96bc7Smrgfreebsd* | dragonfly*) 25002fd96bc7Smrg # DragonFly does not have aout. When/if they implement a new 25012fd96bc7Smrg # versioning mechanism, adjust this. 25022fd96bc7Smrg if test -x /usr/bin/objformat; then 25032fd96bc7Smrg objformat=`/usr/bin/objformat` 25042fd96bc7Smrg else 25052fd96bc7Smrg case $host_os in 25062fd96bc7Smrg freebsd[[23]].*) objformat=aout ;; 25072fd96bc7Smrg *) objformat=elf ;; 25086fae4e5dSmrg esac 25096fae4e5dSmrg fi 25102fd96bc7Smrg version_type=freebsd-$objformat 25112fd96bc7Smrg case $version_type in 25122fd96bc7Smrg freebsd-elf*) 25132fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 25142fd96bc7Smrg need_version=no 25152fd96bc7Smrg need_lib_prefix=no 25162fd96bc7Smrg ;; 25172fd96bc7Smrg freebsd-*) 25182fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 25192fd96bc7Smrg need_version=yes 25202fd96bc7Smrg ;; 25212fd96bc7Smrg esac 25222fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH 25236fae4e5dSmrg case $host_os in 25242fd96bc7Smrg freebsd2.*) 25252fd96bc7Smrg shlibpath_overrides_runpath=yes 25266fae4e5dSmrg ;; 25272fd96bc7Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 25282fd96bc7Smrg shlibpath_overrides_runpath=yes 25292fd96bc7Smrg hardcode_into_libs=yes 25306fae4e5dSmrg ;; 25312fd96bc7Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 25322fd96bc7Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 25332fd96bc7Smrg shlibpath_overrides_runpath=no 25342fd96bc7Smrg hardcode_into_libs=yes 25356fae4e5dSmrg ;; 25362fd96bc7Smrg *) # from 4.6 on, and DragonFly 25372fd96bc7Smrg shlibpath_overrides_runpath=yes 25382fd96bc7Smrg hardcode_into_libs=yes 25396fae4e5dSmrg ;; 25406fae4e5dSmrg esac 25412fd96bc7Smrg ;; 25426fae4e5dSmrg 25432fd96bc7Smrghaiku*) 25442fd96bc7Smrg version_type=linux # correct to gnu/linux during the next big refactor 25452fd96bc7Smrg need_lib_prefix=no 25462fd96bc7Smrg need_version=no 25472fd96bc7Smrg dynamic_linker="$host_os runtime_loader" 25482fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 25492fd96bc7Smrg soname_spec='${libname}${release}${shared_ext}$major' 25502fd96bc7Smrg shlibpath_var=LIBRARY_PATH 25512fd96bc7Smrg shlibpath_overrides_runpath=yes 25522fd96bc7Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 25532fd96bc7Smrg hardcode_into_libs=yes 25542fd96bc7Smrg ;; 25551f0ac6a5Smrg 25562fd96bc7Smrghpux9* | hpux10* | hpux11*) 25572fd96bc7Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 25582fd96bc7Smrg # link against other versions. 25592fd96bc7Smrg version_type=sunos 25602fd96bc7Smrg need_lib_prefix=no 25612fd96bc7Smrg need_version=no 25622fd96bc7Smrg case $host_cpu in 25632fd96bc7Smrg ia64*) 25642fd96bc7Smrg shrext_cmds='.so' 25652fd96bc7Smrg hardcode_into_libs=yes 25662fd96bc7Smrg dynamic_linker="$host_os dld.so" 25672fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH 25682fd96bc7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 25692fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25702fd96bc7Smrg soname_spec='${libname}${release}${shared_ext}$major' 25712fd96bc7Smrg if test "X$HPUX_IA64_MODE" = X32; then 25722fd96bc7Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 25732fd96bc7Smrg else 25742fd96bc7Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 25759c9ff80cSmrg fi 25762fd96bc7Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 25772fd96bc7Smrg ;; 25782fd96bc7Smrg hppa*64*) 25792fd96bc7Smrg shrext_cmds='.sl' 25802fd96bc7Smrg hardcode_into_libs=yes 25812fd96bc7Smrg dynamic_linker="$host_os dld.sl" 25822fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 25832fd96bc7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 25842fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25852fd96bc7Smrg soname_spec='${libname}${release}${shared_ext}$major' 25862fd96bc7Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 25872fd96bc7Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 25882fd96bc7Smrg ;; 25892fd96bc7Smrg *) 25902fd96bc7Smrg shrext_cmds='.sl' 25912fd96bc7Smrg dynamic_linker="$host_os dld.sl" 25922fd96bc7Smrg shlibpath_var=SHLIB_PATH 25932fd96bc7Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 25942fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25952fd96bc7Smrg soname_spec='${libname}${release}${shared_ext}$major' 25966fae4e5dSmrg ;; 25976fae4e5dSmrg esac 25982fd96bc7Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 25992fd96bc7Smrg postinstall_cmds='chmod 555 $lib' 26002fd96bc7Smrg # or fails outright, so override atomically: 26012fd96bc7Smrg install_override_mode=555 26022fd96bc7Smrg ;; 26039c9ff80cSmrg 26042fd96bc7Smrginterix[[3-9]]*) 26052fd96bc7Smrg version_type=linux # correct to gnu/linux during the next big refactor 26062fd96bc7Smrg need_lib_prefix=no 26072fd96bc7Smrg need_version=no 26082fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 26092fd96bc7Smrg soname_spec='${libname}${release}${shared_ext}$major' 26102fd96bc7Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 26112fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH 26122fd96bc7Smrg shlibpath_overrides_runpath=no 26132fd96bc7Smrg hardcode_into_libs=yes 26142fd96bc7Smrg ;; 26151f0ac6a5Smrg 26162fd96bc7Smrgirix5* | irix6* | nonstopux*) 26172fd96bc7Smrg case $host_os in 26182fd96bc7Smrg nonstopux*) version_type=nonstopux ;; 26192fd96bc7Smrg *) 26202fd96bc7Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 26212fd96bc7Smrg version_type=linux # correct to gnu/linux during the next big refactor 26222fd96bc7Smrg else 26232fd96bc7Smrg version_type=irix 26242fd96bc7Smrg fi ;; 26259c9ff80cSmrg esac 26262fd96bc7Smrg need_lib_prefix=no 26272fd96bc7Smrg need_version=no 26282fd96bc7Smrg soname_spec='${libname}${release}${shared_ext}$major' 26292fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 26302fd96bc7Smrg case $host_os in 26312fd96bc7Smrg irix5* | nonstopux*) 26322fd96bc7Smrg libsuff= shlibsuff= 26332fd96bc7Smrg ;; 26342fd96bc7Smrg *) 26352fd96bc7Smrg case $LD in # libtool.m4 will add one of these switches to LD 26362fd96bc7Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 26372fd96bc7Smrg libsuff= shlibsuff= libmagic=32-bit;; 26382fd96bc7Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 26392fd96bc7Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 26402fd96bc7Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 26412fd96bc7Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 26422fd96bc7Smrg *) libsuff= shlibsuff= libmagic=never-match;; 26432fd96bc7Smrg esac 26442fd96bc7Smrg ;; 26452fd96bc7Smrg esac 26462fd96bc7Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 26472fd96bc7Smrg shlibpath_overrides_runpath=no 26482fd96bc7Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 26492fd96bc7Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 26502fd96bc7Smrg hardcode_into_libs=yes 26512fd96bc7Smrg ;; 26526fae4e5dSmrg 26532fd96bc7Smrg# No shared lib support for Linux oldld, aout, or coff. 26542fd96bc7Smrglinux*oldld* | linux*aout* | linux*coff*) 26552fd96bc7Smrg dynamic_linker=no 26562fd96bc7Smrg ;; 26571f0ac6a5Smrg 26582fd96bc7Smrg# This must be glibc/ELF. 26592fd96bc7Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 26602fd96bc7Smrg version_type=linux # correct to gnu/linux during the next big refactor 26612fd96bc7Smrg need_lib_prefix=no 26622fd96bc7Smrg need_version=no 26632fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 26642fd96bc7Smrg soname_spec='${libname}${release}${shared_ext}$major' 26652fd96bc7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 26662fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH 26672fd96bc7Smrg shlibpath_overrides_runpath=no 26681f0ac6a5Smrg 26692fd96bc7Smrg # Some binutils ld are patched to set DT_RUNPATH 26702fd96bc7Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 26712fd96bc7Smrg [lt_cv_shlibpath_overrides_runpath=no 26722fd96bc7Smrg save_LDFLAGS=$LDFLAGS 26732fd96bc7Smrg save_libdir=$libdir 26742fd96bc7Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 26752fd96bc7Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 26762fd96bc7Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 26772fd96bc7Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 26782fd96bc7Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 26792fd96bc7Smrg LDFLAGS=$save_LDFLAGS 26802fd96bc7Smrg libdir=$save_libdir 26812fd96bc7Smrg ]) 26822fd96bc7Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 26836fae4e5dSmrg 26842fd96bc7Smrg # This implies no fast_install, which is unacceptable. 26852fd96bc7Smrg # Some rework will be needed to allow for fast_install 26862fd96bc7Smrg # before this can be enabled. 26872fd96bc7Smrg hardcode_into_libs=yes 26881f0ac6a5Smrg 26892fd96bc7Smrg # Append ld.so.conf contents to the search path 26902fd96bc7Smrg if test -f /etc/ld.so.conf; then 26912fd96bc7Smrg 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' ' '` 26922fd96bc7Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 26932fd96bc7Smrg fi 26949c9ff80cSmrg 26952fd96bc7Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 26962fd96bc7Smrg # powerpc, because MkLinux only supported shared libraries with the 26972fd96bc7Smrg # GNU dynamic linker. Since this was broken with cross compilers, 26982fd96bc7Smrg # most powerpc-linux boxes support dynamic linking these days and 26992fd96bc7Smrg # people can always --disable-shared, the test was removed, and we 27002fd96bc7Smrg # assume the GNU/Linux dynamic linker is in use. 27012fd96bc7Smrg dynamic_linker='GNU/Linux ld.so' 27022fd96bc7Smrg ;; 27031f0ac6a5Smrg 27042fd96bc7Smrgnetbsdelf*-gnu) 27052fd96bc7Smrg version_type=linux 27062fd96bc7Smrg need_lib_prefix=no 27072fd96bc7Smrg need_version=no 27082fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 27092fd96bc7Smrg soname_spec='${libname}${release}${shared_ext}$major' 27102fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH 27112fd96bc7Smrg shlibpath_overrides_runpath=no 27122fd96bc7Smrg hardcode_into_libs=yes 27132fd96bc7Smrg dynamic_linker='NetBSD ld.elf_so' 27142fd96bc7Smrg ;; 27151f0ac6a5Smrg 27162fd96bc7Smrgnetbsd*) 27172fd96bc7Smrg version_type=sunos 27182fd96bc7Smrg need_lib_prefix=no 27192fd96bc7Smrg need_version=no 27202fd96bc7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 27212fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 27222fd96bc7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 27232fd96bc7Smrg dynamic_linker='NetBSD (a.out) ld.so' 27242fd96bc7Smrg else 27252fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 27262fd96bc7Smrg soname_spec='${libname}${release}${shared_ext}$major' 27272fd96bc7Smrg dynamic_linker='NetBSD ld.elf_so' 27282fd96bc7Smrg fi 27292fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH 27302fd96bc7Smrg shlibpath_overrides_runpath=yes 27312fd96bc7Smrg hardcode_into_libs=yes 27322fd96bc7Smrg ;; 27339c9ff80cSmrg 27342fd96bc7Smrgnewsos6) 27352fd96bc7Smrg version_type=linux # correct to gnu/linux during the next big refactor 27362fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27372fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH 27382fd96bc7Smrg shlibpath_overrides_runpath=yes 27392fd96bc7Smrg ;; 27401f0ac6a5Smrg 27412fd96bc7Smrg*nto* | *qnx*) 27422fd96bc7Smrg version_type=qnx 27432fd96bc7Smrg need_lib_prefix=no 27442fd96bc7Smrg need_version=no 27452fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27462fd96bc7Smrg soname_spec='${libname}${release}${shared_ext}$major' 27472fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH 27482fd96bc7Smrg shlibpath_overrides_runpath=no 27492fd96bc7Smrg hardcode_into_libs=yes 27502fd96bc7Smrg dynamic_linker='ldqnx.so' 27512fd96bc7Smrg ;; 27521f0ac6a5Smrg 27532fd96bc7Smrgopenbsd*) 27542fd96bc7Smrg version_type=sunos 27552fd96bc7Smrg sys_lib_dlsearch_path_spec="/usr/lib" 27562fd96bc7Smrg need_lib_prefix=no 27572fd96bc7Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 27582fd96bc7Smrg case $host_os in 27592fd96bc7Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 27602fd96bc7Smrg *) need_version=no ;; 27612fd96bc7Smrg esac 27622fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 27632fd96bc7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 27642fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH 27652fd96bc7Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 27662fd96bc7Smrg case $host_os in 27672fd96bc7Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 27682fd96bc7Smrg shlibpath_overrides_runpath=no 27692fd96bc7Smrg ;; 27702fd96bc7Smrg *) 27712fd96bc7Smrg shlibpath_overrides_runpath=yes 27722fd96bc7Smrg ;; 27732fd96bc7Smrg esac 27746fae4e5dSmrg else 27752fd96bc7Smrg shlibpath_overrides_runpath=yes 27766fae4e5dSmrg fi 27772fd96bc7Smrg ;; 27781f0ac6a5Smrg 27792fd96bc7Smrgos2*) 27802fd96bc7Smrg libname_spec='$name' 27812fd96bc7Smrg shrext_cmds=".dll" 27822fd96bc7Smrg need_lib_prefix=no 27832fd96bc7Smrg library_names_spec='$libname${shared_ext} $libname.a' 27842fd96bc7Smrg dynamic_linker='OS/2 ld.exe' 27852fd96bc7Smrg shlibpath_var=LIBPATH 27862fd96bc7Smrg ;; 27871f0ac6a5Smrg 27882fd96bc7Smrgosf3* | osf4* | osf5*) 27892fd96bc7Smrg version_type=osf 27902fd96bc7Smrg need_lib_prefix=no 27912fd96bc7Smrg need_version=no 27922fd96bc7Smrg soname_spec='${libname}${release}${shared_ext}$major' 27932fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27942fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH 27952fd96bc7Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 27962fd96bc7Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 27972fd96bc7Smrg ;; 27981f0ac6a5Smrg 27992fd96bc7Smrgrdos*) 28002fd96bc7Smrg dynamic_linker=no 28012fd96bc7Smrg ;; 28022fd96bc7Smrg 28032fd96bc7Smrgsolaris*) 28042fd96bc7Smrg version_type=linux # correct to gnu/linux during the next big refactor 28052fd96bc7Smrg need_lib_prefix=no 28062fd96bc7Smrg need_version=no 28072fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28082fd96bc7Smrg soname_spec='${libname}${release}${shared_ext}$major' 28092fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH 28102fd96bc7Smrg shlibpath_overrides_runpath=yes 28112fd96bc7Smrg hardcode_into_libs=yes 28122fd96bc7Smrg # ldd complains unless libraries are executable 28132fd96bc7Smrg postinstall_cmds='chmod +x $lib' 28142fd96bc7Smrg ;; 28151f0ac6a5Smrg 28162fd96bc7Smrgsunos4*) 28172fd96bc7Smrg version_type=sunos 28182fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 28192fd96bc7Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 28202fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH 28212fd96bc7Smrg shlibpath_overrides_runpath=yes 28222fd96bc7Smrg if test "$with_gnu_ld" = yes; then 28232fd96bc7Smrg need_lib_prefix=no 28242fd96bc7Smrg fi 28252fd96bc7Smrg need_version=yes 28262fd96bc7Smrg ;; 28276fae4e5dSmrg 28282fd96bc7Smrgsysv4 | sysv4.3*) 28292fd96bc7Smrg version_type=linux # correct to gnu/linux during the next big refactor 28302fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28312fd96bc7Smrg soname_spec='${libname}${release}${shared_ext}$major' 28322fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH 28332fd96bc7Smrg case $host_vendor in 28342fd96bc7Smrg sni) 28352fd96bc7Smrg shlibpath_overrides_runpath=no 28362fd96bc7Smrg need_lib_prefix=no 28372fd96bc7Smrg runpath_var=LD_RUN_PATH 28382fd96bc7Smrg ;; 28392fd96bc7Smrg siemens) 28402fd96bc7Smrg need_lib_prefix=no 28412fd96bc7Smrg ;; 28422fd96bc7Smrg motorola) 28432fd96bc7Smrg need_lib_prefix=no 28442fd96bc7Smrg need_version=no 28452fd96bc7Smrg shlibpath_overrides_runpath=no 28462fd96bc7Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 28472fd96bc7Smrg ;; 28486fae4e5dSmrg esac 28492fd96bc7Smrg ;; 28501f0ac6a5Smrg 28512fd96bc7Smrgsysv4*MP*) 28522fd96bc7Smrg if test -d /usr/nec ;then 28532fd96bc7Smrg version_type=linux # correct to gnu/linux during the next big refactor 28542fd96bc7Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 28552fd96bc7Smrg soname_spec='$libname${shared_ext}.$major' 28562fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH 28572fd96bc7Smrg fi 28586fae4e5dSmrg ;; 28591f0ac6a5Smrg 28602fd96bc7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 28612fd96bc7Smrg version_type=freebsd-elf 28626fae4e5dSmrg need_lib_prefix=no 28636fae4e5dSmrg need_version=no 28642fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 28652fd96bc7Smrg soname_spec='${libname}${release}${shared_ext}$major' 28662fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH 28672fd96bc7Smrg shlibpath_overrides_runpath=yes 28686fae4e5dSmrg hardcode_into_libs=yes 28692fd96bc7Smrg if test "$with_gnu_ld" = yes; then 28702fd96bc7Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 28711f0ac6a5Smrg else 28722fd96bc7Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 28736fae4e5dSmrg case $host_os in 28742fd96bc7Smrg sco3.2v5*) 28752fd96bc7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 28762fd96bc7Smrg ;; 28771f0ac6a5Smrg esac 28781f0ac6a5Smrg fi 28792fd96bc7Smrg sys_lib_dlsearch_path_spec='/usr/lib' 28806fae4e5dSmrg ;; 28811f0ac6a5Smrg 28822fd96bc7Smrgtpf*) 28832fd96bc7Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 28842fd96bc7Smrg version_type=linux # correct to gnu/linux during the next big refactor 28852fd96bc7Smrg need_lib_prefix=no 28862fd96bc7Smrg need_version=no 28872fd96bc7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28882fd96bc7Smrg shlibpath_var=LD_LIBRARY_PATH 28892fd96bc7Smrg shlibpath_overrides_runpath=no 28902fd96bc7Smrg hardcode_into_libs=yes 28916fae4e5dSmrg ;; 28921f0ac6a5Smrg 28932fd96bc7Smrguts4*) 289489c04b6cSmrg version_type=linux # correct to gnu/linux during the next big refactor 28956fae4e5dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28966fae4e5dSmrg soname_spec='${libname}${release}${shared_ext}$major' 28976fae4e5dSmrg shlibpath_var=LD_LIBRARY_PATH 28986fae4e5dSmrg ;; 28991f0ac6a5Smrg 29002fd96bc7Smrg*) 29012fd96bc7Smrg dynamic_linker=no 29022fd96bc7Smrg ;; 29032fd96bc7Smrgesac 29042fd96bc7SmrgAC_MSG_RESULT([$dynamic_linker]) 29052fd96bc7Smrgtest "$dynamic_linker" = no && can_build_shared=no 29061f0ac6a5Smrg 29072fd96bc7Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 29082fd96bc7Smrgif test "$GCC" = yes; then 29092fd96bc7Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 29102fd96bc7Smrgfi 29116fae4e5dSmrg 29122fd96bc7Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 29132fd96bc7Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 29142fd96bc7Smrgfi 29152fd96bc7Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 29162fd96bc7Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 29172fd96bc7Smrgfi 29186fae4e5dSmrg 29192fd96bc7Smrg_LT_DECL([], [variables_saved_for_relink], [1], 29202fd96bc7Smrg [Variables whose values should be saved in libtool wrapper scripts and 29212fd96bc7Smrg restored at link time]) 29222fd96bc7Smrg_LT_DECL([], [need_lib_prefix], [0], 29232fd96bc7Smrg [Do we need the "lib" prefix for modules?]) 29242fd96bc7Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 29252fd96bc7Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 29262fd96bc7Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 29272fd96bc7Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 29282fd96bc7Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 29292fd96bc7Smrg [Is shlibpath searched before the hard-coded library search path?]) 29302fd96bc7Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 29312fd96bc7Smrg_LT_DECL([], [library_names_spec], [1], 29322fd96bc7Smrg [[List of archive names. First name is the real one, the rest are links. 29332fd96bc7Smrg The last name is the one that the linker finds with -lNAME]]) 29342fd96bc7Smrg_LT_DECL([], [soname_spec], [1], 29352fd96bc7Smrg [[The coded name of the library, if different from the real name]]) 29362fd96bc7Smrg_LT_DECL([], [install_override_mode], [1], 29372fd96bc7Smrg [Permission mode override for installation of shared libraries]) 29382fd96bc7Smrg_LT_DECL([], [postinstall_cmds], [2], 29392fd96bc7Smrg [Command to use after installation of a shared archive]) 29402fd96bc7Smrg_LT_DECL([], [postuninstall_cmds], [2], 29412fd96bc7Smrg [Command to use after uninstallation of a shared archive]) 29422fd96bc7Smrg_LT_DECL([], [finish_cmds], [2], 29432fd96bc7Smrg [Commands used to finish a libtool library installation in a directory]) 29442fd96bc7Smrg_LT_DECL([], [finish_eval], [1], 29452fd96bc7Smrg [[As "finish_cmds", except a single script fragment to be evaled but 29462fd96bc7Smrg not shown]]) 29472fd96bc7Smrg_LT_DECL([], [hardcode_into_libs], [0], 29482fd96bc7Smrg [Whether we should hardcode library paths into libraries]) 29492fd96bc7Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 29502fd96bc7Smrg [Compile-time system search path for libraries]) 29512fd96bc7Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 29522fd96bc7Smrg [Run-time system search path for libraries]) 29532fd96bc7Smrg])# _LT_SYS_DYNAMIC_LINKER 29546fae4e5dSmrg 29551f0ac6a5Smrg 29562fd96bc7Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 29572fd96bc7Smrg# -------------------------- 29582fd96bc7Smrg# find a file program which can recognize shared library 29592fd96bc7SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 29602fd96bc7Smrg[m4_require([_LT_DECL_EGREP])dnl 29612fd96bc7SmrgAC_MSG_CHECKING([for $1]) 29622fd96bc7SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 29632fd96bc7Smrg[case $MAGIC_CMD in 29642fd96bc7Smrg[[\\/*] | ?:[\\/]*]) 29652fd96bc7Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 29666fae4e5dSmrg ;; 29672fd96bc7Smrg*) 29682fd96bc7Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 29692fd96bc7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 29702fd96bc7Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 29712fd96bc7Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 29722fd96bc7Smrgdnl not every word. This closes a longstanding sh security hole. 29732fd96bc7Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 29742fd96bc7Smrg for ac_dir in $ac_dummy; do 29752fd96bc7Smrg IFS="$lt_save_ifs" 29762fd96bc7Smrg test -z "$ac_dir" && ac_dir=. 29772fd96bc7Smrg if test -f $ac_dir/$1; then 29782fd96bc7Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 29792fd96bc7Smrg if test -n "$file_magic_test_file"; then 29802fd96bc7Smrg case $deplibs_check_method in 29812fd96bc7Smrg "file_magic "*) 29822fd96bc7Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 29832fd96bc7Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 29842fd96bc7Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 29852fd96bc7Smrg $EGREP "$file_magic_regex" > /dev/null; then 29862fd96bc7Smrg : 29872fd96bc7Smrg else 29882fd96bc7Smrg cat <<_LT_EOF 1>&2 29891f0ac6a5Smrg 29902fd96bc7Smrg*** Warning: the command libtool uses to detect shared libraries, 29912fd96bc7Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 29922fd96bc7Smrg*** The result is that libtool may fail to recognize shared libraries 29932fd96bc7Smrg*** as such. This will affect the creation of libtool libraries that 29942fd96bc7Smrg*** depend on shared libraries, but programs linked with such libtool 29952fd96bc7Smrg*** libraries will work regardless of this problem. Nevertheless, you 29962fd96bc7Smrg*** may want to report the problem to your system manager and/or to 29972fd96bc7Smrg*** bug-libtool@gnu.org 29981f0ac6a5Smrg 29992fd96bc7Smrg_LT_EOF 30002fd96bc7Smrg fi ;; 30012fd96bc7Smrg esac 30022fd96bc7Smrg fi 30032fd96bc7Smrg break 30042fd96bc7Smrg fi 30052fd96bc7Smrg done 30062fd96bc7Smrg IFS="$lt_save_ifs" 30072fd96bc7Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 30086fae4e5dSmrg ;; 30092fd96bc7Smrgesac]) 30102fd96bc7SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 30112fd96bc7Smrgif test -n "$MAGIC_CMD"; then 30122fd96bc7Smrg AC_MSG_RESULT($MAGIC_CMD) 30132fd96bc7Smrgelse 30142fd96bc7Smrg AC_MSG_RESULT(no) 30152fd96bc7Smrgfi 30162fd96bc7Smrg_LT_DECL([], [MAGIC_CMD], [0], 30172fd96bc7Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 30182fd96bc7Smrg])# _LT_PATH_TOOL_PREFIX 30191f0ac6a5Smrg 30202fd96bc7Smrg# Old name: 30212fd96bc7SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 30222fd96bc7Smrgdnl aclocal-1.4 backwards compatibility: 30232fd96bc7Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 30242fd96bc7Smrg 30252fd96bc7Smrg 30262fd96bc7Smrg# _LT_PATH_MAGIC 30272fd96bc7Smrg# -------------- 30282fd96bc7Smrg# find a file program which can recognize a shared library 30292fd96bc7Smrgm4_defun([_LT_PATH_MAGIC], 30302fd96bc7Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 30312fd96bc7Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 30322fd96bc7Smrg if test -n "$ac_tool_prefix"; then 30332fd96bc7Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 30346fae4e5dSmrg else 30352fd96bc7Smrg MAGIC_CMD=: 30366fae4e5dSmrg fi 30372fd96bc7Smrgfi 30382fd96bc7Smrg])# _LT_PATH_MAGIC 30392fd96bc7Smrg 30402fd96bc7Smrg 30412fd96bc7Smrg# LT_PATH_LD 30422fd96bc7Smrg# ---------- 30432fd96bc7Smrg# find the pathname to the GNU or non-GNU linker 30442fd96bc7SmrgAC_DEFUN([LT_PATH_LD], 30452fd96bc7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 30462fd96bc7SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 30472fd96bc7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 30482fd96bc7Smrgm4_require([_LT_DECL_SED])dnl 30492fd96bc7Smrgm4_require([_LT_DECL_EGREP])dnl 30502fd96bc7Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 30512fd96bc7Smrg 30522fd96bc7SmrgAC_ARG_WITH([gnu-ld], 30532fd96bc7Smrg [AS_HELP_STRING([--with-gnu-ld], 30542fd96bc7Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 30552fd96bc7Smrg [test "$withval" = no || with_gnu_ld=yes], 30562fd96bc7Smrg [with_gnu_ld=no])dnl 30572fd96bc7Smrg 30582fd96bc7Smrgac_prog=ld 30592fd96bc7Smrgif test "$GCC" = yes; then 30602fd96bc7Smrg # Check if gcc -print-prog-name=ld gives a path. 30612fd96bc7Smrg AC_MSG_CHECKING([for ld used by $CC]) 30622fd96bc7Smrg case $host in 30632fd96bc7Smrg *-*-mingw*) 30642fd96bc7Smrg # gcc leaves a trailing carriage return which upsets mingw 30652fd96bc7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 30662fd96bc7Smrg *) 30672fd96bc7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 30686fae4e5dSmrg esac 30692fd96bc7Smrg case $ac_prog in 30702fd96bc7Smrg # Accept absolute paths. 30712fd96bc7Smrg [[\\/]]* | ?:[[\\/]]*) 30722fd96bc7Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 30732fd96bc7Smrg # Canonicalize the pathname of ld 30742fd96bc7Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 30752fd96bc7Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 30762fd96bc7Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 30772fd96bc7Smrg done 30782fd96bc7Smrg test -z "$LD" && LD="$ac_prog" 30792fd96bc7Smrg ;; 30802fd96bc7Smrg "") 30812fd96bc7Smrg # If it fails, then pretend we aren't using GCC. 30822fd96bc7Smrg ac_prog=ld 30836fae4e5dSmrg ;; 30842fd96bc7Smrg *) 30852fd96bc7Smrg # If it is relative, then search for the first ld in PATH. 30862fd96bc7Smrg with_gnu_ld=unknown 30876fae4e5dSmrg ;; 30886fae4e5dSmrg esac 30892fd96bc7Smrgelif test "$with_gnu_ld" = yes; then 30902fd96bc7Smrg AC_MSG_CHECKING([for GNU ld]) 30912fd96bc7Smrgelse 30922fd96bc7Smrg AC_MSG_CHECKING([for non-GNU ld]) 30932fd96bc7Smrgfi 30942fd96bc7SmrgAC_CACHE_VAL(lt_cv_path_LD, 30952fd96bc7Smrg[if test -z "$LD"; then 30962fd96bc7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 30972fd96bc7Smrg for ac_dir in $PATH; do 30982fd96bc7Smrg IFS="$lt_save_ifs" 30992fd96bc7Smrg test -z "$ac_dir" && ac_dir=. 31002fd96bc7Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 31012fd96bc7Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 31022fd96bc7Smrg # Check to see if the program is GNU ld. I'd rather use --version, 31032fd96bc7Smrg # but apparently some variants of GNU ld only accept -v. 31042fd96bc7Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 31052fd96bc7Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 31062fd96bc7Smrg *GNU* | *'with BFD'*) 31072fd96bc7Smrg test "$with_gnu_ld" != no && break 31082fd96bc7Smrg ;; 31092fd96bc7Smrg *) 31102fd96bc7Smrg test "$with_gnu_ld" != yes && break 31112fd96bc7Smrg ;; 31122fd96bc7Smrg esac 31132fd96bc7Smrg fi 31142fd96bc7Smrg done 31152fd96bc7Smrg IFS="$lt_save_ifs" 31162fd96bc7Smrgelse 31172fd96bc7Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 31182fd96bc7Smrgfi]) 31192fd96bc7SmrgLD="$lt_cv_path_LD" 31202fd96bc7Smrgif test -n "$LD"; then 31212fd96bc7Smrg AC_MSG_RESULT($LD) 31222fd96bc7Smrgelse 31232fd96bc7Smrg AC_MSG_RESULT(no) 31242fd96bc7Smrgfi 31252fd96bc7Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 31262fd96bc7Smrg_LT_PATH_LD_GNU 31272fd96bc7SmrgAC_SUBST([LD]) 31282fd96bc7Smrg 31292fd96bc7Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 31302fd96bc7Smrg])# LT_PATH_LD 31312fd96bc7Smrg 31322fd96bc7Smrg# Old names: 31332fd96bc7SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 31342fd96bc7SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 31352fd96bc7Smrgdnl aclocal-1.4 backwards compatibility: 31362fd96bc7Smrgdnl AC_DEFUN([AM_PROG_LD], []) 31372fd96bc7Smrgdnl AC_DEFUN([AC_PROG_LD], []) 31382fd96bc7Smrg 31392fd96bc7Smrg 31402fd96bc7Smrg# _LT_PATH_LD_GNU 31412fd96bc7Smrg#- -------------- 31422fd96bc7Smrgm4_defun([_LT_PATH_LD_GNU], 31432fd96bc7Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 31442fd96bc7Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 31452fd96bc7Smrgcase `$LD -v 2>&1 </dev/null` in 31462fd96bc7Smrg*GNU* | *'with BFD'*) 31472fd96bc7Smrg lt_cv_prog_gnu_ld=yes 31482fd96bc7Smrg ;; 31492fd96bc7Smrg*) 31502fd96bc7Smrg lt_cv_prog_gnu_ld=no 31512fd96bc7Smrg ;; 31522fd96bc7Smrgesac]) 31532fd96bc7Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 31542fd96bc7Smrg])# _LT_PATH_LD_GNU 31552fd96bc7Smrg 31562fd96bc7Smrg 31572fd96bc7Smrg# _LT_CMD_RELOAD 31582fd96bc7Smrg# -------------- 31592fd96bc7Smrg# find reload flag for linker 31602fd96bc7Smrg# -- PORTME Some linkers may need a different reload flag. 31612fd96bc7Smrgm4_defun([_LT_CMD_RELOAD], 31622fd96bc7Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 31632fd96bc7Smrg lt_cv_ld_reload_flag, 31642fd96bc7Smrg [lt_cv_ld_reload_flag='-r']) 31652fd96bc7Smrgreload_flag=$lt_cv_ld_reload_flag 31662fd96bc7Smrgcase $reload_flag in 31672fd96bc7Smrg"" | " "*) ;; 31682fd96bc7Smrg*) reload_flag=" $reload_flag" ;; 31692fd96bc7Smrgesac 31702fd96bc7Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 31712fd96bc7Smrgcase $host_os in 31722fd96bc7Smrg cygwin* | mingw* | pw32* | cegcc*) 31732fd96bc7Smrg if test "$GCC" != yes; then 31742fd96bc7Smrg reload_cmds=false 31752fd96bc7Smrg fi 31762fd96bc7Smrg ;; 31772fd96bc7Smrg darwin*) 31782fd96bc7Smrg if test "$GCC" = yes; then 31792fd96bc7Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 31802fd96bc7Smrg else 31812fd96bc7Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 31822fd96bc7Smrg fi 31832fd96bc7Smrg ;; 31842fd96bc7Smrgesac 31852fd96bc7Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 31862fd96bc7Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 31872fd96bc7Smrg])# _LT_CMD_RELOAD 31882fd96bc7Smrg 31892fd96bc7Smrg 31902fd96bc7Smrg# _LT_CHECK_MAGIC_METHOD 31912fd96bc7Smrg# ---------------------- 31922fd96bc7Smrg# how to check for library dependencies 31932fd96bc7Smrg# -- PORTME fill in with the dynamic library characteristics 31942fd96bc7Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 31952fd96bc7Smrg[m4_require([_LT_DECL_EGREP]) 31962fd96bc7Smrgm4_require([_LT_DECL_OBJDUMP]) 31972fd96bc7SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 31982fd96bc7Smrglt_cv_deplibs_check_method, 31992fd96bc7Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 32002fd96bc7Smrglt_cv_file_magic_test_file= 32012fd96bc7Smrglt_cv_deplibs_check_method='unknown' 32022fd96bc7Smrg# Need to set the preceding variable on all platforms that support 32032fd96bc7Smrg# interlibrary dependencies. 32042fd96bc7Smrg# 'none' -- dependencies not supported. 32052fd96bc7Smrg# `unknown' -- same as none, but documents that we really don't know. 32062fd96bc7Smrg# 'pass_all' -- all dependencies passed with no checks. 32072fd96bc7Smrg# 'test_compile' -- check by making test program. 32082fd96bc7Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 32092fd96bc7Smrg# which responds to the $file_magic_cmd with a given extended regex. 32102fd96bc7Smrg# If you have `file' or equivalent on your system and you're not sure 32112fd96bc7Smrg# whether `pass_all' will *always* work, you probably want this one. 32122fd96bc7Smrg 32132fd96bc7Smrgcase $host_os in 32142fd96bc7Smrgaix[[4-9]]*) 32152fd96bc7Smrg lt_cv_deplibs_check_method=pass_all 32162fd96bc7Smrg ;; 32172fd96bc7Smrg 32182fd96bc7Smrgbeos*) 32192fd96bc7Smrg lt_cv_deplibs_check_method=pass_all 32202fd96bc7Smrg ;; 32212fd96bc7Smrg 32222fd96bc7Smrgbsdi[[45]]*) 32232fd96bc7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 32242fd96bc7Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 32252fd96bc7Smrg lt_cv_file_magic_test_file=/shlib/libc.so 32262fd96bc7Smrg ;; 32272fd96bc7Smrg 32282fd96bc7Smrgcygwin*) 32292fd96bc7Smrg # func_win32_libid is a shell function defined in ltmain.sh 32302fd96bc7Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 32312fd96bc7Smrg lt_cv_file_magic_cmd='func_win32_libid' 32322fd96bc7Smrg ;; 32332fd96bc7Smrg 32342fd96bc7Smrgmingw* | pw32*) 32352fd96bc7Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 32362fd96bc7Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 32372fd96bc7Smrg # unless we find 'file', for example because we are cross-compiling. 32382fd96bc7Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 32392fd96bc7Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 32402fd96bc7Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 32412fd96bc7Smrg lt_cv_file_magic_cmd='func_win32_libid' 32422fd96bc7Smrg else 32432fd96bc7Smrg # Keep this pattern in sync with the one in func_win32_libid. 32442fd96bc7Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 32452fd96bc7Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 32462fd96bc7Smrg fi 32472fd96bc7Smrg ;; 32482fd96bc7Smrg 32492fd96bc7Smrgcegcc*) 32502fd96bc7Smrg # use the weaker test based on 'objdump'. See mingw*. 32512fd96bc7Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 32522fd96bc7Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 32532fd96bc7Smrg ;; 32542fd96bc7Smrg 32552fd96bc7Smrgdarwin* | rhapsody*) 32562fd96bc7Smrg lt_cv_deplibs_check_method=pass_all 32572fd96bc7Smrg ;; 32582fd96bc7Smrg 32592fd96bc7Smrgfreebsd* | dragonfly*) 32602fd96bc7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 32612fd96bc7Smrg case $host_cpu in 32622fd96bc7Smrg i*86 ) 32632fd96bc7Smrg # Not sure whether the presence of OpenBSD here was a mistake. 32642fd96bc7Smrg # Let's accept both of them until this is cleared up. 32652fd96bc7Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 32662fd96bc7Smrg lt_cv_file_magic_cmd=/usr/bin/file 32672fd96bc7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 32682fd96bc7Smrg ;; 32692fd96bc7Smrg esac 32702fd96bc7Smrg else 32712fd96bc7Smrg lt_cv_deplibs_check_method=pass_all 32722fd96bc7Smrg fi 32736fae4e5dSmrg ;; 32741f0ac6a5Smrg 32756fae4e5dSmrghaiku*) 32762fd96bc7Smrg lt_cv_deplibs_check_method=pass_all 32776fae4e5dSmrg ;; 32781f0ac6a5Smrg 32792fd96bc7Smrghpux10.20* | hpux11*) 32802fd96bc7Smrg lt_cv_file_magic_cmd=/usr/bin/file 32816fae4e5dSmrg case $host_cpu in 32826fae4e5dSmrg ia64*) 32832fd96bc7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 32842fd96bc7Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 32856fae4e5dSmrg ;; 32866fae4e5dSmrg hppa*64*) 32872fd96bc7Smrg [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]'] 32882fd96bc7Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 32896fae4e5dSmrg ;; 32906fae4e5dSmrg *) 32912fd96bc7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 32922fd96bc7Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 32931f0ac6a5Smrg ;; 32941f0ac6a5Smrg esac 32956fae4e5dSmrg ;; 32961f0ac6a5Smrg 32976fae4e5dSmrginterix[[3-9]]*) 32982fd96bc7Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 32992fd96bc7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 33006fae4e5dSmrg ;; 33011f0ac6a5Smrg 33026fae4e5dSmrgirix5* | irix6* | nonstopux*) 33032fd96bc7Smrg case $LD in 33042fd96bc7Smrg *-32|*"-32 ") libmagic=32-bit;; 33052fd96bc7Smrg *-n32|*"-n32 ") libmagic=N32;; 33062fd96bc7Smrg *-64|*"-64 ") libmagic=64-bit;; 33072fd96bc7Smrg *) libmagic=never-match;; 33086fae4e5dSmrg esac 33092fd96bc7Smrg lt_cv_deplibs_check_method=pass_all 33106fae4e5dSmrg ;; 33111f0ac6a5Smrg 331289c04b6cSmrg# This must be glibc/ELF. 33132fd96bc7Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 33142fd96bc7Smrg lt_cv_deplibs_check_method=pass_all 33156fae4e5dSmrg ;; 33161f0ac6a5Smrg 33172fd96bc7Smrgnetbsd* | netbsdelf*-gnu) 33182fd96bc7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 33192fd96bc7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 33206fae4e5dSmrg else 33212fd96bc7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 33226fae4e5dSmrg fi 33236fae4e5dSmrg ;; 33241f0ac6a5Smrg 33252fd96bc7Smrgnewos6*) 33262fd96bc7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 33272fd96bc7Smrg lt_cv_file_magic_cmd=/usr/bin/file 33282fd96bc7Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 33296fae4e5dSmrg ;; 33301f0ac6a5Smrg 33316fae4e5dSmrg*nto* | *qnx*) 33322fd96bc7Smrg lt_cv_deplibs_check_method=pass_all 33336fae4e5dSmrg ;; 33341f0ac6a5Smrg 33356fae4e5dSmrgopenbsd*) 33366fae4e5dSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 33372fd96bc7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 33381f0ac6a5Smrg else 33392fd96bc7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 33401f0ac6a5Smrg fi 33416fae4e5dSmrg ;; 33421f0ac6a5Smrg 33436fae4e5dSmrgosf3* | osf4* | osf5*) 33442fd96bc7Smrg lt_cv_deplibs_check_method=pass_all 33456fae4e5dSmrg ;; 33461f0ac6a5Smrg 33476fae4e5dSmrgrdos*) 33482fd96bc7Smrg lt_cv_deplibs_check_method=pass_all 33496fae4e5dSmrg ;; 33501f0ac6a5Smrg 33516fae4e5dSmrgsolaris*) 33522fd96bc7Smrg lt_cv_deplibs_check_method=pass_all 33536fae4e5dSmrg ;; 33541f0ac6a5Smrg 33552fd96bc7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 33562fd96bc7Smrg lt_cv_deplibs_check_method=pass_all 33576fae4e5dSmrg ;; 33581f0ac6a5Smrg 33596fae4e5dSmrgsysv4 | sysv4.3*) 33606fae4e5dSmrg case $host_vendor in 33612fd96bc7Smrg motorola) 33622fd96bc7Smrg 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]]' 33632fd96bc7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 33642fd96bc7Smrg ;; 33652fd96bc7Smrg ncr) 33662fd96bc7Smrg lt_cv_deplibs_check_method=pass_all 33672fd96bc7Smrg ;; 33682fd96bc7Smrg sequent) 33692fd96bc7Smrg lt_cv_file_magic_cmd='/bin/file' 33702fd96bc7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 33712fd96bc7Smrg ;; 33722fd96bc7Smrg sni) 33732fd96bc7Smrg lt_cv_file_magic_cmd='/bin/file' 33742fd96bc7Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 33752fd96bc7Smrg lt_cv_file_magic_test_file=/lib/libc.so 33762fd96bc7Smrg ;; 33772fd96bc7Smrg siemens) 33782fd96bc7Smrg lt_cv_deplibs_check_method=pass_all 33792fd96bc7Smrg ;; 33802fd96bc7Smrg pc) 33812fd96bc7Smrg lt_cv_deplibs_check_method=pass_all 33822fd96bc7Smrg ;; 33836fae4e5dSmrg esac 33841f0ac6a5Smrg ;; 33851f0ac6a5Smrg 33862fd96bc7Smrgtpf*) 33872fd96bc7Smrg lt_cv_deplibs_check_method=pass_all 33886fae4e5dSmrg ;; 33892fd96bc7Smrgesac 33902fd96bc7Smrg]) 33916fae4e5dSmrg 33922fd96bc7Smrgfile_magic_glob= 33932fd96bc7Smrgwant_nocaseglob=no 33942fd96bc7Smrgif test "$build" = "$host"; then 33952fd96bc7Smrg case $host_os in 33962fd96bc7Smrg mingw* | pw32*) 33972fd96bc7Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 33982fd96bc7Smrg want_nocaseglob=yes 33992fd96bc7Smrg else 34002fd96bc7Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 34012fd96bc7Smrg fi 34022fd96bc7Smrg ;; 34032fd96bc7Smrg esac 34046fae4e5dSmrgfi 34051f0ac6a5Smrg 34062fd96bc7Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 34072fd96bc7Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 34082fd96bc7Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 34096fae4e5dSmrg 34102fd96bc7Smrg_LT_DECL([], [deplibs_check_method], [1], 34112fd96bc7Smrg [Method to check whether dependent libraries are shared objects]) 34122fd96bc7Smrg_LT_DECL([], [file_magic_cmd], [1], 34132fd96bc7Smrg [Command to use when deplibs_check_method = "file_magic"]) 34142fd96bc7Smrg_LT_DECL([], [file_magic_glob], [1], 34152fd96bc7Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 34162fd96bc7Smrg_LT_DECL([], [want_nocaseglob], [1], 34172fd96bc7Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 34182fd96bc7Smrg])# _LT_CHECK_MAGIC_METHOD 34191f0ac6a5Smrg 34206fae4e5dSmrg 34212fd96bc7Smrg# LT_PATH_NM 34222fd96bc7Smrg# ---------- 34232fd96bc7Smrg# find the pathname to a BSD- or MS-compatible name lister 34242fd96bc7SmrgAC_DEFUN([LT_PATH_NM], 34252fd96bc7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 34262fd96bc7SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 34272fd96bc7Smrg[if test -n "$NM"; then 34282fd96bc7Smrg # Let the user override the test. 34292fd96bc7Smrg lt_cv_path_NM="$NM" 34302fd96bc7Smrgelse 34312fd96bc7Smrg lt_nm_to_check="${ac_tool_prefix}nm" 34322fd96bc7Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 34332fd96bc7Smrg lt_nm_to_check="$lt_nm_to_check nm" 34342fd96bc7Smrg fi 34352fd96bc7Smrg for lt_tmp_nm in $lt_nm_to_check; do 34362fd96bc7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 34372fd96bc7Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 34382fd96bc7Smrg IFS="$lt_save_ifs" 34392fd96bc7Smrg test -z "$ac_dir" && ac_dir=. 34402fd96bc7Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 34412fd96bc7Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 34422fd96bc7Smrg # Check to see if the nm accepts a BSD-compat flag. 34432fd96bc7Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 34442fd96bc7Smrg # nm: unknown option "B" ignored 34452fd96bc7Smrg # Tru64's nm complains that /dev/null is an invalid object file 34462fd96bc7Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 34472fd96bc7Smrg */dev/null* | *'Invalid file or object type'*) 34482fd96bc7Smrg lt_cv_path_NM="$tmp_nm -B" 34492fd96bc7Smrg break 34502fd96bc7Smrg ;; 34512fd96bc7Smrg *) 34522fd96bc7Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 34532fd96bc7Smrg */dev/null*) 34542fd96bc7Smrg lt_cv_path_NM="$tmp_nm -p" 34552fd96bc7Smrg break 34562fd96bc7Smrg ;; 34572fd96bc7Smrg *) 34582fd96bc7Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 34592fd96bc7Smrg continue # so that we can try to find one that supports BSD flags 34602fd96bc7Smrg ;; 34612fd96bc7Smrg esac 34622fd96bc7Smrg ;; 34636fae4e5dSmrg esac 34646fae4e5dSmrg fi 34652fd96bc7Smrg done 34662fd96bc7Smrg IFS="$lt_save_ifs" 34676fae4e5dSmrg done 34682fd96bc7Smrg : ${lt_cv_path_NM=no} 34692fd96bc7Smrgfi]) 34702fd96bc7Smrgif test "$lt_cv_path_NM" != "no"; then 34712fd96bc7Smrg NM="$lt_cv_path_NM" 34726fae4e5dSmrgelse 34732fd96bc7Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 34742fd96bc7Smrg if test -n "$DUMPBIN"; then : 34752fd96bc7Smrg # Let the user override the test. 34761f0ac6a5Smrg else 34772fd96bc7Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 34782fd96bc7Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 34792fd96bc7Smrg *COFF*) 34802fd96bc7Smrg DUMPBIN="$DUMPBIN -symbols" 34812fd96bc7Smrg ;; 34822fd96bc7Smrg *) 34832fd96bc7Smrg DUMPBIN=: 34842fd96bc7Smrg ;; 34852fd96bc7Smrg esac 34862fd96bc7Smrg fi 34872fd96bc7Smrg AC_SUBST([DUMPBIN]) 34882fd96bc7Smrg if test "$DUMPBIN" != ":"; then 34892fd96bc7Smrg NM="$DUMPBIN" 34901f0ac6a5Smrg fi 34916fae4e5dSmrgfi 34922fd96bc7Smrgtest -z "$NM" && NM=nm 34932fd96bc7SmrgAC_SUBST([NM]) 34942fd96bc7Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 34951f0ac6a5Smrg 34962fd96bc7SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 34972fd96bc7Smrg [lt_cv_nm_interface="BSD nm" 34982fd96bc7Smrg echo "int some_variable = 0;" > conftest.$ac_ext 34992fd96bc7Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 35002fd96bc7Smrg (eval "$ac_compile" 2>conftest.err) 35012fd96bc7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 35022fd96bc7Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 35032fd96bc7Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 35042fd96bc7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 35052fd96bc7Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 35062fd96bc7Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 35072fd96bc7Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 35082fd96bc7Smrg lt_cv_nm_interface="MS dumpbin" 35092fd96bc7Smrg fi 35102fd96bc7Smrg rm -f conftest*]) 35112fd96bc7Smrg])# LT_PATH_NM 35121f0ac6a5Smrg 35132fd96bc7Smrg# Old names: 35142fd96bc7SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 35152fd96bc7SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 35162fd96bc7Smrgdnl aclocal-1.4 backwards compatibility: 35172fd96bc7Smrgdnl AC_DEFUN([AM_PROG_NM], []) 35182fd96bc7Smrgdnl AC_DEFUN([AC_PROG_NM], []) 35191f0ac6a5Smrg 35202fd96bc7Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 35212fd96bc7Smrg# -------------------------------- 35222fd96bc7Smrg# how to determine the name of the shared library 35232fd96bc7Smrg# associated with a specific link library. 35242fd96bc7Smrg# -- PORTME fill in with the dynamic library characteristics 35252fd96bc7Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 35262fd96bc7Smrg[m4_require([_LT_DECL_EGREP]) 35272fd96bc7Smrgm4_require([_LT_DECL_OBJDUMP]) 35282fd96bc7Smrgm4_require([_LT_DECL_DLLTOOL]) 35292fd96bc7SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 35302fd96bc7Smrglt_cv_sharedlib_from_linklib_cmd, 35312fd96bc7Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 35321f0ac6a5Smrg 35332fd96bc7Smrgcase $host_os in 35342fd96bc7Smrgcygwin* | mingw* | pw32* | cegcc*) 35352fd96bc7Smrg # two different shell functions defined in ltmain.sh 35362fd96bc7Smrg # decide which to use based on capabilities of $DLLTOOL 35372fd96bc7Smrg case `$DLLTOOL --help 2>&1` in 35382fd96bc7Smrg *--identify-strict*) 35392fd96bc7Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 35401f0ac6a5Smrg ;; 35411f0ac6a5Smrg *) 35422fd96bc7Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 35431f0ac6a5Smrg ;; 35441f0ac6a5Smrg esac 35451f0ac6a5Smrg ;; 35466fae4e5dSmrg*) 35472fd96bc7Smrg # fallback: assume linklib IS sharedlib 35482fd96bc7Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 35491f0ac6a5Smrg ;; 35506fae4e5dSmrgesac 35512fd96bc7Smrg]) 35522fd96bc7Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 35532fd96bc7Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 35542fd96bc7Smrg 35552fd96bc7Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 35562fd96bc7Smrg [Command to associate shared and link libraries]) 35572fd96bc7Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 35586fae4e5dSmrg 35596fae4e5dSmrg 35602fd96bc7Smrg# _LT_PATH_MANIFEST_TOOL 35616fae4e5dSmrg# ---------------------- 35622fd96bc7Smrg# locate the manifest tool 35632fd96bc7Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 35642fd96bc7Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 35652fd96bc7Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 35662fd96bc7SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 35672fd96bc7Smrg [lt_cv_path_mainfest_tool=no 35682fd96bc7Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 35692fd96bc7Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 35702fd96bc7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 35712fd96bc7Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 35722fd96bc7Smrg lt_cv_path_mainfest_tool=yes 35732fd96bc7Smrg fi 35742fd96bc7Smrg rm -f conftest*]) 35752fd96bc7Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 35762fd96bc7Smrg MANIFEST_TOOL=: 35772fd96bc7Smrgfi 35782fd96bc7Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 35792fd96bc7Smrg])# _LT_PATH_MANIFEST_TOOL 35806fae4e5dSmrg 35816fae4e5dSmrg 35822fd96bc7Smrg# LT_LIB_M 35832fd96bc7Smrg# -------- 35842fd96bc7Smrg# check for math library 35852fd96bc7SmrgAC_DEFUN([LT_LIB_M], 35862fd96bc7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 35872fd96bc7SmrgLIBM= 35882fd96bc7Smrgcase $host in 35892fd96bc7Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 35902fd96bc7Smrg # These system don't have libm, or don't need it 35916fae4e5dSmrg ;; 35922fd96bc7Smrg*-ncr-sysv4.3*) 35932fd96bc7Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 35942fd96bc7Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 35956fae4e5dSmrg ;; 35962fd96bc7Smrg*) 35972fd96bc7Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 35986fae4e5dSmrg ;; 35992fd96bc7Smrgesac 36002fd96bc7SmrgAC_SUBST([LIBM]) 36012fd96bc7Smrg])# LT_LIB_M 36026fae4e5dSmrg 36032fd96bc7Smrg# Old name: 36042fd96bc7SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 36052fd96bc7Smrgdnl aclocal-1.4 backwards compatibility: 36062fd96bc7Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 36071f0ac6a5Smrg 3608e5410a46Smrg 36092fd96bc7Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 36102fd96bc7Smrg# ------------------------------- 36112fd96bc7Smrgm4_defun([_LT_COMPILER_NO_RTTI], 36122fd96bc7Smrg[m4_require([_LT_TAG_COMPILER])dnl 36131f0ac6a5Smrg 36142fd96bc7Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 36151f0ac6a5Smrg 36162fd96bc7Smrgif test "$GCC" = yes; then 36172fd96bc7Smrg case $cc_basename in 36182fd96bc7Smrg nvcc*) 36192fd96bc7Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 36206fae4e5dSmrg *) 36212fd96bc7Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 36221f0ac6a5Smrg esac 36231f0ac6a5Smrg 36242fd96bc7Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 36252fd96bc7Smrg lt_cv_prog_compiler_rtti_exceptions, 36262fd96bc7Smrg [-fno-rtti -fno-exceptions], [], 36272fd96bc7Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 36282fd96bc7Smrgfi 36292fd96bc7Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 36302fd96bc7Smrg [Compiler flag to turn off builtin functions]) 36312fd96bc7Smrg])# _LT_COMPILER_NO_RTTI 36321f0ac6a5Smrg 36336fae4e5dSmrg 36342fd96bc7Smrg# _LT_CMD_GLOBAL_SYMBOLS 36352fd96bc7Smrg# ---------------------- 36362fd96bc7Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 36372fd96bc7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 36382fd96bc7SmrgAC_REQUIRE([AC_PROG_CC])dnl 36392fd96bc7SmrgAC_REQUIRE([AC_PROG_AWK])dnl 36402fd96bc7SmrgAC_REQUIRE([LT_PATH_NM])dnl 36412fd96bc7SmrgAC_REQUIRE([LT_PATH_LD])dnl 36422fd96bc7Smrgm4_require([_LT_DECL_SED])dnl 36432fd96bc7Smrgm4_require([_LT_DECL_EGREP])dnl 36442fd96bc7Smrgm4_require([_LT_TAG_COMPILER])dnl 36456fae4e5dSmrg 36462fd96bc7Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 36472fd96bc7SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 36482fd96bc7SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 36492fd96bc7Smrg[ 36502fd96bc7Smrg# These are sane defaults that work on at least a few old systems. 36512fd96bc7Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 36521f0ac6a5Smrg 36532fd96bc7Smrg# Character class describing NM global symbol codes. 36542fd96bc7Smrgsymcode='[[BCDEGRST]]' 36559c9ff80cSmrg 36562fd96bc7Smrg# Regexp to match symbols that can be accessed directly from C. 36572fd96bc7Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 36581f0ac6a5Smrg 36592fd96bc7Smrg# Define system-specific variables. 36602fd96bc7Smrgcase $host_os in 36612fd96bc7Smrgaix*) 36622fd96bc7Smrg symcode='[[BCDT]]' 36632fd96bc7Smrg ;; 36642fd96bc7Smrgcygwin* | mingw* | pw32* | cegcc*) 36652fd96bc7Smrg symcode='[[ABCDGISTW]]' 36662fd96bc7Smrg ;; 36672fd96bc7Smrghpux*) 36682fd96bc7Smrg if test "$host_cpu" = ia64; then 36692fd96bc7Smrg symcode='[[ABCDEGRST]]' 36706fae4e5dSmrg fi 36711f0ac6a5Smrg ;; 36722fd96bc7Smrgirix* | nonstopux*) 36732fd96bc7Smrg symcode='[[BCDEGRST]]' 36746fae4e5dSmrg ;; 36752fd96bc7Smrgosf*) 36762fd96bc7Smrg symcode='[[BCDEGQRST]]' 36776fae4e5dSmrg ;; 36786fae4e5dSmrgsolaris*) 36792fd96bc7Smrg symcode='[[BDRT]]' 36806fae4e5dSmrg ;; 36812fd96bc7Smrgsco3.2v5*) 36822fd96bc7Smrg symcode='[[DT]]' 36836fae4e5dSmrg ;; 36842fd96bc7Smrgsysv4.2uw2*) 36852fd96bc7Smrg symcode='[[DT]]' 36869c9ff80cSmrg ;; 36872fd96bc7Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 36882fd96bc7Smrg symcode='[[ABDT]]' 36892fd96bc7Smrg ;; 36902fd96bc7Smrgsysv4) 36912fd96bc7Smrg symcode='[[DFNSTU]]' 36926fae4e5dSmrg ;; 36936fae4e5dSmrgesac 36941f0ac6a5Smrg 36952fd96bc7Smrg# If we're using GNU nm, then use its standard symbol codes. 36962fd96bc7Smrgcase `$NM -V 2>&1` in 36972fd96bc7Smrg*GNU* | *'with BFD'*) 36982fd96bc7Smrg symcode='[[ABCDGIRSTW]]' ;; 36992fd96bc7Smrgesac 37001f0ac6a5Smrg 37012fd96bc7Smrg# Transform an extracted symbol line into a proper C declaration. 37022fd96bc7Smrg# Some systems (esp. on ia64) link data and code symbols differently, 37032fd96bc7Smrg# so use this general approach. 37042fd96bc7Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 37051f0ac6a5Smrg 37062fd96bc7Smrg# Transform an extracted symbol line into symbol name and symbol address 37072fd96bc7Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 37082fd96bc7Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" 37099c9ff80cSmrg 37102fd96bc7Smrg# Handle CRLF in mingw tool chain 37112fd96bc7Smrgopt_cr= 37122fd96bc7Smrgcase $build_os in 37132fd96bc7Smrgmingw*) 37142fd96bc7Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 37152fd96bc7Smrg ;; 37162fd96bc7Smrgesac 37176fae4e5dSmrg 37182fd96bc7Smrg# Try without a prefix underscore, then with it. 37192fd96bc7Smrgfor ac_symprfx in "" "_"; do 37209c9ff80cSmrg 37212fd96bc7Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 37222fd96bc7Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 37236fae4e5dSmrg 37242fd96bc7Smrg # Write the raw and C identifiers. 37252fd96bc7Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 37262fd96bc7Smrg # Fake it for dumpbin and say T for any non-static function 37272fd96bc7Smrg # and D for any global variable. 37282fd96bc7Smrg # Also find C++ and __fastcall symbols from MSVC++, 37292fd96bc7Smrg # which start with @ or ?. 37302fd96bc7Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 37312fd96bc7Smrg" {last_section=section; section=\$ 3};"\ 37322fd96bc7Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 37332fd96bc7Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 37342fd96bc7Smrg" \$ 0!~/External *\|/{next};"\ 37352fd96bc7Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 37362fd96bc7Smrg" {if(hide[section]) next};"\ 37372fd96bc7Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 37382fd96bc7Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 37392fd96bc7Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 37402fd96bc7Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 37412fd96bc7Smrg" ' prfx=^$ac_symprfx]" 37422fd96bc7Smrg else 37432fd96bc7Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 37442fd96bc7Smrg fi 37452fd96bc7Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 37461f0ac6a5Smrg 37472fd96bc7Smrg # Check to see that the pipe works correctly. 37482fd96bc7Smrg pipe_works=no 37491f0ac6a5Smrg 37502fd96bc7Smrg rm -f conftest* 37512fd96bc7Smrg cat > conftest.$ac_ext <<_LT_EOF 37522fd96bc7Smrg#ifdef __cplusplus 37532fd96bc7Smrgextern "C" { 37542fd96bc7Smrg#endif 37552fd96bc7Smrgchar nm_test_var; 37562fd96bc7Smrgvoid nm_test_func(void); 37572fd96bc7Smrgvoid nm_test_func(void){} 37582fd96bc7Smrg#ifdef __cplusplus 37592fd96bc7Smrg} 37602fd96bc7Smrg#endif 37612fd96bc7Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 37622fd96bc7Smrg_LT_EOF 37631f0ac6a5Smrg 37642fd96bc7Smrg if AC_TRY_EVAL(ac_compile); then 37652fd96bc7Smrg # Now try to grab the symbols. 37662fd96bc7Smrg nlist=conftest.nm 37672fd96bc7Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 37682fd96bc7Smrg # Try sorting and uniquifying the output. 37692fd96bc7Smrg if sort "$nlist" | uniq > "$nlist"T; then 37702fd96bc7Smrg mv -f "$nlist"T "$nlist" 37712fd96bc7Smrg else 37722fd96bc7Smrg rm -f "$nlist"T 37732fd96bc7Smrg fi 37741f0ac6a5Smrg 37752fd96bc7Smrg # Make sure that we snagged all the symbols we need. 37762fd96bc7Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 37772fd96bc7Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 37782fd96bc7Smrg cat <<_LT_EOF > conftest.$ac_ext 37792fd96bc7Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 37802fd96bc7Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 37812fd96bc7Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 37822fd96bc7Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 37832fd96bc7Smrg# define LT@&t@_DLSYM_CONST 37842fd96bc7Smrg#elif defined(__osf__) 37852fd96bc7Smrg/* This system does not cope well with relocations in const data. */ 37862fd96bc7Smrg# define LT@&t@_DLSYM_CONST 37872fd96bc7Smrg#else 37882fd96bc7Smrg# define LT@&t@_DLSYM_CONST const 37892fd96bc7Smrg#endif 37901f0ac6a5Smrg 37912fd96bc7Smrg#ifdef __cplusplus 37922fd96bc7Smrgextern "C" { 37932fd96bc7Smrg#endif 37941f0ac6a5Smrg 37952fd96bc7Smrg_LT_EOF 37962fd96bc7Smrg # Now generate the symbol file. 37972fd96bc7Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 37989c9ff80cSmrg 37992fd96bc7Smrg cat <<_LT_EOF >> conftest.$ac_ext 38001f0ac6a5Smrg 38012fd96bc7Smrg/* The mapping between symbol names and symbols. */ 38022fd96bc7SmrgLT@&t@_DLSYM_CONST struct { 38032fd96bc7Smrg const char *name; 38042fd96bc7Smrg void *address; 38052fd96bc7Smrg} 38062fd96bc7Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 38072fd96bc7Smrg{ 38082fd96bc7Smrg { "@PROGRAM@", (void *) 0 }, 38092fd96bc7Smrg_LT_EOF 38102fd96bc7Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 38112fd96bc7Smrg cat <<\_LT_EOF >> conftest.$ac_ext 38122fd96bc7Smrg {0, (void *) 0} 38132fd96bc7Smrg}; 38141f0ac6a5Smrg 38152fd96bc7Smrg/* This works around a problem in FreeBSD linker */ 38162fd96bc7Smrg#ifdef FREEBSD_WORKAROUND 38172fd96bc7Smrgstatic const void *lt_preloaded_setup() { 38182fd96bc7Smrg return lt__PROGRAM__LTX_preloaded_symbols; 38192fd96bc7Smrg} 38202fd96bc7Smrg#endif 38211f0ac6a5Smrg 38229c9ff80cSmrg#ifdef __cplusplus 38239c9ff80cSmrg} 38249c9ff80cSmrg#endif 38259c9ff80cSmrg_LT_EOF 38269c9ff80cSmrg # Now try linking the two files. 38279c9ff80cSmrg mv conftest.$ac_objext conftstm.$ac_objext 38286fae4e5dSmrg lt_globsym_save_LIBS=$LIBS 38296fae4e5dSmrg lt_globsym_save_CFLAGS=$CFLAGS 38309c9ff80cSmrg LIBS="conftstm.$ac_objext" 38319c9ff80cSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 38329c9ff80cSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 38339c9ff80cSmrg pipe_works=yes 38349c9ff80cSmrg fi 38356fae4e5dSmrg LIBS=$lt_globsym_save_LIBS 38366fae4e5dSmrg CFLAGS=$lt_globsym_save_CFLAGS 38379c9ff80cSmrg else 38389c9ff80cSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 38399c9ff80cSmrg fi 38409c9ff80cSmrg else 38419c9ff80cSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 38429c9ff80cSmrg fi 38431f0ac6a5Smrg else 38449c9ff80cSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 38451f0ac6a5Smrg fi 38461f0ac6a5Smrg else 38479c9ff80cSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 38489c9ff80cSmrg cat conftest.$ac_ext >&5 38491f0ac6a5Smrg fi 38509c9ff80cSmrg rm -rf conftest* conftst* 38511f0ac6a5Smrg 38529c9ff80cSmrg # Do not use the global_symbol_pipe unless it works. 38539c9ff80cSmrg if test "$pipe_works" = yes; then 38549c9ff80cSmrg break 38559c9ff80cSmrg else 38569c9ff80cSmrg lt_cv_sys_global_symbol_pipe= 38579c9ff80cSmrg fi 38586fae4e5dSmrgdone 38596fae4e5dSmrg]) 38606fae4e5dSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 38616fae4e5dSmrg lt_cv_sys_global_symbol_to_cdecl= 38626fae4e5dSmrgfi 38636fae4e5dSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 38646fae4e5dSmrg AC_MSG_RESULT(failed) 38656fae4e5dSmrgelse 38666fae4e5dSmrg AC_MSG_RESULT(ok) 38676fae4e5dSmrgfi 38686fae4e5dSmrg 38696fae4e5dSmrg# Response file support. 38706fae4e5dSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 38716fae4e5dSmrg nm_file_list_spec='@' 38726fae4e5dSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 38736fae4e5dSmrg nm_file_list_spec='@' 38746fae4e5dSmrgfi 38756fae4e5dSmrg 38766fae4e5dSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 38776fae4e5dSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 38786fae4e5dSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 38796fae4e5dSmrg [Transform the output of nm in a proper C declaration]) 38806fae4e5dSmrg_LT_DECL([global_symbol_to_c_name_address], 38816fae4e5dSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 38826fae4e5dSmrg [Transform the output of nm in a C name address pair]) 38836fae4e5dSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 38846fae4e5dSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 38856fae4e5dSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 38866fae4e5dSmrg_LT_DECL([], [nm_file_list_spec], [1], 38876fae4e5dSmrg [Specify filename containing input files for $NM]) 38886fae4e5dSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 38896fae4e5dSmrg 38906fae4e5dSmrg 38916fae4e5dSmrg# _LT_COMPILER_PIC([TAGNAME]) 38926fae4e5dSmrg# --------------------------- 38936fae4e5dSmrgm4_defun([_LT_COMPILER_PIC], 38946fae4e5dSmrg[m4_require([_LT_TAG_COMPILER])dnl 38956fae4e5dSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 38966fae4e5dSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 38976fae4e5dSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 38986fae4e5dSmrg 38996fae4e5dSmrgm4_if([$1], [CXX], [ 39006fae4e5dSmrg # C++ specific cases for pic, static, wl, etc. 39016fae4e5dSmrg if test "$GXX" = yes; then 39026fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 39036fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 39046fae4e5dSmrg 39056fae4e5dSmrg case $host_os in 39066fae4e5dSmrg aix*) 39076fae4e5dSmrg # All AIX code is PIC. 39086fae4e5dSmrg if test "$host_cpu" = ia64; then 39096fae4e5dSmrg # AIX 5 now supports IA64 processor 39106fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39116fae4e5dSmrg fi 39126fae4e5dSmrg ;; 39136fae4e5dSmrg 39146fae4e5dSmrg amigaos*) 39156fae4e5dSmrg case $host_cpu in 39166fae4e5dSmrg powerpc) 39176fae4e5dSmrg # see comment about AmigaOS4 .so support 39186fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39196fae4e5dSmrg ;; 39206fae4e5dSmrg m68k) 39216fae4e5dSmrg # FIXME: we need at least 68020 code to build shared libraries, but 39226fae4e5dSmrg # adding the `-m68020' flag to GCC prevents building anything better, 39236fae4e5dSmrg # like `-m68040'. 39246fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 39256fae4e5dSmrg ;; 39266fae4e5dSmrg esac 39276fae4e5dSmrg ;; 39286fae4e5dSmrg 39296fae4e5dSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 39306fae4e5dSmrg # PIC is the default for these OSes. 39316fae4e5dSmrg ;; 39326fae4e5dSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 39336fae4e5dSmrg # This hack is so that the source file can tell whether it is being 39346fae4e5dSmrg # built for inclusion in a dll (and should export symbols for example). 39356fae4e5dSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 39366fae4e5dSmrg # (--disable-auto-import) libraries 39376fae4e5dSmrg m4_if([$1], [GCJ], [], 39386fae4e5dSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 39396fae4e5dSmrg ;; 39406fae4e5dSmrg darwin* | rhapsody*) 39416fae4e5dSmrg # PIC is the default on this platform 39426fae4e5dSmrg # Common symbols not allowed in MH_DYLIB files 39436fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 39446fae4e5dSmrg ;; 39456fae4e5dSmrg *djgpp*) 39466fae4e5dSmrg # DJGPP does not support shared libraries at all 39476fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 39486fae4e5dSmrg ;; 39496fae4e5dSmrg haiku*) 39506fae4e5dSmrg # PIC is the default for Haiku. 39516fae4e5dSmrg # The "-static" flag exists, but is broken. 39526fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 39536fae4e5dSmrg ;; 39546fae4e5dSmrg interix[[3-9]]*) 39556fae4e5dSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 39566fae4e5dSmrg # Instead, we relocate shared libraries at runtime. 39576fae4e5dSmrg ;; 39586fae4e5dSmrg sysv4*MP*) 39596fae4e5dSmrg if test -d /usr/nec; then 39606fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 39616fae4e5dSmrg fi 39626fae4e5dSmrg ;; 39636fae4e5dSmrg hpux*) 39646fae4e5dSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 39656fae4e5dSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 39666fae4e5dSmrg # sets the default TLS model and affects inlining. 39676fae4e5dSmrg case $host_cpu in 39686fae4e5dSmrg hppa*64*) 39696fae4e5dSmrg ;; 39706fae4e5dSmrg *) 39716fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39726fae4e5dSmrg ;; 39736fae4e5dSmrg esac 39746fae4e5dSmrg ;; 39756fae4e5dSmrg *qnx* | *nto*) 39766fae4e5dSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 39776fae4e5dSmrg # it will coredump. 39786fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 39796fae4e5dSmrg ;; 39806fae4e5dSmrg *) 39816fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39826fae4e5dSmrg ;; 39836fae4e5dSmrg esac 39846fae4e5dSmrg else 39856fae4e5dSmrg case $host_os in 39866fae4e5dSmrg aix[[4-9]]*) 39876fae4e5dSmrg # All AIX code is PIC. 39886fae4e5dSmrg if test "$host_cpu" = ia64; then 39896fae4e5dSmrg # AIX 5 now supports IA64 processor 39906fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39916fae4e5dSmrg else 39926fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 39936fae4e5dSmrg fi 39946fae4e5dSmrg ;; 39956fae4e5dSmrg chorus*) 39966fae4e5dSmrg case $cc_basename in 39976fae4e5dSmrg cxch68*) 39986fae4e5dSmrg # Green Hills C++ Compiler 39996fae4e5dSmrg # _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" 40006fae4e5dSmrg ;; 40016fae4e5dSmrg esac 40026fae4e5dSmrg ;; 40036fae4e5dSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 40046fae4e5dSmrg # This hack is so that the source file can tell whether it is being 40056fae4e5dSmrg # built for inclusion in a dll (and should export symbols for example). 40066fae4e5dSmrg m4_if([$1], [GCJ], [], 40076fae4e5dSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 40086fae4e5dSmrg ;; 40096fae4e5dSmrg dgux*) 40106fae4e5dSmrg case $cc_basename in 40116fae4e5dSmrg ec++*) 40126fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40136fae4e5dSmrg ;; 40146fae4e5dSmrg ghcx*) 40156fae4e5dSmrg # Green Hills C++ Compiler 40166fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 40176fae4e5dSmrg ;; 40186fae4e5dSmrg *) 40196fae4e5dSmrg ;; 40206fae4e5dSmrg esac 40216fae4e5dSmrg ;; 40226fae4e5dSmrg freebsd* | dragonfly*) 40236fae4e5dSmrg # FreeBSD uses GNU C++ 40246fae4e5dSmrg ;; 40256fae4e5dSmrg hpux9* | hpux10* | hpux11*) 40266fae4e5dSmrg case $cc_basename in 40276fae4e5dSmrg CC*) 40286fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40296fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40306fae4e5dSmrg if test "$host_cpu" != ia64; then 40316fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 40326fae4e5dSmrg fi 40336fae4e5dSmrg ;; 40346fae4e5dSmrg aCC*) 40356fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40366fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40376fae4e5dSmrg case $host_cpu in 40386fae4e5dSmrg hppa*64*|ia64*) 40396fae4e5dSmrg # +Z the default 40406fae4e5dSmrg ;; 40416fae4e5dSmrg *) 40426fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 40436fae4e5dSmrg ;; 40446fae4e5dSmrg esac 40456fae4e5dSmrg ;; 40466fae4e5dSmrg *) 40476fae4e5dSmrg ;; 40486fae4e5dSmrg esac 40496fae4e5dSmrg ;; 40506fae4e5dSmrg interix*) 40516fae4e5dSmrg # This is c89, which is MS Visual C++ (no shared libs) 40526fae4e5dSmrg # Anyone wants to do a port? 40536fae4e5dSmrg ;; 40546fae4e5dSmrg irix5* | irix6* | nonstopux*) 40556fae4e5dSmrg case $cc_basename in 40566fae4e5dSmrg CC*) 40576fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40586fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40596fae4e5dSmrg # CC pic flag -KPIC is the default. 40606fae4e5dSmrg ;; 40616fae4e5dSmrg *) 40626fae4e5dSmrg ;; 40636fae4e5dSmrg esac 40646fae4e5dSmrg ;; 40652fd96bc7Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 40666fae4e5dSmrg case $cc_basename in 40676fae4e5dSmrg KCC*) 40686fae4e5dSmrg # KAI C++ Compiler 40696fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 40706fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40716fae4e5dSmrg ;; 40726fae4e5dSmrg ecpc* ) 40736fae4e5dSmrg # old Intel C++ for x86_64 which still supported -KPIC. 40746fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40756fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40766fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40776fae4e5dSmrg ;; 40786fae4e5dSmrg icpc* ) 40796fae4e5dSmrg # Intel C++, used to be incompatible with GCC. 40806fae4e5dSmrg # ICC 10 doesn't accept -KPIC any more. 40816fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40826fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40836fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40846fae4e5dSmrg ;; 40856fae4e5dSmrg pgCC* | pgcpp*) 40866fae4e5dSmrg # Portland Group C++ compiler 40876fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40886fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 40896fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40906fae4e5dSmrg ;; 40916fae4e5dSmrg cxx*) 40926fae4e5dSmrg # Compaq C++ 40936fae4e5dSmrg # Make sure the PIC flag is empty. It appears that all Alpha 40946fae4e5dSmrg # Linux and Compaq Tru64 Unix objects are PIC. 40956fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 40966fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40976fae4e5dSmrg ;; 40986fae4e5dSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 40996fae4e5dSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 41006fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41016fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 41026fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 41036fae4e5dSmrg ;; 41046fae4e5dSmrg *) 41056fae4e5dSmrg case `$CC -V 2>&1 | sed 5q` in 41066fae4e5dSmrg *Sun\ C*) 41076fae4e5dSmrg # Sun C++ 5.9 41086fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41096fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41106fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41116fae4e5dSmrg ;; 41126fae4e5dSmrg esac 41136fae4e5dSmrg ;; 41146fae4e5dSmrg esac 41156fae4e5dSmrg ;; 41166fae4e5dSmrg lynxos*) 41176fae4e5dSmrg ;; 41186fae4e5dSmrg m88k*) 41196fae4e5dSmrg ;; 41206fae4e5dSmrg mvs*) 41216fae4e5dSmrg case $cc_basename in 41226fae4e5dSmrg cxx*) 41236fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 41246fae4e5dSmrg ;; 41256fae4e5dSmrg *) 41266fae4e5dSmrg ;; 41276fae4e5dSmrg esac 41286fae4e5dSmrg ;; 41292fd96bc7Smrg netbsd* | netbsdelf*-gnu) 41306fae4e5dSmrg ;; 41316fae4e5dSmrg *qnx* | *nto*) 41326fae4e5dSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 41336fae4e5dSmrg # it will coredump. 41346fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 41356fae4e5dSmrg ;; 41366fae4e5dSmrg osf3* | osf4* | osf5*) 41376fae4e5dSmrg case $cc_basename in 41386fae4e5dSmrg KCC*) 41396fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 41406fae4e5dSmrg ;; 41416fae4e5dSmrg RCC*) 41426fae4e5dSmrg # Rational C++ 2.4.1 41436fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41446fae4e5dSmrg ;; 41456fae4e5dSmrg cxx*) 41466fae4e5dSmrg # Digital/Compaq C++ 41476fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41486fae4e5dSmrg # Make sure the PIC flag is empty. It appears that all Alpha 41496fae4e5dSmrg # Linux and Compaq Tru64 Unix objects are PIC. 41506fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 41516fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 41526fae4e5dSmrg ;; 41536fae4e5dSmrg *) 41546fae4e5dSmrg ;; 41556fae4e5dSmrg esac 41566fae4e5dSmrg ;; 41576fae4e5dSmrg psos*) 41586fae4e5dSmrg ;; 41596fae4e5dSmrg solaris*) 41606fae4e5dSmrg case $cc_basename in 41616fae4e5dSmrg CC* | sunCC*) 41626fae4e5dSmrg # Sun C++ 4.2, 5.x and Centerline C++ 41636fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41646fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41656fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41666fae4e5dSmrg ;; 41676fae4e5dSmrg gcx*) 41686fae4e5dSmrg # Green Hills C++ Compiler 41696fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 41706fae4e5dSmrg ;; 41716fae4e5dSmrg *) 41726fae4e5dSmrg ;; 41736fae4e5dSmrg esac 41746fae4e5dSmrg ;; 41756fae4e5dSmrg sunos4*) 41766fae4e5dSmrg case $cc_basename in 41776fae4e5dSmrg CC*) 41786fae4e5dSmrg # Sun C++ 4.x 41796fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41806fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41816fae4e5dSmrg ;; 41826fae4e5dSmrg lcc*) 41836fae4e5dSmrg # Lucid 41846fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41856fae4e5dSmrg ;; 41866fae4e5dSmrg *) 41876fae4e5dSmrg ;; 41886fae4e5dSmrg esac 41896fae4e5dSmrg ;; 41906fae4e5dSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 41916fae4e5dSmrg case $cc_basename in 41926fae4e5dSmrg CC*) 41936fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41946fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41956fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41966fae4e5dSmrg ;; 41976fae4e5dSmrg esac 41986fae4e5dSmrg ;; 41996fae4e5dSmrg tandem*) 42006fae4e5dSmrg case $cc_basename in 42016fae4e5dSmrg NCC*) 42026fae4e5dSmrg # NonStop-UX NCC 3.20 42036fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 42046fae4e5dSmrg ;; 42056fae4e5dSmrg *) 42066fae4e5dSmrg ;; 42076fae4e5dSmrg esac 42086fae4e5dSmrg ;; 42096fae4e5dSmrg vxworks*) 42106fae4e5dSmrg ;; 42116fae4e5dSmrg *) 42126fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 42136fae4e5dSmrg ;; 42146fae4e5dSmrg esac 42156fae4e5dSmrg fi 42166fae4e5dSmrg], 42176fae4e5dSmrg[ 42186fae4e5dSmrg if test "$GCC" = yes; then 42199c9ff80cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42209c9ff80cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42211f0ac6a5Smrg 42229c9ff80cSmrg case $host_os in 42236fae4e5dSmrg aix*) 42249c9ff80cSmrg # All AIX code is PIC. 42251f0ac6a5Smrg if test "$host_cpu" = ia64; then 42269c9ff80cSmrg # AIX 5 now supports IA64 processor 42279c9ff80cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42281f0ac6a5Smrg fi 42299c9ff80cSmrg ;; 42301f0ac6a5Smrg 42319c9ff80cSmrg amigaos*) 42329c9ff80cSmrg case $host_cpu in 42339c9ff80cSmrg powerpc) 42349c9ff80cSmrg # see comment about AmigaOS4 .so support 42359c9ff80cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42369c9ff80cSmrg ;; 42379c9ff80cSmrg m68k) 42389c9ff80cSmrg # FIXME: we need at least 68020 code to build shared libraries, but 42399c9ff80cSmrg # adding the `-m68020' flag to GCC prevents building anything better, 42409c9ff80cSmrg # like `-m68040'. 42419c9ff80cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42421f0ac6a5Smrg ;; 42439c9ff80cSmrg esac 42449c9ff80cSmrg ;; 42451f0ac6a5Smrg 42469c9ff80cSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42479c9ff80cSmrg # PIC is the default for these OSes. 42489c9ff80cSmrg ;; 42496fae4e5dSmrg 42506fae4e5dSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 42519c9ff80cSmrg # This hack is so that the source file can tell whether it is being 42529c9ff80cSmrg # built for inclusion in a dll (and should export symbols for example). 42539c9ff80cSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42549c9ff80cSmrg # (--disable-auto-import) libraries 42559c9ff80cSmrg m4_if([$1], [GCJ], [], 42569c9ff80cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 42579c9ff80cSmrg ;; 42586fae4e5dSmrg 42599c9ff80cSmrg darwin* | rhapsody*) 42609c9ff80cSmrg # PIC is the default on this platform 42619c9ff80cSmrg # Common symbols not allowed in MH_DYLIB files 42629c9ff80cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42639c9ff80cSmrg ;; 42646fae4e5dSmrg 42656fae4e5dSmrg haiku*) 42666fae4e5dSmrg # PIC is the default for Haiku. 42676fae4e5dSmrg # The "-static" flag exists, but is broken. 42686fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 42696fae4e5dSmrg ;; 42706fae4e5dSmrg 42716fae4e5dSmrg hpux*) 42726fae4e5dSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42736fae4e5dSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42746fae4e5dSmrg # sets the default TLS model and affects inlining. 42756fae4e5dSmrg case $host_cpu in 42766fae4e5dSmrg hppa*64*) 42776fae4e5dSmrg # +Z the default 42786fae4e5dSmrg ;; 42796fae4e5dSmrg *) 42806fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42816fae4e5dSmrg ;; 42826fae4e5dSmrg esac 42836fae4e5dSmrg ;; 42846fae4e5dSmrg 42856fae4e5dSmrg interix[[3-9]]*) 42866fae4e5dSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42876fae4e5dSmrg # Instead, we relocate shared libraries at runtime. 42886fae4e5dSmrg ;; 42896fae4e5dSmrg 42906fae4e5dSmrg msdosdjgpp*) 42916fae4e5dSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 42926fae4e5dSmrg # on systems that don't support them. 42936fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 42946fae4e5dSmrg enable_shared=no 42956fae4e5dSmrg ;; 42966fae4e5dSmrg 42976fae4e5dSmrg *nto* | *qnx*) 42986fae4e5dSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 42996fae4e5dSmrg # it will coredump. 43006fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 43016fae4e5dSmrg ;; 43026fae4e5dSmrg 43036fae4e5dSmrg sysv4*MP*) 43046fae4e5dSmrg if test -d /usr/nec; then 43056fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 43066fae4e5dSmrg fi 43076fae4e5dSmrg ;; 43086fae4e5dSmrg 43096fae4e5dSmrg *) 43106fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43116fae4e5dSmrg ;; 43126fae4e5dSmrg esac 43136fae4e5dSmrg 43146fae4e5dSmrg case $cc_basename in 43156fae4e5dSmrg nvcc*) # Cuda Compiler Driver 2.2 43166fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 431789c04b6cSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 431889c04b6cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 431989c04b6cSmrg fi 43206fae4e5dSmrg ;; 43216fae4e5dSmrg esac 43226fae4e5dSmrg else 43236fae4e5dSmrg # PORTME Check for flag to pass linker flags through the system compiler. 43246fae4e5dSmrg case $host_os in 43256fae4e5dSmrg aix*) 43266fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43276fae4e5dSmrg if test "$host_cpu" = ia64; then 43286fae4e5dSmrg # AIX 5 now supports IA64 processor 43296fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43306fae4e5dSmrg else 43316fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43326fae4e5dSmrg fi 43336fae4e5dSmrg ;; 43346fae4e5dSmrg 43356fae4e5dSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 43366fae4e5dSmrg # This hack is so that the source file can tell whether it is being 43376fae4e5dSmrg # built for inclusion in a dll (and should export symbols for example). 43386fae4e5dSmrg m4_if([$1], [GCJ], [], 43396fae4e5dSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43406fae4e5dSmrg ;; 43416fae4e5dSmrg 43426fae4e5dSmrg hpux9* | hpux10* | hpux11*) 43436fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43446fae4e5dSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 43456fae4e5dSmrg # not for PA HP-UX. 43466fae4e5dSmrg case $host_cpu in 43476fae4e5dSmrg hppa*64*|ia64*) 43486fae4e5dSmrg # +Z the default 43496fae4e5dSmrg ;; 43506fae4e5dSmrg *) 43516fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43526fae4e5dSmrg ;; 43536fae4e5dSmrg esac 43546fae4e5dSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 43556fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 43566fae4e5dSmrg ;; 43576fae4e5dSmrg 43586fae4e5dSmrg irix5* | irix6* | nonstopux*) 43596fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43606fae4e5dSmrg # PIC (with -KPIC) is the default. 43616fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43626fae4e5dSmrg ;; 43636fae4e5dSmrg 43642fd96bc7Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 43656fae4e5dSmrg case $cc_basename in 43666fae4e5dSmrg # old Intel for x86_64 which still supported -KPIC. 43676fae4e5dSmrg ecc*) 43686fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43696fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43706fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43716fae4e5dSmrg ;; 43726fae4e5dSmrg # icc used to be incompatible with GCC. 43736fae4e5dSmrg # ICC 10 doesn't accept -KPIC any more. 43746fae4e5dSmrg icc* | ifort*) 43756fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43766fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43776fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43786fae4e5dSmrg ;; 43796fae4e5dSmrg # Lahey Fortran 8.1. 43806fae4e5dSmrg lf95*) 43816fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43826fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 43836fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 43846fae4e5dSmrg ;; 43856fae4e5dSmrg nagfor*) 43866fae4e5dSmrg # NAG Fortran compiler 43876fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 43886fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 43896fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43906fae4e5dSmrg ;; 43916fae4e5dSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 43926fae4e5dSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 43936fae4e5dSmrg # which looks to be a dead project) 43946fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43956fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 43966fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43976fae4e5dSmrg ;; 43986fae4e5dSmrg ccc*) 43996fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44006fae4e5dSmrg # All Alpha code is PIC. 44016fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44026fae4e5dSmrg ;; 44036fae4e5dSmrg xl* | bgxl* | bgf* | mpixl*) 44046fae4e5dSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 44056fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44066fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44076fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44086fae4e5dSmrg ;; 44096fae4e5dSmrg *) 44106fae4e5dSmrg case `$CC -V 2>&1 | sed 5q` in 441189c04b6cSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 44126fae4e5dSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 44136fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44146fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44156fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 44166fae4e5dSmrg ;; 441789c04b6cSmrg *Sun\ F* | *Sun*Fortran*) 441889c04b6cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 441989c04b6cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 442089c04b6cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 442189c04b6cSmrg ;; 44226fae4e5dSmrg *Sun\ C*) 44236fae4e5dSmrg # Sun C 5.9 44246fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44256fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44266fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44276fae4e5dSmrg ;; 442889c04b6cSmrg *Intel*\ [[CF]]*Compiler*) 442989c04b6cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 443089c04b6cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 443189c04b6cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 443289c04b6cSmrg ;; 443389c04b6cSmrg *Portland\ Group*) 443489c04b6cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 443589c04b6cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 443689c04b6cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 443789c04b6cSmrg ;; 44386fae4e5dSmrg esac 44396fae4e5dSmrg ;; 44406fae4e5dSmrg esac 44416fae4e5dSmrg ;; 44426fae4e5dSmrg 44436fae4e5dSmrg newsos6) 44446fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44456fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44466fae4e5dSmrg ;; 44476fae4e5dSmrg 44486fae4e5dSmrg *nto* | *qnx*) 44496fae4e5dSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44506fae4e5dSmrg # it will coredump. 44516fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44526fae4e5dSmrg ;; 44536fae4e5dSmrg 44546fae4e5dSmrg osf3* | osf4* | osf5*) 44556fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44566fae4e5dSmrg # All OSF/1 code is PIC. 44576fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44586fae4e5dSmrg ;; 44596fae4e5dSmrg 44606fae4e5dSmrg rdos*) 44616fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44626fae4e5dSmrg ;; 44636fae4e5dSmrg 44646fae4e5dSmrg solaris*) 44656fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44666fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44676fae4e5dSmrg case $cc_basename in 44686fae4e5dSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 44696fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 44706fae4e5dSmrg *) 44716fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 44726fae4e5dSmrg esac 44736fae4e5dSmrg ;; 44746fae4e5dSmrg 44756fae4e5dSmrg sunos4*) 44766fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44776fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 44786fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44799c9ff80cSmrg ;; 44806fae4e5dSmrg 44816fae4e5dSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 44826fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44836fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44846fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44859c9ff80cSmrg ;; 44866fae4e5dSmrg 44879c9ff80cSmrg sysv4*MP*) 44886fae4e5dSmrg if test -d /usr/nec ;then 44896fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 44906fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44919c9ff80cSmrg fi 44929c9ff80cSmrg ;; 44936fae4e5dSmrg 44946fae4e5dSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 44956fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44966fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44976fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44981f0ac6a5Smrg ;; 44996fae4e5dSmrg 45006fae4e5dSmrg unicos*) 45016fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45026fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45036fae4e5dSmrg ;; 45046fae4e5dSmrg 45056fae4e5dSmrg uts4*) 45066fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45076fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45081f0ac6a5Smrg ;; 45096fae4e5dSmrg 45101f0ac6a5Smrg *) 45116fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45121f0ac6a5Smrg ;; 45131f0ac6a5Smrg esac 45146fae4e5dSmrg fi 45156fae4e5dSmrg]) 45166fae4e5dSmrgcase $host_os in 45176fae4e5dSmrg # For platforms which do not support PIC, -DPIC is meaningless: 45186fae4e5dSmrg *djgpp*) 45196fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 45206fae4e5dSmrg ;; 45216fae4e5dSmrg *) 45226fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 45236fae4e5dSmrg ;; 45246fae4e5dSmrgesac 45256fae4e5dSmrg 45266fae4e5dSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 45276fae4e5dSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 45286fae4e5dSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 45296fae4e5dSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 45306fae4e5dSmrg 45316fae4e5dSmrg# 45326fae4e5dSmrg# Check to make sure the PIC flag actually works. 45336fae4e5dSmrg# 45346fae4e5dSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 45356fae4e5dSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 45366fae4e5dSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 45376fae4e5dSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 45386fae4e5dSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 45396fae4e5dSmrg "" | " "*) ;; 45406fae4e5dSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 45416fae4e5dSmrg esac], 45426fae4e5dSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 45436fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 45446fae4e5dSmrgfi 45456fae4e5dSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 45466fae4e5dSmrg [Additional compiler flags for building library objects]) 45476fae4e5dSmrg 45486fae4e5dSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 45496fae4e5dSmrg [How to pass a linker flag through the compiler]) 45506fae4e5dSmrg# 45516fae4e5dSmrg# Check to make sure the static flag actually works. 45526fae4e5dSmrg# 45536fae4e5dSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 45546fae4e5dSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 45556fae4e5dSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 45566fae4e5dSmrg $lt_tmp_static_flag, 45576fae4e5dSmrg [], 45586fae4e5dSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 45596fae4e5dSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 45606fae4e5dSmrg [Compiler flag to prevent dynamic linking]) 45616fae4e5dSmrg])# _LT_COMPILER_PIC 45626fae4e5dSmrg 45636fae4e5dSmrg 45646fae4e5dSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 45656fae4e5dSmrg# ---------------------------- 45666fae4e5dSmrg# See if the linker supports building shared libraries. 45676fae4e5dSmrgm4_defun([_LT_LINKER_SHLIBS], 45686fae4e5dSmrg[AC_REQUIRE([LT_PATH_LD])dnl 45696fae4e5dSmrgAC_REQUIRE([LT_PATH_NM])dnl 45706fae4e5dSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 45716fae4e5dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 45726fae4e5dSmrgm4_require([_LT_DECL_EGREP])dnl 45736fae4e5dSmrgm4_require([_LT_DECL_SED])dnl 45746fae4e5dSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 45756fae4e5dSmrgm4_require([_LT_TAG_COMPILER])dnl 45766fae4e5dSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 45776fae4e5dSmrgm4_if([$1], [CXX], [ 45786fae4e5dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 45796fae4e5dSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 45806fae4e5dSmrg case $host_os in 45816fae4e5dSmrg aix[[4-9]]*) 45826fae4e5dSmrg # If we're using GNU nm, then we don't want the "-C" option. 45836fae4e5dSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 45846fae4e5dSmrg # Also, AIX nm treats weak defined symbols like other global defined 45856fae4e5dSmrg # symbols, whereas GNU nm marks them as "W". 45866fae4e5dSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 45876fae4e5dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 45886fae4e5dSmrg else 45896fae4e5dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 45906fae4e5dSmrg fi 45916fae4e5dSmrg ;; 45926fae4e5dSmrg pw32*) 45936fae4e5dSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 45946fae4e5dSmrg ;; 45956fae4e5dSmrg cygwin* | mingw* | cegcc*) 45966fae4e5dSmrg case $cc_basename in 459789c04b6cSmrg cl*) 459889c04b6cSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 459989c04b6cSmrg ;; 46006fae4e5dSmrg *) 46016fae4e5dSmrg _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' 46026fae4e5dSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 46036fae4e5dSmrg ;; 46046fae4e5dSmrg esac 46056fae4e5dSmrg ;; 46062fd96bc7Smrg linux* | k*bsd*-gnu | gnu*) 46072fd96bc7Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 46082fd96bc7Smrg ;; 46096fae4e5dSmrg *) 46106fae4e5dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 46116fae4e5dSmrg ;; 46126fae4e5dSmrg esac 46136fae4e5dSmrg], [ 46146fae4e5dSmrg runpath_var= 46156fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 46166fae4e5dSmrg _LT_TAGVAR(always_export_symbols, $1)=no 46176fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)= 46186fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 46196fae4e5dSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 46206fae4e5dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 46216fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 46226fae4e5dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 46236fae4e5dSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 46246fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 46256fae4e5dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 46266fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 46276fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 46286fae4e5dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 46296fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 46306fae4e5dSmrg _LT_TAGVAR(inherit_rpath, $1)=no 46316fae4e5dSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 46326fae4e5dSmrg _LT_TAGVAR(module_cmds, $1)= 46336fae4e5dSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 46346fae4e5dSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 46356fae4e5dSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 46366fae4e5dSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 46376fae4e5dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 46386fae4e5dSmrg # include_expsyms should be a list of space-separated symbols to be *always* 46396fae4e5dSmrg # included in the symbol list 46406fae4e5dSmrg _LT_TAGVAR(include_expsyms, $1)= 46416fae4e5dSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 46426fae4e5dSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 46436fae4e5dSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 46446fae4e5dSmrg # as well as any symbol that contains `d'. 46456fae4e5dSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 46466fae4e5dSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 46476fae4e5dSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 46486fae4e5dSmrg # the symbol is explicitly referenced. Since portable code cannot 46496fae4e5dSmrg # rely on this symbol name, it's probably fine to never include it in 46506fae4e5dSmrg # preloaded symbol tables. 46516fae4e5dSmrg # Exclude shared library initialization/finalization symbols. 46526fae4e5dSmrgdnl Note also adjust exclude_expsyms for C++ above. 46536fae4e5dSmrg extract_expsyms_cmds= 46546fae4e5dSmrg 46556fae4e5dSmrg case $host_os in 46566fae4e5dSmrg cygwin* | mingw* | pw32* | cegcc*) 46576fae4e5dSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 46586fae4e5dSmrg # When not using gcc, we currently assume that we are using 46596fae4e5dSmrg # Microsoft Visual C++. 46606fae4e5dSmrg if test "$GCC" != yes; then 46616fae4e5dSmrg with_gnu_ld=no 46626fae4e5dSmrg fi 46636fae4e5dSmrg ;; 46646fae4e5dSmrg interix*) 46656fae4e5dSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 46666fae4e5dSmrg with_gnu_ld=yes 46676fae4e5dSmrg ;; 46686fae4e5dSmrg openbsd*) 46696fae4e5dSmrg with_gnu_ld=no 46706fae4e5dSmrg ;; 46712fd96bc7Smrg linux* | k*bsd*-gnu | gnu*) 46722fd96bc7Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 46732fd96bc7Smrg ;; 46746fae4e5dSmrg esac 46756fae4e5dSmrg 46766fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 46776fae4e5dSmrg 46786fae4e5dSmrg # On some targets, GNU ld is compatible enough with the native linker 46796fae4e5dSmrg # that we're better off using the native interface for both. 46806fae4e5dSmrg lt_use_gnu_ld_interface=no 46816fae4e5dSmrg if test "$with_gnu_ld" = yes; then 46826fae4e5dSmrg case $host_os in 46836fae4e5dSmrg aix*) 46846fae4e5dSmrg # The AIX port of GNU ld has always aspired to compatibility 46856fae4e5dSmrg # with the native linker. However, as the warning in the GNU ld 46866fae4e5dSmrg # block says, versions before 2.19.5* couldn't really create working 46876fae4e5dSmrg # shared libraries, regardless of the interface used. 46886fae4e5dSmrg case `$LD -v 2>&1` in 46896fae4e5dSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 46906fae4e5dSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 46916fae4e5dSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 46929c9ff80cSmrg *) 46936fae4e5dSmrg lt_use_gnu_ld_interface=yes 46949c9ff80cSmrg ;; 46959c9ff80cSmrg esac 46961f0ac6a5Smrg ;; 46976fae4e5dSmrg *) 46986fae4e5dSmrg lt_use_gnu_ld_interface=yes 46991f0ac6a5Smrg ;; 47006fae4e5dSmrg esac 47016fae4e5dSmrg fi 47026fae4e5dSmrg 47036fae4e5dSmrg if test "$lt_use_gnu_ld_interface" = yes; then 47046fae4e5dSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 47056fae4e5dSmrg wlarc='${wl}' 47066fae4e5dSmrg 47076fae4e5dSmrg # Set some defaults for GNU ld with shared library support. These 47086fae4e5dSmrg # are reset later if shared libraries are not supported. Putting them 47096fae4e5dSmrg # here allows them to be overridden if necessary. 47106fae4e5dSmrg runpath_var=LD_RUN_PATH 47116fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 47126fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 47136fae4e5dSmrg # ancient GNU ld didn't support --whole-archive et. al. 47146fae4e5dSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 47156fae4e5dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 47166fae4e5dSmrg else 47176fae4e5dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 47186fae4e5dSmrg fi 47196fae4e5dSmrg supports_anon_versioning=no 47206fae4e5dSmrg case `$LD -v 2>&1` in 47216fae4e5dSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 47226fae4e5dSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 47236fae4e5dSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 47246fae4e5dSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 47256fae4e5dSmrg *\ 2.11.*) ;; # other 2.11 versions 47266fae4e5dSmrg *) supports_anon_versioning=yes ;; 47276fae4e5dSmrg esac 47286fae4e5dSmrg 47296fae4e5dSmrg # See if GNU ld supports shared libraries. 47306fae4e5dSmrg case $host_os in 47316fae4e5dSmrg aix[[3-9]]*) 47326fae4e5dSmrg # On AIX/PPC, the GNU linker is very broken 47336fae4e5dSmrg if test "$host_cpu" != ia64; then 47346fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 47356fae4e5dSmrg cat <<_LT_EOF 1>&2 47366fae4e5dSmrg 47376fae4e5dSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 47386fae4e5dSmrg*** to be unable to reliably create shared libraries on AIX. 47396fae4e5dSmrg*** Therefore, libtool is disabling shared libraries support. If you 47406fae4e5dSmrg*** really care for shared libraries, you may want to install binutils 47416fae4e5dSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 47426fae4e5dSmrg*** You will then need to restart the configuration process. 47436fae4e5dSmrg 47446fae4e5dSmrg_LT_EOF 47456fae4e5dSmrg fi 47466fae4e5dSmrg ;; 47476fae4e5dSmrg 47486fae4e5dSmrg amigaos*) 47496fae4e5dSmrg case $host_cpu in 47506fae4e5dSmrg powerpc) 47516fae4e5dSmrg # see comment about AmigaOS4 .so support 47526fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47536fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 47549c9ff80cSmrg ;; 47556fae4e5dSmrg m68k) 47566fae4e5dSmrg _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)' 47576fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 47586fae4e5dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47596fae4e5dSmrg ;; 47606fae4e5dSmrg esac 47616fae4e5dSmrg ;; 47626fae4e5dSmrg 47636fae4e5dSmrg beos*) 47646fae4e5dSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 47656fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47666fae4e5dSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 47676fae4e5dSmrg # support --undefined. This deserves some investigation. FIXME 47686fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47696fae4e5dSmrg else 47706fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 47716fae4e5dSmrg fi 47726fae4e5dSmrg ;; 47736fae4e5dSmrg 47746fae4e5dSmrg cygwin* | mingw* | pw32* | cegcc*) 47756fae4e5dSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 47766fae4e5dSmrg # as there is no search path for DLLs. 47776fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 47786fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 47796fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47806fae4e5dSmrg _LT_TAGVAR(always_export_symbols, $1)=no 47816fae4e5dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 47826fae4e5dSmrg _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' 47836fae4e5dSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 47846fae4e5dSmrg 47856fae4e5dSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 47866fae4e5dSmrg _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' 47876fae4e5dSmrg # If the export-symbols file already is a .def file (1st line 47886fae4e5dSmrg # is EXPORTS), use it as is; otherwise, prepend... 47896fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 47906fae4e5dSmrg cp $export_symbols $output_objdir/$soname.def; 47916fae4e5dSmrg else 47926fae4e5dSmrg echo EXPORTS > $output_objdir/$soname.def; 47936fae4e5dSmrg cat $export_symbols >> $output_objdir/$soname.def; 47946fae4e5dSmrg fi~ 47956fae4e5dSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 47966fae4e5dSmrg else 47976fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 47986fae4e5dSmrg fi 47996fae4e5dSmrg ;; 48006fae4e5dSmrg 48016fae4e5dSmrg haiku*) 48026fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 48036fae4e5dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 48046fae4e5dSmrg ;; 48056fae4e5dSmrg 48066fae4e5dSmrg interix[[3-9]]*) 48076fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 48086fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48096fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 48106fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 48116fae4e5dSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 48126fae4e5dSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 48136fae4e5dSmrg # default) and relocated if they conflict, which is a slow very memory 48146fae4e5dSmrg # consuming and fragmenting process. To avoid this, we pick a random, 48156fae4e5dSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 48166fae4e5dSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 48176fae4e5dSmrg _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' 48186fae4e5dSmrg _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' 48196fae4e5dSmrg ;; 48206fae4e5dSmrg 48216fae4e5dSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 48226fae4e5dSmrg tmp_diet=no 48236fae4e5dSmrg if test "$host_os" = linux-dietlibc; then 48249c9ff80cSmrg case $cc_basename in 48256fae4e5dSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 48261f0ac6a5Smrg esac 48276fae4e5dSmrg fi 48286fae4e5dSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 48296fae4e5dSmrg && test "$tmp_diet" = no 48306fae4e5dSmrg then 48316fae4e5dSmrg tmp_addflag=' $pic_flag' 48326fae4e5dSmrg tmp_sharedflag='-shared' 48336fae4e5dSmrg case $cc_basename,$host_cpu in 48346fae4e5dSmrg pgcc*) # Portland Group C compiler 48356fae4e5dSmrg _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' 48366fae4e5dSmrg tmp_addflag=' $pic_flag' 48376fae4e5dSmrg ;; 48386fae4e5dSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 48396fae4e5dSmrg # Portland Group f77 and f90 compilers 48406fae4e5dSmrg _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' 48416fae4e5dSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 48426fae4e5dSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 48436fae4e5dSmrg tmp_addflag=' -i_dynamic' ;; 48446fae4e5dSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 48456fae4e5dSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 48466fae4e5dSmrg ifc* | ifort*) # Intel Fortran compiler 48476fae4e5dSmrg tmp_addflag=' -nofor_main' ;; 48486fae4e5dSmrg lf95*) # Lahey Fortran 8.1 48496fae4e5dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 48506fae4e5dSmrg tmp_sharedflag='--shared' ;; 48516fae4e5dSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 48526fae4e5dSmrg tmp_sharedflag='-qmkshrobj' 48536fae4e5dSmrg tmp_addflag= ;; 48546fae4e5dSmrg nvcc*) # Cuda Compiler Driver 2.2 48556fae4e5dSmrg _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' 48566fae4e5dSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 48576fae4e5dSmrg ;; 48589c9ff80cSmrg esac 48596fae4e5dSmrg case `$CC -V 2>&1 | sed 5q` in 48606fae4e5dSmrg *Sun\ C*) # Sun C 5.9 48616fae4e5dSmrg _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' 48626fae4e5dSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 48636fae4e5dSmrg tmp_sharedflag='-G' ;; 48646fae4e5dSmrg *Sun\ F*) # Sun Fortran 8.3 48656fae4e5dSmrg tmp_sharedflag='-G' ;; 48669c9ff80cSmrg esac 48676fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 48686fae4e5dSmrg 48696fae4e5dSmrg if test "x$supports_anon_versioning" = xyes; then 48706fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48716fae4e5dSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48726fae4e5dSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 48736fae4e5dSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 48746fae4e5dSmrg fi 48756fae4e5dSmrg 48769c9ff80cSmrg case $cc_basename in 48776fae4e5dSmrg xlf* | bgf* | bgxlf* | mpixlf*) 48786fae4e5dSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 48796fae4e5dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 488089c04b6cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 48816fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 48826fae4e5dSmrg if test "x$supports_anon_versioning" = xyes; then 48836fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48846fae4e5dSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48856fae4e5dSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 48866fae4e5dSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 48876fae4e5dSmrg fi 48886fae4e5dSmrg ;; 48899c9ff80cSmrg esac 48906fae4e5dSmrg else 48916fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 48926fae4e5dSmrg fi 48936fae4e5dSmrg ;; 48946fae4e5dSmrg 48952fd96bc7Smrg netbsd* | netbsdelf*-gnu) 48966fae4e5dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 48976fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 48986fae4e5dSmrg wlarc= 48996fae4e5dSmrg else 49006fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 49016fae4e5dSmrg _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' 49026fae4e5dSmrg fi 49036fae4e5dSmrg ;; 49046fae4e5dSmrg 49056fae4e5dSmrg solaris*) 49066fae4e5dSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 49076fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49086fae4e5dSmrg cat <<_LT_EOF 1>&2 49096fae4e5dSmrg 49106fae4e5dSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 49116fae4e5dSmrg*** create shared libraries on Solaris systems. Therefore, libtool 49126fae4e5dSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 49136fae4e5dSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 49146fae4e5dSmrg*** your PATH or compiler configuration so that the native linker is 49156fae4e5dSmrg*** used, and then restart. 49166fae4e5dSmrg 49176fae4e5dSmrg_LT_EOF 49186fae4e5dSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 49196fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 49206fae4e5dSmrg _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' 49216fae4e5dSmrg else 49226fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49236fae4e5dSmrg fi 49246fae4e5dSmrg ;; 49256fae4e5dSmrg 49266fae4e5dSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 49276fae4e5dSmrg case `$LD -v 2>&1` in 49286fae4e5dSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 49296fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49306fae4e5dSmrg cat <<_LT_EOF 1>&2 49316fae4e5dSmrg 49326fae4e5dSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 49336fae4e5dSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 49346fae4e5dSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 49356fae4e5dSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 49366fae4e5dSmrg*** your PATH or compiler configuration so that the native linker is 49376fae4e5dSmrg*** used, and then restart. 49386fae4e5dSmrg 49396fae4e5dSmrg_LT_EOF 49401f0ac6a5Smrg ;; 49416fae4e5dSmrg *) 49426fae4e5dSmrg # For security reasons, it is highly recommended that you always 49436fae4e5dSmrg # use absolute paths for naming shared libraries, and exclude the 49446fae4e5dSmrg # DT_RUNPATH tag from executables and libraries. But doing so 49456fae4e5dSmrg # requires that you compile everything twice, which is a pain. 49466fae4e5dSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 49476fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49486fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 49496fae4e5dSmrg _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' 49506fae4e5dSmrg else 49516fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49526fae4e5dSmrg fi 49531f0ac6a5Smrg ;; 49546fae4e5dSmrg esac 49556fae4e5dSmrg ;; 49566fae4e5dSmrg 49576fae4e5dSmrg sunos4*) 49586fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 49596fae4e5dSmrg wlarc= 49606fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 49616fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 49626fae4e5dSmrg ;; 49636fae4e5dSmrg 49646fae4e5dSmrg *) 49656fae4e5dSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 49666fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 49676fae4e5dSmrg _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' 49686fae4e5dSmrg else 49696fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49706fae4e5dSmrg fi 49716fae4e5dSmrg ;; 49721f0ac6a5Smrg esac 49731f0ac6a5Smrg 49746fae4e5dSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 49756fae4e5dSmrg runpath_var= 49766fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49776fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49786fae4e5dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 49796fae4e5dSmrg fi 49806fae4e5dSmrg else 49816fae4e5dSmrg # PORTME fill in a description of your system's linker (not GNU ld) 49829c9ff80cSmrg case $host_os in 49836fae4e5dSmrg aix3*) 49846fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 49856fae4e5dSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 49866fae4e5dSmrg _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' 49876fae4e5dSmrg # Note: this linker hardcodes the directories in LIBPATH if there 49886fae4e5dSmrg # are no directories specified by -L. 49896fae4e5dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 49906fae4e5dSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 49916fae4e5dSmrg # Neither direct hardcoding nor static linking is supported with a 49926fae4e5dSmrg # broken collect2. 49936fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 49946fae4e5dSmrg fi 49956fae4e5dSmrg ;; 49966fae4e5dSmrg 49976fae4e5dSmrg aix[[4-9]]*) 49989c9ff80cSmrg if test "$host_cpu" = ia64; then 49996fae4e5dSmrg # On IA64, the linker does run time linking by default, so we don't 50006fae4e5dSmrg # have to do anything special. 50016fae4e5dSmrg aix_use_runtimelinking=no 50026fae4e5dSmrg exp_sym_flag='-Bexport' 50036fae4e5dSmrg no_entry_flag="" 50046fae4e5dSmrg else 50056fae4e5dSmrg # If we're using GNU nm, then we don't want the "-C" option. 50066fae4e5dSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 50076fae4e5dSmrg # Also, AIX nm treats weak defined symbols like other global 50086fae4e5dSmrg # defined symbols, whereas GNU nm marks them as "W". 50096fae4e5dSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 50106fae4e5dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 50116fae4e5dSmrg else 50126fae4e5dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 50136fae4e5dSmrg fi 50146fae4e5dSmrg aix_use_runtimelinking=no 50156fae4e5dSmrg 50166fae4e5dSmrg # Test if we are trying to use run time linking or normal 50176fae4e5dSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 50186fae4e5dSmrg # need to do runtime linking. 50196fae4e5dSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 50206fae4e5dSmrg for ld_flag in $LDFLAGS; do 50216fae4e5dSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 50226fae4e5dSmrg aix_use_runtimelinking=yes 50236fae4e5dSmrg break 50246fae4e5dSmrg fi 50256fae4e5dSmrg done 50266fae4e5dSmrg ;; 50276fae4e5dSmrg esac 50286fae4e5dSmrg 50296fae4e5dSmrg exp_sym_flag='-bexport' 50306fae4e5dSmrg no_entry_flag='-bnoentry' 50316fae4e5dSmrg fi 50326fae4e5dSmrg 50336fae4e5dSmrg # When large executables or shared objects are built, AIX ld can 50346fae4e5dSmrg # have problems creating the table of contents. If linking a library 50356fae4e5dSmrg # or program results in "error TOC overflow" add -mminimal-toc to 50366fae4e5dSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 50376fae4e5dSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 50386fae4e5dSmrg 50396fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='' 50406fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 50416fae4e5dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 50426fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 50436fae4e5dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 50446fae4e5dSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 50456fae4e5dSmrg 50466fae4e5dSmrg if test "$GCC" = yes; then 50476fae4e5dSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 50486fae4e5dSmrg # We only want to do this on AIX 4.2 and lower, the check 50496fae4e5dSmrg # below for broken collect2 doesn't work under 4.3+ 50506fae4e5dSmrg collect2name=`${CC} -print-prog-name=collect2` 50516fae4e5dSmrg if test -f "$collect2name" && 50526fae4e5dSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 50536fae4e5dSmrg then 50546fae4e5dSmrg # We have reworked collect2 50556fae4e5dSmrg : 50566fae4e5dSmrg else 50576fae4e5dSmrg # We have old collect2 50586fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 50596fae4e5dSmrg # It fails to find uninstalled libraries when the uninstalled 50606fae4e5dSmrg # path is not listed in the libpath. Setting hardcode_minus_L 50616fae4e5dSmrg # to unsupported forces relinking 50626fae4e5dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 50636fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50646fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 50656fae4e5dSmrg fi 50666fae4e5dSmrg ;; 50676fae4e5dSmrg esac 50686fae4e5dSmrg shared_flag='-shared' 50696fae4e5dSmrg if test "$aix_use_runtimelinking" = yes; then 50706fae4e5dSmrg shared_flag="$shared_flag "'${wl}-G' 50716fae4e5dSmrg fi 50722fd96bc7Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 50736fae4e5dSmrg else 50746fae4e5dSmrg # not using gcc 50756fae4e5dSmrg if test "$host_cpu" = ia64; then 50766fae4e5dSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 50776fae4e5dSmrg # chokes on -Wl,-G. The following line is correct: 50786fae4e5dSmrg shared_flag='-G' 50796fae4e5dSmrg else 50806fae4e5dSmrg if test "$aix_use_runtimelinking" = yes; then 50816fae4e5dSmrg shared_flag='${wl}-G' 50826fae4e5dSmrg else 50836fae4e5dSmrg shared_flag='${wl}-bM:SRE' 50846fae4e5dSmrg fi 50856fae4e5dSmrg fi 50866fae4e5dSmrg fi 50876fae4e5dSmrg 50886fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 50896fae4e5dSmrg # It seems that -bexpall does not export symbols beginning with 50906fae4e5dSmrg # underscore (_), so it is better to generate a list of symbols to export. 50916fae4e5dSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 50926fae4e5dSmrg if test "$aix_use_runtimelinking" = yes; then 50936fae4e5dSmrg # Warning - without using the other runtime loading flags (-brtl), 50946fae4e5dSmrg # -berok will link without error, but may produce a broken library. 50956fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 50966fae4e5dSmrg # Determine the default libpath from the value encoded in an 50976fae4e5dSmrg # empty executable. 50986fae4e5dSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 50996fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 51006fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 51016fae4e5dSmrg else 51026fae4e5dSmrg if test "$host_cpu" = ia64; then 51036fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 51046fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 51056fae4e5dSmrg _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" 51066fae4e5dSmrg else 51076fae4e5dSmrg # Determine the default libpath from the value encoded in an 51086fae4e5dSmrg # empty executable. 51096fae4e5dSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 51106fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 51116fae4e5dSmrg # Warning - without using the other run time loading flags, 51126fae4e5dSmrg # -berok will link without error, but may produce a broken library. 51136fae4e5dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 51146fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 51156fae4e5dSmrg if test "$with_gnu_ld" = yes; then 51166fae4e5dSmrg # We only use this code for GNU lds that support --whole-archive. 51176fae4e5dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 51186fae4e5dSmrg else 51196fae4e5dSmrg # Exported symbols can be pulled into shared objects from archives 51206fae4e5dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 51216fae4e5dSmrg fi 51226fae4e5dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 51236fae4e5dSmrg # This is similar to how AIX traditionally builds its shared libraries. 51246fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 51256fae4e5dSmrg fi 51269c9ff80cSmrg fi 51279c9ff80cSmrg ;; 51281f0ac6a5Smrg 51299c9ff80cSmrg amigaos*) 51309c9ff80cSmrg case $host_cpu in 51319c9ff80cSmrg powerpc) 51329c9ff80cSmrg # see comment about AmigaOS4 .so support 51336fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 51346fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 51359c9ff80cSmrg ;; 51369c9ff80cSmrg m68k) 51376fae4e5dSmrg _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)' 51386fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51396fae4e5dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51409c9ff80cSmrg ;; 51419c9ff80cSmrg esac 51429c9ff80cSmrg ;; 51431f0ac6a5Smrg 51446fae4e5dSmrg bsdi[[45]]*) 51456fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 51469c9ff80cSmrg ;; 51471f0ac6a5Smrg 51486fae4e5dSmrg cygwin* | mingw* | pw32* | cegcc*) 51496fae4e5dSmrg # When not using gcc, we currently assume that we are using 51506fae4e5dSmrg # Microsoft Visual C++. 51516fae4e5dSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 51526fae4e5dSmrg # no search path for DLLs. 51536fae4e5dSmrg case $cc_basename in 51546fae4e5dSmrg cl*) 51556fae4e5dSmrg # Native MSVC 51566fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 51576fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51586fae4e5dSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 51596fae4e5dSmrg _LT_TAGVAR(file_list_spec, $1)='@' 51606fae4e5dSmrg # Tell ltmain to make .lib files, not .a files. 51616fae4e5dSmrg libext=lib 51626fae4e5dSmrg # Tell ltmain to make .dll files, not .so files. 51636fae4e5dSmrg shrext_cmds=".dll" 51646fae4e5dSmrg # FIXME: Setting linknames here is a bad hack. 51656fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 51666fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 51676fae4e5dSmrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 51686fae4e5dSmrg else 51696fae4e5dSmrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 51706fae4e5dSmrg fi~ 51716fae4e5dSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 51726fae4e5dSmrg linknames=' 51736fae4e5dSmrg # The linker will not automatically build a static lib if we build a DLL. 51746fae4e5dSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 51756fae4e5dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 517689c04b6cSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 51776fae4e5dSmrg _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' 51786fae4e5dSmrg # Don't use ranlib 51796fae4e5dSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 51806fae4e5dSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 51816fae4e5dSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 51826fae4e5dSmrg case $lt_outputfile in 51836fae4e5dSmrg *.exe|*.EXE) ;; 51846fae4e5dSmrg *) 51856fae4e5dSmrg lt_outputfile="$lt_outputfile.exe" 51866fae4e5dSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 51876fae4e5dSmrg ;; 51886fae4e5dSmrg esac~ 51896fae4e5dSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 51906fae4e5dSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 51916fae4e5dSmrg $RM "$lt_outputfile.manifest"; 51926fae4e5dSmrg fi' 51939c9ff80cSmrg ;; 51949c9ff80cSmrg *) 51956fae4e5dSmrg # Assume MSVC wrapper 51966fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 51976fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51986fae4e5dSmrg # Tell ltmain to make .lib files, not .a files. 51996fae4e5dSmrg libext=lib 52006fae4e5dSmrg # Tell ltmain to make .dll files, not .so files. 52016fae4e5dSmrg shrext_cmds=".dll" 52026fae4e5dSmrg # FIXME: Setting linknames here is a bad hack. 52036fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 52046fae4e5dSmrg # The linker will automatically build a .lib file if we build a DLL. 52056fae4e5dSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 52066fae4e5dSmrg # FIXME: Should let the user specify the lib program. 52076fae4e5dSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 52086fae4e5dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 52099c9ff80cSmrg ;; 52109c9ff80cSmrg esac 52119c9ff80cSmrg ;; 52121f0ac6a5Smrg 52136fae4e5dSmrg darwin* | rhapsody*) 52146fae4e5dSmrg _LT_DARWIN_LINKER_FEATURES($1) 52159c9ff80cSmrg ;; 52161f0ac6a5Smrg 52176fae4e5dSmrg dgux*) 52186fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 52196fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 52206fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52219c9ff80cSmrg ;; 52221f0ac6a5Smrg 52236fae4e5dSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 52246fae4e5dSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 52256fae4e5dSmrg # does not break anything, and helps significantly (at the cost of a little 52266fae4e5dSmrg # extra space). 52276fae4e5dSmrg freebsd2.2*) 52286fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 52296fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52306fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 52316fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52329c9ff80cSmrg ;; 52331f0ac6a5Smrg 52346fae4e5dSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 523589c04b6cSmrg freebsd2.*) 52366fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 52376fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 52386fae4e5dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52396fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52409c9ff80cSmrg ;; 52411f0ac6a5Smrg 52426fae4e5dSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 52436fae4e5dSmrg freebsd* | dragonfly*) 52446fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 52456fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52466fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 52476fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52489c9ff80cSmrg ;; 52491f0ac6a5Smrg 52506fae4e5dSmrg hpux9*) 52516fae4e5dSmrg if test "$GCC" = yes; then 52526fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 52536fae4e5dSmrg else 52546fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 52556fae4e5dSmrg fi 52566fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52576fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52586fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 52596fae4e5dSmrg 52606fae4e5dSmrg # hardcode_minus_L: Not really in the search PATH, 52616fae4e5dSmrg # but as the default location of the library. 52626fae4e5dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52636fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52649c9ff80cSmrg ;; 52651f0ac6a5Smrg 52666fae4e5dSmrg hpux10*) 52676fae4e5dSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 52686fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 52696fae4e5dSmrg else 52706fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 52716fae4e5dSmrg fi 52726fae4e5dSmrg if test "$with_gnu_ld" = no; then 52736fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52746fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52756fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 52766fae4e5dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 52776fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52786fae4e5dSmrg # hardcode_minus_L: Not really in the search PATH, 52796fae4e5dSmrg # but as the default location of the library. 52806fae4e5dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52816fae4e5dSmrg fi 52829c9ff80cSmrg ;; 52831f0ac6a5Smrg 52846fae4e5dSmrg hpux11*) 52856fae4e5dSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 52866fae4e5dSmrg case $host_cpu in 52876fae4e5dSmrg hppa*64*) 52886fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 52896fae4e5dSmrg ;; 52906fae4e5dSmrg ia64*) 52916fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 52926fae4e5dSmrg ;; 52936fae4e5dSmrg *) 52946fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 52956fae4e5dSmrg ;; 52966fae4e5dSmrg esac 52976fae4e5dSmrg else 52986fae4e5dSmrg case $host_cpu in 52996fae4e5dSmrg hppa*64*) 53006fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 53016fae4e5dSmrg ;; 53026fae4e5dSmrg ia64*) 53036fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 53046fae4e5dSmrg ;; 53056fae4e5dSmrg *) 53066fae4e5dSmrg m4_if($1, [], [ 53076fae4e5dSmrg # Older versions of the 11.00 compiler do not understand -b yet 53086fae4e5dSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 53096fae4e5dSmrg _LT_LINKER_OPTION([if $CC understands -b], 53106fae4e5dSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 53116fae4e5dSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 53126fae4e5dSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 53136fae4e5dSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 53149c9ff80cSmrg ;; 53156fae4e5dSmrg esac 53166fae4e5dSmrg fi 53176fae4e5dSmrg if test "$with_gnu_ld" = no; then 53186fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 53196fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53206fae4e5dSmrg 53216fae4e5dSmrg case $host_cpu in 53226fae4e5dSmrg hppa*64*|ia64*) 53236fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 53246fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53256fae4e5dSmrg ;; 53266fae4e5dSmrg *) 53276fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53286fae4e5dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 53296fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 53306fae4e5dSmrg 53316fae4e5dSmrg # hardcode_minus_L: Not really in the search PATH, 53326fae4e5dSmrg # but as the default location of the library. 53336fae4e5dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 53349c9ff80cSmrg ;; 53359c9ff80cSmrg esac 53366fae4e5dSmrg fi 53376fae4e5dSmrg ;; 53386fae4e5dSmrg 53396fae4e5dSmrg irix5* | irix6* | nonstopux*) 53406fae4e5dSmrg if test "$GCC" = yes; then 53416fae4e5dSmrg _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' 53426fae4e5dSmrg # Try to use the -exported_symbol ld option, if it does not 53436fae4e5dSmrg # work, assume that -exports_file does not work either and 53446fae4e5dSmrg # implicitly export all symbols. 53456fae4e5dSmrg # This should be the same for all languages, so no per-tag cache variable. 53466fae4e5dSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 53476fae4e5dSmrg [lt_cv_irix_exported_symbol], 53486fae4e5dSmrg [save_LDFLAGS="$LDFLAGS" 53496fae4e5dSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 53506fae4e5dSmrg AC_LINK_IFELSE( 53516fae4e5dSmrg [AC_LANG_SOURCE( 53526fae4e5dSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 53536fae4e5dSmrg [C++], [[int foo (void) { return 0; }]], 53546fae4e5dSmrg [Fortran 77], [[ 53556fae4e5dSmrg subroutine foo 53566fae4e5dSmrg end]], 53576fae4e5dSmrg [Fortran], [[ 53586fae4e5dSmrg subroutine foo 53596fae4e5dSmrg end]])])], 53606fae4e5dSmrg [lt_cv_irix_exported_symbol=yes], 53616fae4e5dSmrg [lt_cv_irix_exported_symbol=no]) 53626fae4e5dSmrg LDFLAGS="$save_LDFLAGS"]) 53636fae4e5dSmrg if test "$lt_cv_irix_exported_symbol" = yes; then 53646fae4e5dSmrg _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' 53656fae4e5dSmrg fi 53666fae4e5dSmrg else 53676fae4e5dSmrg _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' 53686fae4e5dSmrg _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' 53696fae4e5dSmrg fi 53706fae4e5dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 53716fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53726fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53736fae4e5dSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 53746fae4e5dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 53756fae4e5dSmrg ;; 53766fae4e5dSmrg 53772fd96bc7Smrg netbsd* | netbsdelf*-gnu) 53786fae4e5dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 53796fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 53806fae4e5dSmrg else 53816fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 53826fae4e5dSmrg fi 53836fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 53846fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53856fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53869c9ff80cSmrg ;; 53871f0ac6a5Smrg 53889c9ff80cSmrg newsos6) 53896fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 53906fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53916fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53926fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53936fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53949c9ff80cSmrg ;; 5395e5410a46Smrg 53969c9ff80cSmrg *nto* | *qnx*) 53979c9ff80cSmrg ;; 53981f0ac6a5Smrg 53996fae4e5dSmrg openbsd*) 54006fae4e5dSmrg if test -f /usr/libexec/ld.so; then 54016fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 54026fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 54036fae4e5dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 54046fae4e5dSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 54056fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 54066fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 54076fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 54086fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 54096fae4e5dSmrg else 54106fae4e5dSmrg case $host_os in 54116fae4e5dSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 54126fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 54136fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54146fae4e5dSmrg ;; 54156fae4e5dSmrg *) 54166fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 54176fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 54186fae4e5dSmrg ;; 54196fae4e5dSmrg esac 54206fae4e5dSmrg fi 54216fae4e5dSmrg else 54226fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 54236fae4e5dSmrg fi 5424e5410a46Smrg ;; 5425e5410a46Smrg 54266fae4e5dSmrg os2*) 54276fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54286fae4e5dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54296fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 54306fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' 54316fae4e5dSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 54326fae4e5dSmrg ;; 54336fae4e5dSmrg 54346fae4e5dSmrg osf3*) 54356fae4e5dSmrg if test "$GCC" = yes; then 54366fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 54376fae4e5dSmrg _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' 54386fae4e5dSmrg else 54396fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 54406fae4e5dSmrg _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' 54416fae4e5dSmrg fi 54426fae4e5dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54436fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54446fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 54456fae4e5dSmrg ;; 54466fae4e5dSmrg 54476fae4e5dSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 54486fae4e5dSmrg if test "$GCC" = yes; then 54496fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 54506fae4e5dSmrg _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' 54516fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54526fae4e5dSmrg else 54536fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 54546fae4e5dSmrg _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' 54556fae4e5dSmrg _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~ 54566fae4e5dSmrg $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' 54576fae4e5dSmrg 54586fae4e5dSmrg # Both c and cxx compiler support -rpath directly 54596fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 54606fae4e5dSmrg fi 54616fae4e5dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54626fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5463e5410a46Smrg ;; 5464e5410a46Smrg 54659c9ff80cSmrg solaris*) 54666fae4e5dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 54676fae4e5dSmrg if test "$GCC" = yes; then 54686fae4e5dSmrg wlarc='${wl}' 54696fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 54706fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54716fae4e5dSmrg $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' 54726fae4e5dSmrg else 54736fae4e5dSmrg case `$CC -V 2>&1` in 54746fae4e5dSmrg *"Compilers 5.0"*) 54756fae4e5dSmrg wlarc='' 54766fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 54776fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54786fae4e5dSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 54796fae4e5dSmrg ;; 54806fae4e5dSmrg *) 54816fae4e5dSmrg wlarc='${wl}' 54826fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 54836fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54846fae4e5dSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 54856fae4e5dSmrg ;; 54866fae4e5dSmrg esac 54876fae4e5dSmrg fi 54886fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54896fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 54906fae4e5dSmrg case $host_os in 54916fae4e5dSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 54929c9ff80cSmrg *) 54936fae4e5dSmrg # The compiler driver will combine and reorder linker options, 54946fae4e5dSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 54956fae4e5dSmrg # but is careful enough not to reorder. 54966fae4e5dSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 54976fae4e5dSmrg if test "$GCC" = yes; then 54986fae4e5dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 54996fae4e5dSmrg else 55006fae4e5dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 55016fae4e5dSmrg fi 55026fae4e5dSmrg ;; 55039c9ff80cSmrg esac 55046fae4e5dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 55059c9ff80cSmrg ;; 55061f0ac6a5Smrg 55079c9ff80cSmrg sunos4*) 55086fae4e5dSmrg if test "x$host_vendor" = xsequent; then 55096fae4e5dSmrg # Use $CC to link under sequent, because it throws in some extra .o 55106fae4e5dSmrg # files that make .init and .fini sections work. 55116fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 55126fae4e5dSmrg else 55136fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 55146fae4e5dSmrg fi 55156fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55166fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 55176fae4e5dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55186fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55199c9ff80cSmrg ;; 55201f0ac6a5Smrg 55216fae4e5dSmrg sysv4) 55226fae4e5dSmrg case $host_vendor in 55236fae4e5dSmrg sni) 55246fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55256fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 55266fae4e5dSmrg ;; 55276fae4e5dSmrg siemens) 55286fae4e5dSmrg ## LD is ld it makes a PLAMLIB 55296fae4e5dSmrg ## CC just makes a GrossModule. 55306fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 55316fae4e5dSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 55326fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 55336fae4e5dSmrg ;; 55346fae4e5dSmrg motorola) 55356fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55366fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 55376fae4e5dSmrg ;; 55386fae4e5dSmrg esac 55396fae4e5dSmrg runpath_var='LD_RUN_PATH' 55406fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55416fae4e5dSmrg ;; 55426fae4e5dSmrg 55436fae4e5dSmrg sysv4.3*) 55446fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55456fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55466fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 55479c9ff80cSmrg ;; 55481f0ac6a5Smrg 55499c9ff80cSmrg sysv4*MP*) 55506fae4e5dSmrg if test -d /usr/nec; then 55516fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55526fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55536fae4e5dSmrg runpath_var=LD_RUN_PATH 55546fae4e5dSmrg hardcode_runpath_var=yes 55556fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 55569c9ff80cSmrg fi 55579c9ff80cSmrg ;; 55581f0ac6a5Smrg 55596fae4e5dSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 55606fae4e5dSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55616fae4e5dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55626fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55636fae4e5dSmrg runpath_var='LD_RUN_PATH' 55646fae4e5dSmrg 55656fae4e5dSmrg if test "$GCC" = yes; then 55666fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55676fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55686fae4e5dSmrg else 55696fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55706fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55716fae4e5dSmrg fi 55729c9ff80cSmrg ;; 55731f0ac6a5Smrg 55746fae4e5dSmrg sysv5* | sco3.2v5* | sco5v6*) 55756fae4e5dSmrg # Note: We can NOT use -z defs as we might desire, because we do not 55766fae4e5dSmrg # link with -lc, and that would cause any symbols used from libc to 55776fae4e5dSmrg # always be unresolved, which means just about no library would 55786fae4e5dSmrg # ever link correctly. If we're not using GNU ld we use -z text 55796fae4e5dSmrg # though, which does catch some bad symbols but isn't as heavy-handed 55806fae4e5dSmrg # as -z defs. 55816fae4e5dSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55826fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 55836fae4e5dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55846fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55856fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 55866fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 55876fae4e5dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 55886fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 55896fae4e5dSmrg runpath_var='LD_RUN_PATH' 55906fae4e5dSmrg 55916fae4e5dSmrg if test "$GCC" = yes; then 55926fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55936fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55946fae4e5dSmrg else 55956fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55966fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55976fae4e5dSmrg fi 55989c9ff80cSmrg ;; 55991f0ac6a5Smrg 56009c9ff80cSmrg uts4*) 56016fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 56026fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56036fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56049c9ff80cSmrg ;; 56051f0ac6a5Smrg 56069c9ff80cSmrg *) 56076fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 56089c9ff80cSmrg ;; 56099c9ff80cSmrg esac 56106fae4e5dSmrg 56116fae4e5dSmrg if test x$host_vendor = xsni; then 56126fae4e5dSmrg case $host in 56136fae4e5dSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 56146fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 56156fae4e5dSmrg ;; 56166fae4e5dSmrg esac 56176fae4e5dSmrg fi 56189c9ff80cSmrg fi 56199c9ff80cSmrg]) 56206fae4e5dSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 56216fae4e5dSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 56221f0ac6a5Smrg 56236fae4e5dSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 56246fae4e5dSmrg 56256fae4e5dSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 56266fae4e5dSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 56276fae4e5dSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 56286fae4e5dSmrg [The commands to extract the exported symbol list from a shared archive]) 56291f0ac6a5Smrg 56309c9ff80cSmrg# 56316fae4e5dSmrg# Do we need to explicitly link libc? 56329c9ff80cSmrg# 56336fae4e5dSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 56346fae4e5dSmrgx|xyes) 56356fae4e5dSmrg # Assume -lc should be added 56366fae4e5dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 56371f0ac6a5Smrg 56386fae4e5dSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 56396fae4e5dSmrg case $_LT_TAGVAR(archive_cmds, $1) in 56406fae4e5dSmrg *'~'*) 56416fae4e5dSmrg # FIXME: we may have to deal with multi-command sequences. 56426fae4e5dSmrg ;; 56436fae4e5dSmrg '$CC '*) 56446fae4e5dSmrg # Test whether the compiler implicitly links with -lc since on some 56456fae4e5dSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 56466fae4e5dSmrg # to ld, don't add -lc before -lgcc. 56476fae4e5dSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 56486fae4e5dSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 56496fae4e5dSmrg [$RM conftest* 56506fae4e5dSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 56516fae4e5dSmrg 56526fae4e5dSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 56536fae4e5dSmrg soname=conftest 56546fae4e5dSmrg lib=conftest 56556fae4e5dSmrg libobjs=conftest.$ac_objext 56566fae4e5dSmrg deplibs= 56576fae4e5dSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 56586fae4e5dSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 56596fae4e5dSmrg compiler_flags=-v 56606fae4e5dSmrg linker_flags=-v 56616fae4e5dSmrg verstring= 56626fae4e5dSmrg output_objdir=. 56636fae4e5dSmrg libname=conftest 56646fae4e5dSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 56656fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 56666fae4e5dSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 56676fae4e5dSmrg then 56686fae4e5dSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 56696fae4e5dSmrg else 56706fae4e5dSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 56716fae4e5dSmrg fi 56726fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 56736fae4e5dSmrg else 56746fae4e5dSmrg cat conftest.err 1>&5 56756fae4e5dSmrg fi 56766fae4e5dSmrg $RM conftest* 56776fae4e5dSmrg ]) 56786fae4e5dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 56796fae4e5dSmrg ;; 56806fae4e5dSmrg esac 56816fae4e5dSmrg fi 56829c9ff80cSmrg ;; 56836fae4e5dSmrgesac 56841f0ac6a5Smrg 56856fae4e5dSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 56866fae4e5dSmrg [Whether or not to add -lc for building shared libraries]) 56876fae4e5dSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 56886fae4e5dSmrg [enable_shared_with_static_runtimes], [0], 56896fae4e5dSmrg [Whether or not to disallow shared libs when runtime libs are static]) 56906fae4e5dSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 56916fae4e5dSmrg [Compiler flag to allow reflexive dlopens]) 56926fae4e5dSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 56936fae4e5dSmrg [Compiler flag to generate shared objects directly from archives]) 56946fae4e5dSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 56956fae4e5dSmrg [Whether the compiler copes with passing no objects directly]) 56966fae4e5dSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 56976fae4e5dSmrg [Create an old-style archive from a shared archive]) 56986fae4e5dSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 56996fae4e5dSmrg [Create a temporary old-style archive to link instead of a shared archive]) 57006fae4e5dSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 57016fae4e5dSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 57026fae4e5dSmrg_LT_TAGDECL([], [module_cmds], [2], 57036fae4e5dSmrg [Commands used to build a loadable module if different from building 57046fae4e5dSmrg a shared archive.]) 57056fae4e5dSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 57066fae4e5dSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 57076fae4e5dSmrg [Whether we are building with GNU ld or not]) 57086fae4e5dSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 57096fae4e5dSmrg [Flag that allows shared libraries with undefined symbols to be built]) 57106fae4e5dSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 57116fae4e5dSmrg [Flag that enforces no undefined symbols]) 57126fae4e5dSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 57136fae4e5dSmrg [Flag to hardcode $libdir into a binary during linking. 57146fae4e5dSmrg This must work even if $libdir does not exist]) 57156fae4e5dSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 57166fae4e5dSmrg [Whether we need a single "-rpath" flag with a separated argument]) 57176fae4e5dSmrg_LT_TAGDECL([], [hardcode_direct], [0], 57186fae4e5dSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57196fae4e5dSmrg DIR into the resulting binary]) 57206fae4e5dSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 57216fae4e5dSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57226fae4e5dSmrg DIR into the resulting binary and the resulting library dependency is 57236fae4e5dSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 57246fae4e5dSmrg library is relocated]) 57256fae4e5dSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 57266fae4e5dSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 57276fae4e5dSmrg into the resulting binary]) 57286fae4e5dSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 57296fae4e5dSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 57306fae4e5dSmrg into the resulting binary]) 57316fae4e5dSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 57326fae4e5dSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 57336fae4e5dSmrg into the library and all subsequent libraries and executables linked 57346fae4e5dSmrg against it]) 57356fae4e5dSmrg_LT_TAGDECL([], [inherit_rpath], [0], 57366fae4e5dSmrg [Set to yes if linker adds runtime paths of dependent libraries 57376fae4e5dSmrg to runtime path list]) 57386fae4e5dSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 57396fae4e5dSmrg [Whether libtool must link a program against all its dependency libraries]) 57406fae4e5dSmrg_LT_TAGDECL([], [always_export_symbols], [0], 57416fae4e5dSmrg [Set to "yes" if exported symbols are required]) 57426fae4e5dSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 57436fae4e5dSmrg [The commands to list exported symbols]) 57446fae4e5dSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 57456fae4e5dSmrg [Symbols that should not be listed in the preloaded symbols]) 57466fae4e5dSmrg_LT_TAGDECL([], [include_expsyms], [1], 57476fae4e5dSmrg [Symbols that must always be exported]) 57486fae4e5dSmrg_LT_TAGDECL([], [prelink_cmds], [2], 57496fae4e5dSmrg [Commands necessary for linking programs (against libraries) with templates]) 57506fae4e5dSmrg_LT_TAGDECL([], [postlink_cmds], [2], 57516fae4e5dSmrg [Commands necessary for finishing linking programs]) 57526fae4e5dSmrg_LT_TAGDECL([], [file_list_spec], [1], 57536fae4e5dSmrg [Specify filename containing input files]) 57546fae4e5dSmrgdnl FIXME: Not yet implemented 57556fae4e5dSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 57566fae4e5dSmrgdnl [Compiler flag to generate thread safe objects]) 57576fae4e5dSmrg])# _LT_LINKER_SHLIBS 57581f0ac6a5Smrg 57591f0ac6a5Smrg 57606fae4e5dSmrg# _LT_LANG_C_CONFIG([TAG]) 57616fae4e5dSmrg# ------------------------ 57626fae4e5dSmrg# Ensure that the configuration variables for a C compiler are suitably 57636fae4e5dSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 57646fae4e5dSmrg# the compiler configuration to `libtool'. 57656fae4e5dSmrgm4_defun([_LT_LANG_C_CONFIG], 57666fae4e5dSmrg[m4_require([_LT_DECL_EGREP])dnl 57676fae4e5dSmrglt_save_CC="$CC" 57686fae4e5dSmrgAC_LANG_PUSH(C) 57691f0ac6a5Smrg 57706fae4e5dSmrg# Source file extension for C test sources. 57716fae4e5dSmrgac_ext=c 57721f0ac6a5Smrg 57736fae4e5dSmrg# Object file extension for compiled C test sources. 57746fae4e5dSmrgobjext=o 57756fae4e5dSmrg_LT_TAGVAR(objext, $1)=$objext 57761f0ac6a5Smrg 57776fae4e5dSmrg# Code to be used in simple compile tests 57786fae4e5dSmrglt_simple_compile_test_code="int some_variable = 0;" 57791f0ac6a5Smrg 57806fae4e5dSmrg# Code to be used in simple link tests 57816fae4e5dSmrglt_simple_link_test_code='int main(){return(0);}' 57821f0ac6a5Smrg 57836fae4e5dSmrg_LT_TAG_COMPILER 57846fae4e5dSmrg# Save the default compiler, since it gets overwritten when the other 57856fae4e5dSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 57866fae4e5dSmrgcompiler_DEFAULT=$CC 57871f0ac6a5Smrg 57886fae4e5dSmrg# save warnings/boilerplate of simple test code 57896fae4e5dSmrg_LT_COMPILER_BOILERPLATE 57906fae4e5dSmrg_LT_LINKER_BOILERPLATE 57919c9ff80cSmrg 57926fae4e5dSmrgif test -n "$compiler"; then 57936fae4e5dSmrg _LT_COMPILER_NO_RTTI($1) 57946fae4e5dSmrg _LT_COMPILER_PIC($1) 57956fae4e5dSmrg _LT_COMPILER_C_O($1) 57966fae4e5dSmrg _LT_COMPILER_FILE_LOCKS($1) 57976fae4e5dSmrg _LT_LINKER_SHLIBS($1) 57986fae4e5dSmrg _LT_SYS_DYNAMIC_LINKER($1) 57996fae4e5dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 58006fae4e5dSmrg LT_SYS_DLOPEN_SELF 58016fae4e5dSmrg _LT_CMD_STRIPLIB 58021f0ac6a5Smrg 58036fae4e5dSmrg # Report which library types will actually be built 58046fae4e5dSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 58056fae4e5dSmrg AC_MSG_RESULT([$can_build_shared]) 58061f0ac6a5Smrg 58076fae4e5dSmrg AC_MSG_CHECKING([whether to build shared libraries]) 58086fae4e5dSmrg test "$can_build_shared" = "no" && enable_shared=no 58091f0ac6a5Smrg 58106fae4e5dSmrg # On AIX, shared libraries and static libraries use the same namespace, and 58116fae4e5dSmrg # are all built from PIC. 58126fae4e5dSmrg case $host_os in 58136fae4e5dSmrg aix3*) 58146fae4e5dSmrg test "$enable_shared" = yes && enable_static=no 58156fae4e5dSmrg if test -n "$RANLIB"; then 58166fae4e5dSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 58176fae4e5dSmrg postinstall_cmds='$RANLIB $lib' 58186fae4e5dSmrg fi 58196fae4e5dSmrg ;; 58201f0ac6a5Smrg 58216fae4e5dSmrg aix[[4-9]]*) 58226fae4e5dSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 58236fae4e5dSmrg test "$enable_shared" = yes && enable_static=no 58246fae4e5dSmrg fi 58256fae4e5dSmrg ;; 58266fae4e5dSmrg esac 58276fae4e5dSmrg AC_MSG_RESULT([$enable_shared]) 58281f0ac6a5Smrg 58296fae4e5dSmrg AC_MSG_CHECKING([whether to build static libraries]) 58306fae4e5dSmrg # Make sure either enable_shared or enable_static is yes. 58316fae4e5dSmrg test "$enable_shared" = yes || enable_static=yes 58326fae4e5dSmrg AC_MSG_RESULT([$enable_static]) 58331f0ac6a5Smrg 58346fae4e5dSmrg _LT_CONFIG($1) 58356fae4e5dSmrgfi 58366fae4e5dSmrgAC_LANG_POP 58376fae4e5dSmrgCC="$lt_save_CC" 58386fae4e5dSmrg])# _LT_LANG_C_CONFIG 58391f0ac6a5Smrg 58401f0ac6a5Smrg 58416fae4e5dSmrg# _LT_LANG_CXX_CONFIG([TAG]) 58426fae4e5dSmrg# -------------------------- 58436fae4e5dSmrg# Ensure that the configuration variables for a C++ compiler are suitably 58446fae4e5dSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 58456fae4e5dSmrg# the compiler configuration to `libtool'. 58466fae4e5dSmrgm4_defun([_LT_LANG_CXX_CONFIG], 58476fae4e5dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 58486fae4e5dSmrgm4_require([_LT_DECL_EGREP])dnl 58496fae4e5dSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 58506fae4e5dSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 58516fae4e5dSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 58526fae4e5dSmrg (test "X$CXX" != "Xg++"))) ; then 58536fae4e5dSmrg AC_PROG_CXXCPP 58546fae4e5dSmrgelse 58556fae4e5dSmrg _lt_caught_CXX_error=yes 58566fae4e5dSmrgfi 58571f0ac6a5Smrg 58586fae4e5dSmrgAC_LANG_PUSH(C++) 58596fae4e5dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 58606fae4e5dSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 58616fae4e5dSmrg_LT_TAGVAR(always_export_symbols, $1)=no 58626fae4e5dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 58636fae4e5dSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 58646fae4e5dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 58656fae4e5dSmrg_LT_TAGVAR(hardcode_direct, $1)=no 58666fae4e5dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 58676fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 58686fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 58696fae4e5dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 58706fae4e5dSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 58716fae4e5dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 58726fae4e5dSmrg_LT_TAGVAR(inherit_rpath, $1)=no 58736fae4e5dSmrg_LT_TAGVAR(module_cmds, $1)= 58746fae4e5dSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 58756fae4e5dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 58766fae4e5dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 58776fae4e5dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 58786fae4e5dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 58796fae4e5dSmrg_LT_TAGVAR(no_undefined_flag, $1)= 58806fae4e5dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 58816fae4e5dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 58821f0ac6a5Smrg 58836fae4e5dSmrg# Source file extension for C++ test sources. 58846fae4e5dSmrgac_ext=cpp 58851f0ac6a5Smrg 58866fae4e5dSmrg# Object file extension for compiled C++ test sources. 58876fae4e5dSmrgobjext=o 58886fae4e5dSmrg_LT_TAGVAR(objext, $1)=$objext 58891f0ac6a5Smrg 58906fae4e5dSmrg# No sense in running all these tests if we already determined that 58916fae4e5dSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 58926fae4e5dSmrg# are currently assumed to apply to all compilers on this platform, 58936fae4e5dSmrg# and will be corrupted by setting them based on a non-working compiler. 58946fae4e5dSmrgif test "$_lt_caught_CXX_error" != yes; then 58956fae4e5dSmrg # Code to be used in simple compile tests 58966fae4e5dSmrg lt_simple_compile_test_code="int some_variable = 0;" 58979c9ff80cSmrg 58986fae4e5dSmrg # Code to be used in simple link tests 58996fae4e5dSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 59001f0ac6a5Smrg 59016fae4e5dSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 59026fae4e5dSmrg _LT_TAG_COMPILER 59031f0ac6a5Smrg 59046fae4e5dSmrg # save warnings/boilerplate of simple test code 59056fae4e5dSmrg _LT_COMPILER_BOILERPLATE 59066fae4e5dSmrg _LT_LINKER_BOILERPLATE 59071f0ac6a5Smrg 59086fae4e5dSmrg # Allow CC to be a program name with arguments. 59096fae4e5dSmrg lt_save_CC=$CC 59106fae4e5dSmrg lt_save_CFLAGS=$CFLAGS 59116fae4e5dSmrg lt_save_LD=$LD 59126fae4e5dSmrg lt_save_GCC=$GCC 59136fae4e5dSmrg GCC=$GXX 59146fae4e5dSmrg lt_save_with_gnu_ld=$with_gnu_ld 59156fae4e5dSmrg lt_save_path_LD=$lt_cv_path_LD 59166fae4e5dSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 59176fae4e5dSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 59186fae4e5dSmrg else 59196fae4e5dSmrg $as_unset lt_cv_prog_gnu_ld 59206fae4e5dSmrg fi 59216fae4e5dSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 59226fae4e5dSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 59236fae4e5dSmrg else 59246fae4e5dSmrg $as_unset lt_cv_path_LD 59256fae4e5dSmrg fi 59266fae4e5dSmrg test -z "${LDCXX+set}" || LD=$LDCXX 59276fae4e5dSmrg CC=${CXX-"c++"} 59286fae4e5dSmrg CFLAGS=$CXXFLAGS 59296fae4e5dSmrg compiler=$CC 59306fae4e5dSmrg _LT_TAGVAR(compiler, $1)=$CC 59316fae4e5dSmrg _LT_CC_BASENAME([$compiler]) 59321f0ac6a5Smrg 59336fae4e5dSmrg if test -n "$compiler"; then 59346fae4e5dSmrg # We don't want -fno-exception when compiling C++ code, so set the 59356fae4e5dSmrg # no_builtin_flag separately 59366fae4e5dSmrg if test "$GXX" = yes; then 59376fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 59386fae4e5dSmrg else 59396fae4e5dSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 59406fae4e5dSmrg fi 59411f0ac6a5Smrg 59426fae4e5dSmrg if test "$GXX" = yes; then 59436fae4e5dSmrg # Set up default GNU C++ configuration 59441f0ac6a5Smrg 59456fae4e5dSmrg LT_PATH_LD 59461f0ac6a5Smrg 59476fae4e5dSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 59486fae4e5dSmrg # archiving commands below assume that GNU ld is being used. 59496fae4e5dSmrg if test "$with_gnu_ld" = yes; then 59506fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 59516fae4e5dSmrg _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' 59521f0ac6a5Smrg 59536fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59546fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 59551f0ac6a5Smrg 59566fae4e5dSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 59576fae4e5dSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 59586fae4e5dSmrg # investigate it a little bit more. (MM) 59596fae4e5dSmrg wlarc='${wl}' 59601f0ac6a5Smrg 59616fae4e5dSmrg # ancient GNU ld didn't support --whole-archive et. al. 59626fae4e5dSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 59636fae4e5dSmrg $GREP 'no-whole-archive' > /dev/null; then 59646fae4e5dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 59656fae4e5dSmrg else 59666fae4e5dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59676fae4e5dSmrg fi 59686fae4e5dSmrg else 59696fae4e5dSmrg with_gnu_ld=no 59706fae4e5dSmrg wlarc= 59711f0ac6a5Smrg 59726fae4e5dSmrg # A generic and very simple default shared library creation 59736fae4e5dSmrg # command for GNU C++ for the case where it uses the native 59746fae4e5dSmrg # linker, instead of GNU ld. If possible, this setting should 59756fae4e5dSmrg # overridden to take advantage of the native linker features on 59766fae4e5dSmrg # the platform it is being used on. 59776fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 59786fae4e5dSmrg fi 59791f0ac6a5Smrg 59806fae4e5dSmrg # Commands to make compiler produce verbose output that lists 59816fae4e5dSmrg # what "hidden" libraries, object files and flags are used when 59826fae4e5dSmrg # linking a shared library. 59836fae4e5dSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 59841f0ac6a5Smrg 59856fae4e5dSmrg else 59866fae4e5dSmrg GXX=no 59876fae4e5dSmrg with_gnu_ld=no 59886fae4e5dSmrg wlarc= 59896fae4e5dSmrg fi 59901f0ac6a5Smrg 59916fae4e5dSmrg # PORTME: fill in a description of your system's C++ link characteristics 59926fae4e5dSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 59936fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 59946fae4e5dSmrg case $host_os in 59956fae4e5dSmrg aix3*) 59966fae4e5dSmrg # FIXME: insert proper C++ library support 59976fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 59986fae4e5dSmrg ;; 59996fae4e5dSmrg aix[[4-9]]*) 60006fae4e5dSmrg if test "$host_cpu" = ia64; then 60016fae4e5dSmrg # On IA64, the linker does run time linking by default, so we don't 60026fae4e5dSmrg # have to do anything special. 60036fae4e5dSmrg aix_use_runtimelinking=no 60046fae4e5dSmrg exp_sym_flag='-Bexport' 60056fae4e5dSmrg no_entry_flag="" 60066fae4e5dSmrg else 60076fae4e5dSmrg aix_use_runtimelinking=no 60081f0ac6a5Smrg 60096fae4e5dSmrg # Test if we are trying to use run time linking or normal 60106fae4e5dSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 60116fae4e5dSmrg # need to do runtime linking. 60126fae4e5dSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 60136fae4e5dSmrg for ld_flag in $LDFLAGS; do 60146fae4e5dSmrg case $ld_flag in 60156fae4e5dSmrg *-brtl*) 60166fae4e5dSmrg aix_use_runtimelinking=yes 60176fae4e5dSmrg break 60186fae4e5dSmrg ;; 60196fae4e5dSmrg esac 60206fae4e5dSmrg done 60216fae4e5dSmrg ;; 60226fae4e5dSmrg esac 60231f0ac6a5Smrg 60246fae4e5dSmrg exp_sym_flag='-bexport' 60256fae4e5dSmrg no_entry_flag='-bnoentry' 60266fae4e5dSmrg fi 60271f0ac6a5Smrg 60286fae4e5dSmrg # When large executables or shared objects are built, AIX ld can 60296fae4e5dSmrg # have problems creating the table of contents. If linking a library 60306fae4e5dSmrg # or program results in "error TOC overflow" add -mminimal-toc to 60316fae4e5dSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 60326fae4e5dSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 60331f0ac6a5Smrg 60346fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='' 60356fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 60366fae4e5dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 60376fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60386fae4e5dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60396fae4e5dSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 60401f0ac6a5Smrg 60416fae4e5dSmrg if test "$GXX" = yes; then 60426fae4e5dSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 60436fae4e5dSmrg # We only want to do this on AIX 4.2 and lower, the check 60446fae4e5dSmrg # below for broken collect2 doesn't work under 4.3+ 60456fae4e5dSmrg collect2name=`${CC} -print-prog-name=collect2` 60466fae4e5dSmrg if test -f "$collect2name" && 60476fae4e5dSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 60486fae4e5dSmrg then 60496fae4e5dSmrg # We have reworked collect2 60506fae4e5dSmrg : 60516fae4e5dSmrg else 60526fae4e5dSmrg # We have old collect2 60536fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 60546fae4e5dSmrg # It fails to find uninstalled libraries when the uninstalled 60556fae4e5dSmrg # path is not listed in the libpath. Setting hardcode_minus_L 60566fae4e5dSmrg # to unsupported forces relinking 60576fae4e5dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 60586fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60596fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 60606fae4e5dSmrg fi 60616fae4e5dSmrg esac 60626fae4e5dSmrg shared_flag='-shared' 60636fae4e5dSmrg if test "$aix_use_runtimelinking" = yes; then 60646fae4e5dSmrg shared_flag="$shared_flag "'${wl}-G' 60656fae4e5dSmrg fi 60666fae4e5dSmrg else 60676fae4e5dSmrg # not using gcc 60686fae4e5dSmrg if test "$host_cpu" = ia64; then 60696fae4e5dSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 60706fae4e5dSmrg # chokes on -Wl,-G. The following line is correct: 60716fae4e5dSmrg shared_flag='-G' 60726fae4e5dSmrg else 60736fae4e5dSmrg if test "$aix_use_runtimelinking" = yes; then 60746fae4e5dSmrg shared_flag='${wl}-G' 60756fae4e5dSmrg else 60766fae4e5dSmrg shared_flag='${wl}-bM:SRE' 60776fae4e5dSmrg fi 60786fae4e5dSmrg fi 60796fae4e5dSmrg fi 60801f0ac6a5Smrg 60816fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 60826fae4e5dSmrg # It seems that -bexpall does not export symbols beginning with 60836fae4e5dSmrg # underscore (_), so it is better to generate a list of symbols to 60846fae4e5dSmrg # export. 60856fae4e5dSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 60866fae4e5dSmrg if test "$aix_use_runtimelinking" = yes; then 60876fae4e5dSmrg # Warning - without using the other runtime loading flags (-brtl), 60886fae4e5dSmrg # -berok will link without error, but may produce a broken library. 60896fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 60906fae4e5dSmrg # Determine the default libpath from the value encoded in an empty 60916fae4e5dSmrg # executable. 60926fae4e5dSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 60936fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60941f0ac6a5Smrg 60956fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 60966fae4e5dSmrg else 60976fae4e5dSmrg if test "$host_cpu" = ia64; then 60986fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 60996fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 61006fae4e5dSmrg _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" 61016fae4e5dSmrg else 61026fae4e5dSmrg # Determine the default libpath from the value encoded in an 61036fae4e5dSmrg # empty executable. 61046fae4e5dSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 61056fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 61066fae4e5dSmrg # Warning - without using the other run time loading flags, 61076fae4e5dSmrg # -berok will link without error, but may produce a broken library. 61086fae4e5dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 61096fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 61106fae4e5dSmrg if test "$with_gnu_ld" = yes; then 61116fae4e5dSmrg # We only use this code for GNU lds that support --whole-archive. 61126fae4e5dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 61136fae4e5dSmrg else 61146fae4e5dSmrg # Exported symbols can be pulled into shared objects from archives 61156fae4e5dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 61166fae4e5dSmrg fi 61176fae4e5dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61186fae4e5dSmrg # This is similar to how AIX traditionally builds its shared 61196fae4e5dSmrg # libraries. 61206fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 61216fae4e5dSmrg fi 61226fae4e5dSmrg fi 61236fae4e5dSmrg ;; 61246fae4e5dSmrg 61256fae4e5dSmrg beos*) 61266fae4e5dSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 61276fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61286fae4e5dSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 61296fae4e5dSmrg # support --undefined. This deserves some investigation. FIXME 61306fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 61316fae4e5dSmrg else 61326fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 61336fae4e5dSmrg fi 61346fae4e5dSmrg ;; 61356fae4e5dSmrg 61366fae4e5dSmrg chorus*) 61376fae4e5dSmrg case $cc_basename in 61386fae4e5dSmrg *) 61396fae4e5dSmrg # FIXME: insert proper C++ library support 61406fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 61419c9ff80cSmrg ;; 61426fae4e5dSmrg esac 61436fae4e5dSmrg ;; 61446fae4e5dSmrg 61456fae4e5dSmrg cygwin* | mingw* | pw32* | cegcc*) 61466fae4e5dSmrg case $GXX,$cc_basename in 61476fae4e5dSmrg ,cl* | no,cl*) 61486fae4e5dSmrg # Native MSVC 61496fae4e5dSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 61506fae4e5dSmrg # no search path for DLLs. 61516fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 61526fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61536fae4e5dSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 61546fae4e5dSmrg _LT_TAGVAR(file_list_spec, $1)='@' 61556fae4e5dSmrg # Tell ltmain to make .lib files, not .a files. 61566fae4e5dSmrg libext=lib 61576fae4e5dSmrg # Tell ltmain to make .dll files, not .so files. 61586fae4e5dSmrg shrext_cmds=".dll" 61596fae4e5dSmrg # FIXME: Setting linknames here is a bad hack. 61606fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 61616fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 61626fae4e5dSmrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 61636fae4e5dSmrg else 61646fae4e5dSmrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 61656fae4e5dSmrg fi~ 61666fae4e5dSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 61676fae4e5dSmrg linknames=' 61686fae4e5dSmrg # The linker will not automatically build a static lib if we build a DLL. 61696fae4e5dSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 61706fae4e5dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 61716fae4e5dSmrg # Don't use ranlib 61726fae4e5dSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 61736fae4e5dSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 61746fae4e5dSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 61756fae4e5dSmrg case $lt_outputfile in 61766fae4e5dSmrg *.exe|*.EXE) ;; 61776fae4e5dSmrg *) 61786fae4e5dSmrg lt_outputfile="$lt_outputfile.exe" 61796fae4e5dSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 61806fae4e5dSmrg ;; 61816fae4e5dSmrg esac~ 61826fae4e5dSmrg func_to_tool_file "$lt_outputfile"~ 61836fae4e5dSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 61846fae4e5dSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 61856fae4e5dSmrg $RM "$lt_outputfile.manifest"; 61866fae4e5dSmrg fi' 61879c9ff80cSmrg ;; 61889c9ff80cSmrg *) 61896fae4e5dSmrg # g++ 61906fae4e5dSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 61916fae4e5dSmrg # as there is no search path for DLLs. 61926fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61936fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 61946fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61956fae4e5dSmrg _LT_TAGVAR(always_export_symbols, $1)=no 61966fae4e5dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 61976fae4e5dSmrg 61986fae4e5dSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 61996fae4e5dSmrg _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' 62006fae4e5dSmrg # If the export-symbols file already is a .def file (1st line 62016fae4e5dSmrg # is EXPORTS), use it as is; otherwise, prepend... 62026fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 62036fae4e5dSmrg cp $export_symbols $output_objdir/$soname.def; 62046fae4e5dSmrg else 62056fae4e5dSmrg echo EXPORTS > $output_objdir/$soname.def; 62066fae4e5dSmrg cat $export_symbols >> $output_objdir/$soname.def; 62076fae4e5dSmrg fi~ 62086fae4e5dSmrg $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' 62096fae4e5dSmrg else 62106fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62116fae4e5dSmrg fi 62129c9ff80cSmrg ;; 62139c9ff80cSmrg esac 62146fae4e5dSmrg ;; 62156fae4e5dSmrg darwin* | rhapsody*) 62166fae4e5dSmrg _LT_DARWIN_LINKER_FEATURES($1) 62176fae4e5dSmrg ;; 62181f0ac6a5Smrg 62196fae4e5dSmrg dgux*) 62206fae4e5dSmrg case $cc_basename in 62216fae4e5dSmrg ec++*) 62226fae4e5dSmrg # FIXME: insert proper C++ library support 62236fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62246fae4e5dSmrg ;; 62256fae4e5dSmrg ghcx*) 62266fae4e5dSmrg # Green Hills C++ Compiler 62276fae4e5dSmrg # FIXME: insert proper C++ library support 62286fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62296fae4e5dSmrg ;; 62306fae4e5dSmrg *) 62316fae4e5dSmrg # FIXME: insert proper C++ library support 62326fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62336fae4e5dSmrg ;; 62346fae4e5dSmrg esac 62356fae4e5dSmrg ;; 62361f0ac6a5Smrg 623789c04b6cSmrg freebsd2.*) 62386fae4e5dSmrg # C++ shared libraries reported to be fairly broken before 62396fae4e5dSmrg # switch to ELF 62406fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62416fae4e5dSmrg ;; 62421f0ac6a5Smrg 62436fae4e5dSmrg freebsd-elf*) 62446fae4e5dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 62456fae4e5dSmrg ;; 62461f0ac6a5Smrg 62476fae4e5dSmrg freebsd* | dragonfly*) 62486fae4e5dSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 62496fae4e5dSmrg # conventions 62506fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 62516fae4e5dSmrg ;; 62521f0ac6a5Smrg 62536fae4e5dSmrg haiku*) 62546fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 62556fae4e5dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 62566fae4e5dSmrg ;; 62571f0ac6a5Smrg 62586fae4e5dSmrg hpux9*) 62596fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62606fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62616fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62626fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 62636fae4e5dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 62646fae4e5dSmrg # but as the default 62656fae4e5dSmrg # location of the library. 62666fae4e5dSmrg 62676fae4e5dSmrg case $cc_basename in 62686fae4e5dSmrg CC*) 62696fae4e5dSmrg # FIXME: insert proper C++ library support 62706fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62716fae4e5dSmrg ;; 62726fae4e5dSmrg aCC*) 62736fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 62746fae4e5dSmrg # Commands to make compiler produce verbose output that lists 62756fae4e5dSmrg # what "hidden" libraries, object files and flags are used when 62766fae4e5dSmrg # linking a shared library. 62776fae4e5dSmrg # 62786fae4e5dSmrg # There doesn't appear to be a way to prevent this compiler from 62796fae4e5dSmrg # explicitly linking system object files so we need to strip them 62806fae4e5dSmrg # from the output so that they don't get included in the library 62816fae4e5dSmrg # dependencies. 62826fae4e5dSmrg 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"' 62836fae4e5dSmrg ;; 62846fae4e5dSmrg *) 62856fae4e5dSmrg if test "$GXX" = yes; then 62866fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 62876fae4e5dSmrg else 62886fae4e5dSmrg # FIXME: insert proper C++ library support 62896fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62906fae4e5dSmrg fi 62916fae4e5dSmrg ;; 62926fae4e5dSmrg esac 62936fae4e5dSmrg ;; 62946fae4e5dSmrg 62956fae4e5dSmrg hpux10*|hpux11*) 62966fae4e5dSmrg if test $with_gnu_ld = no; then 62976fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62986fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62996fae4e5dSmrg 63006fae4e5dSmrg case $host_cpu in 63016fae4e5dSmrg hppa*64*|ia64*) 63026fae4e5dSmrg ;; 63036fae4e5dSmrg *) 63046fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63056fae4e5dSmrg ;; 63066fae4e5dSmrg esac 63076fae4e5dSmrg fi 63086fae4e5dSmrg case $host_cpu in 63096fae4e5dSmrg hppa*64*|ia64*) 63106fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 63116fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63126fae4e5dSmrg ;; 63136fae4e5dSmrg *) 63146fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 63156fae4e5dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63166fae4e5dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 63176fae4e5dSmrg # but as the default 63186fae4e5dSmrg # location of the library. 63196fae4e5dSmrg ;; 63206fae4e5dSmrg esac 63216fae4e5dSmrg 63226fae4e5dSmrg case $cc_basename in 63236fae4e5dSmrg CC*) 63246fae4e5dSmrg # FIXME: insert proper C++ library support 63256fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 63266fae4e5dSmrg ;; 63276fae4e5dSmrg aCC*) 63286fae4e5dSmrg case $host_cpu in 63296fae4e5dSmrg hppa*64*) 63306fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63316fae4e5dSmrg ;; 63326fae4e5dSmrg ia64*) 63336fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63346fae4e5dSmrg ;; 63356fae4e5dSmrg *) 63366fae4e5dSmrg _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' 63376fae4e5dSmrg ;; 63386fae4e5dSmrg esac 63396fae4e5dSmrg # Commands to make compiler produce verbose output that lists 63406fae4e5dSmrg # what "hidden" libraries, object files and flags are used when 63416fae4e5dSmrg # linking a shared library. 63426fae4e5dSmrg # 63436fae4e5dSmrg # There doesn't appear to be a way to prevent this compiler from 63446fae4e5dSmrg # explicitly linking system object files so we need to strip them 63456fae4e5dSmrg # from the output so that they don't get included in the library 63466fae4e5dSmrg # dependencies. 63476fae4e5dSmrg 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"' 63486fae4e5dSmrg ;; 63496fae4e5dSmrg *) 63506fae4e5dSmrg if test "$GXX" = yes; then 63516fae4e5dSmrg if test $with_gnu_ld = no; then 63526fae4e5dSmrg case $host_cpu in 63536fae4e5dSmrg hppa*64*) 63546fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63556fae4e5dSmrg ;; 63566fae4e5dSmrg ia64*) 63576fae4e5dSmrg _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' 63586fae4e5dSmrg ;; 63596fae4e5dSmrg *) 63606fae4e5dSmrg _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' 63616fae4e5dSmrg ;; 63626fae4e5dSmrg esac 63636fae4e5dSmrg fi 63646fae4e5dSmrg else 63656fae4e5dSmrg # FIXME: insert proper C++ library support 63666fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 63676fae4e5dSmrg fi 63686fae4e5dSmrg ;; 63696fae4e5dSmrg esac 63706fae4e5dSmrg ;; 63716fae4e5dSmrg 63726fae4e5dSmrg interix[[3-9]]*) 63736fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 63749c9ff80cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63756fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 63766fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63776fae4e5dSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 63786fae4e5dSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 63796fae4e5dSmrg # default) and relocated if they conflict, which is a slow very memory 63806fae4e5dSmrg # consuming and fragmenting process. To avoid this, we pick a random, 63816fae4e5dSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 63826fae4e5dSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 63836fae4e5dSmrg _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' 63846fae4e5dSmrg _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' 63856fae4e5dSmrg ;; 63866fae4e5dSmrg irix5* | irix6*) 63876fae4e5dSmrg case $cc_basename in 63886fae4e5dSmrg CC*) 63896fae4e5dSmrg # SGI C++ 63906fae4e5dSmrg _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' 63911f0ac6a5Smrg 63926fae4e5dSmrg # Archives containing C++ object files must be created using 63936fae4e5dSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 63946fae4e5dSmrg # necessary to make sure instantiated templates are included 63956fae4e5dSmrg # in the archive. 63966fae4e5dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 63976fae4e5dSmrg ;; 63986fae4e5dSmrg *) 63996fae4e5dSmrg if test "$GXX" = yes; then 64006fae4e5dSmrg if test "$with_gnu_ld" = no; then 64016fae4e5dSmrg _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' 64026fae4e5dSmrg else 64036fae4e5dSmrg _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' 64046fae4e5dSmrg fi 64056fae4e5dSmrg fi 64066fae4e5dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 64076fae4e5dSmrg ;; 64086fae4e5dSmrg esac 64096fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64106fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64116fae4e5dSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 64126fae4e5dSmrg ;; 64131f0ac6a5Smrg 64142fd96bc7Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 64156fae4e5dSmrg case $cc_basename in 64166fae4e5dSmrg KCC*) 64176fae4e5dSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 64181f0ac6a5Smrg 64196fae4e5dSmrg # KCC will only create a shared library if the output file 64206fae4e5dSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 64216fae4e5dSmrg # to its proper name (with version) after linking. 64226fae4e5dSmrg _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' 64236fae4e5dSmrg _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' 64246fae4e5dSmrg # Commands to make compiler produce verbose output that lists 64256fae4e5dSmrg # what "hidden" libraries, object files and flags are used when 64266fae4e5dSmrg # linking a shared library. 64276fae4e5dSmrg # 64286fae4e5dSmrg # There doesn't appear to be a way to prevent this compiler from 64296fae4e5dSmrg # explicitly linking system object files so we need to strip them 64306fae4e5dSmrg # from the output so that they don't get included in the library 64316fae4e5dSmrg # dependencies. 64326fae4e5dSmrg 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"' 64331f0ac6a5Smrg 64346fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64356fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64361f0ac6a5Smrg 64376fae4e5dSmrg # Archives containing C++ object files must be created using 64386fae4e5dSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 64396fae4e5dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 64406fae4e5dSmrg ;; 64416fae4e5dSmrg icpc* | ecpc* ) 64426fae4e5dSmrg # Intel C++ 64436fae4e5dSmrg with_gnu_ld=yes 64446fae4e5dSmrg # version 8.0 and above of icpc choke on multiply defined symbols 64456fae4e5dSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 64466fae4e5dSmrg # earlier do not add the objects themselves. 64476fae4e5dSmrg case `$CC -V 2>&1` in 64486fae4e5dSmrg *"Version 7."*) 64496fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 64506fae4e5dSmrg _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' 64516fae4e5dSmrg ;; 64526fae4e5dSmrg *) # Version 8.0 or newer 64536fae4e5dSmrg tmp_idyn= 64546fae4e5dSmrg case $host_cpu in 64556fae4e5dSmrg ia64*) tmp_idyn=' -i_dynamic';; 64566fae4e5dSmrg esac 64576fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 64586fae4e5dSmrg _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' 64596fae4e5dSmrg ;; 64606fae4e5dSmrg esac 64616fae4e5dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 64626fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64636fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64646fae4e5dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 64656fae4e5dSmrg ;; 64666fae4e5dSmrg pgCC* | pgcpp*) 64676fae4e5dSmrg # Portland Group C++ compiler 64686fae4e5dSmrg case `$CC -V` in 64696fae4e5dSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 64706fae4e5dSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 64716fae4e5dSmrg rm -rf $tpldir~ 64726fae4e5dSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 64736fae4e5dSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 64746fae4e5dSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 64756fae4e5dSmrg rm -rf $tpldir~ 64766fae4e5dSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 64776fae4e5dSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 64786fae4e5dSmrg $RANLIB $oldlib' 64796fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 64806fae4e5dSmrg rm -rf $tpldir~ 64816fae4e5dSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 64826fae4e5dSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64836fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 64846fae4e5dSmrg rm -rf $tpldir~ 64856fae4e5dSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 64866fae4e5dSmrg $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' 64876fae4e5dSmrg ;; 64886fae4e5dSmrg *) # Version 6 and above use weak symbols 64896fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64906fae4e5dSmrg _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' 64916fae4e5dSmrg ;; 64926fae4e5dSmrg esac 64931f0ac6a5Smrg 64946fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 64956fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64966fae4e5dSmrg _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' 64976fae4e5dSmrg ;; 64986fae4e5dSmrg cxx*) 64996fae4e5dSmrg # Compaq C++ 65006fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 65016fae4e5dSmrg _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' 65021f0ac6a5Smrg 65036fae4e5dSmrg runpath_var=LD_RUN_PATH 65046fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 65056fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65061f0ac6a5Smrg 65076fae4e5dSmrg # Commands to make compiler produce verbose output that lists 65086fae4e5dSmrg # what "hidden" libraries, object files and flags are used when 65096fae4e5dSmrg # linking a shared library. 65106fae4e5dSmrg # 65116fae4e5dSmrg # There doesn't appear to be a way to prevent this compiler from 65126fae4e5dSmrg # explicitly linking system object files so we need to strip them 65136fae4e5dSmrg # from the output so that they don't get included in the library 65146fae4e5dSmrg # dependencies. 65156fae4e5dSmrg 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' 65166fae4e5dSmrg ;; 65176fae4e5dSmrg xl* | mpixl* | bgxl*) 65186fae4e5dSmrg # IBM XL 8.0 on PPC, with GNU ld 65196fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65206fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 65216fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 65226fae4e5dSmrg if test "x$supports_anon_versioning" = xyes; then 65236fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 65246fae4e5dSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 65256fae4e5dSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 65266fae4e5dSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 65276fae4e5dSmrg fi 65286fae4e5dSmrg ;; 65296fae4e5dSmrg *) 65306fae4e5dSmrg case `$CC -V 2>&1 | sed 5q` in 65316fae4e5dSmrg *Sun\ C*) 65326fae4e5dSmrg # Sun C++ 5.9 65336fae4e5dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 65346fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 65356fae4e5dSmrg _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' 65366fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65376fae4e5dSmrg _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' 65386fae4e5dSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 65391f0ac6a5Smrg 65406fae4e5dSmrg # Not sure whether something based on 65416fae4e5dSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 65426fae4e5dSmrg # would be better. 65436fae4e5dSmrg output_verbose_link_cmd='func_echo_all' 65441f0ac6a5Smrg 65456fae4e5dSmrg # Archives containing C++ object files must be created using 65466fae4e5dSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 65476fae4e5dSmrg # necessary to make sure instantiated templates are included 65486fae4e5dSmrg # in the archive. 65496fae4e5dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 65506fae4e5dSmrg ;; 65516fae4e5dSmrg esac 65526fae4e5dSmrg ;; 65536fae4e5dSmrg esac 65546fae4e5dSmrg ;; 65551f0ac6a5Smrg 65566fae4e5dSmrg lynxos*) 65576fae4e5dSmrg # FIXME: insert proper C++ library support 65586fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65596fae4e5dSmrg ;; 65601f0ac6a5Smrg 65616fae4e5dSmrg m88k*) 65626fae4e5dSmrg # FIXME: insert proper C++ library support 65636fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65646fae4e5dSmrg ;; 65651f0ac6a5Smrg 65666fae4e5dSmrg mvs*) 65676fae4e5dSmrg case $cc_basename in 65686fae4e5dSmrg cxx*) 65696fae4e5dSmrg # FIXME: insert proper C++ library support 65706fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65716fae4e5dSmrg ;; 65726fae4e5dSmrg *) 65736fae4e5dSmrg # FIXME: insert proper C++ library support 65746fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65756fae4e5dSmrg ;; 65766fae4e5dSmrg esac 65776fae4e5dSmrg ;; 65781f0ac6a5Smrg 65796fae4e5dSmrg netbsd*) 65806fae4e5dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 65816fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 65826fae4e5dSmrg wlarc= 65836fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65846fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 65856fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65866fae4e5dSmrg fi 65876fae4e5dSmrg # Workaround some broken pre-1.5 toolchains 65886fae4e5dSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 65896fae4e5dSmrg ;; 65901f0ac6a5Smrg 65916fae4e5dSmrg *nto* | *qnx*) 65926fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 65936fae4e5dSmrg ;; 65941f0ac6a5Smrg 65956fae4e5dSmrg openbsd2*) 65966fae4e5dSmrg # C++ shared libraries are fairly broken 65976fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65989c9ff80cSmrg ;; 65991f0ac6a5Smrg 66006fae4e5dSmrg openbsd*) 66016fae4e5dSmrg if test -f /usr/libexec/ld.so; then 66026fae4e5dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 66036fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66046fae4e5dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 66056fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 66066fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 66076fae4e5dSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 66086fae4e5dSmrg _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' 66096fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 66106fae4e5dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 66116fae4e5dSmrg fi 66126fae4e5dSmrg output_verbose_link_cmd=func_echo_all 66136fae4e5dSmrg else 66146fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66156fae4e5dSmrg fi 66166fae4e5dSmrg ;; 66171f0ac6a5Smrg 66186fae4e5dSmrg osf3* | osf4* | osf5*) 66196fae4e5dSmrg case $cc_basename in 66206fae4e5dSmrg KCC*) 66216fae4e5dSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 66221f0ac6a5Smrg 66236fae4e5dSmrg # KCC will only create a shared library if the output file 66246fae4e5dSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 66256fae4e5dSmrg # to its proper name (with version) after linking. 66266fae4e5dSmrg _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' 66271f0ac6a5Smrg 66286fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 66296fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66301f0ac6a5Smrg 66316fae4e5dSmrg # Archives containing C++ object files must be created using 66326fae4e5dSmrg # the KAI C++ compiler. 66336fae4e5dSmrg case $host in 66346fae4e5dSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 66356fae4e5dSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 66366fae4e5dSmrg esac 66376fae4e5dSmrg ;; 66386fae4e5dSmrg RCC*) 66396fae4e5dSmrg # Rational C++ 2.4.1 66406fae4e5dSmrg # FIXME: insert proper C++ library support 66416fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66426fae4e5dSmrg ;; 66436fae4e5dSmrg cxx*) 66446fae4e5dSmrg case $host in 66456fae4e5dSmrg osf3*) 66466fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 66476fae4e5dSmrg _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' 66486fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66496fae4e5dSmrg ;; 66506fae4e5dSmrg *) 66516fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 66526fae4e5dSmrg _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' 66536fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 66546fae4e5dSmrg echo "-hidden">> $lib.exp~ 66556fae4e5dSmrg $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~ 66566fae4e5dSmrg $RM $lib.exp' 66576fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 66586fae4e5dSmrg ;; 66596fae4e5dSmrg esac 66609c9ff80cSmrg 66616fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66629c9ff80cSmrg 66636fae4e5dSmrg # Commands to make compiler produce verbose output that lists 66646fae4e5dSmrg # what "hidden" libraries, object files and flags are used when 66656fae4e5dSmrg # linking a shared library. 66666fae4e5dSmrg # 66676fae4e5dSmrg # There doesn't appear to be a way to prevent this compiler from 66686fae4e5dSmrg # explicitly linking system object files so we need to strip them 66696fae4e5dSmrg # from the output so that they don't get included in the library 66706fae4e5dSmrg # dependencies. 66716fae4e5dSmrg 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"' 66726fae4e5dSmrg ;; 66736fae4e5dSmrg *) 66746fae4e5dSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 66756fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 66766fae4e5dSmrg case $host in 66776fae4e5dSmrg osf3*) 66786fae4e5dSmrg _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' 66796fae4e5dSmrg ;; 66806fae4e5dSmrg *) 66816fae4e5dSmrg _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' 66826fae4e5dSmrg ;; 66836fae4e5dSmrg esac 66841f0ac6a5Smrg 66856fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66866fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66871f0ac6a5Smrg 66886fae4e5dSmrg # Commands to make compiler produce verbose output that lists 66896fae4e5dSmrg # what "hidden" libraries, object files and flags are used when 66906fae4e5dSmrg # linking a shared library. 66916fae4e5dSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 66921f0ac6a5Smrg 66936fae4e5dSmrg else 66946fae4e5dSmrg # FIXME: insert proper C++ library support 66956fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66966fae4e5dSmrg fi 66976fae4e5dSmrg ;; 66986fae4e5dSmrg esac 66996fae4e5dSmrg ;; 67001f0ac6a5Smrg 67016fae4e5dSmrg psos*) 67026fae4e5dSmrg # FIXME: insert proper C++ library support 67036fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67046fae4e5dSmrg ;; 67051f0ac6a5Smrg 67066fae4e5dSmrg sunos4*) 67076fae4e5dSmrg case $cc_basename in 67086fae4e5dSmrg CC*) 67096fae4e5dSmrg # Sun C++ 4.x 67106fae4e5dSmrg # FIXME: insert proper C++ library support 67116fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67126fae4e5dSmrg ;; 67136fae4e5dSmrg lcc*) 67146fae4e5dSmrg # Lucid 67156fae4e5dSmrg # FIXME: insert proper C++ library support 67166fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67176fae4e5dSmrg ;; 67186fae4e5dSmrg *) 67196fae4e5dSmrg # FIXME: insert proper C++ library support 67206fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67216fae4e5dSmrg ;; 67226fae4e5dSmrg esac 67236fae4e5dSmrg ;; 67241f0ac6a5Smrg 67256fae4e5dSmrg solaris*) 67266fae4e5dSmrg case $cc_basename in 67276fae4e5dSmrg CC* | sunCC*) 67286fae4e5dSmrg # Sun C++ 4.2, 5.x and Centerline C++ 67296fae4e5dSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 67306fae4e5dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 67316fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 67326fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67336fae4e5dSmrg $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' 67341f0ac6a5Smrg 67356fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 67366fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67376fae4e5dSmrg case $host_os in 67386fae4e5dSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67396fae4e5dSmrg *) 67406fae4e5dSmrg # The compiler driver will combine and reorder linker options, 67416fae4e5dSmrg # but understands `-z linker_flag'. 67426fae4e5dSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 67436fae4e5dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 67446fae4e5dSmrg ;; 67456fae4e5dSmrg esac 67466fae4e5dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 67479c9ff80cSmrg 67486fae4e5dSmrg output_verbose_link_cmd='func_echo_all' 67499c9ff80cSmrg 67506fae4e5dSmrg # Archives containing C++ object files must be created using 67516fae4e5dSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 67526fae4e5dSmrg # necessary to make sure instantiated templates are included 67536fae4e5dSmrg # in the archive. 67546fae4e5dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 67556fae4e5dSmrg ;; 67566fae4e5dSmrg gcx*) 67576fae4e5dSmrg # Green Hills C++ Compiler 67586fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 67599c9ff80cSmrg 67606fae4e5dSmrg # The C++ compiler must be used to create the archive. 67616fae4e5dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 67626fae4e5dSmrg ;; 67636fae4e5dSmrg *) 67646fae4e5dSmrg # GNU C++ compiler with Solaris linker 67656fae4e5dSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 67666fae4e5dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 67676fae4e5dSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 67686fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 67696fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67706fae4e5dSmrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 67711f0ac6a5Smrg 67726fae4e5dSmrg # Commands to make compiler produce verbose output that lists 67736fae4e5dSmrg # what "hidden" libraries, object files and flags are used when 67746fae4e5dSmrg # linking a shared library. 67756fae4e5dSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67766fae4e5dSmrg else 67776fae4e5dSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 67786fae4e5dSmrg # platform. 67796fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 67806fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67816fae4e5dSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 67821f0ac6a5Smrg 67836fae4e5dSmrg # Commands to make compiler produce verbose output that lists 67846fae4e5dSmrg # what "hidden" libraries, object files and flags are used when 67856fae4e5dSmrg # linking a shared library. 67866fae4e5dSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67876fae4e5dSmrg fi 67881f0ac6a5Smrg 67896fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 67906fae4e5dSmrg case $host_os in 67916fae4e5dSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67926fae4e5dSmrg *) 67936fae4e5dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 67946fae4e5dSmrg ;; 67956fae4e5dSmrg esac 67966fae4e5dSmrg fi 67976fae4e5dSmrg ;; 67986fae4e5dSmrg esac 67996fae4e5dSmrg ;; 68001f0ac6a5Smrg 68016fae4e5dSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 68026fae4e5dSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 68036fae4e5dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 68046fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68056fae4e5dSmrg runpath_var='LD_RUN_PATH' 68061f0ac6a5Smrg 68076fae4e5dSmrg case $cc_basename in 68086fae4e5dSmrg CC*) 68096fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68106fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68116fae4e5dSmrg ;; 68126fae4e5dSmrg *) 68136fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68146fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68156fae4e5dSmrg ;; 68166fae4e5dSmrg esac 68176fae4e5dSmrg ;; 68181f0ac6a5Smrg 68196fae4e5dSmrg sysv5* | sco3.2v5* | sco5v6*) 68206fae4e5dSmrg # Note: We can NOT use -z defs as we might desire, because we do not 68216fae4e5dSmrg # link with -lc, and that would cause any symbols used from libc to 68226fae4e5dSmrg # always be unresolved, which means just about no library would 68236fae4e5dSmrg # ever link correctly. If we're not using GNU ld we use -z text 68246fae4e5dSmrg # though, which does catch some bad symbols but isn't as heavy-handed 68256fae4e5dSmrg # as -z defs. 68266fae4e5dSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 68276fae4e5dSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 68286fae4e5dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 68296fae4e5dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68306fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 68316fae4e5dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 68326fae4e5dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 68336fae4e5dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 68346fae4e5dSmrg runpath_var='LD_RUN_PATH' 68356fae4e5dSmrg 68366fae4e5dSmrg case $cc_basename in 68376fae4e5dSmrg CC*) 68386fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68396fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68406fae4e5dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 68416fae4e5dSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 68426fae4e5dSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 68436fae4e5dSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 68446fae4e5dSmrg ;; 68456fae4e5dSmrg *) 68466fae4e5dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68476fae4e5dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68486fae4e5dSmrg ;; 68496fae4e5dSmrg esac 68506fae4e5dSmrg ;; 68516fae4e5dSmrg 68526fae4e5dSmrg tandem*) 68536fae4e5dSmrg case $cc_basename in 68546fae4e5dSmrg NCC*) 68556fae4e5dSmrg # NonStop-UX NCC 3.20 68566fae4e5dSmrg # FIXME: insert proper C++ library support 68576fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68586fae4e5dSmrg ;; 68596fae4e5dSmrg *) 68606fae4e5dSmrg # FIXME: insert proper C++ library support 68616fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68626fae4e5dSmrg ;; 68636fae4e5dSmrg esac 68646fae4e5dSmrg ;; 68656fae4e5dSmrg 68666fae4e5dSmrg vxworks*) 68676fae4e5dSmrg # FIXME: insert proper C++ library support 68686fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68696fae4e5dSmrg ;; 68701f0ac6a5Smrg 68716fae4e5dSmrg *) 68726fae4e5dSmrg # FIXME: insert proper C++ library support 68736fae4e5dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68746fae4e5dSmrg ;; 68756fae4e5dSmrg esac 68761f0ac6a5Smrg 68776fae4e5dSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 68786fae4e5dSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 68799c9ff80cSmrg 68806fae4e5dSmrg _LT_TAGVAR(GCC, $1)="$GXX" 68816fae4e5dSmrg _LT_TAGVAR(LD, $1)="$LD" 68821f0ac6a5Smrg 68836fae4e5dSmrg ## CAVEAT EMPTOR: 68846fae4e5dSmrg ## There is no encapsulation within the following macros, do not change 68856fae4e5dSmrg ## the running order or otherwise move them around unless you know exactly 68866fae4e5dSmrg ## what you are doing... 68876fae4e5dSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 68886fae4e5dSmrg _LT_COMPILER_PIC($1) 68896fae4e5dSmrg _LT_COMPILER_C_O($1) 68906fae4e5dSmrg _LT_COMPILER_FILE_LOCKS($1) 68916fae4e5dSmrg _LT_LINKER_SHLIBS($1) 68926fae4e5dSmrg _LT_SYS_DYNAMIC_LINKER($1) 68936fae4e5dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6894e5410a46Smrg 68956fae4e5dSmrg _LT_CONFIG($1) 68966fae4e5dSmrg fi # test -n "$compiler" 68979c9ff80cSmrg 68986fae4e5dSmrg CC=$lt_save_CC 68996fae4e5dSmrg CFLAGS=$lt_save_CFLAGS 69006fae4e5dSmrg LDCXX=$LD 69016fae4e5dSmrg LD=$lt_save_LD 69026fae4e5dSmrg GCC=$lt_save_GCC 69036fae4e5dSmrg with_gnu_ld=$lt_save_with_gnu_ld 69046fae4e5dSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 69056fae4e5dSmrg lt_cv_path_LD=$lt_save_path_LD 69066fae4e5dSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 69076fae4e5dSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 69086fae4e5dSmrgfi # test "$_lt_caught_CXX_error" != yes 69099c9ff80cSmrg 69106fae4e5dSmrgAC_LANG_POP 69116fae4e5dSmrg])# _LT_LANG_CXX_CONFIG 69129c9ff80cSmrg 69139c9ff80cSmrg 69146fae4e5dSmrg# _LT_FUNC_STRIPNAME_CNF 69156fae4e5dSmrg# ---------------------- 69166fae4e5dSmrg# func_stripname_cnf prefix suffix name 69176fae4e5dSmrg# strip PREFIX and SUFFIX off of NAME. 69186fae4e5dSmrg# PREFIX and SUFFIX must not contain globbing or regex special 69196fae4e5dSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 69206fae4e5dSmrg# dot (in which case that matches only a dot). 69216fae4e5dSmrg# 69226fae4e5dSmrg# This function is identical to the (non-XSI) version of func_stripname, 69236fae4e5dSmrg# except this one can be used by m4 code that may be executed by configure, 69246fae4e5dSmrg# rather than the libtool script. 69256fae4e5dSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 69266fae4e5dSmrgAC_REQUIRE([_LT_DECL_SED]) 69276fae4e5dSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 69286fae4e5dSmrgfunc_stripname_cnf () 69296fae4e5dSmrg{ 69306fae4e5dSmrg case ${2} in 69316fae4e5dSmrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 69326fae4e5dSmrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 69336fae4e5dSmrg esac 69346fae4e5dSmrg} # func_stripname_cnf 69356fae4e5dSmrg])# _LT_FUNC_STRIPNAME_CNF 69369c9ff80cSmrg 69376fae4e5dSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 69386fae4e5dSmrg# --------------------------------- 69396fae4e5dSmrg# Figure out "hidden" library dependencies from verbose 69406fae4e5dSmrg# compiler output when linking a shared library. 69416fae4e5dSmrg# Parse the compiler output and extract the necessary 69426fae4e5dSmrg# objects, libraries and library flags. 69436fae4e5dSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 69446fae4e5dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 69456fae4e5dSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 69466fae4e5dSmrg# Dependencies to place before and after the object being linked: 69476fae4e5dSmrg_LT_TAGVAR(predep_objects, $1)= 69486fae4e5dSmrg_LT_TAGVAR(postdep_objects, $1)= 69496fae4e5dSmrg_LT_TAGVAR(predeps, $1)= 69506fae4e5dSmrg_LT_TAGVAR(postdeps, $1)= 69516fae4e5dSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 69521f0ac6a5Smrg 69536fae4e5dSmrgdnl we can't use the lt_simple_compile_test_code here, 69546fae4e5dSmrgdnl because it contains code intended for an executable, 69556fae4e5dSmrgdnl not a library. It's possible we should let each 69566fae4e5dSmrgdnl tag define a new lt_????_link_test_code variable, 69576fae4e5dSmrgdnl but it's only used here... 69586fae4e5dSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 69596fae4e5dSmrgint a; 69606fae4e5dSmrgvoid foo (void) { a = 0; } 69616fae4e5dSmrg_LT_EOF 69626fae4e5dSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 69636fae4e5dSmrgclass Foo 69646fae4e5dSmrg{ 69656fae4e5dSmrgpublic: 69666fae4e5dSmrg Foo (void) { a = 0; } 69676fae4e5dSmrgprivate: 69686fae4e5dSmrg int a; 69696fae4e5dSmrg}; 69706fae4e5dSmrg_LT_EOF 69716fae4e5dSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 69726fae4e5dSmrg subroutine foo 69736fae4e5dSmrg implicit none 69746fae4e5dSmrg integer*4 a 69756fae4e5dSmrg a=0 69766fae4e5dSmrg return 69776fae4e5dSmrg end 69786fae4e5dSmrg_LT_EOF 69796fae4e5dSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 69806fae4e5dSmrg subroutine foo 69816fae4e5dSmrg implicit none 69826fae4e5dSmrg integer a 69836fae4e5dSmrg a=0 69846fae4e5dSmrg return 69856fae4e5dSmrg end 69866fae4e5dSmrg_LT_EOF 69876fae4e5dSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 69886fae4e5dSmrgpublic class foo { 69896fae4e5dSmrg private int a; 69906fae4e5dSmrg public void bar (void) { 69916fae4e5dSmrg a = 0; 69926fae4e5dSmrg } 69936fae4e5dSmrg}; 69946fae4e5dSmrg_LT_EOF 699589c04b6cSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 699689c04b6cSmrgpackage foo 699789c04b6cSmrgfunc foo() { 699889c04b6cSmrg} 699989c04b6cSmrg_LT_EOF 70006fae4e5dSmrg]) 70011f0ac6a5Smrg 70026fae4e5dSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 70036fae4e5dSmrgcase "$CC $CFLAGS " in #( 70046fae4e5dSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 70056fae4e5dSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 700689c04b6cSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 70076fae4e5dSmrgesac 70081f0ac6a5Smrg 70096fae4e5dSmrgdnl Parse the compiler output and extract the necessary 70106fae4e5dSmrgdnl objects, libraries and library flags. 70116fae4e5dSmrgif AC_TRY_EVAL(ac_compile); then 70126fae4e5dSmrg # Parse the compiler output and extract the necessary 70136fae4e5dSmrg # objects, libraries and library flags. 70141f0ac6a5Smrg 70156fae4e5dSmrg # Sentinel used to keep track of whether or not we are before 70166fae4e5dSmrg # the conftest object file. 70176fae4e5dSmrg pre_test_object_deps_done=no 70181f0ac6a5Smrg 70196fae4e5dSmrg for p in `eval "$output_verbose_link_cmd"`; do 70206fae4e5dSmrg case ${prev}${p} in 70211f0ac6a5Smrg 70226fae4e5dSmrg -L* | -R* | -l*) 70236fae4e5dSmrg # Some compilers place space between "-{L,R}" and the path. 70246fae4e5dSmrg # Remove the space. 70256fae4e5dSmrg if test $p = "-L" || 70266fae4e5dSmrg test $p = "-R"; then 70276fae4e5dSmrg prev=$p 70286fae4e5dSmrg continue 70296fae4e5dSmrg fi 70301f0ac6a5Smrg 70316fae4e5dSmrg # Expand the sysroot to ease extracting the directories later. 70326fae4e5dSmrg if test -z "$prev"; then 70336fae4e5dSmrg case $p in 70346fae4e5dSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 70356fae4e5dSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 70366fae4e5dSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 70376fae4e5dSmrg esac 70386fae4e5dSmrg fi 70396fae4e5dSmrg case $p in 70406fae4e5dSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 70416fae4e5dSmrg esac 70426fae4e5dSmrg if test "$pre_test_object_deps_done" = no; then 70436fae4e5dSmrg case ${prev} in 70446fae4e5dSmrg -L | -R) 70456fae4e5dSmrg # Internal compiler library paths should come after those 70466fae4e5dSmrg # provided the user. The postdeps already come after the 70476fae4e5dSmrg # user supplied libs so there is no need to process them. 70486fae4e5dSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 70496fae4e5dSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 70506fae4e5dSmrg else 70516fae4e5dSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 70526fae4e5dSmrg fi 70536fae4e5dSmrg ;; 70546fae4e5dSmrg # The "-l" case would never come before the object being 70556fae4e5dSmrg # linked, so don't bother handling this case. 70566fae4e5dSmrg esac 70576fae4e5dSmrg else 70586fae4e5dSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 70596fae4e5dSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 70606fae4e5dSmrg else 70616fae4e5dSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 70626fae4e5dSmrg fi 70636fae4e5dSmrg fi 70646fae4e5dSmrg prev= 70656fae4e5dSmrg ;; 70669c9ff80cSmrg 70676fae4e5dSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 70686fae4e5dSmrg *.$objext) 70696fae4e5dSmrg # This assumes that the test object file only shows up 70706fae4e5dSmrg # once in the compiler output. 70716fae4e5dSmrg if test "$p" = "conftest.$objext"; then 70726fae4e5dSmrg pre_test_object_deps_done=yes 70736fae4e5dSmrg continue 70746fae4e5dSmrg fi 70751f0ac6a5Smrg 70766fae4e5dSmrg if test "$pre_test_object_deps_done" = no; then 70776fae4e5dSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 70786fae4e5dSmrg _LT_TAGVAR(predep_objects, $1)="$p" 70796fae4e5dSmrg else 70806fae4e5dSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 70816fae4e5dSmrg fi 70826fae4e5dSmrg else 70836fae4e5dSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 70846fae4e5dSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 70856fae4e5dSmrg else 70866fae4e5dSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 70876fae4e5dSmrg fi 70886fae4e5dSmrg fi 70896fae4e5dSmrg ;; 70901f0ac6a5Smrg 70916fae4e5dSmrg *) ;; # Ignore the rest. 70921f0ac6a5Smrg 70936fae4e5dSmrg esac 70946fae4e5dSmrg done 70959c9ff80cSmrg 70966fae4e5dSmrg # Clean up. 70976fae4e5dSmrg rm -f a.out a.exe 70986fae4e5dSmrgelse 70996fae4e5dSmrg echo "libtool.m4: error: problem compiling $1 test program" 71006fae4e5dSmrgfi 71011f0ac6a5Smrg 71026fae4e5dSmrg$RM -f confest.$objext 71036fae4e5dSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 71041f0ac6a5Smrg 71056fae4e5dSmrg# PORTME: override above test on systems where it is broken 71066fae4e5dSmrgm4_if([$1], [CXX], 71076fae4e5dSmrg[case $host_os in 71086fae4e5dSmrginterix[[3-9]]*) 71096fae4e5dSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 71106fae4e5dSmrg # hack all around it, let's just trust "g++" to DTRT. 71116fae4e5dSmrg _LT_TAGVAR(predep_objects,$1)= 71126fae4e5dSmrg _LT_TAGVAR(postdep_objects,$1)= 71136fae4e5dSmrg _LT_TAGVAR(postdeps,$1)= 71146fae4e5dSmrg ;; 71159c9ff80cSmrg 71166fae4e5dSmrglinux*) 71176fae4e5dSmrg case `$CC -V 2>&1 | sed 5q` in 71186fae4e5dSmrg *Sun\ C*) 71196fae4e5dSmrg # Sun C++ 5.9 71209c9ff80cSmrg 71216fae4e5dSmrg # The more standards-conforming stlport4 library is 71226fae4e5dSmrg # incompatible with the Cstd library. Avoid specifying 71236fae4e5dSmrg # it if it's in CXXFLAGS. Ignore libCrun as 71246fae4e5dSmrg # -library=stlport4 depends on it. 71256fae4e5dSmrg case " $CXX $CXXFLAGS " in 71266fae4e5dSmrg *" -library=stlport4 "*) 71276fae4e5dSmrg solaris_use_stlport4=yes 71286fae4e5dSmrg ;; 71296fae4e5dSmrg esac 71301f0ac6a5Smrg 71316fae4e5dSmrg if test "$solaris_use_stlport4" != yes; then 71326fae4e5dSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 71336fae4e5dSmrg fi 71346fae4e5dSmrg ;; 71356fae4e5dSmrg esac 71366fae4e5dSmrg ;; 71379c9ff80cSmrg 71386fae4e5dSmrgsolaris*) 71396fae4e5dSmrg case $cc_basename in 71406fae4e5dSmrg CC* | sunCC*) 71416fae4e5dSmrg # The more standards-conforming stlport4 library is 71426fae4e5dSmrg # incompatible with the Cstd library. Avoid specifying 71436fae4e5dSmrg # it if it's in CXXFLAGS. Ignore libCrun as 71446fae4e5dSmrg # -library=stlport4 depends on it. 71456fae4e5dSmrg case " $CXX $CXXFLAGS " in 71466fae4e5dSmrg *" -library=stlport4 "*) 71476fae4e5dSmrg solaris_use_stlport4=yes 71486fae4e5dSmrg ;; 71496fae4e5dSmrg esac 71501f0ac6a5Smrg 71516fae4e5dSmrg # Adding this requires a known-good setup of shared libraries for 71526fae4e5dSmrg # Sun compiler versions before 5.6, else PIC objects from an old 71536fae4e5dSmrg # archive will be linked into the output, leading to subtle bugs. 71546fae4e5dSmrg if test "$solaris_use_stlport4" != yes; then 71556fae4e5dSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 71566fae4e5dSmrg fi 71576fae4e5dSmrg ;; 71586fae4e5dSmrg esac 71596fae4e5dSmrg ;; 71606fae4e5dSmrgesac 71616fae4e5dSmrg]) 71621f0ac6a5Smrg 71636fae4e5dSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 71646fae4e5dSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 71656fae4e5dSmrgesac 71666fae4e5dSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 71676fae4e5dSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 71686fae4e5dSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 71696fae4e5dSmrgfi 71706fae4e5dSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 71716fae4e5dSmrg [The directories searched by this compiler when creating a shared library]) 71726fae4e5dSmrg_LT_TAGDECL([], [predep_objects], [1], 71736fae4e5dSmrg [Dependencies to place before and after the objects being linked to 71746fae4e5dSmrg create a shared library]) 71756fae4e5dSmrg_LT_TAGDECL([], [postdep_objects], [1]) 71766fae4e5dSmrg_LT_TAGDECL([], [predeps], [1]) 71776fae4e5dSmrg_LT_TAGDECL([], [postdeps], [1]) 71786fae4e5dSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 71796fae4e5dSmrg [The library search path used internally by the compiler when linking 71806fae4e5dSmrg a shared library]) 71816fae4e5dSmrg])# _LT_SYS_HIDDEN_LIBDEPS 71821f0ac6a5Smrg 71831f0ac6a5Smrg 71846fae4e5dSmrg# _LT_LANG_F77_CONFIG([TAG]) 71856fae4e5dSmrg# -------------------------- 71866fae4e5dSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 71876fae4e5dSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 71886fae4e5dSmrg# to write the compiler configuration to `libtool'. 71896fae4e5dSmrgm4_defun([_LT_LANG_F77_CONFIG], 71906fae4e5dSmrg[AC_LANG_PUSH(Fortran 77) 71916fae4e5dSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 71926fae4e5dSmrg _lt_disable_F77=yes 71936fae4e5dSmrgfi 71946fae4e5dSmrg 71956fae4e5dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 71966fae4e5dSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 71976fae4e5dSmrg_LT_TAGVAR(always_export_symbols, $1)=no 71986fae4e5dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 71996fae4e5dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 72006fae4e5dSmrg_LT_TAGVAR(hardcode_direct, $1)=no 72016fae4e5dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 72026fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 72036fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 72046fae4e5dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 72056fae4e5dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 72066fae4e5dSmrg_LT_TAGVAR(inherit_rpath, $1)=no 72076fae4e5dSmrg_LT_TAGVAR(module_cmds, $1)= 72086fae4e5dSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 72096fae4e5dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 72106fae4e5dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 72116fae4e5dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 72126fae4e5dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 72136fae4e5dSmrg_LT_TAGVAR(no_undefined_flag, $1)= 72146fae4e5dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 72156fae4e5dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 72161f0ac6a5Smrg 72176fae4e5dSmrg# Source file extension for f77 test sources. 72186fae4e5dSmrgac_ext=f 72191f0ac6a5Smrg 72206fae4e5dSmrg# Object file extension for compiled f77 test sources. 72216fae4e5dSmrgobjext=o 72226fae4e5dSmrg_LT_TAGVAR(objext, $1)=$objext 72231f0ac6a5Smrg 72246fae4e5dSmrg# No sense in running all these tests if we already determined that 72256fae4e5dSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 72266fae4e5dSmrg# are currently assumed to apply to all compilers on this platform, 72276fae4e5dSmrg# and will be corrupted by setting them based on a non-working compiler. 72286fae4e5dSmrgif test "$_lt_disable_F77" != yes; then 72296fae4e5dSmrg # Code to be used in simple compile tests 72306fae4e5dSmrg lt_simple_compile_test_code="\ 72316fae4e5dSmrg subroutine t 72326fae4e5dSmrg return 72336fae4e5dSmrg end 72346fae4e5dSmrg" 72351f0ac6a5Smrg 72366fae4e5dSmrg # Code to be used in simple link tests 72376fae4e5dSmrg lt_simple_link_test_code="\ 72386fae4e5dSmrg program t 72396fae4e5dSmrg end 72406fae4e5dSmrg" 72411f0ac6a5Smrg 72426fae4e5dSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 72436fae4e5dSmrg _LT_TAG_COMPILER 72449c9ff80cSmrg 72456fae4e5dSmrg # save warnings/boilerplate of simple test code 72466fae4e5dSmrg _LT_COMPILER_BOILERPLATE 72476fae4e5dSmrg _LT_LINKER_BOILERPLATE 72481f0ac6a5Smrg 72496fae4e5dSmrg # Allow CC to be a program name with arguments. 72506fae4e5dSmrg lt_save_CC="$CC" 72516fae4e5dSmrg lt_save_GCC=$GCC 72526fae4e5dSmrg lt_save_CFLAGS=$CFLAGS 72536fae4e5dSmrg CC=${F77-"f77"} 72546fae4e5dSmrg CFLAGS=$FFLAGS 72556fae4e5dSmrg compiler=$CC 72566fae4e5dSmrg _LT_TAGVAR(compiler, $1)=$CC 72576fae4e5dSmrg _LT_CC_BASENAME([$compiler]) 72586fae4e5dSmrg GCC=$G77 72596fae4e5dSmrg if test -n "$compiler"; then 72606fae4e5dSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 72616fae4e5dSmrg AC_MSG_RESULT([$can_build_shared]) 72629c9ff80cSmrg 72636fae4e5dSmrg AC_MSG_CHECKING([whether to build shared libraries]) 72646fae4e5dSmrg test "$can_build_shared" = "no" && enable_shared=no 72659c9ff80cSmrg 72666fae4e5dSmrg # On AIX, shared libraries and static libraries use the same namespace, and 72676fae4e5dSmrg # are all built from PIC. 72686fae4e5dSmrg case $host_os in 72696fae4e5dSmrg aix3*) 72706fae4e5dSmrg test "$enable_shared" = yes && enable_static=no 72716fae4e5dSmrg if test -n "$RANLIB"; then 72726fae4e5dSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 72736fae4e5dSmrg postinstall_cmds='$RANLIB $lib' 72746fae4e5dSmrg fi 72756fae4e5dSmrg ;; 72766fae4e5dSmrg aix[[4-9]]*) 72776fae4e5dSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 72786fae4e5dSmrg test "$enable_shared" = yes && enable_static=no 72796fae4e5dSmrg fi 72809c9ff80cSmrg ;; 72816fae4e5dSmrg esac 72826fae4e5dSmrg AC_MSG_RESULT([$enable_shared]) 72831f0ac6a5Smrg 72846fae4e5dSmrg AC_MSG_CHECKING([whether to build static libraries]) 72856fae4e5dSmrg # Make sure either enable_shared or enable_static is yes. 72866fae4e5dSmrg test "$enable_shared" = yes || enable_static=yes 72876fae4e5dSmrg AC_MSG_RESULT([$enable_static]) 72889c9ff80cSmrg 72896fae4e5dSmrg _LT_TAGVAR(GCC, $1)="$G77" 72906fae4e5dSmrg _LT_TAGVAR(LD, $1)="$LD" 72916fae4e5dSmrg 72926fae4e5dSmrg ## CAVEAT EMPTOR: 72936fae4e5dSmrg ## There is no encapsulation within the following macros, do not change 72946fae4e5dSmrg ## the running order or otherwise move them around unless you know exactly 72956fae4e5dSmrg ## what you are doing... 72966fae4e5dSmrg _LT_COMPILER_PIC($1) 72976fae4e5dSmrg _LT_COMPILER_C_O($1) 72986fae4e5dSmrg _LT_COMPILER_FILE_LOCKS($1) 72996fae4e5dSmrg _LT_LINKER_SHLIBS($1) 73006fae4e5dSmrg _LT_SYS_DYNAMIC_LINKER($1) 73016fae4e5dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 73021f0ac6a5Smrg 73036fae4e5dSmrg _LT_CONFIG($1) 73046fae4e5dSmrg fi # test -n "$compiler" 73059c9ff80cSmrg 73066fae4e5dSmrg GCC=$lt_save_GCC 73076fae4e5dSmrg CC="$lt_save_CC" 73086fae4e5dSmrg CFLAGS="$lt_save_CFLAGS" 73096fae4e5dSmrgfi # test "$_lt_disable_F77" != yes 73109c9ff80cSmrg 73116fae4e5dSmrgAC_LANG_POP 73126fae4e5dSmrg])# _LT_LANG_F77_CONFIG 73139c9ff80cSmrg 73141f0ac6a5Smrg 73156fae4e5dSmrg# _LT_LANG_FC_CONFIG([TAG]) 73166fae4e5dSmrg# ------------------------- 73176fae4e5dSmrg# Ensure that the configuration variables for a Fortran compiler are 73186fae4e5dSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 73196fae4e5dSmrg# to write the compiler configuration to `libtool'. 73206fae4e5dSmrgm4_defun([_LT_LANG_FC_CONFIG], 73216fae4e5dSmrg[AC_LANG_PUSH(Fortran) 73221f0ac6a5Smrg 73236fae4e5dSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 73246fae4e5dSmrg _lt_disable_FC=yes 73256fae4e5dSmrgfi 73261f0ac6a5Smrg 73276fae4e5dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 73286fae4e5dSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 73296fae4e5dSmrg_LT_TAGVAR(always_export_symbols, $1)=no 73306fae4e5dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 73316fae4e5dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 73326fae4e5dSmrg_LT_TAGVAR(hardcode_direct, $1)=no 73336fae4e5dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 73346fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 73356fae4e5dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 73366fae4e5dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 73376fae4e5dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 73386fae4e5dSmrg_LT_TAGVAR(inherit_rpath, $1)=no 73396fae4e5dSmrg_LT_TAGVAR(module_cmds, $1)= 73406fae4e5dSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 73416fae4e5dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 73426fae4e5dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 73436fae4e5dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 73446fae4e5dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 73456fae4e5dSmrg_LT_TAGVAR(no_undefined_flag, $1)= 73466fae4e5dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 73476fae4e5dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 73489c9ff80cSmrg 73496fae4e5dSmrg# Source file extension for fc test sources. 73506fae4e5dSmrgac_ext=${ac_fc_srcext-f} 73519c9ff80cSmrg 73526fae4e5dSmrg# Object file extension for compiled fc test sources. 73536fae4e5dSmrgobjext=o 73546fae4e5dSmrg_LT_TAGVAR(objext, $1)=$objext 73551f0ac6a5Smrg 73566fae4e5dSmrg# No sense in running all these tests if we already determined that 73576fae4e5dSmrg# the FC compiler isn't working. Some variables (like enable_shared) 73586fae4e5dSmrg# are currently assumed to apply to all compilers on this platform, 73596fae4e5dSmrg# and will be corrupted by setting them based on a non-working compiler. 73606fae4e5dSmrgif test "$_lt_disable_FC" != yes; then 73616fae4e5dSmrg # Code to be used in simple compile tests 73626fae4e5dSmrg lt_simple_compile_test_code="\ 73636fae4e5dSmrg subroutine t 73646fae4e5dSmrg return 73656fae4e5dSmrg end 73666fae4e5dSmrg" 73671f0ac6a5Smrg 73686fae4e5dSmrg # Code to be used in simple link tests 73696fae4e5dSmrg lt_simple_link_test_code="\ 73706fae4e5dSmrg program t 73716fae4e5dSmrg end 73726fae4e5dSmrg" 73731f0ac6a5Smrg 73746fae4e5dSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 73756fae4e5dSmrg _LT_TAG_COMPILER 73761f0ac6a5Smrg 73776fae4e5dSmrg # save warnings/boilerplate of simple test code 73786fae4e5dSmrg _LT_COMPILER_BOILERPLATE 73796fae4e5dSmrg _LT_LINKER_BOILERPLATE 73801f0ac6a5Smrg 73816fae4e5dSmrg # Allow CC to be a program name with arguments. 73826fae4e5dSmrg lt_save_CC="$CC" 73836fae4e5dSmrg lt_save_GCC=$GCC 73846fae4e5dSmrg lt_save_CFLAGS=$CFLAGS 73856fae4e5dSmrg CC=${FC-"f95"} 73866fae4e5dSmrg CFLAGS=$FCFLAGS 73876fae4e5dSmrg compiler=$CC 73886fae4e5dSmrg GCC=$ac_cv_fc_compiler_gnu 73891f0ac6a5Smrg 73906fae4e5dSmrg _LT_TAGVAR(compiler, $1)=$CC 73916fae4e5dSmrg _LT_CC_BASENAME([$compiler]) 73921f0ac6a5Smrg 73936fae4e5dSmrg if test -n "$compiler"; then 73946fae4e5dSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 73956fae4e5dSmrg AC_MSG_RESULT([$can_build_shared]) 73966fae4e5dSmrg 73976fae4e5dSmrg AC_MSG_CHECKING([whether to build shared libraries]) 73986fae4e5dSmrg test "$can_build_shared" = "no" && enable_shared=no 73996fae4e5dSmrg 74006fae4e5dSmrg # On AIX, shared libraries and static libraries use the same namespace, and 74016fae4e5dSmrg # are all built from PIC. 74026fae4e5dSmrg case $host_os in 74036fae4e5dSmrg aix3*) 74046fae4e5dSmrg test "$enable_shared" = yes && enable_static=no 74056fae4e5dSmrg if test -n "$RANLIB"; then 74066fae4e5dSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 74076fae4e5dSmrg postinstall_cmds='$RANLIB $lib' 74086fae4e5dSmrg fi 74096fae4e5dSmrg ;; 74106fae4e5dSmrg aix[[4-9]]*) 74116fae4e5dSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 74126fae4e5dSmrg test "$enable_shared" = yes && enable_static=no 74139c9ff80cSmrg fi 74146fae4e5dSmrg ;; 74156fae4e5dSmrg esac 74166fae4e5dSmrg AC_MSG_RESULT([$enable_shared]) 74171f0ac6a5Smrg 74186fae4e5dSmrg AC_MSG_CHECKING([whether to build static libraries]) 74196fae4e5dSmrg # Make sure either enable_shared or enable_static is yes. 74206fae4e5dSmrg test "$enable_shared" = yes || enable_static=yes 74216fae4e5dSmrg AC_MSG_RESULT([$enable_static]) 74229c9ff80cSmrg 74236fae4e5dSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 74246fae4e5dSmrg _LT_TAGVAR(LD, $1)="$LD" 74259c9ff80cSmrg 74266fae4e5dSmrg ## CAVEAT EMPTOR: 74276fae4e5dSmrg ## There is no encapsulation within the following macros, do not change 74286fae4e5dSmrg ## the running order or otherwise move them around unless you know exactly 74296fae4e5dSmrg ## what you are doing... 74306fae4e5dSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 74316fae4e5dSmrg _LT_COMPILER_PIC($1) 74326fae4e5dSmrg _LT_COMPILER_C_O($1) 74336fae4e5dSmrg _LT_COMPILER_FILE_LOCKS($1) 74346fae4e5dSmrg _LT_LINKER_SHLIBS($1) 74356fae4e5dSmrg _LT_SYS_DYNAMIC_LINKER($1) 74366fae4e5dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 74379c9ff80cSmrg 74386fae4e5dSmrg _LT_CONFIG($1) 74396fae4e5dSmrg fi # test -n "$compiler" 74401f0ac6a5Smrg 74416fae4e5dSmrg GCC=$lt_save_GCC 74426fae4e5dSmrg CC=$lt_save_CC 74436fae4e5dSmrg CFLAGS=$lt_save_CFLAGS 74446fae4e5dSmrgfi # test "$_lt_disable_FC" != yes 74451f0ac6a5Smrg 74466fae4e5dSmrgAC_LANG_POP 74476fae4e5dSmrg])# _LT_LANG_FC_CONFIG 74489c9ff80cSmrg 74499c9ff80cSmrg 74506fae4e5dSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 74516fae4e5dSmrg# -------------------------- 74526fae4e5dSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 74536fae4e5dSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 74546fae4e5dSmrg# to write the compiler configuration to `libtool'. 74556fae4e5dSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 74566fae4e5dSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 74576fae4e5dSmrgAC_LANG_SAVE 74589c9ff80cSmrg 74596fae4e5dSmrg# Source file extension for Java test sources. 74606fae4e5dSmrgac_ext=java 74611f0ac6a5Smrg 74626fae4e5dSmrg# Object file extension for compiled Java test sources. 74636fae4e5dSmrgobjext=o 74646fae4e5dSmrg_LT_TAGVAR(objext, $1)=$objext 74651f0ac6a5Smrg 74666fae4e5dSmrg# Code to be used in simple compile tests 74676fae4e5dSmrglt_simple_compile_test_code="class foo {}" 74681f0ac6a5Smrg 74696fae4e5dSmrg# Code to be used in simple link tests 74706fae4e5dSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 74719c9ff80cSmrg 74726fae4e5dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 74736fae4e5dSmrg_LT_TAG_COMPILER 74741f0ac6a5Smrg 74756fae4e5dSmrg# save warnings/boilerplate of simple test code 74766fae4e5dSmrg_LT_COMPILER_BOILERPLATE 74776fae4e5dSmrg_LT_LINKER_BOILERPLATE 74781f0ac6a5Smrg 74796fae4e5dSmrg# Allow CC to be a program name with arguments. 74806fae4e5dSmrglt_save_CC=$CC 74816fae4e5dSmrglt_save_CFLAGS=$CFLAGS 74826fae4e5dSmrglt_save_GCC=$GCC 74836fae4e5dSmrgGCC=yes 74846fae4e5dSmrgCC=${GCJ-"gcj"} 74856fae4e5dSmrgCFLAGS=$GCJFLAGS 74866fae4e5dSmrgcompiler=$CC 74876fae4e5dSmrg_LT_TAGVAR(compiler, $1)=$CC 74886fae4e5dSmrg_LT_TAGVAR(LD, $1)="$LD" 74896fae4e5dSmrg_LT_CC_BASENAME([$compiler]) 74901f0ac6a5Smrg 74916fae4e5dSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 74926fae4e5dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 74939c9ff80cSmrg 74946fae4e5dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 74956fae4e5dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 74966fae4e5dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 74979c9ff80cSmrg 74986fae4e5dSmrgif test -n "$compiler"; then 74996fae4e5dSmrg _LT_COMPILER_NO_RTTI($1) 75006fae4e5dSmrg _LT_COMPILER_PIC($1) 75016fae4e5dSmrg _LT_COMPILER_C_O($1) 75026fae4e5dSmrg _LT_COMPILER_FILE_LOCKS($1) 75036fae4e5dSmrg _LT_LINKER_SHLIBS($1) 75046fae4e5dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 75059c9ff80cSmrg 75066fae4e5dSmrg _LT_CONFIG($1) 75076fae4e5dSmrgfi 75081f0ac6a5Smrg 75096fae4e5dSmrgAC_LANG_RESTORE 75101f0ac6a5Smrg 75116fae4e5dSmrgGCC=$lt_save_GCC 75126fae4e5dSmrgCC=$lt_save_CC 75136fae4e5dSmrgCFLAGS=$lt_save_CFLAGS 75146fae4e5dSmrg])# _LT_LANG_GCJ_CONFIG 75151f0ac6a5Smrg 75161f0ac6a5Smrg 751789c04b6cSmrg# _LT_LANG_GO_CONFIG([TAG]) 751889c04b6cSmrg# -------------------------- 751989c04b6cSmrg# Ensure that the configuration variables for the GNU Go compiler 752089c04b6cSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 752189c04b6cSmrg# to write the compiler configuration to `libtool'. 752289c04b6cSmrgm4_defun([_LT_LANG_GO_CONFIG], 752389c04b6cSmrg[AC_REQUIRE([LT_PROG_GO])dnl 752489c04b6cSmrgAC_LANG_SAVE 752589c04b6cSmrg 752689c04b6cSmrg# Source file extension for Go test sources. 752789c04b6cSmrgac_ext=go 752889c04b6cSmrg 752989c04b6cSmrg# Object file extension for compiled Go test sources. 753089c04b6cSmrgobjext=o 753189c04b6cSmrg_LT_TAGVAR(objext, $1)=$objext 753289c04b6cSmrg 753389c04b6cSmrg# Code to be used in simple compile tests 753489c04b6cSmrglt_simple_compile_test_code="package main; func main() { }" 753589c04b6cSmrg 753689c04b6cSmrg# Code to be used in simple link tests 753789c04b6cSmrglt_simple_link_test_code='package main; func main() { }' 753889c04b6cSmrg 753989c04b6cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 754089c04b6cSmrg_LT_TAG_COMPILER 754189c04b6cSmrg 754289c04b6cSmrg# save warnings/boilerplate of simple test code 754389c04b6cSmrg_LT_COMPILER_BOILERPLATE 754489c04b6cSmrg_LT_LINKER_BOILERPLATE 754589c04b6cSmrg 754689c04b6cSmrg# Allow CC to be a program name with arguments. 754789c04b6cSmrglt_save_CC=$CC 754889c04b6cSmrglt_save_CFLAGS=$CFLAGS 754989c04b6cSmrglt_save_GCC=$GCC 755089c04b6cSmrgGCC=yes 755189c04b6cSmrgCC=${GOC-"gccgo"} 755289c04b6cSmrgCFLAGS=$GOFLAGS 755389c04b6cSmrgcompiler=$CC 755489c04b6cSmrg_LT_TAGVAR(compiler, $1)=$CC 755589c04b6cSmrg_LT_TAGVAR(LD, $1)="$LD" 755689c04b6cSmrg_LT_CC_BASENAME([$compiler]) 755789c04b6cSmrg 755889c04b6cSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 755989c04b6cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 756089c04b6cSmrg 756189c04b6cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 756289c04b6cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 756389c04b6cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 756489c04b6cSmrg 756589c04b6cSmrgif test -n "$compiler"; then 756689c04b6cSmrg _LT_COMPILER_NO_RTTI($1) 756789c04b6cSmrg _LT_COMPILER_PIC($1) 756889c04b6cSmrg _LT_COMPILER_C_O($1) 756989c04b6cSmrg _LT_COMPILER_FILE_LOCKS($1) 757089c04b6cSmrg _LT_LINKER_SHLIBS($1) 757189c04b6cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 757289c04b6cSmrg 757389c04b6cSmrg _LT_CONFIG($1) 757489c04b6cSmrgfi 757589c04b6cSmrg 757689c04b6cSmrgAC_LANG_RESTORE 757789c04b6cSmrg 757889c04b6cSmrgGCC=$lt_save_GCC 757989c04b6cSmrgCC=$lt_save_CC 758089c04b6cSmrgCFLAGS=$lt_save_CFLAGS 758189c04b6cSmrg])# _LT_LANG_GO_CONFIG 758289c04b6cSmrg 758389c04b6cSmrg 75846fae4e5dSmrg# _LT_LANG_RC_CONFIG([TAG]) 75856fae4e5dSmrg# ------------------------- 75866fae4e5dSmrg# Ensure that the configuration variables for the Windows resource compiler 75876fae4e5dSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 75886fae4e5dSmrg# to write the compiler configuration to `libtool'. 75896fae4e5dSmrgm4_defun([_LT_LANG_RC_CONFIG], 75906fae4e5dSmrg[AC_REQUIRE([LT_PROG_RC])dnl 75916fae4e5dSmrgAC_LANG_SAVE 75921f0ac6a5Smrg 75936fae4e5dSmrg# Source file extension for RC test sources. 75946fae4e5dSmrgac_ext=rc 75951f0ac6a5Smrg 75966fae4e5dSmrg# Object file extension for compiled RC test sources. 75976fae4e5dSmrgobjext=o 75986fae4e5dSmrg_LT_TAGVAR(objext, $1)=$objext 75991f0ac6a5Smrg 76006fae4e5dSmrg# Code to be used in simple compile tests 76016fae4e5dSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 76021f0ac6a5Smrg 76036fae4e5dSmrg# Code to be used in simple link tests 76046fae4e5dSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 76059c9ff80cSmrg 76066fae4e5dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 76076fae4e5dSmrg_LT_TAG_COMPILER 76089c9ff80cSmrg 76096fae4e5dSmrg# save warnings/boilerplate of simple test code 76106fae4e5dSmrg_LT_COMPILER_BOILERPLATE 76116fae4e5dSmrg_LT_LINKER_BOILERPLATE 76129c9ff80cSmrg 76136fae4e5dSmrg# Allow CC to be a program name with arguments. 76146fae4e5dSmrglt_save_CC="$CC" 76156fae4e5dSmrglt_save_CFLAGS=$CFLAGS 76166fae4e5dSmrglt_save_GCC=$GCC 76176fae4e5dSmrgGCC= 76186fae4e5dSmrgCC=${RC-"windres"} 76196fae4e5dSmrgCFLAGS= 76206fae4e5dSmrgcompiler=$CC 76216fae4e5dSmrg_LT_TAGVAR(compiler, $1)=$CC 76226fae4e5dSmrg_LT_CC_BASENAME([$compiler]) 76236fae4e5dSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 76249c9ff80cSmrg 76256fae4e5dSmrgif test -n "$compiler"; then 76266fae4e5dSmrg : 76276fae4e5dSmrg _LT_CONFIG($1) 76286fae4e5dSmrgfi 76291f0ac6a5Smrg 76306fae4e5dSmrgGCC=$lt_save_GCC 76316fae4e5dSmrgAC_LANG_RESTORE 76326fae4e5dSmrgCC=$lt_save_CC 76336fae4e5dSmrgCFLAGS=$lt_save_CFLAGS 76346fae4e5dSmrg])# _LT_LANG_RC_CONFIG 76351f0ac6a5Smrg 76361f0ac6a5Smrg 76376fae4e5dSmrg# LT_PROG_GCJ 76386fae4e5dSmrg# ----------- 76396fae4e5dSmrgAC_DEFUN([LT_PROG_GCJ], 76406fae4e5dSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 76416fae4e5dSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 76426fae4e5dSmrg [AC_CHECK_TOOL(GCJ, gcj,) 76436fae4e5dSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 76446fae4e5dSmrg AC_SUBST(GCJFLAGS)])])[]dnl 76456fae4e5dSmrg]) 76461f0ac6a5Smrg 76476fae4e5dSmrg# Old name: 76486fae4e5dSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 76496fae4e5dSmrgdnl aclocal-1.4 backwards compatibility: 76506fae4e5dSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 76516fae4e5dSmrg 76526fae4e5dSmrg 765389c04b6cSmrg# LT_PROG_GO 765489c04b6cSmrg# ---------- 765589c04b6cSmrgAC_DEFUN([LT_PROG_GO], 765689c04b6cSmrg[AC_CHECK_TOOL(GOC, gccgo,) 765789c04b6cSmrg]) 765889c04b6cSmrg 765989c04b6cSmrg 76606fae4e5dSmrg# LT_PROG_RC 76616fae4e5dSmrg# ---------- 76626fae4e5dSmrgAC_DEFUN([LT_PROG_RC], 76636fae4e5dSmrg[AC_CHECK_TOOL(RC, windres,) 76641f0ac6a5Smrg]) 76651f0ac6a5Smrg 76666fae4e5dSmrg# Old name: 76676fae4e5dSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 76686fae4e5dSmrgdnl aclocal-1.4 backwards compatibility: 76696fae4e5dSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 76701f0ac6a5Smrg 76711f0ac6a5Smrg 76726fae4e5dSmrg# _LT_DECL_EGREP 76736fae4e5dSmrg# -------------- 76746fae4e5dSmrg# If we don't have a new enough Autoconf to choose the best grep 76756fae4e5dSmrg# available, choose the one first in the user's PATH. 76766fae4e5dSmrgm4_defun([_LT_DECL_EGREP], 76776fae4e5dSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 76786fae4e5dSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 76796fae4e5dSmrgtest -z "$GREP" && GREP=grep 76806fae4e5dSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 76816fae4e5dSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 76826fae4e5dSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 76836fae4e5dSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 76846fae4e5dSmrgAC_SUBST([GREP]) 76856fae4e5dSmrg]) 76861f0ac6a5Smrg 76871f0ac6a5Smrg 76886fae4e5dSmrg# _LT_DECL_OBJDUMP 76896fae4e5dSmrg# -------------- 76906fae4e5dSmrg# If we don't have a new enough Autoconf to choose the best objdump 76916fae4e5dSmrg# available, choose the one first in the user's PATH. 76926fae4e5dSmrgm4_defun([_LT_DECL_OBJDUMP], 76936fae4e5dSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 76946fae4e5dSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 76956fae4e5dSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 76966fae4e5dSmrgAC_SUBST([OBJDUMP]) 76976fae4e5dSmrg]) 76986fae4e5dSmrg 76996fae4e5dSmrg# _LT_DECL_DLLTOOL 77006fae4e5dSmrg# ---------------- 77016fae4e5dSmrg# Ensure DLLTOOL variable is set. 77026fae4e5dSmrgm4_defun([_LT_DECL_DLLTOOL], 77036fae4e5dSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 77046fae4e5dSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 77056fae4e5dSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 77066fae4e5dSmrgAC_SUBST([DLLTOOL]) 77076fae4e5dSmrg]) 77089c9ff80cSmrg 77096fae4e5dSmrg# _LT_DECL_SED 77106fae4e5dSmrg# ------------ 77116fae4e5dSmrg# Check for a fully-functional sed program, that truncates 77126fae4e5dSmrg# as few characters as possible. Prefer GNU sed if found. 77136fae4e5dSmrgm4_defun([_LT_DECL_SED], 77146fae4e5dSmrg[AC_PROG_SED 77156fae4e5dSmrgtest -z "$SED" && SED=sed 77166fae4e5dSmrgXsed="$SED -e 1s/^X//" 77176fae4e5dSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 77186fae4e5dSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 77196fae4e5dSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 77206fae4e5dSmrg])# _LT_DECL_SED 77211f0ac6a5Smrg 77226fae4e5dSmrgm4_ifndef([AC_PROG_SED], [ 77236fae4e5dSmrg# NOTE: This macro has been submitted for inclusion into # 77246fae4e5dSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 77256fae4e5dSmrg# a released version of Autoconf we should remove this # 77266fae4e5dSmrg# macro and use it instead. # 77271f0ac6a5Smrg 77286fae4e5dSmrgm4_defun([AC_PROG_SED], 77296fae4e5dSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 77306fae4e5dSmrgAC_CACHE_VAL(lt_cv_path_SED, 77316fae4e5dSmrg[# Loop through the user's path and test for sed and gsed. 77326fae4e5dSmrg# Then use that list of sed's as ones to test for truncation. 77336fae4e5dSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 77346fae4e5dSmrgfor as_dir in $PATH 77356fae4e5dSmrgdo 77366fae4e5dSmrg IFS=$as_save_IFS 77376fae4e5dSmrg test -z "$as_dir" && as_dir=. 77386fae4e5dSmrg for lt_ac_prog in sed gsed; do 77396fae4e5dSmrg for ac_exec_ext in '' $ac_executable_extensions; do 77406fae4e5dSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 77416fae4e5dSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 77426fae4e5dSmrg fi 77436fae4e5dSmrg done 77446fae4e5dSmrg done 77456fae4e5dSmrgdone 77466fae4e5dSmrgIFS=$as_save_IFS 77476fae4e5dSmrglt_ac_max=0 77486fae4e5dSmrglt_ac_count=0 77496fae4e5dSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 77506fae4e5dSmrg# along with /bin/sed that truncates output. 77516fae4e5dSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 77526fae4e5dSmrg test ! -f $lt_ac_sed && continue 77536fae4e5dSmrg cat /dev/null > conftest.in 77546fae4e5dSmrg lt_ac_count=0 77556fae4e5dSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 77566fae4e5dSmrg # Check for GNU sed and select it if it is found. 77576fae4e5dSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 77586fae4e5dSmrg lt_cv_path_SED=$lt_ac_sed 77596fae4e5dSmrg break 77606fae4e5dSmrg fi 77616fae4e5dSmrg while true; do 77626fae4e5dSmrg cat conftest.in conftest.in >conftest.tmp 77636fae4e5dSmrg mv conftest.tmp conftest.in 77646fae4e5dSmrg cp conftest.in conftest.nl 77656fae4e5dSmrg echo >>conftest.nl 77666fae4e5dSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 77676fae4e5dSmrg cmp -s conftest.out conftest.nl || break 77686fae4e5dSmrg # 10000 chars as input seems more than enough 77696fae4e5dSmrg test $lt_ac_count -gt 10 && break 77706fae4e5dSmrg lt_ac_count=`expr $lt_ac_count + 1` 77716fae4e5dSmrg if test $lt_ac_count -gt $lt_ac_max; then 77726fae4e5dSmrg lt_ac_max=$lt_ac_count 77736fae4e5dSmrg lt_cv_path_SED=$lt_ac_sed 77746fae4e5dSmrg fi 77759c9ff80cSmrg done 77766fae4e5dSmrgdone 77776fae4e5dSmrg]) 77786fae4e5dSmrgSED=$lt_cv_path_SED 77796fae4e5dSmrgAC_SUBST([SED]) 77806fae4e5dSmrgAC_MSG_RESULT([$SED]) 77816fae4e5dSmrg])#AC_PROG_SED 77826fae4e5dSmrg])#m4_ifndef 77831f0ac6a5Smrg 77846fae4e5dSmrg# Old name: 77856fae4e5dSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 77866fae4e5dSmrgdnl aclocal-1.4 backwards compatibility: 77876fae4e5dSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 77881f0ac6a5Smrg 77891f0ac6a5Smrg 77906fae4e5dSmrg# _LT_CHECK_SHELL_FEATURES 77916fae4e5dSmrg# ------------------------ 77926fae4e5dSmrg# Find out whether the shell is Bourne or XSI compatible, 77936fae4e5dSmrg# or has some other useful features. 77946fae4e5dSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 77956fae4e5dSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 77966fae4e5dSmrg# Try some XSI features 77976fae4e5dSmrgxsi_shell=no 77986fae4e5dSmrg( _lt_dummy="a/b/c" 77996fae4e5dSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 78006fae4e5dSmrg = c,a/b,b/c, \ 78016fae4e5dSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 78026fae4e5dSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 78036fae4e5dSmrg && xsi_shell=yes 78046fae4e5dSmrgAC_MSG_RESULT([$xsi_shell]) 78056fae4e5dSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 78061f0ac6a5Smrg 78076fae4e5dSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 78086fae4e5dSmrglt_shell_append=no 78096fae4e5dSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 78106fae4e5dSmrg >/dev/null 2>&1 \ 78116fae4e5dSmrg && lt_shell_append=yes 78126fae4e5dSmrgAC_MSG_RESULT([$lt_shell_append]) 78136fae4e5dSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 78141f0ac6a5Smrg 78156fae4e5dSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 78166fae4e5dSmrg lt_unset=unset 78176fae4e5dSmrgelse 78186fae4e5dSmrg lt_unset=false 78196fae4e5dSmrgfi 78206fae4e5dSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 78211f0ac6a5Smrg 78226fae4e5dSmrg# test EBCDIC or ASCII 78236fae4e5dSmrgcase `echo X|tr X '\101'` in 78246fae4e5dSmrg A) # ASCII based system 78256fae4e5dSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 78266fae4e5dSmrg lt_SP2NL='tr \040 \012' 78276fae4e5dSmrg lt_NL2SP='tr \015\012 \040\040' 78289c9ff80cSmrg ;; 78296fae4e5dSmrg *) # EBCDIC based system 78306fae4e5dSmrg lt_SP2NL='tr \100 \n' 78316fae4e5dSmrg lt_NL2SP='tr \r\n \100\100' 78329c9ff80cSmrg ;; 78339c9ff80cSmrgesac 78346fae4e5dSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 78356fae4e5dSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 78366fae4e5dSmrg])# _LT_CHECK_SHELL_FEATURES 78379c9ff80cSmrg 78389c9ff80cSmrg 78396fae4e5dSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 78406fae4e5dSmrg# ------------------------------------------------------ 78416fae4e5dSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 78426fae4e5dSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 78436fae4e5dSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 78446fae4e5dSmrg[dnl { 78456fae4e5dSmrgsed -e '/^$1 ()$/,/^} # $1 /c\ 78466fae4e5dSmrg$1 ()\ 78476fae4e5dSmrg{\ 78486fae4e5dSmrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 78496fae4e5dSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 78506fae4e5dSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 78516fae4e5dSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 78526fae4e5dSmrgtest 0 -eq $? || _lt_function_replace_fail=: 78536fae4e5dSmrg]) 78541f0ac6a5Smrg 78551f0ac6a5Smrg 78566fae4e5dSmrg# _LT_PROG_REPLACE_SHELLFNS 78576fae4e5dSmrg# ------------------------- 78586fae4e5dSmrg# Replace existing portable implementations of several shell functions with 78596fae4e5dSmrg# equivalent extended shell implementations where those features are available.. 78606fae4e5dSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 78616fae4e5dSmrg[if test x"$xsi_shell" = xyes; then 78626fae4e5dSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 78636fae4e5dSmrg case ${1} in 78646fae4e5dSmrg */*) func_dirname_result="${1%/*}${2}" ;; 78656fae4e5dSmrg * ) func_dirname_result="${3}" ;; 78666fae4e5dSmrg esac]) 78676fae4e5dSmrg 78686fae4e5dSmrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 78696fae4e5dSmrg func_basename_result="${1##*/}"]) 78706fae4e5dSmrg 78716fae4e5dSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 78726fae4e5dSmrg case ${1} in 78736fae4e5dSmrg */*) func_dirname_result="${1%/*}${2}" ;; 78746fae4e5dSmrg * ) func_dirname_result="${3}" ;; 78756fae4e5dSmrg esac 78766fae4e5dSmrg func_basename_result="${1##*/}"]) 78771f0ac6a5Smrg 78786fae4e5dSmrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 78796fae4e5dSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 78806fae4e5dSmrg # positional parameters, so assign one to ordinary parameter first. 78816fae4e5dSmrg func_stripname_result=${3} 78826fae4e5dSmrg func_stripname_result=${func_stripname_result#"${1}"} 78836fae4e5dSmrg func_stripname_result=${func_stripname_result%"${2}"}]) 78849c9ff80cSmrg 78856fae4e5dSmrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 78866fae4e5dSmrg func_split_long_opt_name=${1%%=*} 78876fae4e5dSmrg func_split_long_opt_arg=${1#*=}]) 78889c9ff80cSmrg 78896fae4e5dSmrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 78906fae4e5dSmrg func_split_short_opt_arg=${1#??} 78916fae4e5dSmrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 78929c9ff80cSmrg 78936fae4e5dSmrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 78946fae4e5dSmrg case ${1} in 78956fae4e5dSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 78966fae4e5dSmrg *) func_lo2o_result=${1} ;; 78976fae4e5dSmrg esac]) 78989c9ff80cSmrg 78996fae4e5dSmrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 79009c9ff80cSmrg 79016fae4e5dSmrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 79029c9ff80cSmrg 79036fae4e5dSmrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 79046fae4e5dSmrgfi 79059c9ff80cSmrg 79066fae4e5dSmrgif test x"$lt_shell_append" = xyes; then 79076fae4e5dSmrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 79089c9ff80cSmrg 79096fae4e5dSmrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 79106fae4e5dSmrg func_quote_for_eval "${2}" 79116fae4e5dSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 79126fae4e5dSmrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 79139c9ff80cSmrg 79146fae4e5dSmrg # Save a `func_append' function call where possible by direct use of '+=' 79156fae4e5dSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 79166fae4e5dSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 79176fae4e5dSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 79186fae4e5dSmrg test 0 -eq $? || _lt_function_replace_fail=: 79196fae4e5dSmrgelse 79206fae4e5dSmrg # Save a `func_append' function call even when '+=' is not available 79216fae4e5dSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 79226fae4e5dSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 79236fae4e5dSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 79246fae4e5dSmrg test 0 -eq $? || _lt_function_replace_fail=: 79256fae4e5dSmrgfi 79269c9ff80cSmrg 79276fae4e5dSmrgif test x"$_lt_function_replace_fail" = x":"; then 79286fae4e5dSmrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 79296fae4e5dSmrgfi 79306fae4e5dSmrg]) 79316fae4e5dSmrg 79326fae4e5dSmrg# _LT_PATH_CONVERSION_FUNCTIONS 79336fae4e5dSmrg# ----------------------------- 79346fae4e5dSmrg# Determine which file name conversion functions should be used by 79356fae4e5dSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 79366fae4e5dSmrg# for certain cross-compile configurations and native mingw. 79376fae4e5dSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 79386fae4e5dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 79396fae4e5dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 79406fae4e5dSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 79416fae4e5dSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 79426fae4e5dSmrg[case $host in 79436fae4e5dSmrg *-*-mingw* ) 79446fae4e5dSmrg case $build in 79456fae4e5dSmrg *-*-mingw* ) # actually msys 79466fae4e5dSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 79471f0ac6a5Smrg ;; 79486fae4e5dSmrg *-*-cygwin* ) 79496fae4e5dSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 79506fae4e5dSmrg ;; 79516fae4e5dSmrg * ) # otherwise, assume *nix 79526fae4e5dSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 79531f0ac6a5Smrg ;; 79549c9ff80cSmrg esac 79556fae4e5dSmrg ;; 79566fae4e5dSmrg *-*-cygwin* ) 79576fae4e5dSmrg case $build in 79586fae4e5dSmrg *-*-mingw* ) # actually msys 79596fae4e5dSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 79606fae4e5dSmrg ;; 79616fae4e5dSmrg *-*-cygwin* ) 79626fae4e5dSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 79636fae4e5dSmrg ;; 79646fae4e5dSmrg * ) # otherwise, assume *nix 79656fae4e5dSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 79666fae4e5dSmrg ;; 79676fae4e5dSmrg esac 79686fae4e5dSmrg ;; 79696fae4e5dSmrg * ) # unhandled hosts (and "normal" native builds) 79706fae4e5dSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 79716fae4e5dSmrg ;; 79726fae4e5dSmrgesac 79736fae4e5dSmrg]) 79746fae4e5dSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 79756fae4e5dSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 79766fae4e5dSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 79776fae4e5dSmrg [0], [convert $build file names to $host format])dnl 79786fae4e5dSmrg 79796fae4e5dSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 79806fae4e5dSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 79816fae4e5dSmrg[#assume ordinary cross tools, or native build. 79826fae4e5dSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 79836fae4e5dSmrgcase $host in 79846fae4e5dSmrg *-*-mingw* ) 79856fae4e5dSmrg case $build in 79866fae4e5dSmrg *-*-mingw* ) # actually msys 79876fae4e5dSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 79886fae4e5dSmrg ;; 79896fae4e5dSmrg esac 79906fae4e5dSmrg ;; 79916fae4e5dSmrgesac 79926fae4e5dSmrg]) 79936fae4e5dSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 79946fae4e5dSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 79956fae4e5dSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 79966fae4e5dSmrg [0], [convert $build files to toolchain format])dnl 79976fae4e5dSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 79989c9ff80cSmrg 79996fae4e5dSmrg# Helper functions for option handling. -*- Autoconf -*- 80006fae4e5dSmrg# 80016fae4e5dSmrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 80026fae4e5dSmrg# Inc. 80036fae4e5dSmrg# Written by Gary V. Vaughan, 2004 80046fae4e5dSmrg# 80056fae4e5dSmrg# This file is free software; the Free Software Foundation gives 80066fae4e5dSmrg# unlimited permission to copy and/or distribute it, with or without 80076fae4e5dSmrg# modifications, as long as this notice is preserved. 80089c9ff80cSmrg 80096fae4e5dSmrg# serial 7 ltoptions.m4 80109c9ff80cSmrg 80116fae4e5dSmrg# This is to help aclocal find these macros, as it can't see m4_define. 80126fae4e5dSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 80139c9ff80cSmrg 80149c9ff80cSmrg 80156fae4e5dSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 80166fae4e5dSmrg# ------------------------------------------ 80176fae4e5dSmrgm4_define([_LT_MANGLE_OPTION], 80186fae4e5dSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 80199c9ff80cSmrg 80209c9ff80cSmrg 80216fae4e5dSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 80226fae4e5dSmrg# --------------------------------------- 80236fae4e5dSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 80246fae4e5dSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 80256fae4e5dSmrg# saved as a flag. 80266fae4e5dSmrgm4_define([_LT_SET_OPTION], 80276fae4e5dSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 80286fae4e5dSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 80296fae4e5dSmrg _LT_MANGLE_DEFUN([$1], [$2]), 80306fae4e5dSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 80316fae4e5dSmrg]) 80329c9ff80cSmrg 80339c9ff80cSmrg 80346fae4e5dSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 80356fae4e5dSmrg# ------------------------------------------------------------ 80366fae4e5dSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 80376fae4e5dSmrgm4_define([_LT_IF_OPTION], 80386fae4e5dSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 80399c9ff80cSmrg 80409c9ff80cSmrg 80416fae4e5dSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 80426fae4e5dSmrg# ------------------------------------------------------- 80436fae4e5dSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 80446fae4e5dSmrg# are set. 80456fae4e5dSmrgm4_define([_LT_UNLESS_OPTIONS], 80466fae4e5dSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 80476fae4e5dSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 80486fae4e5dSmrg [m4_define([$0_found])])])[]dnl 80496fae4e5dSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 80506fae4e5dSmrg])[]dnl 80516fae4e5dSmrg]) 80529c9ff80cSmrg 80539c9ff80cSmrg 80546fae4e5dSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 80556fae4e5dSmrg# ---------------------------------------- 80566fae4e5dSmrg# OPTION-LIST is a space-separated list of Libtool options associated 80576fae4e5dSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 80586fae4e5dSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 80596fae4e5dSmrg# the unknown option and exit. 80606fae4e5dSmrgm4_defun([_LT_SET_OPTIONS], 80616fae4e5dSmrg[# Set options 80626fae4e5dSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 80636fae4e5dSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 80649c9ff80cSmrg 80656fae4e5dSmrgm4_if([$1],[LT_INIT],[ 80666fae4e5dSmrg dnl 80676fae4e5dSmrg dnl Simply set some default values (i.e off) if boolean options were not 80686fae4e5dSmrg dnl specified: 80696fae4e5dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 80706fae4e5dSmrg ]) 80716fae4e5dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 80726fae4e5dSmrg ]) 80736fae4e5dSmrg dnl 80746fae4e5dSmrg dnl If no reference was made to various pairs of opposing options, then 80756fae4e5dSmrg dnl we run the default mode handler for the pair. For example, if neither 80766fae4e5dSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 80776fae4e5dSmrg dnl archives by default: 80786fae4e5dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 80796fae4e5dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 80806fae4e5dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 80816fae4e5dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 80826fae4e5dSmrg [_LT_ENABLE_FAST_INSTALL]) 80836fae4e5dSmrg ]) 80846fae4e5dSmrg])# _LT_SET_OPTIONS 80859c9ff80cSmrg 80869c9ff80cSmrg 80879c9ff80cSmrg 80886fae4e5dSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 80896fae4e5dSmrg# ----------------------------------------- 80906fae4e5dSmrgm4_define([_LT_MANGLE_DEFUN], 80916fae4e5dSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 80929c9ff80cSmrg 80939c9ff80cSmrg 80946fae4e5dSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 80956fae4e5dSmrg# ----------------------------------------------- 80966fae4e5dSmrgm4_define([LT_OPTION_DEFINE], 80976fae4e5dSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 80986fae4e5dSmrg])# LT_OPTION_DEFINE 80999c9ff80cSmrg 81009c9ff80cSmrg 81016fae4e5dSmrg# dlopen 81026fae4e5dSmrg# ------ 81036fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 81046fae4e5dSmrg]) 81056fae4e5dSmrg 81066fae4e5dSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 81076fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 81086fae4e5dSmrgAC_DIAGNOSE([obsolete], 81096fae4e5dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 81106fae4e5dSmrgput the `dlopen' option into LT_INIT's first parameter.]) 81116fae4e5dSmrg]) 81126fae4e5dSmrg 81136fae4e5dSmrgdnl aclocal-1.4 backwards compatibility: 81146fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 81159c9ff80cSmrg 81169c9ff80cSmrg 81176fae4e5dSmrg# win32-dll 81186fae4e5dSmrg# --------- 81196fae4e5dSmrg# Declare package support for building win32 dll's. 81206fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 81216fae4e5dSmrg[enable_win32_dll=yes 81229c9ff80cSmrg 81236fae4e5dSmrgcase $host in 81246fae4e5dSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 81256fae4e5dSmrg AC_CHECK_TOOL(AS, as, false) 81266fae4e5dSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 81276fae4e5dSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 81286fae4e5dSmrg ;; 81296fae4e5dSmrgesac 81309c9ff80cSmrg 81316fae4e5dSmrgtest -z "$AS" && AS=as 81326fae4e5dSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 81339c9ff80cSmrg 81346fae4e5dSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 81356fae4e5dSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 81369c9ff80cSmrg 81376fae4e5dSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 81386fae4e5dSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 81396fae4e5dSmrg])# win32-dll 81409c9ff80cSmrg 81416fae4e5dSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 81426fae4e5dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 81436fae4e5dSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 81446fae4e5dSmrgAC_DIAGNOSE([obsolete], 81456fae4e5dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 81466fae4e5dSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 81476fae4e5dSmrg]) 81489c9ff80cSmrg 81496fae4e5dSmrgdnl aclocal-1.4 backwards compatibility: 81506fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 81519c9ff80cSmrg 81529c9ff80cSmrg 81536fae4e5dSmrg# _LT_ENABLE_SHARED([DEFAULT]) 81546fae4e5dSmrg# ---------------------------- 81556fae4e5dSmrg# implement the --enable-shared flag, and supports the `shared' and 81566fae4e5dSmrg# `disable-shared' LT_INIT options. 81576fae4e5dSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 81586fae4e5dSmrgm4_define([_LT_ENABLE_SHARED], 81596fae4e5dSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 81606fae4e5dSmrgAC_ARG_ENABLE([shared], 81616fae4e5dSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 81626fae4e5dSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 81636fae4e5dSmrg [p=${PACKAGE-default} 81646fae4e5dSmrg case $enableval in 81656fae4e5dSmrg yes) enable_shared=yes ;; 81666fae4e5dSmrg no) enable_shared=no ;; 81676fae4e5dSmrg *) 81686fae4e5dSmrg enable_shared=no 81696fae4e5dSmrg # Look at the argument we got. We use all the common list separators. 81706fae4e5dSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 81716fae4e5dSmrg for pkg in $enableval; do 81726fae4e5dSmrg IFS="$lt_save_ifs" 81736fae4e5dSmrg if test "X$pkg" = "X$p"; then 81746fae4e5dSmrg enable_shared=yes 81756fae4e5dSmrg fi 81766fae4e5dSmrg done 81776fae4e5dSmrg IFS="$lt_save_ifs" 81786fae4e5dSmrg ;; 81796fae4e5dSmrg esac], 81806fae4e5dSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 81819c9ff80cSmrg 81826fae4e5dSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 81836fae4e5dSmrg [Whether or not to build shared libraries]) 81846fae4e5dSmrg])# _LT_ENABLE_SHARED 81859c9ff80cSmrg 81866fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 81876fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 81889c9ff80cSmrg 81896fae4e5dSmrg# Old names: 81906fae4e5dSmrgAC_DEFUN([AC_ENABLE_SHARED], 81916fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 81926fae4e5dSmrg]) 81939c9ff80cSmrg 81946fae4e5dSmrgAC_DEFUN([AC_DISABLE_SHARED], 81956fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 81966fae4e5dSmrg]) 81979c9ff80cSmrg 81986fae4e5dSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 81996fae4e5dSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 82009c9ff80cSmrg 82016fae4e5dSmrgdnl aclocal-1.4 backwards compatibility: 82026fae4e5dSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 82036fae4e5dSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 82049c9ff80cSmrg 82051f0ac6a5Smrg 82061f0ac6a5Smrg 82076fae4e5dSmrg# _LT_ENABLE_STATIC([DEFAULT]) 82086fae4e5dSmrg# ---------------------------- 82096fae4e5dSmrg# implement the --enable-static flag, and support the `static' and 82106fae4e5dSmrg# `disable-static' LT_INIT options. 82116fae4e5dSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 82126fae4e5dSmrgm4_define([_LT_ENABLE_STATIC], 82136fae4e5dSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 82146fae4e5dSmrgAC_ARG_ENABLE([static], 82156fae4e5dSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 82166fae4e5dSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 82176fae4e5dSmrg [p=${PACKAGE-default} 82186fae4e5dSmrg case $enableval in 82196fae4e5dSmrg yes) enable_static=yes ;; 82206fae4e5dSmrg no) enable_static=no ;; 82216fae4e5dSmrg *) 82226fae4e5dSmrg enable_static=no 82236fae4e5dSmrg # Look at the argument we got. We use all the common list separators. 82246fae4e5dSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 82256fae4e5dSmrg for pkg in $enableval; do 82266fae4e5dSmrg IFS="$lt_save_ifs" 82276fae4e5dSmrg if test "X$pkg" = "X$p"; then 82286fae4e5dSmrg enable_static=yes 82296fae4e5dSmrg fi 82306fae4e5dSmrg done 82316fae4e5dSmrg IFS="$lt_save_ifs" 82326fae4e5dSmrg ;; 82336fae4e5dSmrg esac], 82346fae4e5dSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8235e5410a46Smrg 82366fae4e5dSmrg _LT_DECL([build_old_libs], [enable_static], [0], 82376fae4e5dSmrg [Whether or not to build static libraries]) 82386fae4e5dSmrg])# _LT_ENABLE_STATIC 82391f0ac6a5Smrg 82406fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 82416fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 82421f0ac6a5Smrg 82436fae4e5dSmrg# Old names: 82446fae4e5dSmrgAC_DEFUN([AC_ENABLE_STATIC], 82456fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 82466fae4e5dSmrg]) 82471f0ac6a5Smrg 82486fae4e5dSmrgAC_DEFUN([AC_DISABLE_STATIC], 82496fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 82506fae4e5dSmrg]) 82511f0ac6a5Smrg 82526fae4e5dSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 82536fae4e5dSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 82541f0ac6a5Smrg 82556fae4e5dSmrgdnl aclocal-1.4 backwards compatibility: 82566fae4e5dSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 82576fae4e5dSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 82581f0ac6a5Smrg 82591f0ac6a5Smrg 82601f0ac6a5Smrg 82616fae4e5dSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 82626fae4e5dSmrg# ---------------------------------- 82636fae4e5dSmrg# implement the --enable-fast-install flag, and support the `fast-install' 82646fae4e5dSmrg# and `disable-fast-install' LT_INIT options. 82656fae4e5dSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 82666fae4e5dSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 82676fae4e5dSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 82686fae4e5dSmrgAC_ARG_ENABLE([fast-install], 82696fae4e5dSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 82706fae4e5dSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 82716fae4e5dSmrg [p=${PACKAGE-default} 82726fae4e5dSmrg case $enableval in 82736fae4e5dSmrg yes) enable_fast_install=yes ;; 82746fae4e5dSmrg no) enable_fast_install=no ;; 82756fae4e5dSmrg *) 82766fae4e5dSmrg enable_fast_install=no 82776fae4e5dSmrg # Look at the argument we got. We use all the common list separators. 82786fae4e5dSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 82796fae4e5dSmrg for pkg in $enableval; do 82806fae4e5dSmrg IFS="$lt_save_ifs" 82816fae4e5dSmrg if test "X$pkg" = "X$p"; then 82826fae4e5dSmrg enable_fast_install=yes 82836fae4e5dSmrg fi 82846fae4e5dSmrg done 82856fae4e5dSmrg IFS="$lt_save_ifs" 82866fae4e5dSmrg ;; 82876fae4e5dSmrg esac], 82886fae4e5dSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 82899c9ff80cSmrg 82906fae4e5dSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 82916fae4e5dSmrg [Whether or not to optimize for fast installation])dnl 82926fae4e5dSmrg])# _LT_ENABLE_FAST_INSTALL 82939c9ff80cSmrg 82946fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 82956fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 82969c9ff80cSmrg 82976fae4e5dSmrg# Old names: 82986fae4e5dSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 82996fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 83006fae4e5dSmrgAC_DIAGNOSE([obsolete], 83016fae4e5dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 83026fae4e5dSmrgthe `fast-install' option into LT_INIT's first parameter.]) 83036fae4e5dSmrg]) 83049c9ff80cSmrg 83056fae4e5dSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 83066fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 83076fae4e5dSmrgAC_DIAGNOSE([obsolete], 83086fae4e5dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 83096fae4e5dSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 83106fae4e5dSmrg]) 83119c9ff80cSmrg 83126fae4e5dSmrgdnl aclocal-1.4 backwards compatibility: 83136fae4e5dSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 83146fae4e5dSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 83151f0ac6a5Smrg 83169c9ff80cSmrg 83176fae4e5dSmrg# _LT_WITH_PIC([MODE]) 83186fae4e5dSmrg# -------------------- 83196fae4e5dSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 83206fae4e5dSmrg# LT_INIT options. 83216fae4e5dSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 83226fae4e5dSmrgm4_define([_LT_WITH_PIC], 83236fae4e5dSmrg[AC_ARG_WITH([pic], 832489c04b6cSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 83256fae4e5dSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 832689c04b6cSmrg [lt_p=${PACKAGE-default} 832789c04b6cSmrg case $withval in 832889c04b6cSmrg yes|no) pic_mode=$withval ;; 832989c04b6cSmrg *) 833089c04b6cSmrg pic_mode=default 833189c04b6cSmrg # Look at the argument we got. We use all the common list separators. 833289c04b6cSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 833389c04b6cSmrg for lt_pkg in $withval; do 833489c04b6cSmrg IFS="$lt_save_ifs" 833589c04b6cSmrg if test "X$lt_pkg" = "X$lt_p"; then 833689c04b6cSmrg pic_mode=yes 833789c04b6cSmrg fi 833889c04b6cSmrg done 833989c04b6cSmrg IFS="$lt_save_ifs" 834089c04b6cSmrg ;; 834189c04b6cSmrg esac], 83426fae4e5dSmrg [pic_mode=default]) 83439c9ff80cSmrg 83446fae4e5dSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 83451f0ac6a5Smrg 83466fae4e5dSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 83476fae4e5dSmrg])# _LT_WITH_PIC 83481f0ac6a5Smrg 83496fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 83506fae4e5dSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 83511f0ac6a5Smrg 83526fae4e5dSmrg# Old name: 83536fae4e5dSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 83546fae4e5dSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 83556fae4e5dSmrgAC_DIAGNOSE([obsolete], 83566fae4e5dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 83576fae4e5dSmrgput the `pic-only' option into LT_INIT's first parameter.]) 83589c9ff80cSmrg]) 83591f0ac6a5Smrg 83609c9ff80cSmrgdnl aclocal-1.4 backwards compatibility: 83616fae4e5dSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 83621f0ac6a5Smrg 83631f0ac6a5Smrg 83646fae4e5dSmrgm4_define([_LTDL_MODE], []) 83656fae4e5dSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 83666fae4e5dSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 83676fae4e5dSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 83686fae4e5dSmrg [m4_define([_LTDL_MODE], [recursive])]) 83696fae4e5dSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 83706fae4e5dSmrg [m4_define([_LTDL_MODE], [subproject])]) 83711f0ac6a5Smrg 83726fae4e5dSmrgm4_define([_LTDL_TYPE], []) 83736fae4e5dSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 83746fae4e5dSmrg [m4_define([_LTDL_TYPE], [installable])]) 83756fae4e5dSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 83766fae4e5dSmrg [m4_define([_LTDL_TYPE], [convenience])]) 83771f0ac6a5Smrg 83786fae4e5dSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 83796fae4e5dSmrg# 83806fae4e5dSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 83816fae4e5dSmrg# Written by Gary V. Vaughan, 2004 83826fae4e5dSmrg# 83836fae4e5dSmrg# This file is free software; the Free Software Foundation gives 83846fae4e5dSmrg# unlimited permission to copy and/or distribute it, with or without 83856fae4e5dSmrg# modifications, as long as this notice is preserved. 83861f0ac6a5Smrg 83876fae4e5dSmrg# serial 6 ltsugar.m4 83881f0ac6a5Smrg 83896fae4e5dSmrg# This is to help aclocal find these macros, as it can't see m4_define. 83906fae4e5dSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 83919c9ff80cSmrg 83929c9ff80cSmrg 83936fae4e5dSmrg# lt_join(SEP, ARG1, [ARG2...]) 83946fae4e5dSmrg# ----------------------------- 83956fae4e5dSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 83966fae4e5dSmrg# associated separator. 83976fae4e5dSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 83986fae4e5dSmrg# versions in m4sugar had bugs. 83996fae4e5dSmrgm4_define([lt_join], 84006fae4e5dSmrg[m4_if([$#], [1], [], 84016fae4e5dSmrg [$#], [2], [[$2]], 84026fae4e5dSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 84036fae4e5dSmrgm4_define([_lt_join], 84046fae4e5dSmrg[m4_if([$#$2], [2], [], 84056fae4e5dSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 84069c9ff80cSmrg 84076fae4e5dSmrg 84086fae4e5dSmrg# lt_car(LIST) 84096fae4e5dSmrg# lt_cdr(LIST) 84106fae4e5dSmrg# ------------ 84116fae4e5dSmrg# Manipulate m4 lists. 84126fae4e5dSmrg# These macros are necessary as long as will still need to support 84136fae4e5dSmrg# Autoconf-2.59 which quotes differently. 84146fae4e5dSmrgm4_define([lt_car], [[$1]]) 84156fae4e5dSmrgm4_define([lt_cdr], 84166fae4e5dSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 84176fae4e5dSmrg [$#], 1, [], 84186fae4e5dSmrg [m4_dquote(m4_shift($@))])]) 84196fae4e5dSmrgm4_define([lt_unquote], $1) 84209c9ff80cSmrg 84219c9ff80cSmrg 84226fae4e5dSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 84236fae4e5dSmrg# ------------------------------------------ 84246fae4e5dSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 84256fae4e5dSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 84266fae4e5dSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 84276fae4e5dSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 84286fae4e5dSmrg# than defined and empty). 84296fae4e5dSmrg# 84306fae4e5dSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 84316fae4e5dSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 84326fae4e5dSmrgm4_define([lt_append], 84336fae4e5dSmrg[m4_define([$1], 84346fae4e5dSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 84359c9ff80cSmrg 84369c9ff80cSmrg 84379c9ff80cSmrg 84386fae4e5dSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 84396fae4e5dSmrg# ---------------------------------------------------------- 84406fae4e5dSmrg# Produce a SEP delimited list of all paired combinations of elements of 84416fae4e5dSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 84426fae4e5dSmrg# has the form PREFIXmINFIXSUFFIXn. 84436fae4e5dSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 84446fae4e5dSmrgm4_define([lt_combine], 84456fae4e5dSmrg[m4_if(m4_eval([$# > 3]), [1], 84466fae4e5dSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 84476fae4e5dSmrg[[m4_foreach([_Lt_prefix], [$2], 84486fae4e5dSmrg [m4_foreach([_Lt_suffix], 84496fae4e5dSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 84506fae4e5dSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 84511f0ac6a5Smrg 84521f0ac6a5Smrg 84536fae4e5dSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 84546fae4e5dSmrg# ----------------------------------------------------------------------- 84556fae4e5dSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 84566fae4e5dSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 84576fae4e5dSmrgm4_define([lt_if_append_uniq], 84586fae4e5dSmrg[m4_ifdef([$1], 84596fae4e5dSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 84606fae4e5dSmrg [lt_append([$1], [$2], [$3])$4], 84616fae4e5dSmrg [$5])], 84626fae4e5dSmrg [lt_append([$1], [$2], [$3])$4])]) 84631f0ac6a5Smrg 84641f0ac6a5Smrg 84656fae4e5dSmrg# lt_dict_add(DICT, KEY, VALUE) 84666fae4e5dSmrg# ----------------------------- 84676fae4e5dSmrgm4_define([lt_dict_add], 84686fae4e5dSmrg[m4_define([$1($2)], [$3])]) 84691f0ac6a5Smrg 84701f0ac6a5Smrg 84716fae4e5dSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 84726fae4e5dSmrg# -------------------------------------------- 84736fae4e5dSmrgm4_define([lt_dict_add_subkey], 84746fae4e5dSmrg[m4_define([$1($2:$3)], [$4])]) 84751f0ac6a5Smrg 84761f0ac6a5Smrg 84776fae4e5dSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 84786fae4e5dSmrg# ---------------------------------- 84796fae4e5dSmrgm4_define([lt_dict_fetch], 84806fae4e5dSmrg[m4_ifval([$3], 84816fae4e5dSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 84826fae4e5dSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 84831f0ac6a5Smrg 84849c9ff80cSmrg 84856fae4e5dSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 84866fae4e5dSmrg# ----------------------------------------------------------------- 84876fae4e5dSmrgm4_define([lt_if_dict_fetch], 84886fae4e5dSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 84896fae4e5dSmrg [$5], 84906fae4e5dSmrg [$6])]) 84911f0ac6a5Smrg 84921f0ac6a5Smrg 84936fae4e5dSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 84946fae4e5dSmrg# -------------------------------------------------------------- 84956fae4e5dSmrgm4_define([lt_dict_filter], 84966fae4e5dSmrg[m4_if([$5], [], [], 84976fae4e5dSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 84986fae4e5dSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 84996fae4e5dSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 85006fae4e5dSmrg]) 85011f0ac6a5Smrg 85026fae4e5dSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 85036fae4e5dSmrg# 85046fae4e5dSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 85056fae4e5dSmrg# Written by Scott James Remnant, 2004 85066fae4e5dSmrg# 85076fae4e5dSmrg# This file is free software; the Free Software Foundation gives 85086fae4e5dSmrg# unlimited permission to copy and/or distribute it, with or without 85096fae4e5dSmrg# modifications, as long as this notice is preserved. 85101f0ac6a5Smrg 85116fae4e5dSmrg# @configure_input@ 85129c9ff80cSmrg 851389c04b6cSmrg# serial 3337 ltversion.m4 85146fae4e5dSmrg# This file is part of GNU Libtool 85151f0ac6a5Smrg 851689c04b6cSmrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 851789c04b6cSmrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 85181f0ac6a5Smrg 85196fae4e5dSmrgAC_DEFUN([LTVERSION_VERSION], 852089c04b6cSmrg[macro_version='2.4.2' 852189c04b6cSmrgmacro_revision='1.3337' 85226fae4e5dSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 85236fae4e5dSmrg_LT_DECL(, macro_revision, 0) 85246fae4e5dSmrg]) 85251f0ac6a5Smrg 85266fae4e5dSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 85276fae4e5dSmrg# 85286fae4e5dSmrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 85296fae4e5dSmrg# Written by Scott James Remnant, 2004. 85306fae4e5dSmrg# 85316fae4e5dSmrg# This file is free software; the Free Software Foundation gives 85326fae4e5dSmrg# unlimited permission to copy and/or distribute it, with or without 85336fae4e5dSmrg# modifications, as long as this notice is preserved. 85341f0ac6a5Smrg 85356fae4e5dSmrg# serial 5 lt~obsolete.m4 85361f0ac6a5Smrg 85376fae4e5dSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 85386fae4e5dSmrg# 85396fae4e5dSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 85406fae4e5dSmrg# which have later been changed to m4_define as they aren't part of the 85416fae4e5dSmrg# exported API, or moved to Autoconf or Automake where they belong. 85426fae4e5dSmrg# 85436fae4e5dSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 85446fae4e5dSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 85456fae4e5dSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 85466fae4e5dSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 85476fae4e5dSmrg# and doesn't know about Autoconf macros at all.) 85486fae4e5dSmrg# 85496fae4e5dSmrg# So we provide this file, which has a silly filename so it's always 85506fae4e5dSmrg# included after everything else. This provides aclocal with the 85516fae4e5dSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 85526fae4e5dSmrg# because those macros already exist, or will be overwritten later. 85536fae4e5dSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 85546fae4e5dSmrg# 85556fae4e5dSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 85566fae4e5dSmrg# Yes, that means every name once taken will need to remain here until 85576fae4e5dSmrg# we give up compatibility with versions before 1.7, at which point 85586fae4e5dSmrg# we need to keep only those names which we still refer to. 85591f0ac6a5Smrg 85606fae4e5dSmrg# This is to help aclocal find these macros, as it can't see m4_define. 85616fae4e5dSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 85621f0ac6a5Smrg 85636fae4e5dSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 85646fae4e5dSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 85656fae4e5dSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 85666fae4e5dSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 85676fae4e5dSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 85686fae4e5dSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 85696fae4e5dSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 85706fae4e5dSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 85716fae4e5dSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 85726fae4e5dSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 85736fae4e5dSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 85746fae4e5dSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 85756fae4e5dSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 85766fae4e5dSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 85776fae4e5dSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 85786fae4e5dSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 85796fae4e5dSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 85806fae4e5dSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 85816fae4e5dSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 85826fae4e5dSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 85836fae4e5dSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 85846fae4e5dSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 85856fae4e5dSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 85866fae4e5dSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 85876fae4e5dSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 85886fae4e5dSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 85896fae4e5dSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 85906fae4e5dSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 85916fae4e5dSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 85926fae4e5dSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 85936fae4e5dSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 85946fae4e5dSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 85956fae4e5dSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 85966fae4e5dSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 85976fae4e5dSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 85986fae4e5dSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 85996fae4e5dSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 86006fae4e5dSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 86016fae4e5dSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 86026fae4e5dSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 86036fae4e5dSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 86046fae4e5dSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 86056fae4e5dSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 86066fae4e5dSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 86076fae4e5dSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 86086fae4e5dSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 86096fae4e5dSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 86106fae4e5dSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 86116fae4e5dSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 86126fae4e5dSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 86136fae4e5dSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 86146fae4e5dSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 86156fae4e5dSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 86166fae4e5dSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 86176fae4e5dSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 86186fae4e5dSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 86196fae4e5dSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 86206fae4e5dSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 86216fae4e5dSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 86226fae4e5dSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 86236fae4e5dSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 86246fae4e5dSmrg 862589c04b6cSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 86262fd96bc7Smrg# serial 1 (pkg-config-0.24) 862789c04b6cSmrg# 862889c04b6cSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 862989c04b6cSmrg# 863089c04b6cSmrg# This program is free software; you can redistribute it and/or modify 863189c04b6cSmrg# it under the terms of the GNU General Public License as published by 863289c04b6cSmrg# the Free Software Foundation; either version 2 of the License, or 863389c04b6cSmrg# (at your option) any later version. 863489c04b6cSmrg# 863589c04b6cSmrg# This program is distributed in the hope that it will be useful, but 863689c04b6cSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 863789c04b6cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 863889c04b6cSmrg# General Public License for more details. 863989c04b6cSmrg# 864089c04b6cSmrg# You should have received a copy of the GNU General Public License 864189c04b6cSmrg# along with this program; if not, write to the Free Software 864289c04b6cSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 864389c04b6cSmrg# 86442fd96bc7Smrg# As a special exception to the GNU General Public License, if you 86452fd96bc7Smrg# distribute this file as part of a program that contains a 86462fd96bc7Smrg# configuration script generated by Autoconf, you may include it under 86472fd96bc7Smrg# the same distribution terms that you use for the rest of that program. 86482fd96bc7Smrg 86492fd96bc7Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 86502fd96bc7Smrg# ---------------------------------- 86512fd96bc7SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 86522fd96bc7Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 86532fd96bc7Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 86542fd96bc7Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 86552fd96bc7SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 86562fd96bc7SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 86572fd96bc7SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 86582fd96bc7Smrg 86592fd96bc7Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 86602fd96bc7Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 86612fd96bc7Smrgfi 86622fd96bc7Smrgif test -n "$PKG_CONFIG"; then 86632fd96bc7Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 86642fd96bc7Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 86652fd96bc7Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 86662fd96bc7Smrg AC_MSG_RESULT([yes]) 86672fd96bc7Smrg else 86682fd96bc7Smrg AC_MSG_RESULT([no]) 86692fd96bc7Smrg PKG_CONFIG="" 86702fd96bc7Smrg fi 86712fd96bc7Smrgfi[]dnl 86722fd96bc7Smrg])# PKG_PROG_PKG_CONFIG 86732fd96bc7Smrg 86742fd96bc7Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 86752fd96bc7Smrg# 86762fd96bc7Smrg# Check to see whether a particular set of modules exists. Similar 86772fd96bc7Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 86782fd96bc7Smrg# 86792fd96bc7Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 86802fd96bc7Smrg# only at the first occurence in configure.ac, so if the first place 86812fd96bc7Smrg# it's called might be skipped (such as if it is within an "if", you 86822fd96bc7Smrg# have to call PKG_CHECK_EXISTS manually 86832fd96bc7Smrg# -------------------------------------------------------------- 86842fd96bc7SmrgAC_DEFUN([PKG_CHECK_EXISTS], 86852fd96bc7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 86862fd96bc7Smrgif test -n "$PKG_CONFIG" && \ 86872fd96bc7Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 86882fd96bc7Smrg m4_default([$2], [:]) 86892fd96bc7Smrgm4_ifvaln([$3], [else 86902fd96bc7Smrg $3])dnl 86912fd96bc7Smrgfi]) 86922fd96bc7Smrg 86932fd96bc7Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 86942fd96bc7Smrg# --------------------------------------------- 86952fd96bc7Smrgm4_define([_PKG_CONFIG], 86962fd96bc7Smrg[if test -n "$$1"; then 86972fd96bc7Smrg pkg_cv_[]$1="$$1" 86982fd96bc7Smrg elif test -n "$PKG_CONFIG"; then 86992fd96bc7Smrg PKG_CHECK_EXISTS([$3], 87002fd96bc7Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 87012fd96bc7Smrg test "x$?" != "x0" && pkg_failed=yes ], 87022fd96bc7Smrg [pkg_failed=yes]) 87032fd96bc7Smrg else 87042fd96bc7Smrg pkg_failed=untried 87052fd96bc7Smrgfi[]dnl 87062fd96bc7Smrg])# _PKG_CONFIG 87072fd96bc7Smrg 87082fd96bc7Smrg# _PKG_SHORT_ERRORS_SUPPORTED 87092fd96bc7Smrg# ----------------------------- 87102fd96bc7SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 87112fd96bc7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 87122fd96bc7Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 87132fd96bc7Smrg _pkg_short_errors_supported=yes 87142fd96bc7Smrgelse 87152fd96bc7Smrg _pkg_short_errors_supported=no 87162fd96bc7Smrgfi[]dnl 87172fd96bc7Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 87182fd96bc7Smrg 87192fd96bc7Smrg 87202fd96bc7Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 87212fd96bc7Smrg# [ACTION-IF-NOT-FOUND]) 87222fd96bc7Smrg# 87232fd96bc7Smrg# 87242fd96bc7Smrg# Note that if there is a possibility the first call to 87252fd96bc7Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 87262fd96bc7Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 87272fd96bc7Smrg# 87282fd96bc7Smrg# 87292fd96bc7Smrg# -------------------------------------------------------------- 87302fd96bc7SmrgAC_DEFUN([PKG_CHECK_MODULES], 87312fd96bc7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 87322fd96bc7SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 87332fd96bc7SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 87342fd96bc7Smrg 87352fd96bc7Smrgpkg_failed=no 87362fd96bc7SmrgAC_MSG_CHECKING([for $1]) 87372fd96bc7Smrg 87382fd96bc7Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 87392fd96bc7Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 87402fd96bc7Smrg 87412fd96bc7Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 87422fd96bc7Smrgand $1[]_LIBS to avoid the need to call pkg-config. 87432fd96bc7SmrgSee the pkg-config man page for more details.]) 87442fd96bc7Smrg 87452fd96bc7Smrgif test $pkg_failed = yes; then 87462fd96bc7Smrg AC_MSG_RESULT([no]) 87472fd96bc7Smrg _PKG_SHORT_ERRORS_SUPPORTED 87482fd96bc7Smrg if test $_pkg_short_errors_supported = yes; then 87492fd96bc7Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 87502fd96bc7Smrg else 87512fd96bc7Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 87522fd96bc7Smrg fi 87532fd96bc7Smrg # Put the nasty error message in config.log where it belongs 87542fd96bc7Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 87552fd96bc7Smrg 87562fd96bc7Smrg m4_default([$4], [AC_MSG_ERROR( 87572fd96bc7Smrg[Package requirements ($2) were not met: 87582fd96bc7Smrg 87592fd96bc7Smrg$$1_PKG_ERRORS 87602fd96bc7Smrg 87612fd96bc7SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 87622fd96bc7Smrginstalled software in a non-standard prefix. 87632fd96bc7Smrg 87642fd96bc7Smrg_PKG_TEXT])[]dnl 87652fd96bc7Smrg ]) 87662fd96bc7Smrgelif test $pkg_failed = untried; then 87672fd96bc7Smrg AC_MSG_RESULT([no]) 87682fd96bc7Smrg m4_default([$4], [AC_MSG_FAILURE( 87692fd96bc7Smrg[The pkg-config script could not be found or is too old. Make sure it 87702fd96bc7Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 87712fd96bc7Smrgpath to pkg-config. 87722fd96bc7Smrg 87732fd96bc7Smrg_PKG_TEXT 87742fd96bc7Smrg 87752fd96bc7SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 87762fd96bc7Smrg ]) 87772fd96bc7Smrgelse 87782fd96bc7Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 87792fd96bc7Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 87802fd96bc7Smrg AC_MSG_RESULT([yes]) 87812fd96bc7Smrg $3 87822fd96bc7Smrgfi[]dnl 87832fd96bc7Smrg])# PKG_CHECK_MODULES 87842fd96bc7Smrg 87852fd96bc7Smrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 87862fd96bc7Smrg# 87872fd96bc7Smrg# This file is free software; the Free Software Foundation 87882fd96bc7Smrg# gives unlimited permission to copy and/or distribute it, 87892fd96bc7Smrg# with or without modifications, as long as this notice is preserved. 87902fd96bc7Smrg 87912fd96bc7Smrg# AM_AUTOMAKE_VERSION(VERSION) 87922fd96bc7Smrg# ---------------------------- 87932fd96bc7Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 87942fd96bc7Smrg# generated from the m4 files accompanying Automake X.Y. 87952fd96bc7Smrg# (This private macro should not be called outside this file.) 87962fd96bc7SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 87972fd96bc7Smrg[am__api_version='1.14' 87982fd96bc7Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 87992fd96bc7Smrgdnl require some minimum version. Point them to the right macro. 88002fd96bc7Smrgm4_if([$1], [1.14.1], [], 88012fd96bc7Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 88022fd96bc7Smrg]) 88032fd96bc7Smrg 88042fd96bc7Smrg# _AM_AUTOCONF_VERSION(VERSION) 88052fd96bc7Smrg# ----------------------------- 88062fd96bc7Smrg# aclocal traces this macro to find the Autoconf version. 88072fd96bc7Smrg# This is a private macro too. Using m4_define simplifies 88082fd96bc7Smrg# the logic in aclocal, which can simply ignore this definition. 88092fd96bc7Smrgm4_define([_AM_AUTOCONF_VERSION], []) 88102fd96bc7Smrg 88112fd96bc7Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 88122fd96bc7Smrg# ------------------------------- 88132fd96bc7Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 88142fd96bc7Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 88152fd96bc7SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 88162fd96bc7Smrg[AM_AUTOMAKE_VERSION([1.14.1])dnl 88172fd96bc7Smrgm4_ifndef([AC_AUTOCONF_VERSION], 88182fd96bc7Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 88192fd96bc7Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 88202fd96bc7Smrg 88212fd96bc7Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 88222fd96bc7Smrg 88232fd96bc7Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 88242fd96bc7Smrg# 88252fd96bc7Smrg# This file is free software; the Free Software Foundation 88262fd96bc7Smrg# gives unlimited permission to copy and/or distribute it, 88272fd96bc7Smrg# with or without modifications, as long as this notice is preserved. 88282fd96bc7Smrg 88292fd96bc7Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 88302fd96bc7Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 88312fd96bc7Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 88322fd96bc7Smrg# 88332fd96bc7Smrg# Of course, Automake must honor this variable whenever it calls a 88342fd96bc7Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 88352fd96bc7Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 88362fd96bc7Smrg# depending on how configure is run. This is pretty annoying, since 88372fd96bc7Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 88382fd96bc7Smrg# source directory, any form will work fine, but in subdirectories a 88392fd96bc7Smrg# relative path needs to be adjusted first. 88402fd96bc7Smrg# 88412fd96bc7Smrg# $ac_aux_dir/missing 88422fd96bc7Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 88432fd96bc7Smrg# $top_srcdir/$ac_aux_dir/missing 88442fd96bc7Smrg# fails if $ac_aux_dir is absolute, 88452fd96bc7Smrg# fails when called from a subdirectory in a VPATH build with 88462fd96bc7Smrg# a relative $ac_aux_dir 88472fd96bc7Smrg# 88482fd96bc7Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 88492fd96bc7Smrg# are both prefixed by $srcdir. In an in-source build this is usually 88502fd96bc7Smrg# harmless because $srcdir is '.', but things will broke when you 88512fd96bc7Smrg# start a VPATH build or use an absolute $srcdir. 88522fd96bc7Smrg# 88532fd96bc7Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 88542fd96bc7Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 88552fd96bc7Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 88562fd96bc7Smrg# and then we would define $MISSING as 88572fd96bc7Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 88582fd96bc7Smrg# This will work as long as MISSING is not called from configure, because 88592fd96bc7Smrg# unfortunately $(top_srcdir) has no meaning in configure. 88602fd96bc7Smrg# However there are other variables, like CC, which are often used in 88612fd96bc7Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 88622fd96bc7Smrg# 88632fd96bc7Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 88642fd96bc7Smrg# absolute PATH. The drawback is that using absolute paths prevent a 88652fd96bc7Smrg# configured tree to be moved without reconfiguration. 88662fd96bc7Smrg 88672fd96bc7SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 88682fd96bc7Smrg[dnl Rely on autoconf to set up CDPATH properly. 88692fd96bc7SmrgAC_PREREQ([2.50])dnl 88702fd96bc7Smrg# expand $ac_aux_dir to an absolute path 88712fd96bc7Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 88722fd96bc7Smrg]) 88732fd96bc7Smrg 88742fd96bc7Smrg# AM_CONDITIONAL -*- Autoconf -*- 88752fd96bc7Smrg 88762fd96bc7Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 88772fd96bc7Smrg# 88782fd96bc7Smrg# This file is free software; the Free Software Foundation 88792fd96bc7Smrg# gives unlimited permission to copy and/or distribute it, 88802fd96bc7Smrg# with or without modifications, as long as this notice is preserved. 88812fd96bc7Smrg 88822fd96bc7Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 88832fd96bc7Smrg# ------------------------------------- 88842fd96bc7Smrg# Define a conditional. 88852fd96bc7SmrgAC_DEFUN([AM_CONDITIONAL], 88862fd96bc7Smrg[AC_PREREQ([2.52])dnl 88872fd96bc7Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 88882fd96bc7Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 88892fd96bc7SmrgAC_SUBST([$1_TRUE])dnl 88902fd96bc7SmrgAC_SUBST([$1_FALSE])dnl 88912fd96bc7Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 88922fd96bc7Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 88932fd96bc7Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 88942fd96bc7Smrgif $2; then 88952fd96bc7Smrg $1_TRUE= 88962fd96bc7Smrg $1_FALSE='#' 88972fd96bc7Smrgelse 88982fd96bc7Smrg $1_TRUE='#' 88992fd96bc7Smrg $1_FALSE= 89002fd96bc7Smrgfi 89012fd96bc7SmrgAC_CONFIG_COMMANDS_PRE( 89022fd96bc7Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 89032fd96bc7Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 89042fd96bc7SmrgUsually this means the macro was only invoked conditionally.]]) 89052fd96bc7Smrgfi])]) 89062fd96bc7Smrg 89072fd96bc7Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 89082fd96bc7Smrg# 89092fd96bc7Smrg# This file is free software; the Free Software Foundation 89102fd96bc7Smrg# gives unlimited permission to copy and/or distribute it, 89112fd96bc7Smrg# with or without modifications, as long as this notice is preserved. 89122fd96bc7Smrg 89132fd96bc7Smrg 89142fd96bc7Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 89152fd96bc7Smrg# written in clear, in which case automake, when reading aclocal.m4, 89162fd96bc7Smrg# will think it sees a *use*, and therefore will trigger all it's 89172fd96bc7Smrg# C support machinery. Also note that it means that autoscan, seeing 89182fd96bc7Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 89192fd96bc7Smrg 89202fd96bc7Smrg 89212fd96bc7Smrg# _AM_DEPENDENCIES(NAME) 89222fd96bc7Smrg# ---------------------- 89232fd96bc7Smrg# See how the compiler implements dependency checking. 89242fd96bc7Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 89252fd96bc7Smrg# We try a few techniques and use that to set a single cache variable. 89262fd96bc7Smrg# 89272fd96bc7Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 89282fd96bc7Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 89292fd96bc7Smrg# dependency, and given that the user is not expected to run this macro, 89302fd96bc7Smrg# just rely on AC_PROG_CC. 89312fd96bc7SmrgAC_DEFUN([_AM_DEPENDENCIES], 89322fd96bc7Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 89332fd96bc7SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 89342fd96bc7SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 89352fd96bc7SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 89362fd96bc7Smrg 89372fd96bc7Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 89382fd96bc7Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 89392fd96bc7Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 89402fd96bc7Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 89412fd96bc7Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 89422fd96bc7Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 89432fd96bc7Smrg [depcc="$$1" am_compiler_list=]) 89442fd96bc7Smrg 89452fd96bc7SmrgAC_CACHE_CHECK([dependency style of $depcc], 89462fd96bc7Smrg [am_cv_$1_dependencies_compiler_type], 89472fd96bc7Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 89482fd96bc7Smrg # We make a subdir and do the tests there. Otherwise we can end up 89492fd96bc7Smrg # making bogus files that we don't know about and never remove. For 89502fd96bc7Smrg # instance it was reported that on HP-UX the gcc test will end up 89512fd96bc7Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 89522fd96bc7Smrg # in D". 89532fd96bc7Smrg rm -rf conftest.dir 89542fd96bc7Smrg mkdir conftest.dir 89552fd96bc7Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 89562fd96bc7Smrg # using a relative directory. 89572fd96bc7Smrg cp "$am_depcomp" conftest.dir 89582fd96bc7Smrg cd conftest.dir 89592fd96bc7Smrg # We will build objects and dependencies in a subdirectory because 89602fd96bc7Smrg # it helps to detect inapplicable dependency modes. For instance 89612fd96bc7Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 89622fd96bc7Smrg # side effect of compilation, but ICC will put the dependencies in 89632fd96bc7Smrg # the current directory while Tru64 will put them in the object 89642fd96bc7Smrg # directory. 89652fd96bc7Smrg mkdir sub 89662fd96bc7Smrg 89672fd96bc7Smrg am_cv_$1_dependencies_compiler_type=none 89682fd96bc7Smrg if test "$am_compiler_list" = ""; then 89692fd96bc7Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 89702fd96bc7Smrg fi 89712fd96bc7Smrg am__universal=false 89722fd96bc7Smrg m4_case([$1], [CC], 89732fd96bc7Smrg [case " $depcc " in #( 89742fd96bc7Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 89752fd96bc7Smrg esac], 89762fd96bc7Smrg [CXX], 89772fd96bc7Smrg [case " $depcc " in #( 89782fd96bc7Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 89792fd96bc7Smrg esac]) 89802fd96bc7Smrg 89812fd96bc7Smrg for depmode in $am_compiler_list; do 89822fd96bc7Smrg # Setup a source with many dependencies, because some compilers 89832fd96bc7Smrg # like to wrap large dependency lists on column 80 (with \), and 89842fd96bc7Smrg # we should not choose a depcomp mode which is confused by this. 89852fd96bc7Smrg # 89862fd96bc7Smrg # We need to recreate these files for each test, as the compiler may 89872fd96bc7Smrg # overwrite some of them when testing with obscure command lines. 89882fd96bc7Smrg # This happens at least with the AIX C compiler. 89892fd96bc7Smrg : > sub/conftest.c 89902fd96bc7Smrg for i in 1 2 3 4 5 6; do 89912fd96bc7Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 89922fd96bc7Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 89932fd96bc7Smrg # Solaris 10 /bin/sh. 89942fd96bc7Smrg echo '/* dummy */' > sub/conftst$i.h 89952fd96bc7Smrg done 89962fd96bc7Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 89972fd96bc7Smrg 89982fd96bc7Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 89992fd96bc7Smrg # mode. It turns out that the SunPro C++ compiler does not properly 90002fd96bc7Smrg # handle '-M -o', and we need to detect this. Also, some Intel 90012fd96bc7Smrg # versions had trouble with output in subdirs. 90022fd96bc7Smrg am__obj=sub/conftest.${OBJEXT-o} 90032fd96bc7Smrg am__minus_obj="-o $am__obj" 90042fd96bc7Smrg case $depmode in 90052fd96bc7Smrg gcc) 90062fd96bc7Smrg # This depmode causes a compiler race in universal mode. 90072fd96bc7Smrg test "$am__universal" = false || continue 90082fd96bc7Smrg ;; 90092fd96bc7Smrg nosideeffect) 90102fd96bc7Smrg # After this tag, mechanisms are not by side-effect, so they'll 90112fd96bc7Smrg # only be used when explicitly requested. 90122fd96bc7Smrg if test "x$enable_dependency_tracking" = xyes; then 90132fd96bc7Smrg continue 90142fd96bc7Smrg else 90152fd96bc7Smrg break 90162fd96bc7Smrg fi 90172fd96bc7Smrg ;; 90182fd96bc7Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 90192fd96bc7Smrg # This compiler won't grok '-c -o', but also, the minuso test has 90202fd96bc7Smrg # not run yet. These depmodes are late enough in the game, and 90212fd96bc7Smrg # so weak that their functioning should not be impacted. 90222fd96bc7Smrg am__obj=conftest.${OBJEXT-o} 90232fd96bc7Smrg am__minus_obj= 90242fd96bc7Smrg ;; 90252fd96bc7Smrg none) break ;; 90262fd96bc7Smrg esac 90272fd96bc7Smrg if depmode=$depmode \ 90282fd96bc7Smrg source=sub/conftest.c object=$am__obj \ 90292fd96bc7Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 90302fd96bc7Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 90312fd96bc7Smrg >/dev/null 2>conftest.err && 90322fd96bc7Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 90332fd96bc7Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 90342fd96bc7Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 90352fd96bc7Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 90362fd96bc7Smrg # icc doesn't choke on unknown options, it will just issue warnings 90372fd96bc7Smrg # or remarks (even with -Werror). So we grep stderr for any message 90382fd96bc7Smrg # that says an option was ignored or not supported. 90392fd96bc7Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 90402fd96bc7Smrg # icc: Command line warning: ignoring option '-M'; no argument required 90412fd96bc7Smrg # The diagnosis changed in icc 8.0: 90422fd96bc7Smrg # icc: Command line remark: option '-MP' not supported 90432fd96bc7Smrg if (grep 'ignoring option' conftest.err || 90442fd96bc7Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 90452fd96bc7Smrg am_cv_$1_dependencies_compiler_type=$depmode 90462fd96bc7Smrg break 90472fd96bc7Smrg fi 90482fd96bc7Smrg fi 90492fd96bc7Smrg done 90502fd96bc7Smrg 90512fd96bc7Smrg cd .. 90522fd96bc7Smrg rm -rf conftest.dir 90532fd96bc7Smrgelse 90542fd96bc7Smrg am_cv_$1_dependencies_compiler_type=none 90552fd96bc7Smrgfi 90562fd96bc7Smrg]) 90572fd96bc7SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 90582fd96bc7SmrgAM_CONDITIONAL([am__fastdep$1], [ 90592fd96bc7Smrg test "x$enable_dependency_tracking" != xno \ 90602fd96bc7Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 90612fd96bc7Smrg]) 90622fd96bc7Smrg 90632fd96bc7Smrg 90642fd96bc7Smrg# AM_SET_DEPDIR 90652fd96bc7Smrg# ------------- 90662fd96bc7Smrg# Choose a directory name for dependency files. 90672fd96bc7Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 90682fd96bc7SmrgAC_DEFUN([AM_SET_DEPDIR], 90692fd96bc7Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 90702fd96bc7SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 90712fd96bc7Smrg]) 90722fd96bc7Smrg 90732fd96bc7Smrg 90742fd96bc7Smrg# AM_DEP_TRACK 90752fd96bc7Smrg# ------------ 90762fd96bc7SmrgAC_DEFUN([AM_DEP_TRACK], 90772fd96bc7Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 90782fd96bc7SmrgAS_HELP_STRING( 90792fd96bc7Smrg [--enable-dependency-tracking], 90802fd96bc7Smrg [do not reject slow dependency extractors]) 90812fd96bc7SmrgAS_HELP_STRING( 90822fd96bc7Smrg [--disable-dependency-tracking], 90832fd96bc7Smrg [speeds up one-time build])]) 90842fd96bc7Smrgif test "x$enable_dependency_tracking" != xno; then 90852fd96bc7Smrg am_depcomp="$ac_aux_dir/depcomp" 90862fd96bc7Smrg AMDEPBACKSLASH='\' 90872fd96bc7Smrg am__nodep='_no' 90882fd96bc7Smrgfi 90892fd96bc7SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 90902fd96bc7SmrgAC_SUBST([AMDEPBACKSLASH])dnl 90912fd96bc7Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 90922fd96bc7SmrgAC_SUBST([am__nodep])dnl 90932fd96bc7Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 90942fd96bc7Smrg]) 90952fd96bc7Smrg 90962fd96bc7Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 90972fd96bc7Smrg 90982fd96bc7Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 90992fd96bc7Smrg# 91002fd96bc7Smrg# This file is free software; the Free Software Foundation 91012fd96bc7Smrg# gives unlimited permission to copy and/or distribute it, 91022fd96bc7Smrg# with or without modifications, as long as this notice is preserved. 91032fd96bc7Smrg 91042fd96bc7Smrg 91052fd96bc7Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 91062fd96bc7Smrg# ------------------------------ 91072fd96bc7SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 91082fd96bc7Smrg[{ 91092fd96bc7Smrg # Older Autoconf quotes --file arguments for eval, but not when files 91102fd96bc7Smrg # are listed without --file. Let's play safe and only enable the eval 91112fd96bc7Smrg # if we detect the quoting. 91122fd96bc7Smrg case $CONFIG_FILES in 91132fd96bc7Smrg *\'*) eval set x "$CONFIG_FILES" ;; 91142fd96bc7Smrg *) set x $CONFIG_FILES ;; 91152fd96bc7Smrg esac 91162fd96bc7Smrg shift 91172fd96bc7Smrg for mf 91182fd96bc7Smrg do 91192fd96bc7Smrg # Strip MF so we end up with the name of the file. 91202fd96bc7Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 91212fd96bc7Smrg # Check whether this is an Automake generated Makefile or not. 91222fd96bc7Smrg # We used to match only the files named 'Makefile.in', but 91232fd96bc7Smrg # some people rename them; so instead we look at the file content. 91242fd96bc7Smrg # Grep'ing the first line is not enough: some people post-process 91252fd96bc7Smrg # each Makefile.in and add a new line on top of each file to say so. 91262fd96bc7Smrg # Grep'ing the whole file is not good either: AIX grep has a line 91272fd96bc7Smrg # limit of 2048, but all sed's we know have understand at least 4000. 91282fd96bc7Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 91292fd96bc7Smrg dirpart=`AS_DIRNAME("$mf")` 91302fd96bc7Smrg else 91312fd96bc7Smrg continue 91322fd96bc7Smrg fi 91332fd96bc7Smrg # Extract the definition of DEPDIR, am__include, and am__quote 91342fd96bc7Smrg # from the Makefile without running 'make'. 91352fd96bc7Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 91362fd96bc7Smrg test -z "$DEPDIR" && continue 91372fd96bc7Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 91382fd96bc7Smrg test -z "$am__include" && continue 91392fd96bc7Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 91402fd96bc7Smrg # Find all dependency output files, they are included files with 91412fd96bc7Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 91422fd96bc7Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 91432fd96bc7Smrg # expansion. 91442fd96bc7Smrg for file in `sed -n " 91452fd96bc7Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 91462fd96bc7Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 91472fd96bc7Smrg # Make sure the directory exists. 91482fd96bc7Smrg test -f "$dirpart/$file" && continue 91492fd96bc7Smrg fdir=`AS_DIRNAME(["$file"])` 91502fd96bc7Smrg AS_MKDIR_P([$dirpart/$fdir]) 91512fd96bc7Smrg # echo "creating $dirpart/$file" 91522fd96bc7Smrg echo '# dummy' > "$dirpart/$file" 91532fd96bc7Smrg done 91542fd96bc7Smrg done 91552fd96bc7Smrg} 91562fd96bc7Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 91572fd96bc7Smrg 91582fd96bc7Smrg 91592fd96bc7Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 91602fd96bc7Smrg# ----------------------------- 91612fd96bc7Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 91622fd96bc7Smrg# 91632fd96bc7Smrg# This code is only required when automatic dependency tracking 91642fd96bc7Smrg# is enabled. FIXME. This creates each '.P' file that we will 91652fd96bc7Smrg# need in order to bootstrap the dependency handling code. 91662fd96bc7SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 91672fd96bc7Smrg[AC_CONFIG_COMMANDS([depfiles], 91682fd96bc7Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 91692fd96bc7Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 91702fd96bc7Smrg]) 91712fd96bc7Smrg 91722fd96bc7Smrg# Do all the work for Automake. -*- Autoconf -*- 91732fd96bc7Smrg 91742fd96bc7Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 91752fd96bc7Smrg# 91762fd96bc7Smrg# This file is free software; the Free Software Foundation 91772fd96bc7Smrg# gives unlimited permission to copy and/or distribute it, 91782fd96bc7Smrg# with or without modifications, as long as this notice is preserved. 91792fd96bc7Smrg 91802fd96bc7Smrg# This macro actually does too much. Some checks are only needed if 91812fd96bc7Smrg# your package does certain things. But this isn't really a big deal. 91822fd96bc7Smrg 91832fd96bc7Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 91842fd96bc7Smrgm4_define([AC_PROG_CC], 91852fd96bc7Smrgm4_defn([AC_PROG_CC]) 91862fd96bc7Smrg[_AM_PROG_CC_C_O 91872fd96bc7Smrg]) 91882fd96bc7Smrg 91892fd96bc7Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 91902fd96bc7Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 91912fd96bc7Smrg# ----------------------------------------------- 91922fd96bc7Smrg# The call with PACKAGE and VERSION arguments is the old style 91932fd96bc7Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 91942fd96bc7Smrg# and VERSION should now be passed to AC_INIT and removed from 91952fd96bc7Smrg# the call to AM_INIT_AUTOMAKE. 91962fd96bc7Smrg# We support both call styles for the transition. After 91972fd96bc7Smrg# the next Automake release, Autoconf can make the AC_INIT 91982fd96bc7Smrg# arguments mandatory, and then we can depend on a new Autoconf 91992fd96bc7Smrg# release and drop the old call support. 92002fd96bc7SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 92012fd96bc7Smrg[AC_PREREQ([2.65])dnl 92022fd96bc7Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 92032fd96bc7Smrgdnl the ones we care about. 92042fd96bc7Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 92052fd96bc7SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 92062fd96bc7SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 92072fd96bc7Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 92082fd96bc7Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 92092fd96bc7Smrg # is not polluted with repeated "-I." 92102fd96bc7Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 92112fd96bc7Smrg # test to see if srcdir already configured 92122fd96bc7Smrg if test -f $srcdir/config.status; then 92132fd96bc7Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 92142fd96bc7Smrg fi 92152fd96bc7Smrgfi 92162fd96bc7Smrg 92172fd96bc7Smrg# test whether we have cygpath 92182fd96bc7Smrgif test -z "$CYGPATH_W"; then 92192fd96bc7Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 92202fd96bc7Smrg CYGPATH_W='cygpath -w' 92212fd96bc7Smrg else 92222fd96bc7Smrg CYGPATH_W=echo 92232fd96bc7Smrg fi 92242fd96bc7Smrgfi 92252fd96bc7SmrgAC_SUBST([CYGPATH_W]) 92262fd96bc7Smrg 92272fd96bc7Smrg# Define the identity of the package. 92282fd96bc7Smrgdnl Distinguish between old-style and new-style calls. 92292fd96bc7Smrgm4_ifval([$2], 92302fd96bc7Smrg[AC_DIAGNOSE([obsolete], 92312fd96bc7Smrg [$0: two- and three-arguments forms are deprecated.]) 92322fd96bc7Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 92332fd96bc7Smrg AC_SUBST([PACKAGE], [$1])dnl 92342fd96bc7Smrg AC_SUBST([VERSION], [$2])], 92352fd96bc7Smrg[_AM_SET_OPTIONS([$1])dnl 92362fd96bc7Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 92372fd96bc7Smrgm4_if( 92382fd96bc7Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 92392fd96bc7Smrg [ok:ok],, 92402fd96bc7Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 92412fd96bc7Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 92422fd96bc7Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 92432fd96bc7Smrg 92442fd96bc7Smrg_AM_IF_OPTION([no-define],, 92452fd96bc7Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 92462fd96bc7Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 92472fd96bc7Smrg 92482fd96bc7Smrg# Some tools Automake needs. 92492fd96bc7SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 92502fd96bc7SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 92512fd96bc7SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 92522fd96bc7SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 92532fd96bc7SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 92542fd96bc7SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 92552fd96bc7SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 92562fd96bc7SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 92572fd96bc7SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 92582fd96bc7SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 92592fd96bc7Smrg# For better backward compatibility. To be removed once Automake 1.9.x 92602fd96bc7Smrg# dies out for good. For more background, see: 92612fd96bc7Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 92622fd96bc7Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 92632fd96bc7SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 92642fd96bc7Smrg# We need awk for the "check" target. The system "awk" is bad on 92652fd96bc7Smrg# some platforms. 92662fd96bc7SmrgAC_REQUIRE([AC_PROG_AWK])dnl 92672fd96bc7SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 92682fd96bc7SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 92692fd96bc7Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 92702fd96bc7Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 92712fd96bc7Smrg [_AM_PROG_TAR([v7])])]) 92722fd96bc7Smrg_AM_IF_OPTION([no-dependencies],, 92732fd96bc7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 92742fd96bc7Smrg [_AM_DEPENDENCIES([CC])], 92752fd96bc7Smrg [m4_define([AC_PROG_CC], 92762fd96bc7Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 92772fd96bc7SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 92782fd96bc7Smrg [_AM_DEPENDENCIES([CXX])], 92792fd96bc7Smrg [m4_define([AC_PROG_CXX], 92802fd96bc7Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 92812fd96bc7SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 92822fd96bc7Smrg [_AM_DEPENDENCIES([OBJC])], 92832fd96bc7Smrg [m4_define([AC_PROG_OBJC], 92842fd96bc7Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 92852fd96bc7SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 92862fd96bc7Smrg [_AM_DEPENDENCIES([OBJCXX])], 92872fd96bc7Smrg [m4_define([AC_PROG_OBJCXX], 92882fd96bc7Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 92892fd96bc7Smrg]) 92902fd96bc7SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 92912fd96bc7Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 92922fd96bc7Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 92932fd96bc7Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 92942fd96bc7SmrgAC_CONFIG_COMMANDS_PRE(dnl 92952fd96bc7Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 92962fd96bc7Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 92972fd96bc7Smrg 92982fd96bc7Smrg# POSIX will say in a future version that running "rm -f" with no argument 92992fd96bc7Smrg# is OK; and we want to be able to make that assumption in our Makefile 93002fd96bc7Smrg# recipes. So use an aggressive probe to check that the usage we want is 93012fd96bc7Smrg# actually supported "in the wild" to an acceptable degree. 93022fd96bc7Smrg# See automake bug#10828. 93032fd96bc7Smrg# To make any issue more visible, cause the running configure to be aborted 93042fd96bc7Smrg# by default if the 'rm' program in use doesn't match our expectations; the 93052fd96bc7Smrg# user can still override this though. 93062fd96bc7Smrgif rm -f && rm -fr && rm -rf; then : OK; else 93072fd96bc7Smrg cat >&2 <<'END' 93082fd96bc7SmrgOops! 93092fd96bc7Smrg 93102fd96bc7SmrgYour 'rm' program seems unable to run without file operands specified 93112fd96bc7Smrgon the command line, even when the '-f' option is present. This is contrary 93122fd96bc7Smrgto the behaviour of most rm programs out there, and not conforming with 93132fd96bc7Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 93142fd96bc7Smrg 93152fd96bc7SmrgPlease tell bug-automake@gnu.org about your system, including the value 93162fd96bc7Smrgof your $PATH and any error possibly output before this message. This 93172fd96bc7Smrgcan help us improve future automake versions. 93182fd96bc7Smrg 93192fd96bc7SmrgEND 93202fd96bc7Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 93212fd96bc7Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 93222fd96bc7Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 93232fd96bc7Smrg echo >&2 93242fd96bc7Smrg else 93252fd96bc7Smrg cat >&2 <<'END' 93262fd96bc7SmrgAborting the configuration process, to ensure you take notice of the issue. 93272fd96bc7Smrg 93282fd96bc7SmrgYou can download and install GNU coreutils to get an 'rm' implementation 93292fd96bc7Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 93302fd96bc7Smrg 93312fd96bc7SmrgIf you want to complete the configuration process using your problematic 93322fd96bc7Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 93332fd96bc7Smrgto "yes", and re-run configure. 93342fd96bc7Smrg 93352fd96bc7SmrgEND 93362fd96bc7Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 93372fd96bc7Smrg fi 93382fd96bc7Smrgfi]) 93392fd96bc7Smrg 93402fd96bc7Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 93412fd96bc7Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 93422fd96bc7Smrgdnl mangled by Autoconf and run in a shell conditional statement. 93432fd96bc7Smrgm4_define([_AC_COMPILER_EXEEXT], 93442fd96bc7Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 93452fd96bc7Smrg 93462fd96bc7Smrg# When config.status generates a header, we must update the stamp-h file. 93472fd96bc7Smrg# This file resides in the same directory as the config header 93482fd96bc7Smrg# that is generated. The stamp files are numbered to have different names. 93492fd96bc7Smrg 93502fd96bc7Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 93512fd96bc7Smrg# loop where config.status creates the headers, so we can generate 93522fd96bc7Smrg# our stamp files there. 93532fd96bc7SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 93542fd96bc7Smrg[# Compute $1's index in $config_headers. 93552fd96bc7Smrg_am_arg=$1 93562fd96bc7Smrg_am_stamp_count=1 93572fd96bc7Smrgfor _am_header in $config_headers :; do 93582fd96bc7Smrg case $_am_header in 93592fd96bc7Smrg $_am_arg | $_am_arg:* ) 93602fd96bc7Smrg break ;; 93612fd96bc7Smrg * ) 93622fd96bc7Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 93632fd96bc7Smrg esac 93642fd96bc7Smrgdone 93652fd96bc7Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 93662fd96bc7Smrg 93672fd96bc7Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 93682fd96bc7Smrg# 93692fd96bc7Smrg# This file is free software; the Free Software Foundation 93702fd96bc7Smrg# gives unlimited permission to copy and/or distribute it, 93712fd96bc7Smrg# with or without modifications, as long as this notice is preserved. 93722fd96bc7Smrg 93732fd96bc7Smrg# AM_PROG_INSTALL_SH 93742fd96bc7Smrg# ------------------ 93752fd96bc7Smrg# Define $install_sh. 93762fd96bc7SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 93772fd96bc7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 93782fd96bc7Smrgif test x"${install_sh}" != xset; then 93792fd96bc7Smrg case $am_aux_dir in 93802fd96bc7Smrg *\ * | *\ *) 93812fd96bc7Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 93822fd96bc7Smrg *) 93832fd96bc7Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 93842fd96bc7Smrg esac 93852fd96bc7Smrgfi 93862fd96bc7SmrgAC_SUBST([install_sh])]) 93872fd96bc7Smrg 93882fd96bc7Smrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 93892fd96bc7Smrg# 93902fd96bc7Smrg# This file is free software; the Free Software Foundation 93912fd96bc7Smrg# gives unlimited permission to copy and/or distribute it, 93922fd96bc7Smrg# with or without modifications, as long as this notice is preserved. 93932fd96bc7Smrg 93942fd96bc7Smrg# Check whether the underlying file-system supports filenames 93952fd96bc7Smrg# with a leading dot. For instance MS-DOS doesn't. 93962fd96bc7SmrgAC_DEFUN([AM_SET_LEADING_DOT], 93972fd96bc7Smrg[rm -rf .tst 2>/dev/null 93982fd96bc7Smrgmkdir .tst 2>/dev/null 93992fd96bc7Smrgif test -d .tst; then 94002fd96bc7Smrg am__leading_dot=. 94012fd96bc7Smrgelse 94022fd96bc7Smrg am__leading_dot=_ 94032fd96bc7Smrgfi 94042fd96bc7Smrgrmdir .tst 2>/dev/null 94052fd96bc7SmrgAC_SUBST([am__leading_dot])]) 94062fd96bc7Smrg 94072fd96bc7Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 94082fd96bc7Smrg 94092fd96bc7Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 94102fd96bc7Smrg# 94112fd96bc7Smrg# This file is free software; the Free Software Foundation 94122fd96bc7Smrg# gives unlimited permission to copy and/or distribute it, 94132fd96bc7Smrg# with or without modifications, as long as this notice is preserved. 94142fd96bc7Smrg 94152fd96bc7Smrg# AM_MAKE_INCLUDE() 94162fd96bc7Smrg# ----------------- 94172fd96bc7Smrg# Check to see how make treats includes. 94182fd96bc7SmrgAC_DEFUN([AM_MAKE_INCLUDE], 94192fd96bc7Smrg[am_make=${MAKE-make} 94202fd96bc7Smrgcat > confinc << 'END' 94212fd96bc7Smrgam__doit: 94222fd96bc7Smrg @echo this is the am__doit target 94232fd96bc7Smrg.PHONY: am__doit 94242fd96bc7SmrgEND 94252fd96bc7Smrg# If we don't find an include directive, just comment out the code. 94262fd96bc7SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 94272fd96bc7Smrgam__include="#" 94282fd96bc7Smrgam__quote= 94292fd96bc7Smrg_am_result=none 94302fd96bc7Smrg# First try GNU make style include. 94312fd96bc7Smrgecho "include confinc" > confmf 94322fd96bc7Smrg# Ignore all kinds of additional output from 'make'. 94332fd96bc7Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 94342fd96bc7Smrg*the\ am__doit\ target*) 94352fd96bc7Smrg am__include=include 94362fd96bc7Smrg am__quote= 94372fd96bc7Smrg _am_result=GNU 94382fd96bc7Smrg ;; 94392fd96bc7Smrgesac 94402fd96bc7Smrg# Now try BSD make style include. 94412fd96bc7Smrgif test "$am__include" = "#"; then 94422fd96bc7Smrg echo '.include "confinc"' > confmf 94432fd96bc7Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 94442fd96bc7Smrg *the\ am__doit\ target*) 94452fd96bc7Smrg am__include=.include 94462fd96bc7Smrg am__quote="\"" 94472fd96bc7Smrg _am_result=BSD 94482fd96bc7Smrg ;; 94492fd96bc7Smrg esac 94502fd96bc7Smrgfi 94512fd96bc7SmrgAC_SUBST([am__include]) 94522fd96bc7SmrgAC_SUBST([am__quote]) 94532fd96bc7SmrgAC_MSG_RESULT([$_am_result]) 94542fd96bc7Smrgrm -f confinc confmf 94552fd96bc7Smrg]) 94562fd96bc7Smrg 94572fd96bc7Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 94582fd96bc7Smrg 94592fd96bc7Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 94602fd96bc7Smrg# 94612fd96bc7Smrg# This file is free software; the Free Software Foundation 94622fd96bc7Smrg# gives unlimited permission to copy and/or distribute it, 94632fd96bc7Smrg# with or without modifications, as long as this notice is preserved. 94642fd96bc7Smrg 94652fd96bc7Smrg# AM_MISSING_PROG(NAME, PROGRAM) 94662fd96bc7Smrg# ------------------------------ 94672fd96bc7SmrgAC_DEFUN([AM_MISSING_PROG], 94682fd96bc7Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 94692fd96bc7Smrg$1=${$1-"${am_missing_run}$2"} 94702fd96bc7SmrgAC_SUBST($1)]) 94712fd96bc7Smrg 94722fd96bc7Smrg# AM_MISSING_HAS_RUN 94732fd96bc7Smrg# ------------------ 94742fd96bc7Smrg# Define MISSING if not defined so far and test if it is modern enough. 94752fd96bc7Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 94762fd96bc7SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 94772fd96bc7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 94782fd96bc7SmrgAC_REQUIRE_AUX_FILE([missing])dnl 94792fd96bc7Smrgif test x"${MISSING+set}" != xset; then 94802fd96bc7Smrg case $am_aux_dir in 94812fd96bc7Smrg *\ * | *\ *) 94822fd96bc7Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 94832fd96bc7Smrg *) 94842fd96bc7Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 94852fd96bc7Smrg esac 94862fd96bc7Smrgfi 94872fd96bc7Smrg# Use eval to expand $SHELL 94882fd96bc7Smrgif eval "$MISSING --is-lightweight"; then 94892fd96bc7Smrg am_missing_run="$MISSING " 94902fd96bc7Smrgelse 94912fd96bc7Smrg am_missing_run= 94922fd96bc7Smrg AC_MSG_WARN(['missing' script is too old or missing]) 94932fd96bc7Smrgfi 94942fd96bc7Smrg]) 94952fd96bc7Smrg 94962fd96bc7Smrg# Helper functions for option handling. -*- Autoconf -*- 94972fd96bc7Smrg 94982fd96bc7Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 94992fd96bc7Smrg# 95002fd96bc7Smrg# This file is free software; the Free Software Foundation 95012fd96bc7Smrg# gives unlimited permission to copy and/or distribute it, 95022fd96bc7Smrg# with or without modifications, as long as this notice is preserved. 95032fd96bc7Smrg 95042fd96bc7Smrg# _AM_MANGLE_OPTION(NAME) 95052fd96bc7Smrg# ----------------------- 95062fd96bc7SmrgAC_DEFUN([_AM_MANGLE_OPTION], 95072fd96bc7Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 95082fd96bc7Smrg 95092fd96bc7Smrg# _AM_SET_OPTION(NAME) 95102fd96bc7Smrg# -------------------- 95112fd96bc7Smrg# Set option NAME. Presently that only means defining a flag for this option. 95122fd96bc7SmrgAC_DEFUN([_AM_SET_OPTION], 95132fd96bc7Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 95142fd96bc7Smrg 95152fd96bc7Smrg# _AM_SET_OPTIONS(OPTIONS) 95162fd96bc7Smrg# ------------------------ 95172fd96bc7Smrg# OPTIONS is a space-separated list of Automake options. 95182fd96bc7SmrgAC_DEFUN([_AM_SET_OPTIONS], 95192fd96bc7Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 95202fd96bc7Smrg 95212fd96bc7Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 95222fd96bc7Smrg# ------------------------------------------- 95232fd96bc7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 95242fd96bc7SmrgAC_DEFUN([_AM_IF_OPTION], 95252fd96bc7Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 95262fd96bc7Smrg 95272fd96bc7Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 95282fd96bc7Smrg# 95292fd96bc7Smrg# This file is free software; the Free Software Foundation 95302fd96bc7Smrg# gives unlimited permission to copy and/or distribute it, 95312fd96bc7Smrg# with or without modifications, as long as this notice is preserved. 95322fd96bc7Smrg 95332fd96bc7Smrg# _AM_PROG_CC_C_O 95342fd96bc7Smrg# --------------- 95352fd96bc7Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 95362fd96bc7Smrg# to automatically call this. 95372fd96bc7SmrgAC_DEFUN([_AM_PROG_CC_C_O], 95382fd96bc7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 95392fd96bc7SmrgAC_REQUIRE_AUX_FILE([compile])dnl 95402fd96bc7SmrgAC_LANG_PUSH([C])dnl 95412fd96bc7SmrgAC_CACHE_CHECK( 95422fd96bc7Smrg [whether $CC understands -c and -o together], 95432fd96bc7Smrg [am_cv_prog_cc_c_o], 95442fd96bc7Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 95452fd96bc7Smrg # Make sure it works both with $CC and with simple cc. 95462fd96bc7Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 95472fd96bc7Smrg # compilers refuse to overwrite an existing .o file with -o, 95482fd96bc7Smrg # though they will create one. 95492fd96bc7Smrg am_cv_prog_cc_c_o=yes 95502fd96bc7Smrg for am_i in 1 2; do 95512fd96bc7Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 95522fd96bc7Smrg && test -f conftest2.$ac_objext; then 95532fd96bc7Smrg : OK 95542fd96bc7Smrg else 95552fd96bc7Smrg am_cv_prog_cc_c_o=no 95562fd96bc7Smrg break 95572fd96bc7Smrg fi 95582fd96bc7Smrg done 95592fd96bc7Smrg rm -f core conftest* 95602fd96bc7Smrg unset am_i]) 95612fd96bc7Smrgif test "$am_cv_prog_cc_c_o" != yes; then 95622fd96bc7Smrg # Losing compiler, so override with the script. 95632fd96bc7Smrg # FIXME: It is wrong to rewrite CC. 95642fd96bc7Smrg # But if we don't then we get into trouble of one sort or another. 95652fd96bc7Smrg # A longer-term fix would be to have automake use am__CC in this case, 95662fd96bc7Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 95672fd96bc7Smrg CC="$am_aux_dir/compile $CC" 95682fd96bc7Smrgfi 95692fd96bc7SmrgAC_LANG_POP([C])]) 95702fd96bc7Smrg 95712fd96bc7Smrg# For backward compatibility. 95722fd96bc7SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 95732fd96bc7Smrg 95742fd96bc7Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 95752fd96bc7Smrg# 95762fd96bc7Smrg# This file is free software; the Free Software Foundation 95772fd96bc7Smrg# gives unlimited permission to copy and/or distribute it, 95782fd96bc7Smrg# with or without modifications, as long as this notice is preserved. 95792fd96bc7Smrg 95802fd96bc7Smrg# AM_RUN_LOG(COMMAND) 95812fd96bc7Smrg# ------------------- 95822fd96bc7Smrg# Run COMMAND, save the exit status in ac_status, and log it. 95832fd96bc7Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 95842fd96bc7SmrgAC_DEFUN([AM_RUN_LOG], 95852fd96bc7Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 95862fd96bc7Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 95872fd96bc7Smrg ac_status=$? 95882fd96bc7Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 95892fd96bc7Smrg (exit $ac_status); }]) 95902fd96bc7Smrg 95912fd96bc7Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 95922fd96bc7Smrg 95932fd96bc7Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 95942fd96bc7Smrg# 95952fd96bc7Smrg# This file is free software; the Free Software Foundation 95962fd96bc7Smrg# gives unlimited permission to copy and/or distribute it, 95972fd96bc7Smrg# with or without modifications, as long as this notice is preserved. 95982fd96bc7Smrg 95992fd96bc7Smrg# AM_SANITY_CHECK 96002fd96bc7Smrg# --------------- 96012fd96bc7SmrgAC_DEFUN([AM_SANITY_CHECK], 96022fd96bc7Smrg[AC_MSG_CHECKING([whether build environment is sane]) 96032fd96bc7Smrg# Reject unsafe characters in $srcdir or the absolute working directory 96042fd96bc7Smrg# name. Accept space and tab only in the latter. 96052fd96bc7Smrgam_lf=' 96062fd96bc7Smrg' 96072fd96bc7Smrgcase `pwd` in 96082fd96bc7Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 96092fd96bc7Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 96102fd96bc7Smrgesac 96112fd96bc7Smrgcase $srcdir in 96122fd96bc7Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 96132fd96bc7Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 96142fd96bc7Smrgesac 96152fd96bc7Smrg 96162fd96bc7Smrg# Do 'set' in a subshell so we don't clobber the current shell's 96172fd96bc7Smrg# arguments. Must try -L first in case configure is actually a 96182fd96bc7Smrg# symlink; some systems play weird games with the mod time of symlinks 96192fd96bc7Smrg# (eg FreeBSD returns the mod time of the symlink's containing 96202fd96bc7Smrg# directory). 96212fd96bc7Smrgif ( 96222fd96bc7Smrg am_has_slept=no 96232fd96bc7Smrg for am_try in 1 2; do 96242fd96bc7Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 96252fd96bc7Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 96262fd96bc7Smrg if test "$[*]" = "X"; then 96272fd96bc7Smrg # -L didn't work. 96282fd96bc7Smrg set X `ls -t "$srcdir/configure" conftest.file` 96292fd96bc7Smrg fi 96302fd96bc7Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 96312fd96bc7Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 96322fd96bc7Smrg 96332fd96bc7Smrg # If neither matched, then we have a broken ls. This can happen 96342fd96bc7Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 96352fd96bc7Smrg # broken ls alias from the environment. This has actually 96362fd96bc7Smrg # happened. Such a system could not be considered "sane". 96372fd96bc7Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 96382fd96bc7Smrg alias in your environment]) 96392fd96bc7Smrg fi 96402fd96bc7Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 96412fd96bc7Smrg break 96422fd96bc7Smrg fi 96432fd96bc7Smrg # Just in case. 96442fd96bc7Smrg sleep 1 96452fd96bc7Smrg am_has_slept=yes 96462fd96bc7Smrg done 96472fd96bc7Smrg test "$[2]" = conftest.file 96482fd96bc7Smrg ) 96492fd96bc7Smrgthen 96502fd96bc7Smrg # Ok. 96512fd96bc7Smrg : 96522fd96bc7Smrgelse 96532fd96bc7Smrg AC_MSG_ERROR([newly created file is older than distributed files! 96542fd96bc7SmrgCheck your system clock]) 96552fd96bc7Smrgfi 96562fd96bc7SmrgAC_MSG_RESULT([yes]) 96572fd96bc7Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 96582fd96bc7Smrg# generated files are strictly newer. 96592fd96bc7Smrgam_sleep_pid= 96602fd96bc7Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 96612fd96bc7Smrg ( sleep 1 ) & 96622fd96bc7Smrg am_sleep_pid=$! 96632fd96bc7Smrgfi 96642fd96bc7SmrgAC_CONFIG_COMMANDS_PRE( 96652fd96bc7Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 96662fd96bc7Smrg if test -n "$am_sleep_pid"; then 96672fd96bc7Smrg # Hide warnings about reused PIDs. 96682fd96bc7Smrg wait $am_sleep_pid 2>/dev/null 96692fd96bc7Smrg fi 96702fd96bc7Smrg AC_MSG_RESULT([done])]) 96712fd96bc7Smrgrm -f conftest.file 96722fd96bc7Smrg]) 96732fd96bc7Smrg 96742fd96bc7Smrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 96752fd96bc7Smrg# 96762fd96bc7Smrg# This file is free software; the Free Software Foundation 96772fd96bc7Smrg# gives unlimited permission to copy and/or distribute it, 96782fd96bc7Smrg# with or without modifications, as long as this notice is preserved. 96792fd96bc7Smrg 96802fd96bc7Smrg# AM_SILENT_RULES([DEFAULT]) 96812fd96bc7Smrg# -------------------------- 96822fd96bc7Smrg# Enable less verbose build rules; with the default set to DEFAULT 96832fd96bc7Smrg# ("yes" being less verbose, "no" or empty being verbose). 96842fd96bc7SmrgAC_DEFUN([AM_SILENT_RULES], 96852fd96bc7Smrg[AC_ARG_ENABLE([silent-rules], [dnl 96862fd96bc7SmrgAS_HELP_STRING( 96872fd96bc7Smrg [--enable-silent-rules], 96882fd96bc7Smrg [less verbose build output (undo: "make V=1")]) 96892fd96bc7SmrgAS_HELP_STRING( 96902fd96bc7Smrg [--disable-silent-rules], 96912fd96bc7Smrg [verbose build output (undo: "make V=0")])dnl 96922fd96bc7Smrg]) 96932fd96bc7Smrgcase $enable_silent_rules in @%:@ ((( 96942fd96bc7Smrg yes) AM_DEFAULT_VERBOSITY=0;; 96952fd96bc7Smrg no) AM_DEFAULT_VERBOSITY=1;; 96962fd96bc7Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 96972fd96bc7Smrgesac 96982fd96bc7Smrgdnl 96992fd96bc7Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 97002fd96bc7Smrgdnl do not support nested variable expansions. 97012fd96bc7Smrgdnl See automake bug#9928 and bug#10237. 97022fd96bc7Smrgam_make=${MAKE-make} 97032fd96bc7SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 97042fd96bc7Smrg [am_cv_make_support_nested_variables], 97052fd96bc7Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 97062fd96bc7SmrgBAR0=false 97072fd96bc7SmrgBAR1=true 97082fd96bc7SmrgV=1 97092fd96bc7Smrgam__doit: 97102fd96bc7Smrg @$(TRUE) 97112fd96bc7Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 97122fd96bc7Smrg am_cv_make_support_nested_variables=yes 97132fd96bc7Smrgelse 97142fd96bc7Smrg am_cv_make_support_nested_variables=no 97152fd96bc7Smrgfi]) 97162fd96bc7Smrgif test $am_cv_make_support_nested_variables = yes; then 97172fd96bc7Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 97182fd96bc7Smrg AM_V='$(V)' 97192fd96bc7Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 97202fd96bc7Smrgelse 97212fd96bc7Smrg AM_V=$AM_DEFAULT_VERBOSITY 97222fd96bc7Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 97232fd96bc7Smrgfi 97242fd96bc7SmrgAC_SUBST([AM_V])dnl 97252fd96bc7SmrgAM_SUBST_NOTMAKE([AM_V])dnl 97262fd96bc7SmrgAC_SUBST([AM_DEFAULT_V])dnl 97272fd96bc7SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 97282fd96bc7SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 97292fd96bc7SmrgAM_BACKSLASH='\' 97302fd96bc7SmrgAC_SUBST([AM_BACKSLASH])dnl 97312fd96bc7Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 97322fd96bc7Smrg]) 97332fd96bc7Smrg 97342fd96bc7Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 97352fd96bc7Smrg# 97362fd96bc7Smrg# This file is free software; the Free Software Foundation 97372fd96bc7Smrg# gives unlimited permission to copy and/or distribute it, 97382fd96bc7Smrg# with or without modifications, as long as this notice is preserved. 973989c04b6cSmrg 97402fd96bc7Smrg# AM_PROG_INSTALL_STRIP 97412fd96bc7Smrg# --------------------- 97422fd96bc7Smrg# One issue with vendor 'install' (even GNU) is that you can't 97432fd96bc7Smrg# specify the program used to strip binaries. This is especially 97442fd96bc7Smrg# annoying in cross-compiling environments, where the build's strip 97452fd96bc7Smrg# is unlikely to handle the host's binaries. 97462fd96bc7Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 97472fd96bc7Smrg# always use install-sh in "make install-strip", and initialize 97482fd96bc7Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 97492fd96bc7SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 97502fd96bc7Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 97512fd96bc7Smrg# Installed binaries are usually stripped using 'strip' when the user 97522fd96bc7Smrg# run "make install-strip". However 'strip' might not be the right 97532fd96bc7Smrg# tool to use in cross-compilation environments, therefore Automake 97542fd96bc7Smrg# will honor the 'STRIP' environment variable to overrule this program. 97552fd96bc7Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 97562fd96bc7Smrgif test "$cross_compiling" != no; then 97572fd96bc7Smrg AC_CHECK_TOOL([STRIP], [strip], :) 975889c04b6cSmrgfi 97592fd96bc7SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 97602fd96bc7SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 976189c04b6cSmrg 97622fd96bc7Smrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 976389c04b6cSmrg# 97642fd96bc7Smrg# This file is free software; the Free Software Foundation 97652fd96bc7Smrg# gives unlimited permission to copy and/or distribute it, 97662fd96bc7Smrg# with or without modifications, as long as this notice is preserved. 976789c04b6cSmrg 97682fd96bc7Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 97692fd96bc7Smrg# --------------------------- 97702fd96bc7Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 97712fd96bc7Smrg# This macro is traced by Automake. 97722fd96bc7SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 977389c04b6cSmrg 97742fd96bc7Smrg# AM_SUBST_NOTMAKE(VARIABLE) 97752fd96bc7Smrg# -------------------------- 97762fd96bc7Smrg# Public sister of _AM_SUBST_NOTMAKE. 97772fd96bc7SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 977889c04b6cSmrg 97792fd96bc7Smrg# Check how to create a tarball. -*- Autoconf -*- 978089c04b6cSmrg 97812fd96bc7Smrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 978289c04b6cSmrg# 97832fd96bc7Smrg# This file is free software; the Free Software Foundation 97842fd96bc7Smrg# gives unlimited permission to copy and/or distribute it, 97852fd96bc7Smrg# with or without modifications, as long as this notice is preserved. 97862fd96bc7Smrg 97872fd96bc7Smrg# _AM_PROG_TAR(FORMAT) 97882fd96bc7Smrg# -------------------- 97892fd96bc7Smrg# Check how to create a tarball in format FORMAT. 97902fd96bc7Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 979189c04b6cSmrg# 97922fd96bc7Smrg# Substitute a variable $(am__tar) that is a command 97932fd96bc7Smrg# writing to stdout a FORMAT-tarball containing the directory 97942fd96bc7Smrg# $tardir. 97952fd96bc7Smrg# tardir=directory && $(am__tar) > result.tar 979689c04b6cSmrg# 97972fd96bc7Smrg# Substitute a variable $(am__untar) that extract such 97982fd96bc7Smrg# a tarball read from stdin. 97992fd96bc7Smrg# $(am__untar) < result.tar 980089c04b6cSmrg# 98012fd96bc7SmrgAC_DEFUN([_AM_PROG_TAR], 98022fd96bc7Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 98032fd96bc7Smrg# in the wild :-( We should find a proper way to deprecate it ... 98042fd96bc7SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 980589c04b6cSmrg 98062fd96bc7Smrg# We'll loop over all known methods to create a tar archive until one works. 98072fd96bc7Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 980889c04b6cSmrg 98092fd96bc7Smrgm4_if([$1], [v7], 98102fd96bc7Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 981189c04b6cSmrg 98122fd96bc7Smrg [m4_case([$1], 98132fd96bc7Smrg [ustar], 98142fd96bc7Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 98152fd96bc7Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 98162fd96bc7Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 98172fd96bc7Smrg # and bug#13588). 98182fd96bc7Smrg am_max_uid=2097151 # 2^21 - 1 98192fd96bc7Smrg am_max_gid=$am_max_uid 98202fd96bc7Smrg # The $UID and $GID variables are not portable, so we need to resort 98212fd96bc7Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 98222fd96bc7Smrg # below are definitely unexpected, so allow the users to see them 98232fd96bc7Smrg # (that is, avoid stderr redirection). 98242fd96bc7Smrg am_uid=`id -u || echo unknown` 98252fd96bc7Smrg am_gid=`id -g || echo unknown` 98262fd96bc7Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 98272fd96bc7Smrg if test $am_uid -le $am_max_uid; then 98282fd96bc7Smrg AC_MSG_RESULT([yes]) 98292fd96bc7Smrg else 98302fd96bc7Smrg AC_MSG_RESULT([no]) 98312fd96bc7Smrg _am_tools=none 98322fd96bc7Smrg fi 98332fd96bc7Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 98342fd96bc7Smrg if test $am_gid -le $am_max_gid; then 98352fd96bc7Smrg AC_MSG_RESULT([yes]) 98362fd96bc7Smrg else 98372fd96bc7Smrg AC_MSG_RESULT([no]) 98382fd96bc7Smrg _am_tools=none 98392fd96bc7Smrg fi], 984089c04b6cSmrg 98412fd96bc7Smrg [pax], 98422fd96bc7Smrg [], 984389c04b6cSmrg 98442fd96bc7Smrg [m4_fatal([Unknown tar format])]) 984589c04b6cSmrg 98462fd96bc7Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 984789c04b6cSmrg 98482fd96bc7Smrg # Go ahead even if we have the value already cached. We do so because we 98492fd96bc7Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 98502fd96bc7Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 985189c04b6cSmrg 98522fd96bc7Smrg for _am_tool in $_am_tools; do 98532fd96bc7Smrg case $_am_tool in 98542fd96bc7Smrg gnutar) 98552fd96bc7Smrg for _am_tar in tar gnutar gtar; do 98562fd96bc7Smrg AM_RUN_LOG([$_am_tar --version]) && break 98572fd96bc7Smrg done 98582fd96bc7Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 98592fd96bc7Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 98602fd96bc7Smrg am__untar="$_am_tar -xf -" 98612fd96bc7Smrg ;; 98622fd96bc7Smrg plaintar) 98632fd96bc7Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 98642fd96bc7Smrg # ustar tarball either. 98652fd96bc7Smrg (tar --version) >/dev/null 2>&1 && continue 98662fd96bc7Smrg am__tar='tar chf - "$$tardir"' 98672fd96bc7Smrg am__tar_='tar chf - "$tardir"' 98682fd96bc7Smrg am__untar='tar xf -' 98692fd96bc7Smrg ;; 98702fd96bc7Smrg pax) 98712fd96bc7Smrg am__tar='pax -L -x $1 -w "$$tardir"' 98722fd96bc7Smrg am__tar_='pax -L -x $1 -w "$tardir"' 98732fd96bc7Smrg am__untar='pax -r' 98742fd96bc7Smrg ;; 98752fd96bc7Smrg cpio) 98762fd96bc7Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 98772fd96bc7Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 98782fd96bc7Smrg am__untar='cpio -i -H $1 -d' 98792fd96bc7Smrg ;; 98802fd96bc7Smrg none) 98812fd96bc7Smrg am__tar=false 98822fd96bc7Smrg am__tar_=false 98832fd96bc7Smrg am__untar=false 98842fd96bc7Smrg ;; 98852fd96bc7Smrg esac 988689c04b6cSmrg 98872fd96bc7Smrg # If the value was cached, stop now. We just wanted to have am__tar 98882fd96bc7Smrg # and am__untar set. 98892fd96bc7Smrg test -n "${am_cv_prog_tar_$1}" && break 989089c04b6cSmrg 98912fd96bc7Smrg # tar/untar a dummy directory, and stop if the command works. 98922fd96bc7Smrg rm -rf conftest.dir 98932fd96bc7Smrg mkdir conftest.dir 98942fd96bc7Smrg echo GrepMe > conftest.dir/file 98952fd96bc7Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 98962fd96bc7Smrg rm -rf conftest.dir 98972fd96bc7Smrg if test -s conftest.tar; then 98982fd96bc7Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 98992fd96bc7Smrg AM_RUN_LOG([cat conftest.dir/file]) 99002fd96bc7Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 99012fd96bc7Smrg fi 99022fd96bc7Smrg done 99032fd96bc7Smrg rm -rf conftest.dir 99042fd96bc7Smrg 99052fd96bc7Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 99062fd96bc7Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 99072fd96bc7Smrg 99082fd96bc7SmrgAC_SUBST([am__tar]) 99092fd96bc7SmrgAC_SUBST([am__untar]) 99102fd96bc7Smrg]) # _AM_PROG_TAR 991189c04b6cSmrg 99126fae4e5dSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 99136fae4e5dSmrgdnl 99142fd96bc7Smrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 9915b9867631Smrgdnl 99166fae4e5dSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 99176fae4e5dSmrgdnl copy of this software and associated documentation files (the "Software"), 99186fae4e5dSmrgdnl to deal in the Software without restriction, including without limitation 99196fae4e5dSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 99206fae4e5dSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 99216fae4e5dSmrgdnl Software is furnished to do so, subject to the following conditions: 99226fae4e5dSmrgdnl 99236fae4e5dSmrgdnl The above copyright notice and this permission notice (including the next 99246fae4e5dSmrgdnl paragraph) shall be included in all copies or substantial portions of the 99256fae4e5dSmrgdnl Software. 99266fae4e5dSmrgdnl 99276fae4e5dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 99286fae4e5dSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 99296fae4e5dSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 99306fae4e5dSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 99316fae4e5dSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 99326fae4e5dSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 99336fae4e5dSmrgdnl DEALINGS IN THE SOFTWARE. 99341f0ac6a5Smrg 99356fae4e5dSmrg# XORG_MACROS_VERSION(required-version) 99366fae4e5dSmrg# ------------------------------------- 99376fae4e5dSmrg# Minimum version: 1.1.0 99386fae4e5dSmrg# 99396fae4e5dSmrg# If you're using a macro added in Version 1.1 or newer, include this in 99406fae4e5dSmrg# your configure.ac with the minimum required version, such as: 99416fae4e5dSmrg# XORG_MACROS_VERSION(1.1) 99426fae4e5dSmrg# 99436fae4e5dSmrg# To ensure that this macro is defined, also add: 99446fae4e5dSmrg# m4_ifndef([XORG_MACROS_VERSION], 99456fae4e5dSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 99466fae4e5dSmrg# 99476fae4e5dSmrg# 9948b9867631Smrg# See the "minimum version" comment for each macro you use to see what 99496fae4e5dSmrg# version you require. 99506fae4e5dSmrgm4_defun([XORG_MACROS_VERSION],[ 9951b9867631Smrgm4_define([vers_have], [1.19.0]) 99526fae4e5dSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 99536fae4e5dSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 99546fae4e5dSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 99556fae4e5dSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 99566fae4e5dSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 99576fae4e5dSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 99586fae4e5dSmrgm4_undefine([vers_have]) 99596fae4e5dSmrgm4_undefine([maj_have]) 99606fae4e5dSmrgm4_undefine([maj_needed]) 99616fae4e5dSmrg]) # XORG_MACROS_VERSION 99621f0ac6a5Smrg 99636fae4e5dSmrg# XORG_PROG_RAWCPP() 99646fae4e5dSmrg# ------------------ 99656fae4e5dSmrg# Minimum version: 1.0.0 99666fae4e5dSmrg# 99676fae4e5dSmrg# Find cpp program and necessary flags for use in pre-processing text files 99686fae4e5dSmrg# such as man pages and config files 99696fae4e5dSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 99706fae4e5dSmrgAC_REQUIRE([AC_PROG_CPP]) 9971b9867631SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 99726fae4e5dSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 99731f0ac6a5Smrg 99746fae4e5dSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 99756fae4e5dSmrg# which is not the best choice for supporting other OS'es, but covers most 99766fae4e5dSmrg# of the ones we need for now. 99776fae4e5dSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 99786fae4e5dSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 99796fae4e5dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99806fae4e5dSmrg AC_MSG_RESULT([no]) 99816fae4e5dSmrgelse 99826fae4e5dSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99836fae4e5dSmrg RAWCPPFLAGS=-undef 99846fae4e5dSmrg AC_MSG_RESULT([yes]) 99856fae4e5dSmrg # under Cygwin unix is still defined even with -undef 99866fae4e5dSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99876fae4e5dSmrg RAWCPPFLAGS="-undef -ansi" 99886fae4e5dSmrg AC_MSG_RESULT([yes, with -ansi]) 99896fae4e5dSmrg else 99906fae4e5dSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 99916fae4e5dSmrg fi 99926fae4e5dSmrgfi 99936fae4e5dSmrgrm -f conftest.$ac_ext 99941f0ac6a5Smrg 99956fae4e5dSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 99966fae4e5dSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 99976fae4e5dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 99986fae4e5dSmrg AC_MSG_RESULT([no]) 99996fae4e5dSmrgelse 100006fae4e5dSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 10001b9867631Smrg TRADITIONALCPPFLAGS="-traditional" 100026fae4e5dSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 100036fae4e5dSmrg AC_MSG_RESULT([yes]) 100046fae4e5dSmrg else 100056fae4e5dSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 100066fae4e5dSmrg fi 100076fae4e5dSmrgfi 100086fae4e5dSmrgrm -f conftest.$ac_ext 100096fae4e5dSmrgAC_SUBST(RAWCPPFLAGS) 10010b9867631SmrgAC_SUBST(TRADITIONALCPPFLAGS) 100116fae4e5dSmrg]) # XORG_PROG_RAWCPP 100121f0ac6a5Smrg 100136fae4e5dSmrg# XORG_MANPAGE_SECTIONS() 100146fae4e5dSmrg# ----------------------- 100156fae4e5dSmrg# Minimum version: 1.0.0 100169c9ff80cSmrg# 100176fae4e5dSmrg# Determine which sections man pages go in for the different man page types 100186fae4e5dSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 100196fae4e5dSmrg# Not sure if there's any better way than just hardcoding by OS name. 100206fae4e5dSmrg# Override default settings by setting environment variables 100216fae4e5dSmrg# Added MAN_SUBSTS in version 1.8 100226fae4e5dSmrg# Added AC_PROG_SED in version 1.8 100231f0ac6a5Smrg 100246fae4e5dSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 100256fae4e5dSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 100266fae4e5dSmrgAC_REQUIRE([AC_PROG_SED]) 100279c9ff80cSmrg 100286fae4e5dSmrgif test x$APP_MAN_SUFFIX = x ; then 100296fae4e5dSmrg APP_MAN_SUFFIX=1 100306fae4e5dSmrgfi 100316fae4e5dSmrgif test x$APP_MAN_DIR = x ; then 100326fae4e5dSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 100336fae4e5dSmrgfi 100349c9ff80cSmrg 100356fae4e5dSmrgif test x$LIB_MAN_SUFFIX = x ; then 100366fae4e5dSmrg LIB_MAN_SUFFIX=3 100376fae4e5dSmrgfi 100386fae4e5dSmrgif test x$LIB_MAN_DIR = x ; then 100396fae4e5dSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 100406fae4e5dSmrgfi 100419c9ff80cSmrg 100426fae4e5dSmrgif test x$FILE_MAN_SUFFIX = x ; then 100436fae4e5dSmrg case $host_os in 100442fd96bc7Smrg # Solaris 2.0 - 11 use SysV man page sections 100452fd96bc7Smrg solaris2.?|solaris2.1[[01]]) FILE_MAN_SUFFIX=4 ;; 100462fd96bc7Smrg *) FILE_MAN_SUFFIX=5 ;; 100476fae4e5dSmrg esac 100486fae4e5dSmrgfi 100496fae4e5dSmrgif test x$FILE_MAN_DIR = x ; then 100506fae4e5dSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 100516fae4e5dSmrgfi 100529c9ff80cSmrg 100536fae4e5dSmrgif test x$MISC_MAN_SUFFIX = x ; then 100546fae4e5dSmrg case $host_os in 100552fd96bc7Smrg # Solaris 2.0 - 11 use SysV man page sections 100562fd96bc7Smrg solaris2.?|solaris2.1[[01]]) MISC_MAN_SUFFIX=5 ;; 100572fd96bc7Smrg *) MISC_MAN_SUFFIX=7 ;; 100586fae4e5dSmrg esac 100596fae4e5dSmrgfi 100606fae4e5dSmrgif test x$MISC_MAN_DIR = x ; then 100616fae4e5dSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 100626fae4e5dSmrgfi 100639c9ff80cSmrg 100646fae4e5dSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 100656fae4e5dSmrg case $host_os in 100662fd96bc7Smrg # Solaris 2.0 - 11 use SysV man page sections 100672fd96bc7Smrg solaris2.?|solaris2.1[[01]]) DRIVER_MAN_SUFFIX=7 ;; 100682fd96bc7Smrg *) DRIVER_MAN_SUFFIX=4 ;; 100696fae4e5dSmrg esac 100706fae4e5dSmrgfi 100716fae4e5dSmrgif test x$DRIVER_MAN_DIR = x ; then 100726fae4e5dSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 100736fae4e5dSmrgfi 100749c9ff80cSmrg 100756fae4e5dSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 100766fae4e5dSmrg case $host_os in 100772fd96bc7Smrg # Solaris 2.0 - 11 use SysV man page sections 100782fd96bc7Smrg solaris2.?|solaris2.1[[01]]) ADMIN_MAN_SUFFIX=1m ;; 100792fd96bc7Smrg *) ADMIN_MAN_SUFFIX=8 ;; 100806fae4e5dSmrg esac 100816fae4e5dSmrgfi 100826fae4e5dSmrgif test x$ADMIN_MAN_DIR = x ; then 100836fae4e5dSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 100846fae4e5dSmrgfi 100859c9ff80cSmrg 100869c9ff80cSmrg 100876fae4e5dSmrgAC_SUBST([APP_MAN_SUFFIX]) 100886fae4e5dSmrgAC_SUBST([LIB_MAN_SUFFIX]) 100896fae4e5dSmrgAC_SUBST([FILE_MAN_SUFFIX]) 100906fae4e5dSmrgAC_SUBST([MISC_MAN_SUFFIX]) 100916fae4e5dSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 100926fae4e5dSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 100936fae4e5dSmrgAC_SUBST([APP_MAN_DIR]) 100946fae4e5dSmrgAC_SUBST([LIB_MAN_DIR]) 100956fae4e5dSmrgAC_SUBST([FILE_MAN_DIR]) 100966fae4e5dSmrgAC_SUBST([MISC_MAN_DIR]) 100976fae4e5dSmrgAC_SUBST([DRIVER_MAN_DIR]) 100986fae4e5dSmrgAC_SUBST([ADMIN_MAN_DIR]) 100991f0ac6a5Smrg 101006fae4e5dSmrgXORG_MAN_PAGE="X Version 11" 101016fae4e5dSmrgAC_SUBST([XORG_MAN_PAGE]) 101026fae4e5dSmrgMAN_SUBSTS="\ 101036fae4e5dSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 101046fae4e5dSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 101056fae4e5dSmrg -e 's|__xservername__|Xorg|g' \ 101066fae4e5dSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 101076fae4e5dSmrg -e 's|__projectroot__|\$(prefix)|g' \ 101086fae4e5dSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 101096fae4e5dSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 101106fae4e5dSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 101116fae4e5dSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 101126fae4e5dSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 101136fae4e5dSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 101146fae4e5dSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 101156fae4e5dSmrgAC_SUBST([MAN_SUBSTS]) 101161f0ac6a5Smrg 101176fae4e5dSmrg]) # XORG_MANPAGE_SECTIONS 101189c9ff80cSmrg 101196fae4e5dSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 101206fae4e5dSmrg# ------------------------ 101216fae4e5dSmrg# Minimum version: 1.7.0 101226fae4e5dSmrg# 101236fae4e5dSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 101246fae4e5dSmrg# provided by xorg-sgml-doctools, if installed. 101256fae4e5dSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 101266fae4e5dSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 101276fae4e5dSmrgXORG_SGML_PATH= 101286fae4e5dSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 101296fae4e5dSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 101306fae4e5dSmrg [m4_ifval([$1],[:], 101316fae4e5dSmrg [if test x"$cross_compiling" != x"yes" ; then 101326fae4e5dSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 101336fae4e5dSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 101346fae4e5dSmrg fi]) 101356fae4e5dSmrg ]) 101361f0ac6a5Smrg 101376fae4e5dSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 101386fae4e5dSmrg# the path and the name of the doc stylesheet 101396fae4e5dSmrgif test "x$XORG_SGML_PATH" != "x" ; then 101406fae4e5dSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 101416fae4e5dSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 101426fae4e5dSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 101436fae4e5dSmrgelse 101446fae4e5dSmrg AC_MSG_RESULT([no]) 101456fae4e5dSmrgfi 101461f0ac6a5Smrg 101476fae4e5dSmrgAC_SUBST(XORG_SGML_PATH) 101486fae4e5dSmrgAC_SUBST(STYLESHEET_SRCDIR) 101496fae4e5dSmrgAC_SUBST(XSL_STYLESHEET) 101506fae4e5dSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 101516fae4e5dSmrg]) # XORG_CHECK_SGML_DOCTOOLS 101521f0ac6a5Smrg 101536fae4e5dSmrg# XORG_CHECK_LINUXDOC 101546fae4e5dSmrg# ------------------- 101556fae4e5dSmrg# Minimum version: 1.0.0 101566fae4e5dSmrg# 101576fae4e5dSmrg# Defines the variable MAKE_TEXT if the necessary tools and 101586fae4e5dSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 101596fae4e5dSmrg# Whether or not the necessary tools and files are found can be checked 101606fae4e5dSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 101616fae4e5dSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 101626fae4e5dSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 101636fae4e5dSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 101641f0ac6a5Smrg 101656fae4e5dSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 101661f0ac6a5Smrg 101676fae4e5dSmrgAC_MSG_CHECKING([whether to build documentation]) 101681f0ac6a5Smrg 101696fae4e5dSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 101706fae4e5dSmrg BUILDDOC=yes 101716fae4e5dSmrgelse 101726fae4e5dSmrg BUILDDOC=no 101736fae4e5dSmrgfi 101741f0ac6a5Smrg 101756fae4e5dSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 101761f0ac6a5Smrg 101776fae4e5dSmrgAC_MSG_RESULT([$BUILDDOC]) 101781f0ac6a5Smrg 101796fae4e5dSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 101801f0ac6a5Smrg 101816fae4e5dSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 101826fae4e5dSmrg BUILDPDFDOC=yes 101836fae4e5dSmrgelse 101846fae4e5dSmrg BUILDPDFDOC=no 101856fae4e5dSmrgfi 101861f0ac6a5Smrg 101876fae4e5dSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 101881f0ac6a5Smrg 101896fae4e5dSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 101901f0ac6a5Smrg 101916fae4e5dSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 101926fae4e5dSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 101936fae4e5dSmrgMAKE_PDF="$PS2PDF" 101946fae4e5dSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 101951f0ac6a5Smrg 101966fae4e5dSmrgAC_SUBST(MAKE_TEXT) 101976fae4e5dSmrgAC_SUBST(MAKE_PS) 101986fae4e5dSmrgAC_SUBST(MAKE_PDF) 101996fae4e5dSmrgAC_SUBST(MAKE_HTML) 102006fae4e5dSmrg]) # XORG_CHECK_LINUXDOC 102011f0ac6a5Smrg 102026fae4e5dSmrg# XORG_CHECK_DOCBOOK 102036fae4e5dSmrg# ------------------- 102046fae4e5dSmrg# Minimum version: 1.0.0 102056fae4e5dSmrg# 102066fae4e5dSmrg# Checks for the ability to build output formats from SGML DocBook source. 102076fae4e5dSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 102086fae4e5dSmrg# indicates whether the necessary tools and files are found and, if set, 102096fae4e5dSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 102106fae4e5dSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 102116fae4e5dSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 102121f0ac6a5Smrg 102136fae4e5dSmrgBUILDTXTDOC=no 102146fae4e5dSmrgBUILDPDFDOC=no 102156fae4e5dSmrgBUILDPSDOC=no 102166fae4e5dSmrgBUILDHTMLDOC=no 102171f0ac6a5Smrg 102186fae4e5dSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 102196fae4e5dSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 102206fae4e5dSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 102216fae4e5dSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 102221f0ac6a5Smrg 102236fae4e5dSmrgAC_MSG_CHECKING([whether to build text documentation]) 102246fae4e5dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 102256fae4e5dSmrg test x$BUILD_TXTDOC != xno; then 102266fae4e5dSmrg BUILDTXTDOC=yes 102276fae4e5dSmrgfi 102286fae4e5dSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 102296fae4e5dSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 102301f0ac6a5Smrg 102316fae4e5dSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 102326fae4e5dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 102336fae4e5dSmrg test x$BUILD_PDFDOC != xno; then 102346fae4e5dSmrg BUILDPDFDOC=yes 102356fae4e5dSmrgfi 102366fae4e5dSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 102376fae4e5dSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 102381f0ac6a5Smrg 102396fae4e5dSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 102406fae4e5dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 102416fae4e5dSmrg test x$BUILD_PSDOC != xno; then 102426fae4e5dSmrg BUILDPSDOC=yes 102436fae4e5dSmrgfi 102446fae4e5dSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 102456fae4e5dSmrgAC_MSG_RESULT([$BUILDPSDOC]) 102461f0ac6a5Smrg 102476fae4e5dSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 102486fae4e5dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 102496fae4e5dSmrg test x$BUILD_HTMLDOC != xno; then 102506fae4e5dSmrg BUILDHTMLDOC=yes 102516fae4e5dSmrgfi 102526fae4e5dSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 102536fae4e5dSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 102541f0ac6a5Smrg 102556fae4e5dSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 102566fae4e5dSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 102576fae4e5dSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 102586fae4e5dSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 102591f0ac6a5Smrg 102606fae4e5dSmrgAC_SUBST(MAKE_TEXT) 102616fae4e5dSmrgAC_SUBST(MAKE_PS) 102626fae4e5dSmrgAC_SUBST(MAKE_PDF) 102636fae4e5dSmrgAC_SUBST(MAKE_HTML) 102646fae4e5dSmrg]) # XORG_CHECK_DOCBOOK 102651f0ac6a5Smrg 102666fae4e5dSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 102676fae4e5dSmrg# ---------------- 102686fae4e5dSmrg# Minimum version: 1.5.0 102696fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.11.0 102706fae4e5dSmrg# 102716fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes 102726fae4e5dSmrg# not at the appropriate level. This macro enables a module to test for the 102736fae4e5dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 102746fae4e5dSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 102756fae4e5dSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 102766fae4e5dSmrg# --with-xmlto assumes 'auto'. 102776fae4e5dSmrg# 102786fae4e5dSmrg# Interface to module: 102796fae4e5dSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 102806fae4e5dSmrg# XMLTO: returns the path of the xmlto program found 102816fae4e5dSmrg# returns the path set by the user in the environment 102826fae4e5dSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 102836fae4e5dSmrg# 'no' user instructs the module not to use xmlto 102846fae4e5dSmrg# 102856fae4e5dSmrg# Added in version 1.10.0 102866fae4e5dSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 102876fae4e5dSmrg# xmlto for text output requires either lynx, links, or w3m browsers 102886fae4e5dSmrg# 102896fae4e5dSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 102906fae4e5dSmrg# 102916fae4e5dSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 102926fae4e5dSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 102936fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto])) 102946fae4e5dSmrgAC_ARG_WITH(xmlto, 102956fae4e5dSmrg AS_HELP_STRING([--with-xmlto], 102966fae4e5dSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 102976fae4e5dSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 102986fae4e5dSmrgm4_undefine([_defopt]) 102999c9ff80cSmrg 103006fae4e5dSmrgif test "x$use_xmlto" = x"auto"; then 103016fae4e5dSmrg AC_PATH_PROG([XMLTO], [xmlto]) 103026fae4e5dSmrg if test "x$XMLTO" = "x"; then 103036fae4e5dSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 103046fae4e5dSmrg have_xmlto=no 103056fae4e5dSmrg else 103066fae4e5dSmrg have_xmlto=yes 103076fae4e5dSmrg fi 103086fae4e5dSmrgelif test "x$use_xmlto" = x"yes" ; then 103096fae4e5dSmrg AC_PATH_PROG([XMLTO], [xmlto]) 103106fae4e5dSmrg if test "x$XMLTO" = "x"; then 103116fae4e5dSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 103126fae4e5dSmrg fi 103136fae4e5dSmrg have_xmlto=yes 103146fae4e5dSmrgelif test "x$use_xmlto" = x"no" ; then 103156fae4e5dSmrg if test "x$XMLTO" != "x"; then 103166fae4e5dSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 103176fae4e5dSmrg fi 103186fae4e5dSmrg have_xmlto=no 103196fae4e5dSmrgelse 103206fae4e5dSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 103216fae4e5dSmrgfi 103226fae4e5dSmrg 103236fae4e5dSmrg# Test for a minimum version of xmlto, if provided. 103246fae4e5dSmrgm4_ifval([$1], 103256fae4e5dSmrg[if test "$have_xmlto" = yes; then 103266fae4e5dSmrg # scrape the xmlto version 103276fae4e5dSmrg AC_MSG_CHECKING([the xmlto version]) 103286fae4e5dSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 103296fae4e5dSmrg AC_MSG_RESULT([$xmlto_version]) 103306fae4e5dSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 103316fae4e5dSmrg [if test "x$use_xmlto" = xauto; then 103326fae4e5dSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 103336fae4e5dSmrg have_xmlto=no 103346fae4e5dSmrg else 103356fae4e5dSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 103366fae4e5dSmrg fi]) 103376fae4e5dSmrgfi]) 103386fae4e5dSmrg 103396fae4e5dSmrg# Test for the ability of xmlto to generate a text target 103402fd96bc7Smrg# 103412fd96bc7Smrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 103422fd96bc7Smrg# following test for empty XML docbook files. 103432fd96bc7Smrg# For compatibility reasons use the following empty XML docbook file and if 103442fd96bc7Smrg# it fails try it again with a non-empty XML file. 103456fae4e5dSmrghave_xmlto_text=no 103466fae4e5dSmrgcat > conftest.xml << "EOF" 103476fae4e5dSmrgEOF 103486fae4e5dSmrgAS_IF([test "$have_xmlto" = yes], 103496fae4e5dSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 103506fae4e5dSmrg [have_xmlto_text=yes], 103512fd96bc7Smrg [# Try it again with a non-empty XML file. 103522fd96bc7Smrg cat > conftest.xml << "EOF" 103532fd96bc7Smrg<x></x> 103542fd96bc7SmrgEOF 103552fd96bc7Smrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 103562fd96bc7Smrg [have_xmlto_text=yes], 103572fd96bc7Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 103586fae4e5dSmrgrm -f conftest.xml 103596fae4e5dSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 103606fae4e5dSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 103616fae4e5dSmrg]) # XORG_WITH_XMLTO 103626fae4e5dSmrg 103636fae4e5dSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 103646fae4e5dSmrg# -------------------------------------------- 103656fae4e5dSmrg# Minimum version: 1.12.0 103666fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.12.0 103676fae4e5dSmrg# 103686fae4e5dSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 103696fae4e5dSmrg# XML-based language used for the transformation of XML documents. 103706fae4e5dSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 103716fae4e5dSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 103726fae4e5dSmrg# The XSLT processor is often used as a standalone tool for transformations. 103736fae4e5dSmrg# It should not be assumed that this tool is used only to work with documnetation. 103746fae4e5dSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 103756fae4e5dSmrg# 103766fae4e5dSmrg# Interface to module: 103776fae4e5dSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 103786fae4e5dSmrg# XSLTPROC: returns the path of the xsltproc program found 103796fae4e5dSmrg# returns the path set by the user in the environment 103806fae4e5dSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 103816fae4e5dSmrg# 'no' user instructs the module not to use xsltproc 103826fae4e5dSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 103836fae4e5dSmrg# 103846fae4e5dSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 103856fae4e5dSmrg# 103866fae4e5dSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 103876fae4e5dSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 103886fae4e5dSmrg# Preserves the interface, should it be implemented later 103896fae4e5dSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 103906fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto])) 103916fae4e5dSmrgAC_ARG_WITH(xsltproc, 103926fae4e5dSmrg AS_HELP_STRING([--with-xsltproc], 103936fae4e5dSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 103946fae4e5dSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 103956fae4e5dSmrgm4_undefine([_defopt]) 103966fae4e5dSmrg 103976fae4e5dSmrgif test "x$use_xsltproc" = x"auto"; then 103986fae4e5dSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 103996fae4e5dSmrg if test "x$XSLTPROC" = "x"; then 104006fae4e5dSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 104016fae4e5dSmrg have_xsltproc=no 104026fae4e5dSmrg else 104036fae4e5dSmrg have_xsltproc=yes 104046fae4e5dSmrg fi 104056fae4e5dSmrgelif test "x$use_xsltproc" = x"yes" ; then 104066fae4e5dSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 104076fae4e5dSmrg if test "x$XSLTPROC" = "x"; then 104086fae4e5dSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 104096fae4e5dSmrg fi 104106fae4e5dSmrg have_xsltproc=yes 104116fae4e5dSmrgelif test "x$use_xsltproc" = x"no" ; then 104126fae4e5dSmrg if test "x$XSLTPROC" != "x"; then 104136fae4e5dSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 104146fae4e5dSmrg fi 104156fae4e5dSmrg have_xsltproc=no 104166fae4e5dSmrgelse 104176fae4e5dSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 104186fae4e5dSmrgfi 104191f0ac6a5Smrg 104206fae4e5dSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 104216fae4e5dSmrg]) # XORG_WITH_XSLTPROC 104221f0ac6a5Smrg 104236fae4e5dSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 104246fae4e5dSmrg# ---------------------------------------- 104256fae4e5dSmrg# Minimum version: 1.15.0 104266fae4e5dSmrg# 104276fae4e5dSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 104286fae4e5dSmrg# scanning arbitrary text files, extracting information from those text files, 104296fae4e5dSmrg# and printing reports based on that information. 104306fae4e5dSmrg# 104316fae4e5dSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 104326fae4e5dSmrg# 104336fae4e5dSmrg# Interface to module: 104346fae4e5dSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 104356fae4e5dSmrg# PERL: returns the path of the perl program found 104366fae4e5dSmrg# returns the path set by the user in the environment 104376fae4e5dSmrg# --with-perl: 'yes' user instructs the module to use perl 104386fae4e5dSmrg# 'no' user instructs the module not to use perl 104396fae4e5dSmrg# have_perl: returns yes if perl found in PATH or no 104406fae4e5dSmrg# 104416fae4e5dSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 104426fae4e5dSmrg# 104436fae4e5dSmrgAC_DEFUN([XORG_WITH_PERL],[ 104446fae4e5dSmrgAC_ARG_VAR([PERL], [Path to perl command]) 104456fae4e5dSmrg# Preserves the interface, should it be implemented later 104466fae4e5dSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 104476fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto])) 104486fae4e5dSmrgAC_ARG_WITH(perl, 104496fae4e5dSmrg AS_HELP_STRING([--with-perl], 104506fae4e5dSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 104516fae4e5dSmrg [use_perl=$withval], [use_perl=]_defopt) 104526fae4e5dSmrgm4_undefine([_defopt]) 104536fae4e5dSmrg 104546fae4e5dSmrgif test "x$use_perl" = x"auto"; then 104556fae4e5dSmrg AC_PATH_PROG([PERL], [perl]) 104566fae4e5dSmrg if test "x$PERL" = "x"; then 104576fae4e5dSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 104586fae4e5dSmrg have_perl=no 104596fae4e5dSmrg else 104606fae4e5dSmrg have_perl=yes 104616fae4e5dSmrg fi 104626fae4e5dSmrgelif test "x$use_perl" = x"yes" ; then 104636fae4e5dSmrg AC_PATH_PROG([PERL], [perl]) 104646fae4e5dSmrg if test "x$PERL" = "x"; then 104656fae4e5dSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 104666fae4e5dSmrg fi 104676fae4e5dSmrg have_perl=yes 104686fae4e5dSmrgelif test "x$use_perl" = x"no" ; then 104696fae4e5dSmrg if test "x$PERL" != "x"; then 104706fae4e5dSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 104716fae4e5dSmrg fi 104726fae4e5dSmrg have_perl=no 104736fae4e5dSmrgelse 104746fae4e5dSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 104756fae4e5dSmrgfi 104761f0ac6a5Smrg 104776fae4e5dSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 104786fae4e5dSmrg]) # XORG_WITH_PERL 104791f0ac6a5Smrg 104806fae4e5dSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 104816fae4e5dSmrg# ---------------- 104826fae4e5dSmrg# Minimum version: 1.5.0 104836fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.11.0 104846fae4e5dSmrg# 104856fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes 104866fae4e5dSmrg# not at the appropriate level. This macro enables a module to test for the 104876fae4e5dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 104886fae4e5dSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 104896fae4e5dSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 104906fae4e5dSmrg# --with-asciidoc assumes 'auto'. 104916fae4e5dSmrg# 104926fae4e5dSmrg# Interface to module: 104936fae4e5dSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 104946fae4e5dSmrg# ASCIIDOC: returns the path of the asciidoc program found 104956fae4e5dSmrg# returns the path set by the user in the environment 104966fae4e5dSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 104976fae4e5dSmrg# 'no' user instructs the module not to use asciidoc 104986fae4e5dSmrg# 104996fae4e5dSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 105006fae4e5dSmrg# 105016fae4e5dSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 105026fae4e5dSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 105036fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto])) 105046fae4e5dSmrgAC_ARG_WITH(asciidoc, 105056fae4e5dSmrg AS_HELP_STRING([--with-asciidoc], 105066fae4e5dSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 105076fae4e5dSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 105086fae4e5dSmrgm4_undefine([_defopt]) 105091f0ac6a5Smrg 105106fae4e5dSmrgif test "x$use_asciidoc" = x"auto"; then 105116fae4e5dSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 105126fae4e5dSmrg if test "x$ASCIIDOC" = "x"; then 105136fae4e5dSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 105146fae4e5dSmrg have_asciidoc=no 105156fae4e5dSmrg else 105166fae4e5dSmrg have_asciidoc=yes 105176fae4e5dSmrg fi 105186fae4e5dSmrgelif test "x$use_asciidoc" = x"yes" ; then 105196fae4e5dSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 105206fae4e5dSmrg if test "x$ASCIIDOC" = "x"; then 105216fae4e5dSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 105226fae4e5dSmrg fi 105236fae4e5dSmrg have_asciidoc=yes 105246fae4e5dSmrgelif test "x$use_asciidoc" = x"no" ; then 105256fae4e5dSmrg if test "x$ASCIIDOC" != "x"; then 105266fae4e5dSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 105276fae4e5dSmrg fi 105286fae4e5dSmrg have_asciidoc=no 105296fae4e5dSmrgelse 105306fae4e5dSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 105316fae4e5dSmrgfi 105326fae4e5dSmrgm4_ifval([$1], 105336fae4e5dSmrg[if test "$have_asciidoc" = yes; then 105346fae4e5dSmrg # scrape the asciidoc version 105356fae4e5dSmrg AC_MSG_CHECKING([the asciidoc version]) 105366fae4e5dSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 105376fae4e5dSmrg AC_MSG_RESULT([$asciidoc_version]) 105386fae4e5dSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 105396fae4e5dSmrg [if test "x$use_asciidoc" = xauto; then 105406fae4e5dSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 105416fae4e5dSmrg have_asciidoc=no 105426fae4e5dSmrg else 105436fae4e5dSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 105446fae4e5dSmrg fi]) 105456fae4e5dSmrgfi]) 105466fae4e5dSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 105476fae4e5dSmrg]) # XORG_WITH_ASCIIDOC 105481f0ac6a5Smrg 105496fae4e5dSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10550b9867631Smrg# ------------------------------------------- 105516fae4e5dSmrg# Minimum version: 1.5.0 105526fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10553b9867631Smrg# Minimum version for optional DOT checking: 1.18.0 105546fae4e5dSmrg# 105556fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes 105566fae4e5dSmrg# not at the appropriate level. This macro enables a module to test for the 105576fae4e5dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 105586fae4e5dSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 105596fae4e5dSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 105606fae4e5dSmrg# --with-doxygen assumes 'auto'. 105616fae4e5dSmrg# 105626fae4e5dSmrg# Interface to module: 105636fae4e5dSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 105646fae4e5dSmrg# DOXYGEN: returns the path of the doxygen program found 105656fae4e5dSmrg# returns the path set by the user in the environment 105666fae4e5dSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 105676fae4e5dSmrg# 'no' user instructs the module not to use doxygen 105686fae4e5dSmrg# 105696fae4e5dSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 105706fae4e5dSmrg# 105716fae4e5dSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 105726fae4e5dSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10573b9867631SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 105746fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto])) 105756fae4e5dSmrgAC_ARG_WITH(doxygen, 105766fae4e5dSmrg AS_HELP_STRING([--with-doxygen], 105776fae4e5dSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 105786fae4e5dSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 105796fae4e5dSmrgm4_undefine([_defopt]) 105801f0ac6a5Smrg 105816fae4e5dSmrgif test "x$use_doxygen" = x"auto"; then 105826fae4e5dSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 105836fae4e5dSmrg if test "x$DOXYGEN" = "x"; then 105846fae4e5dSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 105856fae4e5dSmrg have_doxygen=no 105866fae4e5dSmrg else 105876fae4e5dSmrg have_doxygen=yes 105886fae4e5dSmrg fi 105896fae4e5dSmrgelif test "x$use_doxygen" = x"yes" ; then 105906fae4e5dSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 105916fae4e5dSmrg if test "x$DOXYGEN" = "x"; then 105926fae4e5dSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 105936fae4e5dSmrg fi 105946fae4e5dSmrg have_doxygen=yes 105956fae4e5dSmrgelif test "x$use_doxygen" = x"no" ; then 105966fae4e5dSmrg if test "x$DOXYGEN" != "x"; then 105976fae4e5dSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 105986fae4e5dSmrg fi 105996fae4e5dSmrg have_doxygen=no 106006fae4e5dSmrgelse 106016fae4e5dSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 106026fae4e5dSmrgfi 106036fae4e5dSmrgm4_ifval([$1], 106046fae4e5dSmrg[if test "$have_doxygen" = yes; then 106056fae4e5dSmrg # scrape the doxygen version 106066fae4e5dSmrg AC_MSG_CHECKING([the doxygen version]) 106076fae4e5dSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 106086fae4e5dSmrg AC_MSG_RESULT([$doxygen_version]) 106096fae4e5dSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 106106fae4e5dSmrg [if test "x$use_doxygen" = xauto; then 106116fae4e5dSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 106126fae4e5dSmrg have_doxygen=no 106136fae4e5dSmrg else 106146fae4e5dSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 106156fae4e5dSmrg fi]) 106166fae4e5dSmrgfi]) 10617b9867631Smrg 10618b9867631Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 10619b9867631Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 10620b9867631Smrgdnl HAVE_DOT = @HAVE_DOT@ 10621b9867631SmrgHAVE_DOT=no 10622b9867631Smrgif test "x$have_doxygen" = "xyes"; then 10623b9867631Smrg AC_PATH_PROG([DOT], [dot]) 10624b9867631Smrg if test "x$DOT" != "x"; then 10625b9867631Smrg HAVE_DOT=yes 10626b9867631Smrg fi 10627b9867631Smrgfi 10628b9867631Smrg 10629b9867631SmrgAC_SUBST([HAVE_DOT]) 10630b9867631SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 106316fae4e5dSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 106326fae4e5dSmrg]) # XORG_WITH_DOXYGEN 106339c9ff80cSmrg 106346fae4e5dSmrg# XORG_WITH_GROFF([DEFAULT]) 106356fae4e5dSmrg# ---------------- 106366fae4e5dSmrg# Minimum version: 1.6.0 106376fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.11.0 106386fae4e5dSmrg# 106396fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes 106406fae4e5dSmrg# not at the appropriate level. This macro enables a module to test for the 106416fae4e5dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 106426fae4e5dSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 106436fae4e5dSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 106446fae4e5dSmrg# --with-groff assumes 'auto'. 106456fae4e5dSmrg# 106466fae4e5dSmrg# Interface to module: 106476fae4e5dSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 106486fae4e5dSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 106496fae4e5dSmrg# HAVE_GROFF_MS: the -ms macros package 106506fae4e5dSmrg# GROFF: returns the path of the groff program found 106516fae4e5dSmrg# returns the path set by the user in the environment 106526fae4e5dSmrg# --with-groff: 'yes' user instructs the module to use groff 106536fae4e5dSmrg# 'no' user instructs the module not to use groff 106546fae4e5dSmrg# 106556fae4e5dSmrg# Added in version 1.9.0: 106566fae4e5dSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 106576fae4e5dSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 106586fae4e5dSmrg# psselect from the psutils package. 106596fae4e5dSmrg# the ghostcript package. Refer to the grohtml man pages 106606fae4e5dSmrg# 106616fae4e5dSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 106626fae4e5dSmrg# 106636fae4e5dSmrg# OS and distros often splits groff in a basic and full package, the former 106646fae4e5dSmrg# having the groff program and the later having devices, fonts and macros 106656fae4e5dSmrg# Checking for the groff executable is not enough. 106666fae4e5dSmrg# 106676fae4e5dSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 106686fae4e5dSmrg# unset HAVE_GROFF or GROFF env variables. 106696fae4e5dSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 106706fae4e5dSmrg# 106716fae4e5dSmrgAC_DEFUN([XORG_WITH_GROFF],[ 106726fae4e5dSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 106736fae4e5dSmrgm4_define([_defopt], m4_default([$1], [auto])) 106746fae4e5dSmrgAC_ARG_WITH(groff, 106756fae4e5dSmrg AS_HELP_STRING([--with-groff], 106766fae4e5dSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 106776fae4e5dSmrg [use_groff=$withval], [use_groff=]_defopt) 106786fae4e5dSmrgm4_undefine([_defopt]) 106799c9ff80cSmrg 106806fae4e5dSmrgif test "x$use_groff" = x"auto"; then 106816fae4e5dSmrg AC_PATH_PROG([GROFF], [groff]) 106826fae4e5dSmrg if test "x$GROFF" = "x"; then 106836fae4e5dSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 106846fae4e5dSmrg have_groff=no 106856fae4e5dSmrg else 106866fae4e5dSmrg have_groff=yes 106876fae4e5dSmrg fi 106886fae4e5dSmrgelif test "x$use_groff" = x"yes" ; then 106896fae4e5dSmrg AC_PATH_PROG([GROFF], [groff]) 106906fae4e5dSmrg if test "x$GROFF" = "x"; then 106916fae4e5dSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 106926fae4e5dSmrg fi 106936fae4e5dSmrg have_groff=yes 106946fae4e5dSmrgelif test "x$use_groff" = x"no" ; then 106956fae4e5dSmrg if test "x$GROFF" != "x"; then 106966fae4e5dSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 106976fae4e5dSmrg fi 106986fae4e5dSmrg have_groff=no 106996fae4e5dSmrgelse 107006fae4e5dSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 107016fae4e5dSmrgfi 107021f0ac6a5Smrg 107036fae4e5dSmrg# We have groff, test for the presence of the macro packages 107046fae4e5dSmrgif test "x$have_groff" = x"yes"; then 107056fae4e5dSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 107066fae4e5dSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 107076fae4e5dSmrg groff_ms_works=yes 107086fae4e5dSmrg else 107096fae4e5dSmrg groff_ms_works=no 107106fae4e5dSmrg fi 107116fae4e5dSmrg AC_MSG_RESULT([$groff_ms_works]) 107126fae4e5dSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 107136fae4e5dSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 107146fae4e5dSmrg groff_mm_works=yes 107156fae4e5dSmrg else 107166fae4e5dSmrg groff_mm_works=no 107176fae4e5dSmrg fi 107186fae4e5dSmrg AC_MSG_RESULT([$groff_mm_works]) 107196fae4e5dSmrgfi 107201f0ac6a5Smrg 107216fae4e5dSmrg# We have groff, test for HTML dependencies, one command per package 107226fae4e5dSmrgif test "x$have_groff" = x"yes"; then 107236fae4e5dSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 107246fae4e5dSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 107256fae4e5dSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 107266fae4e5dSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 107276fae4e5dSmrg have_groff_html=yes 107286fae4e5dSmrg else 107296fae4e5dSmrg have_groff_html=no 107306fae4e5dSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 107316fae4e5dSmrg fi 107326fae4e5dSmrgfi 107331f0ac6a5Smrg 107346fae4e5dSmrg# Set Automake conditionals for Makefiles 107356fae4e5dSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 107366fae4e5dSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 107376fae4e5dSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 107386fae4e5dSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 107396fae4e5dSmrg]) # XORG_WITH_GROFF 107409c9ff80cSmrg 107416fae4e5dSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 107426fae4e5dSmrg# --------------------------------------- 107436fae4e5dSmrg# Minimum version: 1.6.0 107446fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.11.0 107456fae4e5dSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 107466fae4e5dSmrg# 107476fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes 107486fae4e5dSmrg# not at the appropriate level. This macro enables a module to test for the 107496fae4e5dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 107506fae4e5dSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 107516fae4e5dSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 107526fae4e5dSmrg# --with-fop assumes 'auto'. 107536fae4e5dSmrg# 107546fae4e5dSmrg# Interface to module: 107556fae4e5dSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 107566fae4e5dSmrg# FOP: returns the path of the fop program found 107576fae4e5dSmrg# returns the path set by the user in the environment 107586fae4e5dSmrg# --with-fop: 'yes' user instructs the module to use fop 107596fae4e5dSmrg# 'no' user instructs the module not to use fop 107606fae4e5dSmrg# 107616fae4e5dSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 107626fae4e5dSmrg# 107636fae4e5dSmrgAC_DEFUN([XORG_WITH_FOP],[ 107646fae4e5dSmrgAC_ARG_VAR([FOP], [Path to fop command]) 107656fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto])) 107666fae4e5dSmrgAC_ARG_WITH(fop, 107676fae4e5dSmrg AS_HELP_STRING([--with-fop], 107686fae4e5dSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 107696fae4e5dSmrg [use_fop=$withval], [use_fop=]_defopt) 107706fae4e5dSmrgm4_undefine([_defopt]) 107719c9ff80cSmrg 107726fae4e5dSmrgif test "x$use_fop" = x"auto"; then 107736fae4e5dSmrg AC_PATH_PROG([FOP], [fop]) 107746fae4e5dSmrg if test "x$FOP" = "x"; then 107756fae4e5dSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 107766fae4e5dSmrg have_fop=no 107776fae4e5dSmrg else 107786fae4e5dSmrg have_fop=yes 107796fae4e5dSmrg fi 107806fae4e5dSmrgelif test "x$use_fop" = x"yes" ; then 107816fae4e5dSmrg AC_PATH_PROG([FOP], [fop]) 107826fae4e5dSmrg if test "x$FOP" = "x"; then 107836fae4e5dSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 107846fae4e5dSmrg fi 107856fae4e5dSmrg have_fop=yes 107866fae4e5dSmrgelif test "x$use_fop" = x"no" ; then 107876fae4e5dSmrg if test "x$FOP" != "x"; then 107886fae4e5dSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 107896fae4e5dSmrg fi 107906fae4e5dSmrg have_fop=no 107916fae4e5dSmrgelse 107926fae4e5dSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 107936fae4e5dSmrgfi 107941f0ac6a5Smrg 107956fae4e5dSmrg# Test for a minimum version of fop, if provided. 107966fae4e5dSmrgm4_ifval([$1], 107976fae4e5dSmrg[if test "$have_fop" = yes; then 107986fae4e5dSmrg # scrape the fop version 107996fae4e5dSmrg AC_MSG_CHECKING([for fop minimum version]) 108006fae4e5dSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 108016fae4e5dSmrg AC_MSG_RESULT([$fop_version]) 108026fae4e5dSmrg AS_VERSION_COMPARE([$fop_version], [$1], 108036fae4e5dSmrg [if test "x$use_fop" = xauto; then 108046fae4e5dSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 108056fae4e5dSmrg have_fop=no 108066fae4e5dSmrg else 108076fae4e5dSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 108086fae4e5dSmrg fi]) 108096fae4e5dSmrgfi]) 108106fae4e5dSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 108116fae4e5dSmrg]) # XORG_WITH_FOP 108121f0ac6a5Smrg 10813b9867631Smrg# XORG_WITH_M4([MIN-VERSION]) 10814b9867631Smrg# --------------------------- 10815b9867631Smrg# Minimum version: 1.19.0 10816b9867631Smrg# 10817b9867631Smrg# This macro attempts to locate an m4 macro processor which supports 10818b9867631Smrg# -I option and is only useful for modules relying on M4 in order to 10819b9867631Smrg# expand macros in source code files. 10820b9867631Smrg# 10821b9867631Smrg# Interface to module: 10822b9867631Smrg# M4: returns the path of the m4 program found 10823b9867631Smrg# returns the path set by the user in the environment 10824b9867631Smrg# 10825b9867631SmrgAC_DEFUN([XORG_WITH_M4], [ 10826b9867631SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 10827b9867631Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 10828b9867631Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 10829b9867631Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 10830b9867631Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 10831b9867631Smrg [$PATH:/usr/gnu/bin])]) 10832b9867631Smrg 10833b9867631SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 10834b9867631Smrg]) # XORG_WITH_M4 10835b9867631Smrg 108366fae4e5dSmrg# XORG_WITH_PS2PDF([DEFAULT]) 108376fae4e5dSmrg# ---------------- 108386fae4e5dSmrg# Minimum version: 1.6.0 108396fae4e5dSmrg# Minimum version for optional DEFAULT argument: 1.11.0 108406fae4e5dSmrg# 108416fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes 108426fae4e5dSmrg# not at the appropriate level. This macro enables a module to test for the 108436fae4e5dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 108446fae4e5dSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 108456fae4e5dSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 108466fae4e5dSmrg# --with-ps2pdf assumes 'auto'. 108476fae4e5dSmrg# 108486fae4e5dSmrg# Interface to module: 108496fae4e5dSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 108506fae4e5dSmrg# PS2PDF: returns the path of the ps2pdf program found 108516fae4e5dSmrg# returns the path set by the user in the environment 108526fae4e5dSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 108536fae4e5dSmrg# 'no' user instructs the module not to use ps2pdf 108546fae4e5dSmrg# 108556fae4e5dSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 108566fae4e5dSmrg# 108576fae4e5dSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 108586fae4e5dSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 108596fae4e5dSmrgm4_define([_defopt], m4_default([$1], [auto])) 108606fae4e5dSmrgAC_ARG_WITH(ps2pdf, 108616fae4e5dSmrg AS_HELP_STRING([--with-ps2pdf], 108626fae4e5dSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 108636fae4e5dSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 108646fae4e5dSmrgm4_undefine([_defopt]) 108651f0ac6a5Smrg 108666fae4e5dSmrgif test "x$use_ps2pdf" = x"auto"; then 108676fae4e5dSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 108686fae4e5dSmrg if test "x$PS2PDF" = "x"; then 108696fae4e5dSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 108706fae4e5dSmrg have_ps2pdf=no 108716fae4e5dSmrg else 108726fae4e5dSmrg have_ps2pdf=yes 108736fae4e5dSmrg fi 108746fae4e5dSmrgelif test "x$use_ps2pdf" = x"yes" ; then 108756fae4e5dSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 108766fae4e5dSmrg if test "x$PS2PDF" = "x"; then 108776fae4e5dSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 108786fae4e5dSmrg fi 108796fae4e5dSmrg have_ps2pdf=yes 108806fae4e5dSmrgelif test "x$use_ps2pdf" = x"no" ; then 108816fae4e5dSmrg if test "x$PS2PDF" != "x"; then 108826fae4e5dSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 108836fae4e5dSmrg fi 108846fae4e5dSmrg have_ps2pdf=no 108856fae4e5dSmrgelse 108866fae4e5dSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 108876fae4e5dSmrgfi 108886fae4e5dSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 108896fae4e5dSmrg]) # XORG_WITH_PS2PDF 10890e5410a46Smrg 108916fae4e5dSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 108926fae4e5dSmrg# ---------------- 108936fae4e5dSmrg# Minimum version: 1.6.0 108946fae4e5dSmrg# 108956fae4e5dSmrg# Documentation tools are not always available on all platforms and sometimes 108966fae4e5dSmrg# not at the appropriate level. This macro enables a builder to skip all 108976fae4e5dSmrg# documentation targets except traditional man pages. 108986fae4e5dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 108996fae4e5dSmrg# maximum flexibilty in controlling documentation building. 109006fae4e5dSmrg# Refer to: 109016fae4e5dSmrg# XORG_WITH_XMLTO --with-xmlto 109026fae4e5dSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 109036fae4e5dSmrg# XORG_WITH_DOXYGEN --with-doxygen 109046fae4e5dSmrg# XORG_WITH_FOP --with-fop 109056fae4e5dSmrg# XORG_WITH_GROFF --with-groff 109066fae4e5dSmrg# XORG_WITH_PS2PDF --with-ps2pdf 109076fae4e5dSmrg# 109086fae4e5dSmrg# Interface to module: 109096fae4e5dSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 109106fae4e5dSmrg# --enable-docs: 'yes' user instructs the module to generate docs 109116fae4e5dSmrg# 'no' user instructs the module not to generate docs 109126fae4e5dSmrg# parm1: specify the default value, yes or no. 109136fae4e5dSmrg# 109146fae4e5dSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 109156fae4e5dSmrgm4_define([docs_default], m4_default([$1], [yes])) 109166fae4e5dSmrgAC_ARG_ENABLE(docs, 109176fae4e5dSmrg AS_HELP_STRING([--enable-docs], 109186fae4e5dSmrg [Enable building the documentation (default: ]docs_default[)]), 109196fae4e5dSmrg [build_docs=$enableval], [build_docs=]docs_default) 109206fae4e5dSmrgm4_undefine([docs_default]) 109216fae4e5dSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 109226fae4e5dSmrgAC_MSG_CHECKING([whether to build documentation]) 109236fae4e5dSmrgAC_MSG_RESULT([$build_docs]) 109246fae4e5dSmrg]) # XORG_ENABLE_DOCS 10925e5410a46Smrg 109266fae4e5dSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 109276fae4e5dSmrg# ---------------- 109286fae4e5dSmrg# Minimum version: 1.6.0 109296fae4e5dSmrg# 109306fae4e5dSmrg# This macro enables a builder to skip all developer documentation. 109316fae4e5dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 109326fae4e5dSmrg# maximum flexibilty in controlling documentation building. 109336fae4e5dSmrg# Refer to: 109346fae4e5dSmrg# XORG_WITH_XMLTO --with-xmlto 109356fae4e5dSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 109366fae4e5dSmrg# XORG_WITH_DOXYGEN --with-doxygen 109376fae4e5dSmrg# XORG_WITH_FOP --with-fop 109386fae4e5dSmrg# XORG_WITH_GROFF --with-groff 109396fae4e5dSmrg# XORG_WITH_PS2PDF --with-ps2pdf 109406fae4e5dSmrg# 109416fae4e5dSmrg# Interface to module: 109426fae4e5dSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 109436fae4e5dSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 109446fae4e5dSmrg# 'no' user instructs the module not to generate developer docs 109456fae4e5dSmrg# parm1: specify the default value, yes or no. 109466fae4e5dSmrg# 109476fae4e5dSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 109486fae4e5dSmrgm4_define([devel_default], m4_default([$1], [yes])) 109496fae4e5dSmrgAC_ARG_ENABLE(devel-docs, 109506fae4e5dSmrg AS_HELP_STRING([--enable-devel-docs], 109516fae4e5dSmrg [Enable building the developer documentation (default: ]devel_default[)]), 109526fae4e5dSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 109536fae4e5dSmrgm4_undefine([devel_default]) 109546fae4e5dSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 109556fae4e5dSmrgAC_MSG_CHECKING([whether to build developer documentation]) 109566fae4e5dSmrgAC_MSG_RESULT([$build_devel_docs]) 109576fae4e5dSmrg]) # XORG_ENABLE_DEVEL_DOCS 10958e5410a46Smrg 109596fae4e5dSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 109606fae4e5dSmrg# ---------------- 109616fae4e5dSmrg# Minimum version: 1.6.0 109626fae4e5dSmrg# 109636fae4e5dSmrg# This macro enables a builder to skip all functional specification targets. 109646fae4e5dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 109656fae4e5dSmrg# maximum flexibilty in controlling documentation building. 109666fae4e5dSmrg# Refer to: 109676fae4e5dSmrg# XORG_WITH_XMLTO --with-xmlto 109686fae4e5dSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 109696fae4e5dSmrg# XORG_WITH_DOXYGEN --with-doxygen 109706fae4e5dSmrg# XORG_WITH_FOP --with-fop 109716fae4e5dSmrg# XORG_WITH_GROFF --with-groff 109726fae4e5dSmrg# XORG_WITH_PS2PDF --with-ps2pdf 109736fae4e5dSmrg# 109746fae4e5dSmrg# Interface to module: 109756fae4e5dSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 109766fae4e5dSmrg# --enable-specs: 'yes' user instructs the module to generate specs 109776fae4e5dSmrg# 'no' user instructs the module not to generate specs 109786fae4e5dSmrg# parm1: specify the default value, yes or no. 109796fae4e5dSmrg# 109806fae4e5dSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 109816fae4e5dSmrgm4_define([spec_default], m4_default([$1], [yes])) 109826fae4e5dSmrgAC_ARG_ENABLE(specs, 109836fae4e5dSmrg AS_HELP_STRING([--enable-specs], 109846fae4e5dSmrg [Enable building the specs (default: ]spec_default[)]), 109856fae4e5dSmrg [build_specs=$enableval], [build_specs=]spec_default) 109866fae4e5dSmrgm4_undefine([spec_default]) 109876fae4e5dSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 109886fae4e5dSmrgAC_MSG_CHECKING([whether to build functional specifications]) 109896fae4e5dSmrgAC_MSG_RESULT([$build_specs]) 109906fae4e5dSmrg]) # XORG_ENABLE_SPECS 10991e5410a46Smrg 109926fae4e5dSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 109936fae4e5dSmrg# ---------------------------------------------- 109946fae4e5dSmrg# Minimum version: 1.13.0 109956fae4e5dSmrg# 109966fae4e5dSmrg# This macro enables a builder to enable/disable unit testing 109976fae4e5dSmrg# It makes no assumption about the test cases implementation 109986fae4e5dSmrg# Test cases may or may not use Automake "Support for test suites" 109996fae4e5dSmrg# They may or may not use the software utility library GLib 110006fae4e5dSmrg# 110016fae4e5dSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 110026fae4e5dSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 110036fae4e5dSmrg# The variable enable_unit_tests is used by other macros in this file. 110046fae4e5dSmrg# 110056fae4e5dSmrg# Interface to module: 110066fae4e5dSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 110076fae4e5dSmrg# enable_unit_tests: used in configure.ac for additional configuration 110086fae4e5dSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 110096fae4e5dSmrg# 'no' user instructs the module not to build tests 110106fae4e5dSmrg# parm1: specify the default value, yes or no. 110116fae4e5dSmrg# 110126fae4e5dSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 110136fae4e5dSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 110146fae4e5dSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 110156fae4e5dSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 110166fae4e5dSmrgm4_define([_defopt], m4_default([$1], [auto])) 110176fae4e5dSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 110186fae4e5dSmrg [Enable building unit test cases (default: ]_defopt[)]), 110196fae4e5dSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 110206fae4e5dSmrgm4_undefine([_defopt]) 110216fae4e5dSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 110226fae4e5dSmrgAC_MSG_CHECKING([whether to build unit test cases]) 110236fae4e5dSmrgAC_MSG_RESULT([$enable_unit_tests]) 110246fae4e5dSmrg]) # XORG_ENABLE_UNIT_TESTS 110256fae4e5dSmrg 1102689c04b6cSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 1102789c04b6cSmrg# ------------------------------------------------------ 1102889c04b6cSmrg# Minimum version: 1.17.0 1102989c04b6cSmrg# 1103089c04b6cSmrg# This macro enables a builder to enable/disable integration testing 1103189c04b6cSmrg# It makes no assumption about the test cases' implementation 1103289c04b6cSmrg# Test cases may or may not use Automake "Support for test suites" 1103389c04b6cSmrg# 1103489c04b6cSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 1103589c04b6cSmrg# usually requires less dependencies and may be built and run under less 1103689c04b6cSmrg# stringent environments than integration tests. 1103789c04b6cSmrg# 1103889c04b6cSmrg# Interface to module: 1103989c04b6cSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 1104089c04b6cSmrg# enable_integration_tests: used in configure.ac for additional configuration 1104189c04b6cSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 1104289c04b6cSmrg# 'no' user instructs the module not to build tests 1104389c04b6cSmrg# parm1: specify the default value, yes or no. 1104489c04b6cSmrg# 1104589c04b6cSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 1104689c04b6cSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1104789c04b6cSmrgm4_define([_defopt], m4_default([$1], [auto])) 1104889c04b6cSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 1104989c04b6cSmrg [Enable building integration test cases (default: ]_defopt[)]), 1105089c04b6cSmrg [enable_integration_tests=$enableval], 1105189c04b6cSmrg [enable_integration_tests=]_defopt) 1105289c04b6cSmrgm4_undefine([_defopt]) 1105389c04b6cSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 1105489c04b6cSmrg [test "x$enable_integration_tests" != xno]) 1105589c04b6cSmrgAC_MSG_CHECKING([whether to build unit test cases]) 1105689c04b6cSmrgAC_MSG_RESULT([$enable_integration_tests]) 1105789c04b6cSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 1105889c04b6cSmrg 110596fae4e5dSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 110606fae4e5dSmrg# ---------------------------------------- 110616fae4e5dSmrg# Minimum version: 1.13.0 110626fae4e5dSmrg# 110636fae4e5dSmrg# GLib is a library which provides advanced data structures and functions. 110646fae4e5dSmrg# This macro enables a module to test for the presence of Glib. 110656fae4e5dSmrg# 110666fae4e5dSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 110676fae4e5dSmrg# Otherwise the value of $enable_unit_tests is blank. 110686fae4e5dSmrg# 1106989c04b6cSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 1107089c04b6cSmrg# test support usually requires less dependencies and may be built and run under 1107189c04b6cSmrg# less stringent environments than integration tests. 1107289c04b6cSmrg# 110736fae4e5dSmrg# Interface to module: 110746fae4e5dSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 110756fae4e5dSmrg# with_glib: used in configure.ac to know if GLib has been found 110766fae4e5dSmrg# --with-glib: 'yes' user instructs the module to use glib 110776fae4e5dSmrg# 'no' user instructs the module not to use glib 110786fae4e5dSmrg# 110796fae4e5dSmrgAC_DEFUN([XORG_WITH_GLIB],[ 110806fae4e5dSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 110816fae4e5dSmrgm4_define([_defopt], m4_default([$2], [auto])) 110826fae4e5dSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 110836fae4e5dSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 110846fae4e5dSmrg [with_glib=$withval], [with_glib=]_defopt) 110856fae4e5dSmrgm4_undefine([_defopt]) 110866fae4e5dSmrg 110876fae4e5dSmrghave_glib=no 110886fae4e5dSmrg# Do not probe GLib if user explicitly disabled unit testing 110896fae4e5dSmrgif test "x$enable_unit_tests" != x"no"; then 110906fae4e5dSmrg # Do not probe GLib if user explicitly disabled it 110916fae4e5dSmrg if test "x$with_glib" != x"no"; then 110926fae4e5dSmrg m4_ifval( 110936fae4e5dSmrg [$1], 110946fae4e5dSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 110956fae4e5dSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 110966fae4e5dSmrg ) 110976fae4e5dSmrg fi 110986fae4e5dSmrgfi 110999c9ff80cSmrg 111006fae4e5dSmrg# Not having GLib when unit testing has been explicitly requested is an error 111016fae4e5dSmrgif test "x$enable_unit_tests" = x"yes"; then 111026fae4e5dSmrg if test "x$have_glib" = x"no"; then 111036fae4e5dSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 111046fae4e5dSmrg fi 111056fae4e5dSmrgfi 111069c9ff80cSmrg 111076fae4e5dSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 111086fae4e5dSmrgif test "x$enable_unit_tests" = x"no"; then 111096fae4e5dSmrg if test "x$with_glib" = x"yes"; then 111106fae4e5dSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 111116fae4e5dSmrg fi 111126fae4e5dSmrgfi 111131f0ac6a5Smrg 111146fae4e5dSmrg# Not having GLib when it has been explicitly requested is an error 111156fae4e5dSmrgif test "x$with_glib" = x"yes"; then 111166fae4e5dSmrg if test "x$have_glib" = x"no"; then 111176fae4e5dSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 111186fae4e5dSmrg fi 111196fae4e5dSmrgfi 111201f0ac6a5Smrg 111216fae4e5dSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 111226fae4e5dSmrg]) # XORG_WITH_GLIB 111231f0ac6a5Smrg 111246fae4e5dSmrg# XORG_LD_WRAP([required|optional]) 111256fae4e5dSmrg# --------------------------------- 111266fae4e5dSmrg# Minimum version: 1.13.0 111276fae4e5dSmrg# 111286fae4e5dSmrg# Check if linker supports -wrap, passed via compiler flags 111296fae4e5dSmrg# 111306fae4e5dSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 111316fae4e5dSmrg# Otherwise the value of $enable_unit_tests is blank. 111326fae4e5dSmrg# 111336fae4e5dSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 111346fae4e5dSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 111356fae4e5dSmrg# available, an argument of "optional" allows use when some unit tests require 111366fae4e5dSmrg# ld -wrap and others do not. 111376fae4e5dSmrg# 111386fae4e5dSmrgAC_DEFUN([XORG_LD_WRAP],[ 111396fae4e5dSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 111406fae4e5dSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 111416fae4e5dSmrg void __wrap_exit(int status) { return; }], 111426fae4e5dSmrg [exit(0);])]) 111436fae4e5dSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 111446fae4e5dSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 111456fae4e5dSmrg if test "x$have_ld_wrap" = x"no"; then 111466fae4e5dSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 111476fae4e5dSmrg fi 111486fae4e5dSmrgfi 111496fae4e5dSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 111506fae4e5dSmrg# 111516fae4e5dSmrg]) # XORG_LD_WRAP 111529c9ff80cSmrg 111536fae4e5dSmrg# XORG_CHECK_LINKER_FLAGS 111546fae4e5dSmrg# ----------------------- 111556fae4e5dSmrg# SYNOPSIS 111566fae4e5dSmrg# 111576fae4e5dSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 111586fae4e5dSmrg# 111596fae4e5dSmrg# DESCRIPTION 111606fae4e5dSmrg# 111616fae4e5dSmrg# Check whether the given linker FLAGS work with the current language's 111626fae4e5dSmrg# linker, or whether they give an error. 111636fae4e5dSmrg# 111646fae4e5dSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 111656fae4e5dSmrg# success/failure. 111666fae4e5dSmrg# 111676fae4e5dSmrg# PROGRAM-SOURCE is the program source to link with, if needed 111686fae4e5dSmrg# 111696fae4e5dSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 111706fae4e5dSmrg# 111716fae4e5dSmrg# LICENSE 111726fae4e5dSmrg# 111736fae4e5dSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 111746fae4e5dSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 111756fae4e5dSmrg# Copyright (c) 2009 Matteo Frigo 111766fae4e5dSmrg# 111776fae4e5dSmrg# This program is free software: you can redistribute it and/or modify it 111786fae4e5dSmrg# under the terms of the GNU General Public License as published by the 111796fae4e5dSmrg# Free Software Foundation, either version 3 of the License, or (at your 111806fae4e5dSmrg# option) any later version. 111816fae4e5dSmrg# 111826fae4e5dSmrg# This program is distributed in the hope that it will be useful, but 111836fae4e5dSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 111846fae4e5dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 111856fae4e5dSmrg# Public License for more details. 111866fae4e5dSmrg# 111876fae4e5dSmrg# You should have received a copy of the GNU General Public License along 111886fae4e5dSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 111896fae4e5dSmrg# 111906fae4e5dSmrg# As a special exception, the respective Autoconf Macro's copyright owner 111916fae4e5dSmrg# gives unlimited permission to copy, distribute and modify the configure 111926fae4e5dSmrg# scripts that are the output of Autoconf when processing the Macro. You 111936fae4e5dSmrg# need not follow the terms of the GNU General Public License when using 111946fae4e5dSmrg# or distributing such scripts, even though portions of the text of the 111956fae4e5dSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 111966fae4e5dSmrg# all other use of the material that constitutes the Autoconf Macro. 111976fae4e5dSmrg# 111986fae4e5dSmrg# This special exception to the GPL applies to versions of the Autoconf 111996fae4e5dSmrg# Macro released by the Autoconf Archive. When you make and distribute a 112006fae4e5dSmrg# modified version of the Autoconf Macro, you may extend this special 112016fae4e5dSmrg# exception to the GPL to apply to your modified version as well.# 112026fae4e5dSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 112036fae4e5dSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 112046fae4e5dSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 112056fae4e5dSmrgAS_LITERAL_IF([$1], 112066fae4e5dSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 112076fae4e5dSmrg ax_save_FLAGS=$LDFLAGS 112086fae4e5dSmrg LDFLAGS="$1" 112096fae4e5dSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 112106fae4e5dSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 112116fae4e5dSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 112126fae4e5dSmrg LDFLAGS=$ax_save_FLAGS])], 112136fae4e5dSmrg [ax_save_FLAGS=$LDFLAGS 112146fae4e5dSmrg LDFLAGS="$1" 112156fae4e5dSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 112166fae4e5dSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 112176fae4e5dSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 112186fae4e5dSmrg LDFLAGS=$ax_save_FLAGS]) 112196fae4e5dSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 112206fae4e5dSmrgAC_MSG_RESULT($xorg_check_linker_flags) 112216fae4e5dSmrgif test "x$xorg_check_linker_flags" = xyes; then 112226fae4e5dSmrg m4_default([$2], :) 112236fae4e5dSmrgelse 112246fae4e5dSmrg m4_default([$3], :) 112256fae4e5dSmrgfi 112266fae4e5dSmrg]) # XORG_CHECK_LINKER_FLAGS 112279c9ff80cSmrg 112286fae4e5dSmrg# XORG_MEMORY_CHECK_FLAGS 112296fae4e5dSmrg# ----------------------- 112306fae4e5dSmrg# Minimum version: 1.16.0 11231e5410a46Smrg# 112326fae4e5dSmrg# This macro attempts to find appropriate memory checking functionality 112336fae4e5dSmrg# for various platforms which unit testing code may use to catch various 112346fae4e5dSmrg# forms of memory allocation and access errors in testing. 11235e5410a46Smrg# 112366fae4e5dSmrg# Interface to module: 112376fae4e5dSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 112386fae4e5dSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 112396fae4e5dSmrg# 112406fae4e5dSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 112416fae4e5dSmrg# 112426fae4e5dSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 112431f0ac6a5Smrg 112446fae4e5dSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 112456fae4e5dSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 112466fae4e5dSmrg [Environment variables to enable memory checking in tests]) 112471f0ac6a5Smrg 112486fae4e5dSmrg# Check for different types of support on different platforms 112496fae4e5dSmrgcase $host_os in 112506fae4e5dSmrg solaris*) 112516fae4e5dSmrg AC_CHECK_LIB([umem], [umem_alloc], 112526fae4e5dSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 112536fae4e5dSmrg ;; 112546fae4e5dSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 112556fae4e5dSmrg # both directly and inverted, so should not be 0 or 255. 112566fae4e5dSmrg malloc_debug_env='MALLOC_PERTURB_=15' 112576fae4e5dSmrg ;; 112586fae4e5dSmrg darwin*) 112596fae4e5dSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 112606fae4e5dSmrg ;; 112616fae4e5dSmrg *bsd*) 112626fae4e5dSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 112636fae4e5dSmrg ;; 112646fae4e5dSmrgesac 112651f0ac6a5Smrg 112666fae4e5dSmrg# User supplied flags override default flags 112676fae4e5dSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 112686fae4e5dSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 112696fae4e5dSmrgfi 112709c9ff80cSmrg 112716fae4e5dSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 112726fae4e5dSmrg]) # XORG_WITH_LINT 112739c9ff80cSmrg 112746fae4e5dSmrg# XORG_CHECK_MALLOC_ZERO 112756fae4e5dSmrg# ---------------------- 112766fae4e5dSmrg# Minimum version: 1.0.0 112776fae4e5dSmrg# 112786fae4e5dSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 112796fae4e5dSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 112806fae4e5dSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 112816fae4e5dSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 112826fae4e5dSmrgAC_ARG_ENABLE(malloc0returnsnull, 112836fae4e5dSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 112846fae4e5dSmrg [malloc(0) returns NULL (default: auto)]), 112856fae4e5dSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 112866fae4e5dSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 112879c9ff80cSmrg 112886fae4e5dSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 112896fae4e5dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 11290b9867631SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 11291b9867631Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 112926fae4e5dSmrg#include <stdlib.h> 112936fae4e5dSmrg],[ 112946fae4e5dSmrg char *m0, *r0, *c0, *p; 112956fae4e5dSmrg m0 = malloc(0); 112966fae4e5dSmrg p = malloc(10); 112976fae4e5dSmrg r0 = realloc(p,0); 112986fae4e5dSmrg c0 = calloc(0,10); 112996fae4e5dSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 113006fae4e5dSmrg])], 11301b9867631Smrg [xorg_cv_malloc0_returns_null=yes], 11302b9867631Smrg [xorg_cv_malloc0_returns_null=no])]) 11303b9867631SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 113046fae4e5dSmrgfi 113056fae4e5dSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 113069c9ff80cSmrg 113076fae4e5dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 113086fae4e5dSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 113096fae4e5dSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 113106fae4e5dSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 113116fae4e5dSmrgelse 113126fae4e5dSmrg MALLOC_ZERO_CFLAGS="" 113136fae4e5dSmrg XMALLOC_ZERO_CFLAGS="" 113146fae4e5dSmrg XTMALLOC_ZERO_CFLAGS="" 113156fae4e5dSmrgfi 113169c9ff80cSmrg 113176fae4e5dSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 113186fae4e5dSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 113196fae4e5dSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 113206fae4e5dSmrg]) # XORG_CHECK_MALLOC_ZERO 113216fae4e5dSmrg 113226fae4e5dSmrg# XORG_WITH_LINT() 113236fae4e5dSmrg# ---------------- 113246fae4e5dSmrg# Minimum version: 1.1.0 113259c9ff80cSmrg# 113266fae4e5dSmrg# This macro enables the use of a tool that flags some suspicious and 113276fae4e5dSmrg# non-portable constructs (likely to be bugs) in C language source code. 113286fae4e5dSmrg# It will attempt to locate the tool and use appropriate options. 113296fae4e5dSmrg# There are various lint type tools on different platforms. 113306fae4e5dSmrg# 113316fae4e5dSmrg# Interface to module: 113326fae4e5dSmrg# LINT: returns the path to the tool found on the platform 113336fae4e5dSmrg# or the value set to LINT on the configure cmd line 113346fae4e5dSmrg# also an Automake conditional 113356fae4e5dSmrg# LINT_FLAGS: an Automake variable with appropriate flags 113366fae4e5dSmrg# 113376fae4e5dSmrg# --with-lint: 'yes' user instructs the module to use lint 113386fae4e5dSmrg# 'no' user instructs the module not to use lint (default) 113396fae4e5dSmrg# 113406fae4e5dSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 113416fae4e5dSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 113426fae4e5dSmrg# 113436fae4e5dSmrgAC_DEFUN([XORG_WITH_LINT],[ 113449c9ff80cSmrg 113456fae4e5dSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 113466fae4e5dSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 113476fae4e5dSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 113486fae4e5dSmrg [Use a lint-style source code checker (default: disabled)])], 113496fae4e5dSmrg [use_lint=$withval], [use_lint=no]) 113509c9ff80cSmrg 113516fae4e5dSmrg# Obtain platform specific info like program name and options 113526fae4e5dSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 113536fae4e5dSmrgcase $host_os in 113546fae4e5dSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 113556fae4e5dSmrg lint_name=splint 113566fae4e5dSmrg lint_options="-badflag" 113576fae4e5dSmrg ;; 113586fae4e5dSmrg *freebsd* | *netbsd*) 113596fae4e5dSmrg lint_name=lint 113606fae4e5dSmrg lint_options="-u -b" 113616fae4e5dSmrg ;; 113626fae4e5dSmrg *solaris*) 113636fae4e5dSmrg lint_name=lint 113646fae4e5dSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 113656fae4e5dSmrg ;; 113666fae4e5dSmrgesac 113679c9ff80cSmrg 113686fae4e5dSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 113696fae4e5dSmrgif test "x$use_lint" = x"yes" ; then 113706fae4e5dSmrg AC_PATH_PROG([LINT], [$lint_name]) 113716fae4e5dSmrg if test "x$LINT" = "x"; then 113726fae4e5dSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 113736fae4e5dSmrg fi 113746fae4e5dSmrgelif test "x$use_lint" = x"no" ; then 113756fae4e5dSmrg if test "x$LINT" != "x"; then 113766fae4e5dSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 113776fae4e5dSmrg fi 113786fae4e5dSmrgelse 113796fae4e5dSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 113806fae4e5dSmrgfi 113819c9ff80cSmrg 113826fae4e5dSmrg# User supplied flags override default flags 113836fae4e5dSmrgif test "x$LINT_FLAGS" != "x"; then 113846fae4e5dSmrg lint_options=$LINT_FLAGS 113856fae4e5dSmrgfi 113869c9ff80cSmrg 113876fae4e5dSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 113886fae4e5dSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 113896fae4e5dSmrg 113906fae4e5dSmrg]) # XORG_WITH_LINT 113916fae4e5dSmrg 113926fae4e5dSmrg# XORG_LINT_LIBRARY(LIBNAME) 113936fae4e5dSmrg# -------------------------- 113946fae4e5dSmrg# Minimum version: 1.1.0 113956fae4e5dSmrg# 113966fae4e5dSmrg# Sets up flags for building lint libraries for checking programs that call 113976fae4e5dSmrg# functions in the library. 113986fae4e5dSmrg# 113996fae4e5dSmrg# Interface to module: 114006fae4e5dSmrg# LINTLIB - Automake variable with the name of lint library file to make 114016fae4e5dSmrg# MAKE_LINT_LIB - Automake conditional 114026fae4e5dSmrg# 114036fae4e5dSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 114046fae4e5dSmrg# - 'no' user instructs the module not to create a lint library (default) 114056fae4e5dSmrg 114066fae4e5dSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 114076fae4e5dSmrgAC_REQUIRE([XORG_WITH_LINT]) 114086fae4e5dSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 114096fae4e5dSmrg [Create lint library (default: disabled)])], 114106fae4e5dSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 114116fae4e5dSmrg 114126fae4e5dSmrgif test "x$make_lint_lib" = x"yes" ; then 114136fae4e5dSmrg LINTLIB=llib-l$1.ln 114146fae4e5dSmrg if test "x$LINT" = "x"; then 114156fae4e5dSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 114166fae4e5dSmrg fi 114176fae4e5dSmrgelif test "x$make_lint_lib" != x"no" ; then 114186fae4e5dSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 114196fae4e5dSmrgfi 114209c9ff80cSmrg 114216fae4e5dSmrgAC_SUBST(LINTLIB) 114226fae4e5dSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 114239c9ff80cSmrg 114246fae4e5dSmrg]) # XORG_LINT_LIBRARY 114251f0ac6a5Smrg 114266fae4e5dSmrg# XORG_COMPILER_BRAND 114276fae4e5dSmrg# ------------------- 114286fae4e5dSmrg# Minimum version: 1.14.0 114296fae4e5dSmrg# 114306fae4e5dSmrg# Checks for various brands of compilers and sets flags as appropriate: 114316fae4e5dSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 114326fae4e5dSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 114336fae4e5dSmrg# clang compiler - sets CLANGCC to "yes" 114346fae4e5dSmrg# Intel compiler - sets INTELCC to "yes" 114356fae4e5dSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 114366fae4e5dSmrg# 114376fae4e5dSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 114386fae4e5dSmrgAC_LANG_CASE( 114396fae4e5dSmrg [C], [ 114406fae4e5dSmrg AC_REQUIRE([AC_PROG_CC_C99]) 114416fae4e5dSmrg ], 114426fae4e5dSmrg [C++], [ 114436fae4e5dSmrg AC_REQUIRE([AC_PROG_CXX]) 114446fae4e5dSmrg ] 114456fae4e5dSmrg) 114466fae4e5dSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 114476fae4e5dSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 114486fae4e5dSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 114496fae4e5dSmrg]) # XORG_COMPILER_BRAND 11450e5410a46Smrg 114516fae4e5dSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 114526fae4e5dSmrg# --------------- 114536fae4e5dSmrg# Minimum version: 1.16.0 114546fae4e5dSmrg# 114556fae4e5dSmrg# Test if the compiler works when passed the given flag as a command line argument. 114566fae4e5dSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 114576fae4e5dSmrg# next flag in the list until there are no more options. 114586fae4e5dSmrg# 114596fae4e5dSmrg# Note that this does not guarantee that the compiler supports the flag as some 114606fae4e5dSmrg# compilers will simply ignore arguments that they do not understand, but we do 114616fae4e5dSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 114626fae4e5dSmrg# -Werror=unused-command-line-argument 114636fae4e5dSmrg# 114646fae4e5dSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 114656fae4e5dSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 114666fae4e5dSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 114676fae4e5dSmrg 114686fae4e5dSmrgAC_LANG_COMPILER_REQUIRE 114696fae4e5dSmrg 114706fae4e5dSmrgAC_LANG_CASE( 114716fae4e5dSmrg [C], [ 114726fae4e5dSmrg AC_REQUIRE([AC_PROG_CC_C99]) 114736fae4e5dSmrg define([PREFIX], [C]) 1147489c04b6cSmrg define([CACHE_PREFIX], [cc]) 1147589c04b6cSmrg define([COMPILER], [$CC]) 114766fae4e5dSmrg ], 114776fae4e5dSmrg [C++], [ 114786fae4e5dSmrg define([PREFIX], [CXX]) 1147989c04b6cSmrg define([CACHE_PREFIX], [cxx]) 1148089c04b6cSmrg define([COMPILER], [$CXX]) 114816fae4e5dSmrg ] 114826fae4e5dSmrg) 114831f0ac6a5Smrg 114846fae4e5dSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 114856fae4e5dSmrg 1148689c04b6cSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 114876fae4e5dSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1148889c04b6cSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 1148989c04b6cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 114906fae4e5dSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1149189c04b6cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 1149289c04b6cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 1149389c04b6cSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 114946fae4e5dSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 114956fae4e5dSmrgfi 114961f0ac6a5Smrg 1149789c04b6cSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 1149889c04b6cSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 114996fae4e5dSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 115006fae4e5dSmrg fi 115016fae4e5dSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1150289c04b6cSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 1150389c04b6cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 115046fae4e5dSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1150589c04b6cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 1150689c04b6cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 1150789c04b6cSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 115086fae4e5dSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 115096fae4e5dSmrgfi 115101f0ac6a5Smrg 115116fae4e5dSmrgfound="no" 115126fae4e5dSmrgm4_foreach([flag], m4_cdr($@), [ 115136fae4e5dSmrg if test $found = "no" ; then 11514b9867631Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 115156fae4e5dSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 115166fae4e5dSmrg fi 115176fae4e5dSmrg 11518b9867631Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 115196fae4e5dSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 115206fae4e5dSmrg fi 115216fae4e5dSmrg 115226fae4e5dSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 115236fae4e5dSmrg 115246fae4e5dSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 1152589c04b6cSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 1152689c04b6cSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 1152789c04b6cSmrg AC_CACHE_VAL($cacheid, 115286fae4e5dSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 1152989c04b6cSmrg [eval $cacheid=yes], 1153089c04b6cSmrg [eval $cacheid=no])]) 115316fae4e5dSmrg 115326fae4e5dSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 115336fae4e5dSmrg 1153489c04b6cSmrg eval supported=\$$cacheid 115356fae4e5dSmrg AC_MSG_RESULT([$supported]) 115366fae4e5dSmrg if test "$supported" = "yes" ; then 115376fae4e5dSmrg $1="$$1 ]flag[" 115386fae4e5dSmrg found="yes" 115396fae4e5dSmrg fi 115406fae4e5dSmrg fi 115416fae4e5dSmrg]) 115426fae4e5dSmrg]) # XORG_TESTSET_CFLAG 115431f0ac6a5Smrg 115446fae4e5dSmrg# XORG_COMPILER_FLAGS 115456fae4e5dSmrg# --------------- 115466fae4e5dSmrg# Minimum version: 1.16.0 115476fae4e5dSmrg# 115486fae4e5dSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 115496fae4e5dSmrg# arguments supported by the selected compiler which do NOT alter the generated 115506fae4e5dSmrg# code. These arguments will cause the compiler to print various warnings 115516fae4e5dSmrg# during compilation AND turn a conservative set of warnings into errors. 115526fae4e5dSmrg# 115536fae4e5dSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 115546fae4e5dSmrg# future versions of util-macros as options are added to new compilers. 115556fae4e5dSmrg# 115566fae4e5dSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 115576fae4e5dSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 115586fae4e5dSmrg 115596fae4e5dSmrgAC_ARG_ENABLE(selective-werror, 115606fae4e5dSmrg AS_HELP_STRING([--disable-selective-werror], 115616fae4e5dSmrg [Turn off selective compiler errors. (default: enabled)]), 115626fae4e5dSmrg [SELECTIVE_WERROR=$enableval], 115636fae4e5dSmrg [SELECTIVE_WERROR=yes]) 115646fae4e5dSmrg 115656fae4e5dSmrgAC_LANG_CASE( 115666fae4e5dSmrg [C], [ 115676fae4e5dSmrg define([PREFIX], [C]) 115686fae4e5dSmrg ], 115696fae4e5dSmrg [C++], [ 115706fae4e5dSmrg define([PREFIX], [CXX]) 115716fae4e5dSmrg ] 115726fae4e5dSmrg) 115736fae4e5dSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 115746fae4e5dSmrgif test "x$SUNCC" = "xyes"; then 115756fae4e5dSmrg [BASE_]PREFIX[FLAGS]="-v" 115766fae4e5dSmrgelse 115776fae4e5dSmrg [BASE_]PREFIX[FLAGS]="" 115786fae4e5dSmrgfi 115791f0ac6a5Smrg 115806fae4e5dSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 115816fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 115826fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 115836fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 115846fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 115856fae4e5dSmrg 115866fae4e5dSmrgAC_LANG_CASE( 115876fae4e5dSmrg [C], [ 115886fae4e5dSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 115896fae4e5dSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 115906fae4e5dSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 115916fae4e5dSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11592b9867631Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 115936fae4e5dSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 115946fae4e5dSmrg ] 115956fae4e5dSmrg) 115961f0ac6a5Smrg 115976fae4e5dSmrg# This chunk adds additional warnings that could catch undesired effects. 115986fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 115996fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 116006fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 116016fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 116026fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 116036fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11604b9867631SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 116056fae4e5dSmrg 116066fae4e5dSmrg# These are currently disabled because they are noisy. They will be enabled 116076fae4e5dSmrg# in the future once the codebase is sufficiently modernized to silence 116086fae4e5dSmrg# them. For now, I don't want them to drown out the other warnings. 116096fae4e5dSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 116106fae4e5dSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11611b9867631Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 116126fae4e5dSmrg 116136fae4e5dSmrg# Turn some warnings into errors, so we don't accidently get successful builds 116146fae4e5dSmrg# when there are problems that should be fixed. 116156fae4e5dSmrg 116166fae4e5dSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 116176fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 116186fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 116196fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 116206fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 116216fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 116226fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 116236fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 116246fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 116256fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 116266fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 116276fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 116286fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 116296fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 116306fae4e5dSmrgelse 116316fae4e5dSmrgAC_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]) 116326fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 116336fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 116346fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 116356fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 116366fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 116376fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 116386fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 116396fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 116406fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 116416fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 116426fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 116436fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 116446fae4e5dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 116456fae4e5dSmrgfi 116461f0ac6a5Smrg 116476fae4e5dSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 116486fae4e5dSmrg]) # XORG_COMPILER_FLAGS 116496fae4e5dSmrg 116506fae4e5dSmrg# XORG_CWARNFLAGS 116516fae4e5dSmrg# --------------- 116526fae4e5dSmrg# Minimum version: 1.2.0 116536fae4e5dSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 116549c9ff80cSmrg# 116556fae4e5dSmrg# Defines CWARNFLAGS to enable C compiler warnings. 116569c9ff80cSmrg# 116576fae4e5dSmrg# This function is deprecated because it defines -fno-strict-aliasing 116586fae4e5dSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 116596fae4e5dSmrg# is needed, then it should be added explicitly in the module when 116606fae4e5dSmrg# it is updated to use BASE_CFLAGS. 116616fae4e5dSmrg# 116626fae4e5dSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 116636fae4e5dSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 116646fae4e5dSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 116656fae4e5dSmrgAC_LANG_CASE( 116666fae4e5dSmrg [C], [ 116676fae4e5dSmrg CWARNFLAGS="$BASE_CFLAGS" 116686fae4e5dSmrg if test "x$GCC" = xyes ; then 116696fae4e5dSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 116706fae4e5dSmrg fi 116716fae4e5dSmrg AC_SUBST(CWARNFLAGS) 116726fae4e5dSmrg ] 116736fae4e5dSmrg) 116746fae4e5dSmrg]) # XORG_CWARNFLAGS 116751f0ac6a5Smrg 116766fae4e5dSmrg# XORG_STRICT_OPTION 116776fae4e5dSmrg# ----------------------- 116786fae4e5dSmrg# Minimum version: 1.3.0 116796fae4e5dSmrg# 116806fae4e5dSmrg# Add configure option to enable strict compilation flags, such as treating 116816fae4e5dSmrg# warnings as fatal errors. 116826fae4e5dSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 116836fae4e5dSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 116846fae4e5dSmrg# 116856fae4e5dSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 116866fae4e5dSmrg# when strict compilation is unconditionally desired. 116876fae4e5dSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 116886fae4e5dSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 116896fae4e5dSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 116901f0ac6a5Smrg 116916fae4e5dSmrgAC_ARG_ENABLE(strict-compilation, 116926fae4e5dSmrg AS_HELP_STRING([--enable-strict-compilation], 116936fae4e5dSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 116946fae4e5dSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 116951f0ac6a5Smrg 116966fae4e5dSmrgAC_LANG_CASE( 116976fae4e5dSmrg [C], [ 116986fae4e5dSmrg define([PREFIX], [C]) 116996fae4e5dSmrg ], 117006fae4e5dSmrg [C++], [ 117016fae4e5dSmrg define([PREFIX], [CXX]) 117026fae4e5dSmrg ] 117036fae4e5dSmrg) 117049c9ff80cSmrg 117056fae4e5dSmrg[STRICT_]PREFIX[FLAGS]="" 117066fae4e5dSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 117076fae4e5dSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 117089c9ff80cSmrg 117096fae4e5dSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 117106fae4e5dSmrg# activate it with -Werror, so we add it here explicitly. 117116fae4e5dSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 117129c9ff80cSmrg 117136fae4e5dSmrgif test "x$STRICT_COMPILE" = "xyes"; then 117146fae4e5dSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 117156fae4e5dSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 117166fae4e5dSmrgfi 117176fae4e5dSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 117186fae4e5dSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 117196fae4e5dSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 117206fae4e5dSmrg]) # XORG_STRICT_OPTION 117219c9ff80cSmrg 117226fae4e5dSmrg# XORG_DEFAULT_OPTIONS 117236fae4e5dSmrg# -------------------- 117246fae4e5dSmrg# Minimum version: 1.3.0 117259c9ff80cSmrg# 117266fae4e5dSmrg# Defines default options for X.Org modules. 117279c9ff80cSmrg# 117286fae4e5dSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 117296fae4e5dSmrgAC_REQUIRE([AC_PROG_INSTALL]) 117306fae4e5dSmrgXORG_COMPILER_FLAGS 117316fae4e5dSmrgXORG_CWARNFLAGS 117326fae4e5dSmrgXORG_STRICT_OPTION 117336fae4e5dSmrgXORG_RELEASE_VERSION 117346fae4e5dSmrgXORG_CHANGELOG 117356fae4e5dSmrgXORG_INSTALL 117366fae4e5dSmrgXORG_MANPAGE_SECTIONS 117376fae4e5dSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 117386fae4e5dSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 117396fae4e5dSmrg]) # XORG_DEFAULT_OPTIONS 117406fae4e5dSmrg 117416fae4e5dSmrg# XORG_INSTALL() 117426fae4e5dSmrg# ---------------- 117436fae4e5dSmrg# Minimum version: 1.4.0 117449c9ff80cSmrg# 117456fae4e5dSmrg# Defines the variable INSTALL_CMD as the command to copy 117466fae4e5dSmrg# INSTALL from $prefix/share/util-macros. 117479c9ff80cSmrg# 117486fae4e5dSmrgAC_DEFUN([XORG_INSTALL], [ 117496fae4e5dSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 117506fae4e5dSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 117516fae4e5dSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 117526fae4e5dSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 117536fae4e5dSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 117546fae4e5dSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 117556fae4e5dSmrgAC_SUBST([INSTALL_CMD]) 117566fae4e5dSmrg]) # XORG_INSTALL 117576fae4e5dSmrgdnl Copyright 2005 Red Hat, Inc 117586fae4e5dSmrgdnl 117596fae4e5dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 117606fae4e5dSmrgdnl documentation for any purpose is hereby granted without fee, provided that 117616fae4e5dSmrgdnl the above copyright notice appear in all copies and that both that 117626fae4e5dSmrgdnl copyright notice and this permission notice appear in supporting 117636fae4e5dSmrgdnl documentation. 117646fae4e5dSmrgdnl 117656fae4e5dSmrgdnl The above copyright notice and this permission notice shall be included 117666fae4e5dSmrgdnl in all copies or substantial portions of the Software. 117676fae4e5dSmrgdnl 117686fae4e5dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 117696fae4e5dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 117706fae4e5dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 117716fae4e5dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 117726fae4e5dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 117736fae4e5dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 117746fae4e5dSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 117756fae4e5dSmrgdnl 117766fae4e5dSmrgdnl Except as contained in this notice, the name of the copyright holders shall 117776fae4e5dSmrgdnl not be used in advertising or otherwise to promote the sale, use or 117786fae4e5dSmrgdnl other dealings in this Software without prior written authorization 117796fae4e5dSmrgdnl from the copyright holders. 117806fae4e5dSmrgdnl 117819c9ff80cSmrg 117826fae4e5dSmrg# XORG_RELEASE_VERSION 117836fae4e5dSmrg# -------------------- 117846fae4e5dSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11785b9867631Smrg 117866fae4e5dSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 117876fae4e5dSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 117886fae4e5dSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 117896fae4e5dSmrg [Major version of this package]) 117906fae4e5dSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 117916fae4e5dSmrg if test "x$PVM" = "x"; then 117926fae4e5dSmrg PVM="0" 117936fae4e5dSmrg fi 117946fae4e5dSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 117956fae4e5dSmrg [$PVM], 117966fae4e5dSmrg [Minor version of this package]) 117976fae4e5dSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 117986fae4e5dSmrg if test "x$PVP" = "x"; then 117996fae4e5dSmrg PVP="0" 118006fae4e5dSmrg fi 118016fae4e5dSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 118026fae4e5dSmrg [$PVP], 118036fae4e5dSmrg [Patch version of this package]) 118046fae4e5dSmrg]) 118059c9ff80cSmrg 118066fae4e5dSmrg# XORG_CHANGELOG() 118076fae4e5dSmrg# ---------------- 118086fae4e5dSmrg# Minimum version: 1.2.0 118096fae4e5dSmrg# 118106fae4e5dSmrg# Defines the variable CHANGELOG_CMD as the command to generate 118116fae4e5dSmrg# ChangeLog from git. 118126fae4e5dSmrg# 118136fae4e5dSmrg# 118146fae4e5dSmrgAC_DEFUN([XORG_CHANGELOG], [ 118156fae4e5dSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 118166fae4e5dSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 118176fae4e5dSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 118186fae4e5dSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 118196fae4e5dSmrgAC_SUBST([CHANGELOG_CMD]) 118206fae4e5dSmrg]) # XORG_CHANGELOG 118211f0ac6a5Smrg 11822